blun-king-cli 9.0.1 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LIESMICH.txt +31 -6
- package/README.md +35 -4
- package/bin/blun.js +0 -0
- package/bin/core-bootstrap.js +6 -1
- package/bin/king.js +0 -0
- package/bin/launcher-mode.js +13 -2
- package/bin/launcher-runtime.js +104 -32
- package/bin/plugin-bootstrap.js +11 -4
- package/bin/private-paths.js +1577 -10
- package/bin/update-lease.js +0 -0
- package/bin/update-notice.js +197 -46
- package/blun.mjs +7479 -3505
- package/dist-web/assets/{CodeBlockNode-Bsvp6ZEy.js → CodeBlockNode-CXnTLMNr.js} +1 -1
- package/dist-web/assets/{CodeBlockShell.vue_vue_type_style_index_0_lang-ta7hLjia.js → CodeBlockShell.vue_vue_type_style_index_0_lang-CCF8Ntnq.js} +1 -1
- package/dist-web/assets/{DesignSystemView-BmDDe28A.js → DesignSystemView-BbMOu-XO.js} +1 -1
- package/dist-web/assets/{Tooltip-nEEfaYVY.js → Tooltip-CFQEzqC-.js} +1 -1
- package/dist-web/assets/abnfDiagram-N423BO3Z-CsByy-GW.js +1 -0
- package/dist-web/assets/abnfDiagram-N423BO3Z-Z1APZG5m.js +1 -0
- package/dist-web/assets/arc-C-LXCaja.js +1 -0
- package/dist-web/assets/arc-C4VyWloT.js +1 -0
- package/dist-web/assets/architectureDiagram-T3A2C74G-DZq4L18e.js +36 -0
- package/dist-web/assets/architectureDiagram-T3A2C74G-DpddbUcM.js +36 -0
- package/dist-web/assets/blockDiagram-VBNYF7ZC-BV4sIf98.js +132 -0
- package/dist-web/assets/blockDiagram-VBNYF7ZC-BqccOSMr.js +132 -0
- package/dist-web/assets/{c4Diagram-AAUBKEIU-DtzacMnD.js → c4Diagram-5PPSVZJV-0MRkZlgP.js} +1 -1
- package/dist-web/assets/{c4Diagram-AAUBKEIU-D1VdMx8d.js → c4Diagram-5PPSVZJV-OHAcJrTy.js} +1 -1
- package/dist-web/assets/channel-B2VOQOI-.js +1 -0
- package/dist-web/assets/channel-DKjwM05G.js +1 -0
- package/dist-web/assets/{chunk-ND2GUHAM-DJoY9wNJ.js → chunk-2GRJ4B5K-DqJHs8Fw.js} +1 -1
- package/dist-web/assets/{chunk-ND2GUHAM-C4-rwdcv.js → chunk-2GRJ4B5K-oO6nqeLA.js} +1 -1
- package/dist-web/assets/{chunk-QZHKN3VN-C7YGaShq.js → chunk-2Q5K7J3B-B1nCd91o.js} +1 -1
- package/dist-web/assets/{chunk-QZHKN3VN-_Rz9_NuS.js → chunk-2Q5K7J3B-BC0Hsfqy.js} +1 -1
- package/dist-web/assets/chunk-5RXB4S5H-BfZa4yDH.js +231 -0
- package/dist-web/assets/chunk-5RXB4S5H-neG70kZx.js +231 -0
- package/dist-web/assets/{chunk-FMBD7UC4-DlLNDUx6.js → chunk-5VM5RSS4-l7biGqeH.js} +1 -1
- package/dist-web/assets/{chunk-FMBD7UC4-B2zs_Y-d.js → chunk-5VM5RSS4-u00AcpiJ.js} +1 -1
- package/dist-web/assets/chunk-6Q2QTUOP-BO-F11Gs.js +88 -0
- package/dist-web/assets/chunk-6Q2QTUOP-RUVRPBzG.js +88 -0
- package/dist-web/assets/{chunk-727SXJPM-Dn5wkDO_.js → chunk-GF5L2VYU-Ba-86KTd.js} +5 -5
- package/dist-web/assets/{chunk-727SXJPM-Dk2Xa3bA.js → chunk-GF5L2VYU-BtC69fw0.js} +5 -5
- package/dist-web/assets/{chunk-4BX2VUAB-DxZViaHS.js → chunk-JWPE2WC7-DIOubEqr.js} +1 -1
- package/dist-web/assets/{chunk-4BX2VUAB-WqrE2gaw.js → chunk-JWPE2WC7-u8Pcfhwh.js} +1 -1
- package/dist-web/assets/{chunk-2J33WTMH-Dm_s0_4f.js → chunk-KBJHAD2P-DDUeH_Ba.js} +1 -1
- package/dist-web/assets/{chunk-2J33WTMH-w4sdiKFO.js → chunk-KBJHAD2P-DS3BL64y.js} +1 -1
- package/dist-web/assets/chunk-RYQCIY6F-B9gFMVbS.js +1 -0
- package/dist-web/assets/chunk-RYQCIY6F-xg3EO0le.js +1 -0
- package/dist-web/assets/{chunk-55IACEB6-B5dE1-Um.js → chunk-XXDRQBXY-B60H0rRC.js} +1 -1
- package/dist-web/assets/{chunk-55IACEB6-B12zGIFz.js → chunk-XXDRQBXY-Bn1Xz6TQ.js} +1 -1
- package/dist-web/assets/classDiagram-JCYQIIEL-BA1TjAxj.js +1 -0
- package/dist-web/assets/classDiagram-JCYQIIEL-BNU7Qn4k.js +1 -0
- package/dist-web/assets/classDiagram-v2-OCEON4UE-BA1TjAxj.js +1 -0
- package/dist-web/assets/classDiagram-v2-OCEON4UE-BNU7Qn4k.js +1 -0
- package/dist-web/assets/{cose-bilkent-S5V4N54A-Bi19n8m-.js → cose-bilkent-JH36ORCC-4Ybddg08.js} +1 -1
- package/dist-web/assets/{cose-bilkent-S5V4N54A-c8o8NFp5.js → cose-bilkent-JH36ORCC-DqigO3T4.js} +1 -1
- package/dist-web/assets/cynefin-VYW2F7L2-C-EfYT07.js +178 -0
- package/dist-web/assets/cynefin-VYW2F7L2-rpD93tQ-.js +178 -0
- package/dist-web/assets/cynefinDiagram-MW4NZA55-DWZPLJcD.js +62 -0
- package/dist-web/assets/cynefinDiagram-MW4NZA55-DbTqnkVJ.js +62 -0
- package/dist-web/assets/dagre-VZM6K2ZE-DcM8aEVY.js +4 -0
- package/dist-web/assets/dagre-VZM6K2ZE-M_HVNtqP.js +4 -0
- package/dist-web/assets/diagram-7IWD3JNH-DoNximNF.js +30 -0
- package/dist-web/assets/diagram-7IWD3JNH-UymgsBNa.js +30 -0
- package/dist-web/assets/{diagram-KO2AKTUF-CFQs13i5.js → diagram-B4RE2ZJO-BVA2EhnC.js} +3 -3
- package/dist-web/assets/{diagram-KO2AKTUF-agFIuPJW.js → diagram-B4RE2ZJO-BiYu5WPF.js} +3 -3
- package/dist-web/assets/{diagram-LMA3HP47-TMIXizxR.js → diagram-LBJQPF4R-BD3kkgOO.js} +2 -2
- package/dist-web/assets/{diagram-LMA3HP47-He5zlyMt.js → diagram-LBJQPF4R-m3a1Euj3.js} +2 -2
- package/dist-web/assets/diagram-Q27KOJAE-D1mYQ_cI.js +24 -0
- package/dist-web/assets/diagram-Q27KOJAE-hy_T73PK.js +24 -0
- package/dist-web/assets/diagram-UB23O5K3-BWkoQZ4A.js +41 -0
- package/dist-web/assets/diagram-UB23O5K3-BtX8u6HG.js +41 -0
- package/dist-web/assets/ebnfDiagram-BXEA7PRR-BKs9JUHW.js +1 -0
- package/dist-web/assets/ebnfDiagram-BXEA7PRR-CBAnFkRF.js +1 -0
- package/dist-web/assets/erDiagram-JOGREHBK-3vKcWsxm.js +85 -0
- package/dist-web/assets/erDiagram-JOGREHBK-BIpd6dTf.js +85 -0
- package/dist-web/assets/flowDiagram-UKHOOZJN-D9wBbHm2.js +156 -0
- package/dist-web/assets/flowDiagram-UKHOOZJN-Z83i2UWI.js +156 -0
- package/dist-web/assets/ganttDiagram-PKOTCBZU-Cd_dViF-.js +292 -0
- package/dist-web/assets/ganttDiagram-PKOTCBZU-DFrb_S1d.js +292 -0
- package/dist-web/assets/{gitGraphDiagram-PVQCEYII-BSDFfwdY.js → gitGraphDiagram-DS77QQ5N-BiEEtTo7.js} +3 -3
- package/dist-web/assets/{gitGraphDiagram-PVQCEYII-DMbTATyw.js → gitGraphDiagram-DS77QQ5N-Dp3Ar-hi.js} +3 -3
- package/dist-web/assets/{graph-BwjfAU3j.js → graph-CAUpWmoK.js} +1 -1
- package/dist-web/assets/{graph--OzhPTMs.js → graph-DOmOIIwC.js} +1 -1
- package/dist-web/assets/{index-W6VnSrkB.js → index-Ba1OvLjf.js} +2 -2
- package/dist-web/assets/{index-CkVgGDpx.js → index-CiPA8Kex.js} +4 -4
- package/dist-web/assets/{index-BzK4vJBu.js → index-DdEakFJM.js} +1 -1
- package/dist-web/assets/{index10-Czg_oF-W.js → index10-CNr4U-Nw.js} +1 -1
- package/dist-web/assets/{index11-BjzCZuCr.js → index11-Dto_yZNz.js} +1 -1
- package/dist-web/assets/{index5-DlVoNkCD.js → index5-B2PldaO2.js} +1 -1
- package/dist-web/assets/{index6-BxiXA2yo.js → index6-CBdZmmyx.js} +1 -1
- package/dist-web/assets/{index7-BPdza6d1.js → index7-Dz9oCsUF.js} +1 -1
- package/dist-web/assets/{index8-Q_XzGC1Z.js → index8-B6k25jtU.js} +2 -2
- package/dist-web/assets/{infoDiagram-5YYISTIA-2JF3XEdD.js → infoDiagram-6WML65LV-BSa2g04G.js} +1 -1
- package/dist-web/assets/{infoDiagram-5YYISTIA-UrQusrJq.js → infoDiagram-6WML65LV-D4ph2sIH.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-7RVUL-vB.js → ishikawaDiagram-WSZJBQD7-DjKjbMm9.js} +5 -5
- package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-C5OstRVV.js → ishikawaDiagram-WSZJBQD7-Hm36UOQe.js} +5 -5
- package/dist-web/assets/{journeyDiagram-JHISSGLW-B34fCMu9.js → journeyDiagram-NVQOT4AX-DttHDfPQ.js} +1 -1
- package/dist-web/assets/{journeyDiagram-JHISSGLW-yctdo4bX.js → journeyDiagram-NVQOT4AX-MvWWPNDV.js} +1 -1
- package/dist-web/assets/{kanban-definition-UN3LZRKU-BS4FBZsQ.js → kanban-definition-27J2QSJJ-C5gB-W0d.js} +7 -7
- package/dist-web/assets/{kanban-definition-UN3LZRKU-CxBCv27E.js → kanban-definition-27J2QSJJ-Cu-E_cXA.js} +5 -5
- package/dist-web/assets/layout-CvP6o9AK.js +1 -0
- package/dist-web/assets/layout-D-LzfAck.js +1 -0
- package/dist-web/assets/{linear-3mB6q2-g.js → linear-B3HWgQI2.js} +1 -1
- package/dist-web/assets/{linear-BKCnUo31.js → linear-BRGe4-d6.js} +1 -1
- package/dist-web/assets/map-CWKZqZjr.js +1 -0
- package/dist-web/assets/map-DxJ2ADlA.js +1 -0
- package/dist-web/assets/mermaid.core-D-9Sx1No.js +314 -0
- package/dist-web/assets/mermaidParser.worker-PTFfzpoB.js +318 -0
- package/dist-web/assets/{mindmap-definition-RKZ34NQL-BmJZpjh6.js → mindmap-definition-FAOFIHXS-C4vnms3i.js} +2 -2
- package/dist-web/assets/{mindmap-definition-RKZ34NQL-1mjWUcf6.js → mindmap-definition-FAOFIHXS-Cg_hoVIq.js} +1 -1
- package/dist-web/assets/pegDiagram-VL7TDLO6-B2fFEFUH.js +1 -0
- package/dist-web/assets/pegDiagram-VL7TDLO6-CSX9hitD.js +1 -0
- package/dist-web/assets/pieDiagram-7S7Q4E2Y-0L0mxahZ.js +39 -0
- package/dist-web/assets/pieDiagram-7S7Q4E2Y-C7T0Cmw1.js +39 -0
- package/dist-web/assets/{quadrantDiagram-W4KKPZXB-BmT_qM09.js → quadrantDiagram-CIZ2JOQS-BBy7w4kD.js} +3 -3
- package/dist-web/assets/{quadrantDiagram-W4KKPZXB-C0kPuyNP.js → quadrantDiagram-CIZ2JOQS-U483z0er.js} +3 -3
- package/dist-web/assets/railroadDiagram-AXF67PYL-D80a2_DJ.js +1 -0
- package/dist-web/assets/railroadDiagram-AXF67PYL-DX8y0MzW.js +1 -0
- package/dist-web/assets/{requirementDiagram-4Y6WPE33-C0YP_Amt.js → requirementDiagram-LRYGKXZP-CeyHfq8t.js} +3 -3
- package/dist-web/assets/{requirementDiagram-4Y6WPE33-CZrxH1Y2.js → requirementDiagram-LRYGKXZP-DGD5J_4k.js} +3 -3
- package/dist-web/assets/sankeyDiagram-W5VNT64P-CCISkkrR.js +40 -0
- package/dist-web/assets/sankeyDiagram-W5VNT64P-CT5PdZz2.js +40 -0
- package/dist-web/assets/sequenceDiagram-SI44F4Z6-BeMzHWXI.js +162 -0
- package/dist-web/assets/sequenceDiagram-SI44F4Z6-jQfm2XS7.js +162 -0
- package/dist-web/assets/sizeCapture-X5ZJPWSS-BQsTdtrv.js +1 -0
- package/dist-web/assets/sizeCapture-X5ZJPWSS-lRZsmCoS.js +1 -0
- package/dist-web/assets/stateDiagram-OKZ733FA-ClCgTdUm.js +1 -0
- package/dist-web/assets/stateDiagram-OKZ733FA-Cv59z5YT.js +1 -0
- package/dist-web/assets/stateDiagram-v2-UEYNNEHI-R8jTc--F.js +1 -0
- package/dist-web/assets/stateDiagram-v2-UEYNNEHI-fi_lrTAx.js +1 -0
- package/dist-web/assets/swimlanes-SLNWSIFB-BCdOUN05.js +2 -0
- package/dist-web/assets/swimlanes-SLNWSIFB-Cu5l7SuR.js +1 -0
- package/dist-web/assets/swimlanesDiagram-ULZ7WXOC-BUd_uYK3.js +8 -0
- package/dist-web/assets/swimlanesDiagram-ULZ7WXOC-CalrsgPK.js +8 -0
- package/dist-web/assets/{timeline-definition-PNZ67QCA-DsVZdrZa.js → timeline-definition-Z64GVDOM-CMjnh4bu.js} +4 -4
- package/dist-web/assets/{timeline-definition-PNZ67QCA-DnB6Usl0.js → timeline-definition-Z64GVDOM-DpWutSKa.js} +4 -4
- package/dist-web/assets/vennDiagram-T6HMQDX7-DKJW_8oU.js +34 -0
- package/dist-web/assets/vennDiagram-T6HMQDX7-DVC5JVsc.js +34 -0
- package/dist-web/assets/{vue.runtime.esm-bundler-pgHGheCW.js → vue.runtime.esm-bundler-BwwRtQwQ.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-YWT4CUSO-oBauTCEw.js → wardleyDiagram-T6FBY63Y-BK2mrq7L.js} +3 -3
- package/dist-web/assets/{wardleyDiagram-YWT4CUSO-DCiyDQNB.js → wardleyDiagram-T6FBY63Y-oUvgepFn.js} +3 -3
- package/dist-web/assets/xychartDiagram-ELKLHX3M-DI6n79q0.js +7 -0
- package/dist-web/assets/xychartDiagram-ELKLHX3M-DUJu9F7-.js +7 -0
- package/dist-web/index.html +1 -1
- package/dist-web/vis/index.html.gz +0 -0
- package/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/package.json +7 -2
- package/telegram-plugin/dist/bridge.mjs +6 -4
- package/telegram-plugin/dist/mcp-server.mjs +236 -71
- package/dist-web/assets/arc-4xPfymbf.js +0 -1
- package/dist-web/assets/arc-Doj0wRZ0.js +0 -1
- package/dist-web/assets/architectureDiagram-3BPJPVTR-BGih283a.js +0 -36
- package/dist-web/assets/architectureDiagram-3BPJPVTR-CQ09RrbH.js +0 -36
- package/dist-web/assets/blockDiagram-GPEHLZMM-3ShMf1gu.js +0 -132
- package/dist-web/assets/blockDiagram-GPEHLZMM-CAtDjkJt.js +0 -132
- package/dist-web/assets/channel-DNkUo9e6.js +0 -1
- package/dist-web/assets/channel-DcnUTIGB.js +0 -1
- package/dist-web/assets/chunk-AQP2D5EJ-FS8-f8lF.js +0 -231
- package/dist-web/assets/chunk-AQP2D5EJ-UKhb4V4r.js +0 -231
- package/dist-web/assets/classDiagram-4FO5ZUOK-B1ZO8EbE.js +0 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-xk6cM9Kq.js +0 -1
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-B1ZO8EbE.js +0 -1
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-xk6cM9Kq.js +0 -1
- package/dist-web/assets/dagre-BM42HDAG-CmUO9qKN.js +0 -4
- package/dist-web/assets/dagre-BM42HDAG-DLMfLCoV.js +0 -4
- package/dist-web/assets/diagram-2AECGRRQ-DQTst0OH.js +0 -43
- package/dist-web/assets/diagram-2AECGRRQ-L74iLMqd.js +0 -43
- package/dist-web/assets/diagram-5GNKFQAL-BiBm7CJR.js +0 -10
- package/dist-web/assets/diagram-5GNKFQAL-DoE6q7H1.js +0 -10
- package/dist-web/assets/diagram-OG6HWLK6-BHCt1E0n.js +0 -24
- package/dist-web/assets/diagram-OG6HWLK6-DRyxjFMa.js +0 -24
- package/dist-web/assets/erDiagram-TEJ5UH35-BoDczjGG.js +0 -85
- package/dist-web/assets/erDiagram-TEJ5UH35-yd6SOv_7.js +0 -85
- package/dist-web/assets/flowDiagram-I6XJVG4X-DHoceI7r.js +0 -162
- package/dist-web/assets/flowDiagram-I6XJVG4X-DkYNQv0R.js +0 -162
- package/dist-web/assets/ganttDiagram-6RSMTGT7-Cg1TQBc0.js +0 -292
- package/dist-web/assets/ganttDiagram-6RSMTGT7-Z6klo7KK.js +0 -292
- package/dist-web/assets/layout-C1ojF0zw.js +0 -1
- package/dist-web/assets/layout-SsrduOYp.js +0 -1
- package/dist-web/assets/mermaid.core-D_lKT0dR.js +0 -309
- package/dist-web/assets/mermaidParser.worker-Dx4jPi9z.js +0 -313
- package/dist-web/assets/pieDiagram-4H26LBE5-BU41t2A_.js +0 -30
- package/dist-web/assets/pieDiagram-4H26LBE5-BkwDAvbt.js +0 -30
- package/dist-web/assets/sankeyDiagram-5OEKKPKP-De_o7hDr.js +0 -40
- package/dist-web/assets/sankeyDiagram-5OEKKPKP-Dvuj6bMA.js +0 -40
- package/dist-web/assets/sequenceDiagram-3UESZ5HK-DuCrgPyA.js +0 -162
- package/dist-web/assets/sequenceDiagram-3UESZ5HK-VAxffBe7.js +0 -162
- package/dist-web/assets/stateDiagram-AJRCARHV-CYLupxM7.js +0 -1
- package/dist-web/assets/stateDiagram-AJRCARHV-nDExQydZ.js +0 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-BhEc7Thx.js +0 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-BzwD_BIl.js +0 -1
- package/dist-web/assets/vennDiagram-CIIHVFJN-BBHQmCFf.js +0 -34
- package/dist-web/assets/vennDiagram-CIIHVFJN-Cfj-K9NW.js +0 -34
- package/dist-web/assets/wardley-L42UT6IY-BJFn8eDD.js +0 -173
- package/dist-web/assets/wardley-L42UT6IY-BSu8-4hg.js +0 -173
- package/dist-web/assets/xychartDiagram-2RQKCTM6-C2iZpl9I.js +0 -7
- package/dist-web/assets/xychartDiagram-2RQKCTM6-Db_VoDBV.js +0 -7
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
var Ec=Object.defineProperty,p=(e,t)=>Ec(e,"name",{value:t,configurable:!0}),wy=(e,t)=>{for(var r in t)Ec(e,r,{get:t[r],enumerable:!0})};function Ty(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ao={exports:{}},Sy=Ao.exports,Gl;function _y(){return Gl||(Gl=1,(function(e,t){(function(r,i){e.exports=i()})(Sy,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var M=["th","st","nd","rd"],A=$%100;return"["+$+(M[(A-20)%10]||M[A]||M[0])+"]"}},k=function($,M,A){var P=String($);return!P||P.length>=M?$:""+Array(M+1-P.length).join(A)+$},T={s:k,z:function($){var M=-$.utcOffset(),A=Math.abs(M),P=Math.floor(A/60),E=A%60;return(M<=0?"+":"-")+k(P,2,"0")+":"+k(E,2,"0")},m:function $(M,A){if(M.date()<A.date())return-$(A,M);var P=12*(A.year()-M.year())+(A.month()-M.month()),E=M.clone().add(P,d),H=A-E<0,Y=M.clone().add(P+(H?-1:1),d);return+(-(P+(A-E)/(H?E-Y:Y-E))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",B={};B[S]=b;var v="$isDayjsObject",L=function($){return $ instanceof U||!(!$||!$[v])},N=function $(M,A,P){var E;if(!M)return S;if(typeof M=="string"){var H=M.toLowerCase();B[H]&&(E=H),A&&(B[H]=A,E=H);var Y=M.split("-");if(!E&&Y.length>1)return $(Y[0])}else{var ot=M.name;B[ot]=M,E=ot}return!P&&E&&(S=E),E||!P&&S},R=function($,M){if(L($))return $.clone();var A=typeof M=="object"?M:{};return A.date=$,A.args=arguments,new U(A)},D=T;D.l=N,D.i=L,D.w=function($,M){return R($,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var U=(function(){function $(A){this.$L=N(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[v]=!0}var M=$.prototype;return M.parse=function(A){this.$d=(function(P){var E=P.date,H=P.utc;if(E===null)return new Date(NaN);if(D.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Y=E.match(y);if(Y){var ot=Y[2]-1||0,Z=(Y[7]||"0").substring(0,3);return H?new Date(Date.UTC(Y[1],ot,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Z)):new Date(Y[1],ot,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Z)}}return new Date(E)})(A),this.init()},M.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},M.$utils=function(){return D},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(A,P){var E=R(A);return this.startOf(P)<=E&&E<=this.endOf(P)},M.isAfter=function(A,P){return R(A)<this.startOf(P)},M.isBefore=function(A,P){return this.endOf(P)<R(A)},M.$g=function(A,P,E){return D.u(A)?this[P]:this.set(E,A)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(A,P){var E=this,H=!!D.u(P)||P,Y=D.p(A),ot=function(St,_t){var $t=D.w(E.$u?Date.UTC(E.$y,_t,St):new Date(E.$y,_t,St),E);return H?$t:$t.endOf(c)},Z=function(St,_t){return D.w(E.toDate()[St].apply(E.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(_t)),E)},ct=this.$W,ut=this.$M,xt=this.$D,et="set"+(this.$u?"UTC":"");switch(Y){case u:return H?ot(1,0):ot(31,11);case d:return H?ot(1,ut):ot(0,ut+1);case h:var ft=this.$locale().weekStart||0,kt=(ct<ft?ct+7:ct)-ft;return ot(H?xt-kt:xt+(6-kt),ut);case c:case g:return Z(et+"Hours",0);case l:return Z(et+"Minutes",1);case n:return Z(et+"Seconds",2);case a:return Z(et+"Milliseconds",3);default:return this.clone()}},M.endOf=function(A){return this.startOf(A,!1)},M.$set=function(A,P){var E,H=D.p(A),Y="set"+(this.$u?"UTC":""),ot=(E={},E[c]=Y+"Date",E[g]=Y+"Date",E[d]=Y+"Month",E[u]=Y+"FullYear",E[l]=Y+"Hours",E[n]=Y+"Minutes",E[a]=Y+"Seconds",E[s]=Y+"Milliseconds",E)[H],Z=H===c?this.$D+(P-this.$W):P;if(H===d||H===u){var ct=this.clone().set(g,1);ct.$d[ot](Z),ct.init(),this.$d=ct.set(g,Math.min(this.$D,ct.daysInMonth())).$d}else ot&&this.$d[ot](Z);return this.init(),this},M.set=function(A,P){return this.clone().$set(A,P)},M.get=function(A){return this[D.p(A)]()},M.add=function(A,P){var E,H=this;A=Number(A);var Y=D.p(P),ot=function(ut){var xt=R(H);return D.w(xt.date(xt.date()+Math.round(ut*A)),H)};if(Y===d)return this.set(d,this.$M+A);if(Y===u)return this.set(u,this.$y+A);if(Y===c)return ot(1);if(Y===h)return ot(7);var Z=(E={},E[n]=i,E[l]=o,E[a]=r,E)[Y]||1,ct=this.$d.getTime()+A*Z;return D.w(ct,this)},M.subtract=function(A,P){return this.add(-1*A,P)},M.format=function(A){var P=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var H=A||"YYYY-MM-DDTHH:mm:ssZ",Y=D.z(this),ot=this.$H,Z=this.$m,ct=this.$M,ut=E.weekdays,xt=E.months,et=E.meridiem,ft=function(_t,$t,mt,Re){return _t&&(_t[$t]||_t(P,H))||mt[$t].slice(0,Re)},kt=function(_t){return D.s(ot%12||12,_t,"0")},St=et||function(_t,$t,mt){var Re=_t<12?"AM":"PM";return mt?Re.toLowerCase():Re};return H.replace(C,(function(_t,$t){return $t||(function(mt){switch(mt){case"YY":return String(P.$y).slice(-2);case"YYYY":return D.s(P.$y,4,"0");case"M":return ct+1;case"MM":return D.s(ct+1,2,"0");case"MMM":return ft(E.monthsShort,ct,xt,3);case"MMMM":return ft(xt,ct);case"D":return P.$D;case"DD":return D.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return ft(E.weekdaysMin,P.$W,ut,2);case"ddd":return ft(E.weekdaysShort,P.$W,ut,3);case"dddd":return ut[P.$W];case"H":return String(ot);case"HH":return D.s(ot,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return St(ot,Z,!0);case"A":return St(ot,Z,!1);case"m":return String(Z);case"mm":return D.s(Z,2,"0");case"s":return String(P.$s);case"ss":return D.s(P.$s,2,"0");case"SSS":return D.s(P.$ms,3,"0");case"Z":return Y}return null})(_t)||Y.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(A,P,E){var H,Y=this,ot=D.p(P),Z=R(A),ct=(Z.utcOffset()-this.utcOffset())*i,ut=this-Z,xt=function(){return D.m(Y,Z)};switch(ot){case u:H=xt()/12;break;case d:H=xt();break;case f:H=xt()/3;break;case h:H=(ut-ct)/6048e5;break;case c:H=(ut-ct)/864e5;break;case l:H=ut/o;break;case n:H=ut/i;break;case a:H=ut/r;break;default:H=ut}return E?H:D.a(H)},M.daysInMonth=function(){return this.endOf(d).$D},M.$locale=function(){return B[this.$L]},M.locale=function(A,P){if(!A)return this.$L;var E=this.clone(),H=N(A,P,!0);return H&&(E.$L=H),E},M.clone=function(){return D.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},$})(),q=U.prototype;return R.prototype=q,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",g]].forEach((function($){q[$[1]]=function(M){return this.$g(M,$[0],$[1])}})),R.extend=function($,M){return $.$i||($(M,U,R),$.$i=!0),R},R.locale=N,R.isDayjs=L,R.unix=function($){return R(1e3*$)},R.en=B[S],R.Ls=B,R.p={},R}))})(Ao)),Ao.exports}var By=_y(),vy=Ty(By),Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Tn=p(function(e="fatal"){let t=Ne.fatal;typeof e=="string"?e.toLowerCase()in Ne&&(t=Ne[e]):typeof e=="number"&&(t=e),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},t<=Ne.fatal&&(W.fatal=console.error?console.error.bind(console,de("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",de("FATAL"))),t<=Ne.error&&(W.error=console.error?console.error.bind(console,de("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",de("ERROR"))),t<=Ne.warn&&(W.warn=console.warn?console.warn.bind(console,de("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",de("WARN"))),t<=Ne.info&&(W.info=console.info?console.info.bind(console,de("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",de("INFO"))),t<=Ne.debug&&(W.debug=console.debug?console.debug.bind(console,de("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("DEBUG"))),t<=Ne.trace&&(W.trace=console.debug?console.debug.bind(console,de("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("TRACE")))},"setLogLevel"),de=p(e=>`%c${vy().format("ss.SSS")} : ${e} : `,"format");const Mo={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return Mo.hue2rgb(s,o,e+1/3)*255;case"g":return Mo.hue2rgb(s,o,e)*255;case"b":return Mo.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Ly={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Fy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},lt={channel:Mo,lang:Ly,unit:Fy},tr={};for(let e=0;e<=255;e++)tr[e]=lt.unit.dec2hex(e);const Xt={ALL:0,RGB:1,HSL:2};class Ay{constructor(){this.type=Xt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Xt.ALL}is(t){return this.type===t}}class My{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ay}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=lt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=lt.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=lt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=lt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=lt.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=lt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ks=new My({r:0,g:0,b:0,a:0},"transparent"),Vr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Vr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return ks.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[Math.round(i)]}${tr[Math.round(o*255)]}`:`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[Math.round(i)]}`}},xr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(xr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return lt.channel.clamp.h(parseFloat(r)*360)}}return lt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(xr.re);if(!r)return;const[,i,o,s,a,n]=r;return ks.set({h:xr._hue2deg(i),s:lt.channel.clamp.s(parseFloat(o)),l:lt.channel.clamp.l(parseFloat(s)),a:a?lt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%, ${o})`:`hsl(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%)`}},Mi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Mi.colors[e];if(t)return Vr.parse(t)},stringify:e=>{const t=Vr.stringify(e);for(const r in Mi.colors)if(Mi.colors[r]===t)return r}},wi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(wi.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return ks.set({r:lt.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:lt.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:lt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?lt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(i)}, ${lt.lang.round(o)})`:`rgb(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(i)})`}},Me={format:{keyword:Mi,hex:Vr,rgb:wi,rgba:wi,hsl:xr,hsla:xr},parse:e=>{if(typeof e!="string")return e;const t=Vr.parse(e)||wi.parse(e)||xr.parse(e)||Mi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xt.HSL)||e.data.r===void 0?xr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?wi.stringify(e):Vr.stringify(e)},$c=(e,t)=>{const r=Me.parse(e);for(const i in t)r[i]=lt.channel.clamp[i](t[i]);return Me.stringify(r)},sr=(e,t,r=0,i=1)=>{if(typeof e!="number")return $c(e,{a:t});const o=ks.set({r:lt.channel.clamp.r(e),g:lt.channel.clamp.g(t),b:lt.channel.clamp.b(r),a:lt.channel.clamp.a(i)});return Me.stringify(o)},Ey=e=>{const{r:t,g:r,b:i}=Me.parse(e),o=.2126*lt.channel.toLinear(t)+.7152*lt.channel.toLinear(r)+.0722*lt.channel.toLinear(i);return lt.lang.round(o)},$y=e=>Ey(e)>=.5,we=e=>!$y(e),Oc=(e,t,r)=>{const i=Me.parse(e),o=i[t],s=lt.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Me.stringify(i)},O=(e,t)=>Oc(e,"l",t),I=(e,t)=>Oc(e,"l",-t),x=(e,t)=>{const r=Me.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return $c(e,i)},Oy=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Me.parse(e),{r:n,g:l,b:c,a:h}=Me.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,T=a*d+h*(1-d);return sr(C,b,k,T)},_=(e,t=100)=>{const r=Me.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Oy(r,e,t)};/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function Xl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Iy(e){if(Array.isArray(e))return e}function Dy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Py(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ry(e,t){return Iy(e)||Dy(e,t)||Ny(e,t)||Py()}function Ny(e,t){if(e){if(typeof e=="string")return Xl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xl(e,t):void 0}}const Ic=Object.entries,Vl=Object.setPrototypeOf,qy=Object.isFrozen,Wy=Object.getPrototypeOf,zy=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,jt=Object.seal,Hr=Object.create,Dc=typeof Reflect<"u"&&Reflect,wa=Dc.apply,Ta=Dc.construct;Ut||(Ut=function(t){return t});jt||(jt=function(t){return t});wa||(wa=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});Ta||(Ta=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const Rr=It(Array.prototype.forEach),Hy=It(Array.prototype.lastIndexOf),Zl=It(Array.prototype.pop),Nr=It(Array.prototype.push),Yy=It(Array.prototype.splice),rr=Array.isArray,Ti=It(String.prototype.toLowerCase),ta=It(String.prototype.toString),Kl=It(String.prototype.match),fi=It(String.prototype.replace),Ql=It(String.prototype.indexOf),Uy=It(String.prototype.trim),jy=It(Number.prototype.toString),Gy=It(Boolean.prototype.toString),Jl=typeof BigInt>"u"?null:It(BigInt.prototype.toString),th=typeof Symbol>"u"?null:It(Symbol.prototype.toString),Nt=It(Object.prototype.hasOwnProperty),pi=It(Object.prototype.toString),Rt=It(RegExp.prototype.test),pr=Xy(TypeError);function It(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return wa(e,t,i)}}function Xy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ta(e,r)}}function gt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ti;if(Vl&&Vl(e,null),!rr(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(qy(t)||(t[i]=s),o=s)}e[o]=!0}return e}function Vy(e){for(let t=0;t<e.length;t++)Nt(e,t)||(e[t]=null);return e}function Gt(e){const t=Hr(null);for(const i of Ic(e)){var r=Ry(i,2);const o=r[0],s=r[1];Nt(e,o)&&(rr(s)?t[o]=Vy(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Gt(s):t[o]=s)}return t}function Zy(e){switch(typeof e){case"string":return e;case"number":return jy(e);case"boolean":return Gy(e);case"bigint":return Jl?Jl(e):"0";case"symbol":return th?th(e):"Symbol()";case"undefined":return pi(e);case"function":case"object":{if(e===null)return pi(e);const t=e,r=fe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:pi(i)}return pi(e)}default:return pi(e)}}function fe(e,t){for(;e!==null;){const i=zy(e,t);if(i){if(i.get)return It(i.get);if(typeof i.value=="function")return It(i.value)}e=Wy(e)}function r(){return null}return r}function Ky(e){try{return Rt(e,""),!0}catch{return!1}}const eh=Ut(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ea=Ut(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ra=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qy=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ia=Ut(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Jy=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rh=Ut(["#text"]),ih=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),oa=Ut(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),oh=Ut(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yo=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),t0=jt(/{{[\w\W]*|^[\w\W]*}}/g),e0=jt(/<%[\w\W]*|^[\w\W]*%>/g),r0=jt(/\${[\w\W]*/g),i0=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),o0=jt(/^aria-[\-\w]+$/),sh=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),s0=jt(/^(?:\w+script|data):/i),a0=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),n0=jt(/^html$/i),l0=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),ah=jt(/<[/\w!]/g),nh=jt(/<[/\w]/g),h0=jt(/<\/no(script|embed|frames)/i),c0=jt(/\/>/i),le={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},d0=function(){return typeof window>"u"?null:window},u0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},lh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Je=function(t,r,i,o){return Nt(t,r)&&rr(t[r])?gt(o.base?Gt(o.base):{},t[r],o.transform):i};function Pc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d0();const t=j=>Pc(j);if(t.version="3.4.13",t.removed=[],!e||!e.document||e.document.nodeType!==le.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,f=n.prototype,u=fe(f,"cloneNode"),g=fe(f,"remove"),m=fe(f,"nextSibling"),y=fe(f,"childNodes"),C=fe(f,"parentNode"),b=fe(f,"shadowRoot"),k=fe(f,"attributes"),T=a&&a.prototype?fe(a.prototype,"nodeType"):null,S=a&&a.prototype?fe(a.prototype,"nodeName"):null,B=a&&a.prototype?fe(a.prototype,"ownerDocument"):null;if(typeof s=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let v,L="",N,R=!1,D=0;const U=function(){if(D>0)throw pr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},q=function(w){U(),D++;try{return v.createHTML(w)}finally{D--}},$=function(w){U(),D++;try{return v.createScriptURL(w)}finally{D--}},M=function(){return R||(N=u0(d,o),R=!0),N},A=r,P=A.implementation,E=A.createNodeIterator,H=A.createDocumentFragment,Y=A.getElementsByTagName,ot=i.importNode;let Z=lh();t.isSupported=typeof Ic=="function"&&typeof C=="function"&&P&&P.createHTMLDocument!==void 0;const ct=t0,ut=e0,xt=r0,et=i0,ft=o0,kt=s0,St=a0,_t=l0;let $t=sh,mt=null;const Re=gt({},[...eh,...ea,...ra,...ia,...rh]);let wt=null;const Ns=gt({},[...ih,...oa,...oh,...yo]);let At=Object.seal(Hr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),hi=null,_l=null;const Ve=Object.seal(Hr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Bl=!0,qs=!0,vl=!1,Ll=!0,Ze=!1,Ke=!0,ur=!1,Ws=!1,so=null,ao=null,zs=!1,$r=!1,no=!1,lo=!1,Fl=!0,Al=!1;const Ml="user-content-";let Hs=!0,ho=!1,Or={},Se=null;const Ys=gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let El=null;const $l=gt({},["audio","video","img","source","image","track"]);let Us=null;const Ol=gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),co="http://www.w3.org/1998/Math/MathML",uo="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let Ir=_e,js=!1,Gs=null;const ay=gt({},[co,uo,_e],ta),Il=Ut(["mi","mo","mn","ms","mtext"]);let Xs=gt({},Il);const Dl=Ut(["annotation-xml"]);let Vs=gt({},Dl);const ny=gt({},["title","style","font","a","script"]);let ci=null;const ly=["application/xhtml+xml","text/html"],hy="text/html";let vt=null,Dr=null;const cy=r.createElement("form"),Pl=function(w){return w instanceof RegExp||w instanceof Function},Zs=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Dr&&Dr===w)return;(!w||typeof w!="object")&&(w={}),w=Gt(w),ci=ly.indexOf(w.PARSER_MEDIA_TYPE)===-1?hy:w.PARSER_MEDIA_TYPE,vt=ci==="application/xhtml+xml"?ta:Ti,mt=Je(w,"ALLOWED_TAGS",Re,{transform:vt}),wt=Je(w,"ALLOWED_ATTR",Ns,{transform:vt}),Gs=Je(w,"ALLOWED_NAMESPACES",ay,{transform:ta}),Us=Je(w,"ADD_URI_SAFE_ATTR",Ol,{transform:vt,base:Ol}),El=Je(w,"ADD_DATA_URI_TAGS",$l,{transform:vt,base:$l}),Se=Je(w,"FORBID_CONTENTS",Ys,{transform:vt}),hi=Je(w,"FORBID_TAGS",Gt({}),{transform:vt}),_l=Je(w,"FORBID_ATTR",Gt({}),{transform:vt}),Or=Nt(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Gt(w.USE_PROFILES):w.USE_PROFILES:!1,Bl=w.ALLOW_ARIA_ATTR!==!1,qs=w.ALLOW_DATA_ATTR!==!1,vl=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Ll=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=w.SAFE_FOR_TEMPLATES||!1,Ke=w.SAFE_FOR_XML!==!1,ur=w.WHOLE_DOCUMENT||!1,$r=w.RETURN_DOM||!1,no=w.RETURN_DOM_FRAGMENT||!1,lo=w.RETURN_TRUSTED_TYPE||!1,zs=w.FORCE_BODY||!1,Fl=w.SANITIZE_DOM!==!1,Al=w.SANITIZE_NAMED_PROPS||!1,Hs=w.KEEP_CONTENT!==!1,ho=w.IN_PLACE||!1,$t=Ky(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:sh,Ir=typeof w.NAMESPACE=="string"?w.NAMESPACE:_e,Xs=Nt(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Gt(w.MATHML_TEXT_INTEGRATION_POINTS):gt({},Il),Vs=Nt(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Gt(w.HTML_INTEGRATION_POINTS):gt({},Dl);const F=Nt(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Gt(w.CUSTOM_ELEMENT_HANDLING):Hr(null);if(At=Hr(null),Nt(F,"tagNameCheck")&&Pl(F.tagNameCheck)&&(At.tagNameCheck=F.tagNameCheck),Nt(F,"attributeNameCheck")&&Pl(F.attributeNameCheck)&&(At.attributeNameCheck=F.attributeNameCheck),Nt(F,"allowCustomizedBuiltInElements")&&typeof F.allowCustomizedBuiltInElements=="boolean"&&(At.allowCustomizedBuiltInElements=F.allowCustomizedBuiltInElements),jt(At),Ze&&(qs=!1),no&&($r=!0),Or&&(mt=gt({},rh),wt=Hr(null),Or.html===!0&&(gt(mt,eh),gt(wt,ih)),Or.svg===!0&&(gt(mt,ea),gt(wt,oa),gt(wt,yo)),Or.svgFilters===!0&&(gt(mt,ra),gt(wt,oa),gt(wt,yo)),Or.mathMl===!0&&(gt(mt,ia),gt(wt,oh),gt(wt,yo))),Ve.tagCheck=null,Ve.attributeCheck=null,Nt(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?Ve.tagCheck=w.ADD_TAGS:rr(w.ADD_TAGS)&&(mt===Re&&(mt=Gt(mt)),gt(mt,w.ADD_TAGS,vt))),Nt(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?Ve.attributeCheck=w.ADD_ATTR:rr(w.ADD_ATTR)&&(wt===Ns&&(wt=Gt(wt)),gt(wt,w.ADD_ATTR,vt))),Nt(w,"ADD_URI_SAFE_ATTR")&&rr(w.ADD_URI_SAFE_ATTR)&>(Us,w.ADD_URI_SAFE_ATTR,vt),Nt(w,"FORBID_CONTENTS")&&rr(w.FORBID_CONTENTS)&&(Se===Ys&&(Se=Gt(Se)),gt(Se,w.FORBID_CONTENTS,vt)),Nt(w,"ADD_FORBID_CONTENTS")&&rr(w.ADD_FORBID_CONTENTS)&&(Se===Ys&&(Se=Gt(Se)),gt(Se,w.ADD_FORBID_CONTENTS,vt)),Hs&&(mt["#text"]=!0),ur&>(mt,["html","head","body"]),mt.table&&(gt(mt,["tbody"]),delete hi.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const z=v;v=w.TRUSTED_TYPES_POLICY;try{L=q("")}catch(J){throw v=z,J}}else w.TRUSTED_TYPES_POLICY===null?(v=void 0,L=""):(v===void 0&&(v=M()),v&&typeof L=="string"&&(L=q("")));Ut&&Ut(w),Dr=w},Rl=gt({},[...ea,...ra,...Qy]),Nl=gt({},[...ia,...Jy]),dy=function(w,F,z){return F.namespaceURI===_e?w==="svg":F.namespaceURI===co?w==="svg"&&(z==="annotation-xml"||Xs[z]):!!Rl[w]},uy=function(w,F,z){return F.namespaceURI===_e?w==="math":F.namespaceURI===uo?w==="math"&&Vs[z]:!!Nl[w]},fy=function(w,F,z){return F.namespaceURI===uo&&!Vs[z]||F.namespaceURI===co&&!Xs[z]?!1:!Nl[w]&&(ny[w]||!Rl[w])},py=function(w){let F=C(w);(!F||!F.tagName)&&(F={namespaceURI:Ir,tagName:"template"});const z=Ti(w.tagName),J=Ti(F.tagName);return Gs[w.namespaceURI]?w.namespaceURI===uo?dy(z,F,J):w.namespaceURI===co?uy(z,F,J):w.namespaceURI===_e?fy(z,F,J):!!(ci==="application/xhtml+xml"&&Gs[w.namespaceURI]):!1},Qe=function(w){Nr(t.removed,{element:w});try{C(w).removeChild(w)}catch{if(g(w),!C(w))throw pr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},fo=function(w){di(w);const F=y(w);if(F){const J=[];Rr(F,rt=>{Nr(J,rt)}),Rr(J,rt=>{try{g(rt)}catch{}})}const z=k(w);if(z)for(let J=z.length-1;J>=0;--J){const rt=z[J],ht=rt&&rt.name;if(typeof ht=="string")try{w.removeAttribute(ht)}catch{}}},fr=function(w,F){try{Nr(t.removed,{attribute:F.getAttributeNode(w),from:F})}catch{Nr(t.removed,{attribute:null,from:F})}if(F.removeAttribute(w),w==="is")if($r||no)try{Qe(F)}catch{}else try{F.setAttribute(w,"")}catch{}},gy=function(w){const F=k(w);if(F)for(let z=F.length-1;z>=0;--z){const J=F[z],rt=J&&J.name;if(!(typeof rt!="string"||wt[vt(rt)]))try{w.removeAttribute(rt)}catch{}}},di=function(w){const F=[w];for(;F.length>0;){const z=F.pop();(T?T(z):z.nodeType)===le.element&&gy(z);const rt=y(z);if(rt)for(let ht=rt.length-1;ht>=0;--ht)F.push(rt[ht])}},my=function(w){if(!Ke)return;const F=[w];for(;F.length>0;){const z=F.pop(),J=T?T(z):z.nodeType;if(J===le.processingInstruction||J===le.comment&&Rt(nh,z.data)){try{g(z)}catch{}continue}if(J===le.element){const ht=z,Tt=vt(S?S(z):z.nodeName);try{ht.hasAttribute&&ht.hasAttribute("patchsrc")&&ht.removeAttribute("patchsrc"),ht.hasAttribute&&ht.hasAttribute("for")&&Tt!=="label"&&Tt!=="output"&&ht.removeAttribute("for")}catch{}}const rt=y(z);if(rt)for(let ht=rt.length-1;ht>=0;--ht)F.push(rt[ht])}},ql=function(w){let F=null,z=null;if(zs)w="<remove></remove>"+w;else{const ht=Kl(w,/^[\r\n\t ]+/);z=ht&&ht[0]}ci==="application/xhtml+xml"&&Ir===_e&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const J=v?q(w):w;if(Ir===_e)try{F=new h().parseFromString(J,ci)}catch{}if(!F||!F.documentElement){F=P.createDocument(Ir,"template",null);try{F.documentElement.innerHTML=js?L:J}catch{}}const rt=F.body||F.documentElement;return w&&z&&rt.insertBefore(r.createTextNode(z),rt.childNodes[0]||null),Ir===_e?Y.call(F,ur?"html":"body")[0]:ur?F.documentElement:rt},Wl=function(w){const F=B?B(w):w.ownerDocument;return E.call(F||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},po=function(w){return w=fi(w,ct," "),w=fi(w,ut," "),w=fi(w,xt," "),w},Ks=function(w){var F;w.normalize();const z=B?B(w):w.ownerDocument,J=E.call(z||w,w,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let rt=J.nextNode();for(;rt;)rt.data=po(rt.data),rt=J.nextNode();const ht=(F=w.querySelectorAll)===null||F===void 0?void 0:F.call(w,"template");ht&&Rr(ht,Tt=>{Pr(Tt.content)&&Ks(Tt.content)})},go=function(w){const F=S?S(w):null;return typeof F!="string"||vt(F)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==k(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==T(w)||w.childNodes!==y(w)},Pr=function(w){if(!T||typeof w!="object"||w===null)return!1;try{return T(w)===le.documentFragment}catch{return!1}},ui=function(w){if(!T||typeof w!="object"||w===null)return!1;try{return typeof T(w)=="number"}catch{return!1}};function Be(j,w,F){j.length!==0&&Rr(j,z=>{z.call(t,w,F,Dr)})}const yy=function(w,F){return!!(Ke&&w.hasChildNodes()&&!ui(w.firstElementChild)&&Rt(ah,w.textContent)&&Rt(ah,w.innerHTML)||Ke&&w.namespaceURI===_e&&F==="style"&&ui(w.firstElementChild)||w.nodeType===le.processingInstruction||Ke&&w.nodeType===le.comment&&Rt(nh,w.data))},Cy=function(w,F,z){if(!hi[F]&&Ul(F)&&(At.tagNameCheck instanceof RegExp&&Rt(At.tagNameCheck,F)||At.tagNameCheck instanceof Function&&At.tagNameCheck(F)))return!1;if(Hs&&!Se[F]){const J=C(w),rt=y(w);if(rt&&J){const ht=rt.length;for(let Tt=ht-1;Tt>=0;--Tt){const Lt=w===z?u(rt[Tt],!0):rt[Tt];J.insertBefore(Lt,m(w))}}}return Qe(w),!0},zl=function(w,F,z,J){return w.length===0?F:F===z||F===J?Gt(F):F},Hl=function(w,F){if(Be(Z.beforeSanitizeElements,w,null),w!==F&&C(w)===null)return ho&&di(w),!0;if(go(w))return Qe(w),!0;const z=vt(S?S(w):w.nodeName);if(mt=zl(Z.uponSanitizeElement,mt,Re,so),Be(Z.uponSanitizeElement,w,{tagName:z,allowedTags:mt}),w!==F&&C(w)===null)return ho&&di(w),!0;if(yy(w,z))return Qe(w),!0;if(hi[z]||!(Ve.tagCheck instanceof Function&&Ve.tagCheck(z))&&!mt[z]){const rt=Cy(w,z,F);return rt===!1&&Be(Z.afterSanitizeElements,w,null),rt}if((T?T(w):w.nodeType)===le.element&&!py(w)||(z==="noscript"||z==="noembed"||z==="noframes")&&Rt(h0,w.innerHTML))return Qe(w),!0;if(Ze&&w.nodeType===le.text){const rt=po(w.textContent);w.textContent!==rt&&(Nr(t.removed,{element:w.cloneNode()}),w.textContent=rt)}return Be(Z.afterSanitizeElements,w,null),!1},Yl=function(w,F,z){if(_l[F]||Ke&&F==="patchsrc"||Ke&&F==="for"&&w!=="label"&&w!=="output"||Fl&&(F==="id"||F==="name")&&(z in r||z in cy))return!1;const J=wt[F]||Ve.attributeCheck instanceof Function&&Ve.attributeCheck(F,w);if(!(qs&&Rt(et,F))){if(!(Bl&&Rt(ft,F))){if(J){if(!Us[F]){if(!Rt($t,fi(z,St,""))){if(!((F==="src"||F==="xlink:href"||F==="href")&&w!=="script"&&Ql(z,"data:")===0&&El[w])){if(!(vl&&!Rt(kt,fi(z,St,"")))){if(z)return!1}}}}}else if(!(Ul(w)&&(At.tagNameCheck instanceof RegExp&&Rt(At.tagNameCheck,w)||At.tagNameCheck instanceof Function&&At.tagNameCheck(w))&&(At.attributeNameCheck instanceof RegExp&&Rt(At.attributeNameCheck,F)||At.attributeNameCheck instanceof Function&&At.attributeNameCheck(F,w))||F==="is"&&At.allowCustomizedBuiltInElements&&(At.tagNameCheck instanceof RegExp&&Rt(At.tagNameCheck,z)||At.tagNameCheck instanceof Function&&At.tagNameCheck(z))))return!1}}return!0},xy=gt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ul=function(w){return!xy[Ti(w)]&&Rt(_t,w)},by=function(w,F,z,J){if(v&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!z)switch(d.getAttributeType(w,F)){case"TrustedHTML":return q(J);case"TrustedScriptURL":return $(J)}return J},ky=function(w,F,z,J){try{z?w.setAttributeNS(z,F,J):w.setAttribute(F,J),go(w)?Qe(w):Zl(t.removed)}catch{fr(F,w)}},jl=function(w){Be(Z.beforeSanitizeAttributes,w,null);const F=w.attributes;if(!F||go(w))return;wt=zl(Z.uponSanitizeAttribute,wt,Ns,ao);const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:wt,forceKeepAttr:void 0};let J=F.length;const rt=vt(w.nodeName);for(;J--;){const ht=F[J],Tt=ht.name,Lt=ht.namespaceURI,re=ht.value,ie=vt(Tt),Js=re;let Qt=Tt==="value"?Js:Uy(Js);if(z.attrName=ie,z.attrValue=Qt,z.keepAttr=!0,z.forceKeepAttr=void 0,Be(Z.uponSanitizeAttribute,w,z),Qt=z.attrValue,Al&&(ie==="id"||ie==="name")&&Ql(Qt,Ml)!==0&&(fr(Tt,w),Qt=Ml+Qt),Ke&&Rt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Qt)){fr(Tt,w);continue}if(ie==="attributename"&&Kl(Qt,"href")){fr(Tt,w);continue}if(!z.forceKeepAttr){if(!z.keepAttr){fr(Tt,w);continue}if(!Ll&&Rt(c0,Qt)){fr(Tt,w);continue}if(Ze&&(Qt=po(Qt)),!Yl(rt,ie,Qt)){fr(Tt,w);continue}Qt=by(rt,ie,Lt,Qt),Qt!==Js&&ky(w,Tt,Lt,Qt)}}Be(Z.afterSanitizeAttributes,w,null)},mo=function(w){let F=null;const z=Wl(w);for(Be(Z.beforeSanitizeShadowDOM,w,null);F=z.nextNode();)if(Be(Z.uponSanitizeShadowNode,F,null),Hl(F,w),jl(F),Pr(F.content)&&mo(F.content),(T?T(F):F.nodeType)===le.element){const rt=b(F);Pr(rt)&&(Qs(rt),mo(rt))}Be(Z.afterSanitizeShadowDOM,w,null)},Qs=function(w){const F=[{node:w,shadow:null}];for(;F.length>0;){const z=F.pop();if(z.shadow){mo(z.shadow);continue}const J=z.node,ht=(T?T(J):J.nodeType)===le.element,Tt=y(J);if(Tt)for(let Lt=Tt.length-1;Lt>=0;--Lt)F.push({node:Tt[Lt],shadow:null});if(ht){const Lt=S?S(J):null;if(typeof Lt=="string"&&vt(Lt)==="template"){const re=J.content;Pr(re)&&F.push({node:re,shadow:null})}}if(ht){const Lt=b(J);Pr(Lt)&&F.push({node:null,shadow:Lt},{node:Lt,shadow:null})}}};return t.sanitize=function(j){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=null,z=null,J=null,rt=null;if(js=!j,js&&(j="<!-->"),typeof j!="string"&&!ui(j)&&(j=Zy(j),typeof j!="string"))throw pr("dirty is not a string, aborting");if(!t.isSupported)return j;Ws?(mt=so,wt=ao):Zs(w),(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&(mt=Gt(mt)),Z.uponSanitizeAttribute.length>0&&(wt=Gt(wt)),t.removed=[];const ht=ho&&typeof j!="string"&&ui(j);if(ht){my(j);const re=S?S(j):j.nodeName;if(typeof re=="string"){const ie=vt(re);if(!mt[ie]||hi[ie])throw fo(j),pr("root node is forbidden and cannot be sanitized in-place")}if(go(j))throw fo(j),pr("root node is clobbered and cannot be sanitized in-place");try{Qs(j)}catch(ie){throw fo(j),ie}}else if(ui(j))F=ql("<!---->"),z=F.ownerDocument.importNode(j,!0),z.nodeType===le.element&&z.nodeName==="BODY"||z.nodeName==="HTML"?F=z:F.appendChild(z),Qs(z);else{if(!$r&&!Ze&&!ur&&j.indexOf("<")===-1)return v&&lo?q(j):j;if(F=ql(j),!F)return $r?null:lo?L:""}F&&zs&&Qe(F.firstChild);const Tt=ht?j:F;try{const re=Wl(Tt);for(;J=re.nextNode();)Hl(J,Tt),jl(J),Pr(J.content)&&mo(J.content)}catch(re){throw ht&&(fo(j),Rr(t.removed,ie=>{ie.element&&di(ie.element)})),re}if(ht)return Rr(t.removed,re=>{re.element&&di(re.element)}),Ze&&Ks(j),j;if($r){if(Ze&&Ks(F),no)for(rt=H.call(F.ownerDocument);F.firstChild;)rt.appendChild(F.firstChild);else rt=F;return(wt.shadowroot||wt.shadowrootmode)&&(rt=ot.call(i,rt,!0)),rt}let Lt=ur?F.outerHTML:F.innerHTML;return ur&&mt["!doctype"]&&F.ownerDocument&&F.ownerDocument.doctype&&F.ownerDocument.doctype.name&&Rt(n0,F.ownerDocument.doctype.name)&&(Lt="<!DOCTYPE "+F.ownerDocument.doctype.name+`>
|
|
3
|
+
`+Lt),Ze&&(Lt=po(Lt)),v&&lo?q(Lt):Lt},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zs(j),Ws=!0,so=mt,ao=wt},t.clearConfig=function(){Dr=null,Ws=!1,so=null,ao=null,v=N,L=""},t.isValidAttribute=function(j,w,F){Dr||Zs({});const z=vt(j),J=vt(w);return Yl(z,J,F)},t.addHook=function(j,w){typeof w=="function"&&Nt(Z,j)&&Nr(Z[j],w)},t.removeHook=function(j,w){if(Nt(Z,j)){if(w!==void 0){const F=Hy(Z[j],w);return F===-1?void 0:Yy(Z[j],F,1)[0]}return Zl(Z[j])}},t.removeHooks=function(j){Nt(Z,j)&&(Z[j]=[])},t.removeAllHooks=function(){Z=lh()},t}var Qr=Pc(),Sa=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(o=>Sa(e,o,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(o=>{e.includes(o)||e.push(o)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const o=e;Object.entries(t).forEach(([s,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),o[s]===void 0&&(o[s]=Array.isArray(a)?[]:{}),typeof o[s]=="object"&&(o[s]=Sa(o[s],a,{depth:r-1}))}else typeof o[s]!="object"&&(Object.hasOwn(e,s)?o[s]=a:Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),qt=Sa,$e="#ffffff",Oe="#f2f2f2",nt=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),f0=class{static{p(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||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||O(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||I(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(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||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},p0=p(e=>{const t=new f0;return t.calculate(e),t},"getThemeVariables"),g0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(_("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=sr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.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=I("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=I(this.sectionBkgColor,10),this.taskBorderColor=sr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=sr(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||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(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=O(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=O(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=O(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=_(this.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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||_(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];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 e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??O(this["cScale"+e],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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.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?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},m0=p(e=>{const t=new g0;return t.calculate(e),t},"getThemeVariables"),y0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=nt(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=sr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=I(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||x(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||_(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||_(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=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||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(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||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||I(_(this.git0),25),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},C0=p(e=>{const t=new y0;return t.calculate(e),t},"getThemeVariables"),x0=class{static{p(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=O("#cde498",10),this.primaryBorderColor=nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.primaryColor),this.lineColor=_(this.background),this.textColor=_(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=I(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=I(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||x(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(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||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},b0=p(e=>{const t=new x0;return t.calculate(e),t},"getThemeVariables"),k0=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(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||O(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=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||_(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=I(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=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=I(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];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 e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.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=I(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},w0=p(e=>{const t=new k0;return t.calculate(e),t},"getThemeVariables"),T0=class{static{p(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=nt(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||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,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||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||x(e,{h:30}),this.cScale4=this.cScale4||x(e,{h:60}),this.cScale5=this.cScale5||x(e,{h:90}),this.cScale6=this.cScale6||x(e,{h:120}),this.cScale7=this.cScale7||x(e,{h:150}),this.cScale8=this.cScale8||x(e,{h:210,l:150}),this.cScale9=this.cScale9||x(e,{h:270}),this.cScale10=this.cScale10||x(e,{h:300}),this.cScale11=this.cScale11||x(e,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||_(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(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;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},S0=p(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),_0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(_("#323D47"),10),this.border1="#ccc",this.border2=sr(255,255,255,.25),this.arrowheadColor=_(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||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},B0=p(e=>{const t=new _0;return t.calculate(e),t},"getThemeVariables"),v0=class{static{p(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=nt("#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||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,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]=I(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||_(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(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;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},L0=p(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),F0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(_("#323D47"),10),this.border1="#ccc",this.border2=sr(255,255,255,.25),this.arrowheadColor=_(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||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},A0=p(e=>{const t=new F0;return t.calculate(e),t},"getThemeVariables"),M0=class{static{p(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=nt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||_(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(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;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},E0=p(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),$0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(_("#323D47"),10),this.border1="#ccc",this.border2=sr(255,255,255,.25),this.arrowheadColor=_(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=I(this["cScale"+t],75);const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},O0=p(e=>{const t=new $0;return t.calculate(e),t},"getThemeVariables"),He={base:{getThemeVariables:p0},dark:{getThemeVariables:m0},default:{getThemeVariables:C0},forest:{getThemeVariables:b0},neutral:{getThemeVariables:w0},neo:{getThemeVariables:S0},"neo-dark":{getThemeVariables:B0},redux:{getThemeVariables:L0},"redux-dark":{getThemeVariables:A0},"redux-color":{getThemeVariables:E0},"redux-dark-color":{getThemeVariables:O0}},zt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.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:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Rc={...zt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:He.default.getThemeVariables(),sequence:{...zt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...zt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...zt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...zt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...zt.pie,useWidth:984},xyChart:{...zt.xyChart,useWidth:void 0},requirement:{...zt.requirement,useWidth:void 0},packet:{...zt.packet},eventmodeling:{...zt.eventmodeling},treeView:{...zt.treeView,useWidth:void 0},radar:{...zt.radar},railroad:{...zt.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:{...zt.ishikawa},sankey:{...zt.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:{...zt.venn},cynefin:{...zt.cynefin}},Nc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Nc(e[i],"")]:[...r,t+i],[]),"keyify"),I0=new Set(Nc(Rc,"")),qc=Rc,D0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},P0=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(W.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Yo=p(e=>{if(W.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Yo(t));return}for(const t of Object.keys(e)){if(W.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!I0.has(t)||e[t]==null){W.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=D0[t];i?P0(e[t],i):(W.debug("sanitizing object",t),Yo(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(W.debug("sanitizing css option",t),e[t]=Wc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}W.debug("After sanitization",e)}},"sanitizeDirective"),Wc=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Jr=Object.freeze(qc),Ie=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),se=qt({},Jr),Uo,Sr=[],Ei=qt({},Jr),Vi=p((e,t)=>{let r=qt({},e),i={};for(const o of t)Yc(o),i=qt(i,o);if(r=qt(r,i),i.theme&&i.theme in He){const o=qt({},Uo),s=qt(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in He&&(r.themeVariables=He[r.theme].getThemeVariables(s))}return Ei=r,H0(Ei),Ei},"updateCurrentConfig"),R0=p(e=>(se=qt({},Jr),se=qt(se,e),e.theme&&He[e.theme]&&(se.themeVariables=He[e.theme].getThemeVariables(e.themeVariables)),Vi(se,Sr),se),"setSiteConfig"),N0=p(e=>{Uo=qt({},e)},"saveConfigFromInitialize"),q0=p(e=>(se=qt(se,e),Vi(se,Sr),se),"updateSiteConfig"),zc=p(()=>qt({},se),"getSiteConfig"),Hc=p(e=>(Vi(Ei,[e]),Ft()),"setConfig"),Ft=p(()=>qt({},Ei),"getConfig"),Yc=p(e=>{e&&(["secure",...se.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(W.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Yc(e[t])}))},"sanitize"),W0=p(e=>{Yo(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Sr.push(e),Vi(se,Sr)},"addDirective"),jo=p((e=se)=>{Sr=[],Vi(e,Sr)},"reset"),z0={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."},hh={},Uc=p(e=>{hh[e]||(W.warn(z0[e]),hh[e]=!0)},"issueWarning"),H0=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Uc("LAZY_LOAD_DEPRECATED")},"checkConfig"),EL=p(()=>{let e={};Uo&&(e=qt(e,Uo));for(const t of Sr)e=qt(e,t);return e},"getUserDefinedConfig"),ee=p(e=>(e.flowchart?.htmlLabels!=null&&Uc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ie(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),jc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,$i=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Y0=/\s*%%.*\n/gm,Gc=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},_r={},Sn=p(function(e,t){e=e.replace(jc,"").replace($i,"").replace(Y0,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(_r))if(i(e,t))return r;throw new Gc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),_a=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Xc(t,r,i)},"registerLazyLoadedDiagrams"),Xc=p((e,t,r)=>{_r[e]&&W.warn(`Detector with key ${e} already exists. Overwriting.`),_r[e]={detector:t,loader:r},W.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),U0=p(e=>_r[e].loader,"getDiagramLoader"),Zi=/<br\s*\/?>/gi,j0=p(e=>e?Kc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),G0=(()=>{let e=!1;return()=>{e||(Vc(),e=!0)}})();function Vc(){const e="data-temp-href-target";Qr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Qr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Vc,"setupDompurifyHooks");var Zc=p(e=>(G0(),Qr.sanitize(e)),"removeScript"),ch=p((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Zc(e):r!=="loose"&&(e=Kc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=K0(e))}return e},"sanitizeMore"),ke=p((e,t)=>e&&(t.dompurifyConfig?e=Qr.sanitize(ch(e,t),t.dompurifyConfig).toString():e=Qr.sanitize(ch(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),X0=p((e,t)=>typeof e=="string"?ke(e,t):e.flat().map(r=>ke(r,t)),"sanitizeTextOrArray"),V0=p(e=>Zi.test(e),"hasBreaks"),Z0=p(e=>e.split(Zi),"splitBreaks"),K0=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Kc=p(e=>e.replace(Zi,"#br#"),"breakToPlaceholder"),Q0=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),J0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),tC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),dh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];eC(s,a)&&(o=s+","+a,i++,r.pop())}r.push(rC(o))}return r.join("")},"parseGenericTypes"),Ba=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),eC=p((e,t)=>{const r=Ba(e,"~"),i=Ba(t,"~");return r===1&&i===1},"shouldCombineSets"),rC=p(e=>{const t=Ba(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),uh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),va=/\$\$(.*?)\$\$/g,Pi=p(e=>(e.match(va)?.length??0)>0,"hasKatex"),$L=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Qc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),iC=p(async(e,t)=>{if(!Pi(e))return e;if(!(uh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(va,"MathML is unsupported in this environment.");{const{default:r}=await import("./katex-HP8lGamR.js"),i=t.forceLegacyMathML||!uh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Zi).map(o=>Pi(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(va,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qc=p(async(e,t)=>ke(await iC(e,t),t),"renderKatexSanitized"),Ki={getRows:j0,sanitizeText:ke,sanitizeTextOrArray:X0,hasBreaks:V0,splitBreaks:Z0,lineBreakRegex:Zi,removeScript:Zc,getUrl:Q0,evaluate:Ie,getMax:J0,getMin:tC},oC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),sC=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Jc=p(function(e,t,r,i){const o=sC(t,r,i);oC(e,o)},"configureSvgSize"),aC=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;W.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;W.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,W.info(`Calculated bounds: ${n}x${l}`),Jc(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Eo={};function La(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
5
|
+
`)}p(La,"cssStyleSheetToString");var nC=p((e,t,r,i)=>{let o="";return e in Eo&&Eo[e]?o=Eo[e]({...r,svgId:i}):W.warn(`No theme found for ${e}`),`& {
|
|
6
|
+
font-family: ${r.fontFamily};
|
|
7
|
+
font-size: ${r.fontSize};
|
|
8
|
+
fill: ${r.textColor}
|
|
9
|
+
}
|
|
10
|
+
@keyframes edge-animation-frame {
|
|
11
|
+
from {
|
|
12
|
+
stroke-dashoffset: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@keyframes dash {
|
|
16
|
+
to {
|
|
17
|
+
stroke-dashoffset: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
& .edge-animation-slow {
|
|
21
|
+
stroke-dasharray: 9,5 !important;
|
|
22
|
+
stroke-dashoffset: 900;
|
|
23
|
+
animation: dash 50s linear infinite;
|
|
24
|
+
stroke-linecap: round;
|
|
25
|
+
}
|
|
26
|
+
& .edge-animation-fast {
|
|
27
|
+
stroke-dasharray: 9,5 !important;
|
|
28
|
+
stroke-dashoffset: 900;
|
|
29
|
+
animation: dash 20s linear infinite;
|
|
30
|
+
stroke-linecap: round;
|
|
31
|
+
}
|
|
32
|
+
/* Classes common for multiple diagrams */
|
|
33
|
+
|
|
34
|
+
& .error-icon {
|
|
35
|
+
fill: ${r.errorBkgColor};
|
|
36
|
+
}
|
|
37
|
+
& .error-text {
|
|
38
|
+
fill: ${r.errorTextColor};
|
|
39
|
+
stroke: ${r.errorTextColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& .edge-thickness-normal {
|
|
43
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
44
|
+
}
|
|
45
|
+
& .edge-thickness-thick {
|
|
46
|
+
stroke-width: 3.5px
|
|
47
|
+
}
|
|
48
|
+
& .edge-pattern-solid {
|
|
49
|
+
stroke-dasharray: 0;
|
|
50
|
+
}
|
|
51
|
+
& .edge-thickness-invisible {
|
|
52
|
+
stroke-width: 0;
|
|
53
|
+
fill: none;
|
|
54
|
+
}
|
|
55
|
+
& .edge-pattern-dashed{
|
|
56
|
+
stroke-dasharray: 3;
|
|
57
|
+
}
|
|
58
|
+
.edge-pattern-dotted {
|
|
59
|
+
stroke-dasharray: 2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
& .marker {
|
|
63
|
+
fill: ${r.lineColor};
|
|
64
|
+
stroke: ${r.lineColor};
|
|
65
|
+
}
|
|
66
|
+
& .marker.cross {
|
|
67
|
+
stroke: ${r.lineColor};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& svg {
|
|
71
|
+
font-family: ${r.fontFamily};
|
|
72
|
+
font-size: ${r.fontSize};
|
|
73
|
+
}
|
|
74
|
+
& p {
|
|
75
|
+
margin: 0
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
${o}
|
|
79
|
+
.node .neo-node {
|
|
80
|
+
stroke: ${r.nodeBorder};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
84
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
85
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
86
|
+
}
|
|
87
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
88
|
+
filter: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
[data-look="neo"].node path {
|
|
93
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
94
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-look="neo"].node .outer-path {
|
|
98
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[data-look="neo"].node .neo-line path {
|
|
102
|
+
stroke: ${r.nodeBorder};
|
|
103
|
+
filter: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-look="neo"].node circle{
|
|
107
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
108
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-look="neo"].node circle .state-start{
|
|
112
|
+
fill: #000000;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-look="neo"].icon-shape .icon {
|
|
116
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
117
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
121
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
122
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
${t}
|
|
126
|
+
`},"getStyles"),lC=p((e,t)=>{t!==void 0&&(Eo[e]=t)},"addStylesForDiagram"),hC=nC,td={};wy(td,{clear:()=>cC,getAccDescription:()=>pC,getAccTitle:()=>uC,getDiagramTitle:()=>mC,setAccDescription:()=>fC,setAccTitle:()=>dC,setDiagramTitle:()=>gC});var _n="",Bn="",vn="",Ln=p(e=>ke(e,Ft()),"sanitizeText"),cC=p(()=>{_n="",vn="",Bn=""},"clear"),dC=p(e=>{_n=Ln(e).replace(/^\s+/g,"")},"setAccTitle"),uC=p(()=>_n,"getAccTitle"),fC=p(e=>{vn=Ln(e).replace(/\n\s+/g,`
|
|
127
|
+
`)},"setAccDescription"),pC=p(()=>vn,"getAccDescription"),gC=p(e=>{Bn=Ln(e)},"setDiagramTitle"),mC=p(()=>Bn,"getDiagramTitle"),fh=W,yC=Tn,yt=Ft,OL=Hc,IL=Jr,Fn=p(e=>ke(e,yt()),"sanitizeText"),CC=aC,xC=p(()=>td,"getCommonDb"),Go={},Xo=p((e,t,r)=>{Go[e]&&fh.warn(`Diagram with id ${e} already registered. Overwriting.`),Go[e]=t,r&&Xc(e,r),lC(e,t.styles),t.injectUtils?.(fh,yC,yt,Fn,CC,xC(),()=>{})},"registerDiagram"),Fa=p(e=>{if(e in Go)return Go[e];throw new bC(e)},"getDiagram"),bC=class extends Error{static{p(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}},kC={value:()=>{}};function ed(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new $o(r)}function $o(e){this._=e}function wC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}$o.prototype=ed.prototype={constructor:$o,on:function(e,t){var r=this._,i=wC(e+"",r),o,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((o=(e=i[s]).type)&&(o=TC(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(o=(e=i[s]).type)r[o]=ph(r[o],e.name,t);else if(t==null)for(o in r)r[o]=ph(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new $o(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,s;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,o=s.length;i<o;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,s=i.length;o<s;++o)i[o].value.apply(t,r)}};function TC(e,t){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===t)return o.value}function ph(e,t,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=kC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Aa="http://www.w3.org/1999/xhtml",gh={svg:"http://www.w3.org/2000/svg",xhtml:Aa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ws(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),gh.hasOwnProperty(t)?{space:gh[t],local:e}:e}function SC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Aa&&t.documentElement.namespaceURI===Aa?t.createElement(e):t.createElementNS(r,e)}}function _C(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rd(e){var t=ws(e);return(t.local?_C:SC)(t)}function BC(){}function An(e){return e==null?BC:function(){return this.querySelector(e)}}function vC(e){typeof e!="function"&&(e=An(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=new Array(a),l,c,h=0;h<a;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new ce(i,this._parents)}function LC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function FC(){return[]}function id(e){return e==null?FC:function(){return this.querySelectorAll(e)}}function AC(e){return function(){return LC(e.apply(this,arguments))}}function MC(e){typeof e=="function"?e=AC(e):e=id(e);for(var t=this._groups,r=t.length,i=[],o=[],s=0;s<r;++s)for(var a=t[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),o.push(l));return new ce(i,o)}function od(e){return function(){return this.matches(e)}}function sd(e){return function(t){return t.matches(e)}}var EC=Array.prototype.find;function $C(e){return function(){return EC.call(this.children,e)}}function OC(){return this.firstElementChild}function IC(e){return this.select(e==null?OC:$C(typeof e=="function"?e:sd(e)))}var DC=Array.prototype.filter;function PC(){return Array.from(this.children)}function RC(e){return function(){return DC.call(this.children,e)}}function NC(e){return this.selectAll(e==null?PC:RC(typeof e=="function"?e:sd(e)))}function qC(e){typeof e!="function"&&(e=od(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new ce(i,this._parents)}function ad(e){return new Array(e.length)}function WC(){return new ce(this._enter||this._groups.map(ad),this._parents)}function Vo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vo.prototype={constructor:Vo,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function zC(e){return function(){return e}}function HC(e,t,r,i,o,s){for(var a=0,n,l=t.length,c=s.length;a<c;++a)(n=t[a])?(n.__data__=s[a],i[a]=n):r[a]=new Vo(e,s[a]);for(;a<l;++a)(n=t[a])&&(o[a]=n)}function YC(e,t,r,i,o,s,a){var n,l,c=new Map,h=t.length,d=s.length,f=new Array(h),u;for(n=0;n<h;++n)(l=t[n])&&(f[n]=u=a.call(l,l.__data__,n,t)+"",c.has(u)?o[n]=l:c.set(u,l));for(n=0;n<d;++n)u=a.call(e,s[n],n,s)+"",(l=c.get(u))?(i[n]=l,l.__data__=s[n],c.delete(u)):r[n]=new Vo(e,s[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(o[n]=l)}function UC(e){return e.__data__}function jC(e,t){if(!arguments.length)return Array.from(this,UC);var r=t?YC:HC,i=this._parents,o=this._groups;typeof e!="function"&&(e=zC(e));for(var s=o.length,a=new Array(s),n=new Array(s),l=new Array(s),c=0;c<s;++c){var h=i[c],d=o[c],f=d.length,u=GC(e.call(h,h&&h.__data__,c,i)),g=u.length,m=n[c]=new Array(g),y=a[c]=new Array(g),C=l[c]=new Array(f);r(h,d,m,y,C,u,t);for(var b=0,k=0,T,S;b<g;++b)if(T=m[b]){for(b>=k&&(k=b+1);!(S=y[k])&&++k<g;);T._next=S||null}}return a=new ce(a,i),a._enter=n,a._exit=l,a}function GC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function XC(){return new ce(this._exit||this._groups.map(ad),this._parents)}function VC(e,t,r){var i=this.enter(),o=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?s.remove():r(s),i&&o?i.merge(o).order():o}function ZC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,o=r.length,s=i.length,a=Math.min(o,s),n=new Array(o),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,f=n[l]=new Array(d),u,g=0;g<d;++g)(u=c[g]||h[g])&&(f[g]=u);for(;l<o;++l)n[l]=r[l];return new ce(n,this._parents)}function KC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],o=i.length-1,s=i[o],a;--o>=0;)(a=i[o])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function QC(e){e||(e=JC);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s){for(var a=r[s],n=a.length,l=o[s]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new ce(o,this._parents).order()}function JC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function tx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ex(){return Array.from(this)}function rx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length;o<s;++o){var a=i[o];if(a)return a}return null}function ix(){let e=0;for(const t of this)++e;return e}function ox(){return!this.node()}function sx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var o=t[r],s=0,a=o.length,n;s<a;++s)(n=o[s])&&e.call(n,n.__data__,s,o);return this}function ax(e){return function(){this.removeAttribute(e)}}function nx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function lx(e,t){return function(){this.setAttribute(e,t)}}function hx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function cx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function dx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function ux(e,t){var r=ws(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?nx:ax:typeof t=="function"?r.local?dx:cx:r.local?hx:lx)(r,t))}function nd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fx(e){return function(){this.style.removeProperty(e)}}function px(e,t,r){return function(){this.style.setProperty(e,t,r)}}function gx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function mx(e,t,r){return arguments.length>1?this.each((t==null?fx:typeof t=="function"?gx:px)(e,t,r??"")):ti(this.node(),e)}function ti(e,t){return e.style.getPropertyValue(t)||nd(e).getComputedStyle(e,null).getPropertyValue(t)}function yx(e){return function(){delete this[e]}}function Cx(e,t){return function(){this[e]=t}}function xx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function bx(e,t){return arguments.length>1?this.each((t==null?yx:typeof t=="function"?xx:Cx)(e,t)):this.node()[e]}function ld(e){return e.trim().split(/^|\s+/)}function Mn(e){return e.classList||new hd(e)}function hd(e){this._node=e,this._names=ld(e.getAttribute("class")||"")}hd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function cd(e,t){for(var r=Mn(e),i=-1,o=t.length;++i<o;)r.add(t[i])}function dd(e,t){for(var r=Mn(e),i=-1,o=t.length;++i<o;)r.remove(t[i])}function kx(e){return function(){cd(this,e)}}function wx(e){return function(){dd(this,e)}}function Tx(e,t){return function(){(t.apply(this,arguments)?cd:dd)(this,e)}}function Sx(e,t){var r=ld(e+"");if(arguments.length<2){for(var i=Mn(this.node()),o=-1,s=r.length;++o<s;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?Tx:t?kx:wx)(r,t))}function _x(){this.textContent=""}function Bx(e){return function(){this.textContent=e}}function vx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Lx(e){return arguments.length?this.each(e==null?_x:(typeof e=="function"?vx:Bx)(e)):this.node().textContent}function Fx(){this.innerHTML=""}function Ax(e){return function(){this.innerHTML=e}}function Mx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ex(e){return arguments.length?this.each(e==null?Fx:(typeof e=="function"?Mx:Ax)(e)):this.node().innerHTML}function $x(){this.nextSibling&&this.parentNode.appendChild(this)}function Ox(){return this.each($x)}function Ix(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Dx(){return this.each(Ix)}function Px(e){var t=typeof e=="function"?e:rd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Rx(){return null}function Nx(e,t){var r=typeof e=="function"?e:rd(e),i=t==null?Rx:typeof t=="function"?t:An(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function qx(){var e=this.parentNode;e&&e.removeChild(this)}function Wx(){return this.each(qx)}function zx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yx(e){return this.select(e?Hx:zx)}function Ux(e){return arguments.length?this.property("__data__",e):this.node().__data__}function jx(e){return function(t){e.call(this,t,this.__data__)}}function Gx(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Xx(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,o=t.length,s;r<o;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function Vx(e,t,r){return function(){var i=this.__on,o,s=jx(t);if(i){for(var a=0,n=i.length;a<n;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=r),o.value=t;return}}this.addEventListener(e.type,s,r),o={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(o):this.__on=[o]}}function Zx(e,t,r){var i=Gx(e+""),o,s=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(o=0,h=n[l];o<s;++o)if((a=i[o]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?Vx:Xx,o=0;o<s;++o)this.each(n(i[o],t,r));return this}function ud(e,t,r){var i=nd(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,r):(o=i.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Kx(e,t){return function(){return ud(this,e,t)}}function Qx(e,t){return function(){return ud(this,e,t.apply(this,arguments))}}function Jx(e,t){return this.each((typeof t=="function"?Qx:Kx)(e,t))}function*tb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length,a;o<s;++o)(a=i[o])&&(yield a)}var fd=[null];function ce(e,t){this._groups=e,this._parents=t}function Qi(){return new ce([[document.documentElement]],fd)}function eb(){return this}ce.prototype=Qi.prototype={constructor:ce,select:vC,selectAll:MC,selectChild:IC,selectChildren:NC,filter:qC,data:jC,enter:WC,exit:XC,join:VC,merge:ZC,selection:eb,order:KC,sort:QC,call:tx,nodes:ex,node:rx,size:ix,empty:ox,each:sx,attr:ux,style:mx,property:bx,classed:Sx,text:Lx,html:Ex,raise:Ox,lower:Dx,append:Px,insert:Nx,remove:Wx,clone:Yx,datum:Ux,on:Zx,dispatch:Jx,[Symbol.iterator]:tb};function dt(e){return typeof e=="string"?new ce([[document.querySelector(e)]],[document.documentElement]):new ce([[e]],fd)}function En(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function pd(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Ji(){}var Ri=.7,Zo=1/Ri,Zr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ae="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rb=/^#([0-9a-f]{3,8})$/,ib=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),ob=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),sb=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${Ni}\\)$`),ab=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${Ni}\\)$`),nb=new RegExp(`^hsl\\(${Ni},${Ae},${Ae}\\)$`),lb=new RegExp(`^hsla\\(${Ni},${Ae},${Ae},${Ni}\\)$`),mh={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};En(Ji,qi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yh,formatHex:yh,formatHex8:hb,formatHsl:cb,formatRgb:Ch,toString:Ch});function yh(){return this.rgb().formatHex()}function hb(){return this.rgb().formatHex8()}function cb(){return gd(this).formatHsl()}function Ch(){return this.rgb().formatRgb()}function qi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=rb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?xh(t):r===3?new ne(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Co(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Co(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ib.exec(e))?new ne(t[1],t[2],t[3],1):(t=ob.exec(e))?new ne(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sb.exec(e))?Co(t[1],t[2],t[3],t[4]):(t=ab.exec(e))?Co(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nb.exec(e))?wh(t[1],t[2]/100,t[3]/100,1):(t=lb.exec(e))?wh(t[1],t[2]/100,t[3]/100,t[4]):mh.hasOwnProperty(e)?xh(mh[e]):e==="transparent"?new ne(NaN,NaN,NaN,0):null}function xh(e){return new ne(e>>16&255,e>>8&255,e&255,1)}function Co(e,t,r,i){return i<=0&&(e=t=r=NaN),new ne(e,t,r,i)}function db(e){return e instanceof Ji||(e=qi(e)),e?(e=e.rgb(),new ne(e.r,e.g,e.b,e.opacity)):new ne}function Ma(e,t,r,i){return arguments.length===1?db(e):new ne(e,t,r,i??1)}function ne(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}En(ne,Ma,pd(Ji,{brighter(e){return e=e==null?Zo:Math.pow(Zo,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ne(Tr(this.r),Tr(this.g),Tr(this.b),Ko(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bh,formatHex:bh,formatHex8:ub,formatRgb:kh,toString:kh}));function bh(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function ub(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br((isNaN(this.opacity)?1:this.opacity)*255)}`}function kh(){const e=Ko(this.opacity);return`${e===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${e===1?")":`, ${e})`}`}function Ko(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function br(e){return e=Tr(e),(e<16?"0":"")+e.toString(16)}function wh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ye(e,t,r,i)}function gd(e){if(e instanceof ye)return new ye(e.h,e.s,e.l,e.opacity);if(e instanceof Ji||(e=qi(e)),!e)return new ye;if(e instanceof ye)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,o=Math.min(t,r,i),s=Math.max(t,r,i),a=NaN,n=s-o,l=(s+o)/2;return n?(t===s?a=(r-i)/n+(r<i)*6:r===s?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?s+o:2-s-o,a*=60):n=l>0&&l<1?0:a,new ye(a,n,l,e.opacity)}function fb(e,t,r,i){return arguments.length===1?gd(e):new ye(e,t,r,i??1)}function ye(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}En(ye,fb,pd(Ji,{brighter(e){return e=e==null?Zo:Math.pow(Zo,e),new ye(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new ye(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,o=2*r-i;return new ne(sa(e>=240?e-240:e+120,o,i),sa(e,o,i),sa(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new ye(Th(this.h),xo(this.s),xo(this.l),Ko(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(){const e=Ko(this.opacity);return`${e===1?"hsl(":"hsla("}${Th(this.h)}, ${xo(this.s)*100}%, ${xo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Th(e){return e=(e||0)%360,e<0?e+360:e}function xo(e){return Math.max(0,Math.min(1,e||0))}function sa(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var $n=e=>()=>e;function md(e,t){return function(r){return e+r*t}}function pb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function DL(e,t){var r=t-e;return r?md(e,r>180||r<-180?r-360*Math.round(r/360):r):$n(isNaN(e)?t:e)}function gb(e){return(e=+e)==1?yd:function(t,r){return r-t?pb(t,r,e):$n(isNaN(t)?r:t)}}function yd(e,t){var r=t-e;return r?md(e,r):$n(isNaN(e)?t:e)}var Sh=(function e(t){var r=gb(t);function i(o,s){var a=r((o=Ma(o)).r,(s=Ma(s)).r),n=r(o.g,s.g),l=r(o.b,s.b),c=yd(o.opacity,s.opacity);return function(h){return o.r=a(h),o.g=n(h),o.b=l(h),o.opacity=c(h),o+""}}return i.gamma=e,i})(1);function er(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ea=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,aa=new RegExp(Ea.source,"g");function mb(e){return function(){return e}}function yb(e){return function(t){return e(t)+""}}function Cb(e,t){var r=Ea.lastIndex=aa.lastIndex=0,i,o,s,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Ea.exec(e))&&(o=aa.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),n[a]?n[a]+=s:n[++a]=s),(i=i[0])===(o=o[0])?n[a]?n[a]+=o:n[++a]=o:(n[++a]=null,l.push({i:a,x:er(i,o)})),r=aa.lastIndex;return r<t.length&&(s=t.slice(r),n[a]?n[a]+=s:n[++a]=s),n.length<2?l[0]?yb(l[0].x):mb(t):(t=l.length,function(c){for(var h=0,d;h<t;++h)n[(d=l[h]).i]=d.x(c);return n.join("")})}var _h=180/Math.PI,$a={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Cd(e,t,r,i,o,s){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*_h,skewX:Math.atan(l)*_h,scaleX:a,scaleY:n}}var bo;function xb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?$a:Cd(t.a,t.b,t.c,t.d,t.e,t.f)}function bb(e){return e==null||(bo||(bo=document.createElementNS("http://www.w3.org/2000/svg","g")),bo.setAttribute("transform",e),!(e=bo.transform.baseVal.consolidate()))?$a:(e=e.matrix,Cd(e.a,e.b,e.c,e.d,e.e,e.f))}function xd(e,t,r,i){function o(c){return c.length?c.pop()+" ":""}function s(c,h,d,f,u,g){if(c!==d||h!==f){var m=u.push("translate(",null,t,null,r);g.push({i:m-4,x:er(c,d)},{i:m-2,x:er(h,f)})}else(d||f)&&u.push("translate("+d+t+f+r)}function a(c,h,d,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:er(c,h)})):h&&d.push(o(d)+"rotate("+h+i)}function n(c,h,d,f){c!==h?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:er(c,h)}):h&&d.push(o(d)+"skewX("+h+i)}function l(c,h,d,f,u,g){if(c!==d||h!==f){var m=u.push(o(u)+"scale(",null,",",null,")");g.push({i:m-4,x:er(c,d)},{i:m-2,x:er(h,f)})}else(d!==1||f!==1)&&u.push(o(u)+"scale("+d+","+f+")")}return function(c,h){var d=[],f=[];return c=e(c),h=e(h),s(c.translateX,c.translateY,h.translateX,h.translateY,d,f),a(c.rotate,h.rotate,d,f),n(c.skewX,h.skewX,d,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,d,f),c=h=null,function(u){for(var g=-1,m=f.length,y;++g<m;)d[(y=f[g]).i]=y.x(u);return d.join("")}}}var kb=xd(xb,"px, ","px)","deg)"),wb=xd(bb,", ",")",")"),ei=0,Si=0,gi=0,bd=1e3,Qo,_i,Jo=0,Br=0,Ts=0,Wi=typeof performance=="object"&&performance.now?performance:Date,kd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function On(){return Br||(kd(Tb),Br=Wi.now()+Ts)}function Tb(){Br=0}function ts(){this._call=this._time=this._next=null}ts.prototype=wd.prototype={constructor:ts,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?On():+r)+(t==null?0:+t),!this._next&&_i!==this&&(_i?_i._next=this:Qo=this,_i=this),this._call=e,this._time=r,Oa()},stop:function(){this._call&&(this._call=null,this._time=1/0,Oa())}};function wd(e,t,r){var i=new ts;return i.restart(e,t,r),i}function Sb(){On(),++ei;for(var e=Qo,t;e;)(t=Br-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ei}function Bh(){Br=(Jo=Wi.now())+Ts,ei=Si=0;try{Sb()}finally{ei=0,Bb(),Br=0}}function _b(){var e=Wi.now(),t=e-Jo;t>bd&&(Ts-=t,Jo=e)}function Bb(){for(var e,t=Qo,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Qo=r);_i=e,Oa(i)}function Oa(e){if(!ei){Si&&(Si=clearTimeout(Si));var t=e-Br;t>24?(e<1/0&&(Si=setTimeout(Bh,e-Wi.now()-Ts)),gi&&(gi=clearInterval(gi))):(gi||(Jo=Wi.now(),gi=setInterval(_b,bd)),ei=1,kd(Bh))}}function vh(e,t,r){var i=new ts;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,r),i}var vb=ed("start","end","cancel","interrupt"),Lb=[],Td=0,Lh=1,Ia=2,Oo=3,Fh=4,Da=5,Io=6;function Ss(e,t,r,i,o,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Fb(e,r,{name:t,index:i,group:o,on:vb,tween:Lb,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Td})}function In(e,t){var r=Te(e,t);if(r.state>Td)throw new Error("too late; already scheduled");return r}function De(e,t){var r=Te(e,t);if(r.state>Oo)throw new Error("too late; already running");return r}function Te(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Fb(e,t,r){var i=e.__transition,o;i[t]=r,r.timer=wd(s,0,r.time);function s(c){r.state=Lh,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,d,f,u;if(r.state!==Lh)return l();for(h in i)if(u=i[h],u.name===r.name){if(u.state===Oo)return vh(a);u.state===Fh?(u.state=Io,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[h]):+h<t&&(u.state=Io,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[h])}if(vh(function(){r.state===Oo&&(r.state=Fh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Ia,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ia){for(r.state=Oo,o=new Array(f=r.tween.length),h=0,d=-1;h<f;++h)(u=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++d]=u);o.length=d+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Da,1),d=-1,f=o.length;++d<f;)o[d].call(e,h);r.state===Da&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Io,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Ab(e,t){var r=e.__transition,i,o,s=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){s=!1;continue}o=i.state>Ia&&i.state<Da,i.state=Io,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}s&&delete e.__transition}}function Mb(e){return this.each(function(){Ab(this,e)})}function Eb(e,t){var r,i;return function(){var o=De(this,e),s=o.tween;if(s!==r){i=r=s;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function $b(e,t,r){var i,o;if(typeof r!="function")throw new Error;return function(){var s=De(this,e),a=s.tween;if(a!==i){o=(i=a).slice();for(var n={name:t,value:r},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=n;break}l===c&&o.push(n)}s.tween=o}}function Ob(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Te(this.node(),r).tween,o=0,s=i.length,a;o<s;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?Eb:$b)(r,e,t))}function Dn(e,t,r){var i=e._id;return e.each(function(){var o=De(this,i);(o.value||(o.value={}))[t]=r.apply(this,arguments)}),function(o){return Te(o,i).value[t]}}function Sd(e,t){var r;return(typeof t=="number"?er:t instanceof qi?Sh:(r=qi(t))?(t=r,Sh):Cb)(e,t)}function Ib(e){return function(){this.removeAttribute(e)}}function Db(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pb(e,t,r){var i,o=r+"",s;return function(){var a=this.getAttribute(e);return a===o?null:a===i?s:s=t(i=a,r)}}function Rb(e,t,r){var i,o=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?s:s=t(i=a,r)}}function Nb(e,t,r){var i,o,s;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n)))}}function qb(e,t,r){var i,o,s;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n)))}}function Wb(e,t){var r=ws(e),i=r==="transform"?wb:Sd;return this.attrTween(e,typeof t=="function"?(r.local?qb:Nb)(r,i,Dn(this,"attr."+e,t)):t==null?(r.local?Db:Ib)(r):(r.local?Rb:Pb)(r,i,t))}function zb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Hb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Yb(e,t){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Hb(e,s)),r}return o._value=t,o}function Ub(e,t){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&zb(e,s)),r}return o._value=t,o}function jb(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=ws(e);return this.tween(r,(i.local?Yb:Ub)(i,t))}function Gb(e,t){return function(){In(this,e).delay=+t.apply(this,arguments)}}function Xb(e,t){return t=+t,function(){In(this,e).delay=t}}function Vb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Gb:Xb)(t,e)):Te(this.node(),t).delay}function Zb(e,t){return function(){De(this,e).duration=+t.apply(this,arguments)}}function Kb(e,t){return t=+t,function(){De(this,e).duration=t}}function Qb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Zb:Kb)(t,e)):Te(this.node(),t).duration}function Jb(e,t){if(typeof t!="function")throw new Error;return function(){De(this,e).ease=t}}function tk(e){var t=this._id;return arguments.length?this.each(Jb(t,e)):Te(this.node(),t).ease}function ek(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;De(this,e).ease=r}}function rk(e){if(typeof e!="function")throw new Error;return this.each(ek(this._id,e))}function ik(e){typeof e!="function"&&(e=od(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new Ue(i,this._parents,this._name,this._id)}function ok(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,o=r.length,s=Math.min(i,o),a=new Array(i),n=0;n<s;++n)for(var l=t[n],c=r[n],h=l.length,d=a[n]=new Array(h),f,u=0;u<h;++u)(f=l[u]||c[u])&&(d[u]=f);for(;n<i;++n)a[n]=t[n];return new Ue(a,this._parents,this._name,this._id)}function sk(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function ak(e,t,r){var i,o,s=sk(t)?In:De;return function(){var a=s(this,e),n=a.on;n!==i&&(o=(i=n).copy()).on(t,r),a.on=o}}function nk(e,t){var r=this._id;return arguments.length<2?Te(this.node(),r).on.on(e):this.each(ak(r,e,t))}function lk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function hk(){return this.on("end.remove",lk(this._id))}function ck(e){var t=this._name,r=this._id;typeof e!="function"&&(e=An(e));for(var i=this._groups,o=i.length,s=new Array(o),a=0;a<o;++a)for(var n=i[a],l=n.length,c=s[a]=new Array(l),h,d,f=0;f<l;++f)(h=n[f])&&(d=e.call(h,h.__data__,f,n))&&("__data__"in h&&(d.__data__=h.__data__),c[f]=d,Ss(c[f],t,r,f,c,Te(h,r)));return new Ue(s,this._parents,t,r)}function dk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=id(e));for(var i=this._groups,o=i.length,s=[],a=[],n=0;n<o;++n)for(var l=i[n],c=l.length,h,d=0;d<c;++d)if(h=l[d]){for(var f=e.call(h,h.__data__,d,l),u,g=Te(h,r),m=0,y=f.length;m<y;++m)(u=f[m])&&Ss(u,t,r,m,f,g);s.push(f),a.push(h)}return new Ue(s,a,t,r)}var uk=Qi.prototype.constructor;function fk(){return new uk(this._groups,this._parents)}function pk(e,t){var r,i,o;return function(){var s=ti(this,e),a=(this.style.removeProperty(e),ti(this,e));return s===a?null:s===r&&a===i?o:o=t(r=s,i=a)}}function _d(e){return function(){this.style.removeProperty(e)}}function gk(e,t,r){var i,o=r+"",s;return function(){var a=ti(this,e);return a===o?null:a===i?s:s=t(i=a,r)}}function mk(e,t,r){var i,o,s;return function(){var a=ti(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),ti(this,e))),a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n))}}function yk(e,t){var r,i,o,s="style."+t,a="end."+s,n;return function(){var l=De(this,e),c=l.on,h=l.value[s]==null?n||(n=_d(t)):void 0;(c!==r||o!==h)&&(i=(r=c).copy()).on(a,o=h),l.on=i}}function Ck(e,t,r){var i=(e+="")=="transform"?kb:Sd;return t==null?this.styleTween(e,pk(e,i)).on("end.style."+e,_d(e)):typeof t=="function"?this.styleTween(e,mk(e,i,Dn(this,"style."+e,t))).each(yk(this._id,e)):this.styleTween(e,gk(e,i,t),r).on("end.style."+e,null)}function xk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function bk(e,t,r){var i,o;function s(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&xk(e,a,r)),i}return s._value=t,s}function kk(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,bk(e,t,r??""))}function wk(e){return function(){this.textContent=e}}function Tk(e){return function(){var t=e(this);this.textContent=t??""}}function Sk(e){return this.tween("text",typeof e=="function"?Tk(Dn(this,"text",e)):wk(e==null?"":e+""))}function _k(e){return function(t){this.textContent=e.call(this,t)}}function Bk(e){var t,r;function i(){var o=e.apply(this,arguments);return o!==r&&(t=(r=o)&&_k(o)),t}return i._value=e,i}function vk(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Bk(e))}function Lk(){for(var e=this._name,t=this._id,r=Bd(),i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=Te(l,t);Ss(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ue(i,this._parents,e,r)}function Fk(){var e,t,r=this,i=r._id,o=r.size();return new Promise(function(s,a){var n={value:a},l={value:function(){--o===0&&s()}};r.each(function(){var c=De(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),o===0&&s()})}var Ak=0;function Ue(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Bd(){return++Ak}var qe=Qi.prototype;Ue.prototype={constructor:Ue,select:ck,selectAll:dk,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:ik,merge:ok,selection:fk,transition:Lk,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:nk,attr:Wb,attrTween:jb,style:Ck,styleTween:kk,text:Sk,textTween:vk,remove:hk,tween:Ob,delay:Vb,duration:Qb,ease:tk,easeVarying:rk,end:Fk,[Symbol.iterator]:qe[Symbol.iterator]};function Mk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ek={time:null,delay:0,duration:250,ease:Mk};function $k(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Ok(e){var t,r;e instanceof Ue?(t=e._id,e=e._name):(t=Bd(),(r=Ek).time=On(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&Ss(l,e,t,c,a,r||$k(l,t));return new Ue(i,this._parents,e,t)}Qi.prototype.interrupt=Mb;Qi.prototype.transition=Ok;const Pa=Math.PI,Ra=2*Pa,yr=1e-6,Ik=Ra-yr;function vd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Dk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vd;const r=10**t;return function(i){this._+=i[0];for(let o=1,s=i.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+i[o]}}class Pk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vd:Dk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,o){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,r,i,o,s,a){this._append`C${+t},${+r},${+i},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,o,s){if(t=+t,r=+r,i=+i,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,n=this._y1,l=i-t,c=o-r,h=a-t,d=n-r,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>yr)if(!(Math.abs(d*l-c*h)>yr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-a,g=o-n,m=l*l+c*c,y=u*u+g*g,C=Math.sqrt(m),b=Math.sqrt(f),k=s*Math.tan((Pa-Math.acos((m+f-y)/(2*C*b)))/2),T=k/b,S=k/C;Math.abs(T-1)>yr&&this._append`L${t+T*h},${r+T*d}`,this._append`A${s},${s},0,0,${+(d*u>h*g)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,o,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(o),l=i*Math.sin(o),c=t+n,h=r+l,d=1^a,f=a?o-s:s-o;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>yr||Math.abs(this._y1-h)>yr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ra+Ra),f>Ik?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:f>yr&&this._append`A${i},${i},0,${+(f>=Pa)},${d},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function qr(e){return function(){return e}}const PL=Math.abs,RL=Math.atan2,NL=Math.cos,qL=Math.max,WL=Math.min,zL=Math.sin,HL=Math.sqrt,Ah=1e-12,Pn=Math.PI,Mh=Pn/2,YL=2*Pn;function UL(e){return e>1?0:e<-1?Pn:Math.acos(e)}function jL(e){return e>=1?Mh:e<=-1?-Mh:Math.asin(e)}function Rk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Pk(t)}function Nk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ld(e){this._context=e}Ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Oi(e){return new Ld(e)}function qk(e){return e[0]}function Wk(e){return e[1]}function zk(e,t){var r=qr(!0),i=null,o=Oi,s=null,a=Rk(n);e=typeof e=="function"?e:e===void 0?qk:qr(e),t=typeof t=="function"?t:t===void 0?Wk:qr(t);function n(l){var c,h=(l=Nk(l)).length,d,f=!1,u;for(i==null&&(s=o(u=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(d,c,l),+t(d,c,l));if(u)return s=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:qr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:qr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:qr(!!l),n):r},n.curve=function(l){return arguments.length?(o=l,i!=null&&(s=o(i)),n):o},n.context=function(l){return arguments.length?(l==null?i=s=null:s=o(i=l),n):i},n}class Fd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Ad(e){return new Fd(e,!0)}function Md(e){return new Fd(e,!1)}function nr(){}function es(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function _s(e){this._context=e}_s.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:es(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:es(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Na(e){return new _s(e)}function Ed(e){this._context=e}Ed.prototype={areaStart:nr,areaEnd:nr,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:es(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hk(e){return new Ed(e)}function $d(e){this._context=e}$d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:es(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yk(e){return new $d(e)}function Od(e,t){this._basis=new _s(e),this._beta=t}Od.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],o=t[0],s=e[r]-i,a=t[r]-o,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(o+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Uk=(function e(t){function r(i){return t===1?new _s(i):new Od(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function rs(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Rn(e,t){this._context=e,this._k=(1-t)/6}Rn.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:rs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:rs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Id=(function e(t){function r(i){return new Rn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Nn(e,t){this._context=e,this._k=(1-t)/6}Nn.prototype={areaStart:nr,areaEnd:nr,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:rs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var jk=(function e(t){function r(i){return new Nn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qn(e,t){this._context=e,this._k=(1-t)/6}qn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Gk=(function e(t){function r(i){return new qn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Wn(e,t,r){var i=e._x1,o=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Ah){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Ah){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,o,s,a,e._x2,e._y2)}function Dd(e,t){this._context=e,this._alpha=t}Dd.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}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Wn(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Pd=(function e(t){function r(i){return t?new Dd(i,t):new Rn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Rd(e,t){this._context=e,this._alpha=t}Rd.prototype={areaStart:nr,areaEnd:nr,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Wn(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Xk=(function e(t){function r(i){return t?new Rd(i,t):new Nn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Nd(e,t){this._context=e,this._alpha=t}Nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:Wn(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Vk=(function e(t){function r(i){return t?new Nd(i,t):new qn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function qd(e){this._context=e}qd.prototype={areaStart:nr,areaEnd:nr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Zk(e){return new qd(e)}function Eh(e){return e<0?-1:1}function $h(e,t,r){var i=e._x1-e._x0,o=t-e._x1,s=(e._y1-e._y0)/(i||o<0&&-0),a=(r-e._y1)/(o||i<0&&-0),n=(s*o+a*i)/(i+o);return(Eh(s)+Eh(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(n))||0}function Oh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function na(e,t,r){var i=e._x0,o=e._y0,s=e._x1,a=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,o+n*t,s-n,a-n*r,s,a)}function is(e){this._context=e}is.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:na(this,this._t0,Oh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,na(this,Oh(this,r=$h(this,e,t)),r);break;default:na(this,this._t0,r=$h(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Wd(e){this._context=new zd(e)}(Wd.prototype=Object.create(is.prototype)).point=function(e,t){is.prototype.point.call(this,t,e)};function zd(e){this._context=e}zd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,o,s){this._context.bezierCurveTo(t,e,i,r,s,o)}};function Hd(e){return new is(e)}function Yd(e){return new Wd(e)}function Ud(e){this._context=e}Ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Ih(e),o=Ih(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],o[0][s],i[1][s],o[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ih(e){var t,r=e.length-1,i,o=new Array(r),s=new Array(r),a=new Array(r);for(o[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=o[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(o[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/s[t];for(s[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-o[t+1];return[o,s]}function jd(e){return new Ud(e)}function Bs(e,t){this._context=e,this._t=t}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Gd(e){return new Bs(e,.5)}function Xd(e){return new Bs(e,0)}function Vd(e){return new Bs(e,1)}function Bi(e,t,r){this.k=e,this.x=t,this.y=r}Bi.prototype={constructor:Bi,scale:function(e){return e===1?this:new Bi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Bi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Bi.prototype;var Kk=p(e=>{const{securityLevel:t}=yt();let r=dt("body");if(t==="sandbox"){const s=dt(`#i${e}`).node()?.contentDocument??document;r=dt(s.body)}return r.select(`#${e}`)},"selectSvgElement");function zn(e){return typeof e>"u"||e===null}p(zn,"isNothing");function Zd(e){return typeof e=="object"&&e!==null}p(Zd,"isObject");function Kd(e){return Array.isArray(e)?e:zn(e)?[]:[e]}p(Kd,"toArray");function Qd(e,t){var r,i,o,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)o=s[r],e[o]=t[o];return e}p(Qd,"extend");function Jd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Jd,"repeat");function tu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(tu,"isNegativeZero");var Qk=zn,Jk=Zd,t1=Kd,e1=Jd,r1=tu,i1=Qd,Pt={isNothing:Qk,isObject:Jk,toArray:t1,repeat:e1,isNegativeZero:r1,extend:i1};function Hn(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
128
|
+
|
|
129
|
+
`+e.mark.snippet),i+" "+r):i}p(Hn,"formatError");function ri(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Hn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(ri,"YAMLException$1");ri.prototype=Object.create(Error.prototype);ri.prototype.constructor=ri;ri.prototype.toString=p(function(t){return this.name+": "+Hn(this,t)},"toString");var ae=ri;function Do(e,t,r,i,o){var s="",a="",n=Math.floor(o/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}p(Do,"getLine");function Po(e,t){return Pt.repeat(" ",t-e.length)+e}p(Po,"padStart");function eu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=Do(e.buffer,i[a-l],o[a-l],e.position-(i[a]-i[a-l]),d),n=Pt.repeat(" ",t.indent)+Po((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
130
|
+
`+n;for(c=Do(e.buffer,i[a],o[a],e.position,d),n+=Pt.repeat(" ",t.indent)+Po((e.line+1).toString(),h)+" | "+c.str+`
|
|
131
|
+
`,n+=Pt.repeat("-",t.indent+h+3+c.pos)+`^
|
|
132
|
+
`,l=1;l<=t.linesAfter&&!(a+l>=o.length);l++)c=Do(e.buffer,i[a+l],o[a+l],e.position-(i[a]-i[a+l]),d),n+=Pt.repeat(" ",t.indent)+Po((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
133
|
+
`;return n.replace(/\n$/,"")}p(eu,"makeSnippet");var o1=eu,s1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],a1=["scalar","sequence","mapping"];function ru(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(ru,"compileStyleAliases");function iu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(s1.indexOf(r)===-1)throw new ae('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=ru(t.styleAliases||null),a1.indexOf(this.kind)===-1)throw new ae('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(iu,"Type$1");var Zt=iu;function qa(e,t){var r=[];return e[t].forEach(function(i){var o=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(o=a)}),r[o]=i}),r}p(qa,"compileList");function ou(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(ou,"compileMap");function os(e){return this.extend(e)}p(os,"Schema$1");os.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Zt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new ae("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Zt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ae("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ae("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Zt))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(os.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=qa(o,"implicit"),o.compiledExplicit=qa(o,"explicit"),o.compiledTypeMap=ou(o.compiledImplicit,o.compiledExplicit),o},"extend");var n1=os,l1=new Zt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),h1=new Zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),c1=new Zt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),d1=new n1({explicit:[l1,h1,c1]});function su(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(su,"resolveYamlNull");function au(){return null}p(au,"constructYamlNull");function nu(e){return e===null}p(nu,"isNull");var u1=new Zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:su,construct:au,predicate:nu,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function lu(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(lu,"resolveYamlBoolean");function hu(e){return e==="true"||e==="True"||e==="TRUE"}p(hu,"constructYamlBoolean");function cu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(cu,"isBoolean");var f1=new Zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:lu,construct:hu,predicate:cu,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function du(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(du,"isHexCode");function uu(e){return 48<=e&&e<=55}p(uu,"isOctCode");function fu(e){return 48<=e&&e<=57}p(fu,"isDecCode");function pu(e){if(e===null)return!1;var t=e.length,r=0,i=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!du(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!uu(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!fu(e.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}p(pu,"resolveYamlInteger");function gu(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(gu,"constructYamlInteger");function mu(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Pt.isNegativeZero(e)}p(mu,"isInteger");var p1=new Zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:pu,construct:gu,predicate:mu,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),g1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function yu(e){return!(e===null||!g1.test(e)||e[e.length-1]==="_")}p(yu,"resolveYamlFloat");function Cu(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Cu,"constructYamlFloat");var m1=/^[-+]?[0-9]+e/;function xu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Pt.isNegativeZero(e))return"-0.0";return r=e.toString(10),m1.test(r)?r.replace("e",".e"):r}p(xu,"representYamlFloat");function bu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Pt.isNegativeZero(e))}p(bu,"isFloat");var y1=new Zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:yu,construct:Cu,predicate:bu,represent:xu,defaultStyle:"lowercase"}),ku=d1.extend({implicit:[u1,f1,p1,y1]}),C1=ku,wu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Tu=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 Su(e){return e===null?!1:wu.exec(e)!==null||Tu.exec(e)!==null}p(Su,"resolveYamlTimestamp");function _u(e){var t,r,i,o,s,a,n,l=0,c=null,h,d,f;if(t=wu.exec(e),t===null&&(t=Tu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,i,o));if(s=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,o,s,a,n,l)),c&&f.setTime(f.getTime()-c),f}p(_u,"constructYamlTimestamp");function Bu(e){return e.toISOString()}p(Bu,"representYamlTimestamp");var x1=new Zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Su,construct:_u,instanceOf:Date,represent:Bu});function vu(e){return e==="<<"||e===null}p(vu,"resolveYamlMerge");var b1=new Zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vu}),Yn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
134
|
+
\r`;function Lu(e){if(e===null)return!1;var t,r,i=0,o=e.length,s=Yn;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Lu,"resolveYamlBinary");function Fu(e){var t,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=Yn,a=0,n=[];for(t=0;t<o;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=o%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}p(Fu,"constructYamlBinary");function Au(e){var t="",r=0,i,o,s=e.length,a=Yn;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}p(Au,"representYamlBinary");function Mu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Mu,"isBinary");var k1=new Zt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Lu,construct:Fu,predicate:Mu,represent:Au}),w1=Object.prototype.hasOwnProperty,T1=Object.prototype.toString;function Eu(e){if(e===null)return!0;var t=[],r,i,o,s,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(o=n[r],a=!1,T1.call(o)!=="[object Object]")return!1;for(s in o)if(w1.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}p(Eu,"resolveYamlOmap");function $u(e){return e!==null?e:[]}p($u,"constructYamlOmap");var S1=new Zt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Eu,construct:$u}),_1=Object.prototype.toString;function Ou(e){if(e===null)return!0;var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],_1.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;s[t]=[o[0],i[o[0]]]}return!0}p(Ou,"resolveYamlPairs");function Iu(e){if(e===null)return[];var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],o=Object.keys(i),s[t]=[o[0],i[o[0]]];return s}p(Iu,"constructYamlPairs");var B1=new Zt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ou,construct:Iu}),v1=Object.prototype.hasOwnProperty;function Du(e){if(e===null)return!0;var t,r=e;for(t in r)if(v1.call(r,t)&&r[t]!==null)return!1;return!0}p(Du,"resolveYamlSet");function Pu(e){return e!==null?e:{}}p(Pu,"constructYamlSet");var L1=new Zt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Du,construct:Pu}),Ru=C1.extend({implicit:[x1,b1],explicit:[k1,S1,B1,L1]}),lr=Object.prototype.hasOwnProperty,ss=1,Nu=2,qu=3,as=4,la=1,F1=2,Dh=3,A1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M1=/[\x85\u2028\u2029]/,E1=/[,\[\]\{\}]/,Wu=/^(?:!|!!|![a-z\-]+!)$/i,zu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Wa(e){return Object.prototype.toString.call(e)}p(Wa,"_class");function xe(e){return e===10||e===13}p(xe,"is_EOL");function ar(e){return e===9||e===32}p(ar,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}p(Jt,"is_WS_OR_EOL");function kr(e){return e===44||e===91||e===93||e===123||e===125}p(kr,"is_FLOW_INDICATOR");function Hu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Hu,"fromHexCode");function Yu(e){return e===120?2:e===117?4:e===85?8:0}p(Yu,"escapedHexLen");function Uu(e){return 48<=e&&e<=57?e-48:-1}p(Uu,"fromDecimalCode");function za(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
135
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(za,"simpleEscapeSequence");function ju(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(ju,"charFromCodepoint");function Un(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(Un,"setProperty");var Gu=new Array(256),Xu=new Array(256);for(gr=0;gr<256;gr++)Gu[gr]=za(gr)?1:0,Xu[gr]=za(gr);var gr;function Vu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Ru,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Vu,"State$1");function jn(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=o1(r),new ae(t,r)}p(jn,"generateError");function tt(e,t){throw jn(e,t)}p(tt,"throwError");function zi(e,t){e.onWarning&&e.onWarning.call(null,jn(e,t))}p(zi,"throwWarning");var Ph={YAML:p(function(t,r,i){var o,s,a;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&tt(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),a=parseInt(o[2],10),s!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&zi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var o,s;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),o=i[0],s=i[1],Wu.test(o)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),lr.call(t.tagMap,o)&&tt(t,'there is a previously declared suffix for "'+o+'" tag handle'),zu.test(s)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{tt(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s},"handleTagDirective")};function Ye(e,t,r,i){var o,s,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(o=0,s=n.length;o<s;o+=1)a=n.charCodeAt(o),a===9||32<=a&&a<=1114111||tt(e,"expected valid JSON character");else A1.test(n)&&tt(e,"the stream contains non-printable characters");e.result+=n}}p(Ye,"captureSegment");function Ha(e,t,r,i){var o,s,a,n;for(Pt.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,n=o.length;a<n;a+=1)s=o[a],lr.call(t,s)||(Un(t,s,r[s]),i[s]=!0)}p(Ha,"mergeMappings");function wr(e,t,r,i,o,s,a,n,l){var c,h;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),c=0,h=o.length;c<h;c+=1)Array.isArray(o[c])&&tt(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Wa(o[c])==="[object Object]"&&(o[c]="[object Object]");if(typeof o=="object"&&Wa(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Ha(e,t,s[c],r);else Ha(e,t,s,r);else!e.json&&!lr.call(r,o)&&lr.call(t,o)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),Un(t,o,s),delete r[o];return t}p(wr,"storeMappingPair");function vs(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(vs,"readLineBreak");function Et(e,t,r){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;ar(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(xe(o))for(vs(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&zi(e,"deficient indentation"),i}p(Et,"skipSeparationSpace");function to(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Jt(r)))}p(to,"testDocumentSeparator");function Ls(e,t){t===1?e.result+=" ":t>1&&(e.result+=Pt.repeat(`
|
|
136
|
+
`,t-1))}p(Ls,"writeFoldedLines");function Zu(e,t,r){var i,o,s,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||kr(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&kr(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,n=!1;u!==0;){if(u===58){if(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&kr(o))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&to(e)||r&&kr(u))break;if(xe(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ye(e,s,a,!1),Ls(e,e.line-l),s=a=e.position,n=!1),ar(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Ye(e,s,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}p(Zu,"readPlainScalar");function Ku(e,t){var r,i,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ye(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,o=e.position;else return!0;else xe(r)?(Ye(e,i,o,!0),Ls(e,Et(e,!1,t)),i=o=e.position):e.position===e.lineStart&&to(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(Ku,"readSingleQuotedScalar");function Qu(e,t){var r,i,o,s,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ye(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ye(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),xe(n))Et(e,!1,t);else if(n<256&&Gu[n])e.result+=Xu[n],e.position++;else if((a=Yu(n))>0){for(o=a,s=0;o>0;o--)n=e.input.charCodeAt(++e.position),(a=Hu(n))>=0?s=(s<<4)+a:tt(e,"expected hexadecimal character");e.result+=ju(s),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else xe(n)?(Ye(e,r,i,!0),Ls(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&to(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(Qu,"readDoubleQuotedScalar");function Ju(e,t){var r=!0,i,o,s,a=e.tag,n,l=e.anchor,c,h,d,f,u,g=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=C=null,d=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Jt(c)&&(d=f=!0,e.position++,Et(e,!0,t))),i=e.line,o=e.lineStart,s=e.position,vr(e,t,ss,!1,!0),y=e.tag,m=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),vr(e,t,ss,!1,!0),C=e.result),u?wr(e,n,g,y,m,C,i,o,s):d?n.push(wr(e,null,g,y,m,C,i,o,s)):n.push(m),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(Ju,"readFlowCollection");function tf(e,t){var r,i,o=la,s=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)la===o?o=d===43?Dh:F1:tt(e,"repeat of a chomping mode identifier");else if((h=Uu(d))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?tt(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(ar(d)){do d=e.input.charCodeAt(++e.position);while(ar(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!xe(d)&&d!==0)}for(;d!==0;){for(vs(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),xe(d)){l++;continue}if(e.lineIndent<n){o===Dh?e.result+=Pt.repeat(`
|
|
137
|
+
`,s?1+l:l):o===la&&s&&(e.result+=`
|
|
138
|
+
`);break}for(i?ar(d)?(c=!0,e.result+=Pt.repeat(`
|
|
139
|
+
`,s?1+l:l)):c?(c=!1,e.result+=Pt.repeat(`
|
|
140
|
+
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Pt.repeat(`
|
|
141
|
+
`,l):e.result+=Pt.repeat(`
|
|
142
|
+
`,s?1+l:l),s=!0,a=!0,l=0,r=e.position;!xe(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Ye(e,r,e.position,!1)}return!0}p(tf,"readBlockScalar");function Ya(e,t){var r,i=e.tag,o=e.anchor,s=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Jt(a))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,vr(e,t,qu,!1,!0),s.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}p(Ya,"readBlockSequence");function ef(e,t,r){var i,o,s,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,g=null,m=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Jt(i))b===63?(y&&(wr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!0,o=!0):y?(y=!1,o=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!vr(e,r,Nu,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);ar(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(wr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!1,o=!1,u=e.tag,g=e.result;else if(C)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),vr(e,t,as,!0,o)&&(y?g=e.result:m=e.result),y||(wr(e,d,f,u,g,m,a,n,l),u=g=m=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&wr(e,d,f,u,g,null,a,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),C}p(ef,"readBlockMapping");function rf(e){var t,r=!1,i=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Jt(a);)a===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Wu.test(o)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),E1.test(s)&&tt(e,"tag suffix cannot contain flow indicator characters")}s&&!zu.test(s)&&tt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{tt(e,"tag name is malformed: "+s)}return r?e.tag=s:lr.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:tt(e,'undeclared tag handle "'+o+'"'),!0}p(rf,"readTagProperty");function of(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!kr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(of,"readAnchorProperty");function sf(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Jt(i)&&!kr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),lr.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Et(e,!0,-1),!0}p(sf,"readAlias");function vr(e,t,r,i,o){var s,a,n,l=1,c=!1,h=!1,d,f,u,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=n=as===r||qu===r,i&&Et(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;rf(e)||of(e);)Et(e,!0,-1)?(c=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||o),(l===1||as===r)&&(ss===r||Nu===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(Ya(e,y)||ef(e,y,m))||Ju(e,m)?h=!0:(a&&tf(e,m)||Ku(e,m)||Qu(e,m)?h=!0:sf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Zu(e,m,ss===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&Ya(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(g=e.implicitTypes[d],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(lr.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,f=u.length;d<f;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){g=u[d];break}g||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):tt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(vr,"composeNode");function af(e){var t=e.position,r,i,o,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Et(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Jt(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),o=[],i.length<1&&tt(e,"directive name must not be less than one character in length");a!==0;){for(;ar(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!xe(a));break}if(xe(a))break;for(r=e.position;a!==0&&!Jt(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}a!==0&&vs(e),lr.call(Ph,i)?Ph[i](e,i,o):zi(e,'unknown document directive "'+i+'"')}if(Et(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Et(e,!0,-1)):s&&tt(e,"directives end mark is expected"),vr(e,e.lineIndent-1,as,!1,!0),Et(e,!0,-1),e.checkLineBreaks&&M1.test(e.input.slice(t,e.position))&&zi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&to(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Et(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}p(af,"readDocument");function Gn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
143
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Vu(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)af(r);return r.documents}p(Gn,"loadDocuments");function $1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Gn(e,r);if(typeof t!="function")return i;for(var o=0,s=i.length;o<s;o+=1)t(i[o])}p($1,"loadAll$1");function nf(e,t){var r=Gn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ae("expected a single document in the stream, but found more")}}p(nf,"load$1");var O1=nf,I1={load:O1},lf=Object.prototype.toString,hf=Object.prototype.hasOwnProperty,Xn=65279,D1=9,Hi=10,P1=13,R1=32,N1=33,q1=34,Ua=35,W1=37,z1=38,H1=39,Y1=42,cf=44,U1=45,ns=58,j1=61,G1=62,X1=63,V1=64,df=91,uf=93,Z1=96,ff=123,K1=124,pf=125,Kt={};Kt[0]="\\0";Kt[7]="\\a";Kt[8]="\\b";Kt[9]="\\t";Kt[10]="\\n";Kt[11]="\\v";Kt[12]="\\f";Kt[13]="\\r";Kt[27]="\\e";Kt[34]='\\"';Kt[92]="\\\\";Kt[133]="\\N";Kt[160]="\\_";Kt[8232]="\\L";Kt[8233]="\\P";var Q1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],J1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function gf(e,t){var r,i,o,s,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),o=0,s=i.length;o<s;o+=1)a=i[o],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&hf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}p(gf,"compileStyleMap");function mf(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new ae("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Pt.repeat("0",i-t.length)+t}p(mf,"encodeHex");var t2=1,Yi=2;function yf(e){this.schema=e.schema||Ru,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Pt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=gf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Yi:t2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(yf,"State");function ja(e,t){for(var r=Pt.repeat(" ",t),i=0,o=-1,s="",a,n=e.length;i<n;)o=e.indexOf(`
|
|
144
|
+
`,i),o===-1?(a=e.slice(i),i=n):(a=e.slice(i,o+1),i=o+1),a.length&&a!==`
|
|
145
|
+
`&&(s+=r),s+=a;return s}p(ja,"indentString");function ls(e,t){return`
|
|
146
|
+
`+Pt.repeat(" ",e.indent*t)}p(ls,"generateNextLine");function Cf(e,t){var r,i,o;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}p(Cf,"testImplicitResolving");function Ui(e){return e===R1||e===D1}p(Ui,"isWhitespace");function ii(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Xn||65536<=e&&e<=1114111}p(ii,"isPrintable");function Ga(e){return ii(e)&&e!==Xn&&e!==P1&&e!==Hi}p(Ga,"isNsCharOrWhitespace");function Xa(e,t,r){var i=Ga(e),o=i&&!Ui(e);return(r?i:i&&e!==cf&&e!==df&&e!==uf&&e!==ff&&e!==pf)&&e!==Ua&&!(t===ns&&!o)||Ga(t)&&!Ui(t)&&e===Ua||t===ns&&o}p(Xa,"isPlainSafe");function xf(e){return ii(e)&&e!==Xn&&!Ui(e)&&e!==U1&&e!==X1&&e!==ns&&e!==cf&&e!==df&&e!==uf&&e!==ff&&e!==pf&&e!==Ua&&e!==z1&&e!==Y1&&e!==N1&&e!==K1&&e!==j1&&e!==G1&&e!==H1&&e!==q1&&e!==W1&&e!==V1&&e!==Z1}p(xf,"isPlainSafeFirst");function bf(e){return!Ui(e)&&e!==ns}p(bf,"isPlainSafeLast");function Gr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Gr,"codePointAt");function Vn(e){var t=/^\n* /;return t.test(e)}p(Vn,"needIndentIndicator");var kf=1,Va=2,wf=3,Tf=4,Yr=5;function Sf(e,t,r,i,o,s,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,g=-1,m=xf(Gr(e,0))&&bf(Gr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Gr(e,l),!ii(c))return Yr;m=m&&Xa(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Gr(e,l),c===Hi)d=!0,u&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!ii(c))return Yr;m=m&&Xa(c,h,n),h=c}f=f||u&&l-g-1>i&&e[g+1]!==" "}return!d&&!f?m&&!a&&!o(e)?kf:s===Yi?Yr:Va:r>9&&Vn(e)?Yr:a?s===Yi?Yr:Va:f?Tf:wf}p(Sf,"chooseScalarStyle");function _f(e,t,r,i,o){e.dump=(function(){if(t.length===0)return e.quotingType===Yi?'""':"''";if(!e.noCompatMode&&(Q1.indexOf(t)!==-1||J1.test(t)))return e.quotingType===Yi?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Cf(e,c)}switch(p(l,"testAmbiguity"),Sf(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,o)){case kf:return t;case Va:return"'"+t.replace(/'/g,"''")+"'";case wf:return"|"+Za(t,e.indent)+Ka(ja(t,s));case Tf:return">"+Za(t,e.indent)+Ka(ja(Bf(t,a),s));case Yr:return'"'+vf(t)+'"';default:throw new ae("impossible error: invalid scalar style")}})()}p(_f,"writeScalar");function Za(e,t){var r=Vn(e)?String(t):"",i=e[e.length-1]===`
|
|
147
|
+
`,o=i&&(e[e.length-2]===`
|
|
148
|
+
`||e===`
|
|
149
|
+
`),s=o?"+":i?"":"-";return r+s+`
|
|
150
|
+
`}p(Za,"blockHeader");function Ka(e){return e[e.length-1]===`
|
|
151
|
+
`?e.slice(0,-1):e}p(Ka,"dropEndingNewline");function Bf(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
152
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,Qa(e.slice(0,c),t)})(),o=e[0]===`
|
|
153
|
+
`||e[0]===" ",s,a;a=r.exec(e);){var n=a[1],l=a[2];s=l[0]===" ",i+=n+(!o&&!s&&l!==""?`
|
|
154
|
+
`:"")+Qa(l,t),o=s}return i}p(Bf,"foldString");function Qa(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,o=0,s,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-o>t&&(s=a>o?a:n,l+=`
|
|
155
|
+
`+e.slice(o,s),o=s+1),a=n;return l+=`
|
|
156
|
+
`,e.length-o>t&&a>o?l+=e.slice(o,a)+`
|
|
157
|
+
`+e.slice(a+1):l+=e.slice(o),l.slice(1)}p(Qa,"foldLine");function vf(e){for(var t="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=Gr(e,o),i=Kt[r],!i&&ii(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=i||mf(r);return t}p(vf,"escapeString");function Lf(e,t,r){var i="",o=e.tag,s,a,n;for(s=0,a=r.length;s<a;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(Ee(e,t,n,!1,!1)||typeof n>"u"&&Ee(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}p(Lf,"writeFlowSequence");function Ja(e,t,r,i){var o="",s=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Ee(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ee(e,t+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=ls(e,t)),e.dump&&Hi===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}p(Ja,"writeBlockSequence");function Ff(e,t,r){var i="",o=e.tag,s=Object.keys(r),a,n,l,c,h;for(a=0,n=s.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Ee(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ee(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=o,e.dump="{"+i+"}"}p(Ff,"writeFlowMapping");function Af(e,t,r,i){var o="",s=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new ae("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||o!=="")&&(f+=ls(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Ee(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Hi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=ls(e,t)),Ee(e,t+1,h,!0,d)&&(e.dump&&Hi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,o+=f));e.tag=s,e.dump=o||"{}"}p(Af,"writeBlockMapping");function tn(e,t,r){var i,o,s,a,n,l;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(n=o[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,lf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(hf.call(n.represent,l))i=n.represent[l](t,l);else throw new ae("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(tn,"detectType");function Ee(e,t,r,i,o,s,a){e.tag=null,e.dump=r,tn(e,r,!1)||tn(e,r,!0);var n=lf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Af(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Ff(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Ja(e,t-1,e.dump,o):Ja(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Lf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&_f(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ae("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(Ee,"writeNode");function Mf(e,t){var r=[],i=[],o,s;for(hs(e,r,i),o=0,s=i.length;o<s;o+=1)t.duplicates.push(r[i[o]]);t.usedDuplicates=new Array(s)}p(Mf,"getDuplicateReferences");function hs(e,t,r){var i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)hs(e[o],t,r);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)hs(e[i[o]],t,r)}p(hs,"inspectNode");function e2(e,t){t=t||{};var r=new yf(t);r.noRefs||Mf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ee(r,0,i,!0,!0)?r.dump+`
|
|
158
|
+
`:""}p(e2,"dump$1");function r2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(r2,"renamed");var i2=ku,o2=I1.load;/*! Bundled license information:
|
|
159
|
+
|
|
160
|
+
js-yaml/dist/js-yaml.mjs:
|
|
161
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
162
|
+
*/var s2=p(e=>{const{handDrawnSeed:t}=yt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ai=p(e=>{const t=a2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),a2=p(e=>{const t=new Map;return e.forEach(r=>{const[i,o]=r.split(":");t.set(i.trim(),o?.trim())}),t},"styles2Map"),Ef=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),K=p(e=>{const{stylesArray:t}=ai(e),r=[],i=[],o=[],s=[];return t.forEach(a=>{const n=a[0];Ef(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&o.push(a.join(":")+" !important"),n==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:s}},"styles2String"),X=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=yt(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:a}=ai(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||o,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:n2(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),n2=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),ko={},Dt={},Rh;function l2(){return Rh||(Rh=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.BLANK_URL=Dt.relativeFirstCharacters=Dt.whitespaceEscapeCharsRegex=Dt.urlSchemeRegex=Dt.ctrlCharactersRegex=Dt.htmlCtrlEntityRegex=Dt.htmlEntitiesRegex=Dt.invalidProtocolRegex=void 0,Dt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Dt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Dt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Dt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Dt.urlSchemeRegex=/^.+(:|:)/gim,Dt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Dt.relativeFirstCharacters=[".","/"],Dt.BLANK_URL="about:blank"),Dt}var Nh;function h2(){if(Nh)return ko;Nh=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.sanitizeUrl=s;var e=l2();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,l=o(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var g=new URL(u);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return u}return ko}var c2=h2();function ha(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function d2(){}function $f(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Zn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const u2="[object RegExp]",Of="[object String]",If="[object Number]",Df="[object Boolean]",Pf="[object Arguments]",f2="[object Symbol]",p2="[object Date]",g2="[object Map]",m2="[object Set]",y2="[object Array]",C2="[object ArrayBuffer]",x2="[object Object]",b2="[object DataView]",k2="[object Uint8Array]",w2="[object Uint8ClampedArray]",T2="[object Uint16Array]",S2="[object Uint32Array]",_2="[object Int8Array]",B2="[object Int16Array]",v2="[object Int32Array]",L2="[object Float32Array]",F2="[object Float64Array]",qh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Kn(e){return typeof qh.Buffer<"u"&&qh.Buffer.isBuffer(e)}function A2(e){return Number.isSafeInteger(e)&&e>=0}function Rf(e){return e!=null&&typeof e!="function"&&A2(e.length)}function M2(e){return e==="__proto__"}function Qn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Jn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E2(e,t){return Xr(e,void 0,e,new Map,t)}function Xr(e,t,r,i=new Map,o=void 0){const s=o?.(e,t,r,i);if(s!==void 0)return s;if(Qn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Xr(e[n],n,r,i,o);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,Xr(l,n,r,i,o));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Xr(n,void 0,r,i,o));return a}if(Kn(e))return e.subarray();if(Jn(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Xr(e[n],n,r,i,o);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),pe(a,e,r,i,o),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),pe(a,e,r,i,o),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),pe(a,e,r,i,o),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,pe(a,e,r,i,o),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),pe(a,e,r,i,o),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),pe(a,e,r,i,o),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),pe(a,e,r,i,o),a}if(typeof e=="object"&&$2(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),pe(a,e,r,i,o),a}return e}function pe(e,t,r=e,i,o){const s=[...Object.keys(t),...$f(t)];for(let a=0;a<s.length;a++){const n=s[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Xr(t[n],n,r,i,o))}}function $2(e){switch(Zn(e)){case Pf:case y2:case C2:case b2:case Df:case p2:case L2:case F2:case _2:case B2:case v2:case g2:case If:case x2:case u2:case m2:case Of:case f2:case k2:case w2:case T2:case S2:return!0;default:return!1}}function O2(e,t){return E2(e,(r,i,o,s)=>{if(typeof e=="object"){if(Zn(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return s.set(e,a),pe(a,e,o,s),a}switch(Object.prototype.toString.call(e)){case If:case Of:case Df:{const a=new e.constructor(e?.valueOf());return pe(a,e),a}case Pf:{const a={};return pe(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Wh(e){return O2(e)}function en(e){return e!==null&&typeof e=="object"&&Zn(e)==="[object Arguments]"}function rn(e){return typeof e=="object"&&e!==null}function I2(e){return rn(e)&&Rf(e)}function eo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);const a=e.apply(this,i);return r.cache=s.set(o,a)||s,a};return r.cache=new(eo.Cache||Map),r}eo.Cache=Map;function Ro(e){return Jn(e)}function D2(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function P2(e){if(Qn(e))return e;if(Array.isArray(e)||Jn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function R2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let o=e;for(let s=0;s<r.length;s++){const a=r[s];o=No(o,a,i,new Map)}return o}function No(e,t,r,i){if(Qn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return P2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)t[s]=t[s]??void 0}const o=[...Object.keys(t),...$f(t)];for(let s=0;s<o.length;s++){const a=o[s];if(M2(a))continue;let n=t[a],l=e[a];if(en(n)&&(n={...n}),en(l)&&(l={...l}),Kn(n)&&(n=Wh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const u=d[f];h[u]=l[u]}l=h}else if(I2(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||rn(l)&&rn(n)&&(ha(l)||ha(n)||Ro(l)||Ro(n))?e[a]=No(l,n,r,i):l==null&&ha(n)?e[a]=No({},n,r,i):l==null&&Ro(n)?e[a]=Wh(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function N2(e,...t){return R2(e,...t,d2)}function zh(e){if(e==null)return!0;if(Rf(e))return typeof e.splice!="function"&&typeof e!="string"&&!Kn(e)&&!Ro(e)&&!en(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return D2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var q2="",W2={curveBasis:Na,curveBasisClosed:Hk,curveBasisOpen:Yk,curveBumpX:Ad,curveBumpY:Md,curveBundle:Uk,curveCardinalClosed:jk,curveCardinalOpen:Gk,curveCardinal:Id,curveCatmullRomClosed:Xk,curveCatmullRomOpen:Vk,curveCatmullRom:Pd,curveLinear:Oi,curveLinearClosed:Zk,curveMonotoneX:Hd,curveMonotoneY:Yd,curveNatural:jd,curveStep:Gd,curveStepAfter:Vd,curveStepBefore:Xd},z2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,H2=p(function(e,t){const r=Nf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Yo(a),i=qt(i,[...a])}else i=r.args;if(!i)return;let o=Sn(e,t);const s="config";return i[s]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[s],delete i[s]),i},"detectInit"),Nf=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${z2.source})(?=[}][%]{2}).*
|
|
163
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),W.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=$i.exec(e))!==null;)if(i.index===$i.lastIndex&&$i.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return W.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Y2=p(function(e){return e.replace($i,"")},"removeDirectives"),U2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function tl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return W2[r]??t}p(tl,"interpolateToCurve");function qf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?c2.sanitizeUrl(r):r}p(qf,"formatUrl");var j2=p((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){W.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function el(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(el,"distance");function Wf(e){let t,r=0;e.forEach(o=>{r+=el(o,t),t=o});const i=r/2;return rl(e,i)}p(Wf,"traverseEdge");function zf(e){return e.length===1?e[0]:Wf(e)}p(zf,"calcLabelPosition");var Hh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),rl=p((e,t)=>{let r,i=t;for(const o of e){if(r){const s=el(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:Hh((1-a)*r.x+a*o.x,5),y:Hh((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),G2=p((e,t,r)=>{W.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=rl(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function Hf(e,t,r){const i=structuredClone(r);W.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=rl(i,o),a=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2),l}p(Hf,"calcTerminalLabelPosition");function Yf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Yf,"getStylesFromArray");var Yh=0,X2=p(()=>(Yh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Yh),"generateId");function Uf(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Uf,"makeRandomHex");var V2=p(e=>Uf(e.length),"random"),Z2=p(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"),K2=p(function(e,t){const r=t.text.replace(Ki.lineBreakRegex," "),[,i]=Fs(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),Q2=eo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ki.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const l=je(`${a} `,r),c=je(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:u}=J2(a,t,"-",r);o.push(s,...f),s=u}else c+l>=t?(o.push(s),s=a):s=[s,a].filter(Boolean).join(" ");n+1===i.length&&o.push(s)}),o.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),J2=eo((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...e],s=[];let a="";return o.forEach((n,l)=>{const c=`${a}${n}`;if(je(c,i)>=t){const d=l+1,f=o.length===d,u=`${c}${r}`;s.push(f?c:u),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function jf(e,t){return il(e,t).height}p(jf,"calculateTextHeight");function je(e,t){return il(e,t).width}p(je,"calculateTextWidth");var il=eo((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,s]=Fs(r),a=["sans-serif",i],n=e.split(Ki.lineBreakRegex),l=[],c=dt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let u=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=Z2();y.text=m||q2;const C=K2(h,y).style("font-size",s).style("font-weight",o).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),u=Math.round(b.height),g.height+=u,g.lineHeight=Math.round(Math.max(g.lineHeight,u))}l.push(g)}h.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),tw=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},wo,ew=p(function(e){return wo=wo||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),wo.innerHTML=e,unescape(wo.textContent)},"entityDecode");function ol(e){return"str"in e}p(ol,"isDetailedError");var rw=p((e,t,r,i)=>{if(!i)return;const o=e.node()?.getBBox();o&&e.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Fs=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function sl(e,t){return N2({},e,t)}p(sl,"cleanAndMerge");var Ce={assignWithDepth:qt,wrapLabel:Q2,calculateTextHeight:jf,calculateTextWidth:je,calculateTextDimensions:il,cleanAndMerge:sl,detectInit:H2,detectDirective:Nf,isSubstringInArray:U2,interpolateToCurve:tl,calcLabelPosition:zf,calcCardinalityPosition:G2,calcTerminalLabelPosition:Hf,formatUrl:qf,getStylesFromArray:Yf,generateId:X2,random:V2,runFunc:j2,entityDecode:ew,insertTitle:rw,isLabelCoordinateInPath:Gf,parseFontSize:Fs,InitIDGenerator:tw},iw=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Lr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),GL=p((e,t,{counter:r=0,prefix:i,suffix:o},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${o?`_${o}`:""}`,"getEdgeId");function Wt(e){return e??null}p(Wt,"handleUndefinedAttr");function Gf(e,t){const r=Math.round(e.x),i=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return o.includes(r.toString())||o.includes(i.toString())}p(Gf,"isLabelCoordinateInPath");var al=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Xf(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(o=>new Promise(s=>{function a(){if(o.style.display="flex",o.style.flexDirection="column",i){const n=yt().fontSize?yt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=qc.fontSize]=Fs(n),h=c*l+"px";o.style.minWidth=h,o.style.maxWidth=h}else o.style.width="100%";s(o)}p(a,"setupImage"),setTimeout(()=>{o.complete&&a()}),o.addEventListener("error",a),o.addEventListener("load",a)})))}p(Xf,"configureLabelImages");const ow=Object.freeze({left:0,top:0,width:16,height:16}),cs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Vf=Object.freeze({...ow,...cs}),sw=Object.freeze({...Vf,body:"",hidden:!1}),aw=Object.freeze({width:null,height:null}),nw=Object.freeze({...aw,...cs}),lw=(e,t,r,i="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const n=o.pop(),l=o.pop(),c={provider:o.length>0?o[0]:i,prefix:l,name:n};return ca(c)?c:null}const s=o[0],a=s.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return ca(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return ca(n,r)?n:null}return null},ca=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function hw(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Uh(e,t){const r=hw(e,t);for(const i in sw)i in cs?i in e&&!(i in r)&&(r[i]=cs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function cw(e,t){const r=e.icons,i=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(r[a])return o[a]=[];if(!(a in o)){o[a]=null;const n=i[a]&&i[a].parent,l=n&&s(n);l&&(o[a]=[n].concat(l))}return o[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),o}function jh(e,t,r){const i=e.icons,o=e.aliases||Object.create(null);let s={};function a(n){s=Uh(i[n]||o[n],s)}return a(t),r.forEach(a),Uh(e,s)}function dw(e,t){if(e.icons[t])return jh(e,t,[]);const r=cw(e,[t])[t];return r?jh(e,t,r):null}const uw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Gh(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(uw);if(i===null||!i.length)return e;const o=[];let s=i.shift(),a=fw.test(s);for(;;){if(a){const n=parseFloat(s);isNaN(n)?o.push(s):o.push(Math.ceil(n*t*r)/r)}else o.push(s);if(s=i.shift(),s===void 0)return o.join("");a=!a}}function pw(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const o=e.indexOf(">",i),s=e.indexOf("</"+t);if(o===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(o+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function gw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function mw(e,t,r){const i=pw(e);return gw(i.defs,t+i.content+r)}const yw=e=>e==="unset"||e==="undefined"||e==="none";function Cw(e,t){const r={...Vf,...e},i={...nw,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],C=m.hFlip,b=m.vFlip;let k=m.rotate;C?b?k+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):b&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let T;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:T=o.height/2+o.top,y.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:T=o.width/2+o.left,y.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}k%2===1&&(o.left!==o.top&&(T=o.left,o.left=o.top,o.top=T),o.width!==o.height&&(T=o.width,o.width=o.height,o.height=T)),y.length&&(s=mw(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=o.width,c=o.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=Gh(d,l/c)):(h=a==="auto"?l:a,d=n===null?Gh(h,c/l):n==="auto"?c:n);const f={},u=(m,y)=>{yw(y)||(f[m]=y.toString())};u("width",h),u("height",d);const g=[o.left,o.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:s}}const xw=/\sid="(\S+)"/g,Xh=new Map;function bw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Xh.get(e)||0;return Xh.set(e,t+1),t?`${e}${t}`:e}function kw(e){const t=[];let r;for(;r=xw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const s=bw(o),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function ww(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Tw={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},on=new Map,Zf=new Map,Sw=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(W.debug("Registering icon pack:",t.name),"loader"in t)Zf.set(t.name,t.loader);else if("icons"in t)on.set(t.name,t.icons);else throw W.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Kf=p(async(e,t)=>{const r=lw(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let o=on.get(i);if(!o){const a=Zf.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await a(),prefix:i},on.set(i,o)}catch(n){throw W.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=dw(o,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),_w=p(async e=>{try{return await Kf(e),!0}catch{return!1}},"isIconAvailable"),ro=p(async(e,t,r)=>{let i;try{i=await Kf(e,t?.fallbackPrefix)}catch(a){W.error(a),i=Tw}const o=Cw(i,t),s=ww(kw(o.body),{...o.attributes,...r});return ke(s,Ft())},"getIconSVG");function nl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=nl();function Qf(e){Mr=e}var Ii={exec:()=>null};function Ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(o,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(te.caret,"$1"),r=r.replace(o,a),i},getRegex:()=>new RegExp(r,t)};return i}var Bw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={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:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},vw=/^(?:[ \t]*(?:\n|$))+/,Lw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,io=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Aw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ll=/(?:[*+-]|\d{1,9}[.)])/,Jf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tp=Ct(Jf).replace(/bull/g,ll).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(),Mw=Ct(Jf).replace(/bull/g,ll).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(),hl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ew=/^[^\n]+/,cl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$w=Ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ow=Ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ll).getRegex(),As="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",dl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Iw=Ct("^ {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[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",dl).replace("tag",As).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ep=Ct(hl).replace("hr",io).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",As).getRegex(),Dw=Ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ep).getRegex(),ul={blockquote:Dw,code:Lw,def:$w,fences:Fw,heading:Aw,hr:io,html:Iw,lheading:tp,list:Ow,newline:vw,paragraph:ep,table:Ii,text:Ew},Vh=Ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",io).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\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",As).getRegex(),Pw={...ul,lheading:Mw,table:Vh,paragraph:Ct(hl).replace("hr",io).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vh).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",As).getRegex()},Rw={...ul,html:Ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",dl).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:Ii,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ct(hl).replace("hr",io).replace("heading",` *#{1,6} *[^
|
|
164
|
+
]`).replace("lheading",tp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Nw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rp=/^( {2,}|\\)\n(?!\s*$)/,Ww=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ms=/[\p{P}\p{S}]/u,fl=/[\s\p{P}\p{S}]/u,ip=/[^\s\p{P}\p{S}]/u,zw=Ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,fl).getRegex(),op=/(?!~)[\p{P}\p{S}]/u,Hw=/(?!~)[\s\p{P}\p{S}]/u,Yw=/(?:[^\s\p{P}\p{S}]|~)/u,Uw=Ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Bw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,jw=Ct(sp,"u").replace(/punct/g,Ms).getRegex(),Gw=Ct(sp,"u").replace(/punct/g,op).getRegex(),ap="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xw=Ct(ap,"gu").replace(/notPunctSpace/g,ip).replace(/punctSpace/g,fl).replace(/punct/g,Ms).getRegex(),Vw=Ct(ap,"gu").replace(/notPunctSpace/g,Yw).replace(/punctSpace/g,Hw).replace(/punct/g,op).getRegex(),Zw=Ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ip).replace(/punctSpace/g,fl).replace(/punct/g,Ms).getRegex(),Kw=Ct(/\\(punct)/,"gu").replace(/punct/g,Ms).getRegex(),Qw=Ct(/^<(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(),Jw=Ct(dl).replace("(?:-->|$)","-->").getRegex(),tT=Ct("^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",Jw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,eT=Ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),np=Ct(/^!?\[(label)\]\[(ref)\]/).replace("label",ds).replace("ref",cl).getRegex(),lp=Ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",cl).getRegex(),rT=Ct("reflink|nolink(?!\\()","g").replace("reflink",np).replace("nolink",lp).getRegex(),Zh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pl={_backpedal:Ii,anyPunctuation:Kw,autolink:Qw,blockSkip:Uw,br:rp,code:qw,del:Ii,emStrongLDelim:jw,emStrongRDelimAst:Xw,emStrongRDelimUnd:Zw,escape:Nw,link:eT,nolink:lp,punctuation:zw,reflink:np,reflinkSearch:rT,tag:tT,text:Ww,url:Ii},iT={...pl,link:Ct(/^!?\[(label)\]\((.*?)\)/).replace("label",ds).getRegex(),reflink:Ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ds).getRegex()},sn={...pl,emStrongRDelimAst:Vw,emStrongLDelim:Gw,url:Ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Zh).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:Ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Zh).getRegex()},oT={...sn,br:Ct(rp).replace("{2,}","*").getRegex(),text:Ct(sn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},To={normal:ul,gfm:Pw,pedantic:Rw},mi={normal:pl,gfm:sn,breaks:oT,pedantic:iT},sT={"&":"&","<":"<",">":">",'"':""","'":"'"},Kh=e=>sT[e];function ve(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Kh)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Kh);return e}function Qh(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Jh(e,t){let r=e.replace(te.findPipe,(s,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(te.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(te.slashPipe,"|");return i}function yi(e,t,r){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function aT(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function tc(e,t,r,i,o){let s=t.href,a=t.title||null,n=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function nT(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
|
|
165
|
+
`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
|
|
166
|
+
`)}var us=class{options;rules;lexer;constructor(t){this.options=t||Mr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:yi(i,`
|
|
167
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=nT(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let o=yi(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:yi(r[0],`
|
|
168
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=yi(r[0],`
|
|
169
|
+
`).split(`
|
|
170
|
+
`),o="",s="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
171
|
+
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
172
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
|
173
|
+
${h}`:h,s=s?`${s}
|
|
174
|
+
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,i.length===0)break;let u=a.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let g=u,m=g.raw+`
|
|
175
|
+
`+i.join(`
|
|
176
|
+
`),y=this.blockquote(m);a[a.length-1]=y,o=o.substring(0,o.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if(u?.type==="list"){let g=u,m=g.raw+`
|
|
177
|
+
`+i.join(`
|
|
178
|
+
`),y=this.list(m);a[a.length-1]=y,o=o.substring(0,o.length-u.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,i=m.substring(a.at(-1).raw.length).split(`
|
|
179
|
+
`);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|
180
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
|
|
181
|
+
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(u)&&(h+=u+`
|
|
182
|
+
`,t=t.substring(u.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),T=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),B=this.rules.other.htmlBeginRegex(m);for(;t;){let v=t.split(`
|
|
183
|
+
`,1)[0],L;if(u=v,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),L=u):L=u.replace(this.rules.other.tabCharGlobal," "),T.test(u)||S.test(u)||B.test(u)||b.test(u)||k.test(u))break;if(L.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
|
|
184
|
+
`+L.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||S.test(f)||k.test(f))break;d+=`
|
|
185
|
+
`+u}!g&&!u.trim()&&(g=!0),h+=v+`
|
|
186
|
+
`,t=t.substring(v.length+1),f=L.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(C=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:C,loose:!1,text:d,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Jh(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
187
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(Jh(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
188
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=yi(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=aT(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),tc(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return tc(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,l=s,c=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(o=h.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){l+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...o[0]][0].length,f=t.slice(0,s+o.index+d+n);if(Math.min(s,n)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ge=class an{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mr,this.options.tokenizer=this.options.tokenizer||new us,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 r={other:te,block:To.normal,inline:mi.normal};this.options.pedantic?(r.block=To.pedantic,r.inline=mi.pedantic):this.options.gfm&&(r.block=To.gfm,this.options.breaks?r.inline=mi.breaks:r.inline=mi.gfm),this.tokenizer.rules=r}static get rules(){return{block:To,inline:mi}}static lex(t,r){return new an(r).lex(t)}static lexInline(t,r){return new an(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
|
|
189
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
|
|
190
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
191
|
+
`)?"":`
|
|
192
|
+
`)+o.raw,a.text+=`
|
|
193
|
+
`+o.text,this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
194
|
+
`)?"":`
|
|
195
|
+
`)+o.raw,a.text+=`
|
|
196
|
+
`+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
197
|
+
`)?"":`
|
|
198
|
+
`)+o.raw,a.text+=`
|
|
199
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
200
|
+
`)?"":`
|
|
201
|
+
`)+o.raw,a.text+=`
|
|
202
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},fs=class{options;parser;constructor(t){this.options=t||Mr}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(te.notSpaceStart)?.[0],s=t.replace(te.endingNewline,"")+`
|
|
203
|
+
`;return o?'<pre><code class="language-'+ve(o)+'">'+(i?s:ve(s,!0))+`</code></pre>
|
|
204
|
+
`:"<pre><code>"+(i?s:ve(s,!0))+`</code></pre>
|
|
205
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
206
|
+
${this.parser.parse(t)}</blockquote>
|
|
207
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
208
|
+
`}hr(t){return`<hr>
|
|
209
|
+
`}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let l=t.items[n];o+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
|
|
210
|
+
`+o+"</"+s+`>
|
|
211
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+ve(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
212
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
213
|
+
`}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
214
|
+
<thead>
|
|
215
|
+
`+r+`</thead>
|
|
216
|
+
`+o+`</table>
|
|
217
|
+
`}tablerow({text:t}){return`<tr>
|
|
218
|
+
${t}</tr>
|
|
219
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
220
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ve(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let o=this.parser.parseInline(i),s=Qh(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+ve(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=Qh(t);if(s===null)return ve(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${ve(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ve(t.text)}},gl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},me=class nn{options;renderer;textRenderer;constructor(t){this.options=t||Mr,this.options.renderer=this.options.renderer||new fs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new gl}static parse(t,r){return new nn(r).parse(t)}static parseInline(t,r){return new nn(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],l+=`
|
|
221
|
+
`+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},vi=class{options;block;constructor(t){this.options=t||Mr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ge.lex:ge.lexInline}provideParser(){return this.block?me.parse:me.parseInline}},lT=class{defaults=nl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=me;Renderer=fs;TextRenderer=gl;Lexer=ge;Tokenizer=us;Hooks=vi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new fs(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new us(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new vi;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=s[n];vi.passThroughHooks.has(a)?s[n]=h=>{if(this.defaults.async&&vi.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(s,h);return c.call(s,f)})();let d=l.call(s,h);return c.call(s,d)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,h);return f===!1&&(f=await c.apply(s,h)),f})();let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;o.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ge.lex(t,r??this.defaults)}parser(t,r){return me.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(new 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 r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?ge.lex:ge.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?me.parse:me.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?ge.lex:ge.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?me.parse:me.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
222
|
+
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+ve(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},Fr=new lT;function bt(e,t){return Fr.parse(e,t)}bt.options=bt.setOptions=function(e){return Fr.setOptions(e),bt.defaults=Fr.defaults,Qf(bt.defaults),bt};bt.getDefaults=nl;bt.defaults=Mr;bt.use=function(...e){return Fr.use(...e),bt.defaults=Fr.defaults,Qf(bt.defaults),bt};bt.walkTokens=function(e,t){return Fr.walkTokens(e,t)};bt.parseInline=Fr.parseInline;bt.Parser=me;bt.parser=me.parse;bt.Renderer=fs;bt.TextRenderer=gl;bt.Lexer=ge;bt.lexer=ge.lex;bt.Tokenizer=us;bt.Hooks=vi;bt.parse=bt;bt.options;bt.setOptions;bt.use;bt.walkTokens;bt.parseInline;me.parse;ge.lex;function hp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(o.length){var s=new RegExp(`
|
|
223
|
+
[ ]{`+Math.min.apply(Math,o)+"}","g");i=i.map(function(n){return n.replace(s,`
|
|
224
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|
225
|
+
`)&&(d=String(n).split(`
|
|
226
|
+
`).map(function(f,u){return u===0?f:""+h+f}).join(`
|
|
227
|
+
`)),a+=d+i[l+1]}),a}function cp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
228
|
+
`).replace(/\n{2,}/g,`
|
|
229
|
+
`);return hp(i)}p(cp,"preprocessMarkdown");function dp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(dp,"nonMarkdownToLines");function up(e,t={}){const r=cp(e,t),i=bt.lexer(r),o=[[]];let s=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|
230
|
+
`).forEach((h,d)=>{d!==0&&(s++,o.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&o[s].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}p(up,"markdownToLines");function fp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(fp,"nonMarkdownToHTML");function pp(e,{markdownAutoWrap:t}={}){const r=bt.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g," "):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(W.warn(`Unsupported markdown: ${o.type}`),o.raw)}return p(i,"output"),r.map(i).join("")}p(pp,"markdownToHTML");function gp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(gp,"splitTextToChars");function mp(e,t){const r=gp(t.content);return ml(e,[],r,t.type)}p(mp,"splitWordToFitWidth");function ml(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?ml(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ml,"splitWordToFitWidthRecursion");function yp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
231
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ps(e,t)}p(yp,"splitLineToFitWidth");function ps(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return ps(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=mp(t,s);r.push([n]),l.content&&e.unshift(l)}return ps(e,t,r)}p(ps,"splitLineToFitWidthRecursion");function ln(e,t){t&&e.attr("style",t)}p(ln,"applyStyle");var ec=16384;async function Cp(e,t,r,i,o=!1,s=Ft()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,ec)}px`),a.attr("height",`${Math.min(10*r,ec)}px`);const n=a.append("xhtml:div"),l=Pi(t.label)?await Qc(t.label.replace(Ki.lineBreakRegex,`
|
|
232
|
+
`),s):ke(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),ln(h,t.labelStyle),h.attr("class",`${c} ${i}`),ln(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}p(Cp,"addHtmlSpan");function Es(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}p(Es,"createTspan");function xp(e,t,r){const i=e.append("text"),o=Es(i,1,t);$s(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}p(xp,"computeWidthOfText");function hT(e,t,r){const i=e.append("text"),o=Es(i,1,t);$s(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}p(hT,"computeDimensionOfText");function bp(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=p(u=>xp(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:yp(h,d);for(const u of f){const g=Es(l,c,1.1,o);$s(g,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}p(bp,"createFormattedText");function hn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(hn,"decodeHTMLEntities");function $s(e,t){e.text(""),t.forEach((r,i)=>{const o=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?o.text(hn(r.content)):o.text(" "+hn(r.content))})}p($s,"updateTextContentAndStyles");async function kp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await _w(n)?await ro(n,void 0,{class:"label-icon"}):`<i class='${ke(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(kp,"replaceIconSubstring");var Pe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(W.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const d=a?pp(t,h):fp(t),f=await kp(Lr(d),h),u=t.replace(/\\\\/g,"\\"),g={isNode:n,label:Pi(t)?u:f,labelStyle:r.replace("fill:","color:")};return await Cp(e,g,l,o,c,h)}else{const d=Lr(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?up(d.replace("<br>","<br/>"),h):dp(d),u=bp(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(u).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(u).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(u).select("text").attr("style",m)}return i?dt(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):dt(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function da(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-o)*n+i,l[1]=(c-i)*n+(h-o)*a+o}}}function cT(e,t){return e[0]===t[0]&&e[1]===t[1]}function dT(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(o)for(const c of a)da(c,n,o);const l=(function(c,h,d){const f=[];for(const b of c){const k=[...b];cT(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const u=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let k=0;k<b.length-1;k++){const T=b[k],S=b[k+1];if(T[1]!==S[1]){const B=Math.min(T[1],S[1]);g.push({ymin:B,ymax:Math.max(T[1],S[1]),x:B===T[1]?T[0]:S[0],islope:(S[0]-T[0])/(S[1]-T[1])})}}if(g.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return u;let m=[],y=g[0].ymin,C=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>y);k++)b=k;g.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const T=m[b].edge,S=m[k].edge;u.push([[Math.round(T.x),y],[Math.round(S.x),y]])}y+=d,m.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return u})(a,s,i);if(o){for(const c of a)da(c,n,-o);(function(c,h,d){const f=[];c.forEach((u=>f.push(...u))),da(f,h,d)})(l,n,-o)}return l}function oo(e,t){var r;const i=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=o),dT(e,o,i,s||1)}let yl=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=oo(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const o of t)i.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],r));return i}};function Os(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class uT extends yl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const o=oo(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of o)Os([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}let fT=class extends yl{fillPolygons(t,r){const i=this._fillPolygons(t,r),o=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,o);return i.ops=i.ops.concat(s.ops),i}},pT=class{constructor(t){this.helper=t}fillPolygons(t,r){const i=oo(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let o=r.hachureGap;o<0&&(o=4*r.strokeWidth),o=Math.max(o,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=o/4;for(const n of t){const l=Os(n),c=l/o,h=Math.ceil(c)-1,d=l-h*o,f=(n[0][0]+n[1][0])/2-o/4,u=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=u+d+g*o,y=f-a+2*Math.random()*a,C=m-a+2*Math.random()*a,b=this.helper.ellipse(y,C,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}},gT=class{constructor(t){this.helper=t}fillPolygons(t,r){const i=oo(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,o=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const n=Os(a),l=Math.floor(n/(i+o)),c=(n+o-l*(i+o))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const g=u*(i+o),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],C=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),s}};class mT{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,o=r.zigzagOffset<0?i:r.zigzagOffset,s=oo(t,r=Object.assign({},r,{hachureGap:i+o}));return{type:"fillSketch",ops:this.zigzagLines(s,o,r)}}zigzagLines(t,r,i){const o=[];return t.forEach((s=>{const a=Os(s),n=Math.round(a/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const f=2*d*r,u=2*(d+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],C=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];o.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),o}}const oe={};class yT{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const CT=0,ua=1,rc=2,So={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 fa(e,t){return e.type===t}function Cl(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:CT,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:ua,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:rc,text:""},n})(e);let i="BOD",o=0,s=r[o];for(;!fa(s,rc);){let a=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Cl("M0,0"+e);o++,a=So[s.text],i=s.text}else fa(s,ua)?a=So[i]:(o++,a=So[s.text],i=s.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let l=o;l<o+a;l++){const c=r[l];if(!fa(c,ua))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof So[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),o+=a,s=r[o],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function wp(e){let t=0,r=0,i=0,o=0;const s=[];for(const{key:a,data:n}of e)switch(a){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,o]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,o=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=o}return s}function Tp(e){const t=[];let r="",i=0,o=0,s=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,o]=h,[s,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],o=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,o]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,o]});break;case"V":o=h[0],t.push({key:"L",data:[i,o]});break;case"S":{let d=0,f=0;r==="C"||r==="S"?(d=i+(i-n),f=o+(o-l)):(d=i,f=o),t.push({key:"C",data:[d,f,...h]}),n=h[0],l=h[1],i=h[2],o=h[3];break}case"T":{const[d,f]=h;let u=0,g=0;r==="Q"||r==="T"?(u=i+(i-n),g=o+(o-l)):(u=i,g=o);const m=i+2*(u-i)/3,y=o+2*(g-o)/3,C=d+2*(u-d)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,C,b,d,f]}),n=u,l=g,i=d,o=f;break}case"Q":{const[d,f,u,g]=h,m=i+2*(d-i)/3,y=o+2*(f-o)/3,C=u+2*(d-u)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,C,b,u,g]}),n=d,l=f,i=u,o=g;break}case"A":{const d=Math.abs(h[0]),f=Math.abs(h[1]),u=h[2],g=h[3],m=h[4],y=h[5],C=h[6];d===0||f===0?(t.push({key:"C",data:[i,o,y,C,y,C]}),i=y,o=C):(i!==y||o!==C)&&(Sp(i,o,y,C,d,f,u,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,o=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,o=a}r=c}return t}function Ci(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Sp(e,t,r,i,o,s,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let f=[],u=0,g=0,m=0,y=0;if(c)[u,g,m,y]=c;else{[e,t]=Ci(e,t,-h),[r,i]=Ci(r,i,-h);const q=(e-r)/2,$=(t-i)/2;let M=q*q/(o*o)+$*$/(s*s);M>1&&(M=Math.sqrt(M),o*=M,s*=M);const A=o*o,P=s*s,E=A*P-A*$*$-P*q*q,H=A*$*$+P*q*q,Y=(n===l?-1:1)*Math.sqrt(Math.abs(E/H));m=Y*o*$/s+(e+r)/2,y=Y*-s*q/o+(t+i)/2,u=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(g=Math.PI-g),u<0&&(u=2*Math.PI+u),g<0&&(g=2*Math.PI+g),l&&u>g&&(u-=2*Math.PI),!l&&g>u&&(g-=2*Math.PI)}let C=g-u;if(Math.abs(C)>120*Math.PI/180){const q=g,$=r,M=i;g=l&&g>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,f=Sp(r=m+o*Math.cos(g),i=y+s*Math.sin(g),$,M,o,s,a,0,l,[g,q,m,y])}C=g-u;const b=Math.cos(u),k=Math.sin(u),T=Math.cos(g),S=Math.sin(g),B=Math.tan(C/4),v=4/3*o*B,L=4/3*s*B,N=[e,t],R=[e+v*k,t-L*b],D=[r+v*S,i-L*T],U=[r,i];if(R[0]=2*N[0]-R[0],R[1]=2*N[1]-R[1],c)return[R,D,U].concat(f);{f=[R,D,U].concat(f);const q=[];for(let $=0;$<f.length;$+=3){const M=Ci(f[$][0],f[$][1],h),A=Ci(f[$+1][0],f[$+1][1],h),P=Ci(f[$+2][0],f[$+2][1],h);q.push([M[0],M[1],A[0],A[1],P[0],P[1]])}return q}}const xT={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return gs(e,t,r)},ellipse:function(e,t,r,i,o){const s=Bp(r,i,o);return cn(e,t,o,s).opset},doubleLineOps:function(e,t,r,i,o){return hr(e,t,r,i,o,!0)}};function _p(e,t,r,i,o){return{type:"path",ops:hr(e,t,r,i,o)}}function qo(e,t,r){const i=(e||[]).length;if(i>2){const o=[];for(let s=0;s<i-1;s++)o.push(...hr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&o.push(...hr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:o}}return i===2?_p(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function bT(e,t,r,i,o){return(function(s,a){return qo(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],o)}function ic(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=_o(r[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:_o(r[0],1.5*(1+.22*t.roughness),ac(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const n=_o(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:_o(a,1.5*(1+.22*t.roughness),ac(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Bp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/o;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=at(a*l,r),n+=at(n*l,r),{increment:s,rx:a,ry:n}}function cn(e,t,r,i){const[o,s]=nc(i.increment,e,t,i.rx,i.ry,1,i.increment*gs(.1,gs(.4,1,r),r),r);let a=ms(o,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=nc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ms(n,null,r);a=a.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function oc(e,t,r,i,o,s,a,n,l){const c=e,h=t;let d=Math.abs(r/2),f=Math.abs(i/2);d+=at(.01*d,l),f+=at(.01*f,l);let u=o,g=s;for(;u<0;)u+=2*Math.PI,g+=2*Math.PI;g-u>2*Math.PI&&(u=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-u)/2),C=lc(y,c,h,d,f,u,g,1,l);if(!l.disableMultiStroke){const b=lc(y,c,h,d,f,u,g,1.5,l);C.push(...b)}return a&&(n?C.push(...hr(c,h,c+d*Math.cos(u),h+f*Math.sin(u),l),...hr(c,h,c+d*Math.cos(g),h+f*Math.sin(g),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+f*Math.sin(u)]})),{type:"path",ops:C}}function sc(e,t){const r=Tp(wp(Cl(e))),i=[];let o=[0,0],s=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":s=[n[0],n[1]],o=[n[0],n[1]];break;case"L":i.push(...hr(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,d,f,u]=n;i.push(...kT(l,c,h,d,f,u,s,t)),s=[f,u];break}case"Z":i.push(...hr(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]]}return{type:"path",ops:i}}function pa(e,t){const r=[];for(const i of e)if(i.length){const o=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+at(o,t),i[0][1]+at(o,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+at(o,t),i[a][1]+at(o,t)]})}}return{type:"fillPath",ops:r}}function Wr(e,t){return(function(r,i){let o=r.fillStyle||"hachure";if(!oe[o])switch(o){case"zigzag":oe[o]||(oe[o]=new uT(i));break;case"cross-hatch":oe[o]||(oe[o]=new fT(i));break;case"dots":oe[o]||(oe[o]=new pT(i));break;case"dashed":oe[o]||(oe[o]=new gT(i));break;case"zigzag-line":oe[o]||(oe[o]=new mT(i));break;default:o="hachure",oe[o]||(oe[o]=new yl(i))}return oe[o]})(t,xT).fillPolygons(e,t)}function ac(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function vp(e){return e.randomizer||(e.randomizer=new yT(e.seed||0)),e.randomizer.next()}function gs(e,t,r,i=1){return r.roughness*i*(vp(r)*(t-e)+e)}function at(e,t,r=1){return gs(-e,e,t,r)}function hr(e,t,r,i,o,s=!1){const a=s?o.disableMultiStrokeFill:o.disableMultiStroke,n=dn(e,t,r,i,o,!0,!1);if(a)return n;const l=dn(e,t,r,i,o,!0,!0);return n.concat(l)}function dn(e,t,r,i,o,s,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=o.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,f=.2+.2*vp(o);let u=o.bowing*o.maxRandomnessOffset*(i-t)/200,g=o.bowing*o.maxRandomnessOffset*(e-r)/200;u=at(u,o,c),g=at(g,o,c);const m=[],y=()=>at(d,o,c),C=()=>at(h,o,c),b=o.preserveVertices;return a?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:at(h,o,c)),t+(b?0:at(h,o,c))]}),a?m.push({op:"bcurveTo",data:[u+e+(r-e)*f+y(),g+t+(i-t)*f+y(),u+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*f+C(),g+t+(i-t)*f+C(),u+e+2*(r-e)*f+C(),g+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),m}function _o(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let o=1;o<e.length;o++)i.push([e[o][0]+at(t,r),e[o][1]+at(t,r)]),o===e.length-1&&i.push([e[o][0]+at(t,r),e[o][1]+at(t,r)]);return ms(i,null,r)}function ms(e,t,r){const i=e.length,o=[];if(i>3){const s=[],a=1-r.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],s[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],o.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&o.push(...dn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return o}function nc(e,t,r,i,o,s,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+o*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+o*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+o*Math.sin(0)]),c.push([t+i*Math.cos(e),r+o*Math.sin(e)])}else{const h=at(.5,n)-Math.PI/2;c.push([at(s,n)+t+.9*i*Math.cos(h-e),at(s,n)+r+.9*o*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let f=h;f<d;f+=e){const u=[at(s,n)+t+i*Math.cos(f),at(s,n)+r+o*Math.sin(f)];l.push(u),c.push(u)}c.push([at(s,n)+t+i*Math.cos(h+2*Math.PI+.5*a),at(s,n)+r+o*Math.sin(h+2*Math.PI+.5*a)]),c.push([at(s,n)+t+.98*i*Math.cos(h+a),at(s,n)+r+.98*o*Math.sin(h+a)]),c.push([at(s,n)+t+.9*i*Math.cos(h+.5*a),at(s,n)+r+.9*o*Math.sin(h+.5*a)])}return[c,l]}function lc(e,t,r,i,o,s,a,n,l){const c=s+at(.1,l),h=[];h.push([at(n,l)+t+.9*i*Math.cos(c-e),at(n,l)+r+.9*o*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([at(n,l)+t+i*Math.cos(d),at(n,l)+r+o*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),ms(h,null,l)}function kT(e,t,r,i,o,s,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:at(c[0],n)),a[1]+(f?0:at(c[0],n))]}),h=f?[o,s]:[o+at(c[u],n),s+at(c[u],n)],l.push({op:"bcurveTo",data:[e+at(c[u],n),t+at(c[u],n),r+at(c[u],n),i+at(c[u],n),h[0],h[1]]});return l}function xi(e){return[...e]}function hc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(xi(e[0]),xi(e[1]),xi(e[2]),xi(e[2]));else{const o=[];o.push(e[0],e[0]);for(let n=1;n<e.length;n++)o.push(e[n]),n===e.length-1&&o.push(e[n]);const s=[],a=1-t;i.push(xi(o[0]));for(let n=1;n+2<o.length;n++){const l=o[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*o[n+1][0]-a*o[n-1][0])/6,l[1]+(a*o[n+1][1]-a*o[n-1][1])/6],s[2]=[o[n+1][0]+(a*o[n][0]-a*o[n+2][0])/6,o[n+1][1]+(a*o[n][1]-a*o[n+2][1])/6],s[3]=[o[n+1][0],o[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function Wo(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function wT(e,t,r){const i=Wo(t,r);if(i===0)return Wo(e,t);let o=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return o=Math.max(0,Math.min(1,o)),Wo(e,Cr(t,r,o))}function Cr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function un(e,t,r,i){const o=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],f=n[l+3];let u=3*h[0]-2*c[0]-f[0];u*=u;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*d[0]-2*f[0]-c[0];m*=m;let y=3*d[1]-2*f[1]-c[1];return y*=y,u<m&&(u=m),g<y&&(g=y),u+g})(e,t)<r){const n=e[t+0];o.length?(s=o[o.length-1],a=n,Math.sqrt(Wo(s,a))>1&&o.push(n)):o.push(n),o.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],f=Cr(l,c,.5),u=Cr(c,h,.5),g=Cr(h,d,.5),m=Cr(f,u,.5),y=Cr(u,g,.5),C=Cr(m,y,.5);un([l,f,m,C],0,r,o),un([C,y,g,d],0,r,o)}var s,a;return o}function TT(e,t){return ys(e,0,e.length,t)}function ys(e,t,r,i,o){const s=o||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=wT(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(ys(e,t,c+1,i,s),ys(e,c,r,i,s)):(s.length||s.push(a),s.push(n)),s}function ga(e,t=.15,r){const i=[],o=(e.length-1)/3;for(let s=0;s<o;s++)un(e,3*s,t,i);return r&&r>0?ys(i,0,i.length,r):i}const he="none";class Cs{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,o,s){const a=this._o(s);return this._d("line",[_p(t,r,i,o,a)],a)}rectangle(t,r,i,o,s){const a=this._o(s),n=[],l=bT(t,r,i,o,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+o],[t,r+o]];a.fillStyle==="solid"?n.push(pa([c],a)):n.push(Wr([c],a))}return a.stroke!==he&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,o,s){const a=this._o(s),n=[],l=Bp(i,o,a),c=cn(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=cn(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(Wr([c.estimatedPoints],a));return a.stroke!==he&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,o){const s=this.ellipse(t,r,i,i,o);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[qo(t,!1,i)],i)}arc(t,r,i,o,s,a,n=!1,l){const c=this._o(l),h=[],d=oc(t,r,i,o,s,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const u=oc(t,r,i,o,s,a,!0,!1,f);u.type="fillPath",h.push(u)}else h.push((function(f,u,g,m,y,C,b){const k=f,T=u;let S=Math.abs(g/2),B=Math.abs(m/2);S+=at(.01*S,b),B+=at(.01*B,b);let v=y,L=C;for(;v<0;)v+=2*Math.PI,L+=2*Math.PI;L-v>2*Math.PI&&(v=0,L=2*Math.PI);const N=(L-v)/b.curveStepCount,R=[];for(let D=v;D<=L;D+=N)R.push([k+S*Math.cos(D),T+B*Math.sin(D)]);return R.push([k+S*Math.cos(L),T+B*Math.sin(L)]),R.push([k,T]),Wr([R],b)})(t,r,i,o,s,a,c));return c.stroke!==he&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),o=[],s=ic(t,i);if(i.fill&&i.fill!==he)if(i.fillStyle==="solid"){const a=ic(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...ga(hc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...ga(hc(c),10,(1+i.roughness)/2))}a.length&&o.push(Wr([a],i))}return i.stroke!==he&&o.push(s),this._d("curve",o,i)}polygon(t,r){const i=this._o(r),o=[],s=qo(t,!0,i);return i.fill&&(i.fillStyle==="solid"?o.push(pa([t],i)):o.push(Wr([t],i))),i.stroke!==he&&o.push(s),this._d("polygon",o,i)}path(t,r){const i=this._o(r),o=[];if(!t)return this._d("path",o,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==he,a=i.stroke!==he,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,f){const u=Tp(wp(Cl(h))),g=[];let m=[],y=[0,0],C=[];const b=()=>{C.length>=4&&m.push(...ga(C,d)),C=[]},k=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:S,data:B}of u)switch(S){case"M":k(),y=[B[0],B[1]],m.push(y);break;case"L":b(),m.push([B[0],B[1]]);break;case"C":if(!C.length){const v=m.length?m[m.length-1]:y;C.push([v[0],v[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return g;const T=[];for(const S of g){const B=TT(S,f);B.length&&T.push(B)}return T})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=sc(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=sc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else o.push(pa(l,i));else o.push(Wr(l,i));return a&&(n?l.forEach((h=>{o.push(qo(h,!1,i))})):o.push(c)),this._d("path",o,i)}opsToPath(t,r){let i="";for(const o of t.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,o=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:he};break;case"fillPath":a={d:this.opsToPath(s),stroke:he,strokeWidth:0,fill:i.fill||he};break;case"fillSketch":a=this.fillSketch(s,i)}a&&o.push(a)}return o}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||he,strokeWidth:i,fill:he}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class ST{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Cs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":o.save(),o.strokeStyle=i.stroke==="none"?"transparent":i.stroke,o.lineWidth=i.strokeWidth,i.strokeLineDash&&o.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(o.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(o,a,s),o.restore();break;case"fillPath":{o.save(),o.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,a,s,n),o.restore();break}case"fillSketch":this.fillSketch(o,a,i)}}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=o,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,o="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a),a}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a),a}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a),a}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Bo="http://www.w3.org/2000/svg";class _T{constructor(t,r){this.svg=t,this.gen=new Cs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,s=o.createElementNS(Bo,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=o.createElementNS(Bo,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=o.createElementNS(Bo,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(o,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const s=t.createElementNS(Bo,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",o+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a)}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a)}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a)}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var V={canvas:(e,t)=>new ST(e,t),svg:(e,t)=>new _T(e,t),generator:e=>new Cs(e),newSeed:()=>Cs.newSeed()},st=p(async(e,t,r)=>{let i;const o=t.useHtmlLabels||Ie(yt()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",Wt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Pe(a,ke(Lr(n),yt()),{useHtmlLabels:o,width:t.width||yt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},yt());let d=h.getBBox();const f=(t?.padding??0)/2;if(o){const u=h.children[0],g=dt(h);await Xf(u,n),d=u.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return o?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:f,label:a}},"labelHelper"),ma=p(async(e,t,r)=>{const i=r.useHtmlLabels??ee(yt()),o=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Pe(o,ke(Lr(t),yt()),{useHtmlLabels:i,width:r.width||yt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=s.getBBox();const n=r.padding/2;if(ee(yt())){const l=s.children[0],c=dt(s);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}return i?o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):o.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:o}},"insertLabel"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(pt,"createPathFromPoints");function cr(e,t,r,i,o,s){const a=[],l=r-e,c=i-t,h=l/s,d=2*Math.PI/h,f=t+c/2;for(let u=0;u<=50;u++){const g=u/50,m=e+g*l,y=f+o*Math.sin(d*(m-e));a.push({x:m,y})}return a}p(cr,"generateFullSineWavePoints");function ji(e,t,r,i,o,s){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(ji,"generateCirclePoints");function fn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const o=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),a=p((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(o){const l={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(s){const l={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(fn,"mergePaths");var BT=p((e,t)=>{var r=e.x,i=e.y,o=t.x-r,s=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(s)*a>Math.abs(o)*n?(s<0&&(n=-n),l=s===0?0:n*o/s,c=n):(o<0&&(a=-a),l=a,c=o===0?0:a*s/o),{x:r+l,y:i+c}},"intersectRect"),Er=BT,vT=p(async(e,t,r,i=!1,o=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=yt(),n=ee(a);return await Pe(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},a)},"createLabel"),ir=vT,dr=p((e,t,r,i,o)=>["M",e+o,t,"H",e+r-o,"A",o,o,0,0,1,e+r,t+o,"V",t+i-o,"A",o,o,0,0,1,e+r-o,t+i,"H",e+o,"A",o,o,0,0,1,e,t+i-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),LT=p(async(e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=K(t),f=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),u=Ie(r.flowchart.htmlLabels),g=t.direction==="LR",m=f.insert("g").attr("class","cluster-label swimlane-label"),y=await Pe(m,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let C=y.getBBox();if(u){const q=y.children[0],$=dt(y);C=q.getBoundingClientRect(),$.attr("width",C.width),$.attr("height",C.height)}const b=t.padding??0,k=t.width<=C.width+b?C.width+b:t.width;t.width<=C.width+b?t.diff=(k-t.width)/2-b:t.diff=-b;const T=t.height,S=t.y-T/2,B=t.y+T/2,v=t.x-k/2,L=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+T/3,N=g?4:0,R=C.height+2*N;let D,U;if(g){const q=Math.max(R,C.height+2*N),$=v+q,M=Math.max(0,k-q);if(t.look==="handDrawn"){const E=V.svg(f),H=X(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),Y=X(t,{roughness:.7,fill:"none",stroke:n,seed:o}),ot=E.rectangle(v,S,q,T,H);D=f.insert(()=>ot,":first-child");const Z=E.rectangle($,S,M,T,Y);U=f.insert(()=>Z,":first-child"),D.select("path:nth-child(2)").attr("style",h.join(";")),D.select("path").attr("style",d.join(";").replace("fill","stroke"))}else D=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",c).attr("x",v).attr("y",S).attr("width",q).attr("height",T).attr("fill",s).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",$).attr("y",S).attr("width",M).attr("height",T).attr("fill","none").attr("stroke",n);const A=v+q/2,P=t.y;m.attr("transform",`translate(${A}, ${P}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const q=Math.max(0,L-S),$=Math.min(R,q),M=S+$,A=Math.max(0,B-M),P=t.x-k/2;if(t.look==="handDrawn"){const Y=V.svg(f),ot=X(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),Z=X(t,{roughness:.7,fill:"none",stroke:n,seed:o}),ct=Y.rectangle(P,S,k,$,ot);D=f.insert(()=>ct,":first-child");const ut=Y.rectangle(P,M,k,A,Z);U=f.insert(()=>ut,":first-child"),D.select("path:nth-child(2)").attr("style",h.join(";")),D.select("path").attr("style",d.join(";").replace("fill","stroke"))}else D=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",c).attr("x",P).attr("y",S).attr("width",k).attr("height",$).attr("fill",s).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",P).attr("y",M).attr("width",k).attr("height",A).attr("fill","none").attr("stroke",n);const E=t.x-C.width/2,H=S+($-C.height)/2;m.attr("transform",`translate(${E}, ${H})`)}if(W.trace("Swimlane data ",t,JSON.stringify(t)),l){const q=m.select("span");q&&q.attr("style",l)}return t.offsetX=0,t.width=k,t.height=T,t.offsetY=C.height-b/2,t.intersect=function(q){return Er(t,q)},{cluster:f,labelBBox:C}},"swimlane"),Lp=p(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=K(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ee(r),u=d.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await Pe(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await ir(u,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(ee(r)){const v=g.children[0],L=dt(g);m=v.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const v=V.svg(d),L=X(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:o}),N=v.path(dr(b,k,y,C,0),L);T=d.insert(()=>(W.debug("Rough node insert CXC",N),N),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=al(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const v=u.select("span");v&&v.attr("style",n)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return Er(t,v)},{cluster:d,labelBBox:m}},"rect"),FT=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),o=0*t.padding,s=o/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+o).attr("height",t.height+o).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return Er(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),AT=p(async(e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const u=await ir(d,t.label,t.labelStyle,void 0,!0);let g=u.getBBox();if(ee(r)){const N=u.children[0],R=dt(u);g=N.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const m=0*t.padding,y=m/2,C=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,T=t.x-C/2,S=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+g.height+2;let v;if(t.look==="handDrawn"){const N=t.cssClasses.includes("statediagram-cluster-alt"),R=V.svg(c),D=t.rx||t.ry?R.path(dr(T,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):R.rectangle(T,S,C,b,{seed:o});v=c.insert(()=>D,":first-child");const U=R.rectangle(T,B,C,k,{fill:N?s:a,fillStyle:N?"hachure":"solid",stroke:l,seed:o});v=c.insert(()=>D,":first-child"),f=c.insert(()=>U)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",T).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",T).attr("y",B).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(ee(r)?0:3)})`);const L=v.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(N){return Er(t,N)},{cluster:c,labelBBox:g}},"roundedWithTitle"),MT=p(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=K(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ee(r),u=d.insert("g").attr("class","cluster-label "),g=await Pe(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(ee(r)){const v=g.children[0],L=dt(g);m=v.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const v=V.svg(d),L=X(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:o}),N=v.path(dr(b,k,y,C,t.rx),L);T=d.insert(()=>(W.debug("Rough node insert CXC",N),N),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=al(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const v=u.select("span");v&&v.attr("style",n)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return Er(t,v)},{cluster:d,labelBBox:m}},"kanbanSection"),ET=p((e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,f=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=V.svg(a).rectangle(d,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:o});u=a.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const g=u.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Er(t,m)},{cluster:a,labelBBox:{}}},"divider"),$T=Lp,OT={rect:Lp,squareRect:$T,roundedWithTitle:AT,noteGroup:FT,divider:ET,kanbanSection:MT,swimlane:LT},Fp=new Map,IT=p(async(e,t)=>{const r=t.shape||"rect",i=await OT[r](e,t);return Fp.set(t.id,i),i},"insertCluster"),iF=p(()=>{Fp=new Map},"clear");function Ap(e,t){return e.intersect(t)}p(Ap,"intersectNode");var DT=Ap;function Mp(e,t,r,i){var o=e.x,s=e.y,a=o-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<o&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:o+c,y:s+h}}p(Mp,"intersectEllipse");var Ep=Mp;function $p(e,t,r){return Ep(e,t,t,r)}p($p,"intersectCircle");var PT=$p;function Op(e,t,r,i){{const o=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,n=o*r.x+s*r.y+a,l=o*i.x+s*i.y+a,c=1e-6;if(n!==0&&l!==0&&pn(n,l))return;const h=i.y-r.y,d=r.x-i.x,f=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+f,g=h*t.x+d*t.y+f;if(Math.abs(u)<c&&Math.abs(g)<c&&pn(u,g))return;const m=o*d-h*s;if(m===0)return;const y=Math.abs(m/2);let C=s*f-d*a;const b=C<0?(C-y)/m:(C+y)/m;C=h*a-o*f;const k=C<0?(C-y)/m:(C+y)/m;return{x:b,y:k}}}p(Op,"intersectLine");function pn(e,t){return e*t>0}p(pn,"sameSign");var RT=Op;function Ip(e,t,r){let i=e.x,o=e.y,s=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=o-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],f=t[h<t.length-1?h+1:0],u=RT(e,r,{x:l+d.x,y:c+d.y},{x:l+f.x,y:c+f.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(h,d){let f=h.x-r.x,u=h.y-r.y,g=Math.sqrt(f*f+u*u),m=d.x-r.x,y=d.y-r.y,C=Math.sqrt(m*m+y*y);return g<C?-1:g===C?0:1}),s[0]):e}p(Ip,"intersectPolygon");var NT=Ip,G={node:DT,circle:PT,ellipse:Ep,polygon:NT,rect:Er};function Dp(e,t){const{labelStyles:r}=K(t);t.labelStyle=r;const i=it(t);let o=i;i||(o="anchor");const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=V.svg(s),c=X(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=s.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Wt(n)),Q(t,d),t.intersect=function(f){return W.info("Circle intersect",t,a,f),G.circle(t,a,f)},s}p(Dp,"anchor");function gn(e,t,r,i,o,s,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,f=(i-t)/2,u=d/o,g=f/s,m=Math.sqrt(u**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),C=l+y*s*Math.sin(h)*(a?-1:1),b=c-y*o*Math.cos(h)*(a?-1:1),k=Math.atan2((t-b)/s,(e-C)/o);let S=Math.atan2((i-b)/s,(r-C)/o)-k;a&&S<0&&(S+=2*Math.PI),!a&&S>0&&(S-=2*Math.PI);const B=[];for(let v=0;v<20;v++){const L=v/19,N=k+L*S,R=C+o*Math.cos(N),D=b+s*Math.sin(N);B.push({x:R,y:D})}return B}p(gn,"generateArcPoints");function Pp(e,t,r){const[i,o]=[t,r].sort((s,a)=>a-s);return o*(1-Math.sqrt(1-(e/i/2)**2))}p(Pp,"calculateArcSagitta");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=p(N=>N+a,"calcTotalHeight"),l=p(N=>{const R=N/2;return[R/(2.5+N/50),R]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await st(e,t,it(t)),d=n(t?.height?t?.height:h.height),[f,u]=l(d),g=Pp(d,f,u),y=(t?.width?t?.width:h.width)+s*2+g-g,C=d,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...gn(-y/2,-C/2,-y/2,C/2,f,u,!1),{x:y/2,y:C/2},...gn(y/2,C/2,y/2,-C/2,f,u,!0)],T=V.svg(c),S=X(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=pt(k),v=T.path(B,S),L=c.insert(()=>v,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${f/2}, 0)`),Q(t,L),t.intersect=function(N){return G.polygon(t,k,N)},c}p(Rp,"bowTieRect");function Xe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Xe,"insertPolygonShape");var vo=12;async function Np(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?28:o,a=t.look==="neo"?24:o,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.width??l.width)+(t.look==="neo"?s*2:s+vo),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,f=c,u=-h,g=0,m=[{x:d+vo,y:u},{x:f,y:u},{x:f,y:g},{x:d,y:g},{x:d,y:u+vo},{x:d+vo,y:u}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=V.svg(n),k=X(t,{}),T=pt(m),S=b.path(T,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&y.attr("style",C)}else y=Xe(n,c,h,m);return i&&y.attr("style",i),Q(t,y),t.intersect=function(b){return G.polygon(t,m,b)},n}p(Np,"card");function qp(e,t){const{nodeStyles:r}=K(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=V.svg(i),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=pt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return G.polygon(t,a,f)},i}p(qp,"choice");async function xl(e,t,r){const{labelStyles:i,nodeStyles:o}=K(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:n}=await st(e,t,it(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=V.svg(s),g=X(t,{}),m=u.circle(0,0,h*2,g);d=s.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Wt(f))}else d=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return Q(t,d),t.calcIntersect=function(u,g){const m=u.width/2;return G.circle(u,m,g)},t.intersect=function(u){return W.info("Circle intersect",t,h,u),G.circle(t,h,u)},s}p(xl,"circle");function Wp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,o={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
|
|
233
|
+
M ${o.x},${o.y} L ${a.x},${a.y}`}p(Wp,"createLine");function zp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=V.svg(o),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Wp(s),d=n.path(h,l),f=o.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Q(t,f),t.intersect=function(u){return W.info("crossedCircle intersect",t,{radius:s,point:u}),G.circle(t,s,u)},o}p(zp,"crossedCircle");function We(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(We,"generateCirclePoints");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...We(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...We(c/2+d*2,-d,d,20,-180,-270),...We(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...We(c/2,h/2,d,20,0,90)],g=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...We(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...We(c/2+c*.1,-d,d,20,-180,-270),...We(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...We(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=V.svg(o),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(u).replace("Z",""),k=m.path(b,y),T=pt(g),S=m.path(T,{...y}),B=o.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Q(t,B),t.intersect=function(v){return G.polygon(t,g,v)},o}p(Hp,"curlyBraceLeft");function ze(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:u,y:g})}return a}p(ze,"generateCirclePoints");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...ze(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ze(c/2+d*2,-d,d,20,-180,-270),...ze(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ze(c/2,h/2,d,20,0,90)],g=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...ze(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ze(c/2+d*2,-d,d,20,-180,-270),...ze(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ze(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=V.svg(o),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(u).replace("Z",""),k=m.path(b,y),T=pt(g),S=m.path(T,{...y}),B=o.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Q(t,B),t.intersect=function(v){return G.polygon(t,g,v)},o}p(Yp,"curlyBraceRight");function Ht(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(Ht,"generateCirclePoints");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Ht(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ht(c/2+d*2,-d,d,20,-180,-270),...Ht(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ht(c/2,h/2,d,20,0,90)],g=[...Ht(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ht(-c/2-d/2,-d,d,20,0,90),...Ht(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ht(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ht(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ht(c/2+d*2,-d,d,20,-180,-270),...Ht(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ht(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Ht(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ht(-c/2-d/2,-d,d,20,0,90),...Ht(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ht(-c/2+d+d/2,h/2,d,30,-180,-270)],y=V.svg(o),C=X(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(u).replace("Z",""),T=y.path(k,C),B=pt(g).replace("Z",""),v=y.path(B,C),L=pt(m),N=y.path(L,{...C}),R=o.insert("g",":first-child");return R.insert(()=>N,":first-child").attr("stroke-opacity",0),R.insert(()=>T,":first-child"),R.insert(()=>v,":first-child"),R.attr("class","text"),f&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Q(t,R),t.intersect=function(D){return G.polygon(t,m,D)},o}p(Up,"curlyBraces");async function jp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=20,l=5,{shapeSvg:c,bbox:h}=await st(e,t,it(t)),d=Math.max(n,(h.width+s*2)*1.25,t?.width??0),f=Math.max(l,h.height+a*2,t?.height??0),u=f/2,{cssStyles:g}=t,m=V.svg(c),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=d,b=f,k=C-u,T=b/4,S=[{x:k,y:0},{x:T,y:0},{x:0,y:b/2},{x:T,y:b},{x:k,y:b},...ji(-k,-b/2,u,50,270,90)],B=pt(S),v=m.path(B,y),L=c.insert(()=>v,":first-child");return L.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-d/2}, ${-f/2})`),Q(t,L),t.intersect=function(N){return G.polygon(t,S,N)},c}p(jp,"curvedTrapezoid");var qT=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),WT=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),zT=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),cc=8,dc=8;async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?24:o,a=t.look==="neo"?24:o;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-a,t.width<dc&&(t.width=dc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-s-b*3,t.height<cc&&(t.height=cc)}const{shapeSvg:n,bbox:l,label:c}=await st(e,t,it(t)),h=(t.width?t.width:l.width)+a,d=h/2,f=d/(2.5+h/50),u=(t.height?t.height:l.height)+s+f;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=V.svg(n),C=WT(0,0,h,u,d,f),b=zT(0,f,h,u,d,f),k=X(t,{}),T=y.path(C,k),S=y.path(b,X(t,{fill:"none"}));g=n.insert(()=>S,":first-child"),g=n.insert(()=>T,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const y=qT(0,0,h,u,d,f);g=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Wt(m)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),Q(t,g),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const C=G.rect(t,y),b=C.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=f-k,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}p(Gp,"cylinder");async function ni(e,t,r){const{labelStyles:i,nodeStyles:o}=K(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await st(e,t,it(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:f,ry:u}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,u=r.ry),t.look==="handDrawn"){const m=V.svg(s),y=X(t,{}),C=f||u?m.path(dr(c,h,n,l,f||0),y):m.rectangle(c,h,n,l,y);d=s.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",Wt(g))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",Wt(f)).attr("ry",Wt(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return Q(t,d),t.calcIntersect=function(m,y){return G.rect(m,y)},t.intersect=function(m){return G.rect(t,m)},s}p(ni,"drawRect");async function Xp(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:s,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:o??s??0},c=await ni(e,t,l);if(t.look==="handDrawn"){const u=V.svg(c),g=X(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return c;return c.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,g),".basic.label-container g.label"),c.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,g),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return d>0&&f>0&&h.attr("stroke-dasharray",`${d} ${f}`),c}p(Xp,"datastore");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await st(e,t,it(t)),c=n.width+o,h=n.height+s,d=h*.2,f=-c/2,u=-h/2-d/2,{cssStyles:g}=t,m=V.svg(a),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:f,y:u+d},{x:-f,y:u+d},{x:-f,y:-u},{x:f,y:-u},{x:f,y:u},{x:-f,y:u},{x:-f,y:u+d}],b=m.polygon(C.map(T=>[T.x,T.y]),y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),Q(t,k),t.intersect=function(T){return G.rect(t,T)},a}p(Vp,"dividedRectangle");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=K(t),o=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-o;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=V.svg(n),g=X(t,{roughness:.2,strokeWidth:2.5}),m=X(t,{roughness:.2,strokeWidth:1.5}),y=u.circle(0,0,c*2,g),C=u.circle(0,0,h*2,m);d=n.insert("g",":first-child"),d.attr("class",Wt(t.cssClasses)).attr("style",Wt(f)),d.node()?.appendChild(y),d.node()?.appendChild(C)}else{d=n.insert("g",":first-child");const u=d.insert("circle",":first-child"),g=d.insert("circle");d.attr("class","basic label-container").attr("style",i),u.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Q(t,d),t.intersect=function(u){return W.info("DoubleCircle intersect",t,c,u),G.circle(t,c,u)},n}p(Zp,"doublecircle");function Kp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=K(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=V.svg(s),{nodeBorder:c}=r,h=X(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),f=s.insert(()=>d,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),Q(t,f),t.intersect=function(u){return W.info("filledCircle intersect",t,{radius:a,point:u}),G.circle(t,a,u)},s}p(Kp,"filledCircle");var uc=10,fc=10;async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=t?.height??0,t.height<uc&&(t.height=uc),t.width=(t?.width??0)-s-s/2,t.width<fc&&(t.width=fc));const{shapeSvg:a,bbox:n,label:l}=await st(e,t,it(t)),c=(t?.width?t?.width:n.width)+(s??0),h=t?.height?t?.height:c+n.height,d=h,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,g=V.svg(a),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=pt(f),C=g.path(y,m),b=a.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,Q(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return W.info("Triangle intersect",t,f,k),G.polygon(t,f,k)},a}p(Qp,"flippedTriangle");function Jp(e,t,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:s}=K(t);t.label="";const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,f=V.svg(a),u=X(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const g=f.rectangle(h,d,l,c,u),m=a.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),Q(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return G.rect(t,C)},a}p(Jp,"forkJoin");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=15,s=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<s&&(t.height=s),t.width=(t?.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:l,bbox:c}=await st(e,t,it(t)),h=(t?.width?t?.width:Math.max(o,c.width))+a*2,d=(t?.height?t?.height:Math.max(s,c.height))+n*2,f=d/2,{cssStyles:u}=t,g=V.svg(l),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...ji(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],C=pt(y),b=g.path(C,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Q(t,k),t.intersect=function(T){return W.info("Pill intersect",t,{radius:f,point:T}),G.polygon(t,y,T)},l}p(tg,"halfRoundedRectangle");var HT=p((e,t,r,i,o)=>[`M${e+o},${t}`,`L${e+r-o},${t}`,`L${e+r},${t-i/2}`,`L${e+r-o},${t-i}`,`L${e+o},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=K(t),o=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,n=32,l=t.look==="neo"?a:s,c=t.look==="neo"?n:s;if(t.width||t.height){const k=(t.height??0)/o;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await st(e,t,it(t)),f=(t?.height?t?.height:d.height)+l,u=f/o,g=(t?.width?t?.width:d.width)+2*u+c,m=[{x:u,y:0},{x:g-u,y:0},{x:g,y:-f/2},{x:g-u,y:-f},{x:u,y:-f},{x:0,y:-f/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=V.svg(h),k=X(t,{}),T=HT(0,0,g,f,u),S=b.path(T,k);y=h.insert(()=>S,":first-child").attr("transform",`translate(${-g/2}, ${f/2})`),C&&y.attr("style",C)}else y=Xe(h,g,f,m);return i&&y.attr("style",i),t.width=g,t.height=f,Q(t,y),t.intersect=function(b){return G.polygon(t,m,b)},h}p(eg,"hexagon");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const{shapeSvg:o}=await st(e,t,it(t)),s=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=V.svg(o),c=X(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],d=pt(h),f=l.path(d,c),u=o.insert(()=>f,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-s/2}, ${-a/2})`),Q(t,u),t.intersect=function(g){return W.info("Pill intersect",t,{points:h}),G.polygon(t,h,g)},o}p(rg,"hourglass");async function ig(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=K(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await st(e,t,"icon-shape default"),f=t.pos==="t",u=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=ai(t),C=-g/2,b=-u/2,k=t.label?8:0,T=V.svg(c),S=X(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=T.rectangle(C,b,g,u,S),v=Math.max(g,h.width),L=u+h.height+k,N=T.rectangle(-v/2,-L/2,v,L,{...S,fill:"transparent",stroke:"none"}),R=c.insert(()=>B,":first-child"),D=c.insert(()=>N);if(t.icon){const U=c.append("g");U.html(`<g>${await ro(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const q=U.node().getBBox(),$=q.width,M=q.height,A=q.x,P=q.y;U.attr("transform",`translate(${-$/2-A},${f?h.height/2+k/2-M/2-P:-h.height/2-k/2-M/2-P})`),U.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-L/2:L/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),Q(t,D),t.intersect=function(U){if(W.info("iconSquare intersect",t,U),!t.label)return G.rect(t,U);const q=t.x??0,$=t.y??0,M=t.height??0;let A=[];return f?A=[{x:q-h.width/2,y:$-M/2},{x:q+h.width/2,y:$-M/2},{x:q+h.width/2,y:$-M/2+h.height+k},{x:q+g/2,y:$-M/2+h.height+k},{x:q+g/2,y:$+M/2},{x:q-g/2,y:$+M/2},{x:q-g/2,y:$-M/2+h.height+k},{x:q-h.width/2,y:$-M/2+h.height+k}]:A=[{x:q-g/2,y:$-M/2},{x:q+g/2,y:$-M/2},{x:q+g/2,y:$-M/2+u},{x:q+h.width/2,y:$-M/2+u},{x:q+h.width/2/2,y:$+M/2},{x:q-h.width/2,y:$+M/2},{x:q-h.width/2,y:$-M/2+u},{x:q-g/2,y:$-M/2+u}],G.polygon(t,A,U)},c}p(ig,"icon");async function og(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=K(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await st(e,t,"icon-shape default"),f=20,u=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:C}=ai(t),b=V.svg(c),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=C.get("fill");k.stroke=T??y;const S=c.append("g");t.icon&&S.html(`<g>${await ro(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=S.node().getBBox(),v=B.width,L=B.height,N=B.x,R=B.y,D=Math.max(v,L)*Math.SQRT2+f*2,U=b.circle(0,0,D,k),q=Math.max(D,h.width),$=D+h.height+u,M=b.rectangle(-q/2,-$/2,q,$,{...k,fill:"transparent",stroke:"none"}),A=c.insert(()=>U,":first-child"),P=c.insert(()=>M);return S.attr("transform",`translate(${-v/2-N},${g?h.height/2+u/2-L/2-R:-h.height/2-u/2-L/2-R})`),S.attr("style",`color: ${C.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-$/2:$/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+u/2:-h.height/2-u/2})`),Q(t,P),t.intersect=function(E){return W.info("iconSquare intersect",t,E),G.rect(t,E)},c}p(og,"iconCircle");async function sg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=K(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await st(e,t,"icon-shape default"),u=t.pos==="t",g=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ai(t),k=-m/2,T=-g/2,S=t.label?8:0,B=V.svg(c),v=X(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=b.get("fill");v.stroke=L??C;const N=B.path(dr(k,T,m,g,5),v),R=Math.max(m,h.width),D=g+h.height+S,U=B.rectangle(-R/2,-D/2,R,D,{...v,fill:"transparent",stroke:"none"}),q=c.insert(()=>N,":first-child").attr("class","icon-shape2"),$=c.insert(()=>U);if(t.icon){const M=c.append("g");M.html(`<g>${await ro(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=M.node().getBBox(),P=A.width,E=A.height,H=A.x,Y=A.y;M.attr("transform",`translate(${-P/2-H},${u?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-D/2:D/2-h.height})`),q.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),Q(t,$),t.intersect=function(M){if(W.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const A=t.x??0,P=t.y??0,E=t.height??0;let H=[];return u?H=[{x:A-h.width/2,y:P-E/2},{x:A+h.width/2,y:P-E/2},{x:A+h.width/2,y:P-E/2+h.height+S},{x:A+m/2,y:P-E/2+h.height+S},{x:A+m/2,y:P+E/2},{x:A-m/2,y:P+E/2},{x:A-m/2,y:P-E/2+h.height+S},{x:A-h.width/2,y:P-E/2+h.height+S}]:H=[{x:A-m/2,y:P-E/2},{x:A+m/2,y:P-E/2},{x:A+m/2,y:P-E/2+g},{x:A+h.width/2,y:P-E/2+g},{x:A+h.width/2/2,y:P+E/2},{x:A-h.width/2,y:P+E/2},{x:A-h.width/2,y:P-E/2+g},{x:A-m/2,y:P-E/2+g}],G.polygon(t,H,M)},c}p(sg,"iconRounded");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=K(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await st(e,t,"icon-shape default"),u=t.pos==="t",g=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ai(t),k=-m/2,T=-g/2,S=t.label?8:0,B=V.svg(c),v=X(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=b.get("fill");v.stroke=L??C;const N=B.path(dr(k,T,m,g,.1),v),R=Math.max(m,h.width),D=g+h.height+S,U=B.rectangle(-R/2,-D/2,R,D,{...v,fill:"transparent",stroke:"none"}),q=c.insert(()=>N,":first-child"),$=c.insert(()=>U);if(t.icon){const M=c.append("g");M.html(`<g>${await ro(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=M.node().getBBox(),P=A.width,E=A.height,H=A.x,Y=A.y;M.attr("transform",`translate(${-P/2-H},${u?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-D/2:D/2-h.height})`),q.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),Q(t,$),t.intersect=function(M){if(W.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const A=t.x??0,P=t.y??0,E=t.height??0;let H=[];return u?H=[{x:A-h.width/2,y:P-E/2},{x:A+h.width/2,y:P-E/2},{x:A+h.width/2,y:P-E/2+h.height+S},{x:A+m/2,y:P-E/2+h.height+S},{x:A+m/2,y:P+E/2},{x:A-m/2,y:P+E/2},{x:A-m/2,y:P-E/2+h.height+S},{x:A-h.width/2,y:P-E/2+h.height+S}]:H=[{x:A-m/2,y:P-E/2},{x:A+m/2,y:P-E/2},{x:A+m/2,y:P-E/2+g},{x:A+h.width/2,y:P-E/2+g},{x:A+h.width/2/2,y:P+E/2},{x:A-h.width/2,y:P+E/2},{x:A-h.width/2,y:P-E/2+g},{x:A-m/2,y:P-E/2+g}],G.polygon(t,H,M)},c}p(ag,"iconSquare");async function ng(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/s;const{labelStyles:a}=K(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??o),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:f,label:u}=await st(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,C=t.label?8:0,b=V.svg(d),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=b.rectangle(m,y,c,h,k),S=Math.max(c,f.width),B=h+f.height+C,v=b.rectangle(-S/2,-B/2,S,B,{...k,fill:"none",stroke:"none"}),L=d.insert(()=>T,":first-child"),N=d.insert(()=>v);if(t.img){const R=d.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${g?B/2-h:-B/2})`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-C/2:h/2-f.height/2+C/2})`),L.attr("transform",`translate(0,${g?f.height/2+C/2:-f.height/2-C/2})`),Q(t,N),t.intersect=function(R){if(W.info("iconSquare intersect",t,R),!t.label)return G.rect(t,R);const D=t.x??0,U=t.y??0,q=t.height??0;let $=[];return g?$=[{x:D-f.width/2,y:U-q/2},{x:D+f.width/2,y:U-q/2},{x:D+f.width/2,y:U-q/2+f.height+C},{x:D+c/2,y:U-q/2+f.height+C},{x:D+c/2,y:U+q/2},{x:D-c/2,y:U+q/2},{x:D-c/2,y:U-q/2+f.height+C},{x:D-f.width/2,y:U-q/2+f.height+C}]:$=[{x:D-c/2,y:U-q/2},{x:D+c/2,y:U-q/2},{x:D+c/2,y:U-q/2+h},{x:D+f.width/2,y:U-q/2+h},{x:D+f.width/2/2,y:U+q/2},{x:D-f.width/2,y:U+q/2},{x:D-f.width/2,y:U-q/2+h},{x:D-c/2,y:U-q/2+h}],G.polygon(t,$,R)},d}p(ng,"imageSquare");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=Math.max(l.width+(a??0)*2,t?.width??0),h=Math.max(l.height+(s??0)*2,t?.height??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=V.svg(n),m=X(t,{}),y=pt(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&f.attr("style",u)}else f=Xe(n,c,h,d);return i&&f.attr("style",i),t.width=c,t.height=h,Q(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(lg,"inv_trapezoid");async function hg(e,t){const{shapeSvg:r,bbox:i,label:o}=await st(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(t,s),t.intersect=function(l){return G.rect(t,l)},r}p(hg,"labelRect");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=V.svg(n),m=X(t,{}),y=pt(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,Q(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(cg,"lean_left");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=V.svg(n),m=X(t,{}),y=pt(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,Q(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(dg,"lean_right");function ug(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=V.svg(o),d=X(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=pt(c),u=h.path(f,d),g=o.insert(()=>u,":first-child");return g.attr("class","outer-path"),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${a/2},${-n})`),Q(t,g),t.intersect=function(m){return W.info("lightningBolt intersect",t,m),G.polygon(t,c,m)},o}p(ug,"lightningBolt");var YT=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),UT=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),jT=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),pc=10,gc=10;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?24:o;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<gc&&(t.width=gc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-a-k*3,t.height<pc&&(t.height=pc)}const{shapeSvg:n,bbox:l,label:c}=await st(e,t,it(t)),h=(t?.width?t?.width:l.width)+s*2,d=h/2,f=d/(2.5+h/50),u=(t?.height?t?.height:l.height)+f+a*2,g=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=V.svg(n),b=UT(0,0,h,u,d,f,g),k=jT(0,f,h,u,d,f),T=X(t,{}),S=C.path(b,T),B=C.path(k,T);n.insert(()=>B,":first-child").attr("class","line"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const C=YT(0,0,h,u,d,f,g);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Wt(y)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),Q(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-k*k/(d*d));T>0&&(T=Math.sqrt(T)),T=f-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},n}p(fg,"linedCylinder");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await st(e,t,it(t)),h=(t?.width?t?.width:l.width)+(s??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,u=d+f,{cssStyles:g}=t,m=V.svg(n),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...cr(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,f,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],b=m.polygon(C.map(T=>[T.x,T.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Q(t,k),t.intersect=function(T){return G.polygon(t,C,T)},n}p(pg,"linedWaveEdgedRect");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await st(e,t,it(t)),d=(t?.width?t?.width:c.width)+s*2+2*n,f=(t?.height?t?.height:c.height)+a*2+2*n,u=d-2*n,g=f-2*n,m=-u/2,y=-g/2,{cssStyles:C}=t,b=V.svg(l),k=X(t,{}),T=[{x:m-n,y:y+n},{x:m-n,y:y+g+n},{x:m+u-n,y:y+g+n},{x:m+u-n,y:y+g},{x:m+u,y:y+g},{x:m+u,y:y+g-n},{x:m+u+n,y:y+g-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],S=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+g},{x:m+u,y:y+g},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(T);let v=b.path(B,k);const L=pt(S);let N=b.path(L,k);t.look!=="handDrawn"&&(v=fn(v),N=fn(N));const R=l.insert("g",":first-child");return R.insert(()=>v),R.insert(()=>N),R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),Q(t,R),t.intersect=function(D){return G.polygon(t,T,D)},l}p(gg,"multiRect");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await st(e,t,it(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(s.width,t?.width??0)+l*2,f=Math.max(s.height,t?.height??0)+c*3,u=t.look==="neo"?f/4:f/8,g=f+(h?u/2:-u/2),m=-d/2,y=-g/2,C=10,{cssStyles:b}=t,k=cr(m-C,y+g+C,m+d-C,y+g+C,u,.8),T=k?.[k.length-1],S=[{x:m-C,y:y+C},{x:m-C,y:y+g+C},...k,{x:m+d-C,y:T.y-C},{x:m+d,y:T.y-C},{x:m+d,y:T.y-2*C},{x:m+d+C,y:T.y-2*C},{x:m+d+C,y:y-C},{x:m+C,y:y-C},{x:m+C,y},{x:m,y},{x:m,y:y+C}],B=[{x:m,y:y+C},{x:m+d-C,y:y+C},{x:m+d-C,y:T.y-C},{x:m+d,y:T.y-C},{x:m+d,y},{x:m,y}],v=V.svg(o),L=X(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const N=pt(S),R=v.path(N,L),D=pt(B),U=v.path(D,L),q=o.insert(()=>R,":first-child");return q.insert(()=>U),q.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),q.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-u/2-(s.y-(s.top??0))})`),Q(t,q),t.intersect=function($){return G.polygon(t,S,$)},o}p(mg,"multiWaveEdgedRectangle");async function yg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=K(t);t.labelStyle=i,t.useHtmlLabels||ee(Ft())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await st(e,t,it(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,f=-h/2,{cssStyles:u}=t,g=V.svg(a),m=X(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(d,f,c,h,m),C=a.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),o&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",o),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Q(t,C),t.intersect=function(b){return G.rect(t,b)},a}p(yg,"note");var GT=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await st(e,t,it(t)),a=s.width+(t.padding??0),n=s.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=V.svg(o),g=X(t,{}),m=GT(0,0,l),y=u.path(m,g);d=o.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&d.attr("style",f)}else d=Xe(o,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),Q(t,d),t.calcIntersect=function(u,g){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],C=G.polygon(u,y,g);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},o}p(Cg,"question");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?21:o??0,a=t.look==="neo"?12:o??0,{shapeSvg:n,bbox:l,label:c}=await st(e,t,it(t)),h=(t?.width??l.width)+(t.look==="neo"?s*2:s),d=(t?.height??l.height)+(t.look==="neo"?a*2:a),f=-h/2,u=-d/2,g=u/2,m=[{x:f+g,y:u},{x:f,y:0},{x:f+g,y:-u},{x:-f,y:-u},{x:-f,y:u}],{cssStyles:y}=t,C=V.svg(n),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(m),T=C.path(k,b),S=n.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-g/2},0)`),c.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Q(t,S),t.intersect=function(B){return G.polygon(t,m,B)},n}p(xg,"rect_left_inv_arrow");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await ir(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(ee(yt())){const L=h.children[0],N=dt(h);d=L.getBoundingClientRect(),N.attr("width",d.width),N.attr("height",d.height)}W.info("Text 2",l);const f=l||[],u=h.getBBox(),g=await ir(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=g.children[0],y=dt(g);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const C=(t.padding||0)/2;dt(g).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),dt(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),T=-d.width/2-C,S=-d.height/2-C;let B,v;if(t.look==="handDrawn"){const L=V.svg(s),N=X(t,{}),R=L.path(dr(T,S,b,k,t.rx||0),N),D=L.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,N);v=s.insert(()=>(W.debug("Rough node insert CXC",R),D),":first-child"),B=s.insert(()=>(W.debug("Rough node insert CXC",R),R),":first-child")}else B=a.insert("rect",":first-child"),v=a.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),v.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return Q(t,B),t.intersect=function(L){return G.rect(t,L)},s}p(bg,"rectWithTitle");async function kg(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,o={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return ni(e,t,o)}p(kg,"roundedRect");var mr=8;async function wg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await st(e,t,it(t)),c=(t?.width??n.width)+o*2+(t.look==="neo"?mr:mr*2),h=(t?.height??n.height)+s*2,d=c-mr,f=h,u=mr-c/2,g=-h/2,{cssStyles:m}=t,y=V.svg(a),C=X(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y:g},{x:u+d,y:g},{x:u+d,y:g+f},{x:u-mr,y:g+f},{x:u-mr,y:g},{x:u,y:g},{x:u,y:g+f}],k=y.polygon(b.map(S=>[S.x,S.y]),C),T=a.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Wt(m)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${mr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Q(t,T),t.intersect=function(S){return G.rect(t,S)},a}p(wg,"shadedProcess");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await st(e,t,it(t)),h=(t?.width?t?.width:l.width)+s*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,f=h,u=d/1.5,g=-f/2,m=-u/2,{cssStyles:y}=t,C=V.svg(n),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:m},{x:g,y:m+u},{x:g+f,y:m+u},{x:g+f,y:m-u/2}],T=pt(k),S=C.path(T,b),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),Q(t,B),t.intersect=function(v){return G.polygon(t,k,v)},n}p(Tg,"slopedRect");async function Sg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,o=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:o};return ni(e,t,s)}p(Sg,"squareRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?20:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?s*2:s),d=c/2,{cssStyles:f}=t,u=V.svg(n),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...ji(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...ji(h/2-d,0,d,50,270,450)],y=pt(m),C=u.path(y,g),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(k){return G.polygon(t,m,k)},n}p(_g,"stadium");async function Bg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ni(e,t,r)}p(Bg,"state");function vg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=K(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=V.svg(h),f=X(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const u=d.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),g=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...f,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>u,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),o&&C.selectAll("path").attr("style",o),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${k})`)}return Q(t,C),t.intersect=function(b){return G.circle(t,(t.width??0)/2,b)},h}p(vg,"stateEnd");function Lg(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=V.svg(s).circle(0,0,t.width,s2(i));a=s.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&o&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return Q(t,a),t.intersect=function(n){return G.circle(t,(t.width??7)/2,n)},s}p(Lg,"stateStart");var zr=8;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t?.padding??8,s=t.look==="neo"?28:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.width??l.width)+2*zr+s,h=(t?.height??l.height)+a,d=c-2*zr,f=h,u=-c/2,g=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=V.svg(n),C=X(t,{}),b=y.rectangle(u,g,d+16,f,C),k=y.line(u+zr,g,u+zr,g+f,C),T=y.line(u+zr+d,g,u+zr+d,g+f,C);n.insert(()=>k,":first-child"),n.insert(()=>T,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:B}=t;S.attr("class","basic label-container").attr("style",Wt(B)),Q(t,S)}else{const y=Xe(n,d,f,m);i&&y.attr("style",i),Q(t,y)}return t.intersect=function(y){return G.polygon(t,m,y)},n}p(Fg,"subroutine");var ya=.2;async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-s*2-ya*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.height?t?.height:l.height)+a*2,h=ya*c,d=ya*c,u=(t?.width?t?.width:l.width)+s*2+h-h,g=c,m=-u/2,y=-g/2,{cssStyles:C}=t,b=V.svg(n),k=X(t,{}),T=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+g},{x:m-h/2,y:y+g}],S=[{x:m+u-h/2,y:y+g},{x:m+u+h/2,y:y+g},{x:m+u+h/2,y:y+g-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(T),v=b.path(B,k),L=pt(S),N=b.path(L,{...k,fillStyle:"solid"}),R=n.insert(()=>N,":first-child");return R.insert(()=>v,":first-child"),R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),Q(t,R),t.intersect=function(D){return G.polygon(t,T,D)},n}p(Ag,"taggedRect");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await st(e,t,it(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,f=l+c,{cssStyles:u}=t,g=V.svg(o),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...cr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],C=-n/2+n/2*.1,b=-f/2-d*.4,k=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...cr(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],T=pt(y),S=g.path(T,m),B=pt(k),v=g.path(B,{...m,fillStyle:"solid"}),L=o.insert(()=>v,":first-child");return L.insert(()=>S,":first-child"),L.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Q(t,L),t.intersect=function(N){return G.polygon(t,y,N)},o}p(Mg,"taggedWaveEdgedRectangle");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await st(e,t,it(t)),a=Math.max(s.width+(t.padding??0),t?.width||0),n=Math.max(s.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=o.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),Q(t,h),t.intersect=function(d){return G.rect(t,d)},o}p(Eg,"text");var XT=p((e,t,r,i,o,s)=>`M${e},${t}
|
|
234
|
+
a${o},${s} 0,0,1 0,${-i}
|
|
235
|
+
l${r},0
|
|
236
|
+
a${o},${s} 0,0,1 0,${i}
|
|
237
|
+
M${r},${-i}
|
|
238
|
+
a${o},${s} 0,0,0 0,${i}
|
|
239
|
+
l${-r},0`,"createCylinderPathD"),VT=p((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ZT=p((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),mc=5,yc=10;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-s,t.height<mc&&(t.height=mc);const C=m/2/(2.5+m/50);t.width=(t.width??0)-s-C*3,t.width<yc&&(t.width=yc)}const{shapeSvg:a,bbox:n,label:l}=await st(e,t,it(t)),c=(t.height?t.height:n.height)+s,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+s,{cssStyles:u}=t;let g;if(t.look==="handDrawn"){const m=V.svg(a),y=VT(0,0,f,c,d,h),C=ZT(0,0,f,c,d,h),b=m.path(y,X(t,{})),k=m.path(C,X(t,{fill:"none"}));g=a.insert(()=>k,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),u&&g.attr("style",u)}else{const m=XT(0,0,f,c,d,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Wt(u)).attr("style",i),g.attr("class","basic label-container outer-path"),u&&g.selectAll("path").attr("style",u),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Q(t,g),t.intersect=function(m){const y=G.rect(t,m),C=y.y-(t.y??0);if(h!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p($g,"tiltedCylinder");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=V.svg(n),m=X(t,{}),y=pt(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,Q(t,f),t.intersect=function(g){return G.polygon(t,d,g)},n}p(Og,"trapezoid");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await st(e,t,it(t)),d=(t?.width?t?.width:h.width)+s*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,g=V.svg(c),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],C=pt(y),b=g.path(C,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Q(t,k),t.intersect=function(T){return G.polygon(t,y,T)},c}p(Ig,"trapezoidalPentagon");var Cc=10,xc=10;async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<xc&&(t.width=xc),t.height=t?.height??0,t.height<Cc&&(t.height=Cc));const{shapeSvg:a,bbox:n,label:l}=await st(e,t,it(t)),c=Ie(yt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:g}=t,m=V.svg(a),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=pt(u),b=m.path(C,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,Q(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(T){return W.info("Triangle intersect",t,u,T),G.polygon(t,u,T)},a}p(Dg,"triangle");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await st(e,t,it(t)),d=(t?.width?t?.width:c.width)+(s??0)*2,f=(t?.height?t?.height:c.height)+(a??0)*2,u=t.look==="neo"?f/4:f/8,g=f+(n?u:-u),{cssStyles:m}=t,C=14-d,b=C>0?C/2:0,k=V.svg(l),T=X(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const S=[{x:-d/2-b,y:g/2},...cr(-d/2-b,g/2,d/2+b,g/2,u,.8),{x:d/2+b,y:-g/2},{x:-d/2-b,y:-g/2}],B=pt(S),v=k.path(B,T),L=l.insert(()=>v,":first-child");return L.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-u-(c.y-(c.top??0))})`),Q(t,L),t.intersect=function(N){return G.polygon(t,S,N)},l}p(Pg,"waveEdgedRectangle");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?20:o;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-T*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),c=(t?.width?t?.width:l.width)+s*2,h=(t?.height?t?.height:l.height)+a,d=h/8,f=h+d*2,{cssStyles:u}=t,g=V.svg(n),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:f/2},...cr(-c/2,f/2,c/2,f/2,d,1),{x:c/2,y:-f/2},...cr(c/2,-f/2,-c/2,-f/2,d,-1)],C=pt(y),b=g.path(C,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Q(t,k),t.intersect=function(T){return G.polygon(t,y,T)},n}p(Rg,"waveRectangle");var Mt=10;async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-Mt,10),t.height=Math.max((t?.height??0)-s*2-Mt,10));const{shapeSvg:a,bbox:n,label:l}=await st(e,t,it(t)),c=(t?.width?t?.width:n.width)+o*2+Mt,h=(t?.height?t?.height:n.height)+s*2+Mt,d=c-Mt,f=h-Mt,u=-d/2,g=-f/2,{cssStyles:m}=t,y=V.svg(a),C=X(t,{}),b=[{x:u-Mt,y:g-Mt},{x:u-Mt,y:g+f},{x:u+d,y:g+f},{x:u+d,y:g-Mt}],k=`M${u-Mt},${g-Mt} L${u+d},${g-Mt} L${u+d},${g+f} L${u-Mt},${g+f} L${u-Mt},${g-Mt}
|
|
240
|
+
M${u-Mt},${g} L${u+d},${g}
|
|
241
|
+
M${u},${g-Mt} L${u},${g+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=y.path(k,C),S=a.insert(()=>T,":first-child");return S.attr("transform",`translate(${Mt/2}, ${Mt/2})`),S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Mt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Mt/2-(n.y-(n.top??0))})`),Q(t,S),t.intersect=function(B){return G.polygon(t,b,B)},a}p(Ng,"windowPane");var bc=new Set(["redux-color","redux-dark-color"]),KT=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function bl(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=Ft(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:l}=o;if(t.look==="handDrawn"){const{themeVariables:et}=Ft(),{background:ft}=et,kt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ft}`]};await bl(e,kt)}const c=Ft();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:g}=K(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};je(t.label,c)+et.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ft=await ni(e,t,et);if(i!=null&&bc.has(i)){const kt=r.colorIndex??0;ft.attr("data-color-id",`color-${kt%l.length}`)}if(!Ie(c.htmlLabels)){const kt=ft.select("text"),St=kt.node()?.getBBox();kt.attr("transform",`translate(${-St.width/2}, 0)`)}return ft}c.htmlLabels||(h*=1.25,d*=1.25);let m=it(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),C=await Ur(y,t.label??"",c,0,0,["name"],u);C.height+=d;let b=0;const k=[],T=[];let S=0,B=0,v=0,L=0,N=!0,R=!0;for(const et of r.attributes){const ft=await Ur(y,et.type,c,0,b,["attribute-type"],u);S=Math.max(S,ft.width+h);const kt=await Ur(y,et.name,c,0,b,["attribute-name"],u);B=Math.max(B,kt.width+h);const St=await Ur(y,et.keys.join(),c,0,b,["attribute-keys"],u);v=Math.max(v,St.width+h);const _t=await Ur(y,et.comment,c,0,b,["attribute-comment"],u);L=Math.max(L,_t.width+h);const $t=Math.max(ft.height,kt.height,St.height,_t.height)+d;T.push({yOffset:b,rowHeight:$t}),b+=$t}let D=4;v<=h&&(N=!1,v=0,D--),L<=h&&(R=!1,L=0,D--);const U=y.node().getBBox();if(C.width+h*2-(S+B+v+L)>0){const et=C.width+h*2-(S+B+v+L);S+=et/D,B+=et/D,v>0&&(v+=et/D),L>0&&(L+=et/D)}const q=S+B+v+L,$=V.svg(y),M=X(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let A=0;T.length>0&&(A=T.reduce((et,ft)=>et+(ft?.rowHeight??0),0));const P=Math.max(U.width+h*2,t?.width||0,q),E=Math.max((A??0)+C.height,t?.height||0),H=-P/2,Y=-E/2;if(y.selectAll("g:not(:first-child)").each((et,ft,kt)=>{const St=dt(kt[ft]),_t=St.attr("transform");let $t=0,mt=0;if(_t){const wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_t);wt&&($t=parseFloat(wt[1]),mt=parseFloat(wt[2]),St.attr("class").includes("attribute-name")?$t+=S:St.attr("class").includes("attribute-keys")?$t+=S+B:St.attr("class").includes("attribute-comment")&&($t+=S+B+v))}St.attr("transform",`translate(${H+h/2+$t}, ${mt+Y+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(Y+d/2)+")"),i!=null&&bc.has(i)){const et=r.colorIndex??0;y.attr("data-color-id",`color-${et%l.length}`)}const ot=$.rectangle(H,Y,P,E,M),Z=y.insert(()=>ot,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[et,ft]of T.entries()){const St=(et+1)%2===0&&ft.yOffset!==0,_t=$.rectangle(H,C.height+Y+ft?.yOffset,P,ft?.rowHeight,{...M,fill:St?s:a,stroke:n});y.insert(()=>_t,"g.label").attr("style",f.join("")).attr("class",`row-rect-${St?"even":"odd"}`)}const ct=1e-4;let ut=jr(H,C.height+Y,P+H,C.height+Y,ct),xt=$.polygon(ut.map(et=>[et.x,et.y]),M);if(y.insert(()=>xt).attr("class","divider"),ut=jr(S+H,C.height+Y,S+H,E+Y,ct),xt=$.polygon(ut.map(et=>[et.x,et.y]),M),y.insert(()=>xt).attr("class","divider"),N){const et=S+B+H;ut=jr(et,C.height+Y,et,E+Y,ct),xt=$.polygon(ut.map(ft=>[ft.x,ft.y]),M),y.insert(()=>xt).attr("class","divider")}if(R){const et=S+B+v+H;ut=jr(et,C.height+Y,et,E+Y,ct),xt=$.polygon(ut.map(ft=>[ft.x,ft.y]),M),y.insert(()=>xt).attr("class","divider")}for(const et of k){const ft=C.height+Y+et;ut=jr(H,ft,P+H,ft,ct),xt=$.polygon(ut.map(kt=>[kt.x,kt.y]),M),y.insert(()=>xt).attr("class","divider")}if(Q(t,Z),g&&t.look!=="handDrawn")if(i!=null&&KT.has(i))y.selectAll("path").attr("style",g);else{const ft=g.split(";")?.filter(kt=>kt.includes("stroke"))?.map(kt=>`${kt}`).join("; ");y.selectAll("path").attr("style",ft??""),y.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(et){return G.rect(t,et)},y}p(bl,"erBox");async function Ur(e,t,r,i=0,o=0,s=[],a=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",a);t!==dh(t)&&(t=dh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Pe(n,t,{width:je(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Ie(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=dt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}p(Ur,"addText");function jr(e,t,r,i,o){return e===r?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}p(jr,"lineToPolygon");async function qg(e,t,r,i,o=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,f=0,u=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Li(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Li(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=a.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await Li(c,b,m,[b.parseClassifier()]);m+=k+s}u=c.node().getBBox().height,u<=0&&(u=o/2),h=a.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Li(h,b,y,[b.parseClassifier()]);y+=k+s}let C=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${d+f+o*2})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${d+f+(u?u+o*4:o*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}p(qg,"textHelper");async function Li(e,t,r,i=[]){const o=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Ft();let a="useHtmlLabels"in t?t.useHtmlLabels:Ie(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Pi(n)&&(a=!0);const l=await Pe(o,Fn(Lr(n)),{width:je(n,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,h=1;if(a){const d=l.children[0],f=dt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function C(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=s.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,T=parseInt(b,10)*5+"px";m.style.minWidth=T,m.style.maxWidth=T}else m.style.width="100%";y(m)}p(C,"setupImage"),setTimeout(()=>{m.complete&&C()}),m.addEventListener("error",C),m.addEventListener("load",C)})))}c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&dt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return o.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Li,"addText");async function Wg(e,t){const r=yt(),{themeVariables:i}=r,{useGradient:o}=i,s=r.class.padding??12,a=s,n=t.useHtmlLabels??Ie(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await qg(e,t,r,n,a),{labelStyles:d,nodeStyles:f}=K(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=l.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=V.svg(c),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const T=-C/2,S=-b/2;let B=g?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(B=s*2);const v=m.rectangle(T-s,S-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,b+2*s+B,y),L=c.insert(()=>v,":first-child");L.attr("class","basic label-container outer-path");const N=L.node().getBBox(),R=c.select(".annotation-group").node().getBBox().height-(g?s/2:0)||0,D=c.select(".label-group").node().getBBox().height-(g?s/2:0)||0,U=c.select(".members-group").node().getBBox().height-(g?s/2:0)||0,q=(R+D+S+s-(S-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each(($,M,A)=>{const P=dt(A[M]),E=P.attr("transform");let H=0;if(E){const ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);ct&&(H=parseFloat(ct[2]))}let Y=H+S+s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(P.attr("class").includes("methods-group")){const Z=Math.max(U,a/2);k?Y=Math.max(q,R+D+Z+S+a*2+s)+a*2:Y=R+D+Z+S+a*4+s}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?Y=H-a:Y=H),n||(Y-=4);let ot=T;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(ot=-P.node()?.getBBox().width/2||0,c.selectAll("text").each(function(Z,ct,ut){window.getComputedStyle(ut[ct]).textAnchor==="middle"&&(ot=0)})),P.attr("transform",`translate(${ot}, ${Y})`)}),l.members.length>0||l.methods.length>0||g){const $=R+D+S+s,M=m.line(N.x,$,N.x+N.width,$+.001,y);c.insert(()=>M).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",u)}if(g||l.members.length>0||l.methods.length>0){const $=R+D+U+S+a*2+s,M=m.line(N.x,k?Math.max(q,$):$,N.x+N.width,(k?Math.max(q,$):$)+.001,y);c.insert(()=>M).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),L.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const $=RegExp(/color\s*:\s*([^;]*)/),M=$.exec(u);if(M){const A=M[0].replace("color","fill");c.selectAll("tspan").attr("style",A)}else if(d){const A=$.exec(d);if(A){const P=A[0].replace("color","fill");c.selectAll("tspan").attr("style",P)}}}return Q(t,L),t.intersect=function($){return G.rect(t,$)},c}p(Wg,"classBox");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t,s=t,a=20,n=20,l="verifyMethod"in t,c=it(t),{themeVariables:h}=yt(),{borderColorArray:d,requirementEdgeLabelBackground:f}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let g;l?g=await Le(u,`<<${o.type}>>`,0,t.labelStyle):g=await Le(u,"<<Element>>",0,t.labelStyle);let m=g;const y=await Le(u,o.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const N=await Le(u,`${o.requirementId?`ID: ${o.requirementId}`:""}`,m,t.labelStyle);m+=N;const R=await Le(u,`${o.text?`Text: ${o.text}`:""}`,m,t.labelStyle);m+=R;const D=await Le(u,`${o.risk?`Risk: ${o.risk}`:""}`,m,t.labelStyle);m+=D,await Le(u,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,m,t.labelStyle)}else{const N=await Le(u,`${s.type?`Type: ${s.type}`:""}`,m,t.labelStyle);m+=N,await Le(u,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,m,t.labelStyle)}const C=(u.node()?.getBBox().width??200)+a,b=(u.node()?.getBBox().height??200)+a,k=-C/2,T=-b/2,S=V.svg(u),B=X(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const v=S.rectangle(k,T,C,b,B),L=u.insert(()=>v,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",i),d?.length){const N=t.colorIndex??0;u.attr("data-color-id",`color-${N%d.length}`)}if(u.selectAll(".label").each((N,R,D)=>{const U=dt(D[R]),q=U.attr("transform");let $=0,M=0;if(q){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);H&&($=parseFloat(H[1]),M=parseFloat(H[2]))}const A=M-b/2;let P=k+a/2;(R===0||R===1)&&(P=$),U.attr("transform",`translate(${P}, ${A+a})`)}),m>g+y+n){const N=T+g+y+n;let R;if(t.look==="neo"){const q=[[k,N],[k+C,N],[k+C,N+.001],[k,N+.001]];R=S.polygon(q,B)}else R=S.line(k,N,k+C,N,B);u.insert(()=>R).attr("class","divider")}return Q(t,L),t.intersect=function(N){return G.rect(t,N)},i&&t.look!=="handDrawn"&&(f||d?.length)&&u.selectAll("path").attr("style",i),u}p(zg,"requirementBox");async function Le(e,t,r,i=""){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),s=yt(),a=s.htmlLabels??!0,n=await Pe(o,Fn(Lr(t)),{width:je(t,s)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},s);let l;if(a){const c=n.children[0],h=dt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return o.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(Le,"addText");var QT=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Hg(e,t,{config:r}){const{labelStyles:i,nodeStyles:o}=K(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await st(e,t,it(t)),h=t.padding||10;let d="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await ma(f,"ticket"in t&&t.ticket||"",u):{label:g,bbox:m}=await ma(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:C}=await ma(n,"assigned"in t&&t.assigned||"",u);t.width=a;const b=10,k=t?.width||0,T=Math.max(m.height,C.height)/2,S=Math.max(l.height+b*2,t?.height||0)+T,B=-k/2,v=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-T-l.height/2)+")"),g.attr("transform","translate("+(h-k/2)+", "+(-T+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-C.width-2*s)+", "+(-T+l.height/2)+")");let L;const{rx:N,ry:R}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const U=V.svg(n),q=X(t,{}),$=N||R?U.path(dr(B,v,k,S,N||0),q):U.rectangle(B,v,k,S,q);L=n.insert(()=>$,":first-child"),L.attr("class","basic label-container").attr("style",D||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",o).attr("rx",N??5).attr("ry",R??5).attr("x",B).attr("y",v).attr("width",k).attr("height",S);const U="priority"in t&&t.priority;if(U){const q=n.append("line"),$=B+2,M=v+Math.floor((N??0)/2),A=v+S-Math.floor((N??0)/2);q.attr("x1",$).attr("y1",M).attr("x2",$).attr("y2",A).attr("stroke-width","4").attr("stroke",QT(U))}}return Q(t,L),t.height=S,t.intersect=function(U){return G.rect(t,U)},n}p(Hg,"kanbanItem");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await st(e,t,it(t)),l=s.width+10*a,c=s.height+8*a,h=.15*l,{cssStyles:d}=t,f=s.width+20,u=s.height+20,g=Math.max(l,f),m=Math.max(c,u);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const C=`M0 0
|
|
242
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
243
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
244
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
245
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
246
|
+
|
|
247
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
248
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
249
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
250
|
+
|
|
251
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
252
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
253
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
254
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
255
|
+
|
|
256
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
257
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
258
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
259
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=V.svg(o),k=X(t,{}),T=b.path(C,k);y=o.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",Wt(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Q(t,y),t.calcIntersect=function(b,k){return G.rect(b,k)},t.intersect=function(b){return W.info("Bang intersect",t,b),G.rect(t,b)},o}p(Yg,"bang");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await st(e,t,it(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
260
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
261
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
262
|
+
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
263
|
+
|
|
264
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
265
|
+
a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
|
|
266
|
+
|
|
267
|
+
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
268
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
269
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
270
|
+
|
|
271
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
272
|
+
a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
|
|
273
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=V.svg(o),b=X(t,{}),k=C.path(y,b);m=o.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Wt(g))}else m=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,m),t.calcIntersect=function(C,b){return G.rect(C,b)},t.intersect=function(C){return W.info("Cloud intersect",t,C),G.rect(t,C)},o}p(Ug,"cloud");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await st(e,t,it(t)),l=s.width+8*a,c=s.height+2*a,h=5,d=t.look==="neo"?`
|
|
274
|
+
M${-l/2} ${c/2-h}
|
|
275
|
+
v${-c+2*h}
|
|
276
|
+
q0,-${h} ${h},-${h}
|
|
277
|
+
h${l-2*h}
|
|
278
|
+
q${h},0 ${h},${h}
|
|
279
|
+
v${c-h}
|
|
280
|
+
H${-l/2}
|
|
281
|
+
Z
|
|
282
|
+
`:`
|
|
283
|
+
M${-l/2} ${c/2-h}
|
|
284
|
+
v${-c+2*h}
|
|
285
|
+
q0,-${h} ${h},-${h}
|
|
286
|
+
h${l-2*h}
|
|
287
|
+
q${h},0 ${h},${h}
|
|
288
|
+
v${c-2*h}
|
|
289
|
+
q0,${h} ${-h},${h}
|
|
290
|
+
h${-(l-2*h)}
|
|
291
|
+
q${-h},0 ${-h},${-h}
|
|
292
|
+
Z
|
|
293
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),Q(t,f),t.calcIntersect=function(u,g){return G.rect(u,g)},t.intersect=function(u){return G.rect(t,u)},o}p(jg,"defaultMindmapNode");async function Gg(e,t){const r={padding:t.padding??0};return xl(e,t,r)}p(Gg,"mindmapCircle");var JT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Sg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:kg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:_g},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Fg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Gp},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Xp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:xl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Yg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Ug},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Cg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:eg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:dg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:cg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Og},{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:lg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Zp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Eg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Np},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:wg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Lg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:vg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Jp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:rg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Hp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Yp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Up},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ug},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Pg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:tg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:$g},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:fg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:jp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Vp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Dg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ng},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Kp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ig},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Qp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Tg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:mg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:gg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Rp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:zp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Mg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ag},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Rg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:xg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:pg}],tS=p(()=>{const t=[...Object.entries({state:Bg,choice:qp,note:yg,rectWithTitle:bg,labelRect:hg,iconSquare:ag,iconCircle:og,icon:ig,iconRounded:sg,imageSquare:ng,anchor:Dp,kanbanItem:Hg,mindmapCircle:Gg,defaultMindmapNode:jg,classBox:Wg,erBox:bl,requirementBox:zg}),...JT.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(o=>[o,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Xg=tS();function eS(e){return e in Xg}p(eS,"isValidShape");var Is=new Map;async function Vg(e,t,r){let i,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Xg[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),o=await s(i,t,r)}else o=await s(e,t,r),i=o;return i.attr("data-look",Wt(t.look)),t.tooltip&&o.attr("title",t.tooltip),Is.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Vg,"insertNode");var oF=p((e,t)=>{Is.set(t.id,e)},"setNodeElem"),sF=p(()=>{Is.clear()},"clear"),aF=p(e=>{const t=Is.get(e.id);W.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),bi=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Vt={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},kc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Fi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Bt(e),t=Bt(t);const[r,i]=[e.x,e.y],[o,s]=[t.x,t.y],a=o-r,n=s-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p(Fi,"calculateDeltaAndAngle");var Bt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),rS=p(e=>({x:p(function(t,r,i){let o=0;const s=Bt(i[0]).x<Bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:u,deltaX:g}=Fi(i[0],i[1]);o=Vt[e.arrowTypeStart]*Math.cos(u)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:u,deltaX:g}=Fi(i[i.length-1],i[i.length-2]);o=Vt[e.arrowTypeEnd]*Math.cos(u)*(g>=0?1:-1)}const a=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),n=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),l=Math.abs(Bt(t).x-Bt(i[0]).x),c=Math.abs(Bt(t).y-Bt(i[0]).y),h=Vt[e.arrowTypeStart],d=Vt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=s==="right"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=s==="right"?-1:1,o+=u}return Bt(t).x+o},"x"),y:p(function(t,r,i){let o=0;const s=Bt(i[0]).y<Bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:u,deltaY:g}=Fi(i[0],i[1]);o=Vt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:u,deltaY:g}=Fi(i[i.length-1],i[i.length-2]);o=Vt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(g>=0?1:-1)}const a=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),n=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),l=Math.abs(Bt(t).y-Bt(i[0]).y),c=Math.abs(Bt(t).x-Bt(i[0]).x),h=Vt[e.arrowTypeStart],d=Vt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=s==="up"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=s==="up"?-1:1,o+=u}return Bt(t).y+o},"y")}),"getLineFunctionsWithOffset"),iS=p((e,t,r,i,o,s=!1,a)=>{t.arrowTypeStart&&wc(e,"start",t.arrowTypeStart,r,i,o,s,a),t.arrowTypeEnd&&wc(e,"end",t.arrowTypeEnd,r,i,o,s,a)},"addEdgeMarkers"),oS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},sS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],wc=p((e,t,r,i,o,s,a=!1,n)=>{const l=oS[r],c=l&&sS.includes(l.type);if(!l){W.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${o}_${s}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${g}`;if(!document.getElementById(m)){const y=document.getElementById(u);if(y){const C=y.cloneNode(!0);C.id=m,C.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(C)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),aS=p(e=>typeof e=="string"?e:yt()?.flowchart?.curve,"resolveEdgeCurveType"),xs=new Map,Yt=new Map,nF=p(()=>{xs.clear(),Yt.clear()},"clear"),ki=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),nS=p(async(e,t)=>{const r=yt();let i=ee(r);const{labelStyles:o}=K(t);t.labelStyle=o;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Pe(e,t.label,{style:ki(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),W.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],g=dt(c);h=u.getBoundingClientRect(),d=h,g.attr("width",h.width),g.attr("height",h.height)}else{const u=dt(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}a.attr("transform",bi(d,i)),xs.set(t.id,s),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await ir(g,t.startLabelLeft,ki(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=dt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",bi(y,i)),Yt.get(t.id)||Yt.set(t.id,{}),Yt.get(t.id).startLeft=u,Ai(f,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await ir(g,t.startLabelRight,ki(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=dt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",bi(y,i)),Yt.get(t.id)||Yt.set(t.id,{}),Yt.get(t.id).startRight=u,Ai(f,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await ir(u,t.endLabelLeft,ki(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=dt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",bi(y,i)),Yt.get(t.id)||Yt.set(t.id,{}),Yt.get(t.id).endLeft=u,Ai(f,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),g=u.insert("g").attr("class","inner"),m=await ir(u,t.endLabelRight,ki(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const C=m.children[0],b=dt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",bi(y,i)),Yt.get(t.id)||Yt.set(t.id,{}),Yt.get(t.id).endRight=u,Ai(f,t.endLabelRight)}return c},"insertEdgeLabel");function Ai(e,t){ee(yt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Ai,"setTerminalWidth");var lS=p((e,t)=>{W.debug("Moving label abc88 ",e.id,e.label,xs.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=yt(),{subGraphTitleTotalMargin:o}=al(i);if(e.label){const s=xs.get(e.id);let a=e.x,n=e.y;if(r){const l=Ce.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e.startLabelLeft){const s=Yt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Ce.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Yt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Ce.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Yt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Ce.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Yt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Ce.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),hS=p((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,o=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return o<.001||s<.001?t:s>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),cS=p((e,t)=>{const r=e.x,i=e.y,o=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return o>=a||s>=n},"outsideNode"),dS=p((e,t,r)=>{W.debug(`intersection calc abc89:
|
|
294
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
295
|
+
insidePoint : ${JSON.stringify(r)}
|
|
296
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-o:o-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),W.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return W.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),Tc=p((e,t)=>{W.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(W.info("abc88 checking point",s,t),!cS(t,s)&&!o){const a=dS(t,i,s);W.debug("abc88 inside",s,i,a),W.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?W.warn("abc88 no intersect",a,r):r.push(a),o=!0}else W.warn("abc88 outside",s,i),i=s,o||r.push(s)}),W.debug("returning points",r),r},"cutPathAtIntersect");function Zg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Zg,"extractCornerPoints");var Sc=p(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),uS=p(function(e){const{cornerPointPositions:t}=Zg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=Sc(o,a,5),l=Sc(s,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){W.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else W.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),fS=p((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),l=Array(n).fill(`${o} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),pS=p(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=yt();let h=t.points,d=!1;const f=o;var u=s;const g=[];for(const E in t.cssCompiledStyles)Ef(E)||g.push(t.cssCompiledStyles[E]);if(c==="swimlane"){if(u.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),u.intersect(h[1])];else{const E=h.slice(1,-1),H=E[0],Y=E[E.length-1],ot=.5,Z=Math.abs(h[h.length-1].x-Y.x)<ot&&Math.abs(h[h.length-1].y-Y.y)<ot,ct=f.intersect(H),ut=Z?Y:u.intersect(Y),xt=Math.abs(ut.x-Y.x)<ot&&Math.abs(ut.y-Y.y)<ot,ft=Math.abs(ct.x-H.x)<ot&&Math.abs(ct.y-H.y)<ot?[]:[ct],kt=xt?[]:[ut];h=[...ft,...E,...kt]}h=hS(t,h)}else u.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(u.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(W.info("to cluster abc88",r.get(t.toCluster)),h=Tc(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(W.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Tc(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(E=>!Number.isNaN(E.y));const C=aS(t.curve);C!=="rounded"&&(y=uS(y));let b=Oi;switch(C){case"linear":b=Oi;break;case"basis":b=Na;break;case"cardinal":b=Id;break;case"bumpX":b=Ad;break;case"bumpY":b=Md;break;case"catmullRom":b=Pd;break;case"monotoneX":b=Hd;break;case"monotoneY":b=Yd;break;case"natural":b=jd;break;case"step":b=Gd;break;case"stepAfter":b=Vd;break;case"stepBefore":b=Xd;break;case"rounded":b=Oi;break;default:b=Na}const{x:k,y:T}=rS(t),S=zk().x(k).y(T).curve(b);let B;switch(t.thickness){case"normal":B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible";break;default:B="edge-thickness-normal"}switch(t.pattern){case"solid":B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed";break;default:B+=" edge-pattern-solid"}let v,L=C==="rounded"?Kg(Qg(y,t),5):S(y);const N=Array.isArray(t.style)?t.style:[t.style];let R=N.find(E=>E?.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let U=!1;if(t.look==="handDrawn"){const E=V.svg(e);Object.assign([],y);const H=E.path(L,{roughness:.3,seed:l});B+=" transition",v=dt(H).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",N?N.reduce((ot,Z)=>ot+";"+Z,""):"");let Y=v.attr("d");v.attr("d",Y),e.node().appendChild(v.node())}else{const E=g.join(";"),H=N?N.reduce((xt,et)=>xt+et+";",""):"",Y=(E?E+";"+H+";":H)+";"+(N?N.reduce((xt,et)=>xt+";"+et,""):"");v=e.append("path").attr("d",L).attr("id",`${a}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",Y),R=Y.match(/stroke:([^;]+)/)?.[1],U=t.animate===!0||!!t.animation||E.includes("animation");const ot=v.node(),Z=typeof ot.getTotalLength=="function"?ot.getTotalLength():0,ct=kc[t.arrowTypeStart]||0,ut=kc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!U){const et=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?fS(Z,ct,ut):`0 ${ct} ${Z-ct-ut} ${ut}`}; stroke-dashoffset: 0;`;v.attr("style",et+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",m),v.attr("data-look",Wt(t.look)),t.showPoints&&y.forEach(E=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",E.x).attr("cy",E.y)});let q="";(yt().flowchart.arrowMarkerAbsolute||yt().state.arrowMarkerAbsolute)&&(q=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,q=q.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),W.info("arrowTypeStart",t.arrowTypeStart),W.info("arrowTypeEnd",t.arrowTypeEnd);const $=!U&&t?.look==="neo";iS(v,t,q,a,i,$,R);const M=Math.floor(h.length/2),A=h[M];Ce.isLabelCoordinateInPath(A,v.attr("d"))||(d=!0);let P={};return d&&(P.updatedPath=h),P.originalPath=t.points,P},"insertEdge");function Kg(e,t){if(e.length<2)return"";let r="";const i=e.length,o=1e-5;for(let s=0;s<i;s++){const a=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,f=l.y-a.y,u=Math.hypot(c,h),g=Math.hypot(d,f);if(u<o||g<o){r+=`L${a.x},${a.y}`;continue}const m=c/u,y=h/u,C=d/g,b=f/g,k=m*C+y*b,T=Math.max(-1,Math.min(1,k)),S=Math.acos(T);if(S<o||Math.abs(Math.PI-S)<o){r+=`L${a.x},${a.y}`;continue}const B=Math.min(t/Math.sin(S/2),u/2,g/2),v=a.x-m*B,L=a.y-y*B,N=a.x+C*B,R=a.y+b*B;r+=`L${v},${L}`,r+=`Q${a.x},${a.y} ${N},${R}`}}return r}p(Kg,"generateRoundedPath");function mn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(mn,"calculateDeltaAndAngle");function Qg(e,t){const r=e.map(o=>({...o}));if(e.length>=2&&Vt[t.arrowTypeStart]){const o=Vt[t.arrowTypeStart],s=e[0],a=e[1],{angle:n}=mn(s,a),l=o*Math.cos(n),c=o*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&Vt[t.arrowTypeEnd]){const o=Vt[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:n}=mn(a,s),l=o*Math.cos(n),c=o*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}p(Qg,"applyMarkerOffsetsToPoints");var gS=p((e,t,r,i)=>{t.forEach(o=>{RS[o](e,r,i)})},"insertMarkers"),mS=p((e,t,r)=>{W.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).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"),yS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).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"),CS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).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"),xS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).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"),bS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).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"),kS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).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"),wS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).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"),TS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).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),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).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"),SS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),_S=p((e,t,r)=>{const i=Ft(),{themeVariables:o}=i,{transitionColor:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-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",`${s}`)},"barbNeo"),BS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),vS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");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"),LS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),FS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");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"),AS=p((e,t,r)=>{const i=Ft(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),MS=p((e,t,r)=>{const i=Ft(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),ES=p((e,t,r)=>{const i=Ft(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").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",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("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",`${s}`)},"one_or_more_neo"),$S=p((e,t,r)=>{const i=Ft(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),OS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
297
|
+
L20,10
|
|
298
|
+
M20,10
|
|
299
|
+
L0,20`)},"requirement_arrow"),IS=p((e,t,r)=>{const i=Ft(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
300
|
+
L20,10
|
|
301
|
+
M20,10
|
|
302
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),DS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),PS=p((e,t,r)=>{const i=Ft(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),RS={extension:mS,composition:yS,aggregation:CS,dependency:xS,lollipop:bS,point:kS,circle:wS,cross:TS,barb:SS,barbNeo:_S,only_one:BS,zero_or_one:vS,one_or_more:LS,zero_or_more:FS,only_one_neo:AS,zero_or_one_neo:MS,one_or_more_neo:ES,zero_or_more_neo:$S,requirement_arrow:OS,requirement_contains:DS,requirement_arrow_neo:IS,requirement_contains_neo:PS},NS=gS,qS={common:Ki,getConfig:Ft,insertCluster:IT,insertEdge:pS,insertEdgeLabel:nS,insertMarkers:NS,insertNode:Vg,interpolateToCurve:tl,labelHelper:st,log:W,positionEdgeLabel:lS},Gi={},Jg=p(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),WS=p(()=>{Jg([{name:"dagre",loader:p(async()=>await import("./dagre-VZM6K2ZE-M_HVNtqP.js"),"loader")},{name:"swimlane",loader:p(async()=>await import("./swimlanes-SLNWSIFB-Cu5l7SuR.js"),"loader")},{name:"cose-bilkent",loader:p(async()=>await import("./cose-bilkent-JH36ORCC-4Ybddg08.js"),"loader")}])},"registerDefaultLayoutLoaders");WS();var lF=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in Gi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=Gi[e.layoutAlgorithm],o=await i.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return o.render(e,t,qS,{algorithm:i.algorithm},r)},"render"),hF=p((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return W.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),kl="comm",tm="rule",em="decl",zS="@media",HS="@import",YS="@supports",US="@namespace",yn="@keyframes",rm="@layer",jS="@scope",GS=Math.abs,Di=String.fromCharCode;function im(e){return e.trim()}function Cn(e,t,r){return e.replace(t,r)}function Kr(e,t){return e.charCodeAt(t)|0}function oi(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function om(e){return e.length}function Lo(e,t){return t.push(e),e}var Ds=1,si=1,sm=0,ue=0,Ot=0,li="";function wl(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:Ds,column:si,length:a,return:"",siblings:n}}function XS(){return Ot}function VS(){return Ot=ue>0?Kr(li,--ue):0,si--,Ot===10&&(si=1,Ds--),Ot}function be(){return Ot=ue<sm?Kr(li,ue++):0,si++,Ot===10&&(si=1,Ds++),Ot}function or(){return Kr(li,ue)}function zo(){return ue}function Ps(e,t){return oi(li,e,t)}function Xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ZS(e){return Ds=si=1,sm=Fe(li=e),ue=0,[]}function KS(e){return li="",e}function Ca(e){return im(Ps(ue-1,xn(e===91?e+2:e===40?e+1:e)))}function QS(e){for(;(Ot=or())&&Ot<33;)be();return Xi(e)>2||Xi(Ot)>3?"":" "}function JS(e,t){for(;--t&&be()&&!(Ot<48||Ot>102||Ot>57&&Ot<65||Ot>70&&Ot<97););return Ps(e,zo()+(t<6&&or()==32&&be()==32))}function xn(e){for(;be();)switch(Ot){case e:return ue;case 34:case 39:e!==34&&e!==39&&xn(Ot);break;case 40:e===41&&xn(e);break;case 92:be();break}return ue}function t_(e,t){for(;be()&&e+Ot!==57;)if(e+Ot===84&&or()===47)break;return"/*"+Ps(t,ue-1)+"*"+Di(e===47?e:be())}function e_(e){for(;!Xi(or());)be();return Ps(e,ue)}function r_(e){return KS(Ho("",null,null,null,[""],e=ZS(e),0,[0],e))}function Ho(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,T="",S=o,B=s,v=i,L=T;y;)switch(g=k,k=be()){case 40:g!=108&&Kr(L,d-1)==58?(b++,L+="("):L+=Ca(k);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=Ca(k);break;case 9:case 10:case 13:case 32:if(b>0){L+=Di(k);break}L+=QS(g);break;case 92:L+=JS(zo()-1,7);continue;case 47:switch(or()){case 42:case 47:Lo(i_(t_(be(),zo()),t,r,l),l),(Xi(g||1)==5||Xi(or()||1)==5)&&Fe(L)&&oi(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*m:n[c++]=Fe(L)*C;case 125*m:case 59:case 0:if(b>0&&k){L+=Di(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(L=Cn(L,/\f/g,"")),u>0&&(Fe(L)-d||m===0)&&Lo(u>32?Bc(L+";",i,r,d-1,l):Bc(Cn(L," ","")+";",i,r,d-2,l),l);break;case 59:L+=";";default:if(Lo(v=_c(L,t,r,c,h,o,n,T,S=[],B=[],d,s),s),k===123)if(h===0)Ho(L,t,v,v,S,s,d,n,B);else{switch(f){case 99:if(Kr(L,3)===110)break;case 108:if(Kr(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ho(e,v,v,i&&Lo(_c(e,v,v,0,0,o,n,T,o,S=[],d,B),B),o,B,d,n,i?S:B):Ho(L,v,v,v,[""],B,0,n,B)}}c=h=u=0,m=C=1,T=L="",d=a;break;case 58:d=1+Fe(L),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&VS()==125)continue}switch(L+=Di(k),k*m){case 38:C=h>0?1:(L+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Fe(L)-1)*C,C=1;break;case 64:or()===45&&(L+=Ca(be())),f=or(),h=d=Fe(T=L+=e_(zo())),k++;break;case 45:g===45&&Fe(L)==2&&(m=0)}}return s}function _c(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=om(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=oi(e,f+1,f=GS(y=a[m])),T=e;b<g;++b)(T=im(y>0?u[b]+" "+k:Cn(k,/&\f/g,u[b])))&&(l[C++]=T);return wl(e,t,r,o===0?tm:n,l,c,h,d)}function i_(e,t,r,i){return wl(e,t,r,kl,Di(XS()),oi(e,2,-2),0,i)}function Bc(e,t,r,i,o){return wl(e,t,r,em,oi(e,0,i),oi(e,i+1,-1),i,o)}function bn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function o_(e,t,r,i){switch(e.type){case rm:if(e.children.length)break;case HS:case US:case em:return e.return=e.return||e.value;case kl:return"";case yn:return e.return=e.value+"{"+bn(e.children,i)+"}";case tm:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=bn(e.children,i))?e.return=e.value+"{"+r+"}":""}function s_(e){var t=om(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var am="c4",a_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),n_=p(async()=>{const{diagram:e}=await import("./c4Diagram-5PPSVZJV-0MRkZlgP.js");return{id:am,diagram:e}},"loader"),l_={id:am,detector:a_,loader:n_},h_=l_,nm="flowchart",c_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),d_=p(async()=>{const{diagram:e}=await import("./flowDiagram-UKHOOZJN-Z83i2UWI.js").then(function(t){return t.f});return{id:nm,diagram:e}},"loader"),u_={id:nm,detector:c_,loader:d_},f_=u_,lm="flowchart-v2",p_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),g_=p(async()=>{const{diagram:e}=await import("./flowDiagram-UKHOOZJN-Z83i2UWI.js").then(function(t){return t.f});return{id:lm,diagram:e}},"loader"),m_={id:lm,detector:p_,loader:g_},y_=m_,hm="swimlane",C_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),x_=p(async()=>{const{diagram:e}=await import("./swimlanesDiagram-ULZ7WXOC-CalrsgPK.js");return{id:hm,diagram:e}},"loader"),b_={id:hm,detector:C_,loader:x_},k_=b_,cm="er",w_=p(e=>/^\s*erDiagram/.test(e),"detector"),T_=p(async()=>{const{diagram:e}=await import("./erDiagram-JOGREHBK-BIpd6dTf.js");return{id:cm,diagram:e}},"loader"),S_={id:cm,detector:w_,loader:T_},__=S_,dm="gitGraph",B_=p(e=>/^\s*gitGraph/.test(e),"detector"),v_=p(async()=>{const{diagram:e}=await import("./gitGraphDiagram-DS77QQ5N-Dp3Ar-hi.js");return{id:dm,diagram:e}},"loader"),L_={id:dm,detector:B_,loader:v_},F_=L_,um="gantt",A_=p(e=>/^\s*gantt/.test(e),"detector"),M_=p(async()=>{const{diagram:e}=await import("./ganttDiagram-PKOTCBZU-DFrb_S1d.js");return{id:um,diagram:e}},"loader"),E_={id:um,detector:A_,loader:M_},$_=E_,fm="info",O_=p(e=>/^\s*info/.test(e),"detector"),I_=p(async()=>{const{diagram:e}=await import("./infoDiagram-6WML65LV-BSa2g04G.js");return{id:fm,diagram:e}},"loader"),D_={id:fm,detector:O_,loader:I_},pm="pie",P_=p(e=>/^\s*pie/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await import("./pieDiagram-7S7Q4E2Y-C7T0Cmw1.js");return{id:pm,diagram:e}},"loader"),N_={id:pm,detector:P_,loader:R_},gm="quadrantChart",q_=p(e=>/^\s*quadrantChart/.test(e),"detector"),W_=p(async()=>{const{diagram:e}=await import("./quadrantDiagram-CIZ2JOQS-BBy7w4kD.js");return{id:gm,diagram:e}},"loader"),z_={id:gm,detector:q_,loader:W_},H_=z_,mm="xychart",Y_=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),U_=p(async()=>{const{diagram:e}=await import("./xychartDiagram-ELKLHX3M-DI6n79q0.js");return{id:mm,diagram:e}},"loader"),j_={id:mm,detector:Y_,loader:U_},G_=j_,ym="requirement",X_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),V_=p(async()=>{const{diagram:e}=await import("./requirementDiagram-LRYGKXZP-DGD5J_4k.js");return{id:ym,diagram:e}},"loader"),Z_={id:ym,detector:X_,loader:V_},K_=Z_,Cm="sequence",Q_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),J_=p(async()=>{const{diagram:e}=await import("./sequenceDiagram-SI44F4Z6-BeMzHWXI.js");return{id:Cm,diagram:e}},"loader"),tB={id:Cm,detector:Q_,loader:J_},eB=tB,xm="class",rB=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),iB=p(async()=>{const{diagram:e}=await import("./classDiagram-JCYQIIEL-BNU7Qn4k.js");return{id:xm,diagram:e}},"loader"),oB={id:xm,detector:rB,loader:iB},sB=oB,bm="classDiagram",aB=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),nB=p(async()=>{const{diagram:e}=await import("./classDiagram-v2-OCEON4UE-BNU7Qn4k.js");return{id:bm,diagram:e}},"loader"),lB={id:bm,detector:aB,loader:nB},hB=lB,km="state",cB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),dB=p(async()=>{const{diagram:e}=await import("./stateDiagram-OKZ733FA-Cv59z5YT.js");return{id:km,diagram:e}},"loader"),uB={id:km,detector:cB,loader:dB},fB=uB,wm="stateDiagram",pB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),gB=p(async()=>{const{diagram:e}=await import("./stateDiagram-v2-UEYNNEHI-R8jTc--F.js");return{id:wm,diagram:e}},"loader"),mB={id:wm,detector:pB,loader:gB},yB=mB,Tm="journey",CB=p(e=>/^\s*journey/.test(e),"detector"),xB=p(async()=>{const{diagram:e}=await import("./journeyDiagram-NVQOT4AX-MvWWPNDV.js");return{id:Tm,diagram:e}},"loader"),bB={id:Tm,detector:CB,loader:xB},kB=bB,wB=p((e,t,r)=>{W.debug(`rendering svg for syntax error
|
|
303
|
+
`);const i=Kk(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Jc(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Sm={draw:wB},TB=Sm,SB={db:{},renderer:Sm,parser:{parse:p(()=>{},"parse")}},_B=SB,_m="flowchart-elk",BB=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),vB=p(async()=>{const{diagram:e}=await import("./flowDiagram-UKHOOZJN-Z83i2UWI.js").then(function(t){return t.f});return{id:_m,diagram:e}},"loader"),LB={id:_m,detector:BB,loader:vB},FB=LB,Bm="timeline",AB=p(e=>/^\s*timeline/.test(e),"detector"),MB=p(async()=>{const{diagram:e}=await import("./timeline-definition-Z64GVDOM-CMjnh4bu.js");return{id:Bm,diagram:e}},"loader"),EB={id:Bm,detector:AB,loader:MB},$B=EB,vm="mindmap",OB=p(e=>/^\s*mindmap/.test(e),"detector"),IB=p(async()=>{const{diagram:e}=await import("./mindmap-definition-FAOFIHXS-C4vnms3i.js");return{id:vm,diagram:e}},"loader"),DB={id:vm,detector:OB,loader:IB},PB=DB,Lm="kanban",RB=p(e=>/^\s*kanban/.test(e),"detector"),NB=p(async()=>{const{diagram:e}=await import("./kanban-definition-27J2QSJJ-Cu-E_cXA.js");return{id:Lm,diagram:e}},"loader"),qB={id:Lm,detector:RB,loader:NB},WB=qB,Fm="sankey",zB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await import("./sankeyDiagram-W5VNT64P-CT5PdZz2.js");return{id:Fm,diagram:e}},"loader"),YB={id:Fm,detector:zB,loader:HB},UB=YB,Am="packet",jB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),GB=p(async()=>{const{diagram:e}=await import("./diagram-LBJQPF4R-m3a1Euj3.js");return{id:Am,diagram:e}},"loader"),XB={id:Am,detector:jB,loader:GB},Mm="radar",VB=p(e=>/^\s*radar-beta/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await import("./diagram-UB23O5K3-BWkoQZ4A.js");return{id:Mm,diagram:e}},"loader"),KB={id:Mm,detector:VB,loader:ZB},Em="block",QB=p(e=>/^\s*block(-beta)?/.test(e),"detector"),JB=p(async()=>{const{diagram:e}=await import("./blockDiagram-VBNYF7ZC-BV4sIf98.js");return{id:Em,diagram:e}},"loader"),tv={id:Em,detector:QB,loader:JB},ev=tv,$m="treeView",rv=p(e=>/^\s*treeView-beta/.test(e),"detector"),iv=p(async()=>{const{diagram:e}=await import("./diagram-7IWD3JNH-DoNximNF.js");return{id:$m,diagram:e}},"loader"),ov={id:$m,detector:rv,loader:iv},sv=ov,Om="architecture",av=p(e=>/^\s*architecture/.test(e),"detector"),nv=p(async()=>{const{diagram:e}=await import("./architectureDiagram-T3A2C74G-DZq4L18e.js");return{id:Om,diagram:e}},"loader"),lv={id:Om,detector:av,loader:nv},hv=lv,Im="eventmodeling",cv=p(e=>/^\s*eventmodeling/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await import("./diagram-B4RE2ZJO-BVA2EhnC.js");return{id:Im,diagram:e}},"loader"),uv={id:Im,detector:cv,loader:dv},fv=uv,Dm="ishikawa",pv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),gv=p(async()=>{const{diagram:e}=await import("./ishikawaDiagram-WSZJBQD7-Hm36UOQe.js");return{id:Dm,diagram:e}},"loader"),mv={id:Dm,detector:pv,loader:gv},Pm="venn",yv=p(e=>/^\s*venn-beta/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await import("./vennDiagram-T6HMQDX7-DKJW_8oU.js");return{id:Pm,diagram:e}},"loader"),xv={id:Pm,detector:yv,loader:Cv},bv=xv,Rm="treemap",kv=p(e=>/^\s*treemap/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await import("./diagram-Q27KOJAE-hy_T73PK.js");return{id:Rm,diagram:e}},"loader"),Tv={id:Rm,detector:kv,loader:wv},Nm="wardley",Sv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await import("./wardleyDiagram-T6FBY63Y-oUvgepFn.js");return{id:Nm,diagram:e}},"loader"),Bv={id:Nm,detector:Sv,loader:_v},vv=Bv,qm="cynefin",Lv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Fv=p(async()=>{const{diagram:e}=await import("./cynefinDiagram-MW4NZA55-DWZPLJcD.js");return{id:qm,diagram:e}},"loader"),Av={id:qm,detector:Lv,loader:Fv},Wm="railroad",Mv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Ev=p(async()=>{const{diagram:e}=await import("./railroadDiagram-AXF67PYL-DX8y0MzW.js");return{id:Wm,diagram:e}},"loader"),$v={id:Wm,detector:Mv,loader:Ev},zm="railroadEbnf",Ov=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Iv=p(async()=>{const{diagram:e}=await import("./ebnfDiagram-BXEA7PRR-BKs9JUHW.js");return{id:zm,diagram:e}},"loader"),Dv={id:zm,detector:Ov,loader:Iv},Hm="railroadAbnf",Pv=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Rv=p(async()=>{const{diagram:e}=await import("./abnfDiagram-N423BO3Z-CsByy-GW.js");return{id:Hm,diagram:e}},"loader"),Nv={id:Hm,detector:Pv,loader:Rv},Ym="railroadPeg",qv=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Wv=p(async()=>{const{diagram:e}=await import("./pegDiagram-VL7TDLO6-B2fFEFUH.js");return{id:Ym,diagram:e}},"loader"),zv={id:Ym,detector:qv,loader:Wv},vc=!1,Rs=p(()=>{vc||(vc=!0,Xo("error",_B,e=>e.toLowerCase().trim()==="error"),Xo("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),_a(FB,PB,hv),_a(h_,WB,hB,sB,__,$_,D_,N_,K_,eB,k_,y_,f_,$B,F_,yB,fB,kB,H_,UB,XB,G_,ev,fv,sv,KB,mv,Tv,$v,Dv,Nv,zv,bv,vv,Av))},"addDiagrams"),Hv=p(async()=>{W.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(_r).map(async([r,{detector:i,loader:o}])=>{if(o)try{Fa(r)}catch{try{const{diagram:s,id:a}=await o();Xo(a,s,i)}catch(s){throw W.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete _r[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){W.error(`Failed to load ${t.length} external diagrams`);for(const r of t)W.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Yv="graphics-document document";function Um(e,t){e.attr("role",Yv),t!==""&&e.attr("aria-roledescription",t)}p(Um,"setA11yDiagramInfo");function jm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(jm,"addSVGa11yTitleDescription");var kn=class Gm{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=Ft(),o=Sn(t,i);t=iw(t)+`
|
|
304
|
+
`;try{Fa(o)}catch{const c=U0(o);if(!c)throw new Gc(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();Xo(h,d)}const{db:s,parser:a,renderer:n,init:l}=Fa(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new Gm(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},Lc=[],Uv=p(()=>{Lc.forEach(e=>{e()}),Lc=[]},"attachFunctions"),jv=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Xm(e){const t=e.match(jc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
305
|
+
`).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
|
|
306
|
+
`):t[2];let o=o2(i,{schema:i2})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:e.slice(t[0].length),metadata:s}}p(Xm,"extractFrontMatter");var Gv=p(e=>e.replace(/\r\n?/g,`
|
|
307
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Xv=p(e=>{const{text:t,metadata:r}=Xm(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),Vv=p(e=>{const t=Ce.detectInit(e)??{},r=Ce.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Y2(e),directive:t}},"processDirectives");function Tl(e){const t=Gv(e),r=Xv(t),i=Vv(r.text),o=sl(r.config,i.directive);return e=jv(i.text),{code:e,title:r.title,config:o}}p(Tl,"preprocessDiagram");function Vm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Vm,"toBase64");var Zv=5e4,Kv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Qv="sandbox",Jv="loose",tL="http://www.w3.org/2000/svg",eL="http://www.w3.org/1999/xlink",rL="http://www.w3.org/1999/xhtml",iL="100%",oL="100%",sL="border:0;margin:0;",aL="margin:0",nL="allow-top-navigation-by-user-activation allow-popups",lL='The "iframe" tag is not supported by your browser.',hL=["foreignobject"],cL=["dominant-baseline"];function Sl(e){const t=Tl(e);return jo(),W0(t.config??{}),t}p(Sl,"processAndSetConfigs");async function Zm(e,t){Rs();try{const{code:r,config:i}=Sl(e);return{diagramType:(await Qm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Zm,"parse");var Fc=p((e,t,r=[])=>{const i=Wc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),dL=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{zh(l.styles)||n.forEach(c=>{r.insertRule(Fc(l.id,c,l.styles),r.cssRules.length)}),zh(l.textStyles)||r.insertRule(Fc(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=La(o)+`
|
|
308
|
+
`}else i+=`${e.themeCSS}
|
|
309
|
+
`;return i+La(r)},"createCssStyles"),uL=p((e,t)=>bn(r_(`${e}{${t}}`),s_([p(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===yn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[zS,YS,rm,jS,"@container","@starting-style"],yn].includes(i.type)||(W.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=kl))},"addNamespace"),o_])),"compileCSS"),fL=p((e,t,r,i)=>{const o=dL(e,r),s=hC(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return uL(i,s)},"createUserStyles"),pL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Lr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),gL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":oL,i=Vm(`<body style="${aL}">${e}</body>`);return`<iframe style="width:${iL};height:${r};${sL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${nL}">
|
|
310
|
+
${lL}
|
|
311
|
+
</iframe>`},"putIntoIFrame"),Ac=p((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",tL);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function wn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(wn,"sandboxedIframe");var mL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),yL=p(async function(e,t,r){Rs();const i=Sl(t);t=i.code;const o=Ft();W.debug(o),t.length>(o?.maxTextSize??Zv)&&(t=Kv);const s=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const q=dt(f?n:c).node();q&&"remove"in q&&q.remove()},"removeTempElements");let d=dt(document.body);const f=o.securityLevel===Qv,u=o.securityLevel===Jv,g=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const U=wn(dt(r),a);d=dt(U.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=dt(r);Ac(d,e,l,`font-family: ${g}`,eL)}else{if(mL(document,e,l,a),f){const U=wn(dt(document.body),a);d=dt(U.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=dt("body");Ac(d,e,l)}let m,y;try{m=await kn.fromText(t,{title:i.title})}catch(U){if(o.suppressErrorRendering)throw h(),U;m=await kn.fromText("error"),y=U}const C=d.select(c).node(),b=m.type,k=C.firstChild,T=k.firstChild,S=m.renderer.getClasses?.(t,m),B=fL(o,b,S,s),v=document.createElement("style");v.innerHTML=B,k.insertBefore(v,T);try{await m.renderer.draw(t,e,"11.16.1",m)}catch(U){throw o.suppressErrorRendering?h():TB.draw(t,e,"11.16.1"),U}const L=d.select(`${c} svg`),N=m.db.getAccTitle?.(),R=m.db.getAccDescription?.();Jm(b,L,N,R),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",rL);let D=d.select(c).node().innerHTML;if(W.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),D=pL(D,f,Ie(o.arrowMarkerAbsolute)),f){const U=d.select(c+" svg").node();D=gL(D,U)}else u||(D=Qr.sanitize(D,{ADD_TAGS:hL,ADD_ATTR:cL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Uv(),y)throw y;return h(),{diagramType:b,svg:D,bindFunctions:m.db.bindFunctions}},"render");function Km(e={}){const t=qt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),N0(t),t?.theme&&t.theme in He?t.themeVariables=He[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=He.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?R0(t):zc();Tn(r.logLevel),Rs()}p(Km,"initialize");var Qm=p((e,t={})=>{const{code:r}=Tl(e);return kn.fromText(r,t)},"getDiagramFromText");function Jm(e,t,r,i){Um(t,e),jm(t,r,i,t.attr("id"))}p(Jm,"addA11yInfo");var Ar=Object.freeze({render:yL,parse:Zm,getDiagramFromText:Qm,initialize:Km,getConfig:Ft,setConfig:Hc,getSiteConfig:zc,updateSiteConfig:q0,reset:p(()=>{jo()},"reset"),globalReset:p(()=>{jo(Jr)},"globalReset"),defaultConfig:Jr});Tn(Ft().logLevel);jo(Ft());var CL=p((e,t,r)=>{W.warn(e),ol(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),ty=p(async function(e={querySelector:".mermaid"}){try{await xL(e)}catch(t){if(ol(t)&&W.error(t.str),Ge.parseError&&Ge.parseError(t),!e.suppressErrors)throw W.error("Use the suppressErrors option to suppress these errors"),t}},"run"),xL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ar.getConfig();W.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");W.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(W.debug("Start On Load: "+i?.startOnLoad),Ar.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new Ce.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(o)){if(W.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=hp(Ce.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Ce.detectInit(a);h&&W.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:f}=await oy(c,a,l);l.innerHTML=d,e&&await e(c),f&&f(l)}catch(d){CL(d,n,Ge.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),ey=p(function(e){Ar.initialize(e)},"initialize"),bL=p(async function(e,t,r){W.warn("mermaid.init is deprecated. Please use run instead."),e&&ey(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ty(i)},"init"),kL=p(async(e,{lazyLoad:t=!0}={})=>{Rs(),_a(...e),t===!1&&await Hv()},"registerExternalDiagrams"),ry=p(function(){if(Ge.startOnLoad){const{startOnLoad:e}=Ar.getConfig();e&&Ge.run().catch(t=>W.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ry,!1);var wL=p(function(e){Ge.parseError=e},"setParseErrorHandler"),bs=[],xa=!1,iy=p(async()=>{if(!xa){for(xa=!0;bs.length>0;){const e=bs.shift();if(e)try{await e()}catch(t){W.error("Error executing queue",t)}}xa=!1}},"executeQueue"),TL=p(async(e,t)=>new Promise((r,i)=>{const o=p(()=>new Promise((s,a)=>{Ar.parse(e,t).then(n=>{s(n),r(n)},n=>{W.error("Error parsing",n),Ge.parseError?.(n),a(n),i(n)})}),"performCall");bs.push(o),iy().catch(i)}),"parse"),oy=p((e,t,r)=>new Promise((i,o)=>{const s=p(()=>new Promise((a,n)=>{Ar.render(e,t,r).then(l=>{a(l),i(l)},l=>{W.error("Error parsing",l),Ge.parseError?.(l),n(l),o(l)})}),"performCall");bs.push(s),iy().catch(o)}),"render"),SL=p(()=>Object.keys(_r).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ge={startOnLoad:!0,mermaidAPI:Ar,parse:TL,render:oy,init:bL,run:ty,registerExternalDiagrams:kL,registerLayoutLoaders:Jg,initialize:ey,parseError:void 0,contentLoaded:ry,setParseErrorHandler:wL,detectType:Sn,registerIconPacks:Sw,getRegisteredDiagramsMetadata:SL},Mc=Ge;/*! Check if previously processed *//*!
|
|
312
|
+
* Wait for document loaded before starting the execution
|
|
313
|
+
*/function _L(e){var t;for(const r of e.split(/\r?\n/)){const i=r.trim();if(!i||i.startsWith("%%"))continue;const o=i.match(/^([A-Z][\w-]*)\b/i);return((t=o?.[1])==null?void 0:t.toLowerCase())||""}return""}function BL(e,t){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(e.slice(Math.max(0,t-12),t))}function sy(e){return e.includes("->")||e.includes("-->")||e.includes("->>")||e.includes("-->>")||e.includes("-x")||e.includes("--x")||e.includes("-)")||e.includes("--)")||e.includes("-+")||e.includes("--+")}function vL(e){const t=e.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(t)||(function(r){const i=r.split(";",1)[0],o=i.indexOf(":");return o>0&&sy(i.slice(0,o))})(t)}function LL(e){if(!e.includes(";"))return e;const t=e.indexOf(":");if(t===-1||!(function(s,a){const n=s.slice(0,a);return/^\s*Note\b/i.test(n)||sy(n)})(e,t))return e;const r=e.slice(0,t+1),i=e.slice(t+1),o=(function(s){let a="",n=!1;for(let l=0;l<s.length;l++){const c=s[l];c!==";"||BL(s,l)||vL(s.slice(l+1))?a+=c:(a+="#59;",n=!0)}return n?a:s})(i);return o===i?e:`${r}${o}`}function FL(e){if(_L(e)!=="sequencediagram")return e;const t=e.split(/(\r\n|\n|\r)/);let r=!1;for(let i=0;i<t.length;i+=2){const o=t[i],s=LL(o);s!==o&&(t[i]=s,r=!0)}return r?t.join(""):e}var AL=Object.getOwnPropertyNames,ba=(e,t,r)=>new Promise((i,o)=>{var s=l=>{try{n(r.next(l))}catch(c){o(c)}},a=l=>{try{n(r.throw(l))}catch(c){o(c)}},n=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,a);n((r=r.apply(e,t)).next())}),ka,Fo,ML=(ka={"workers/mermaidParser.worker.js"(e){function t(r,i){return ba(this,null,function*(){var o,s;const a=(function(l,c){const h=`%%{init: {"theme": "${c==="dark"?"dark":"default"}"}}%%
|
|
314
|
+
`;return l.trimStart().startsWith("%%{")?l:h+l})(r,i),n=Mc;if(typeof n.parse=="function"){try{yield(o=n.parse)==null?void 0:o.call(n,a)}catch(l){const c=FL(a);if(c===a)throw l;yield(s=n.parse)==null?void 0:s.call(n,c)}return!0}throw new Error("mermaid.parse not available in worker")})}Mc.initialize({startOnLoad:!1,securityLevel:"strict",flowchart:{htmlLabels:!1}}),self.onmessage=r=>ba(null,null,function*(){var i;const o=r.data,s=n=>self.postMessage(n),a=o.id;try{if(o.action==="canParse")return void s({id:a,ok:!0,result:yield t(o.payload.code,o.payload.theme)});if(o.action==="findPrefix")return void s({id:a,ok:!0,result:yield(function(n,l){return ba(this,null,function*(){const c=n.split(`
|
|
315
|
+
`),h=(function(y){const C=/^(?:graph|flowchart|flowchart\s+tb|flowchart\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\b/;for(let b=0;b<y.length;b++){const k=y[b].trim();if(k&&!k.startsWith("%%")&&C.test(k))return b}return-1})(c);if(h===-1)return null;const d=c.slice(0,h+1);yield t(d.join(`
|
|
316
|
+
`),l);let f=h+1,u=c.length,g=h+1,m=0;for(;f<=u&&m<12;){const y=Math.floor((f+u)/2),C=[...d,...c.slice(h+1,y)].join(`
|
|
317
|
+
`);m++;try{yield t(C,l),g=y,f=y+1}catch{u=y-1}}return[...d,...c.slice(h+1,g)].join(`
|
|
318
|
+
`)})})(o.payload.code,o.payload.theme)});s({id:a,ok:!1,error:"Unknown action"})}catch(n){s({id:a,ok:!1,error:(i=n?.message)!=null?i:String(n)})}})}},function(){return Fo||(0,ka[AL(ka)[0]])((Fo={exports:{}}).exports,Fo),Fo.exports});ML();export{Mh as $,sl as A,qc as B,V2 as C,Kk as D,C0 as E,OL as F,o2 as G,Pi as H,$L as I,i2 as J,Fs as K,Q0 as L,Qc as M,Qr as N,dh as O,zk as P,Na as Q,X2 as R,Zi as S,we as T,O as U,I as V,aC as W,td as X,Rk as Y,q2 as Z,p as _,uC as a,Pe as a$,Ah as a0,YL as a1,NL as a2,zL as a3,WL as a4,PL as a5,Pn as a6,HL as a7,RL as a8,qr as a9,Qn as aA,Zn as aB,Ro as aC,S2 as aD,T2 as aE,w2 as aF,k2 as aG,f2 as aH,Of as aI,m2 as aJ,u2 as aK,x2 as aL,If as aM,g2 as aN,v2 as aO,B2 as aP,_2 as aQ,F2 as aR,L2 as aS,p2 as aT,Df as aU,b2 as aV,C2 as aW,y2 as aX,Pf as aY,rS as aZ,ee as a_,jL as aa,UL as ab,qL as ac,IT as ad,Vg as ae,aF as af,lt as ag,Me as ah,ro as ai,Sw as aj,il as ak,V as al,NS as am,sF as an,nF as ao,iF as ap,Q as aq,oF as ar,al as as,pS as at,lS as au,nS as av,xs as aw,Yt as ax,Vt as ay,hT as az,dC as b,bi as b0,Yf as b1,Lr as b2,Xf as b3,Oc as b4,Nk as b5,EL as b6,Ty as b7,Tw as b8,IL as b9,$n as ba,er as bb,qi as bc,Sh as bd,Cb as be,K as bf,Ef as bg,ne as bh,db as bi,En as bj,pd as bk,Ji as bl,yd as bm,DL as bn,vy as bo,eS as bp,yt as c,dt as d,Jc as e,qt as f,pC as g,je as h,ke as i,c2 as j,Ki as k,W as l,jf as m,gC as n,mC as o,cC as p,GL as q,sr as r,fC as s,wy as t,hF as u,lF as v,Q2 as w,Ce as x,Ft as y,CC as z};
|