dreamcontext 0.9.0 → 0.9.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/dist/dashboard/assets/{BrainCanvas3D-hy-bJKIJ.js → BrainCanvas3D-BvuUW-Ij.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-DduL-UlQ.js → _baseUniq-BNAWiBFl.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-CrmB7xfA.js → ar-SA-G6X2FPQ2-rNEb6-jN.js} +1 -1
- package/dist/dashboard/assets/{arc-sHUGY_nD.js → arc-DDLjNpXk.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-DgYle1Hc.js → architectureDiagram-Q4EWVU46-P208qO4N.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-xoplM1zS.js → az-AZ-76LH7QW2-Dwql62JX.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-BF4iIrZQ.js → bg-BG-XCXSNQG7-BgteTNp8.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-YPBR1t-F.js → blockDiagram-DXYQGD6D-BDSceoPt.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-KGLt7gMU.js → bn-BD-2XOGV67Q-BYJ6_efF.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-B1KEuF7Q.js → c4Diagram-AHTNJAMY-CRbiwdrM.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-BYuoubhq.js → ca-ES-6MX7JW3Y-CtFrXfas.js} +1 -1
- package/dist/dashboard/assets/channel-CJWWthUO.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-BALrhoW_.js → chunk-4BX2VUAB-kqN0Cg_r.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-8uLOmmU8.js → chunk-4TB4RGXK-CpwYPUdR.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-D2hViX7K.js → chunk-55IACEB6-CQ_4M3g4.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-C9foqo-F.js → chunk-EDXVE4YY--HdVil0f.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-D1G0o3Ow.js → chunk-FMBD7UC4-CrbfOH-q.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-CiVziVyS.js → chunk-OYMX7WX6-BrcCZnqx.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-DE5GBsSY.js → chunk-QZHKN3VN-Cby58gGN.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-BpQQIx3b.js → chunk-YZCP3GAM-tvOjDART.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-D8yKg5c-.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-D8yKg5c-.js +1 -0
- package/dist/dashboard/assets/clone-DkTWs9rv.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-KvwZaKE7.js → cose-bilkent-S5V4N54A-CuwbWQzD.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-xYBULEJ9.js → cs-CZ-2BRQDIVT-DfVAwqqU.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-DF2tyJRb.js → da-DK-5WZEPLOC-D1QJqNxG.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-Du_qjhF2.js → dagre-KV5264BT-Bbf-wMho.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-DlmZt5e9.js → de-DE-XR44H4JA-CbCdH8Mp.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-D7slatQr.js → diagram-5BDNPKRD-CvMJJUvv.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-DiCZYy5B.js → diagram-G4DWMVQ6-BBz7ebE8.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-BxckEUHv.js → diagram-MMDJMWI5-U7IcL5ZQ.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-BGh7adH7.js → diagram-TYMM5635-BfTLwlSm.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-3_nYTnDJ.js → el-GR-BZB4AONW-DvGrscY6.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-Bgu7PR3l.js → erDiagram-SMLLAGMA-C1ncTn9B.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-Blp-jVT8.js → es-ES-U4NZUMDT-BlawPkmw.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-DksJfC54.js → eu-ES-A7QVB2H4-p5lXDFKY.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-DgwscI8H.js → fa-IR-HGAKTJCU-DbY6Wzu9.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-D5xWl1j1.js → fi-FI-Z5N7JZ37-HyRJneut.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-DRYxEOwt.js → flowDiagram-DWJPFMVM-tySa4G4z.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-C5ic6hfW.js → fr-FR-RHASNOE6-C0ElnhzM.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-CNf0-tRS.js → ganttDiagram-T4ZO3ILL-BQsJPxAU.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-B-fWXvro.js → gitGraphDiagram-UUTBAWPF-B2jHjMzI.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-CYsGLfzn.js → gl-ES-HMX3MZ6V-D5qSPU7d.js} +1 -1
- package/dist/dashboard/assets/{graph-CqM3kXVs.js → graph-deVQIt7H.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-DZp7dZBD.js → he-IL-6SHJWFNN-CNsRxzJL.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-DZ-8BLt8.js → hi-IN-IWLTKZ5I-CCLXIBWK.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-cIzehzha.js → hu-HU-A5ZG7DT2-Dq17BfYB.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-CHmT4Y6G.js → id-ID-SAP4L64H-CRL19WJa.js} +1 -1
- package/dist/dashboard/assets/{index-WuRpIREk.js → index-BO_pjfQA.js} +1 -1
- package/dist/dashboard/assets/index-CQkBs_Vm.js +484 -0
- package/dist/dashboard/assets/index-aCkhI_aO.css +1 -0
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-zeTnmz1D.js → infoDiagram-42DDH7IO-DKXhFQx1.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-Bb756K5U.js → ishikawaDiagram-UXIWVN3A-ixuXBV9q.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-D6lXGD0z.js → it-IT-JPQ66NNP-B-3gnXYZ.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-DyuGqonM.js → ja-JP-DBVTYXUO-GCqLTdC-.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-DFWvXLzk.js → journeyDiagram-VCZTEJTY-Cda6rfE1.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-oNCeqt-A.js → kaa-6HZHGXH3-DUr4YiJc.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-DfP6kptf.js → kab-KAB-ZGHBKWFO-DGcoDq7_.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-DhKLuu7C.js → kanban-definition-6JOO6SKY-8II0TptL.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-B63w7yii.js → kk-KZ-P5N5QNE5-OnQ3fZQr.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-C8nYbGAM.js → km-KH-HSX4SM5Z-BgLH2RAX.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-D3wzPaIE.js → ko-KR-MTYHY66A-BFRlVzp3.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-C59UaChS.js → ku-TR-6OUDTVRD-KXxCpHg7.js} +1 -1
- package/dist/dashboard/assets/{layout-CtFtUFag.js → layout-Bk1_SQxF.js} +1 -1
- package/dist/dashboard/assets/{linear-DubzSxx7.js → linear-NBVeSfQr.js} +1 -1
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-C_buJu91.js → lt-LT-XHIRWOB4-zYih94tH.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-BhQWVAR-.js → lv-LV-5QDEKY6T-BfR2lGJU.js} +1 -1
- package/dist/dashboard/assets/{min-DcWdHBie.js → min-Czsp1-lf.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-BSWtNXnF.js → mindmap-definition-QFDTVHPH-B7iHNGK3.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-DEac6VeJ.js → mr-IN-CRQNXWMA-CbecgcF-.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-DcSFgD6q.js → my-MM-5M5IBNSE-CsdHXw4v.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-CMd5OV1y.js → nb-NO-T6EIAALU-r8FpCRvQ.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-CX2kfxhY.js → nl-NL-IS3SIHDZ-Dp3Z4P6_.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-MpSm1-uc.js → nn-NO-6E72VCQL-CQcuUlUa.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-Nso9HjoJ.js → oc-FR-POXYY2M6-Dz9rwf28.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-Bc_09DWN.js → pa-IN-N4M65BXN-AuAonL3w.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-DP6uG13u.js → percentages-BXMCSKIN-D9EnbREi.js} +7 -7
- package/dist/dashboard/assets/{pica-CMpqUhac.js → pica---loOZLP.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-BNsvSiV8.js → pieDiagram-DEJITSTG-CiDTXifX.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-CJWz-KGN.js → pl-PL-T2D74RX3-4k9qJgDf.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-DHX3cV6G.js → pt-BR-5N22H2LF-DvKuT6kK.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-CU_RnGju.js → pt-PT-UZXXM6DQ-ijbr_1VI.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-CnG8TUp0.js → quadrantDiagram-34T5L4WZ-Bu9Comci.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-CVzV4vf5.js → requirementDiagram-MS252O5E-D62TW6xA.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-aYl76VP7.js → ro-RO-JPDTUUEW-C0llzWmG.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-B_y9bRe1.js → ru-RU-B4JR7IUQ-BeSwVB2r.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-CZLhklJg.js → sankeyDiagram-XADWPNL6-TlSEi12K.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-DjCIzK1N.js → sequenceDiagram-FGHM5R23-ScKG2Xsm.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-DYVfARgr.js → si-LK-N5RQ5JYF-DWeue3dw.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-B6Mg_bJ9.js → sk-SK-C5VTKIMK-C2sh3w4f.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-Ck2a-g0A.js → sl-SI-NN7IZMDC-CeXk9ucf.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-D9Z-sJAh.js → stateDiagram-FHFEXIEX-BB1JoyXM.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-BqR3Ofhf.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-CE199FVY.js → subset-shared.chunk-CWvpWWsn.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-DKgKGIuW.js → subset-worker.chunk-D7Ec71V-.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-C9Hkuq3i.js → sv-SE-XGPEYMSR-8YPrynz7.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-IEhskXEC.js → ta-IN-2NMHFXQM-CmMKeEZv.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-DTb8f2Te.js → th-TH-HPSO5L25-BIxym374.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-n1YhmZQ4.js → timeline-definition-GMOUNBTQ-Cx1z6jhx.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-CnEnSvd1.js → tr-TR-DEFEU3FU-BZUk--nT.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-CV5yaOns.js → uk-UA-QMV73CPH-DKP6R9nZ.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-EZuBw-Y1.js → vennDiagram-DHZGUBPP-CHrTxlSz.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-C_pZqaaY.js → vi-VN-M7AON7JQ-D1tkx3Op.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-CEAA3DK-.js → wardley-RL74JXVD-DuzpwUu5.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-DhmpY-nw.js → wardleyDiagram-NUSXRM2D-x03tOVd0.js} +1 -1
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-BCfqQ3yb.js → xychartDiagram-5P7HB3ND-CufD9zuW.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-C9EPIaEx.js → zh-CN-LNUGB5OW-CpicUYEV.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-RZGyfbKw.js → zh-HK-E62DVLB3-DyNkpg-N.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-CfQ4KbkI.js → zh-TW-RAJ6MFWO-Cg30MEjI.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +553 -287
- package/package.json +1 -1
- package/dist/dashboard/assets/channel-BvyIgIvU.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-B2f-mNIc.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-B2f-mNIc.js +0 -1
- package/dist/dashboard/assets/clone-BOZwMwp7.js +0 -1
- package/dist/dashboard/assets/index-B_cYqPxr.js +0 -482
- package/dist/dashboard/assets/index-D1nedbBU.css +0 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-nhVyYoyX.js +0 -1
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BK87l45R.js","assets/core-Cn4yfEqx.js","assets/webviewWindow-Dlc9MvRw.js","assets/window-D0tFurhp.js","assets/index-D-gsCv2F.js","assets/dagre-KV5264BT-Du_qjhF2.js","assets/graph-CqM3kXVs.js","assets/_baseUniq-DduL-UlQ.js","assets/layout-CtFtUFag.js","assets/min-DcWdHBie.js","assets/clone-BOZwMwp7.js","assets/cose-bilkent-S5V4N54A-KvwZaKE7.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-B1KEuF7Q.js","assets/chunk-YZCP3GAM-BpQQIx3b.js","assets/flowDiagram-DWJPFMVM-DRYxEOwt.js","assets/chunk-FMBD7UC4-D1G0o3Ow.js","assets/chunk-55IACEB6-D2hViX7K.js","assets/chunk-EDXVE4YY-C9foqo-F.js","assets/channel-BvyIgIvU.js","assets/erDiagram-SMLLAGMA-Bgu7PR3l.js","assets/gitGraphDiagram-UUTBAWPF-B-fWXvro.js","assets/chunk-4BX2VUAB-BALrhoW_.js","assets/chunk-QZHKN3VN-DE5GBsSY.js","assets/wardley-RL74JXVD-CEAA3DK-.js","assets/ganttDiagram-T4ZO3ILL-CNf0-tRS.js","assets/linear-DubzSxx7.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-zeTnmz1D.js","assets/pieDiagram-DEJITSTG-BNsvSiV8.js","assets/arc-sHUGY_nD.js","assets/quadrantDiagram-34T5L4WZ-CnG8TUp0.js","assets/xychartDiagram-5P7HB3ND-BCfqQ3yb.js","assets/requirementDiagram-MS252O5E-CVzV4vf5.js","assets/sequenceDiagram-FGHM5R23-DjCIzK1N.js","assets/classDiagram-6PBFFD2Q-B2f-mNIc.js","assets/chunk-4TB4RGXK-8uLOmmU8.js","assets/classDiagram-v2-HSJHXN6E-B2f-mNIc.js","assets/stateDiagram-FHFEXIEX-D9Z-sJAh.js","assets/chunk-OYMX7WX6-CiVziVyS.js","assets/stateDiagram-v2-QKLJ7IA2-nhVyYoyX.js","assets/journeyDiagram-VCZTEJTY-DFWvXLzk.js","assets/timeline-definition-GMOUNBTQ-n1YhmZQ4.js","assets/mindmap-definition-QFDTVHPH-BSWtNXnF.js","assets/kanban-definition-6JOO6SKY-DhKLuu7C.js","assets/diagram-TYMM5635-BGh7adH7.js","assets/diagram-MMDJMWI5-BxckEUHv.js","assets/blockDiagram-DXYQGD6D-YPBR1t-F.js","assets/diagram-5BDNPKRD-D7slatQr.js","assets/architectureDiagram-Q4EWVU46-DgYle1Hc.js","assets/diagram-G4DWMVQ6-DiCZYy5B.js","assets/wardleyDiagram-NUSXRM2D-DhmpY-nw.js","assets/percentages-BXMCSKIN-DP6uG13u.js","assets/extends-CF3RwP-h.js","assets/percentages-BXMCSKIN-DnMnD4LF.css","assets/BrainCanvas3D-hy-bJKIJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var z4=Object.defineProperty;var US=i=>{throw TypeError(i)};var P4=(i,e,r)=>e in i?z4(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var ge=(i,e,r)=>P4(i,typeof e!="symbol"?e+"":e,r),Ib=(i,e,r)=>e.has(i)||US("Cannot "+r);var et=(i,e,r)=>(Ib(i,e,"read from private field"),r?r.call(i):e.get(i)),me=(i,e,r)=>e.has(i)?US("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),Qt=(i,e,r,n)=>(Ib(i,e,"write to private field"),n?n.call(i,r):e.set(i,r),r),We=(i,e,r)=>(Ib(i,e,"access private method"),r);var fp=(i,e,r,n)=>({set _(a){Qt(i,e,a,r)},get _(){return et(i,e,n)}});function q4(i,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in i)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(i,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();var Xot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $d(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Zot(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var e=i.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var a=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return i[n]}})}),r}var $b={exports:{}},vu={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var HS;function U4(){if(HS)return vu;HS=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var h in a)h!=="key"&&(o[h]=a[h])}else o=a;return a=o.ref,{$$typeof:i,type:n,key:c,ref:a!==void 0?a:null,props:o}}return vu.Fragment=e,vu.jsx=r,vu.jsxs=r,vu}var WS;function H4(){return WS||(WS=1,$b.exports=U4()),$b.exports}var m=H4(),zb={exports:{}},De={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var GS;function W4(){if(GS)return De;GS=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function y(G){return G===null||typeof G!="object"?null:(G=x&&G[x]||G["@@iterator"],typeof G=="function"?G:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function k(G,tt,ft){this.props=G,this.context=tt,this.refs=_,this.updater=ft||v}k.prototype.isReactComponent={},k.prototype.setState=function(G,tt){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,tt,"setState")},k.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function T(){}T.prototype=k.prototype;function N(G,tt,ft){this.props=G,this.context=tt,this.refs=_,this.updater=ft||v}var E=N.prototype=new T;E.constructor=N,C(E,k.prototype),E.isPureReactComponent=!0;var B=Array.isArray;function O(){}var A={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function I(G,tt,ft){var ct=ft.ref;return{$$typeof:i,type:G,key:tt,ref:ct!==void 0?ct:null,props:ft}}function D(G,tt){return I(G.type,tt,G.props)}function F(G){return typeof G=="object"&&G!==null&&G.$$typeof===i}function U(G){var tt={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(ft){return tt[ft]})}var K=/\/+/g;function z(G,tt){return typeof G=="object"&&G!==null&&G.key!=null?U(""+G.key):tt.toString(36)}function W(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(O,O):(G.status="pending",G.then(function(tt){G.status==="pending"&&(G.status="fulfilled",G.value=tt)},function(tt){G.status==="pending"&&(G.status="rejected",G.reason=tt)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function j(G,tt,ft,ct,vt){var ot=typeof G;(ot==="undefined"||ot==="boolean")&&(G=null);var wt=!1;if(G===null)wt=!0;else switch(ot){case"bigint":case"string":case"number":wt=!0;break;case"object":switch(G.$$typeof){case i:case e:wt=!0;break;case f:return wt=G._init,j(wt(G._payload),tt,ft,ct,vt)}}if(wt)return vt=vt(G),wt=ct===""?"."+z(G,0):ct,B(vt)?(ft="",wt!=null&&(ft=wt.replace(K,"$&/")+"/"),j(vt,tt,ft,"",function(at){return at})):vt!=null&&(F(vt)&&(vt=D(vt,ft+(vt.key==null||G&&G.key===vt.key?"":(""+vt.key).replace(K,"$&/")+"/")+wt)),tt.push(vt)),1;wt=0;var it=ct===""?".":ct+":";if(B(G))for(var V=0;V<G.length;V++)ct=G[V],ot=it+z(ct,V),wt+=j(ct,tt,ft,ot,vt);else if(V=y(G),typeof V=="function")for(G=V.call(G),V=0;!(ct=G.next()).done;)ct=ct.value,ot=it+z(ct,V++),wt+=j(ct,tt,ft,ot,vt);else if(ot==="object"){if(typeof G.then=="function")return j(W(G),tt,ft,ct,vt);throw tt=String(G),Error("Objects are not valid as a React child (found: "+(tt==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":tt)+"). If you meant to render a collection of children, use an array instead.")}return wt}function H(G,tt,ft){if(G==null)return G;var ct=[],vt=0;return j(G,ct,"","",function(ot){return tt.call(ft,ot,vt++)}),ct}function Y(G){if(G._status===-1){var tt=G._result;tt=tt(),tt.then(function(ft){(G._status===0||G._status===-1)&&(G._status=1,G._result=ft)},function(ft){(G._status===0||G._status===-1)&&(G._status=2,G._result=ft)}),G._status===-1&&(G._status=0,G._result=tt)}if(G._status===1)return G._result.default;throw G._result}var Z=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var tt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(tt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)},rt={map:H,forEach:function(G,tt,ft){H(G,function(){tt.apply(this,arguments)},ft)},count:function(G){var tt=0;return H(G,function(){tt++}),tt},toArray:function(G){return H(G,function(tt){return tt})||[]},only:function(G){if(!F(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return De.Activity=g,De.Children=rt,De.Component=k,De.Fragment=r,De.Profiler=a,De.PureComponent=N,De.StrictMode=n,De.Suspense=u,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,De.__COMPILER_RUNTIME={__proto__:null,c:function(G){return A.H.useMemoCache(G)}},De.cache=function(G){return function(){return G.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(G,tt,ft){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var ct=C({},G.props),vt=G.key;if(tt!=null)for(ot in tt.key!==void 0&&(vt=""+tt.key),tt)!M.call(tt,ot)||ot==="key"||ot==="__self"||ot==="__source"||ot==="ref"&&tt.ref===void 0||(ct[ot]=tt[ot]);var ot=arguments.length-2;if(ot===1)ct.children=ft;else if(1<ot){for(var wt=Array(ot),it=0;it<ot;it++)wt[it]=arguments[it+2];ct.children=wt}return I(G.type,vt,ct)},De.createContext=function(G){return G={$$typeof:c,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:o,_context:G},G},De.createElement=function(G,tt,ft){var ct,vt={},ot=null;if(tt!=null)for(ct in tt.key!==void 0&&(ot=""+tt.key),tt)M.call(tt,ct)&&ct!=="key"&&ct!=="__self"&&ct!=="__source"&&(vt[ct]=tt[ct]);var wt=arguments.length-2;if(wt===1)vt.children=ft;else if(1<wt){for(var it=Array(wt),V=0;V<wt;V++)it[V]=arguments[V+2];vt.children=it}if(G&&G.defaultProps)for(ct in wt=G.defaultProps,wt)vt[ct]===void 0&&(vt[ct]=wt[ct]);return I(G,ot,vt)},De.createRef=function(){return{current:null}},De.forwardRef=function(G){return{$$typeof:h,render:G}},De.isValidElement=F,De.lazy=function(G){return{$$typeof:f,_payload:{_status:-1,_result:G},_init:Y}},De.memo=function(G,tt){return{$$typeof:d,type:G,compare:tt===void 0?null:tt}},De.startTransition=function(G){var tt=A.T,ft={};A.T=ft;try{var ct=G(),vt=A.S;vt!==null&&vt(ft,ct),typeof ct=="object"&&ct!==null&&typeof ct.then=="function"&&ct.then(O,Z)}catch(ot){Z(ot)}finally{tt!==null&&ft.types!==null&&(tt.types=ft.types),A.T=tt}},De.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},De.use=function(G){return A.H.use(G)},De.useActionState=function(G,tt,ft){return A.H.useActionState(G,tt,ft)},De.useCallback=function(G,tt){return A.H.useCallback(G,tt)},De.useContext=function(G){return A.H.useContext(G)},De.useDebugValue=function(){},De.useDeferredValue=function(G,tt){return A.H.useDeferredValue(G,tt)},De.useEffect=function(G,tt){return A.H.useEffect(G,tt)},De.useEffectEvent=function(G){return A.H.useEffectEvent(G)},De.useId=function(){return A.H.useId()},De.useImperativeHandle=function(G,tt,ft){return A.H.useImperativeHandle(G,tt,ft)},De.useInsertionEffect=function(G,tt){return A.H.useInsertionEffect(G,tt)},De.useLayoutEffect=function(G,tt){return A.H.useLayoutEffect(G,tt)},De.useMemo=function(G,tt){return A.H.useMemo(G,tt)},De.useOptimistic=function(G,tt){return A.H.useOptimistic(G,tt)},De.useReducer=function(G,tt,ft){return A.H.useReducer(G,tt,ft)},De.useRef=function(G){return A.H.useRef(G)},De.useState=function(G){return A.H.useState(G)},De.useSyncExternalStore=function(G,tt,ft){return A.H.useSyncExternalStore(G,tt,ft)},De.useTransition=function(){return A.H.useTransition()},De.version="19.2.4",De}var YS;function A1(){return YS||(YS=1,zb.exports=W4()),zb.exports}var P=A1();const cM=$d(P),Qot=q4({__proto__:null,default:cM},[P]);var Pb={exports:{}},Cu={},qb={exports:{}},Ub={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var KS;function G4(){return KS||(KS=1,(function(i){function e(j,H){var Y=j.length;j.push(H);t:for(;0<Y;){var Z=Y-1>>>1,rt=j[Z];if(0<a(rt,H))j[Z]=H,j[Y]=rt,Y=Z;else break t}}function r(j){return j.length===0?null:j[0]}function n(j){if(j.length===0)return null;var H=j[0],Y=j.pop();if(Y!==H){j[0]=Y;t:for(var Z=0,rt=j.length,G=rt>>>1;Z<G;){var tt=2*(Z+1)-1,ft=j[tt],ct=tt+1,vt=j[ct];if(0>a(ft,Y))ct<rt&&0>a(vt,ft)?(j[Z]=vt,j[ct]=Y,Z=ct):(j[Z]=ft,j[tt]=Y,Z=tt);else if(ct<rt&&0>a(vt,Y))j[Z]=vt,j[ct]=Y,Z=ct;else break t}}return H}function a(j,H){var Y=j.sortIndex-H.sortIndex;return Y!==0?Y:j.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;i.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();i.unstable_now=function(){return c.now()-h}}var u=[],d=[],f=1,g=null,x=3,y=!1,v=!1,C=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function E(j){for(var H=r(d);H!==null;){if(H.callback===null)n(d);else if(H.startTime<=j)n(d),H.sortIndex=H.expirationTime,e(u,H);else break;H=r(d)}}function B(j){if(C=!1,E(j),!v)if(r(u)!==null)v=!0,O||(O=!0,U());else{var H=r(d);H!==null&&W(B,H.startTime-j)}}var O=!1,A=-1,M=5,I=-1;function D(){return _?!0:!(i.unstable_now()-I<M)}function F(){if(_=!1,O){var j=i.unstable_now();I=j;var H=!0;try{t:{v=!1,C&&(C=!1,T(A),A=-1),y=!0;var Y=x;try{e:{for(E(j),g=r(u);g!==null&&!(g.expirationTime>j&&D());){var Z=g.callback;if(typeof Z=="function"){g.callback=null,x=g.priorityLevel;var rt=Z(g.expirationTime<=j);if(j=i.unstable_now(),typeof rt=="function"){g.callback=rt,E(j),H=!0;break e}g===r(u)&&n(u),E(j)}else n(u);g=r(u)}if(g!==null)H=!0;else{var G=r(d);G!==null&&W(B,G.startTime-j),H=!1}}break t}finally{g=null,x=Y,y=!1}H=void 0}}finally{H?U():O=!1}}}var U;if(typeof N=="function")U=function(){N(F)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,z=K.port2;K.port1.onmessage=F,U=function(){z.postMessage(null)}}else U=function(){k(F,0)};function W(j,H){A=k(function(){j(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(j){j.callback=null},i.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<j?Math.floor(1e3/j):5},i.unstable_getCurrentPriorityLevel=function(){return x},i.unstable_next=function(j){switch(x){case 1:case 2:case 3:var H=3;break;default:H=x}var Y=x;x=H;try{return j()}finally{x=Y}},i.unstable_requestPaint=function(){_=!0},i.unstable_runWithPriority=function(j,H){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var Y=x;x=j;try{return H()}finally{x=Y}},i.unstable_scheduleCallback=function(j,H,Y){var Z=i.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?Z+Y:Z):Y=Z,j){case 1:var rt=-1;break;case 2:rt=250;break;case 5:rt=1073741823;break;case 4:rt=1e4;break;default:rt=5e3}return rt=Y+rt,j={id:f++,callback:H,priorityLevel:j,startTime:Y,expirationTime:rt,sortIndex:-1},Y>Z?(j.sortIndex=Y,e(d,j),r(u)===null&&j===r(d)&&(C?(T(A),A=-1):C=!0,W(B,Y-Z))):(j.sortIndex=rt,e(u,j),v||y||(v=!0,O||(O=!0,U()))),j},i.unstable_shouldYield=D,i.unstable_wrapCallback=function(j){var H=x;return function(){var Y=x;x=H;try{return j.apply(this,arguments)}finally{x=Y}}}})(Ub)),Ub}var VS;function Y4(){return VS||(VS=1,qb.exports=G4()),qb.exports}var Hb={exports:{}},Ir={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var XS;function K4(){if(XS)return Ir;XS=1;var i=A1();function e(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)d+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(u,d,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:u,containerInfo:d,implementation:f}}var c=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Ir.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Ir.createPortal=function(u,d){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(e(299));return o(u,d,null,f)},Ir.flushSync=function(u){var d=c.T,f=n.p;try{if(c.T=null,n.p=2,u)return u()}finally{c.T=d,n.p=f,n.d.f()}},Ir.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,n.d.C(u,d))},Ir.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},Ir.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var f=d.as,g=h(f,d.crossOrigin),x=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;f==="style"?n.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:y}):f==="script"&&n.d.X(u,{crossOrigin:g,integrity:x,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Ir.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var f=h(d.as,d.crossOrigin);n.d.M(u,{crossOrigin:f,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&n.d.M(u)},Ir.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var f=d.as,g=h(f,d.crossOrigin);n.d.L(u,f,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Ir.preloadModule=function(u,d){if(typeof u=="string")if(d){var f=h(d.as,d.crossOrigin);n.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:f,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else n.d.m(u)},Ir.requestFormReset=function(u){n.d.r(u)},Ir.unstable_batchedUpdates=function(u,d){return u(d)},Ir.useFormState=function(u,d,f){return c.H.useFormState(u,d,f)},Ir.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ir.version="19.2.4",Ir}var ZS;function V4(){if(ZS)return Hb.exports;ZS=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Hb.exports=K4(),Hb.exports}/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var QS;function X4(){if(QS)return Cu;QS=1;var i=Y4(),e=A1(),r=V4();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)l+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,p=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(p=l.return),s=l.return;while(s)}return l.tag===3?p:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function h(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function d(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var p=s,b=l;;){var w=p.return;if(w===null)break;var S=w.alternate;if(S===null){if(b=w.return,b!==null){p=b;continue}break}if(w.child===S.child){for(S=w.child;S;){if(S===p)return u(w),s;if(S===b)return u(w),l;S=S.sibling}throw Error(n(188))}if(p.return!==b.return)p=w,b=S;else{for(var R=!1,q=w.child;q;){if(q===p){R=!0,p=w,b=S;break}if(q===b){R=!0,b=w,p=S;break}q=q.sibling}if(!R){for(q=S.child;q;){if(q===p){R=!0,p=S,b=w;break}if(q===b){R=!0,b=S,p=w;break}q=q.sibling}if(!R)throw Error(n(189))}}if(p.alternate!==b)throw Error(n(190))}if(p.tag!==3)throw Error(n(188));return p.stateNode.current===p?s:l}function f(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=f(s),l!==null)return l;s=s.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),N=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function U(s){return s===null||typeof s!="object"?null:(s=F&&s[F]||s["@@iterator"],typeof s=="function"?s:null)}var K=Symbol.for("react.client.reference");function z(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===K?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case k:return"Profiler";case _:return"StrictMode";case B:return"Suspense";case O:return"SuspenseList";case I:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case v:return"Portal";case N:return s.displayName||"Context";case T:return(s._context.displayName||"Context")+".Consumer";case E:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case A:return l=s.displayName||null,l!==null?l:z(s.type)||"Memo";case M:l=s._payload,s=s._init;try{return z(s(l))}catch{}}return null}var W=Array.isArray,j=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},Z=[],rt=-1;function G(s){return{current:s}}function tt(s){0>rt||(s.current=Z[rt],Z[rt]=null,rt--)}function ft(s,l){rt++,Z[rt]=s.current,s.current=l}var ct=G(null),vt=G(null),ot=G(null),wt=G(null);function it(s,l){switch(ft(ot,l),ft(vt,s),ft(ct,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?dS(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=dS(l),s=fS(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}tt(ct),ft(ct,s)}function V(){tt(ct),tt(vt),tt(ot)}function at(s){s.memoizedState!==null&&ft(wt,s);var l=ct.current,p=fS(l,s.type);l!==p&&(ft(vt,s),ft(ct,p))}function Ct(s){vt.current===s&&(tt(ct),tt(vt)),wt.current===s&&(tt(wt),mu._currentValue=Y)}var Bt,Ht;function re(s){if(Bt===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);Bt=l&&l[1]||"",Ht=-1<p.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+Bt+s+Ht}var Dt=!1;function xt(s,l){if(!s||Dt)return"";Dt=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var b={DetermineComponentFrameRoot:function(){try{if(l){var Mt=function(){throw Error()};if(Object.defineProperty(Mt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Mt,[])}catch(kt){var bt=kt}Reflect.construct(s,[],Mt)}else{try{Mt.call()}catch(kt){bt=kt}s.call(Mt.prototype)}}else{try{throw Error()}catch(kt){bt=kt}(Mt=s())&&typeof Mt.catch=="function"&&Mt.catch(function(){})}}catch(kt){if(kt&&bt&&typeof kt.stack=="string")return[kt.stack,bt.stack]}return[null,null]}};b.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(b.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(b.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=b.DetermineComponentFrameRoot(),R=S[0],q=S[1];if(R&&q){var Q=R.split(`
|
|
45
|
-
`),mt=q.split(`
|
|
46
|
-
`);for(w=b=0;b<Q.length&&!Q[b].includes("DetermineComponentFrameRoot");)b++;for(;w<mt.length&&!mt[w].includes("DetermineComponentFrameRoot");)w++;if(b===Q.length||w===mt.length)for(b=Q.length-1,w=mt.length-1;1<=b&&0<=w&&Q[b]!==mt[w];)w--;for(;1<=b&&0<=w;b--,w--)if(Q[b]!==mt[w]){if(b!==1||w!==1)do if(b--,w--,0>w||Q[b]!==mt[w]){var Nt=`
|
|
47
|
-
`+Q[b].replace(" at new "," at ");return s.displayName&&Nt.includes("<anonymous>")&&(Nt=Nt.replace("<anonymous>",s.displayName)),Nt}while(1<=b&&0<=w);break}}}finally{Dt=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?re(p):""}function Ut(s,l){switch(s.tag){case 26:case 27:case 5:return re(s.type);case 16:return re("Lazy");case 13:return s.child!==l&&l!==null?re("Suspense Fallback"):re("Suspense");case 19:return re("SuspenseList");case 0:case 15:return xt(s.type,!1);case 11:return xt(s.type.render,!1);case 1:return xt(s.type,!0);case 31:return re("Activity");default:return""}}function Yt(s){try{var l="",p=null;do l+=Ut(s,p),p=s,s=s.return;while(s);return l}catch(b){return`
|
|
48
|
-
Error generating stack: `+b.message+`
|
|
49
|
-
`+b.stack}}var ht=Object.prototype.hasOwnProperty,st=i.unstable_scheduleCallback,Ot=i.unstable_cancelCallback,$t=i.unstable_shouldYield,Gt=i.unstable_requestPaint,jt=i.unstable_now,ae=i.unstable_getCurrentPriorityLevel,It=i.unstable_ImmediatePriority,je=i.unstable_UserBlockingPriority,ve=i.unstable_NormalPriority,He=i.unstable_LowPriority,Be=i.unstable_IdlePriority,ki=i.log,Li=i.unstable_setDisableYieldValue,Ge=null,Ze=null;function li(s){if(typeof ki=="function"&&Li(s),Ze&&typeof Ze.setStrictMode=="function")try{Ze.setStrictMode(Ge,s)}catch{}}var ye=Math.clz32?Math.clz32:Ei,si=Math.log,$e=Math.LN2;function Ei(s){return s>>>=0,s===0?32:31-(si(s)/$e|0)|0}var Ce=256,Oi=262144,Xi=4194304;function Ni(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function J(s,l,p){var b=s.pendingLanes;if(b===0)return 0;var w=0,S=s.suspendedLanes,R=s.pingedLanes;s=s.warmLanes;var q=b&134217727;return q!==0?(b=q&~S,b!==0?w=Ni(b):(R&=q,R!==0?w=Ni(R):p||(p=q&~s,p!==0&&(w=Ni(p))))):(q=b&~S,q!==0?w=Ni(q):R!==0?w=Ni(R):p||(p=b&~s,p!==0&&(w=Ni(p)))),w===0?0:l!==0&&l!==w&&(l&S)===0&&(S=w&-w,p=l&-l,S>=p||S===32&&(p&4194048)!==0)?l:w}function Et(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function qt(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _e(){var s=Xi;return Xi<<=1,(Xi&62914560)===0&&(Xi=4194304),s}function gi(s){for(var l=[],p=0;31>p;p++)l.push(s);return l}function Se(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Jt(s,l,p,b,w,S){var R=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var q=s.entanglements,Q=s.expirationTimes,mt=s.hiddenUpdates;for(p=R&~p;0<p;){var Nt=31-ye(p),Mt=1<<Nt;q[Nt]=0,Q[Nt]=-1;var bt=mt[Nt];if(bt!==null)for(mt[Nt]=null,Nt=0;Nt<bt.length;Nt++){var kt=bt[Nt];kt!==null&&(kt.lane&=-536870913)}p&=~Mt}b!==0&&Xt(s,b,0),S!==0&&w===0&&s.tag!==0&&(s.suspendedLanes|=S&~(R&~l))}function Xt(s,l,p){s.pendingLanes|=l,s.suspendedLanes&=~l;var b=31-ye(l);s.entangledLanes|=l,s.entanglements[b]=s.entanglements[b]|1073741824|p&261930}function be(s,l){var p=s.entangledLanes|=l;for(s=s.entanglements;p;){var b=31-ye(p),w=1<<b;w&l|s[b]&l&&(s[b]|=l),p&=~w}}function mi(s,l){var p=l&-l;return p=(p&42)!==0?1:wi(p),(p&(s.suspendedLanes|l))!==0?0:p}function wi(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function ln(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Yr(){var s=H.p;return s!==0?s:(s=window.event,s===void 0?32:DS(s.type))}function lr(s,l){var p=H.p;try{return H.p=s,l()}finally{H.p=p}}var cr=Math.random().toString(36).slice(2),Ri="__reactFiber$"+cr,Zi="__reactProps$"+cr,kn="__reactContainer$"+cr,In="__reactEvents$"+cr,wn="__reactListeners$"+cr,Sn="__reactHandles$"+cr,Er="__reactResources$"+cr,$n="__reactMarker$"+cr;function Ea(s){delete s[Ri],delete s[Zi],delete s[In],delete s[wn],delete s[Sn]}function mr(s){var l=s[Ri];if(l)return l;for(var p=s.parentNode;p;){if(l=p[kn]||p[Ri]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(s=vS(s);s!==null;){if(p=s[Ri])return p;s=vS(s)}return l}s=p,p=s.parentNode}return null}function Kr(s){if(s=s[Ri]||s[kn]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function cn(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function yr(s){var l=s[Er];return l||(l=s[Er]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function yi(s){s[$n]=!0}var ee=new Set,X={};function Tt(s,l){pt(s,l),pt(s+"Capture",l)}function pt(s,l){for(X[s]=l,s=0;s<l.length;s++)ee.add(l[s])}var zt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Kt={},de={};function Ke(s){return ht.call(de,s)?!0:ht.call(Kt,s)?!1:zt.test(s)?de[s]=!0:(Kt[s]=!0,!1)}function bi(s,l,p){if(Ke(l))if(p===null)s.removeAttribute(l);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var b=l.toLowerCase().slice(0,5);if(b!=="data-"&&b!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+p)}}function ii(s,l,p){if(p===null)s.removeAttribute(l);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+p)}}function Yi(s,l,p,b){if(b===null)s.removeAttribute(p);else{switch(typeof b){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(p);return}s.setAttributeNS(l,p,""+b)}}function Le(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Qi(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function zn(s,l,p){var b=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof b<"u"&&typeof b.get=="function"&&typeof b.set=="function"){var w=b.get,S=b.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return w.call(this)},set:function(R){p=""+R,S.call(this,R)}}),Object.defineProperty(s,l,{enumerable:b.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function la(s){if(!s._valueTracker){var l=Qi(s)?"checked":"value";s._valueTracker=zn(s,l,""+s[l])}}function Ps(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var p=l.getValue(),b="";return s&&(b=Qi(s)?s.checked?"true":"false":s.value),s=b,s!==p?(l.setValue(s),!0):!1}function Ja(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Wo=/[\n"\\]/g;function Nr(s){return s.replace(Wo,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Pn(s,l,p,b,w,S,R,q){s.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?s.type=R:s.removeAttribute("type"),l!=null?R==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Le(l)):s.value!==""+Le(l)&&(s.value=""+Le(l)):R!=="submit"&&R!=="reset"||s.removeAttribute("value"),l!=null?Ft(s,R,Le(l)):p!=null?Ft(s,R,Le(p)):b!=null&&s.removeAttribute("value"),w==null&&S!=null&&(s.defaultChecked=!!S),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?s.name=""+Le(q):s.removeAttribute("name")}function yt(s,l,p,b,w,S,R,q){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.type=S),l!=null||p!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){la(s);return}p=p!=null?""+Le(p):"",l=l!=null?""+Le(l):p,q||l===s.value||(s.value=l),s.defaultValue=l}b=b??w,b=typeof b!="function"&&typeof b!="symbol"&&!!b,s.checked=q?s.checked:!!b,s.defaultChecked=!!b,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(s.name=R),la(s)}function Ft(s,l,p){l==="number"&&Ja(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Rt(s,l,p,b){if(s=s.options,l){l={};for(var w=0;w<p.length;w++)l["$"+p[w]]=!0;for(p=0;p<s.length;p++)w=l.hasOwnProperty("$"+s[p].value),s[p].selected!==w&&(s[p].selected=w),w&&b&&(s[p].defaultSelected=!0)}else{for(p=""+Le(p),l=null,w=0;w<s.length;w++){if(s[w].value===p){s[w].selected=!0,b&&(s[w].defaultSelected=!0);return}l!==null||s[w].disabled||(l=s[w])}l!==null&&(l.selected=!0)}}function Zt(s,l,p){if(l!=null&&(l=""+Le(l),l!==s.value&&(s.value=l),p==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=p!=null?""+Le(p):""}function Pe(s,l,p,b){if(l==null){if(b!=null){if(p!=null)throw Error(n(92));if(W(b)){if(1<b.length)throw Error(n(93));b=b[0]}p=b}p==null&&(p=""),l=p}p=Le(l),s.defaultValue=p,b=s.textContent,b===p&&b!==""&&b!==null&&(s.value=b),la(s)}function Vt(s,l){if(l){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=l;return}}s.textContent=l}var ci=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ye(s,l,p){var b=l.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?b?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":b?s.setProperty(l,p):typeof p!="number"||p===0||ci.has(l)?l==="float"?s.cssFloat=p:s[l]=(""+p).trim():s[l]=p+"px"}function Qe(s,l,p){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,p!=null){for(var b in p)!p.hasOwnProperty(b)||l!=null&&l.hasOwnProperty(b)||(b.indexOf("--")===0?s.setProperty(b,""):b==="float"?s.cssFloat="":s[b]="");for(var w in l)b=l[w],l.hasOwnProperty(w)&&p[w]!==b&&Ye(s,w,b)}else for(var S in l)l.hasOwnProperty(S)&&Ye(s,S,l[S])}function Fr(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qn=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),qs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Us(s){return qs.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Wt(){}var ce=null;function Ie(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Je=null,Ki=null;function Un(s){var l=Kr(s);if(l&&(s=l.stateNode)){var p=s[Zi]||null;t:switch(s=l.stateNode,l.type){case"input":if(Pn(s,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),l=p.name,p.type==="radio"&&l!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+Nr(""+l)+'"][type="radio"]'),l=0;l<p.length;l++){var b=p[l];if(b!==s&&b.form===s.form){var w=b[Zi]||null;if(!w)throw Error(n(90));Pn(b,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(l=0;l<p.length;l++)b=p[l],b.form===s.form&&Ps(b)}break t;case"textarea":Zt(s,p.value,p.defaultValue);break t;case"select":l=p.value,l!=null&&Rt(s,!!p.multiple,l,!1)}}}var Lh=!1;function nf(s,l,p){if(Lh)return s(l,p);Lh=!0;try{var b=s(l);return b}finally{if(Lh=!1,(Je!==null||Ki!==null)&&(Wf(),Je&&(l=Je,s=Ki,Ki=Je=null,Un(l),s)))for(l=0;l<s.length;l++)Un(s[l])}}function Oh(s,l){var p=s.stateNode;if(p===null)return null;var b=p[Zi]||null;if(b===null)return null;p=b[l];t:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(b=!b.disabled)||(s=s.type,b=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!b;break t;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(n(231,l,typeof p));return p}var ts=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Im=!1;if(ts)try{var Rh={};Object.defineProperty(Rh,"passive",{get:function(){Im=!0}}),window.addEventListener("test",Rh,Rh),window.removeEventListener("test",Rh,Rh)}catch{Im=!1}var Hs=null,$m=null,af=null;function f_(){if(af)return af;var s,l=$m,p=l.length,b,w="value"in Hs?Hs.value:Hs.textContent,S=w.length;for(s=0;s<p&&l[s]===w[s];s++);var R=p-s;for(b=1;b<=R&&l[p-b]===w[S-b];b++);return af=w.slice(s,1<b?1-b:void 0)}function sf(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function of(){return!0}function p_(){return!1}function hn(s){function l(p,b,w,S,R){this._reactName=p,this._targetInst=w,this.type=b,this.nativeEvent=S,this.target=R,this.currentTarget=null;for(var q in s)s.hasOwnProperty(q)&&(p=s[q],this[q]=p?p(S):S[q]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?of:p_,this.isPropagationStopped=p_,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=of)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=of)},persist:function(){},isPersistent:of}),l}var Go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lf=hn(Go),jh=g({},Go,{view:0,detail:0}),ID=hn(jh),zm,Pm,Dh,cf=g({},jh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Um,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Dh&&(Dh&&s.type==="mousemove"?(zm=s.screenX-Dh.screenX,Pm=s.screenY-Dh.screenY):Pm=zm=0,Dh=s),zm)},movementY:function(s){return"movementY"in s?s.movementY:Pm}}),g_=hn(cf),$D=g({},cf,{dataTransfer:0}),zD=hn($D),PD=g({},jh,{relatedTarget:0}),qm=hn(PD),qD=g({},Go,{animationName:0,elapsedTime:0,pseudoElement:0}),UD=hn(qD),HD=g({},Go,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),WD=hn(HD),GD=g({},Go,{data:0}),m_=hn(GD),YD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},VD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XD(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=VD[s])?!!l[s]:!1}function Um(){return XD}var ZD=g({},jh,{key:function(s){if(s.key){var l=YD[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=sf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?KD[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Um,charCode:function(s){return s.type==="keypress"?sf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?sf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),QD=hn(ZD),JD=g({},cf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),y_=hn(JD),tF=g({},jh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Um}),eF=hn(tF),iF=g({},Go,{propertyName:0,elapsedTime:0,pseudoElement:0}),rF=hn(iF),nF=g({},cf,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),aF=hn(nF),sF=g({},Go,{newState:0,oldState:0}),oF=hn(sF),lF=[9,13,27,32],Hm=ts&&"CompositionEvent"in window,Fh=null;ts&&"documentMode"in document&&(Fh=document.documentMode);var cF=ts&&"TextEvent"in window&&!Fh,b_=ts&&(!Hm||Fh&&8<Fh&&11>=Fh),x_=" ",v_=!1;function C_(s,l){switch(s){case"keyup":return lF.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function __(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Zl=!1;function hF(s,l){switch(s){case"compositionend":return __(l);case"keypress":return l.which!==32?null:(v_=!0,x_);case"textInput":return s=l.data,s===x_&&v_?null:s;default:return null}}function uF(s,l){if(Zl)return s==="compositionend"||!Hm&&C_(s,l)?(s=f_(),af=$m=Hs=null,Zl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return b_&&l.locale!=="ko"?null:l.data;default:return null}}var dF={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function k_(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!dF[s.type]:l==="textarea"}function w_(s,l,p,b){Je?Ki?Ki.push(b):Ki=[b]:Je=b,l=Qf(l,"onChange"),0<l.length&&(p=new lf("onChange","change",null,p,b),s.push({event:p,listeners:l}))}var Ih=null,$h=null;function fF(s){sS(s,0)}function hf(s){var l=cn(s);if(Ps(l))return s}function S_(s,l){if(s==="change")return l}var T_=!1;if(ts){var Wm;if(ts){var Gm="oninput"in document;if(!Gm){var E_=document.createElement("div");E_.setAttribute("oninput","return;"),Gm=typeof E_.oninput=="function"}Wm=Gm}else Wm=!1;T_=Wm&&(!document.documentMode||9<document.documentMode)}function N_(){Ih&&(Ih.detachEvent("onpropertychange",A_),$h=Ih=null)}function A_(s){if(s.propertyName==="value"&&hf($h)){var l=[];w_(l,$h,s,Ie(s)),nf(fF,l)}}function pF(s,l,p){s==="focusin"?(N_(),Ih=l,$h=p,Ih.attachEvent("onpropertychange",A_)):s==="focusout"&&N_()}function gF(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return hf($h)}function mF(s,l){if(s==="click")return hf(l)}function yF(s,l){if(s==="input"||s==="change")return hf(l)}function bF(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Tn=typeof Object.is=="function"?Object.is:bF;function zh(s,l){if(Tn(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var p=Object.keys(s),b=Object.keys(l);if(p.length!==b.length)return!1;for(b=0;b<p.length;b++){var w=p[b];if(!ht.call(l,w)||!Tn(s[w],l[w]))return!1}return!0}function M_(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function B_(s,l){var p=M_(s);s=0;for(var b;p;){if(p.nodeType===3){if(b=s+p.textContent.length,s<=l&&b>=l)return{node:p,offset:l-s};s=b}t:{for(;p;){if(p.nextSibling){p=p.nextSibling;break t}p=p.parentNode}p=void 0}p=M_(p)}}function L_(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?L_(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function O_(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Ja(s.document);l instanceof s.HTMLIFrameElement;){try{var p=typeof l.contentWindow.location.href=="string"}catch{p=!1}if(p)s=l.contentWindow;else break;l=Ja(s.document)}return l}function Ym(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var xF=ts&&"documentMode"in document&&11>=document.documentMode,Ql=null,Km=null,Ph=null,Vm=!1;function R_(s,l,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Vm||Ql==null||Ql!==Ja(b)||(b=Ql,"selectionStart"in b&&Ym(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),Ph&&zh(Ph,b)||(Ph=b,b=Qf(Km,"onSelect"),0<b.length&&(l=new lf("onSelect","select",null,l,p),s.push({event:l,listeners:b}),l.target=Ql)))}function Yo(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Jl={animationend:Yo("Animation","AnimationEnd"),animationiteration:Yo("Animation","AnimationIteration"),animationstart:Yo("Animation","AnimationStart"),transitionrun:Yo("Transition","TransitionRun"),transitionstart:Yo("Transition","TransitionStart"),transitioncancel:Yo("Transition","TransitionCancel"),transitionend:Yo("Transition","TransitionEnd")},Xm={},j_={};ts&&(j_=document.createElement("div").style,"AnimationEvent"in window||(delete Jl.animationend.animation,delete Jl.animationiteration.animation,delete Jl.animationstart.animation),"TransitionEvent"in window||delete Jl.transitionend.transition);function Ko(s){if(Xm[s])return Xm[s];if(!Jl[s])return s;var l=Jl[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in j_)return Xm[s]=l[p];return s}var D_=Ko("animationend"),F_=Ko("animationiteration"),I_=Ko("animationstart"),vF=Ko("transitionrun"),CF=Ko("transitionstart"),_F=Ko("transitioncancel"),$_=Ko("transitionend"),z_=new Map,Zm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Zm.push("scrollEnd");function ca(s,l){z_.set(s,l),Tt(l,[s])}var uf=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Hn=[],tc=0,Qm=0;function df(){for(var s=tc,l=Qm=tc=0;l<s;){var p=Hn[l];Hn[l++]=null;var b=Hn[l];Hn[l++]=null;var w=Hn[l];Hn[l++]=null;var S=Hn[l];if(Hn[l++]=null,b!==null&&w!==null){var R=b.pending;R===null?w.next=w:(w.next=R.next,R.next=w),b.pending=w}S!==0&&P_(p,w,S)}}function ff(s,l,p,b){Hn[tc++]=s,Hn[tc++]=l,Hn[tc++]=p,Hn[tc++]=b,Qm|=b,s.lanes|=b,s=s.alternate,s!==null&&(s.lanes|=b)}function Jm(s,l,p,b){return ff(s,l,p,b),pf(s)}function Vo(s,l){return ff(s,null,null,l),pf(s)}function P_(s,l,p){s.lanes|=p;var b=s.alternate;b!==null&&(b.lanes|=p);for(var w=!1,S=s.return;S!==null;)S.childLanes|=p,b=S.alternate,b!==null&&(b.childLanes|=p),S.tag===22&&(s=S.stateNode,s===null||s._visibility&1||(w=!0)),s=S,S=S.return;return s.tag===3?(S=s.stateNode,w&&l!==null&&(w=31-ye(p),s=S.hiddenUpdates,b=s[w],b===null?s[w]=[l]:b.push(l),l.lane=p|536870912),S):null}function pf(s){if(50<cu)throw cu=0,lb=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var ec={};function kF(s,l,p,b){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(s,l,p,b){return new kF(s,l,p,b)}function ty(s){return s=s.prototype,!(!s||!s.isReactComponent)}function es(s,l){var p=s.alternate;return p===null?(p=En(s.tag,l,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=l,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&65011712,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,l=s.dependencies,p.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p.refCleanup=s.refCleanup,p}function q_(s,l){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,l=p.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function gf(s,l,p,b,w,S){var R=0;if(b=s,typeof s=="function")ty(s)&&(R=1);else if(typeof s=="string")R=N4(s,p,ct.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case I:return s=En(31,p,l,w),s.elementType=I,s.lanes=S,s;case C:return Xo(p.children,w,S,l);case _:R=8,w|=24;break;case k:return s=En(12,p,l,w|2),s.elementType=k,s.lanes=S,s;case B:return s=En(13,p,l,w),s.elementType=B,s.lanes=S,s;case O:return s=En(19,p,l,w),s.elementType=O,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case N:R=10;break t;case T:R=9;break t;case E:R=11;break t;case A:R=14;break t;case M:R=16,b=null;break t}R=29,p=Error(n(130,s===null?"null":typeof s,"")),b=null}return l=En(R,p,l,w),l.elementType=s,l.type=b,l.lanes=S,l}function Xo(s,l,p,b){return s=En(7,s,b,l),s.lanes=p,s}function ey(s,l,p){return s=En(6,s,null,l),s.lanes=p,s}function U_(s){var l=En(18,null,null,0);return l.stateNode=s,l}function iy(s,l,p){return l=En(4,s.children!==null?s.children:[],s.key,l),l.lanes=p,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var H_=new WeakMap;function Wn(s,l){if(typeof s=="object"&&s!==null){var p=H_.get(s);return p!==void 0?p:(l={value:s,source:l,stack:Yt(l)},H_.set(s,l),l)}return{value:s,source:l,stack:Yt(l)}}var ic=[],rc=0,mf=null,qh=0,Gn=[],Yn=0,Ws=null,Na=1,Aa="";function is(s,l){ic[rc++]=qh,ic[rc++]=mf,mf=s,qh=l}function W_(s,l,p){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Ws=s;var b=Na;s=Aa;var w=32-ye(b)-1;b&=~(1<<w),p+=1;var S=32-ye(l)+w;if(30<S){var R=w-w%5;S=(b&(1<<R)-1).toString(32),b>>=R,w-=R,Na=1<<32-ye(l)+w|p<<w|b,Aa=S+s}else Na=1<<S|p<<w|b,Aa=s}function ry(s){s.return!==null&&(is(s,1),W_(s,1,0))}function ny(s){for(;s===mf;)mf=ic[--rc],ic[rc]=null,qh=ic[--rc],ic[rc]=null;for(;s===Ws;)Ws=Gn[--Yn],Gn[Yn]=null,Aa=Gn[--Yn],Gn[Yn]=null,Na=Gn[--Yn],Gn[Yn]=null}function G_(s,l){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Na=l.id,Aa=l.overflow,Ws=s}var Ar=null,Fi=null,ri=!1,Gs=null,Kn=!1,ay=Error(n(519));function Ys(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Uh(Wn(l,s)),ay}function Y_(s){var l=s.stateNode,p=s.type,b=s.memoizedProps;switch(l[Ri]=s,l[Zi]=b,p){case"dialog":Xe("cancel",l),Xe("close",l);break;case"iframe":case"object":case"embed":Xe("load",l);break;case"video":case"audio":for(p=0;p<uu.length;p++)Xe(uu[p],l);break;case"source":Xe("error",l);break;case"img":case"image":case"link":Xe("error",l),Xe("load",l);break;case"details":Xe("toggle",l);break;case"input":Xe("invalid",l),yt(l,b.value,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name,!0);break;case"select":Xe("invalid",l);break;case"textarea":Xe("invalid",l),Pe(l,b.value,b.defaultValue,b.children)}p=b.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||l.textContent===""+p||b.suppressHydrationWarning===!0||hS(l.textContent,p)?(b.popover!=null&&(Xe("beforetoggle",l),Xe("toggle",l)),b.onScroll!=null&&Xe("scroll",l),b.onScrollEnd!=null&&Xe("scrollend",l),b.onClick!=null&&(l.onclick=Wt),l=!0):l=!1,l||Ys(s,!0)}function K_(s){for(Ar=s.return;Ar;)switch(Ar.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Ar=Ar.return}}function nc(s){if(s!==Ar)return!1;if(!ri)return K_(s),ri=!0,!1;var l=s.tag,p;if((p=l!==3&&l!==27)&&((p=l===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||kb(s.type,s.memoizedProps)),p=!p),p&&Fi&&Ys(s),K_(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Fi=xS(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Fi=xS(s)}else l===27?(l=Fi,oo(s.type)?(s=Nb,Nb=null,Fi=s):Fi=l):Fi=Ar?Xn(s.stateNode.nextSibling):null;return!0}function Zo(){Fi=Ar=null,ri=!1}function sy(){var s=Gs;return s!==null&&(pn===null?pn=s:pn.push.apply(pn,s),Gs=null),s}function Uh(s){Gs===null?Gs=[s]:Gs.push(s)}var oy=G(null),Qo=null,rs=null;function Ks(s,l,p){ft(oy,l._currentValue),l._currentValue=p}function ns(s){s._currentValue=oy.current,tt(oy)}function ly(s,l,p){for(;s!==null;){var b=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,b!==null&&(b.childLanes|=l)):b!==null&&(b.childLanes&l)!==l&&(b.childLanes|=l),s===p)break;s=s.return}}function cy(s,l,p,b){var w=s.child;for(w!==null&&(w.return=s);w!==null;){var S=w.dependencies;if(S!==null){var R=w.child;S=S.firstContext;t:for(;S!==null;){var q=S;S=w;for(var Q=0;Q<l.length;Q++)if(q.context===l[Q]){S.lanes|=p,q=S.alternate,q!==null&&(q.lanes|=p),ly(S.return,p,s),b||(R=null);break t}S=q.next}}else if(w.tag===18){if(R=w.return,R===null)throw Error(n(341));R.lanes|=p,S=R.alternate,S!==null&&(S.lanes|=p),ly(R,p,s),R=null}else R=w.child;if(R!==null)R.return=w;else for(R=w;R!==null;){if(R===s){R=null;break}if(w=R.sibling,w!==null){w.return=R.return,R=w;break}R=R.return}w=R}}function ac(s,l,p,b){s=null;for(var w=l,S=!1;w!==null;){if(!S){if((w.flags&524288)!==0)S=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var R=w.alternate;if(R===null)throw Error(n(387));if(R=R.memoizedProps,R!==null){var q=w.type;Tn(w.pendingProps.value,R.value)||(s!==null?s.push(q):s=[q])}}else if(w===wt.current){if(R=w.alternate,R===null)throw Error(n(387));R.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(mu):s=[mu])}w=w.return}s!==null&&cy(l,s,p,b),l.flags|=262144}function yf(s){for(s=s.firstContext;s!==null;){if(!Tn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Jo(s){Qo=s,rs=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Mr(s){return V_(Qo,s)}function bf(s,l){return Qo===null&&Jo(s),V_(s,l)}function V_(s,l){var p=l._currentValue;if(l={context:l,memoizedValue:p,next:null},rs===null){if(s===null)throw Error(n(308));rs=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else rs=rs.next=l;return p}var wF=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(p,b){s.push(b)}};this.abort=function(){l.aborted=!0,s.forEach(function(p){return p()})}},SF=i.unstable_scheduleCallback,TF=i.unstable_NormalPriority,hr={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hy(){return{controller:new wF,data:new Map,refCount:0}}function Hh(s){s.refCount--,s.refCount===0&&SF(TF,function(){s.controller.abort()})}var Wh=null,uy=0,sc=0,oc=null;function EF(s,l){if(Wh===null){var p=Wh=[];uy=0,sc=pb(),oc={status:"pending",value:void 0,then:function(b){p.push(b)}}}return uy++,l.then(X_,X_),l}function X_(){if(--uy===0&&Wh!==null){oc!==null&&(oc.status="fulfilled");var s=Wh;Wh=null,sc=0,oc=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function NF(s,l){var p=[],b={status:"pending",value:null,reason:null,then:function(w){p.push(w)}};return s.then(function(){b.status="fulfilled",b.value=l;for(var w=0;w<p.length;w++)(0,p[w])(l)},function(w){for(b.status="rejected",b.reason=w,w=0;w<p.length;w++)(0,p[w])(void 0)}),b}var Z_=j.S;j.S=function(s,l){Rw=jt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&EF(s,l),Z_!==null&&Z_(s,l)};var tl=G(null);function dy(){var s=tl.current;return s!==null?s:ji.pooledCache}function xf(s,l){l===null?ft(tl,tl.current):ft(tl,l.pool)}function Q_(){var s=dy();return s===null?null:{parent:hr._currentValue,pool:s}}var lc=Error(n(460)),fy=Error(n(474)),vf=Error(n(542)),Cf={then:function(){}};function J_(s){return s=s.status,s==="fulfilled"||s==="rejected"}function tk(s,l,p){switch(p=s[p],p===void 0?s.push(l):p!==l&&(l.then(Wt,Wt),l=p),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,ik(s),s;default:if(typeof l.status=="string")l.then(Wt,Wt);else{if(s=ji,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(b){if(l.status==="pending"){var w=l;w.status="fulfilled",w.value=b}},function(b){if(l.status==="pending"){var w=l;w.status="rejected",w.reason=b}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,ik(s),s}throw il=l,lc}}function el(s){try{var l=s._init;return l(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(il=p,lc):p}}var il=null;function ek(){if(il===null)throw Error(n(459));var s=il;return il=null,s}function ik(s){if(s===lc||s===vf)throw Error(n(483))}var cc=null,Gh=0;function _f(s){var l=Gh;return Gh+=1,cc===null&&(cc=[]),tk(cc,s,l)}function Yh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function kf(s,l){throw l.$$typeof===x?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function rk(s){function l(dt,nt){if(s){var gt=dt.deletions;gt===null?(dt.deletions=[nt],dt.flags|=16):gt.push(nt)}}function p(dt,nt){if(!s)return null;for(;nt!==null;)l(dt,nt),nt=nt.sibling;return null}function b(dt){for(var nt=new Map;dt!==null;)dt.key!==null?nt.set(dt.key,dt):nt.set(dt.index,dt),dt=dt.sibling;return nt}function w(dt,nt){return dt=es(dt,nt),dt.index=0,dt.sibling=null,dt}function S(dt,nt,gt){return dt.index=gt,s?(gt=dt.alternate,gt!==null?(gt=gt.index,gt<nt?(dt.flags|=67108866,nt):gt):(dt.flags|=67108866,nt)):(dt.flags|=1048576,nt)}function R(dt){return s&&dt.alternate===null&&(dt.flags|=67108866),dt}function q(dt,nt,gt,At){return nt===null||nt.tag!==6?(nt=ey(gt,dt.mode,At),nt.return=dt,nt):(nt=w(nt,gt),nt.return=dt,nt)}function Q(dt,nt,gt,At){var xe=gt.type;return xe===C?Nt(dt,nt,gt.props.children,At,gt.key):nt!==null&&(nt.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===M&&el(xe)===nt.type)?(nt=w(nt,gt.props),Yh(nt,gt),nt.return=dt,nt):(nt=gf(gt.type,gt.key,gt.props,null,dt.mode,At),Yh(nt,gt),nt.return=dt,nt)}function mt(dt,nt,gt,At){return nt===null||nt.tag!==4||nt.stateNode.containerInfo!==gt.containerInfo||nt.stateNode.implementation!==gt.implementation?(nt=iy(gt,dt.mode,At),nt.return=dt,nt):(nt=w(nt,gt.children||[]),nt.return=dt,nt)}function Nt(dt,nt,gt,At,xe){return nt===null||nt.tag!==7?(nt=Xo(gt,dt.mode,At,xe),nt.return=dt,nt):(nt=w(nt,gt),nt.return=dt,nt)}function Mt(dt,nt,gt){if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return nt=ey(""+nt,dt.mode,gt),nt.return=dt,nt;if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case y:return gt=gf(nt.type,nt.key,nt.props,null,dt.mode,gt),Yh(gt,nt),gt.return=dt,gt;case v:return nt=iy(nt,dt.mode,gt),nt.return=dt,nt;case M:return nt=el(nt),Mt(dt,nt,gt)}if(W(nt)||U(nt))return nt=Xo(nt,dt.mode,gt,null),nt.return=dt,nt;if(typeof nt.then=="function")return Mt(dt,_f(nt),gt);if(nt.$$typeof===N)return Mt(dt,bf(dt,nt),gt);kf(dt,nt)}return null}function bt(dt,nt,gt,At){var xe=nt!==null?nt.key:null;if(typeof gt=="string"&>!==""||typeof gt=="number"||typeof gt=="bigint")return xe!==null?null:q(dt,nt,""+gt,At);if(typeof gt=="object"&>!==null){switch(gt.$$typeof){case y:return gt.key===xe?Q(dt,nt,gt,At):null;case v:return gt.key===xe?mt(dt,nt,gt,At):null;case M:return gt=el(gt),bt(dt,nt,gt,At)}if(W(gt)||U(gt))return xe!==null?null:Nt(dt,nt,gt,At,null);if(typeof gt.then=="function")return bt(dt,nt,_f(gt),At);if(gt.$$typeof===N)return bt(dt,nt,bf(dt,gt),At);kf(dt,gt)}return null}function kt(dt,nt,gt,At,xe){if(typeof At=="string"&&At!==""||typeof At=="number"||typeof At=="bigint")return dt=dt.get(gt)||null,q(nt,dt,""+At,xe);if(typeof At=="object"&&At!==null){switch(At.$$typeof){case y:return dt=dt.get(At.key===null?gt:At.key)||null,Q(nt,dt,At,xe);case v:return dt=dt.get(At.key===null?gt:At.key)||null,mt(nt,dt,At,xe);case M:return At=el(At),kt(dt,nt,gt,At,xe)}if(W(At)||U(At))return dt=dt.get(gt)||null,Nt(nt,dt,At,xe,null);if(typeof At.then=="function")return kt(dt,nt,gt,_f(At),xe);if(At.$$typeof===N)return kt(dt,nt,gt,bf(nt,At),xe);kf(nt,At)}return null}function ne(dt,nt,gt,At){for(var xe=null,hi=null,he=nt,qe=nt=0,ei=null;he!==null&&qe<gt.length;qe++){he.index>qe?(ei=he,he=null):ei=he.sibling;var ui=bt(dt,he,gt[qe],At);if(ui===null){he===null&&(he=ei);break}s&&he&&ui.alternate===null&&l(dt,he),nt=S(ui,nt,qe),hi===null?xe=ui:hi.sibling=ui,hi=ui,he=ei}if(qe===gt.length)return p(dt,he),ri&&is(dt,qe),xe;if(he===null){for(;qe<gt.length;qe++)he=Mt(dt,gt[qe],At),he!==null&&(nt=S(he,nt,qe),hi===null?xe=he:hi.sibling=he,hi=he);return ri&&is(dt,qe),xe}for(he=b(he);qe<gt.length;qe++)ei=kt(he,dt,qe,gt[qe],At),ei!==null&&(s&&ei.alternate!==null&&he.delete(ei.key===null?qe:ei.key),nt=S(ei,nt,qe),hi===null?xe=ei:hi.sibling=ei,hi=ei);return s&&he.forEach(function(fo){return l(dt,fo)}),ri&&is(dt,qe),xe}function Te(dt,nt,gt,At){if(gt==null)throw Error(n(151));for(var xe=null,hi=null,he=nt,qe=nt=0,ei=null,ui=gt.next();he!==null&&!ui.done;qe++,ui=gt.next()){he.index>qe?(ei=he,he=null):ei=he.sibling;var fo=bt(dt,he,ui.value,At);if(fo===null){he===null&&(he=ei);break}s&&he&&fo.alternate===null&&l(dt,he),nt=S(fo,nt,qe),hi===null?xe=fo:hi.sibling=fo,hi=fo,he=ei}if(ui.done)return p(dt,he),ri&&is(dt,qe),xe;if(he===null){for(;!ui.done;qe++,ui=gt.next())ui=Mt(dt,ui.value,At),ui!==null&&(nt=S(ui,nt,qe),hi===null?xe=ui:hi.sibling=ui,hi=ui);return ri&&is(dt,qe),xe}for(he=b(he);!ui.done;qe++,ui=gt.next())ui=kt(he,dt,qe,ui.value,At),ui!==null&&(s&&ui.alternate!==null&&he.delete(ui.key===null?qe:ui.key),nt=S(ui,nt,qe),hi===null?xe=ui:hi.sibling=ui,hi=ui);return s&&he.forEach(function($4){return l(dt,$4)}),ri&&is(dt,qe),xe}function Bi(dt,nt,gt,At){if(typeof gt=="object"&>!==null&>.type===C&>.key===null&&(gt=gt.props.children),typeof gt=="object"&>!==null){switch(gt.$$typeof){case y:t:{for(var xe=gt.key;nt!==null;){if(nt.key===xe){if(xe=gt.type,xe===C){if(nt.tag===7){p(dt,nt.sibling),At=w(nt,gt.props.children),At.return=dt,dt=At;break t}}else if(nt.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===M&&el(xe)===nt.type){p(dt,nt.sibling),At=w(nt,gt.props),Yh(At,gt),At.return=dt,dt=At;break t}p(dt,nt);break}else l(dt,nt);nt=nt.sibling}gt.type===C?(At=Xo(gt.props.children,dt.mode,At,gt.key),At.return=dt,dt=At):(At=gf(gt.type,gt.key,gt.props,null,dt.mode,At),Yh(At,gt),At.return=dt,dt=At)}return R(dt);case v:t:{for(xe=gt.key;nt!==null;){if(nt.key===xe)if(nt.tag===4&&nt.stateNode.containerInfo===gt.containerInfo&&nt.stateNode.implementation===gt.implementation){p(dt,nt.sibling),At=w(nt,gt.children||[]),At.return=dt,dt=At;break t}else{p(dt,nt);break}else l(dt,nt);nt=nt.sibling}At=iy(gt,dt.mode,At),At.return=dt,dt=At}return R(dt);case M:return gt=el(gt),Bi(dt,nt,gt,At)}if(W(gt))return ne(dt,nt,gt,At);if(U(gt)){if(xe=U(gt),typeof xe!="function")throw Error(n(150));return gt=xe.call(gt),Te(dt,nt,gt,At)}if(typeof gt.then=="function")return Bi(dt,nt,_f(gt),At);if(gt.$$typeof===N)return Bi(dt,nt,bf(dt,gt),At);kf(dt,gt)}return typeof gt=="string"&>!==""||typeof gt=="number"||typeof gt=="bigint"?(gt=""+gt,nt!==null&&nt.tag===6?(p(dt,nt.sibling),At=w(nt,gt),At.return=dt,dt=At):(p(dt,nt),At=ey(gt,dt.mode,At),At.return=dt,dt=At),R(dt)):p(dt,nt)}return function(dt,nt,gt,At){try{Gh=0;var xe=Bi(dt,nt,gt,At);return cc=null,xe}catch(he){if(he===lc||he===vf)throw he;var hi=En(29,he,null,dt.mode);return hi.lanes=At,hi.return=dt,hi}finally{}}}var rl=rk(!0),nk=rk(!1),Vs=!1;function py(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gy(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Zs(s,l,p){var b=s.updateQueue;if(b===null)return null;if(b=b.shared,(pi&2)!==0){var w=b.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),b.pending=l,l=pf(s),P_(s,null,p),l}return ff(s,b,l,p),pf(s)}function Kh(s,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194048)!==0)){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,be(s,p)}}function my(s,l){var p=s.updateQueue,b=s.alternate;if(b!==null&&(b=b.updateQueue,p===b)){var w=null,S=null;if(p=p.firstBaseUpdate,p!==null){do{var R={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};S===null?w=S=R:S=S.next=R,p=p.next}while(p!==null);S===null?w=S=l:S=S.next=l}else w=S=l;p={baseState:b.baseState,firstBaseUpdate:w,lastBaseUpdate:S,shared:b.shared,callbacks:b.callbacks},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=l:s.next=l,p.lastBaseUpdate=l}var yy=!1;function Vh(){if(yy){var s=oc;if(s!==null)throw s}}function Xh(s,l,p,b){yy=!1;var w=s.updateQueue;Vs=!1;var S=w.firstBaseUpdate,R=w.lastBaseUpdate,q=w.shared.pending;if(q!==null){w.shared.pending=null;var Q=q,mt=Q.next;Q.next=null,R===null?S=mt:R.next=mt,R=Q;var Nt=s.alternate;Nt!==null&&(Nt=Nt.updateQueue,q=Nt.lastBaseUpdate,q!==R&&(q===null?Nt.firstBaseUpdate=mt:q.next=mt,Nt.lastBaseUpdate=Q))}if(S!==null){var Mt=w.baseState;R=0,Nt=mt=Q=null,q=S;do{var bt=q.lane&-536870913,kt=bt!==q.lane;if(kt?(ti&bt)===bt:(b&bt)===bt){bt!==0&&bt===sc&&(yy=!0),Nt!==null&&(Nt=Nt.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var ne=s,Te=q;bt=l;var Bi=p;switch(Te.tag){case 1:if(ne=Te.payload,typeof ne=="function"){Mt=ne.call(Bi,Mt,bt);break t}Mt=ne;break t;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=Te.payload,bt=typeof ne=="function"?ne.call(Bi,Mt,bt):ne,bt==null)break t;Mt=g({},Mt,bt);break t;case 2:Vs=!0}}bt=q.callback,bt!==null&&(s.flags|=64,kt&&(s.flags|=8192),kt=w.callbacks,kt===null?w.callbacks=[bt]:kt.push(bt))}else kt={lane:bt,tag:q.tag,payload:q.payload,callback:q.callback,next:null},Nt===null?(mt=Nt=kt,Q=Mt):Nt=Nt.next=kt,R|=bt;if(q=q.next,q===null){if(q=w.shared.pending,q===null)break;kt=q,q=kt.next,kt.next=null,w.lastBaseUpdate=kt,w.shared.pending=null}}while(!0);Nt===null&&(Q=Mt),w.baseState=Q,w.firstBaseUpdate=mt,w.lastBaseUpdate=Nt,S===null&&(w.shared.lanes=0),io|=R,s.lanes=R,s.memoizedState=Mt}}function ak(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function sk(s,l){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)ak(p[s],l)}var hc=G(null),wf=G(0);function ok(s,l){s=fs,ft(wf,s),ft(hc,l),fs=s|l.baseLanes}function by(){ft(wf,fs),ft(hc,hc.current)}function xy(){fs=wf.current,tt(hc),tt(wf)}var Nn=G(null),Vn=null;function Qs(s){var l=s.alternate;ft(ar,ar.current&1),ft(Nn,s),Vn===null&&(l===null||hc.current!==null||l.memoizedState!==null)&&(Vn=s)}function vy(s){ft(ar,ar.current),ft(Nn,s),Vn===null&&(Vn=s)}function lk(s){s.tag===22?(ft(ar,ar.current),ft(Nn,s),Vn===null&&(Vn=s)):Js()}function Js(){ft(ar,ar.current),ft(Nn,Nn.current)}function An(s){tt(Nn),Vn===s&&(Vn=null),tt(ar)}var ar=G(0);function Sf(s){for(var l=s;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||Tb(p)||Eb(p)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var as=0,ze=null,Ai=null,ur=null,Tf=!1,uc=!1,nl=!1,Ef=0,Zh=0,dc=null,AF=0;function Ji(){throw Error(n(321))}function Cy(s,l){if(l===null)return!1;for(var p=0;p<l.length&&p<s.length;p++)if(!Tn(s[p],l[p]))return!1;return!0}function _y(s,l,p,b,w,S){return as=S,ze=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,j.H=s===null||s.memoizedState===null?Wk:Fy,nl=!1,S=p(b,w),nl=!1,uc&&(S=hk(l,p,b,w)),ck(s),S}function ck(s){j.H=tu;var l=Ai!==null&&Ai.next!==null;if(as=0,ur=Ai=ze=null,Tf=!1,Zh=0,dc=null,l)throw Error(n(300));s===null||dr||(s=s.dependencies,s!==null&&yf(s)&&(dr=!0))}function hk(s,l,p,b){ze=s;var w=0;do{if(uc&&(dc=null),Zh=0,uc=!1,25<=w)throw Error(n(301));if(w+=1,ur=Ai=null,s.updateQueue!=null){var S=s.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}j.H=Gk,S=l(p,b)}while(uc);return S}function MF(){var s=j.H,l=s.useState()[0];return l=typeof l.then=="function"?Qh(l):l,s=s.useState()[0],(Ai!==null?Ai.memoizedState:null)!==s&&(ze.flags|=1024),l}function ky(){var s=Ef!==0;return Ef=0,s}function wy(s,l,p){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~p}function Sy(s){if(Tf){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Tf=!1}as=0,ur=Ai=ze=null,uc=!1,Zh=Ef=0,dc=null}function Vr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ur===null?ze.memoizedState=ur=s:ur=ur.next=s,ur}function sr(){if(Ai===null){var s=ze.alternate;s=s!==null?s.memoizedState:null}else s=Ai.next;var l=ur===null?ze.memoizedState:ur.next;if(l!==null)ur=l,Ai=s;else{if(s===null)throw ze.alternate===null?Error(n(467)):Error(n(310));Ai=s,s={memoizedState:Ai.memoizedState,baseState:Ai.baseState,baseQueue:Ai.baseQueue,queue:Ai.queue,next:null},ur===null?ze.memoizedState=ur=s:ur=ur.next=s}return ur}function Nf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qh(s){var l=Zh;return Zh+=1,dc===null&&(dc=[]),s=tk(dc,s,l),l=ze,(ur===null?l.memoizedState:ur.next)===null&&(l=l.alternate,j.H=l===null||l.memoizedState===null?Wk:Fy),s}function Af(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Qh(s);if(s.$$typeof===N)return Mr(s)}throw Error(n(438,String(s)))}function Ty(s){var l=null,p=ze.updateQueue;if(p!==null&&(l=p.memoCache),l==null){var b=ze.alternate;b!==null&&(b=b.updateQueue,b!==null&&(b=b.memoCache,b!=null&&(l={data:b.data.map(function(w){return w.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),p===null&&(p=Nf(),ze.updateQueue=p),p.memoCache=l,p=l.data[l.index],p===void 0)for(p=l.data[l.index]=Array(s),b=0;b<s;b++)p[b]=D;return l.index++,p}function ss(s,l){return typeof l=="function"?l(s):l}function Mf(s){var l=sr();return Ey(l,Ai,s)}function Ey(s,l,p){var b=s.queue;if(b===null)throw Error(n(311));b.lastRenderedReducer=p;var w=s.baseQueue,S=b.pending;if(S!==null){if(w!==null){var R=w.next;w.next=S.next,S.next=R}l.baseQueue=w=S,b.pending=null}if(S=s.baseState,w===null)s.memoizedState=S;else{l=w.next;var q=R=null,Q=null,mt=l,Nt=!1;do{var Mt=mt.lane&-536870913;if(Mt!==mt.lane?(ti&Mt)===Mt:(as&Mt)===Mt){var bt=mt.revertLane;if(bt===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:mt.action,hasEagerState:mt.hasEagerState,eagerState:mt.eagerState,next:null}),Mt===sc&&(Nt=!0);else if((as&bt)===bt){mt=mt.next,bt===sc&&(Nt=!0);continue}else Mt={lane:0,revertLane:mt.revertLane,gesture:null,action:mt.action,hasEagerState:mt.hasEagerState,eagerState:mt.eagerState,next:null},Q===null?(q=Q=Mt,R=S):Q=Q.next=Mt,ze.lanes|=bt,io|=bt;Mt=mt.action,nl&&p(S,Mt),S=mt.hasEagerState?mt.eagerState:p(S,Mt)}else bt={lane:Mt,revertLane:mt.revertLane,gesture:mt.gesture,action:mt.action,hasEagerState:mt.hasEagerState,eagerState:mt.eagerState,next:null},Q===null?(q=Q=bt,R=S):Q=Q.next=bt,ze.lanes|=Mt,io|=Mt;mt=mt.next}while(mt!==null&&mt!==l);if(Q===null?R=S:Q.next=q,!Tn(S,s.memoizedState)&&(dr=!0,Nt&&(p=oc,p!==null)))throw p;s.memoizedState=S,s.baseState=R,s.baseQueue=Q,b.lastRenderedState=S}return w===null&&(b.lanes=0),[s.memoizedState,b.dispatch]}function Ny(s){var l=sr(),p=l.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=s;var b=p.dispatch,w=p.pending,S=l.memoizedState;if(w!==null){p.pending=null;var R=w=w.next;do S=s(S,R.action),R=R.next;while(R!==w);Tn(S,l.memoizedState)||(dr=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),p.lastRenderedState=S}return[S,b]}function uk(s,l,p){var b=ze,w=sr(),S=ri;if(S){if(p===void 0)throw Error(n(407));p=p()}else p=l();var R=!Tn((Ai||w).memoizedState,p);if(R&&(w.memoizedState=p,dr=!0),w=w.queue,By(pk.bind(null,b,w,s),[s]),w.getSnapshot!==l||R||ur!==null&&ur.memoizedState.tag&1){if(b.flags|=2048,fc(9,{destroy:void 0},fk.bind(null,b,w,p,l),null),ji===null)throw Error(n(349));S||(as&127)!==0||dk(b,l,p)}return p}function dk(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=ze.updateQueue,l===null?(l=Nf(),ze.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function fk(s,l,p,b){l.value=p,l.getSnapshot=b,gk(l)&&mk(s)}function pk(s,l,p){return p(function(){gk(l)&&mk(s)})}function gk(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!Tn(s,p)}catch{return!0}}function mk(s){var l=Vo(s,2);l!==null&&gn(l,s,2)}function Ay(s){var l=Vr();if(typeof s=="function"){var p=s;if(s=p(),nl){li(!0);try{p()}finally{li(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:s},l}function yk(s,l,p,b){return s.baseState=p,Ey(s,Ai,typeof b=="function"?b:ss)}function BF(s,l,p,b,w){if(Of(s))throw Error(n(485));if(s=l.action,s!==null){var S={payload:w,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){S.listeners.push(R)}};j.T!==null?p(!0):S.isTransition=!1,b(S),p=l.pending,p===null?(S.next=l.pending=S,bk(l,S)):(S.next=p.next,l.pending=p.next=S)}}function bk(s,l){var p=l.action,b=l.payload,w=s.state;if(l.isTransition){var S=j.T,R={};j.T=R;try{var q=p(w,b),Q=j.S;Q!==null&&Q(R,q),xk(s,l,q)}catch(mt){My(s,l,mt)}finally{S!==null&&R.types!==null&&(S.types=R.types),j.T=S}}else try{S=p(w,b),xk(s,l,S)}catch(mt){My(s,l,mt)}}function xk(s,l,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(b){vk(s,l,b)},function(b){return My(s,l,b)}):vk(s,l,p)}function vk(s,l,p){l.status="fulfilled",l.value=p,Ck(l),s.state=p,l=s.pending,l!==null&&(p=l.next,p===l?s.pending=null:(p=p.next,l.next=p,bk(s,p)))}function My(s,l,p){var b=s.pending;if(s.pending=null,b!==null){b=b.next;do l.status="rejected",l.reason=p,Ck(l),l=l.next;while(l!==b)}s.action=null}function Ck(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function _k(s,l){return l}function kk(s,l){if(ri){var p=ji.formState;if(p!==null){t:{var b=ze;if(ri){if(Fi){e:{for(var w=Fi,S=Kn;w.nodeType!==8;){if(!S){w=null;break e}if(w=Xn(w.nextSibling),w===null){w=null;break e}}S=w.data,w=S==="F!"||S==="F"?w:null}if(w){Fi=Xn(w.nextSibling),b=w.data==="F!";break t}}Ys(b)}b=!1}b&&(l=p[0])}}return p=Vr(),p.memoizedState=p.baseState=l,b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_k,lastRenderedState:l},p.queue=b,p=qk.bind(null,ze,b),b.dispatch=p,b=Ay(!1),S=Dy.bind(null,ze,!1,b.queue),b=Vr(),w={state:l,dispatch:null,action:s,pending:null},b.queue=w,p=BF.bind(null,ze,w,S,p),w.dispatch=p,b.memoizedState=s,[l,p,!1]}function wk(s){var l=sr();return Sk(l,Ai,s)}function Sk(s,l,p){if(l=Ey(s,l,_k)[0],s=Mf(ss)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var b=Qh(l)}catch(R){throw R===lc?vf:R}else b=l;l=sr();var w=l.queue,S=w.dispatch;return p!==l.memoizedState&&(ze.flags|=2048,fc(9,{destroy:void 0},LF.bind(null,w,p),null)),[b,S,s]}function LF(s,l){s.action=l}function Tk(s){var l=sr(),p=Ai;if(p!==null)return Sk(l,p,s);sr(),l=l.memoizedState,p=sr();var b=p.queue.dispatch;return p.memoizedState=s,[l,b,!1]}function fc(s,l,p,b){return s={tag:s,create:p,deps:b,inst:l,next:null},l=ze.updateQueue,l===null&&(l=Nf(),ze.updateQueue=l),p=l.lastEffect,p===null?l.lastEffect=s.next=s:(b=p.next,p.next=s,s.next=b,l.lastEffect=s),s}function Ek(){return sr().memoizedState}function Bf(s,l,p,b){var w=Vr();ze.flags|=s,w.memoizedState=fc(1|l,{destroy:void 0},p,b===void 0?null:b)}function Lf(s,l,p,b){var w=sr();b=b===void 0?null:b;var S=w.memoizedState.inst;Ai!==null&&b!==null&&Cy(b,Ai.memoizedState.deps)?w.memoizedState=fc(l,S,p,b):(ze.flags|=s,w.memoizedState=fc(1|l,S,p,b))}function Nk(s,l){Bf(8390656,8,s,l)}function By(s,l){Lf(2048,8,s,l)}function OF(s){ze.flags|=4;var l=ze.updateQueue;if(l===null)l=Nf(),ze.updateQueue=l,l.events=[s];else{var p=l.events;p===null?l.events=[s]:p.push(s)}}function Ak(s){var l=sr().memoizedState;return OF({ref:l,nextImpl:s}),function(){if((pi&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function Mk(s,l){return Lf(4,2,s,l)}function Bk(s,l){return Lf(4,4,s,l)}function Lk(s,l){if(typeof l=="function"){s=s();var p=l(s);return function(){typeof p=="function"?p():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function Ok(s,l,p){p=p!=null?p.concat([s]):null,Lf(4,4,Lk.bind(null,l,s),p)}function Ly(){}function Rk(s,l){var p=sr();l=l===void 0?null:l;var b=p.memoizedState;return l!==null&&Cy(l,b[1])?b[0]:(p.memoizedState=[s,l],s)}function jk(s,l){var p=sr();l=l===void 0?null:l;var b=p.memoizedState;if(l!==null&&Cy(l,b[1]))return b[0];if(b=s(),nl){li(!0);try{s()}finally{li(!1)}}return p.memoizedState=[b,l],b}function Oy(s,l,p){return p===void 0||(as&1073741824)!==0&&(ti&261930)===0?s.memoizedState=l:(s.memoizedState=p,s=Dw(),ze.lanes|=s,io|=s,p)}function Dk(s,l,p,b){return Tn(p,l)?p:hc.current!==null?(s=Oy(s,p,b),Tn(s,l)||(dr=!0),s):(as&42)===0||(as&1073741824)!==0&&(ti&261930)===0?(dr=!0,s.memoizedState=p):(s=Dw(),ze.lanes|=s,io|=s,l)}function Fk(s,l,p,b,w){var S=H.p;H.p=S!==0&&8>S?S:8;var R=j.T,q={};j.T=q,Dy(s,!1,l,p);try{var Q=w(),mt=j.S;if(mt!==null&&mt(q,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Nt=NF(Q,b);Jh(s,l,Nt,Ln(s))}else Jh(s,l,b,Ln(s))}catch(Mt){Jh(s,l,{then:function(){},status:"rejected",reason:Mt},Ln())}finally{H.p=S,R!==null&&q.types!==null&&(R.types=q.types),j.T=R}}function RF(){}function Ry(s,l,p,b){if(s.tag!==5)throw Error(n(476));var w=Ik(s).queue;Fk(s,w,l,Y,p===null?RF:function(){return $k(s),p(b)})}function Ik(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:Y},next:null};var p={};return l.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:p},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function $k(s){var l=Ik(s);l.next===null&&(l=s.alternate.memoizedState),Jh(s,l.next.queue,{},Ln())}function jy(){return Mr(mu)}function zk(){return sr().memoizedState}function Pk(){return sr().memoizedState}function jF(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var p=Ln();s=Xs(p);var b=Zs(l,s,p);b!==null&&(gn(b,l,p),Kh(b,l,p)),l={cache:hy()},s.payload=l;return}l=l.return}}function DF(s,l,p){var b=Ln();p={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Of(s)?Uk(l,p):(p=Jm(s,l,p,b),p!==null&&(gn(p,s,b),Hk(p,l,b)))}function qk(s,l,p){var b=Ln();Jh(s,l,p,b)}function Jh(s,l,p,b){var w={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Of(s))Uk(l,w);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var R=l.lastRenderedState,q=S(R,p);if(w.hasEagerState=!0,w.eagerState=q,Tn(q,R))return ff(s,l,w,0),ji===null&&df(),!1}catch{}finally{}if(p=Jm(s,l,w,b),p!==null)return gn(p,s,b),Hk(p,l,b),!0}return!1}function Dy(s,l,p,b){if(b={lane:2,revertLane:pb(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Of(s)){if(l)throw Error(n(479))}else l=Jm(s,p,b,2),l!==null&&gn(l,s,2)}function Of(s){var l=s.alternate;return s===ze||l!==null&&l===ze}function Uk(s,l){uc=Tf=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function Hk(s,l,p){if((p&4194048)!==0){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,be(s,p)}}var tu={readContext:Mr,use:Af,useCallback:Ji,useContext:Ji,useEffect:Ji,useImperativeHandle:Ji,useLayoutEffect:Ji,useInsertionEffect:Ji,useMemo:Ji,useReducer:Ji,useRef:Ji,useState:Ji,useDebugValue:Ji,useDeferredValue:Ji,useTransition:Ji,useSyncExternalStore:Ji,useId:Ji,useHostTransitionStatus:Ji,useFormState:Ji,useActionState:Ji,useOptimistic:Ji,useMemoCache:Ji,useCacheRefresh:Ji};tu.useEffectEvent=Ji;var Wk={readContext:Mr,use:Af,useCallback:function(s,l){return Vr().memoizedState=[s,l===void 0?null:l],s},useContext:Mr,useEffect:Nk,useImperativeHandle:function(s,l,p){p=p!=null?p.concat([s]):null,Bf(4194308,4,Lk.bind(null,l,s),p)},useLayoutEffect:function(s,l){return Bf(4194308,4,s,l)},useInsertionEffect:function(s,l){Bf(4,2,s,l)},useMemo:function(s,l){var p=Vr();l=l===void 0?null:l;var b=s();if(nl){li(!0);try{s()}finally{li(!1)}}return p.memoizedState=[b,l],b},useReducer:function(s,l,p){var b=Vr();if(p!==void 0){var w=p(l);if(nl){li(!0);try{p(l)}finally{li(!1)}}}else w=l;return b.memoizedState=b.baseState=w,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:w},b.queue=s,s=s.dispatch=DF.bind(null,ze,s),[b.memoizedState,s]},useRef:function(s){var l=Vr();return s={current:s},l.memoizedState=s},useState:function(s){s=Ay(s);var l=s.queue,p=qk.bind(null,ze,l);return l.dispatch=p,[s.memoizedState,p]},useDebugValue:Ly,useDeferredValue:function(s,l){var p=Vr();return Oy(p,s,l)},useTransition:function(){var s=Ay(!1);return s=Fk.bind(null,ze,s.queue,!0,!1),Vr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,p){var b=ze,w=Vr();if(ri){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),ji===null)throw Error(n(349));(ti&127)!==0||dk(b,l,p)}w.memoizedState=p;var S={value:p,getSnapshot:l};return w.queue=S,Nk(pk.bind(null,b,S,s),[s]),b.flags|=2048,fc(9,{destroy:void 0},fk.bind(null,b,S,p,l),null),p},useId:function(){var s=Vr(),l=ji.identifierPrefix;if(ri){var p=Aa,b=Na;p=(b&~(1<<32-ye(b)-1)).toString(32)+p,l="_"+l+"R_"+p,p=Ef++,0<p&&(l+="H"+p.toString(32)),l+="_"}else p=AF++,l="_"+l+"r_"+p.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:jy,useFormState:kk,useActionState:kk,useOptimistic:function(s){var l=Vr();l.memoizedState=l.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=p,l=Dy.bind(null,ze,!0,p),p.dispatch=l,[s,l]},useMemoCache:Ty,useCacheRefresh:function(){return Vr().memoizedState=jF.bind(null,ze)},useEffectEvent:function(s){var l=Vr(),p={impl:s};return l.memoizedState=p,function(){if((pi&2)!==0)throw Error(n(440));return p.impl.apply(void 0,arguments)}}},Fy={readContext:Mr,use:Af,useCallback:Rk,useContext:Mr,useEffect:By,useImperativeHandle:Ok,useInsertionEffect:Mk,useLayoutEffect:Bk,useMemo:jk,useReducer:Mf,useRef:Ek,useState:function(){return Mf(ss)},useDebugValue:Ly,useDeferredValue:function(s,l){var p=sr();return Dk(p,Ai.memoizedState,s,l)},useTransition:function(){var s=Mf(ss)[0],l=sr().memoizedState;return[typeof s=="boolean"?s:Qh(s),l]},useSyncExternalStore:uk,useId:zk,useHostTransitionStatus:jy,useFormState:wk,useActionState:wk,useOptimistic:function(s,l){var p=sr();return yk(p,Ai,s,l)},useMemoCache:Ty,useCacheRefresh:Pk};Fy.useEffectEvent=Ak;var Gk={readContext:Mr,use:Af,useCallback:Rk,useContext:Mr,useEffect:By,useImperativeHandle:Ok,useInsertionEffect:Mk,useLayoutEffect:Bk,useMemo:jk,useReducer:Ny,useRef:Ek,useState:function(){return Ny(ss)},useDebugValue:Ly,useDeferredValue:function(s,l){var p=sr();return Ai===null?Oy(p,s,l):Dk(p,Ai.memoizedState,s,l)},useTransition:function(){var s=Ny(ss)[0],l=sr().memoizedState;return[typeof s=="boolean"?s:Qh(s),l]},useSyncExternalStore:uk,useId:zk,useHostTransitionStatus:jy,useFormState:Tk,useActionState:Tk,useOptimistic:function(s,l){var p=sr();return Ai!==null?yk(p,Ai,s,l):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:Ty,useCacheRefresh:Pk};Gk.useEffectEvent=Ak;function Iy(s,l,p,b){l=s.memoizedState,p=p(b,l),p=p==null?l:g({},l,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var $y={enqueueSetState:function(s,l,p){s=s._reactInternals;var b=Ln(),w=Xs(b);w.payload=l,p!=null&&(w.callback=p),l=Zs(s,w,b),l!==null&&(gn(l,s,b),Kh(l,s,b))},enqueueReplaceState:function(s,l,p){s=s._reactInternals;var b=Ln(),w=Xs(b);w.tag=1,w.payload=l,p!=null&&(w.callback=p),l=Zs(s,w,b),l!==null&&(gn(l,s,b),Kh(l,s,b))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var p=Ln(),b=Xs(p);b.tag=2,l!=null&&(b.callback=l),l=Zs(s,b,p),l!==null&&(gn(l,s,p),Kh(l,s,p))}};function Yk(s,l,p,b,w,S,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(b,S,R):l.prototype&&l.prototype.isPureReactComponent?!zh(p,b)||!zh(w,S):!0}function Kk(s,l,p,b){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(p,b),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(p,b),l.state!==s&&$y.enqueueReplaceState(l,l.state,null)}function al(s,l){var p=l;if("ref"in l){p={};for(var b in l)b!=="ref"&&(p[b]=l[b])}if(s=s.defaultProps){p===l&&(p=g({},p));for(var w in s)p[w]===void 0&&(p[w]=s[w])}return p}function Vk(s){uf(s)}function Xk(s){console.error(s)}function Zk(s){uf(s)}function Rf(s,l){try{var p=s.onUncaughtError;p(l.value,{componentStack:l.stack})}catch(b){setTimeout(function(){throw b})}}function Qk(s,l,p){try{var b=s.onCaughtError;b(p.value,{componentStack:p.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function zy(s,l,p){return p=Xs(p),p.tag=3,p.payload={element:null},p.callback=function(){Rf(s,l)},p}function Jk(s){return s=Xs(s),s.tag=3,s}function tw(s,l,p,b){var w=p.type.getDerivedStateFromError;if(typeof w=="function"){var S=b.value;s.payload=function(){return w(S)},s.callback=function(){Qk(l,p,b)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(s.callback=function(){Qk(l,p,b),typeof w!="function"&&(ro===null?ro=new Set([this]):ro.add(this));var q=b.stack;this.componentDidCatch(b.value,{componentStack:q!==null?q:""})})}function FF(s,l,p,b,w){if(p.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){if(l=p.alternate,l!==null&&ac(l,p,w,!0),p=Nn.current,p!==null){switch(p.tag){case 31:case 13:return Vn===null?Gf():p.alternate===null&&tr===0&&(tr=3),p.flags&=-257,p.flags|=65536,p.lanes=w,b===Cf?p.flags|=16384:(l=p.updateQueue,l===null?p.updateQueue=new Set([b]):l.add(b),ub(s,b,w)),!1;case 22:return p.flags|=65536,b===Cf?p.flags|=16384:(l=p.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([b])},p.updateQueue=l):(p=l.retryQueue,p===null?l.retryQueue=new Set([b]):p.add(b)),ub(s,b,w)),!1}throw Error(n(435,p.tag))}return ub(s,b,w),Gf(),!1}if(ri)return l=Nn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,b!==ay&&(s=Error(n(422),{cause:b}),Uh(Wn(s,p)))):(b!==ay&&(l=Error(n(423),{cause:b}),Uh(Wn(l,p))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,b=Wn(b,p),w=zy(s.stateNode,b,w),my(s,w),tr!==4&&(tr=2)),!1;var S=Error(n(520),{cause:b});if(S=Wn(S,p),lu===null?lu=[S]:lu.push(S),tr!==4&&(tr=2),l===null)return!0;b=Wn(b,p),p=l;do{switch(p.tag){case 3:return p.flags|=65536,s=w&-w,p.lanes|=s,s=zy(p.stateNode,b,s),my(p,s),!1;case 1:if(l=p.type,S=p.stateNode,(p.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(ro===null||!ro.has(S))))return p.flags|=65536,w&=-w,p.lanes|=w,w=Jk(w),tw(w,s,p,b),my(p,w),!1}p=p.return}while(p!==null);return!1}var Py=Error(n(461)),dr=!1;function Br(s,l,p,b){l.child=s===null?nk(l,null,p,b):rl(l,s.child,p,b)}function ew(s,l,p,b,w){p=p.render;var S=l.ref;if("ref"in b){var R={};for(var q in b)q!=="ref"&&(R[q]=b[q])}else R=b;return Jo(l),b=_y(s,l,p,R,S,w),q=ky(),s!==null&&!dr?(wy(s,l,w),os(s,l,w)):(ri&&q&&ry(l),l.flags|=1,Br(s,l,b,w),l.child)}function iw(s,l,p,b,w){if(s===null){var S=p.type;return typeof S=="function"&&!ty(S)&&S.defaultProps===void 0&&p.compare===null?(l.tag=15,l.type=S,rw(s,l,S,b,w)):(s=gf(p.type,null,b,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!Vy(s,w)){var R=S.memoizedProps;if(p=p.compare,p=p!==null?p:zh,p(R,b)&&s.ref===l.ref)return os(s,l,w)}return l.flags|=1,s=es(S,b),s.ref=l.ref,s.return=l,l.child=s}function rw(s,l,p,b,w){if(s!==null){var S=s.memoizedProps;if(zh(S,b)&&s.ref===l.ref)if(dr=!1,l.pendingProps=b=S,Vy(s,w))(s.flags&131072)!==0&&(dr=!0);else return l.lanes=s.lanes,os(s,l,w)}return qy(s,l,p,b,w)}function nw(s,l,p,b){var w=b.children,S=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),b.mode==="hidden"){if((l.flags&128)!==0){if(S=S!==null?S.baseLanes|p:p,s!==null){for(b=l.child=s.child,w=0;b!==null;)w=w|b.lanes|b.childLanes,b=b.sibling;b=w&~S}else b=0,l.child=null;return aw(s,l,S,p,b)}if((p&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&xf(l,S!==null?S.cachePool:null),S!==null?ok(l,S):by(),lk(l);else return b=l.lanes=536870912,aw(s,l,S!==null?S.baseLanes|p:p,p,b)}else S!==null?(xf(l,S.cachePool),ok(l,S),Js(),l.memoizedState=null):(s!==null&&xf(l,null),by(),Js());return Br(s,l,w,p),l.child}function eu(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function aw(s,l,p,b,w){var S=dy();return S=S===null?null:{parent:hr._currentValue,pool:S},l.memoizedState={baseLanes:p,cachePool:S},s!==null&&xf(l,null),by(),lk(l),s!==null&&ac(s,l,b,!0),l.childLanes=w,null}function jf(s,l){return l=Ff({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function sw(s,l,p){return rl(l,s.child,null,p),s=jf(l,l.pendingProps),s.flags|=2,An(l),l.memoizedState=null,s}function IF(s,l,p){var b=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(ri){if(b.mode==="hidden")return s=jf(l,b),l.lanes=536870912,eu(null,s);if(vy(l),(s=Fi)?(s=bS(s,Kn),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ws!==null?{id:Na,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=U_(s),p.return=l,l.child=p,Ar=l,Fi=null)):s=null,s===null)throw Ys(l);return l.lanes=536870912,null}return jf(l,b)}var S=s.memoizedState;if(S!==null){var R=S.dehydrated;if(vy(l),w)if(l.flags&256)l.flags&=-257,l=sw(s,l,p);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(dr||ac(s,l,p,!1),w=(p&s.childLanes)!==0,dr||w){if(b=ji,b!==null&&(R=mi(b,p),R!==0&&R!==S.retryLane))throw S.retryLane=R,Vo(s,R),gn(b,s,R),Py;Gf(),l=sw(s,l,p)}else s=S.treeContext,Fi=Xn(R.nextSibling),Ar=l,ri=!0,Gs=null,Kn=!1,s!==null&&G_(l,s),l=jf(l,b),l.flags|=4096;return l}return s=es(s.child,{mode:b.mode,children:b.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Df(s,l){var p=l.ref;if(p===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(n(284));(s===null||s.ref!==p)&&(l.flags|=4194816)}}function qy(s,l,p,b,w){return Jo(l),p=_y(s,l,p,b,void 0,w),b=ky(),s!==null&&!dr?(wy(s,l,w),os(s,l,w)):(ri&&b&&ry(l),l.flags|=1,Br(s,l,p,w),l.child)}function ow(s,l,p,b,w,S){return Jo(l),l.updateQueue=null,p=hk(l,b,p,w),ck(s),b=ky(),s!==null&&!dr?(wy(s,l,S),os(s,l,S)):(ri&&b&&ry(l),l.flags|=1,Br(s,l,p,S),l.child)}function lw(s,l,p,b,w){if(Jo(l),l.stateNode===null){var S=ec,R=p.contextType;typeof R=="object"&&R!==null&&(S=Mr(R)),S=new p(b,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=$y,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=b,S.state=l.memoizedState,S.refs={},py(l),R=p.contextType,S.context=typeof R=="object"&&R!==null?Mr(R):ec,S.state=l.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Iy(l,p,R,b),S.state=l.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(R=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),R!==S.state&&$y.enqueueReplaceState(S,S.state,null),Xh(l,b,S,w),Vh(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!0}else if(s===null){S=l.stateNode;var q=l.memoizedProps,Q=al(p,q);S.props=Q;var mt=S.context,Nt=p.contextType;R=ec,typeof Nt=="object"&&Nt!==null&&(R=Mr(Nt));var Mt=p.getDerivedStateFromProps;Nt=typeof Mt=="function"||typeof S.getSnapshotBeforeUpdate=="function",q=l.pendingProps!==q,Nt||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(q||mt!==R)&&Kk(l,S,b,R),Vs=!1;var bt=l.memoizedState;S.state=bt,Xh(l,b,S,w),Vh(),mt=l.memoizedState,q||bt!==mt||Vs?(typeof Mt=="function"&&(Iy(l,p,Mt,b),mt=l.memoizedState),(Q=Vs||Yk(l,p,Q,b,bt,mt,R))?(Nt||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=b,l.memoizedState=mt),S.props=b,S.state=mt,S.context=R,b=Q):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{S=l.stateNode,gy(s,l),R=l.memoizedProps,Nt=al(p,R),S.props=Nt,Mt=l.pendingProps,bt=S.context,mt=p.contextType,Q=ec,typeof mt=="object"&&mt!==null&&(Q=Mr(mt)),q=p.getDerivedStateFromProps,(mt=typeof q=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==Mt||bt!==Q)&&Kk(l,S,b,Q),Vs=!1,bt=l.memoizedState,S.state=bt,Xh(l,b,S,w),Vh();var kt=l.memoizedState;R!==Mt||bt!==kt||Vs||s!==null&&s.dependencies!==null&&yf(s.dependencies)?(typeof q=="function"&&(Iy(l,p,q,b),kt=l.memoizedState),(Nt=Vs||Yk(l,p,Nt,b,bt,kt,Q)||s!==null&&s.dependencies!==null&&yf(s.dependencies))?(mt||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(b,kt,Q),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(b,kt,Q)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=1024),l.memoizedProps=b,l.memoizedState=kt),S.props=b,S.state=kt,S.context=Q,b=Nt):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=1024),b=!1)}return S=b,Df(s,l),b=(l.flags&128)!==0,S||b?(S=l.stateNode,p=b&&typeof p.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&b?(l.child=rl(l,s.child,null,w),l.child=rl(l,null,p,w)):Br(s,l,p,w),l.memoizedState=S.state,s=l.child):s=os(s,l,w),s}function cw(s,l,p,b){return Zo(),l.flags|=256,Br(s,l,p,b),l.child}var Uy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hy(s){return{baseLanes:s,cachePool:Q_()}}function Wy(s,l,p){return s=s!==null?s.childLanes&~p:0,l&&(s|=Bn),s}function hw(s,l,p){var b=l.pendingProps,w=!1,S=(l.flags&128)!==0,R;if((R=S)||(R=s!==null&&s.memoizedState===null?!1:(ar.current&2)!==0),R&&(w=!0,l.flags&=-129),R=(l.flags&32)!==0,l.flags&=-33,s===null){if(ri){if(w?Qs(l):Js(),(s=Fi)?(s=bS(s,Kn),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ws!==null?{id:Na,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=U_(s),p.return=l,l.child=p,Ar=l,Fi=null)):s=null,s===null)throw Ys(l);return Eb(s)?l.lanes=32:l.lanes=536870912,null}var q=b.children;return b=b.fallback,w?(Js(),w=l.mode,q=Ff({mode:"hidden",children:q},w),b=Xo(b,w,p,null),q.return=l,b.return=l,q.sibling=b,l.child=q,b=l.child,b.memoizedState=Hy(p),b.childLanes=Wy(s,R,p),l.memoizedState=Uy,eu(null,b)):(Qs(l),Gy(l,q))}var Q=s.memoizedState;if(Q!==null&&(q=Q.dehydrated,q!==null)){if(S)l.flags&256?(Qs(l),l.flags&=-257,l=Yy(s,l,p)):l.memoizedState!==null?(Js(),l.child=s.child,l.flags|=128,l=null):(Js(),q=b.fallback,w=l.mode,b=Ff({mode:"visible",children:b.children},w),q=Xo(q,w,p,null),q.flags|=2,b.return=l,q.return=l,b.sibling=q,l.child=b,rl(l,s.child,null,p),b=l.child,b.memoizedState=Hy(p),b.childLanes=Wy(s,R,p),l.memoizedState=Uy,l=eu(null,b));else if(Qs(l),Eb(q)){if(R=q.nextSibling&&q.nextSibling.dataset,R)var mt=R.dgst;R=mt,b=Error(n(419)),b.stack="",b.digest=R,Uh({value:b,source:null,stack:null}),l=Yy(s,l,p)}else if(dr||ac(s,l,p,!1),R=(p&s.childLanes)!==0,dr||R){if(R=ji,R!==null&&(b=mi(R,p),b!==0&&b!==Q.retryLane))throw Q.retryLane=b,Vo(s,b),gn(R,s,b),Py;Tb(q)||Gf(),l=Yy(s,l,p)}else Tb(q)?(l.flags|=192,l.child=s.child,l=null):(s=Q.treeContext,Fi=Xn(q.nextSibling),Ar=l,ri=!0,Gs=null,Kn=!1,s!==null&&G_(l,s),l=Gy(l,b.children),l.flags|=4096);return l}return w?(Js(),q=b.fallback,w=l.mode,Q=s.child,mt=Q.sibling,b=es(Q,{mode:"hidden",children:b.children}),b.subtreeFlags=Q.subtreeFlags&65011712,mt!==null?q=es(mt,q):(q=Xo(q,w,p,null),q.flags|=2),q.return=l,b.return=l,b.sibling=q,l.child=b,eu(null,b),b=l.child,q=s.child.memoizedState,q===null?q=Hy(p):(w=q.cachePool,w!==null?(Q=hr._currentValue,w=w.parent!==Q?{parent:Q,pool:Q}:w):w=Q_(),q={baseLanes:q.baseLanes|p,cachePool:w}),b.memoizedState=q,b.childLanes=Wy(s,R,p),l.memoizedState=Uy,eu(s.child,b)):(Qs(l),p=s.child,s=p.sibling,p=es(p,{mode:"visible",children:b.children}),p.return=l,p.sibling=null,s!==null&&(R=l.deletions,R===null?(l.deletions=[s],l.flags|=16):R.push(s)),l.child=p,l.memoizedState=null,p)}function Gy(s,l){return l=Ff({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Ff(s,l){return s=En(22,s,null,l),s.lanes=0,s}function Yy(s,l,p){return rl(l,s.child,null,p),s=Gy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function uw(s,l,p){s.lanes|=l;var b=s.alternate;b!==null&&(b.lanes|=l),ly(s.return,l,p)}function Ky(s,l,p,b,w,S){var R=s.memoizedState;R===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:b,tail:p,tailMode:w,treeForkCount:S}:(R.isBackwards=l,R.rendering=null,R.renderingStartTime=0,R.last=b,R.tail=p,R.tailMode=w,R.treeForkCount=S)}function dw(s,l,p){var b=l.pendingProps,w=b.revealOrder,S=b.tail;b=b.children;var R=ar.current,q=(R&2)!==0;if(q?(R=R&1|2,l.flags|=128):R&=1,ft(ar,R),Br(s,l,b,p),b=ri?qh:0,!q&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&uw(s,p,l);else if(s.tag===19)uw(s,p,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break t;for(;s.sibling===null;){if(s.return===null||s.return===l)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(w){case"forwards":for(p=l.child,w=null;p!==null;)s=p.alternate,s!==null&&Sf(s)===null&&(w=p),p=p.sibling;p=w,p===null?(w=l.child,l.child=null):(w=p.sibling,p.sibling=null),Ky(l,!1,w,p,S,b);break;case"backwards":case"unstable_legacy-backwards":for(p=null,w=l.child,l.child=null;w!==null;){if(s=w.alternate,s!==null&&Sf(s)===null){l.child=w;break}s=w.sibling,w.sibling=p,p=w,w=s}Ky(l,!0,p,null,S,b);break;case"together":Ky(l,!1,null,null,void 0,b);break;default:l.memoizedState=null}return l.child}function os(s,l,p){if(s!==null&&(l.dependencies=s.dependencies),io|=l.lanes,(p&l.childLanes)===0)if(s!==null){if(ac(s,l,p,!1),(p&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,p=es(s,s.pendingProps),l.child=p,p.return=l;s.sibling!==null;)s=s.sibling,p=p.sibling=es(s,s.pendingProps),p.return=l;p.sibling=null}return l.child}function Vy(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&yf(s)))}function $F(s,l,p){switch(l.tag){case 3:it(l,l.stateNode.containerInfo),Ks(l,hr,s.memoizedState.cache),Zo();break;case 27:case 5:at(l);break;case 4:it(l,l.stateNode.containerInfo);break;case 10:Ks(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,vy(l),null;break;case 13:var b=l.memoizedState;if(b!==null)return b.dehydrated!==null?(Qs(l),l.flags|=128,null):(p&l.child.childLanes)!==0?hw(s,l,p):(Qs(l),s=os(s,l,p),s!==null?s.sibling:null);Qs(l);break;case 19:var w=(s.flags&128)!==0;if(b=(p&l.childLanes)!==0,b||(ac(s,l,p,!1),b=(p&l.childLanes)!==0),w){if(b)return dw(s,l,p);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),ft(ar,ar.current),b)break;return null;case 22:return l.lanes=0,nw(s,l,p,l.pendingProps);case 24:Ks(l,hr,s.memoizedState.cache)}return os(s,l,p)}function fw(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps)dr=!0;else{if(!Vy(s,p)&&(l.flags&128)===0)return dr=!1,$F(s,l,p);dr=(s.flags&131072)!==0}else dr=!1,ri&&(l.flags&1048576)!==0&&W_(l,qh,l.index);switch(l.lanes=0,l.tag){case 16:t:{var b=l.pendingProps;if(s=el(l.elementType),l.type=s,typeof s=="function")ty(s)?(b=al(s,b),l.tag=1,l=lw(null,l,s,b,p)):(l.tag=0,l=qy(null,l,s,b,p));else{if(s!=null){var w=s.$$typeof;if(w===E){l.tag=11,l=ew(null,l,s,b,p);break t}else if(w===A){l.tag=14,l=iw(null,l,s,b,p);break t}}throw l=z(s)||s,Error(n(306,l,""))}}return l;case 0:return qy(s,l,l.type,l.pendingProps,p);case 1:return b=l.type,w=al(b,l.pendingProps),lw(s,l,b,w,p);case 3:t:{if(it(l,l.stateNode.containerInfo),s===null)throw Error(n(387));b=l.pendingProps;var S=l.memoizedState;w=S.element,gy(s,l),Xh(l,b,null,p);var R=l.memoizedState;if(b=R.cache,Ks(l,hr,b),b!==S.cache&&cy(l,[hr],p,!0),Vh(),b=R.element,S.isDehydrated)if(S={element:b,isDehydrated:!1,cache:R.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=cw(s,l,b,p);break t}else if(b!==w){w=Wn(Error(n(424)),l),Uh(w),l=cw(s,l,b,p);break t}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Fi=Xn(s.firstChild),Ar=l,ri=!0,Gs=null,Kn=!0,p=nk(l,null,b,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Zo(),b===w){l=os(s,l,p);break t}Br(s,l,b,p)}l=l.child}return l;case 26:return Df(s,l),s===null?(p=wS(l.type,null,l.pendingProps,null))?l.memoizedState=p:ri||(p=l.type,s=l.pendingProps,b=Jf(ot.current).createElement(p),b[Ri]=l,b[Zi]=s,Lr(b,p,s),yi(b),l.stateNode=b):l.memoizedState=wS(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return at(l),s===null&&ri&&(b=l.stateNode=CS(l.type,l.pendingProps,ot.current),Ar=l,Kn=!0,w=Fi,oo(l.type)?(Nb=w,Fi=Xn(b.firstChild)):Fi=w),Br(s,l,l.pendingProps.children,p),Df(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&ri&&((w=b=Fi)&&(b=g4(b,l.type,l.pendingProps,Kn),b!==null?(l.stateNode=b,Ar=l,Fi=Xn(b.firstChild),Kn=!1,w=!0):w=!1),w||Ys(l)),at(l),w=l.type,S=l.pendingProps,R=s!==null?s.memoizedProps:null,b=S.children,kb(w,S)?b=null:R!==null&&kb(w,R)&&(l.flags|=32),l.memoizedState!==null&&(w=_y(s,l,MF,null,null,p),mu._currentValue=w),Df(s,l),Br(s,l,b,p),l.child;case 6:return s===null&&ri&&((s=p=Fi)&&(p=m4(p,l.pendingProps,Kn),p!==null?(l.stateNode=p,Ar=l,Fi=null,s=!0):s=!1),s||Ys(l)),null;case 13:return hw(s,l,p);case 4:return it(l,l.stateNode.containerInfo),b=l.pendingProps,s===null?l.child=rl(l,null,b,p):Br(s,l,b,p),l.child;case 11:return ew(s,l,l.type,l.pendingProps,p);case 7:return Br(s,l,l.pendingProps,p),l.child;case 8:return Br(s,l,l.pendingProps.children,p),l.child;case 12:return Br(s,l,l.pendingProps.children,p),l.child;case 10:return b=l.pendingProps,Ks(l,l.type,b.value),Br(s,l,b.children,p),l.child;case 9:return w=l.type._context,b=l.pendingProps.children,Jo(l),w=Mr(w),b=b(w),l.flags|=1,Br(s,l,b,p),l.child;case 14:return iw(s,l,l.type,l.pendingProps,p);case 15:return rw(s,l,l.type,l.pendingProps,p);case 19:return dw(s,l,p);case 31:return IF(s,l,p);case 22:return nw(s,l,p,l.pendingProps);case 24:return Jo(l),b=Mr(hr),s===null?(w=dy(),w===null&&(w=ji,S=hy(),w.pooledCache=S,S.refCount++,S!==null&&(w.pooledCacheLanes|=p),w=S),l.memoizedState={parent:b,cache:w},py(l),Ks(l,hr,w)):((s.lanes&p)!==0&&(gy(s,l),Xh(l,null,null,p),Vh()),w=s.memoizedState,S=l.memoizedState,w.parent!==b?(w={parent:b,cache:b},l.memoizedState=w,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=w),Ks(l,hr,b)):(b=S.cache,Ks(l,hr,b),b!==w.cache&&cy(l,[hr],p,!0))),Br(s,l,l.pendingProps.children,p),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function ls(s){s.flags|=4}function Xy(s,l,p,b,w){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(w&335544128)===w)if(s.stateNode.complete)s.flags|=8192;else if(zw())s.flags|=8192;else throw il=Cf,fy}else s.flags&=-16777217}function pw(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!AS(l))if(zw())s.flags|=8192;else throw il=Cf,fy}function If(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?_e():536870912,s.lanes|=l,yc|=l)}function iu(s,l){if(!ri)switch(s.tailMode){case"hidden":l=s.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var b=null;p!==null;)p.alternate!==null&&(b=p),p=p.sibling;b===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:b.sibling=null}}function Ii(s){var l=s.alternate!==null&&s.alternate.child===s.child,p=0,b=0;if(l)for(var w=s.child;w!==null;)p|=w.lanes|w.childLanes,b|=w.subtreeFlags&65011712,b|=w.flags&65011712,w.return=s,w=w.sibling;else for(w=s.child;w!==null;)p|=w.lanes|w.childLanes,b|=w.subtreeFlags,b|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=b,s.childLanes=p,l}function zF(s,l,p){var b=l.pendingProps;switch(ny(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ii(l),null;case 1:return Ii(l),null;case 3:return p=l.stateNode,b=null,s!==null&&(b=s.memoizedState.cache),l.memoizedState.cache!==b&&(l.flags|=2048),ns(hr),V(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(nc(l)?ls(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,sy())),Ii(l),null;case 26:var w=l.type,S=l.memoizedState;return s===null?(ls(l),S!==null?(Ii(l),pw(l,S)):(Ii(l),Xy(l,w,null,b,p))):S?S!==s.memoizedState?(ls(l),Ii(l),pw(l,S)):(Ii(l),l.flags&=-16777217):(s=s.memoizedProps,s!==b&&ls(l),Ii(l),Xy(l,w,s,b,p)),null;case 27:if(Ct(l),p=ot.current,w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==b&&ls(l);else{if(!b){if(l.stateNode===null)throw Error(n(166));return Ii(l),null}s=ct.current,nc(l)?Y_(l):(s=CS(w,b,p),l.stateNode=s,ls(l))}return Ii(l),null;case 5:if(Ct(l),w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==b&&ls(l);else{if(!b){if(l.stateNode===null)throw Error(n(166));return Ii(l),null}if(S=ct.current,nc(l))Y_(l);else{var R=Jf(ot.current);switch(S){case 1:S=R.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:S=R.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":S=R.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":S=R.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":S=R.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof b.is=="string"?R.createElement("select",{is:b.is}):R.createElement("select"),b.multiple?S.multiple=!0:b.size&&(S.size=b.size);break;default:S=typeof b.is=="string"?R.createElement(w,{is:b.is}):R.createElement(w)}}S[Ri]=l,S[Zi]=b;t:for(R=l.child;R!==null;){if(R.tag===5||R.tag===6)S.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===l)break t;for(;R.sibling===null;){if(R.return===null||R.return===l)break t;R=R.return}R.sibling.return=R.return,R=R.sibling}l.stateNode=S;t:switch(Lr(S,w,b),w){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break t;case"img":b=!0;break t;default:b=!1}b&&ls(l)}}return Ii(l),Xy(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,p),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==b&&ls(l);else{if(typeof b!="string"&&l.stateNode===null)throw Error(n(166));if(s=ot.current,nc(l)){if(s=l.stateNode,p=l.memoizedProps,b=null,w=Ar,w!==null)switch(w.tag){case 27:case 5:b=w.memoizedProps}s[Ri]=l,s=!!(s.nodeValue===p||b!==null&&b.suppressHydrationWarning===!0||hS(s.nodeValue,p)),s||Ys(l,!0)}else s=Jf(s).createTextNode(b),s[Ri]=l,l.stateNode=s}return Ii(l),null;case 31:if(p=l.memoizedState,s===null||s.memoizedState!==null){if(b=nc(l),p!==null){if(s===null){if(!b)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[Ri]=l}else Zo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ii(l),s=!1}else p=sy(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),s=!0;if(!s)return l.flags&256?(An(l),l):(An(l),null);if((l.flags&128)!==0)throw Error(n(558))}return Ii(l),null;case 13:if(b=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=nc(l),b!==null&&b.dehydrated!==null){if(s===null){if(!w)throw Error(n(318));if(w=l.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[Ri]=l}else Zo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ii(l),w=!1}else w=sy(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=w),w=!0;if(!w)return l.flags&256?(An(l),l):(An(l),null)}return An(l),(l.flags&128)!==0?(l.lanes=p,l):(p=b!==null,s=s!==null&&s.memoizedState!==null,p&&(b=l.child,w=null,b.alternate!==null&&b.alternate.memoizedState!==null&&b.alternate.memoizedState.cachePool!==null&&(w=b.alternate.memoizedState.cachePool.pool),S=null,b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(S=b.memoizedState.cachePool.pool),S!==w&&(b.flags|=2048)),p!==s&&p&&(l.child.flags|=8192),If(l,l.updateQueue),Ii(l),null);case 4:return V(),s===null&&bb(l.stateNode.containerInfo),Ii(l),null;case 10:return ns(l.type),Ii(l),null;case 19:if(tt(ar),b=l.memoizedState,b===null)return Ii(l),null;if(w=(l.flags&128)!==0,S=b.rendering,S===null)if(w)iu(b,!1);else{if(tr!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=Sf(s),S!==null){for(l.flags|=128,iu(b,!1),s=S.updateQueue,l.updateQueue=s,If(l,s),l.subtreeFlags=0,s=p,p=l.child;p!==null;)q_(p,s),p=p.sibling;return ft(ar,ar.current&1|2),ri&&is(l,b.treeForkCount),l.child}s=s.sibling}b.tail!==null&&jt()>Uf&&(l.flags|=128,w=!0,iu(b,!1),l.lanes=4194304)}else{if(!w)if(s=Sf(S),s!==null){if(l.flags|=128,w=!0,s=s.updateQueue,l.updateQueue=s,If(l,s),iu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!ri)return Ii(l),null}else 2*jt()-b.renderingStartTime>Uf&&p!==536870912&&(l.flags|=128,w=!0,iu(b,!1),l.lanes=4194304);b.isBackwards?(S.sibling=l.child,l.child=S):(s=b.last,s!==null?s.sibling=S:l.child=S,b.last=S)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=jt(),s.sibling=null,p=ar.current,ft(ar,w?p&1|2:p&1),ri&&is(l,b.treeForkCount),s):(Ii(l),null);case 22:case 23:return An(l),xy(),b=l.memoizedState!==null,s!==null?s.memoizedState!==null!==b&&(l.flags|=8192):b&&(l.flags|=8192),b?(p&536870912)!==0&&(l.flags&128)===0&&(Ii(l),l.subtreeFlags&6&&(l.flags|=8192)):Ii(l),p=l.updateQueue,p!==null&&If(l,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),b=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(b=l.memoizedState.cachePool.pool),b!==p&&(l.flags|=2048),s!==null&&tt(tl),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ns(hr),Ii(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function PF(s,l){switch(ny(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ns(hr),V(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ct(l),null;case 31:if(l.memoizedState!==null){if(An(l),l.alternate===null)throw Error(n(340));Zo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(An(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Zo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return tt(ar),null;case 4:return V(),null;case 10:return ns(l.type),null;case 22:case 23:return An(l),xy(),s!==null&&tt(tl),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return ns(hr),null;case 25:return null;default:return null}}function gw(s,l){switch(ny(l),l.tag){case 3:ns(hr),V();break;case 26:case 27:case 5:Ct(l);break;case 4:V();break;case 31:l.memoizedState!==null&&An(l);break;case 13:An(l);break;case 19:tt(ar);break;case 10:ns(l.type);break;case 22:case 23:An(l),xy(),s!==null&&tt(tl);break;case 24:ns(hr)}}function ru(s,l){try{var p=l.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var w=b.next;p=w;do{if((p.tag&s)===s){b=void 0;var S=p.create,R=p.inst;b=S(),R.destroy=b}p=p.next}while(p!==w)}}catch(q){Ti(l,l.return,q)}}function to(s,l,p){try{var b=l.updateQueue,w=b!==null?b.lastEffect:null;if(w!==null){var S=w.next;b=S;do{if((b.tag&s)===s){var R=b.inst,q=R.destroy;if(q!==void 0){R.destroy=void 0,w=l;var Q=p,mt=q;try{mt()}catch(Nt){Ti(w,Q,Nt)}}}b=b.next}while(b!==S)}}catch(Nt){Ti(l,l.return,Nt)}}function mw(s){var l=s.updateQueue;if(l!==null){var p=s.stateNode;try{sk(l,p)}catch(b){Ti(s,s.return,b)}}}function yw(s,l,p){p.props=al(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(b){Ti(s,l,b)}}function nu(s,l){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var b=s.stateNode;break;case 30:b=s.stateNode;break;default:b=s.stateNode}typeof p=="function"?s.refCleanup=p(b):p.current=b}}catch(w){Ti(s,l,w)}}function Ma(s,l){var p=s.ref,b=s.refCleanup;if(p!==null)if(typeof b=="function")try{b()}catch(w){Ti(s,l,w)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(w){Ti(s,l,w)}else p.current=null}function bw(s){var l=s.type,p=s.memoizedProps,b=s.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":p.autoFocus&&b.focus();break t;case"img":p.src?b.src=p.src:p.srcSet&&(b.srcset=p.srcSet)}}catch(w){Ti(s,s.return,w)}}function Zy(s,l,p){try{var b=s.stateNode;c4(b,s.type,p,l),b[Zi]=l}catch(w){Ti(s,s.return,w)}}function xw(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&oo(s.type)||s.tag===4}function Qy(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||xw(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&oo(s.type)||s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Jy(s,l,p){var b=s.tag;if(b===5||b===6)s=s.stateNode,l?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(s,l):(l=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,l.appendChild(s),p=p._reactRootContainer,p!=null||l.onclick!==null||(l.onclick=Wt));else if(b!==4&&(b===27&&oo(s.type)&&(p=s.stateNode,l=null),s=s.child,s!==null))for(Jy(s,l,p),s=s.sibling;s!==null;)Jy(s,l,p),s=s.sibling}function $f(s,l,p){var b=s.tag;if(b===5||b===6)s=s.stateNode,l?p.insertBefore(s,l):p.appendChild(s);else if(b!==4&&(b===27&&oo(s.type)&&(p=s.stateNode),s=s.child,s!==null))for($f(s,l,p),s=s.sibling;s!==null;)$f(s,l,p),s=s.sibling}function vw(s){var l=s.stateNode,p=s.memoizedProps;try{for(var b=s.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);Lr(l,b,p),l[Ri]=s,l[Zi]=p}catch(S){Ti(s,s.return,S)}}var cs=!1,fr=!1,tb=!1,Cw=typeof WeakSet=="function"?WeakSet:Set,wr=null;function qF(s,l){if(s=s.containerInfo,Cb=sp,s=O_(s),Ym(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else t:{p=(p=s.ownerDocument)&&p.defaultView||window;var b=p.getSelection&&p.getSelection();if(b&&b.rangeCount!==0){p=b.anchorNode;var w=b.anchorOffset,S=b.focusNode;b=b.focusOffset;try{p.nodeType,S.nodeType}catch{p=null;break t}var R=0,q=-1,Q=-1,mt=0,Nt=0,Mt=s,bt=null;e:for(;;){for(var kt;Mt!==p||w!==0&&Mt.nodeType!==3||(q=R+w),Mt!==S||b!==0&&Mt.nodeType!==3||(Q=R+b),Mt.nodeType===3&&(R+=Mt.nodeValue.length),(kt=Mt.firstChild)!==null;)bt=Mt,Mt=kt;for(;;){if(Mt===s)break e;if(bt===p&&++mt===w&&(q=R),bt===S&&++Nt===b&&(Q=R),(kt=Mt.nextSibling)!==null)break;Mt=bt,bt=Mt.parentNode}Mt=kt}p=q===-1||Q===-1?null:{start:q,end:Q}}else p=null}p=p||{start:0,end:0}}else p=null;for(_b={focusedElem:s,selectionRange:p},sp=!1,wr=l;wr!==null;)if(l=wr,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,wr=s;else for(;wr!==null;){switch(l=wr,S=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(p=0;p<s.length;p++)w=s[p],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&S!==null){s=void 0,p=l,w=S.memoizedProps,S=S.memoizedState,b=p.stateNode;try{var ne=al(p.type,w);s=b.getSnapshotBeforeUpdate(ne,S),b.__reactInternalSnapshotBeforeUpdate=s}catch(Te){Ti(p,p.return,Te)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,p=s.nodeType,p===9)Sb(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Sb(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,wr=s;break}wr=l.return}}function _w(s,l,p){var b=p.flags;switch(p.tag){case 0:case 11:case 15:us(s,p),b&4&&ru(5,p);break;case 1:if(us(s,p),b&4)if(s=p.stateNode,l===null)try{s.componentDidMount()}catch(R){Ti(p,p.return,R)}else{var w=al(p.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(R){Ti(p,p.return,R)}}b&64&&mw(p),b&512&&nu(p,p.return);break;case 3:if(us(s,p),b&64&&(s=p.updateQueue,s!==null)){if(l=null,p.child!==null)switch(p.child.tag){case 27:case 5:l=p.child.stateNode;break;case 1:l=p.child.stateNode}try{sk(s,l)}catch(R){Ti(p,p.return,R)}}break;case 27:l===null&&b&4&&vw(p);case 26:case 5:us(s,p),l===null&&b&4&&bw(p),b&512&&nu(p,p.return);break;case 12:us(s,p);break;case 31:us(s,p),b&4&&Sw(s,p);break;case 13:us(s,p),b&4&&Tw(s,p),b&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=ZF.bind(null,p),y4(s,p))));break;case 22:if(b=p.memoizedState!==null||cs,!b){l=l!==null&&l.memoizedState!==null||fr,w=cs;var S=fr;cs=b,(fr=l)&&!S?ds(s,p,(p.subtreeFlags&8772)!==0):us(s,p),cs=w,fr=S}break;case 30:break;default:us(s,p)}}function kw(s){var l=s.alternate;l!==null&&(s.alternate=null,kw(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&Ea(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Ui=null,un=!1;function hs(s,l,p){for(p=p.child;p!==null;)ww(s,l,p),p=p.sibling}function ww(s,l,p){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(Ge,p)}catch{}switch(p.tag){case 26:fr||Ma(p,l),hs(s,l,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:fr||Ma(p,l);var b=Ui,w=un;oo(p.type)&&(Ui=p.stateNode,un=!1),hs(s,l,p),fu(p.stateNode),Ui=b,un=w;break;case 5:fr||Ma(p,l);case 6:if(b=Ui,w=un,Ui=null,hs(s,l,p),Ui=b,un=w,Ui!==null)if(un)try{(Ui.nodeType===9?Ui.body:Ui.nodeName==="HTML"?Ui.ownerDocument.body:Ui).removeChild(p.stateNode)}catch(S){Ti(p,l,S)}else try{Ui.removeChild(p.stateNode)}catch(S){Ti(p,l,S)}break;case 18:Ui!==null&&(un?(s=Ui,mS(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),Sc(s)):mS(Ui,p.stateNode));break;case 4:b=Ui,w=un,Ui=p.stateNode.containerInfo,un=!0,hs(s,l,p),Ui=b,un=w;break;case 0:case 11:case 14:case 15:to(2,p,l),fr||to(4,p,l),hs(s,l,p);break;case 1:fr||(Ma(p,l),b=p.stateNode,typeof b.componentWillUnmount=="function"&&yw(p,l,b)),hs(s,l,p);break;case 21:hs(s,l,p);break;case 22:fr=(b=fr)||p.memoizedState!==null,hs(s,l,p),fr=b;break;default:hs(s,l,p)}}function Sw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Sc(s)}catch(p){Ti(l,l.return,p)}}}function Tw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Sc(s)}catch(p){Ti(l,l.return,p)}}function UF(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new Cw),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new Cw),l;default:throw Error(n(435,s.tag))}}function zf(s,l){var p=UF(s);l.forEach(function(b){if(!p.has(b)){p.add(b);var w=QF.bind(null,s,b);b.then(w,w)}})}function dn(s,l){var p=l.deletions;if(p!==null)for(var b=0;b<p.length;b++){var w=p[b],S=s,R=l,q=R;t:for(;q!==null;){switch(q.tag){case 27:if(oo(q.type)){Ui=q.stateNode,un=!1;break t}break;case 5:Ui=q.stateNode,un=!1;break t;case 3:case 4:Ui=q.stateNode.containerInfo,un=!0;break t}q=q.return}if(Ui===null)throw Error(n(160));ww(S,R,w),Ui=null,un=!1,S=w.alternate,S!==null&&(S.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Ew(l,s),l=l.sibling}var ha=null;function Ew(s,l){var p=s.alternate,b=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:dn(l,s),fn(s),b&4&&(to(3,s,s.return),ru(3,s),to(5,s,s.return));break;case 1:dn(l,s),fn(s),b&512&&(fr||p===null||Ma(p,p.return)),b&64&&cs&&(s=s.updateQueue,s!==null&&(b=s.callbacks,b!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?b:p.concat(b))));break;case 26:var w=ha;if(dn(l,s),fn(s),b&512&&(fr||p===null||Ma(p,p.return)),b&4){var S=p!==null?p.memoizedState:null;if(b=s.memoizedState,p===null)if(b===null)if(s.stateNode===null){t:{b=s.type,p=s.memoizedProps,w=w.ownerDocument||w;e:switch(b){case"title":S=w.getElementsByTagName("title")[0],(!S||S[$n]||S[Ri]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=w.createElement(b),w.head.insertBefore(S,w.querySelector("head > title"))),Lr(S,b,p),S[Ri]=s,yi(S),b=S;break t;case"link":var R=ES("link","href",w).get(b+(p.href||""));if(R){for(var q=0;q<R.length;q++)if(S=R[q],S.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&S.getAttribute("rel")===(p.rel==null?null:p.rel)&&S.getAttribute("title")===(p.title==null?null:p.title)&&S.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){R.splice(q,1);break e}}S=w.createElement(b),Lr(S,b,p),w.head.appendChild(S);break;case"meta":if(R=ES("meta","content",w).get(b+(p.content||""))){for(q=0;q<R.length;q++)if(S=R[q],S.getAttribute("content")===(p.content==null?null:""+p.content)&&S.getAttribute("name")===(p.name==null?null:p.name)&&S.getAttribute("property")===(p.property==null?null:p.property)&&S.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&S.getAttribute("charset")===(p.charSet==null?null:p.charSet)){R.splice(q,1);break e}}S=w.createElement(b),Lr(S,b,p),w.head.appendChild(S);break;default:throw Error(n(468,b))}S[Ri]=s,yi(S),b=S}s.stateNode=b}else NS(w,s.type,s.stateNode);else s.stateNode=TS(w,b,s.memoizedProps);else S!==b?(S===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):S.count--,b===null?NS(w,s.type,s.stateNode):TS(w,b,s.memoizedProps)):b===null&&s.stateNode!==null&&Zy(s,s.memoizedProps,p.memoizedProps)}break;case 27:dn(l,s),fn(s),b&512&&(fr||p===null||Ma(p,p.return)),p!==null&&b&4&&Zy(s,s.memoizedProps,p.memoizedProps);break;case 5:if(dn(l,s),fn(s),b&512&&(fr||p===null||Ma(p,p.return)),s.flags&32){w=s.stateNode;try{Vt(w,"")}catch(ne){Ti(s,s.return,ne)}}b&4&&s.stateNode!=null&&(w=s.memoizedProps,Zy(s,w,p!==null?p.memoizedProps:w)),b&1024&&(tb=!0);break;case 6:if(dn(l,s),fn(s),b&4){if(s.stateNode===null)throw Error(n(162));b=s.memoizedProps,p=s.stateNode;try{p.nodeValue=b}catch(ne){Ti(s,s.return,ne)}}break;case 3:if(ip=null,w=ha,ha=tp(l.containerInfo),dn(l,s),ha=w,fn(s),b&4&&p!==null&&p.memoizedState.isDehydrated)try{Sc(l.containerInfo)}catch(ne){Ti(s,s.return,ne)}tb&&(tb=!1,Nw(s));break;case 4:b=ha,ha=tp(s.stateNode.containerInfo),dn(l,s),fn(s),ha=b;break;case 12:dn(l,s),fn(s);break;case 31:dn(l,s),fn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,zf(s,b)));break;case 13:dn(l,s),fn(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(qf=jt()),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,zf(s,b)));break;case 22:w=s.memoizedState!==null;var Q=p!==null&&p.memoizedState!==null,mt=cs,Nt=fr;if(cs=mt||w,fr=Nt||Q,dn(l,s),fr=Nt,cs=mt,fn(s),b&8192)t:for(l=s.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(p===null||Q||cs||fr||sl(s)),p=null,l=s;;){if(l.tag===5||l.tag===26){if(p===null){Q=p=l;try{if(S=Q.stateNode,w)R=S.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{q=Q.stateNode;var Mt=Q.memoizedProps.style,bt=Mt!=null&&Mt.hasOwnProperty("display")?Mt.display:null;q.style.display=bt==null||typeof bt=="boolean"?"":(""+bt).trim()}}catch(ne){Ti(Q,Q.return,ne)}}}else if(l.tag===6){if(p===null){Q=l;try{Q.stateNode.nodeValue=w?"":Q.memoizedProps}catch(ne){Ti(Q,Q.return,ne)}}}else if(l.tag===18){if(p===null){Q=l;try{var kt=Q.stateNode;w?yS(kt,!0):yS(Q.stateNode,!1)}catch(ne){Ti(Q,Q.return,ne)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break t;for(;l.sibling===null;){if(l.return===null||l.return===s)break t;p===l&&(p=null),l=l.return}p===l&&(p=null),l.sibling.return=l.return,l=l.sibling}b&4&&(b=s.updateQueue,b!==null&&(p=b.retryQueue,p!==null&&(b.retryQueue=null,zf(s,p))));break;case 19:dn(l,s),fn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,zf(s,b)));break;case 30:break;case 21:break;default:dn(l,s),fn(s)}}function fn(s){var l=s.flags;if(l&2){try{for(var p,b=s.return;b!==null;){if(xw(b)){p=b;break}b=b.return}if(p==null)throw Error(n(160));switch(p.tag){case 27:var w=p.stateNode,S=Qy(s);$f(s,S,w);break;case 5:var R=p.stateNode;p.flags&32&&(Vt(R,""),p.flags&=-33);var q=Qy(s);$f(s,q,R);break;case 3:case 4:var Q=p.stateNode.containerInfo,mt=Qy(s);Jy(s,mt,Q);break;default:throw Error(n(161))}}catch(Nt){Ti(s,s.return,Nt)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function Nw(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;Nw(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function us(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)_w(s,l.alternate,l),l=l.sibling}function sl(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:to(4,l,l.return),sl(l);break;case 1:Ma(l,l.return);var p=l.stateNode;typeof p.componentWillUnmount=="function"&&yw(l,l.return,p),sl(l);break;case 27:fu(l.stateNode);case 26:case 5:Ma(l,l.return),sl(l);break;case 22:l.memoizedState===null&&sl(l);break;case 30:sl(l);break;default:sl(l)}s=s.sibling}}function ds(s,l,p){for(p=p&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var b=l.alternate,w=s,S=l,R=S.flags;switch(S.tag){case 0:case 11:case 15:ds(w,S,p),ru(4,S);break;case 1:if(ds(w,S,p),b=S,w=b.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(mt){Ti(b,b.return,mt)}if(b=S,w=b.updateQueue,w!==null){var q=b.stateNode;try{var Q=w.shared.hiddenCallbacks;if(Q!==null)for(w.shared.hiddenCallbacks=null,w=0;w<Q.length;w++)ak(Q[w],q)}catch(mt){Ti(b,b.return,mt)}}p&&R&64&&mw(S),nu(S,S.return);break;case 27:vw(S);case 26:case 5:ds(w,S,p),p&&b===null&&R&4&&bw(S),nu(S,S.return);break;case 12:ds(w,S,p);break;case 31:ds(w,S,p),p&&R&4&&Sw(w,S);break;case 13:ds(w,S,p),p&&R&4&&Tw(w,S);break;case 22:S.memoizedState===null&&ds(w,S,p),nu(S,S.return);break;case 30:break;default:ds(w,S,p)}l=l.sibling}}function eb(s,l){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&Hh(p))}function ib(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Hh(s))}function ua(s,l,p,b){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Aw(s,l,p,b),l=l.sibling}function Aw(s,l,p,b){var w=l.flags;switch(l.tag){case 0:case 11:case 15:ua(s,l,p,b),w&2048&&ru(9,l);break;case 1:ua(s,l,p,b);break;case 3:ua(s,l,p,b),w&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Hh(s)));break;case 12:if(w&2048){ua(s,l,p,b),s=l.stateNode;try{var S=l.memoizedProps,R=S.id,q=S.onPostCommit;typeof q=="function"&&q(R,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Q){Ti(l,l.return,Q)}}else ua(s,l,p,b);break;case 31:ua(s,l,p,b);break;case 13:ua(s,l,p,b);break;case 23:break;case 22:S=l.stateNode,R=l.alternate,l.memoizedState!==null?S._visibility&2?ua(s,l,p,b):au(s,l):S._visibility&2?ua(s,l,p,b):(S._visibility|=2,pc(s,l,p,b,(l.subtreeFlags&10256)!==0||!1)),w&2048&&eb(R,l);break;case 24:ua(s,l,p,b),w&2048&&ib(l.alternate,l);break;default:ua(s,l,p,b)}}function pc(s,l,p,b,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,R=l,q=p,Q=b,mt=R.flags;switch(R.tag){case 0:case 11:case 15:pc(S,R,q,Q,w),ru(8,R);break;case 23:break;case 22:var Nt=R.stateNode;R.memoizedState!==null?Nt._visibility&2?pc(S,R,q,Q,w):au(S,R):(Nt._visibility|=2,pc(S,R,q,Q,w)),w&&mt&2048&&eb(R.alternate,R);break;case 24:pc(S,R,q,Q,w),w&&mt&2048&&ib(R.alternate,R);break;default:pc(S,R,q,Q,w)}l=l.sibling}}function au(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var p=s,b=l,w=b.flags;switch(b.tag){case 22:au(p,b),w&2048&&eb(b.alternate,b);break;case 24:au(p,b),w&2048&&ib(b.alternate,b);break;default:au(p,b)}l=l.sibling}}var su=8192;function gc(s,l,p){if(s.subtreeFlags&su)for(s=s.child;s!==null;)Mw(s,l,p),s=s.sibling}function Mw(s,l,p){switch(s.tag){case 26:gc(s,l,p),s.flags&su&&s.memoizedState!==null&&A4(p,ha,s.memoizedState,s.memoizedProps);break;case 5:gc(s,l,p);break;case 3:case 4:var b=ha;ha=tp(s.stateNode.containerInfo),gc(s,l,p),ha=b;break;case 22:s.memoizedState===null&&(b=s.alternate,b!==null&&b.memoizedState!==null?(b=su,su=16777216,gc(s,l,p),su=b):gc(s,l,p));break;default:gc(s,l,p)}}function Bw(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function ou(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var p=0;p<l.length;p++){var b=l[p];wr=b,Ow(b,s)}Bw(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Lw(s),s=s.sibling}function Lw(s){switch(s.tag){case 0:case 11:case 15:ou(s),s.flags&2048&&to(9,s,s.return);break;case 3:ou(s);break;case 12:ou(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Pf(s)):ou(s);break;default:ou(s)}}function Pf(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var p=0;p<l.length;p++){var b=l[p];wr=b,Ow(b,s)}Bw(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:to(8,l,l.return),Pf(l);break;case 22:p=l.stateNode,p._visibility&2&&(p._visibility&=-3,Pf(l));break;default:Pf(l)}s=s.sibling}}function Ow(s,l){for(;wr!==null;){var p=wr;switch(p.tag){case 0:case 11:case 15:to(8,p,l);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var b=p.memoizedState.cachePool.pool;b!=null&&b.refCount++}break;case 24:Hh(p.memoizedState.cache)}if(b=p.child,b!==null)b.return=p,wr=b;else t:for(p=s;wr!==null;){b=wr;var w=b.sibling,S=b.return;if(kw(b),b===p){wr=null;break t}if(w!==null){w.return=S,wr=w;break t}wr=S}}}var HF={getCacheForType:function(s){var l=Mr(hr),p=l.data.get(s);return p===void 0&&(p=s(),l.data.set(s,p)),p},cacheSignal:function(){return Mr(hr).controller.signal}},WF=typeof WeakMap=="function"?WeakMap:Map,pi=0,ji=null,Ve=null,ti=0,Si=0,Mn=null,eo=!1,mc=!1,rb=!1,fs=0,tr=0,io=0,ol=0,nb=0,Bn=0,yc=0,lu=null,pn=null,ab=!1,qf=0,Rw=0,Uf=1/0,Hf=null,ro=null,br=0,no=null,bc=null,ps=0,sb=0,ob=null,jw=null,cu=0,lb=null;function Ln(){return(pi&2)!==0&&ti!==0?ti&-ti:j.T!==null?pb():Yr()}function Dw(){if(Bn===0)if((ti&536870912)===0||ri){var s=Oi;Oi<<=1,(Oi&3932160)===0&&(Oi=262144),Bn=s}else Bn=536870912;return s=Nn.current,s!==null&&(s.flags|=32),Bn}function gn(s,l,p){(s===ji&&(Si===2||Si===9)||s.cancelPendingCommit!==null)&&(xc(s,0),ao(s,ti,Bn,!1)),Se(s,p),((pi&2)===0||s!==ji)&&(s===ji&&((pi&2)===0&&(ol|=p),tr===4&&ao(s,ti,Bn,!1)),Ba(s))}function Fw(s,l,p){if((pi&6)!==0)throw Error(n(327));var b=!p&&(l&127)===0&&(l&s.expiredLanes)===0||Et(s,l),w=b?KF(s,l):hb(s,l,!0),S=b;do{if(w===0){mc&&!b&&ao(s,l,0,!1);break}else{if(p=s.current.alternate,S&&!GF(p)){w=hb(s,l,!1),S=!1;continue}if(w===2){if(S=l,s.errorRecoveryDisabledLanes&S)var R=0;else R=s.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){l=R;t:{var q=s;w=lu;var Q=q.current.memoizedState.isDehydrated;if(Q&&(xc(q,R).flags|=256),R=hb(q,R,!1),R!==2){if(rb&&!Q){q.errorRecoveryDisabledLanes|=S,ol|=S,w=4;break t}S=pn,pn=w,S!==null&&(pn===null?pn=S:pn.push.apply(pn,S))}w=R}if(S=!1,w!==2)continue}}if(w===1){xc(s,0),ao(s,l,0,!0);break}t:{switch(b=s,S=w,S){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:ao(b,l,Bn,!eo);break t;case 2:pn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(w=qf+300-jt(),10<w)){if(ao(b,l,Bn,!eo),J(b,0,!0)!==0)break t;ps=l,b.timeoutHandle=pS(Iw.bind(null,b,p,pn,Hf,ab,l,Bn,ol,yc,eo,S,"Throttled",-0,0),w);break t}Iw(b,p,pn,Hf,ab,l,Bn,ol,yc,eo,S,null,-0,0)}}break}while(!0);Ba(s)}function Iw(s,l,p,b,w,S,R,q,Q,mt,Nt,Mt,bt,kt){if(s.timeoutHandle=-1,Mt=l.subtreeFlags,Mt&8192||(Mt&16785408)===16785408){Mt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wt},Mw(l,S,Mt);var ne=(S&62914560)===S?qf-jt():(S&4194048)===S?Rw-jt():0;if(ne=M4(Mt,ne),ne!==null){ps=S,s.cancelPendingCommit=ne(Gw.bind(null,s,l,S,p,b,w,R,q,Q,Nt,Mt,null,bt,kt)),ao(s,S,R,!mt);return}}Gw(s,l,S,p,b,w,R,q,Q)}function GF(s){for(var l=s;;){var p=l.tag;if((p===0||p===11||p===15)&&l.flags&16384&&(p=l.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var b=0;b<p.length;b++){var w=p[b],S=w.getSnapshot;w=w.value;try{if(!Tn(S(),w))return!1}catch{return!1}}if(p=l.child,l.subtreeFlags&16384&&p!==null)p.return=l,l=p;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ao(s,l,p,b){l&=~nb,l&=~ol,s.suspendedLanes|=l,s.pingedLanes&=~l,b&&(s.warmLanes|=l),b=s.expirationTimes;for(var w=l;0<w;){var S=31-ye(w),R=1<<S;b[S]=-1,w&=~R}p!==0&&Xt(s,p,l)}function Wf(){return(pi&6)===0?(hu(0),!1):!0}function cb(){if(Ve!==null){if(Si===0)var s=Ve.return;else s=Ve,rs=Qo=null,Sy(s),cc=null,Gh=0,s=Ve;for(;s!==null;)gw(s.alternate,s),s=s.return;Ve=null}}function xc(s,l){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,d4(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),ps=0,cb(),ji=s,Ve=p=es(s.current,null),ti=l,Si=0,Mn=null,eo=!1,mc=Et(s,l),rb=!1,yc=Bn=nb=ol=io=tr=0,pn=lu=null,ab=!1,(l&8)!==0&&(l|=l&32);var b=s.entangledLanes;if(b!==0)for(s=s.entanglements,b&=l;0<b;){var w=31-ye(b),S=1<<w;l|=s[w],b&=~S}return fs=l,df(),p}function $w(s,l){ze=null,j.H=tu,l===lc||l===vf?(l=ek(),Si=3):l===fy?(l=ek(),Si=4):Si=l===Py?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Mn=l,Ve===null&&(tr=1,Rf(s,Wn(l,s.current)))}function zw(){var s=Nn.current;return s===null?!0:(ti&4194048)===ti?Vn===null:(ti&62914560)===ti||(ti&536870912)!==0?s===Vn:!1}function Pw(){var s=j.H;return j.H=tu,s===null?tu:s}function qw(){var s=j.A;return j.A=HF,s}function Gf(){tr=4,eo||(ti&4194048)!==ti&&Nn.current!==null||(mc=!0),(io&134217727)===0&&(ol&134217727)===0||ji===null||ao(ji,ti,Bn,!1)}function hb(s,l,p){var b=pi;pi|=2;var w=Pw(),S=qw();(ji!==s||ti!==l)&&(Hf=null,xc(s,l)),l=!1;var R=tr;t:do try{if(Si!==0&&Ve!==null){var q=Ve,Q=Mn;switch(Si){case 8:cb(),R=6;break t;case 3:case 2:case 9:case 6:Nn.current===null&&(l=!0);var mt=Si;if(Si=0,Mn=null,vc(s,q,Q,mt),p&&mc){R=0;break t}break;default:mt=Si,Si=0,Mn=null,vc(s,q,Q,mt)}}YF(),R=tr;break}catch(Nt){$w(s,Nt)}while(!0);return l&&s.shellSuspendCounter++,rs=Qo=null,pi=b,j.H=w,j.A=S,Ve===null&&(ji=null,ti=0,df()),R}function YF(){for(;Ve!==null;)Uw(Ve)}function KF(s,l){var p=pi;pi|=2;var b=Pw(),w=qw();ji!==s||ti!==l?(Hf=null,Uf=jt()+500,xc(s,l)):mc=Et(s,l);t:do try{if(Si!==0&&Ve!==null){l=Ve;var S=Mn;e:switch(Si){case 1:Si=0,Mn=null,vc(s,l,S,1);break;case 2:case 9:if(J_(S)){Si=0,Mn=null,Hw(l);break}l=function(){Si!==2&&Si!==9||ji!==s||(Si=7),Ba(s)},S.then(l,l);break t;case 3:Si=7;break t;case 4:Si=5;break t;case 7:J_(S)?(Si=0,Mn=null,Hw(l)):(Si=0,Mn=null,vc(s,l,S,7));break;case 5:var R=null;switch(Ve.tag){case 26:R=Ve.memoizedState;case 5:case 27:var q=Ve;if(R?AS(R):q.stateNode.complete){Si=0,Mn=null;var Q=q.sibling;if(Q!==null)Ve=Q;else{var mt=q.return;mt!==null?(Ve=mt,Yf(mt)):Ve=null}break e}}Si=0,Mn=null,vc(s,l,S,5);break;case 6:Si=0,Mn=null,vc(s,l,S,6);break;case 8:cb(),tr=6;break t;default:throw Error(n(462))}}VF();break}catch(Nt){$w(s,Nt)}while(!0);return rs=Qo=null,j.H=b,j.A=w,pi=p,Ve!==null?0:(ji=null,ti=0,df(),tr)}function VF(){for(;Ve!==null&&!$t();)Uw(Ve)}function Uw(s){var l=fw(s.alternate,s,fs);s.memoizedProps=s.pendingProps,l===null?Yf(s):Ve=l}function Hw(s){var l=s,p=l.alternate;switch(l.tag){case 15:case 0:l=ow(p,l,l.pendingProps,l.type,void 0,ti);break;case 11:l=ow(p,l,l.pendingProps,l.type.render,l.ref,ti);break;case 5:Sy(l);default:gw(p,l),l=Ve=q_(l,fs),l=fw(p,l,fs)}s.memoizedProps=s.pendingProps,l===null?Yf(s):Ve=l}function vc(s,l,p,b){rs=Qo=null,Sy(l),cc=null,Gh=0;var w=l.return;try{if(FF(s,w,l,p,ti)){tr=1,Rf(s,Wn(p,s.current)),Ve=null;return}}catch(S){if(w!==null)throw Ve=w,S;tr=1,Rf(s,Wn(p,s.current)),Ve=null;return}l.flags&32768?(ri||b===1?s=!0:mc||(ti&536870912)!==0?s=!1:(eo=s=!0,(b===2||b===9||b===3||b===6)&&(b=Nn.current,b!==null&&b.tag===13&&(b.flags|=16384))),Ww(l,s)):Yf(l)}function Yf(s){var l=s;do{if((l.flags&32768)!==0){Ww(l,eo);return}s=l.return;var p=zF(l.alternate,l,fs);if(p!==null){Ve=p;return}if(l=l.sibling,l!==null){Ve=l;return}Ve=l=s}while(l!==null);tr===0&&(tr=5)}function Ww(s,l){do{var p=PF(s.alternate,s);if(p!==null){p.flags&=32767,Ve=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!l&&(s=s.sibling,s!==null)){Ve=s;return}Ve=s=p}while(s!==null);tr=6,Ve=null}function Gw(s,l,p,b,w,S,R,q,Q){s.cancelPendingCommit=null;do Kf();while(br!==0);if((pi&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Qm,Jt(s,p,S,R,q,Q),s===ji&&(Ve=ji=null,ti=0),bc=l,no=s,ps=p,sb=S,ob=w,jw=b,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,JF(ve,function(){return Zw(),null})):(s.callbackNode=null,s.callbackPriority=0),b=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||b){b=j.T,j.T=null,w=H.p,H.p=2,R=pi,pi|=4;try{qF(s,l,p)}finally{pi=R,H.p=w,j.T=b}}br=1,Yw(),Kw(),Vw()}}function Yw(){if(br===1){br=0;var s=no,l=bc,p=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||p){p=j.T,j.T=null;var b=H.p;H.p=2;var w=pi;pi|=4;try{Ew(l,s);var S=_b,R=O_(s.containerInfo),q=S.focusedElem,Q=S.selectionRange;if(R!==q&&q&&q.ownerDocument&&L_(q.ownerDocument.documentElement,q)){if(Q!==null&&Ym(q)){var mt=Q.start,Nt=Q.end;if(Nt===void 0&&(Nt=mt),"selectionStart"in q)q.selectionStart=mt,q.selectionEnd=Math.min(Nt,q.value.length);else{var Mt=q.ownerDocument||document,bt=Mt&&Mt.defaultView||window;if(bt.getSelection){var kt=bt.getSelection(),ne=q.textContent.length,Te=Math.min(Q.start,ne),Bi=Q.end===void 0?Te:Math.min(Q.end,ne);!kt.extend&&Te>Bi&&(R=Bi,Bi=Te,Te=R);var dt=B_(q,Te),nt=B_(q,Bi);if(dt&&nt&&(kt.rangeCount!==1||kt.anchorNode!==dt.node||kt.anchorOffset!==dt.offset||kt.focusNode!==nt.node||kt.focusOffset!==nt.offset)){var gt=Mt.createRange();gt.setStart(dt.node,dt.offset),kt.removeAllRanges(),Te>Bi?(kt.addRange(gt),kt.extend(nt.node,nt.offset)):(gt.setEnd(nt.node,nt.offset),kt.addRange(gt))}}}}for(Mt=[],kt=q;kt=kt.parentNode;)kt.nodeType===1&&Mt.push({element:kt,left:kt.scrollLeft,top:kt.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<Mt.length;q++){var At=Mt[q];At.element.scrollLeft=At.left,At.element.scrollTop=At.top}}sp=!!Cb,_b=Cb=null}finally{pi=w,H.p=b,j.T=p}}s.current=l,br=2}}function Kw(){if(br===2){br=0;var s=no,l=bc,p=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||p){p=j.T,j.T=null;var b=H.p;H.p=2;var w=pi;pi|=4;try{_w(s,l.alternate,l)}finally{pi=w,H.p=b,j.T=p}}br=3}}function Vw(){if(br===4||br===3){br=0,Gt();var s=no,l=bc,p=ps,b=jw;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?br=5:(br=0,bc=no=null,Xw(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(ro=null),ln(p),l=l.stateNode,Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(Ge,l,void 0,(l.current.flags&128)===128)}catch{}if(b!==null){l=j.T,w=H.p,H.p=2,j.T=null;try{for(var S=s.onRecoverableError,R=0;R<b.length;R++){var q=b[R];S(q.value,{componentStack:q.stack})}}finally{j.T=l,H.p=w}}(ps&3)!==0&&Kf(),Ba(s),w=s.pendingLanes,(p&261930)!==0&&(w&42)!==0?s===lb?cu++:(cu=0,lb=s):cu=0,hu(0)}}function Xw(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Hh(l)))}function Kf(){return Yw(),Kw(),Vw(),Zw()}function Zw(){if(br!==5)return!1;var s=no,l=sb;sb=0;var p=ln(ps),b=j.T,w=H.p;try{H.p=32>p?32:p,j.T=null,p=ob,ob=null;var S=no,R=ps;if(br=0,bc=no=null,ps=0,(pi&6)!==0)throw Error(n(331));var q=pi;if(pi|=4,Lw(S.current),Aw(S,S.current,R,p),pi=q,hu(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(Ge,S)}catch{}return!0}finally{H.p=w,j.T=b,Xw(s,l)}}function Qw(s,l,p){l=Wn(p,l),l=zy(s.stateNode,l,2),s=Zs(s,l,2),s!==null&&(Se(s,2),Ba(s))}function Ti(s,l,p){if(s.tag===3)Qw(s,s,p);else for(;l!==null;){if(l.tag===3){Qw(l,s,p);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(ro===null||!ro.has(b))){s=Wn(p,s),p=Jk(2),b=Zs(l,p,2),b!==null&&(tw(p,b,l,s),Se(b,2),Ba(b));break}}l=l.return}}function ub(s,l,p){var b=s.pingCache;if(b===null){b=s.pingCache=new WF;var w=new Set;b.set(l,w)}else w=b.get(l),w===void 0&&(w=new Set,b.set(l,w));w.has(p)||(rb=!0,w.add(p),s=XF.bind(null,s,l,p),l.then(s,s))}function XF(s,l,p){var b=s.pingCache;b!==null&&b.delete(l),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,ji===s&&(ti&p)===p&&(tr===4||tr===3&&(ti&62914560)===ti&&300>jt()-qf?(pi&2)===0&&xc(s,0):nb|=p,yc===ti&&(yc=0)),Ba(s)}function Jw(s,l){l===0&&(l=_e()),s=Vo(s,l),s!==null&&(Se(s,l),Ba(s))}function ZF(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),Jw(s,p)}function QF(s,l){var p=0;switch(s.tag){case 31:case 13:var b=s.stateNode,w=s.memoizedState;w!==null&&(p=w.retryLane);break;case 19:b=s.stateNode;break;case 22:b=s.stateNode._retryCache;break;default:throw Error(n(314))}b!==null&&b.delete(l),Jw(s,p)}function JF(s,l){return st(s,l)}var Vf=null,Cc=null,db=!1,Xf=!1,fb=!1,so=0;function Ba(s){s!==Cc&&s.next===null&&(Cc===null?Vf=Cc=s:Cc=Cc.next=s),Xf=!0,db||(db=!0,e4())}function hu(s,l){if(!fb&&Xf){fb=!0;do for(var p=!1,b=Vf;b!==null;){if(s!==0){var w=b.pendingLanes;if(w===0)var S=0;else{var R=b.suspendedLanes,q=b.pingedLanes;S=(1<<31-ye(42|s)+1)-1,S&=w&~(R&~q),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(p=!0,rS(b,S))}else S=ti,S=J(b,b===ji?S:0,b.cancelPendingCommit!==null||b.timeoutHandle!==-1),(S&3)===0||Et(b,S)||(p=!0,rS(b,S));b=b.next}while(p);fb=!1}}function t4(){tS()}function tS(){Xf=db=!1;var s=0;so!==0&&u4()&&(s=so);for(var l=jt(),p=null,b=Vf;b!==null;){var w=b.next,S=eS(b,l);S===0?(b.next=null,p===null?Vf=w:p.next=w,w===null&&(Cc=p)):(p=b,(s!==0||(S&3)!==0)&&(Xf=!0)),b=w}br!==0&&br!==5||hu(s),so!==0&&(so=0)}function eS(s,l){for(var p=s.suspendedLanes,b=s.pingedLanes,w=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var R=31-ye(S),q=1<<R,Q=w[R];Q===-1?((q&p)===0||(q&b)!==0)&&(w[R]=qt(q,l)):Q<=l&&(s.expiredLanes|=q),S&=~q}if(l=ji,p=ti,p=J(s,s===l?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b=s.callbackNode,p===0||s===l&&(Si===2||Si===9)||s.cancelPendingCommit!==null)return b!==null&&b!==null&&Ot(b),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||Et(s,p)){if(l=p&-p,l===s.callbackPriority)return l;switch(b!==null&&Ot(b),ln(p)){case 2:case 8:p=je;break;case 32:p=ve;break;case 268435456:p=Be;break;default:p=ve}return b=iS.bind(null,s),p=st(p,b),s.callbackPriority=l,s.callbackNode=p,l}return b!==null&&b!==null&&Ot(b),s.callbackPriority=2,s.callbackNode=null,2}function iS(s,l){if(br!==0&&br!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(Kf()&&s.callbackNode!==p)return null;var b=ti;return b=J(s,s===ji?b:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b===0?null:(Fw(s,b,l),eS(s,jt()),s.callbackNode!=null&&s.callbackNode===p?iS.bind(null,s):null)}function rS(s,l){if(Kf())return null;Fw(s,l,!0)}function e4(){f4(function(){(pi&6)!==0?st(It,t4):tS()})}function pb(){if(so===0){var s=sc;s===0&&(s=Ce,Ce<<=1,(Ce&261888)===0&&(Ce=256)),so=s}return so}function nS(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Us(""+s)}function aS(s,l){var p=l.ownerDocument.createElement("input");return p.name=l.name,p.value=l.value,s.id&&p.setAttribute("form",s.id),l.parentNode.insertBefore(p,l),s=new FormData(s),p.parentNode.removeChild(p),s}function i4(s,l,p,b,w){if(l==="submit"&&p&&p.stateNode===w){var S=nS((w[Zi]||null).action),R=b.submitter;R&&(l=(l=R[Zi]||null)?nS(l.formAction):R.getAttribute("formAction"),l!==null&&(S=l,R=null));var q=new lf("action","action",null,b,w);s.push({event:q,listeners:[{instance:null,listener:function(){if(b.defaultPrevented){if(so!==0){var Q=R?aS(w,R):new FormData(w);Ry(p,{pending:!0,data:Q,method:w.method,action:S},null,Q)}}else typeof S=="function"&&(q.preventDefault(),Q=R?aS(w,R):new FormData(w),Ry(p,{pending:!0,data:Q,method:w.method,action:S},S,Q))},currentTarget:w}]})}}for(var gb=0;gb<Zm.length;gb++){var mb=Zm[gb],r4=mb.toLowerCase(),n4=mb[0].toUpperCase()+mb.slice(1);ca(r4,"on"+n4)}ca(D_,"onAnimationEnd"),ca(F_,"onAnimationIteration"),ca(I_,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(vF,"onTransitionRun"),ca(CF,"onTransitionStart"),ca(_F,"onTransitionCancel"),ca($_,"onTransitionEnd"),pt("onMouseEnter",["mouseout","mouseover"]),pt("onMouseLeave",["mouseout","mouseover"]),pt("onPointerEnter",["pointerout","pointerover"]),pt("onPointerLeave",["pointerout","pointerover"]),Tt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Tt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Tt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Tt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Tt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),a4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(uu));function sS(s,l){l=(l&4)!==0;for(var p=0;p<s.length;p++){var b=s[p],w=b.event;b=b.listeners;t:{var S=void 0;if(l)for(var R=b.length-1;0<=R;R--){var q=b[R],Q=q.instance,mt=q.currentTarget;if(q=q.listener,Q!==S&&w.isPropagationStopped())break t;S=q,w.currentTarget=mt;try{S(w)}catch(Nt){uf(Nt)}w.currentTarget=null,S=Q}else for(R=0;R<b.length;R++){if(q=b[R],Q=q.instance,mt=q.currentTarget,q=q.listener,Q!==S&&w.isPropagationStopped())break t;S=q,w.currentTarget=mt;try{S(w)}catch(Nt){uf(Nt)}w.currentTarget=null,S=Q}}}}function Xe(s,l){var p=l[In];p===void 0&&(p=l[In]=new Set);var b=s+"__bubble";p.has(b)||(oS(l,s,2,!1),p.add(b))}function yb(s,l,p){var b=0;l&&(b|=4),oS(p,s,b,l)}var Zf="_reactListening"+Math.random().toString(36).slice(2);function bb(s){if(!s[Zf]){s[Zf]=!0,ee.forEach(function(p){p!=="selectionchange"&&(a4.has(p)||yb(p,!1,s),yb(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Zf]||(l[Zf]=!0,yb("selectionchange",!1,l))}}function oS(s,l,p,b){switch(DS(l)){case 2:var w=O4;break;case 8:w=R4;break;default:w=Ob}p=w.bind(null,l,p,s),w=void 0,!Im||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),b?w!==void 0?s.addEventListener(l,p,{capture:!0,passive:w}):s.addEventListener(l,p,!0):w!==void 0?s.addEventListener(l,p,{passive:w}):s.addEventListener(l,p,!1)}function xb(s,l,p,b,w){var S=b;if((l&1)===0&&(l&2)===0&&b!==null)t:for(;;){if(b===null)return;var R=b.tag;if(R===3||R===4){var q=b.stateNode.containerInfo;if(q===w)break;if(R===4)for(R=b.return;R!==null;){var Q=R.tag;if((Q===3||Q===4)&&R.stateNode.containerInfo===w)return;R=R.return}for(;q!==null;){if(R=mr(q),R===null)return;if(Q=R.tag,Q===5||Q===6||Q===26||Q===27){b=S=R;continue t}q=q.parentNode}}b=b.return}nf(function(){var mt=S,Nt=Ie(p),Mt=[];t:{var bt=z_.get(s);if(bt!==void 0){var kt=lf,ne=s;switch(s){case"keypress":if(sf(p)===0)break t;case"keydown":case"keyup":kt=QD;break;case"focusin":ne="focus",kt=qm;break;case"focusout":ne="blur",kt=qm;break;case"beforeblur":case"afterblur":kt=qm;break;case"click":if(p.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":kt=g_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":kt=zD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":kt=eF;break;case D_:case F_:case I_:kt=UD;break;case $_:kt=rF;break;case"scroll":case"scrollend":kt=ID;break;case"wheel":kt=aF;break;case"copy":case"cut":case"paste":kt=WD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":kt=y_;break;case"toggle":case"beforetoggle":kt=oF}var Te=(l&4)!==0,Bi=!Te&&(s==="scroll"||s==="scrollend"),dt=Te?bt!==null?bt+"Capture":null:bt;Te=[];for(var nt=mt,gt;nt!==null;){var At=nt;if(gt=At.stateNode,At=At.tag,At!==5&&At!==26&&At!==27||gt===null||dt===null||(At=Oh(nt,dt),At!=null&&Te.push(du(nt,At,gt))),Bi)break;nt=nt.return}0<Te.length&&(bt=new kt(bt,ne,null,p,Nt),Mt.push({event:bt,listeners:Te}))}}if((l&7)===0){t:{if(bt=s==="mouseover"||s==="pointerover",kt=s==="mouseout"||s==="pointerout",bt&&p!==ce&&(ne=p.relatedTarget||p.fromElement)&&(mr(ne)||ne[kn]))break t;if((kt||bt)&&(bt=Nt.window===Nt?Nt:(bt=Nt.ownerDocument)?bt.defaultView||bt.parentWindow:window,kt?(ne=p.relatedTarget||p.toElement,kt=mt,ne=ne?mr(ne):null,ne!==null&&(Bi=o(ne),Te=ne.tag,ne!==Bi||Te!==5&&Te!==27&&Te!==6)&&(ne=null)):(kt=null,ne=mt),kt!==ne)){if(Te=g_,At="onMouseLeave",dt="onMouseEnter",nt="mouse",(s==="pointerout"||s==="pointerover")&&(Te=y_,At="onPointerLeave",dt="onPointerEnter",nt="pointer"),Bi=kt==null?bt:cn(kt),gt=ne==null?bt:cn(ne),bt=new Te(At,nt+"leave",kt,p,Nt),bt.target=Bi,bt.relatedTarget=gt,At=null,mr(Nt)===mt&&(Te=new Te(dt,nt+"enter",ne,p,Nt),Te.target=gt,Te.relatedTarget=Bi,At=Te),Bi=At,kt&&ne)e:{for(Te=s4,dt=kt,nt=ne,gt=0,At=dt;At;At=Te(At))gt++;At=0;for(var xe=nt;xe;xe=Te(xe))At++;for(;0<gt-At;)dt=Te(dt),gt--;for(;0<At-gt;)nt=Te(nt),At--;for(;gt--;){if(dt===nt||nt!==null&&dt===nt.alternate){Te=dt;break e}dt=Te(dt),nt=Te(nt)}Te=null}else Te=null;kt!==null&&lS(Mt,bt,kt,Te,!1),ne!==null&&Bi!==null&&lS(Mt,Bi,ne,Te,!0)}}t:{if(bt=mt?cn(mt):window,kt=bt.nodeName&&bt.nodeName.toLowerCase(),kt==="select"||kt==="input"&&bt.type==="file")var hi=S_;else if(k_(bt))if(T_)hi=yF;else{hi=gF;var he=pF}else kt=bt.nodeName,!kt||kt.toLowerCase()!=="input"||bt.type!=="checkbox"&&bt.type!=="radio"?mt&&Fr(mt.elementType)&&(hi=S_):hi=mF;if(hi&&(hi=hi(s,mt))){w_(Mt,hi,p,Nt);break t}he&&he(s,bt,mt),s==="focusout"&&mt&&bt.type==="number"&&mt.memoizedProps.value!=null&&Ft(bt,"number",bt.value)}switch(he=mt?cn(mt):window,s){case"focusin":(k_(he)||he.contentEditable==="true")&&(Ql=he,Km=mt,Ph=null);break;case"focusout":Ph=Km=Ql=null;break;case"mousedown":Vm=!0;break;case"contextmenu":case"mouseup":case"dragend":Vm=!1,R_(Mt,p,Nt);break;case"selectionchange":if(xF)break;case"keydown":case"keyup":R_(Mt,p,Nt)}var qe;if(Hm)t:{switch(s){case"compositionstart":var ei="onCompositionStart";break t;case"compositionend":ei="onCompositionEnd";break t;case"compositionupdate":ei="onCompositionUpdate";break t}ei=void 0}else Zl?C_(s,p)&&(ei="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(ei="onCompositionStart");ei&&(b_&&p.locale!=="ko"&&(Zl||ei!=="onCompositionStart"?ei==="onCompositionEnd"&&Zl&&(qe=f_()):(Hs=Nt,$m="value"in Hs?Hs.value:Hs.textContent,Zl=!0)),he=Qf(mt,ei),0<he.length&&(ei=new m_(ei,s,null,p,Nt),Mt.push({event:ei,listeners:he}),qe?ei.data=qe:(qe=__(p),qe!==null&&(ei.data=qe)))),(qe=cF?hF(s,p):uF(s,p))&&(ei=Qf(mt,"onBeforeInput"),0<ei.length&&(he=new m_("onBeforeInput","beforeinput",null,p,Nt),Mt.push({event:he,listeners:ei}),he.data=qe)),i4(Mt,s,mt,p,Nt)}sS(Mt,l)})}function du(s,l,p){return{instance:s,listener:l,currentTarget:p}}function Qf(s,l){for(var p=l+"Capture",b=[];s!==null;){var w=s,S=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||S===null||(w=Oh(s,p),w!=null&&b.unshift(du(s,w,S)),w=Oh(s,l),w!=null&&b.push(du(s,w,S))),s.tag===3)return b;s=s.return}return[]}function s4(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function lS(s,l,p,b,w){for(var S=l._reactName,R=[];p!==null&&p!==b;){var q=p,Q=q.alternate,mt=q.stateNode;if(q=q.tag,Q!==null&&Q===b)break;q!==5&&q!==26&&q!==27||mt===null||(Q=mt,w?(mt=Oh(p,S),mt!=null&&R.unshift(du(p,mt,Q))):w||(mt=Oh(p,S),mt!=null&&R.push(du(p,mt,Q)))),p=p.return}R.length!==0&&s.push({event:l,listeners:R})}var o4=/\r\n?/g,l4=/\u0000|\uFFFD/g;function cS(s){return(typeof s=="string"?s:""+s).replace(o4,`
|
|
50
|
-
`).replace(l4,"")}function hS(s,l){return l=cS(l),cS(s)===l}function Mi(s,l,p,b,w,S){switch(p){case"children":typeof b=="string"?l==="body"||l==="textarea"&&b===""||Vt(s,b):(typeof b=="number"||typeof b=="bigint")&&l!=="body"&&Vt(s,""+b);break;case"className":ii(s,"class",b);break;case"tabIndex":ii(s,"tabindex",b);break;case"dir":case"role":case"viewBox":case"width":case"height":ii(s,p,b);break;case"style":Qe(s,b,S);break;case"data":if(l!=="object"){ii(s,"data",b);break}case"src":case"href":if(b===""&&(l!=="a"||p!=="href")){s.removeAttribute(p);break}if(b==null||typeof b=="function"||typeof b=="symbol"||typeof b=="boolean"){s.removeAttribute(p);break}b=Us(""+b),s.setAttribute(p,b);break;case"action":case"formAction":if(typeof b=="function"){s.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(p==="formAction"?(l!=="input"&&Mi(s,l,"name",w.name,w,null),Mi(s,l,"formEncType",w.formEncType,w,null),Mi(s,l,"formMethod",w.formMethod,w,null),Mi(s,l,"formTarget",w.formTarget,w,null)):(Mi(s,l,"encType",w.encType,w,null),Mi(s,l,"method",w.method,w,null),Mi(s,l,"target",w.target,w,null)));if(b==null||typeof b=="symbol"||typeof b=="boolean"){s.removeAttribute(p);break}b=Us(""+b),s.setAttribute(p,b);break;case"onClick":b!=null&&(s.onclick=Wt);break;case"onScroll":b!=null&&Xe("scroll",s);break;case"onScrollEnd":b!=null&&Xe("scrollend",s);break;case"dangerouslySetInnerHTML":if(b!=null){if(typeof b!="object"||!("__html"in b))throw Error(n(61));if(p=b.__html,p!=null){if(w.children!=null)throw Error(n(60));s.innerHTML=p}}break;case"multiple":s.multiple=b&&typeof b!="function"&&typeof b!="symbol";break;case"muted":s.muted=b&&typeof b!="function"&&typeof b!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(b==null||typeof b=="function"||typeof b=="boolean"||typeof b=="symbol"){s.removeAttribute("xlink:href");break}p=Us(""+b),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":b!=null&&typeof b!="function"&&typeof b!="symbol"?s.setAttribute(p,""+b):s.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":b&&typeof b!="function"&&typeof b!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":b===!0?s.setAttribute(p,""):b!==!1&&b!=null&&typeof b!="function"&&typeof b!="symbol"?s.setAttribute(p,b):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":b!=null&&typeof b!="function"&&typeof b!="symbol"&&!isNaN(b)&&1<=b?s.setAttribute(p,b):s.removeAttribute(p);break;case"rowSpan":case"start":b==null||typeof b=="function"||typeof b=="symbol"||isNaN(b)?s.removeAttribute(p):s.setAttribute(p,b);break;case"popover":Xe("beforetoggle",s),Xe("toggle",s),bi(s,"popover",b);break;case"xlinkActuate":Yi(s,"http://www.w3.org/1999/xlink","xlink:actuate",b);break;case"xlinkArcrole":Yi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",b);break;case"xlinkRole":Yi(s,"http://www.w3.org/1999/xlink","xlink:role",b);break;case"xlinkShow":Yi(s,"http://www.w3.org/1999/xlink","xlink:show",b);break;case"xlinkTitle":Yi(s,"http://www.w3.org/1999/xlink","xlink:title",b);break;case"xlinkType":Yi(s,"http://www.w3.org/1999/xlink","xlink:type",b);break;case"xmlBase":Yi(s,"http://www.w3.org/XML/1998/namespace","xml:base",b);break;case"xmlLang":Yi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",b);break;case"xmlSpace":Yi(s,"http://www.w3.org/XML/1998/namespace","xml:space",b);break;case"is":bi(s,"is",b);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=qn.get(p)||p,bi(s,p,b))}}function vb(s,l,p,b,w,S){switch(p){case"style":Qe(s,b,S);break;case"dangerouslySetInnerHTML":if(b!=null){if(typeof b!="object"||!("__html"in b))throw Error(n(61));if(p=b.__html,p!=null){if(w.children!=null)throw Error(n(60));s.innerHTML=p}}break;case"children":typeof b=="string"?Vt(s,b):(typeof b=="number"||typeof b=="bigint")&&Vt(s,""+b);break;case"onScroll":b!=null&&Xe("scroll",s);break;case"onScrollEnd":b!=null&&Xe("scrollend",s);break;case"onClick":b!=null&&(s.onclick=Wt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X.hasOwnProperty(p))t:{if(p[0]==="o"&&p[1]==="n"&&(w=p.endsWith("Capture"),l=p.slice(2,w?p.length-7:void 0),S=s[Zi]||null,S=S!=null?S[p]:null,typeof S=="function"&&s.removeEventListener(l,S,w),typeof b=="function")){typeof S!="function"&&S!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(l,b,w);break t}p in s?s[p]=b:b===!0?s.setAttribute(p,""):bi(s,p,b)}}}function Lr(s,l,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",s),Xe("load",s);var b=!1,w=!1,S;for(S in p)if(p.hasOwnProperty(S)){var R=p[S];if(R!=null)switch(S){case"src":b=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:Mi(s,l,S,R,p,null)}}w&&Mi(s,l,"srcSet",p.srcSet,p,null),b&&Mi(s,l,"src",p.src,p,null);return;case"input":Xe("invalid",s);var q=S=R=w=null,Q=null,mt=null;for(b in p)if(p.hasOwnProperty(b)){var Nt=p[b];if(Nt!=null)switch(b){case"name":w=Nt;break;case"type":R=Nt;break;case"checked":Q=Nt;break;case"defaultChecked":mt=Nt;break;case"value":S=Nt;break;case"defaultValue":q=Nt;break;case"children":case"dangerouslySetInnerHTML":if(Nt!=null)throw Error(n(137,l));break;default:Mi(s,l,b,Nt,p,null)}}yt(s,S,q,Q,mt,R,w,!1);return;case"select":Xe("invalid",s),b=R=S=null;for(w in p)if(p.hasOwnProperty(w)&&(q=p[w],q!=null))switch(w){case"value":S=q;break;case"defaultValue":R=q;break;case"multiple":b=q;default:Mi(s,l,w,q,p,null)}l=S,p=R,s.multiple=!!b,l!=null?Rt(s,!!b,l,!1):p!=null&&Rt(s,!!b,p,!0);return;case"textarea":Xe("invalid",s),S=w=b=null;for(R in p)if(p.hasOwnProperty(R)&&(q=p[R],q!=null))switch(R){case"value":b=q;break;case"defaultValue":w=q;break;case"children":S=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(n(91));break;default:Mi(s,l,R,q,p,null)}Pe(s,b,w,S);return;case"option":for(Q in p)if(p.hasOwnProperty(Q)&&(b=p[Q],b!=null))switch(Q){case"selected":s.selected=b&&typeof b!="function"&&typeof b!="symbol";break;default:Mi(s,l,Q,b,p,null)}return;case"dialog":Xe("beforetoggle",s),Xe("toggle",s),Xe("cancel",s),Xe("close",s);break;case"iframe":case"object":Xe("load",s);break;case"video":case"audio":for(b=0;b<uu.length;b++)Xe(uu[b],s);break;case"image":Xe("error",s),Xe("load",s);break;case"details":Xe("toggle",s);break;case"embed":case"source":case"link":Xe("error",s),Xe("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(mt in p)if(p.hasOwnProperty(mt)&&(b=p[mt],b!=null))switch(mt){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:Mi(s,l,mt,b,p,null)}return;default:if(Fr(l)){for(Nt in p)p.hasOwnProperty(Nt)&&(b=p[Nt],b!==void 0&&vb(s,l,Nt,b,p,void 0));return}}for(q in p)p.hasOwnProperty(q)&&(b=p[q],b!=null&&Mi(s,l,q,b,p,null))}function c4(s,l,p,b){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,S=null,R=null,q=null,Q=null,mt=null,Nt=null;for(kt in p){var Mt=p[kt];if(p.hasOwnProperty(kt)&&Mt!=null)switch(kt){case"checked":break;case"value":break;case"defaultValue":Q=Mt;default:b.hasOwnProperty(kt)||Mi(s,l,kt,null,b,Mt)}}for(var bt in b){var kt=b[bt];if(Mt=p[bt],b.hasOwnProperty(bt)&&(kt!=null||Mt!=null))switch(bt){case"type":S=kt;break;case"name":w=kt;break;case"checked":mt=kt;break;case"defaultChecked":Nt=kt;break;case"value":R=kt;break;case"defaultValue":q=kt;break;case"children":case"dangerouslySetInnerHTML":if(kt!=null)throw Error(n(137,l));break;default:kt!==Mt&&Mi(s,l,bt,kt,b,Mt)}}Pn(s,R,q,Q,mt,Nt,S,w);return;case"select":kt=R=q=bt=null;for(S in p)if(Q=p[S],p.hasOwnProperty(S)&&Q!=null)switch(S){case"value":break;case"multiple":kt=Q;default:b.hasOwnProperty(S)||Mi(s,l,S,null,b,Q)}for(w in b)if(S=b[w],Q=p[w],b.hasOwnProperty(w)&&(S!=null||Q!=null))switch(w){case"value":bt=S;break;case"defaultValue":q=S;break;case"multiple":R=S;default:S!==Q&&Mi(s,l,w,S,b,Q)}l=q,p=R,b=kt,bt!=null?Rt(s,!!p,bt,!1):!!b!=!!p&&(l!=null?Rt(s,!!p,l,!0):Rt(s,!!p,p?[]:"",!1));return;case"textarea":kt=bt=null;for(q in p)if(w=p[q],p.hasOwnProperty(q)&&w!=null&&!b.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:Mi(s,l,q,null,b,w)}for(R in b)if(w=b[R],S=p[R],b.hasOwnProperty(R)&&(w!=null||S!=null))switch(R){case"value":bt=w;break;case"defaultValue":kt=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(n(91));break;default:w!==S&&Mi(s,l,R,w,b,S)}Zt(s,bt,kt);return;case"option":for(var ne in p)if(bt=p[ne],p.hasOwnProperty(ne)&&bt!=null&&!b.hasOwnProperty(ne))switch(ne){case"selected":s.selected=!1;break;default:Mi(s,l,ne,null,b,bt)}for(Q in b)if(bt=b[Q],kt=p[Q],b.hasOwnProperty(Q)&&bt!==kt&&(bt!=null||kt!=null))switch(Q){case"selected":s.selected=bt&&typeof bt!="function"&&typeof bt!="symbol";break;default:Mi(s,l,Q,bt,b,kt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Te in p)bt=p[Te],p.hasOwnProperty(Te)&&bt!=null&&!b.hasOwnProperty(Te)&&Mi(s,l,Te,null,b,bt);for(mt in b)if(bt=b[mt],kt=p[mt],b.hasOwnProperty(mt)&&bt!==kt&&(bt!=null||kt!=null))switch(mt){case"children":case"dangerouslySetInnerHTML":if(bt!=null)throw Error(n(137,l));break;default:Mi(s,l,mt,bt,b,kt)}return;default:if(Fr(l)){for(var Bi in p)bt=p[Bi],p.hasOwnProperty(Bi)&&bt!==void 0&&!b.hasOwnProperty(Bi)&&vb(s,l,Bi,void 0,b,bt);for(Nt in b)bt=b[Nt],kt=p[Nt],!b.hasOwnProperty(Nt)||bt===kt||bt===void 0&&kt===void 0||vb(s,l,Nt,bt,b,kt);return}}for(var dt in p)bt=p[dt],p.hasOwnProperty(dt)&&bt!=null&&!b.hasOwnProperty(dt)&&Mi(s,l,dt,null,b,bt);for(Mt in b)bt=b[Mt],kt=p[Mt],!b.hasOwnProperty(Mt)||bt===kt||bt==null&&kt==null||Mi(s,l,Mt,bt,b,kt)}function uS(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function h4(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,p=performance.getEntriesByType("resource"),b=0;b<p.length;b++){var w=p[b],S=w.transferSize,R=w.initiatorType,q=w.duration;if(S&&q&&uS(R)){for(R=0,q=w.responseEnd,b+=1;b<p.length;b++){var Q=p[b],mt=Q.startTime;if(mt>q)break;var Nt=Q.transferSize,Mt=Q.initiatorType;Nt&&uS(Mt)&&(Q=Q.responseEnd,R+=Nt*(Q<q?1:(q-mt)/(Q-mt)))}if(--b,l+=8*(S+R)/(w.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var Cb=null,_b=null;function Jf(s){return s.nodeType===9?s:s.ownerDocument}function dS(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fS(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function kb(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var wb=null;function u4(){var s=window.event;return s&&s.type==="popstate"?s===wb?!1:(wb=s,!0):(wb=null,!1)}var pS=typeof setTimeout=="function"?setTimeout:void 0,d4=typeof clearTimeout=="function"?clearTimeout:void 0,gS=typeof Promise=="function"?Promise:void 0,f4=typeof queueMicrotask=="function"?queueMicrotask:typeof gS<"u"?function(s){return gS.resolve(null).then(s).catch(p4)}:pS;function p4(s){setTimeout(function(){throw s})}function oo(s){return s==="head"}function mS(s,l){var p=l,b=0;do{var w=p.nextSibling;if(s.removeChild(p),w&&w.nodeType===8)if(p=w.data,p==="/$"||p==="/&"){if(b===0){s.removeChild(w),Sc(l);return}b--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")b++;else if(p==="html")fu(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,fu(p);for(var S=p.firstChild;S;){var R=S.nextSibling,q=S.nodeName;S[$n]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&S.rel.toLowerCase()==="stylesheet"||p.removeChild(S),S=R}}else p==="body"&&fu(s.ownerDocument.body);p=w}while(p);Sc(l)}function yS(s,l){var p=s;s=0;do{var b=p.nextSibling;if(p.nodeType===1?l?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(l?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),b&&b.nodeType===8)if(p=b.data,p==="/$"){if(s===0)break;s--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||s++;p=b}while(p)}function Sb(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var p=l;switch(l=l.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":Sb(p),Ea(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function g4(s,l,p,b){for(;s.nodeType===1;){var w=p;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!b&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(b){if(!s[$n])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(S=s.getAttribute("rel"),S==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(S!==w.rel||s.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||s.getAttribute("title")!==(w.title==null?null:w.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(S=s.getAttribute("src"),(S!==(w.src==null?null:w.src)||s.getAttribute("type")!==(w.type==null?null:w.type)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&S&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var S=w.name==null?null:""+w.name;if(w.type==="hidden"&&s.getAttribute("name")===S)return s}else return s;if(s=Xn(s.nextSibling),s===null)break}return null}function m4(s,l,p){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=Xn(s.nextSibling),s===null))return null;return s}function bS(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=Xn(s.nextSibling),s===null))return null;return s}function Tb(s){return s.data==="$?"||s.data==="$~"}function Eb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function y4(s,l){var p=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||p.readyState!=="loading")l();else{var b=function(){l(),p.removeEventListener("DOMContentLoaded",b)};p.addEventListener("DOMContentLoaded",b),s._reactRetry=b}}function Xn(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var Nb=null;function xS(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"||p==="/&"){if(l===0)return Xn(s.nextSibling);l--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||l++}s=s.nextSibling}return null}function vS(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(l===0)return s;l--}else p!=="/$"&&p!=="/&"||l++}s=s.previousSibling}return null}function CS(s,l,p){switch(l=Jf(p),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function fu(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Ea(s)}var Zn=new Map,_S=new Set;function tp(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var gs=H.d;H.d={f:b4,r:x4,D:v4,C:C4,L:_4,m:k4,X:S4,S:w4,M:T4};function b4(){var s=gs.f(),l=Wf();return s||l}function x4(s){var l=Kr(s);l!==null&&l.tag===5&&l.type==="form"?$k(l):gs.r(s)}var _c=typeof document>"u"?null:document;function kS(s,l,p){var b=_c;if(b&&typeof l=="string"&&l){var w=Nr(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof p=="string"&&(w+='[crossorigin="'+p+'"]'),_S.has(w)||(_S.add(w),s={rel:s,crossOrigin:p,href:l},b.querySelector(w)===null&&(l=b.createElement("link"),Lr(l,"link",s),yi(l),b.head.appendChild(l)))}}function v4(s){gs.D(s),kS("dns-prefetch",s,null)}function C4(s,l){gs.C(s,l),kS("preconnect",s,l)}function _4(s,l,p){gs.L(s,l,p);var b=_c;if(b&&s&&l){var w='link[rel="preload"][as="'+Nr(l)+'"]';l==="image"&&p&&p.imageSrcSet?(w+='[imagesrcset="'+Nr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(w+='[imagesizes="'+Nr(p.imageSizes)+'"]')):w+='[href="'+Nr(s)+'"]';var S=w;switch(l){case"style":S=kc(s);break;case"script":S=wc(s)}Zn.has(S)||(s=g({rel:"preload",href:l==="image"&&p&&p.imageSrcSet?void 0:s,as:l},p),Zn.set(S,s),b.querySelector(w)!==null||l==="style"&&b.querySelector(pu(S))||l==="script"&&b.querySelector(gu(S))||(l=b.createElement("link"),Lr(l,"link",s),yi(l),b.head.appendChild(l)))}}function k4(s,l){gs.m(s,l);var p=_c;if(p&&s){var b=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+Nr(b)+'"][href="'+Nr(s)+'"]',S=w;switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=wc(s)}if(!Zn.has(S)&&(s=g({rel:"modulepreload",href:s},l),Zn.set(S,s),p.querySelector(w)===null)){switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(gu(S)))return}b=p.createElement("link"),Lr(b,"link",s),yi(b),p.head.appendChild(b)}}}function w4(s,l,p){gs.S(s,l,p);var b=_c;if(b&&s){var w=yr(b).hoistableStyles,S=kc(s);l=l||"default";var R=w.get(S);if(!R){var q={loading:0,preload:null};if(R=b.querySelector(pu(S)))q.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},p),(p=Zn.get(S))&&Ab(s,p);var Q=R=b.createElement("link");yi(Q),Lr(Q,"link",s),Q._p=new Promise(function(mt,Nt){Q.onload=mt,Q.onerror=Nt}),Q.addEventListener("load",function(){q.loading|=1}),Q.addEventListener("error",function(){q.loading|=2}),q.loading|=4,ep(R,l,b)}R={type:"stylesheet",instance:R,count:1,state:q},w.set(S,R)}}}function S4(s,l){gs.X(s,l);var p=_c;if(p&&s){var b=yr(p).hoistableScripts,w=wc(s),S=b.get(w);S||(S=p.querySelector(gu(w)),S||(s=g({src:s,async:!0},l),(l=Zn.get(w))&&Mb(s,l),S=p.createElement("script"),yi(S),Lr(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function T4(s,l){gs.M(s,l);var p=_c;if(p&&s){var b=yr(p).hoistableScripts,w=wc(s),S=b.get(w);S||(S=p.querySelector(gu(w)),S||(s=g({src:s,async:!0,type:"module"},l),(l=Zn.get(w))&&Mb(s,l),S=p.createElement("script"),yi(S),Lr(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function wS(s,l,p,b){var w=(w=ot.current)?tp(w):null;if(!w)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(l=kc(p.href),p=yr(w).hoistableStyles,b=p.get(l),b||(b={type:"style",instance:null,count:0,state:null},p.set(l,b)),b):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=kc(p.href);var S=yr(w).hoistableStyles,R=S.get(s);if(R||(w=w.ownerDocument||w,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(s,R),(S=w.querySelector(pu(s)))&&!S._p&&(R.instance=S,R.state.loading=5),Zn.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Zn.set(s,p),S||E4(w,s,p,R.state))),l&&b===null)throw Error(n(528,""));return R}if(l&&b!==null)throw Error(n(529,""));return null;case"script":return l=p.async,p=p.src,typeof p=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=wc(p),p=yr(w).hoistableScripts,b=p.get(l),b||(b={type:"script",instance:null,count:0,state:null},p.set(l,b)),b):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function kc(s){return'href="'+Nr(s)+'"'}function pu(s){return'link[rel="stylesheet"]['+s+"]"}function SS(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function E4(s,l,p,b){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?b.loading=1:(l=s.createElement("link"),b.preload=l,l.addEventListener("load",function(){return b.loading|=1}),l.addEventListener("error",function(){return b.loading|=2}),Lr(l,"link",p),yi(l),s.head.appendChild(l))}function wc(s){return'[src="'+Nr(s)+'"]'}function gu(s){return"script[async]"+s}function TS(s,l,p){if(l.count++,l.instance===null)switch(l.type){case"style":var b=s.querySelector('style[data-href~="'+Nr(p.href)+'"]');if(b)return l.instance=b,yi(b),b;var w=g({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return b=(s.ownerDocument||s).createElement("style"),yi(b),Lr(b,"style",w),ep(b,p.precedence,s),l.instance=b;case"stylesheet":w=kc(p.href);var S=s.querySelector(pu(w));if(S)return l.state.loading|=4,l.instance=S,yi(S),S;b=SS(p),(w=Zn.get(w))&&Ab(b,w),S=(s.ownerDocument||s).createElement("link"),yi(S);var R=S;return R._p=new Promise(function(q,Q){R.onload=q,R.onerror=Q}),Lr(S,"link",b),l.state.loading|=4,ep(S,p.precedence,s),l.instance=S;case"script":return S=wc(p.src),(w=s.querySelector(gu(S)))?(l.instance=w,yi(w),w):(b=p,(w=Zn.get(S))&&(b=g({},p),Mb(b,w)),s=s.ownerDocument||s,w=s.createElement("script"),yi(w),Lr(w,"link",b),s.head.appendChild(w),l.instance=w);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(b=l.instance,l.state.loading|=4,ep(b,p.precedence,s));return l.instance}function ep(s,l,p){for(var b=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=b.length?b[b.length-1]:null,S=w,R=0;R<b.length;R++){var q=b[R];if(q.dataset.precedence===l)S=q;else if(S!==w)break}S?S.parentNode.insertBefore(s,S.nextSibling):(l=p.nodeType===9?p.head:p,l.insertBefore(s,l.firstChild))}function Ab(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function Mb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var ip=null;function ES(s,l,p){if(ip===null){var b=new Map,w=ip=new Map;w.set(p,b)}else w=ip,b=w.get(p),b||(b=new Map,w.set(p,b));if(b.has(s))return b;for(b.set(s,null),p=p.getElementsByTagName(s),w=0;w<p.length;w++){var S=p[w];if(!(S[$n]||S[Ri]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var R=S.getAttribute(l)||"";R=s+R;var q=b.get(R);q?q.push(S):b.set(R,[S])}}return b}function NS(s,l,p){s=s.ownerDocument||s,s.head.insertBefore(p,l==="title"?s.querySelector("head > title"):null)}function N4(s,l,p){if(p===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function AS(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function A4(s,l,p,b){if(p.type==="stylesheet"&&(typeof b.media!="string"||matchMedia(b.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var w=kc(b.href),S=l.querySelector(pu(w));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=rp.bind(s),l.then(s,s)),p.state.loading|=4,p.instance=S,yi(S);return}S=l.ownerDocument||l,b=SS(b),(w=Zn.get(w))&&Ab(b,w),S=S.createElement("link"),yi(S);var R=S;R._p=new Promise(function(q,Q){R.onload=q,R.onerror=Q}),Lr(S,"link",b),p.instance=S}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(p,l),(l=p.state.preload)&&(p.state.loading&3)===0&&(s.count++,p=rp.bind(s),l.addEventListener("load",p),l.addEventListener("error",p))}}var Bb=0;function M4(s,l){return s.stylesheets&&s.count===0&&ap(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var b=setTimeout(function(){if(s.stylesheets&&ap(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&Bb===0&&(Bb=62500*h4());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&ap(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>Bb?50:800)+l);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(b),clearTimeout(w)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var np=null;function ap(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,np=new Map,l.forEach(B4,s),np=null,rp.call(s))}function B4(s,l){if(!(l.state.loading&4)){var p=np.get(s);if(p)var b=p.get(null);else{p=new Map,np.set(s,p);for(var w=s.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<w.length;S++){var R=w[S];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(p.set(R.dataset.precedence,R),b=R)}b&&p.set(null,b)}w=l.instance,R=w.getAttribute("data-precedence"),S=p.get(R)||b,S===b&&p.set(null,w),p.set(R,w),this.count++,b=rp.bind(this),w.addEventListener("load",b),w.addEventListener("error",b),S?S.parentNode.insertBefore(w,S.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(w,s.firstChild)),l.state.loading|=4}}var mu={$$typeof:N,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function L4(s,l,p,b,w,S,R,q,Q){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=gi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gi(0),this.hiddenUpdates=gi(null),this.identifierPrefix=b,this.onUncaughtError=w,this.onCaughtError=S,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function MS(s,l,p,b,w,S,R,q,Q,mt,Nt,Mt){return s=new L4(s,l,p,R,Q,mt,Nt,Mt,q),l=1,S===!0&&(l|=24),S=En(3,null,null,l),s.current=S,S.stateNode=s,l=hy(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:b,isDehydrated:p,cache:l},py(S),s}function BS(s){return s?(s=ec,s):ec}function LS(s,l,p,b,w,S){w=BS(w),b.context===null?b.context=w:b.pendingContext=w,b=Xs(l),b.payload={element:p},S=S===void 0?null:S,S!==null&&(b.callback=S),p=Zs(s,b,l),p!==null&&(gn(p,s,l),Kh(p,s,l))}function OS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function Lb(s,l){OS(s,l),(s=s.alternate)&&OS(s,l)}function RS(s){if(s.tag===13||s.tag===31){var l=Vo(s,67108864);l!==null&&gn(l,s,67108864),Lb(s,67108864)}}function jS(s){if(s.tag===13||s.tag===31){var l=Ln();l=wi(l);var p=Vo(s,l);p!==null&&gn(p,s,l),Lb(s,l)}}var sp=!0;function O4(s,l,p,b){var w=j.T;j.T=null;var S=H.p;try{H.p=2,Ob(s,l,p,b)}finally{H.p=S,j.T=w}}function R4(s,l,p,b){var w=j.T;j.T=null;var S=H.p;try{H.p=8,Ob(s,l,p,b)}finally{H.p=S,j.T=w}}function Ob(s,l,p,b){if(sp){var w=Rb(b);if(w===null)xb(s,l,b,op,p),FS(s,b);else if(D4(w,s,l,p,b))b.stopPropagation();else if(FS(s,b),l&4&&-1<j4.indexOf(s)){for(;w!==null;){var S=Kr(w);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var R=Ni(S.pendingLanes);if(R!==0){var q=S;for(q.pendingLanes|=2,q.entangledLanes|=2;R;){var Q=1<<31-ye(R);q.entanglements[1]|=Q,R&=~Q}Ba(S),(pi&6)===0&&(Uf=jt()+500,hu(0))}}break;case 31:case 13:q=Vo(S,2),q!==null&&gn(q,S,2),Wf(),Lb(S,2)}if(S=Rb(b),S===null&&xb(s,l,b,op,p),S===w)break;w=S}w!==null&&b.stopPropagation()}else xb(s,l,b,null,p)}}function Rb(s){return s=Ie(s),jb(s)}var op=null;function jb(s){if(op=null,s=mr(s),s!==null){var l=o(s);if(l===null)s=null;else{var p=l.tag;if(p===13){if(s=c(l),s!==null)return s;s=null}else if(p===31){if(s=h(l),s!==null)return s;s=null}else if(p===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return op=s,null}function DS(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ae()){case It:return 2;case je:return 8;case ve:case He:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Db=!1,lo=null,co=null,ho=null,yu=new Map,bu=new Map,uo=[],j4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function FS(s,l){switch(s){case"focusin":case"focusout":lo=null;break;case"dragenter":case"dragleave":co=null;break;case"mouseover":case"mouseout":ho=null;break;case"pointerover":case"pointerout":yu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":bu.delete(l.pointerId)}}function xu(s,l,p,b,w,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:p,eventSystemFlags:b,nativeEvent:S,targetContainers:[w]},l!==null&&(l=Kr(l),l!==null&&RS(l)),s):(s.eventSystemFlags|=b,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function D4(s,l,p,b,w){switch(l){case"focusin":return lo=xu(lo,s,l,p,b,w),!0;case"dragenter":return co=xu(co,s,l,p,b,w),!0;case"mouseover":return ho=xu(ho,s,l,p,b,w),!0;case"pointerover":var S=w.pointerId;return yu.set(S,xu(yu.get(S)||null,s,l,p,b,w)),!0;case"gotpointercapture":return S=w.pointerId,bu.set(S,xu(bu.get(S)||null,s,l,p,b,w)),!0}return!1}function IS(s){var l=mr(s.target);if(l!==null){var p=o(l);if(p!==null){if(l=p.tag,l===13){if(l=c(p),l!==null){s.blockedOn=l,lr(s.priority,function(){jS(p)});return}}else if(l===31){if(l=h(p),l!==null){s.blockedOn=l,lr(s.priority,function(){jS(p)});return}}else if(l===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function lp(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=Rb(s.nativeEvent);if(p===null){p=s.nativeEvent;var b=new p.constructor(p.type,p);ce=b,p.target.dispatchEvent(b),ce=null}else return l=Kr(p),l!==null&&RS(l),s.blockedOn=p,!1;l.shift()}return!0}function $S(s,l,p){lp(s)&&p.delete(l)}function F4(){Db=!1,lo!==null&&lp(lo)&&(lo=null),co!==null&&lp(co)&&(co=null),ho!==null&&lp(ho)&&(ho=null),yu.forEach($S),bu.forEach($S)}function cp(s,l){s.blockedOn===l&&(s.blockedOn=null,Db||(Db=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,F4)))}var hp=null;function zS(s){hp!==s&&(hp=s,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){hp===s&&(hp=null);for(var l=0;l<s.length;l+=3){var p=s[l],b=s[l+1],w=s[l+2];if(typeof b!="function"){if(jb(b||p)===null)continue;break}var S=Kr(p);S!==null&&(s.splice(l,3),l-=3,Ry(S,{pending:!0,data:w,method:p.method,action:b},b,w))}}))}function Sc(s){function l(Q){return cp(Q,s)}lo!==null&&cp(lo,s),co!==null&&cp(co,s),ho!==null&&cp(ho,s),yu.forEach(l),bu.forEach(l);for(var p=0;p<uo.length;p++){var b=uo[p];b.blockedOn===s&&(b.blockedOn=null)}for(;0<uo.length&&(p=uo[0],p.blockedOn===null);)IS(p),p.blockedOn===null&&uo.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(b=0;b<p.length;b+=3){var w=p[b],S=p[b+1],R=w[Zi]||null;if(typeof S=="function")R||zS(p);else if(R){var q=null;if(S&&S.hasAttribute("formAction")){if(w=S,R=S[Zi]||null)q=R.formAction;else if(jb(w)!==null)continue}else q=R.action;typeof q=="function"?p[b+1]=q:(p.splice(b,3),b-=3),zS(p)}}}function PS(){function s(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(R){return w=R})},focusReset:"manual",scroll:"manual"})}function l(){w!==null&&(w(),w=null),b||setTimeout(p,20)}function p(){if(!b&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var b=!1,w=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(p,100),function(){b=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),w!==null&&(w(),w=null)}}}function Fb(s){this._internalRoot=s}up.prototype.render=Fb.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var p=l.current,b=Ln();LS(p,b,s,l,null,null)},up.prototype.unmount=Fb.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;LS(s.current,2,null,s,null,null),Wf(),l[kn]=null}};function up(s){this._internalRoot=s}up.prototype.unstable_scheduleHydration=function(s){if(s){var l=Yr();s={blockedOn:null,target:s,priority:l};for(var p=0;p<uo.length&&l!==0&&l<uo[p].priority;p++);uo.splice(p,0,s),p===0&&IS(s)}};var qS=e.version;if(qS!=="19.2.4")throw Error(n(527,qS,"19.2.4"));H.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=d(l),s=s!==null?f(s):null,s=s===null?null:s.stateNode,s};var I4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dp.isDisabled&&dp.supportsFiber)try{Ge=dp.inject(I4),Ze=dp}catch{}}return Cu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var p=!1,b="",w=Vk,S=Xk,R=Zk;return l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onUncaughtError!==void 0&&(w=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(R=l.onRecoverableError)),l=MS(s,1,!1,null,null,p,b,null,w,S,R,PS),s[kn]=l.current,bb(s),new Fb(l)},Cu.hydrateRoot=function(s,l,p){if(!a(s))throw Error(n(299));var b=!1,w="",S=Vk,R=Xk,q=Zk,Q=null;return p!=null&&(p.unstable_strictMode===!0&&(b=!0),p.identifierPrefix!==void 0&&(w=p.identifierPrefix),p.onUncaughtError!==void 0&&(S=p.onUncaughtError),p.onCaughtError!==void 0&&(R=p.onCaughtError),p.onRecoverableError!==void 0&&(q=p.onRecoverableError),p.formState!==void 0&&(Q=p.formState)),l=MS(s,1,!0,l,p??null,b,w,Q,S,R,q,PS),l.context=BS(null),p=l.current,b=Ln(),b=wi(b),w=Xs(b),w.callback=null,Zs(p,w,b),p=b,l.current.lanes=p,Se(l,p),Ba(l),s[kn]=l.current,bb(s),new up(l)},Cu.version="19.2.4",Cu}var JS;function Z4(){if(JS)return Pb.exports;JS=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Pb.exports=X4(),Pb.exports}var Q4=Z4(),Th=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},J4={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},Co,N1,QA,tI=(QA=class{constructor(){me(this,Co,J4);me(this,N1,!1)}setTimeoutProvider(i){Qt(this,Co,i)}setTimeout(i,e){return et(this,Co).setTimeout(i,e)}clearTimeout(i){et(this,Co).clearTimeout(i)}setInterval(i,e){return et(this,Co).setInterval(i,e)}clearInterval(i){et(this,Co).clearInterval(i)}},Co=new WeakMap,N1=new WeakMap,QA),ml=new tI;function eI(i){setTimeout(i,0)}var Ol=typeof window>"u"||"Deno"in globalThis;function Qr(){}function iI(i,e){return typeof i=="function"?i(e):i}function Ox(i){return typeof i=="number"&&i>=0&&i!==1/0}function hM(i,e){return Math.max(i+(e||0)-Date.now(),0)}function Lo(i,e){return typeof i=="function"?i(e):i}function ra(i,e){return typeof i=="function"?i(e):i}function t2(i,e){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=i;if(c){if(n){if(e.queryHash!==M1(c,e.options))return!1}else if(!yd(e.queryKey,c))return!1}if(r!=="all"){const u=e.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||a&&a!==e.state.fetchStatus||o&&!o(e))}function e2(i,e){const{exact:r,status:n,predicate:a,mutationKey:o}=i;if(o){if(!e.options.mutationKey)return!1;if(r){if(Rl(e.options.mutationKey)!==Rl(o))return!1}else if(!yd(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function M1(i,e){return((e==null?void 0:e.queryKeyHashFn)||Rl)(i)}function Rl(i){return JSON.stringify(i,(e,r)=>Rx(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function yd(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(r=>yd(i[r],e[r])):!1}var rI=Object.prototype.hasOwnProperty;function uM(i,e,r=0){if(i===e)return i;if(r>500)return e;const n=i2(i)&&i2(e);if(!n&&!(Rx(i)&&Rx(e)))return e;const o=(n?i:Object.keys(i)).length,c=n?e:Object.keys(e),h=c.length,u=n?new Array(h):{};let d=0;for(let f=0;f<h;f++){const g=n?f:c[f],x=i[g],y=e[g];if(x===y){u[g]=x,(n?f<o:rI.call(i,g))&&d++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[g]=y;continue}const v=uM(x,y,r+1);u[g]=v,v===x&&d++}return o===h&&d===o?i:u}function og(i,e){if(!e||Object.keys(i).length!==Object.keys(e).length)return!1;for(const r in i)if(i[r]!==e[r])return!1;return!0}function i2(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function Rx(i){if(!r2(i))return!1;const e=i.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!r2(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function r2(i){return Object.prototype.toString.call(i)==="[object Object]"}function nI(i){return new Promise(e=>{ml.setTimeout(e,i)})}function jx(i,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(i,e):r.structuralSharing!==!1?uM(i,e):e}function aI(i,e,r=0){const n=[...i,e];return r&&n.length>r?n.slice(1):n}function sI(i,e,r=0){const n=[e,...i];return r&&n.length>r?n.slice(0,-1):n}var B1=Symbol();function dM(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===B1?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function L1(i,e){return typeof i=="function"?i(...e):!!i}function oI(i,e,r){let n=!1,a;return Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),i}var Cl,_o,Gc,JA,lI=(JA=class extends Th{constructor(){super();me(this,Cl);me(this,_o);me(this,Gc);Qt(this,Gc,e=>{if(!Ol&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){et(this,_o)||this.setEventListener(et(this,Gc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,_o))==null||e.call(this),Qt(this,_o,void 0))}setEventListener(e){var r;Qt(this,Gc,e),(r=et(this,_o))==null||r.call(this),Qt(this,_o,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){et(this,Cl)!==e&&(Qt(this,Cl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof et(this,Cl)=="boolean"?et(this,Cl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Cl=new WeakMap,_o=new WeakMap,Gc=new WeakMap,JA),O1=new lI;function Dx(){let i,e;const r=new Promise((a,o)=>{i=a,e=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),i(a)},r.reject=a=>{n({status:"rejected",reason:a}),e(a)},r}var cI=eI;function hI(){let i=[],e=0,r=h=>{h()},n=h=>{h()},a=cI;const o=h=>{e?i.push(h):a(()=>{r(h)})},c=()=>{const h=i;i=[],h.length&&a(()=>{n(()=>{h.forEach(u=>{r(u)})})})};return{batch:h=>{let u;e++;try{u=h()}finally{e--,e||c()}return u},batchCalls:h=>(...u)=>{o(()=>{h(...u)})},schedule:o,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{n=h},setScheduler:h=>{a=h}}}var vr=hI(),Yc,ko,Kc,tM,uI=(tM=class extends Th{constructor(){super();me(this,Yc,!0);me(this,ko);me(this,Kc);Qt(this,Kc,e=>{if(!Ol&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){et(this,ko)||this.setEventListener(et(this,Kc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,ko))==null||e.call(this),Qt(this,ko,void 0))}setEventListener(e){var r;Qt(this,Kc,e),(r=et(this,ko))==null||r.call(this),Qt(this,ko,e(this.setOnline.bind(this)))}setOnline(e){et(this,Yc)!==e&&(Qt(this,Yc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return et(this,Yc)}},Yc=new WeakMap,ko=new WeakMap,Kc=new WeakMap,tM),lg=new uI;function dI(i){return Math.min(1e3*2**i,3e4)}function fM(i){return(i??"online")==="online"?lg.isOnline():!0}var Fx=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function pM(i){let e=!1,r=0,n;const a=Dx(),o=()=>a.status!=="pending",c=C=>{var _;if(!o()){const k=new Fx(C);x(k),(_=i.onCancel)==null||_.call(i,k)}},h=()=>{e=!0},u=()=>{e=!1},d=()=>O1.isFocused()&&(i.networkMode==="always"||lg.isOnline())&&i.canRun(),f=()=>fM(i.networkMode)&&i.canRun(),g=C=>{o()||(n==null||n(),a.resolve(C))},x=C=>{o()||(n==null||n(),a.reject(C))},y=()=>new Promise(C=>{var _;n=k=>{(o()||d())&&C(k)},(_=i.onPause)==null||_.call(i)}).then(()=>{var C;n=void 0,o()||(C=i.onContinue)==null||C.call(i)}),v=()=>{if(o())return;let C;const _=r===0?i.initialPromise:void 0;try{C=_??i.fn()}catch(k){C=Promise.reject(k)}Promise.resolve(C).then(g).catch(k=>{var O;if(o())return;const T=i.retry??(Ol?0:3),N=i.retryDelay??dI,E=typeof N=="function"?N(r,k):N,B=T===!0||typeof T=="number"&&r<T||typeof T=="function"&&T(r,k);if(e||!B){x(k);return}r++,(O=i.onFail)==null||O.call(i,r,k),nI(E).then(()=>d()?void 0:y()).then(()=>{e?x(k):v()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:h,continueRetry:u,canStart:f,start:()=>(f()?v():y().then(v),a)}}var _l,eM,gM=(eM=class{constructor(){me(this,_l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ox(this.gcTime)&&Qt(this,_l,ml.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(Ol?1/0:300*1e3))}clearGcTimeout(){et(this,_l)&&(ml.clearTimeout(et(this,_l)),Qt(this,_l,void 0))}},_l=new WeakMap,eM),kl,Vc,ia,wl,Sr,Rd,Sl,fa,Cs,iM,fI=(iM=class extends gM{constructor(e){super();me(this,fa);me(this,kl);me(this,Vc);me(this,ia);me(this,wl);me(this,Sr);me(this,Rd);me(this,Sl);Qt(this,Sl,!1),Qt(this,Rd,e.defaultOptions),this.setOptions(e.options),this.observers=[],Qt(this,wl,e.client),Qt(this,ia,et(this,wl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Qt(this,kl,a2(this.options)),this.state=e.state??et(this,kl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=et(this,Sr))==null?void 0:e.promise}setOptions(e){if(this.options={...et(this,Rd),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=a2(this.options);r.data!==void 0&&(this.setState(n2(r.data,r.dataUpdatedAt)),Qt(this,kl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&et(this,ia).remove(this)}setData(e,r){const n=jx(this.state.data,e,this.options);return We(this,fa,Cs).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){We(this,fa,Cs).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,a;const r=(n=et(this,Sr))==null?void 0:n.promise;return(a=et(this,Sr))==null||a.cancel(e),r?r.then(Qr).catch(Qr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(et(this,kl))}isActive(){return this.observers.some(e=>ra(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===B1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Lo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!hM(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=et(this,Sr))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=et(this,Sr))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),et(this,ia).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(et(this,Sr)&&(et(this,Sl)?et(this,Sr).cancel({revert:!0}):et(this,Sr).cancelRetry()),this.scheduleGc()),et(this,ia).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,fa,Cs).call(this,{type:"invalidate"})}async fetch(e,r){var u,d,f,g,x,y,v,C,_,k,T,N;if(this.state.fetchStatus!=="idle"&&((u=et(this,Sr))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(et(this,Sr))return et(this,Sr).continueRetry(),et(this,Sr).promise}if(e&&this.setOptions(e),!this.options.queryFn){const E=this.observers.find(B=>B.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,a=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Qt(this,Sl,!0),n.signal)})},o=()=>{const E=dM(this.options,r),O=(()=>{const A={client:et(this,wl),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return Qt(this,Sl,!1),this.options.persister?this.options.persister(E,O,this):E(O)},h=(()=>{const E={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:et(this,wl),state:this.state,fetchFn:o};return a(E),E})();(d=this.options.behavior)==null||d.onFetch(h,this),Qt(this,Vc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=h.fetchOptions)==null?void 0:f.meta))&&We(this,fa,Cs).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Qt(this,Sr,pM({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,onCancel:E=>{E instanceof Fx&&E.revert&&this.setState({...et(this,Vc),fetchStatus:"idle"}),n.abort()},onFail:(E,B)=>{We(this,fa,Cs).call(this,{type:"failed",failureCount:E,error:B})},onPause:()=>{We(this,fa,Cs).call(this,{type:"pause"})},onContinue:()=>{We(this,fa,Cs).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const E=await et(this,Sr).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(y=(x=et(this,ia).config).onSuccess)==null||y.call(x,E,this),(C=(v=et(this,ia).config).onSettled)==null||C.call(v,E,this.state.error,this),E}catch(E){if(E instanceof Fx){if(E.silent)return et(this,Sr).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw We(this,fa,Cs).call(this,{type:"error",error:E}),(k=(_=et(this,ia).config).onError)==null||k.call(_,E,this),(N=(T=et(this,ia).config).onSettled)==null||N.call(T,this.state.data,E,this),E}finally{this.scheduleGc()}}},kl=new WeakMap,Vc=new WeakMap,ia=new WeakMap,wl=new WeakMap,Sr=new WeakMap,Rd=new WeakMap,Sl=new WeakMap,fa=new WeakSet,Cs=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...mM(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...n2(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Qt(this,Vc,e.manual?a:void 0),a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),vr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),et(this,ia).notify({query:this,type:"updated",action:e})})},iM);function mM(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fM(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function n2(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function a2(i){const e=typeof i.initialData=="function"?i.initialData():i.initialData,r=e!==void 0,n=r?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var yn,ni,jd,Zr,Tl,Xc,ws,wo,Dd,Zc,Qc,El,Nl,So,Jc,Ci,Yu,Ix,$x,zx,Px,qx,Ux,Hx,yM,rM,pI=(rM=class extends Th{constructor(e,r){super();me(this,Ci);me(this,yn);me(this,ni);me(this,jd);me(this,Zr);me(this,Tl);me(this,Xc);me(this,ws);me(this,wo);me(this,Dd);me(this,Zc);me(this,Qc);me(this,El);me(this,Nl);me(this,So);me(this,Jc,new Set);this.options=r,Qt(this,yn,e),Qt(this,wo,null),Qt(this,ws,Dx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(et(this,ni).addObserver(this),s2(et(this,ni),this.options)?We(this,Ci,Yu).call(this):this.updateResult(),We(this,Ci,Px).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wx(et(this,ni),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wx(et(this,ni),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,We(this,Ci,qx).call(this),We(this,Ci,Ux).call(this),et(this,ni).removeObserver(this)}setOptions(e){const r=this.options,n=et(this,ni);if(this.options=et(this,yn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ra(this.options.enabled,et(this,ni))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");We(this,Ci,Hx).call(this),et(this,ni).setOptions(this.options),r._defaulted&&!og(this.options,r)&&et(this,yn).getQueryCache().notify({type:"observerOptionsUpdated",query:et(this,ni),observer:this});const a=this.hasListeners();a&&o2(et(this,ni),n,this.options,r)&&We(this,Ci,Yu).call(this),this.updateResult(),a&&(et(this,ni)!==n||ra(this.options.enabled,et(this,ni))!==ra(r.enabled,et(this,ni))||Lo(this.options.staleTime,et(this,ni))!==Lo(r.staleTime,et(this,ni)))&&We(this,Ci,Ix).call(this);const o=We(this,Ci,$x).call(this);a&&(et(this,ni)!==n||ra(this.options.enabled,et(this,ni))!==ra(r.enabled,et(this,ni))||o!==et(this,So))&&We(this,Ci,zx).call(this,o)}getOptimisticResult(e){const r=et(this,yn).getQueryCache().build(et(this,yn),e),n=this.createResult(r,e);return mI(this,n)&&(Qt(this,Zr,n),Qt(this,Xc,this.options),Qt(this,Tl,et(this,ni).state)),n}getCurrentResult(){return et(this,Zr)}trackResult(e,r){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&et(this,ws).status==="pending"&&et(this,ws).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){et(this,Jc).add(e)}getCurrentQuery(){return et(this,ni)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=et(this,yn).defaultQueryOptions(e),n=et(this,yn).getQueryCache().build(et(this,yn),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return We(this,Ci,Yu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),et(this,Zr)))}createResult(e,r){var I;const n=et(this,ni),a=this.options,o=et(this,Zr),c=et(this,Tl),h=et(this,Xc),d=e!==n?e.state:et(this,jd),{state:f}=e;let g={...f},x=!1,y;if(r._optimisticResults){const D=this.hasListeners(),F=!D&&s2(e,r),U=D&&o2(e,n,r,a);(F||U)&&(g={...g,...mM(f.data,e.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:C,status:_}=g;y=g.data;let k=!1;if(r.placeholderData!==void 0&&y===void 0&&_==="pending"){let D;o!=null&&o.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?(D=o.data,k=!0):D=typeof r.placeholderData=="function"?r.placeholderData((I=et(this,Qc))==null?void 0:I.state.data,et(this,Qc)):r.placeholderData,D!==void 0&&(_="success",y=jx(o==null?void 0:o.data,D,r),x=!0)}if(r.select&&y!==void 0&&!k)if(o&&y===(c==null?void 0:c.data)&&r.select===et(this,Dd))y=et(this,Zc);else try{Qt(this,Dd,r.select),y=r.select(y),y=jx(o==null?void 0:o.data,y,r),Qt(this,Zc,y),Qt(this,wo,null)}catch(D){Qt(this,wo,D)}et(this,wo)&&(v=et(this,wo),y=et(this,Zc),C=Date.now(),_="error");const T=g.fetchStatus==="fetching",N=_==="pending",E=_==="error",B=N&&T,O=y!==void 0,M={status:_,fetchStatus:g.fetchStatus,isPending:N,isSuccess:_==="success",isError:E,isInitialLoading:B,isLoading:B,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:T,isRefetching:T&&!N,isLoadingError:E&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:E&&O,isStale:R1(e,r),refetch:this.refetch,promise:et(this,ws),isEnabled:ra(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=M.data!==void 0,F=M.status==="error"&&!D,U=W=>{F?W.reject(M.error):D&&W.resolve(M.data)},K=()=>{const W=Qt(this,ws,M.promise=Dx());U(W)},z=et(this,ws);switch(z.status){case"pending":e.queryHash===n.queryHash&&U(z);break;case"fulfilled":(F||M.data!==z.value)&&K();break;case"rejected":(!F||M.error!==z.reason)&&K();break}}return M}updateResult(){const e=et(this,Zr),r=this.createResult(et(this,ni),this.options);if(Qt(this,Tl,et(this,ni).state),Qt(this,Xc,this.options),et(this,Tl).data!==void 0&&Qt(this,Qc,et(this,ni)),og(r,e))return;Qt(this,Zr,r);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!et(this,Jc).size)return!0;const c=new Set(o??et(this,Jc));return this.options.throwOnError&&c.add("error"),Object.keys(et(this,Zr)).some(h=>{const u=h;return et(this,Zr)[u]!==e[u]&&c.has(u)})};We(this,Ci,yM).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&We(this,Ci,Px).call(this)}},yn=new WeakMap,ni=new WeakMap,jd=new WeakMap,Zr=new WeakMap,Tl=new WeakMap,Xc=new WeakMap,ws=new WeakMap,wo=new WeakMap,Dd=new WeakMap,Zc=new WeakMap,Qc=new WeakMap,El=new WeakMap,Nl=new WeakMap,So=new WeakMap,Jc=new WeakMap,Ci=new WeakSet,Yu=function(e){We(this,Ci,Hx).call(this);let r=et(this,ni).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Qr)),r},Ix=function(){We(this,Ci,qx).call(this);const e=Lo(this.options.staleTime,et(this,ni));if(Ol||et(this,Zr).isStale||!Ox(e))return;const n=hM(et(this,Zr).dataUpdatedAt,e)+1;Qt(this,El,ml.setTimeout(()=>{et(this,Zr).isStale||this.updateResult()},n))},$x=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(et(this,ni)):this.options.refetchInterval)??!1},zx=function(e){We(this,Ci,Ux).call(this),Qt(this,So,e),!(Ol||ra(this.options.enabled,et(this,ni))===!1||!Ox(et(this,So))||et(this,So)===0)&&Qt(this,Nl,ml.setInterval(()=>{(this.options.refetchIntervalInBackground||O1.isFocused())&&We(this,Ci,Yu).call(this)},et(this,So)))},Px=function(){We(this,Ci,Ix).call(this),We(this,Ci,zx).call(this,We(this,Ci,$x).call(this))},qx=function(){et(this,El)&&(ml.clearTimeout(et(this,El)),Qt(this,El,void 0))},Ux=function(){et(this,Nl)&&(ml.clearInterval(et(this,Nl)),Qt(this,Nl,void 0))},Hx=function(){const e=et(this,yn).getQueryCache().build(et(this,yn),this.options);if(e===et(this,ni))return;const r=et(this,ni);Qt(this,ni,e),Qt(this,jd,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},yM=function(e){vr.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(et(this,Zr))}),et(this,yn).getQueryCache().notify({query:et(this,ni),type:"observerResultsUpdated"})})},rM);function gI(i,e){return ra(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function s2(i,e){return gI(i,e)||i.state.data!==void 0&&Wx(i,e,e.refetchOnMount)}function Wx(i,e,r){if(ra(e.enabled,i)!==!1&&Lo(e.staleTime,i)!=="static"){const n=typeof r=="function"?r(i):r;return n==="always"||n!==!1&&R1(i,e)}return!1}function o2(i,e,r,n){return(i!==e||ra(n.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&R1(i,r)}function R1(i,e){return ra(e.enabled,i)!==!1&&i.isStaleByTime(Lo(e.staleTime,i))}function mI(i,e){return!og(i.getCurrentResult(),e)}function l2(i){return{onFetch:(e,r)=>{var f,g,x,y,v;const n=e.options,a=(x=(g=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],c=((v=e.state.data)==null?void 0:v.pageParams)||[];let h={pages:[],pageParams:[]},u=0;const d=async()=>{let C=!1;const _=N=>{oI(N,()=>e.signal,()=>C=!0)},k=dM(e.options,e.fetchOptions),T=async(N,E,B)=>{if(C)return Promise.reject();if(E==null&&N.pages.length)return Promise.resolve(N);const A=(()=>{const F={client:e.client,queryKey:e.queryKey,pageParam:E,direction:B?"backward":"forward",meta:e.options.meta};return _(F),F})(),M=await k(A),{maxPages:I}=e.options,D=B?sI:aI;return{pages:D(N.pages,M,I),pageParams:D(N.pageParams,E,I)}};if(a&&o.length){const N=a==="backward",E=N?yI:c2,B={pages:o,pageParams:c},O=E(n,B);h=await T(B,O,N)}else{const N=i??o.length;do{const E=u===0?c[0]??n.initialPageParam:c2(n,h);if(u>0&&E==null)break;h=await T(h,E),u++}while(u<N)}return h};e.options.persister?e.fetchFn=()=>{var C,_;return(_=(C=e.options).persister)==null?void 0:_.call(C,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=d}}}function c2(i,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?i.getNextPageParam(e[n],e,r[n],r):void 0}function yI(i,{pages:e,pageParams:r}){var n;return e.length>0?(n=i.getPreviousPageParam)==null?void 0:n.call(i,e[0],e,r[0],r):void 0}var Fd,Pa,Ur,Al,qa,yo,nM,bI=(nM=class extends gM{constructor(e){super();me(this,qa);me(this,Fd);me(this,Pa);me(this,Ur);me(this,Al);Qt(this,Fd,e.client),this.mutationId=e.mutationId,Qt(this,Ur,e.mutationCache),Qt(this,Pa,[]),this.state=e.state||bM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){et(this,Pa).includes(e)||(et(this,Pa).push(e),this.clearGcTimeout(),et(this,Ur).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Qt(this,Pa,et(this,Pa).filter(r=>r!==e)),this.scheduleGc(),et(this,Ur).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){et(this,Pa).length||(this.state.status==="pending"?this.scheduleGc():et(this,Ur).remove(this))}continue(){var e;return((e=et(this,Al))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O,A;const r=()=>{We(this,qa,yo).call(this,{type:"continue"})},n={client:et(this,Fd),meta:this.options.meta,mutationKey:this.options.mutationKey};Qt(this,Al,pM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,I)=>{We(this,qa,yo).call(this,{type:"failed",failureCount:M,error:I})},onPause:()=>{We(this,qa,yo).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>et(this,Ur).canRun(this)}));const a=this.state.status==="pending",o=!et(this,Al).canStart();try{if(a)r();else{We(this,qa,yo).call(this,{type:"pending",variables:e,isPaused:o}),et(this,Ur).config.onMutate&&await et(this,Ur).config.onMutate(e,this,n);const I=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));I!==this.state.context&&We(this,qa,yo).call(this,{type:"pending",context:I,variables:e,isPaused:o})}const M=await et(this,Al).start();return await((d=(u=et(this,Ur).config).onSuccess)==null?void 0:d.call(u,M,e,this.state.context,this,n)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,M,e,this.state.context,n)),await((y=(x=et(this,Ur).config).onSettled)==null?void 0:y.call(x,M,null,this.state.variables,this.state.context,this,n)),await((C=(v=this.options).onSettled)==null?void 0:C.call(v,M,null,e,this.state.context,n)),We(this,qa,yo).call(this,{type:"success",data:M}),M}catch(M){try{await((k=(_=et(this,Ur).config).onError)==null?void 0:k.call(_,M,e,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((N=(T=this.options).onError)==null?void 0:N.call(T,M,e,this.state.context,n))}catch(I){Promise.reject(I)}try{await((B=(E=et(this,Ur).config).onSettled)==null?void 0:B.call(E,void 0,M,this.state.variables,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((A=(O=this.options).onSettled)==null?void 0:A.call(O,void 0,M,e,this.state.context,n))}catch(I){Promise.reject(I)}throw We(this,qa,yo).call(this,{type:"error",error:M}),M}finally{et(this,Ur).runNext(this)}}},Fd=new WeakMap,Pa=new WeakMap,Ur=new WeakMap,Al=new WeakMap,qa=new WeakSet,yo=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),vr.batch(()=>{et(this,Pa).forEach(n=>{n.onMutationUpdate(e)}),et(this,Ur).notify({mutation:this,type:"updated",action:e})})},nM);function bM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ss,pa,Id,aM,xI=(aM=class extends Th{constructor(e={}){super();me(this,Ss);me(this,pa);me(this,Id);this.config=e,Qt(this,Ss,new Set),Qt(this,pa,new Map),Qt(this,Id,0)}build(e,r,n){const a=new bI({client:e,mutationCache:this,mutationId:++fp(this,Id)._,options:e.defaultMutationOptions(r),state:n});return this.add(a),a}add(e){et(this,Ss).add(e);const r=pp(e);if(typeof r=="string"){const n=et(this,pa).get(r);n?n.push(e):et(this,pa).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(et(this,Ss).delete(e)){const r=pp(e);if(typeof r=="string"){const n=et(this,pa).get(r);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&et(this,pa).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=pp(e);if(typeof r=="string"){const n=et(this,pa).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const r=pp(e);if(typeof r=="string"){const a=(n=et(this,pa).get(r))==null?void 0:n.find(o=>o!==e&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vr.batch(()=>{et(this,Ss).forEach(e=>{this.notify({type:"removed",mutation:e})}),et(this,Ss).clear(),et(this,pa).clear()})}getAll(){return Array.from(et(this,Ss))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>e2(r,n))}findAll(e={}){return this.getAll().filter(r=>e2(e,r))}notify(e){vr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return vr.batch(()=>Promise.all(e.map(r=>r.continue().catch(Qr))))}},Ss=new WeakMap,pa=new WeakMap,Id=new WeakMap,aM);function pp(i){var e;return(e=i.options.scope)==null?void 0:e.id}var Ts,To,bn,Es,Rs,Hp,Gx,sM,vI=(sM=class extends Th{constructor(r,n){super();me(this,Rs);me(this,Ts);me(this,To);me(this,bn);me(this,Es);Qt(this,Ts,r),this.setOptions(n),this.bindMethods(),We(this,Rs,Hp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var a;const n=this.options;this.options=et(this,Ts).defaultMutationOptions(r),og(this.options,n)||et(this,Ts).getMutationCache().notify({type:"observerOptionsUpdated",mutation:et(this,bn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Rl(n.mutationKey)!==Rl(this.options.mutationKey)?this.reset():((a=et(this,bn))==null?void 0:a.state.status)==="pending"&&et(this,bn).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=et(this,bn))==null||r.removeObserver(this)}onMutationUpdate(r){We(this,Rs,Hp).call(this),We(this,Rs,Gx).call(this,r)}getCurrentResult(){return et(this,To)}reset(){var r;(r=et(this,bn))==null||r.removeObserver(this),Qt(this,bn,void 0),We(this,Rs,Hp).call(this),We(this,Rs,Gx).call(this)}mutate(r,n){var a;return Qt(this,Es,n),(a=et(this,bn))==null||a.removeObserver(this),Qt(this,bn,et(this,Ts).getMutationCache().build(et(this,Ts),this.options)),et(this,bn).addObserver(this),et(this,bn).execute(r)}},Ts=new WeakMap,To=new WeakMap,bn=new WeakMap,Es=new WeakMap,Rs=new WeakSet,Hp=function(){var n;const r=((n=et(this,bn))==null?void 0:n.state)??bM();Qt(this,To,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Gx=function(r){vr.batch(()=>{var n,a,o,c,h,u,d,f;if(et(this,Es)&&this.hasListeners()){const g=et(this,To).variables,x=et(this,To).context,y={client:et(this,Ts),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(a=(n=et(this,Es)).onSuccess)==null||a.call(n,r.data,g,x,y)}catch(v){Promise.reject(v)}try{(c=(o=et(this,Es)).onSettled)==null||c.call(o,r.data,null,g,x,y)}catch(v){Promise.reject(v)}}else if((r==null?void 0:r.type)==="error"){try{(u=(h=et(this,Es)).onError)==null||u.call(h,r.error,g,x,y)}catch(v){Promise.reject(v)}try{(f=(d=et(this,Es)).onSettled)==null||f.call(d,void 0,r.error,g,x,y)}catch(v){Promise.reject(v)}}}this.listeners.forEach(g=>{g(et(this,To))})})},sM),Ua,oM,CI=(oM=class extends Th{constructor(e={}){super();me(this,Ua);this.config=e,Qt(this,Ua,new Map)}build(e,r,n){const a=r.queryKey,o=r.queryHash??M1(a,r);let c=this.get(o);return c||(c=new fI({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){et(this,Ua).has(e.queryHash)||(et(this,Ua).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=et(this,Ua).get(e.queryHash);r&&(e.destroy(),r===e&&et(this,Ua).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return et(this,Ua).get(e)}getAll(){return[...et(this,Ua).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>t2(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>t2(e,n)):r}notify(e){vr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ua=new WeakMap,oM),rr,Eo,No,th,eh,Ao,ih,rh,lM,_I=(lM=class{constructor(i={}){me(this,rr);me(this,Eo);me(this,No);me(this,th);me(this,eh);me(this,Ao);me(this,ih);me(this,rh);Qt(this,rr,i.queryCache||new CI),Qt(this,Eo,i.mutationCache||new xI),Qt(this,No,i.defaultOptions||{}),Qt(this,th,new Map),Qt(this,eh,new Map),Qt(this,Ao,0)}mount(){fp(this,Ao)._++,et(this,Ao)===1&&(Qt(this,ih,O1.subscribe(async i=>{i&&(await this.resumePausedMutations(),et(this,rr).onFocus())})),Qt(this,rh,lg.subscribe(async i=>{i&&(await this.resumePausedMutations(),et(this,rr).onOnline())})))}unmount(){var i,e;fp(this,Ao)._--,et(this,Ao)===0&&((i=et(this,ih))==null||i.call(this),Qt(this,ih,void 0),(e=et(this,rh))==null||e.call(this),Qt(this,rh,void 0))}isFetching(i){return et(this,rr).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return et(this,Eo).findAll({...i,status:"pending"}).length}getQueryData(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=et(this,rr).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),r=et(this,rr).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(i):(i.revalidateIfStale&&r.isStaleByTime(Lo(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(i){return et(this,rr).findAll(i).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(i,e,r){const n=this.defaultQueryOptions({queryKey:i}),a=et(this,rr).get(n.queryHash),o=a==null?void 0:a.state.data,c=iI(e,o);if(c!==void 0)return et(this,rr).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(i,e,r){return vr.batch(()=>et(this,rr).findAll(i).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=et(this,rr).get(e.queryHash))==null?void 0:r.state}removeQueries(i){const e=et(this,rr);vr.batch(()=>{e.findAll(i).forEach(r=>{e.remove(r)})})}resetQueries(i,e){const r=et(this,rr);return vr.batch(()=>(r.findAll(i).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...i},e)))}cancelQueries(i,e={}){const r={revert:!0,...e},n=vr.batch(()=>et(this,rr).findAll(i).map(a=>a.cancel(r)));return Promise.all(n).then(Qr).catch(Qr)}invalidateQueries(i,e={}){return vr.batch(()=>(et(this,rr).findAll(i).forEach(r=>{r.invalidate()}),(i==null?void 0:i.refetchType)==="none"?Promise.resolve():this.refetchQueries({...i,type:(i==null?void 0:i.refetchType)??(i==null?void 0:i.type)??"active"},e)))}refetchQueries(i,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=vr.batch(()=>et(this,rr).findAll(i).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(Qr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Qr)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const r=et(this,rr).build(this,e);return r.isStaleByTime(Lo(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(Qr).catch(Qr)}fetchInfiniteQuery(i){return i.behavior=l2(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(Qr).catch(Qr)}ensureInfiniteQueryData(i){return i.behavior=l2(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return lg.isOnline()?et(this,Eo).resumePausedMutations():Promise.resolve()}getQueryCache(){return et(this,rr)}getMutationCache(){return et(this,Eo)}getDefaultOptions(){return et(this,No)}setDefaultOptions(i){Qt(this,No,i)}setQueryDefaults(i,e){et(this,th).set(Rl(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...et(this,th).values()],r={};return e.forEach(n=>{yd(i,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(i,e){et(this,eh).set(Rl(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...et(this,eh).values()],r={};return e.forEach(n=>{yd(i,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(i){if(i._defaulted)return i;const e={...et(this,No).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=M1(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===B1&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...et(this,No).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){et(this,rr).clear(),et(this,Eo).clear()}},rr=new WeakMap,Eo=new WeakMap,No=new WeakMap,th=new WeakMap,eh=new WeakMap,Ao=new WeakMap,ih=new WeakMap,rh=new WeakMap,lM),xM=P.createContext(void 0),Pi=i=>{const e=P.useContext(xM);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},h2=({client:i,children:e})=>(P.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),m.jsx(xM.Provider,{value:i,children:e})),vM=P.createContext(!1),kI=()=>P.useContext(vM);vM.Provider;function wI(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var SI=P.createContext(wI()),TI=()=>P.useContext(SI),EI=(i,e,r)=>{const n=r!=null&&r.state.error&&typeof i.throwOnError=="function"?L1(i.throwOnError,[r.state.error,r]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},NI=i=>{P.useEffect(()=>{i.clearReset()},[i])},AI=({result:i,errorResetBoundary:e,throwOnError:r,query:n,suspense:a})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(a&&i.data===void 0||L1(r,[i.error,n])),MI=i=>{if(i.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=i.staleTime;i.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof i.gcTime=="number"&&(i.gcTime=Math.max(i.gcTime,1e3))}},BI=(i,e)=>i.isLoading&&i.isFetching&&!e,LI=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,u2=(i,e,r)=>e.fetchOptimistic(i).catch(()=>{r.clearReset()});function OI(i,e,r){var x,y,v,C;const n=kI(),a=TI(),o=Pi(),c=o.defaultQueryOptions(i);(y=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||y.call(x,c);const h=o.getQueryCache().get(c.queryHash);c._optimisticResults=n?"isRestoring":"optimistic",MI(c),EI(c,a,h),NI(a);const u=!o.getQueryCache().get(c.queryHash),[d]=P.useState(()=>new e(o,c)),f=d.getOptimisticResult(c),g=!n&&i.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(_=>{const k=g?d.subscribe(vr.batchCalls(_)):Qr;return d.updateResult(),k},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setOptions(c)},[c,d]),LI(c,f))throw u2(c,d,a);if(AI({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw f.error;if((C=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||C.call(v,c,f),c.experimental_prefetchInRender&&!Ol&&BI(f,n)){const _=u?u2(c,d,a):h==null?void 0:h.promise;_==null||_.catch(Qr).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?f:d.trackResult(f)}function oi(i,e){return OI(i,pI)}function nr(i,e){const r=Pi(),[n]=P.useState(()=>new vI(r,i));P.useEffect(()=>{n.setOptions(i)},[n,i]);const a=P.useSyncExternalStore(P.useCallback(c=>n.subscribe(vr.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=P.useCallback((c,h)=>{n.mutate(c,h).catch(Qr)},[n]);if(a.error&&L1(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const RI="/api";let Yx=null;function CM(i){Yx=i}class jI{async request(e,r){const n={"Content-Type":"application/json",...r==null?void 0:r.headers};Yx&&(n["X-Dreamcontext-Vault"]=Yx);const a=await fetch(`${RI}${e}`,{...r,headers:n});if(!a.ok){let o=`Request failed: ${a.status}`;try{const c=await a.json();c.message&&(o=c.message)}catch{}throw new Error(o)}return await a.json()}get(e){return this.request(e)}post(e,r){return this.request(e,{method:"POST",body:JSON.stringify(r)})}patch(e,r){return this.request(e,{method:"PATCH",body:JSON.stringify(r)})}put(e,r){return this.request(e,{method:"PUT",body:JSON.stringify(r)})}del(e){return this.request(e,{method:"DELETE"})}}const ie=new jI,DI=[["vaults"],["launcher-status"],["launcher-federation-graph"],["connections"]];function Wl(i){for(const e of DI)i.invalidateQueries({queryKey:e})}function FI(){const i=Pi();return nr({mutationFn:e=>ie.post("/launcher/register",e),onSuccess:()=>{Wl(i)}})}function II(){return oi({queryKey:["launcher-defaults"],queryFn:()=>ie.get("/launcher/defaults"),staleTime:1/0})}function $I(){const i=Pi();return nr({mutationFn:e=>ie.post("/launcher/scaffold",e),onSuccess:()=>{Wl(i)}})}function zI(){return oi({queryKey:["launcher-catalog"],queryFn:()=>ie.get("/launcher/catalog"),staleTime:1/0})}async function PI(i){return ie.get(`/launcher/detect?path=${encodeURIComponent(i)}`)}function qI(){return oi({queryKey:["launcher-status"],queryFn:()=>ie.get("/launcher/status")})}function _M(){const i=Pi();return nr({mutationFn:e=>ie.post("/launcher/update",{name:e}),onSuccess:()=>{Wl(i)}})}function UI(){const i=Pi();return nr({mutationFn:e=>ie.post("/launcher/unregister",{name:e}),onSuccess:()=>{Wl(i)}})}function HI(){return oi({queryKey:["launcher-federation-graph"],queryFn:()=>ie.get("/launcher/federation-graph")})}function WI(){const i=Pi();return nr({mutationFn:e=>ie.post("/launcher/connection",e),onSuccess:()=>{Wl(i)}})}function GI(){const i=Pi();return nr({mutationFn:e=>ie.post("/launcher/connection/remove",e),onSuccess:()=>{Wl(i)}})}function YI(){const i=Pi();return nr({mutationFn:e=>ie.post("/launcher/shareable",e),onSuccess:()=>{Wl(i)}})}const KI="modulepreload",VI=function(i){return"/"+i},d2={},Fe=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let c=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),u=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(r.map(d=>{if(d=VI(d),d in d2)return;d2[d]=!0;const f=d.endsWith(".css"),g=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${g}`))return;const x=document.createElement("link");if(x.rel=f?"stylesheet":KI,f||(x.as="script"),x.crossOrigin="",x.href=d,u&&x.setAttribute("nonce",u),document.head.appendChild(x),f)return new Promise((y,v)=>{x.addEventListener("load",y),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return a.then(c=>{for(const h of c||[])h.status==="rejected"&&o(h.reason);return e().catch(o)})};function Po(){return!!window.__TAURI_INTERNALS__}async function XI(){if(Po()){const{open:e}=await Fe(async()=>{const{open:n}=await import("./index-BK87l45R.js");return{open:n}},__vite__mapDeps([0,1])),r=await e({directory:!0,multiple:!1});return typeof r=="string"?r:null}const i=window.prompt("Enter an absolute path to a dreamcontext project:");return i&&i.trim()?i.trim():null}async function ZI(i){if(Po()){const{WebviewWindow:e}=await Fe(async()=>{const{WebviewWindow:o}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:o}},__vite__mapDeps([2,3,1])),r=`vault-${i.replace(/[^a-zA-Z0-9_-]/g,"-")}`,n=await e.getByLabel(r);if(n){await n.setFocus();return}const a=new e(r,{url:`${window.location.origin}/?vault=${encodeURIComponent(i)}`,title:`dreamcontext — ${i}`,width:1280,height:800,dragDropEnabled:!1});await new Promise((o,c)=>{a.once("tauri://created",()=>o()),a.once("tauri://error",h=>c(new Error(`window create failed: ${String(h.payload)}`)))});return}window.open(`/?vault=${encodeURIComponent(i)}`,"_blank")}const QI=["name","description","targetUser","stack","priority","platforms","packs","review"],JI=["path","description","targetUser","stack","priority","platforms","packs","review"],t$=["path","platforms","packs","review"],Wb={name:{label:"What is this project called?",hint:"Used as the folder name and the vault name."},description:{label:"One line — what is it?",hint:"A short description. Optional.",optional:!0},targetUser:{label:"Who is it for?",hint:"The target user. Optional.",optional:!0},stack:{label:"Tech stack?",hint:"Comma-separated. Auto-detected for existing folders. Optional.",optional:!0},priority:{label:"Current focus?",hint:"What you are working on right now. Optional.",optional:!0}};function e$({onClose:i,onReady:e}){const r=II(),n=zI(),a=$I(),o=FI(),[c,h]=P.useState(null),[u,d]=P.useState(0),[f,g]=P.useState(null),[x,y]=P.useState(null),[v,C]=P.useState(null),[_,k]=P.useState(!1),[T,N]=P.useState(""),[E,B]=P.useState(""),[O,A]=P.useState(""),[M,I]=P.useState(""),[D,F]=P.useState(""),[U,K]=P.useState(""),[z,W]=P.useState(""),[j,H]=P.useState(["claude"]),[Y,Z]=P.useState([]),[rt,G]=P.useState(!1),tt=P.useRef(null);function ft(Yt,ht,st){ht(Yt.includes(st)?Yt.filter(Ot=>Ot!==st):[...Yt,st])}P.useEffect(()=>{var Yt;c==="new"&&!E&&((Yt=r.data)!=null&&Yt.defaultParent)&&B(r.data.defaultParent)},[c,E,r.data]);const ct=c==="existing"?rt?t$:JI:QI,vt=ct[u];P.useEffect(()=>{var Yt;(Yt=tt.current)==null||Yt.focus()},[vt,c]);function ot(Yt){h(Yt),d(0),g(null)}async function wt(Yt){g(null);const ht=await XI();if(ht){if(Yt==="parent"){B(ht);return}A(ht);try{const st=await PI(ht);if(N(st.name),!U&&st.stack&&K(st.stack),G(st.hasContext),st.hasContext){try{await o.mutateAsync({name:st.name,path:ht})}catch(Ot){const $t=Ot instanceof Error?Ot.message:String(Ot);if(!/already registered/i.test($t))throw Ot}e(st.name);return}d(1)}catch(st){g(st instanceof Error?st.message:String(st))}}}const it=P.useMemo(()=>vt==="name"?T.trim().length>0&&E.trim().length>0:vt==="path"?O.trim().length>0:!0,[vt,T,E,O]);function V(){g(null),u<ct.length-1&&d(Yt=>Yt+1)}function at(){g(null),u>0?d(Yt=>Yt-1):h(null)}async function Ct(){g(null);const Yt=c==="existing"?{mode:"existing",name:T.trim(),projectPath:O.trim()}:{mode:"new",name:T.trim(),parentDir:E.trim()};Yt.description=M.trim()||void 0,Yt.targetUser=D.trim()||void 0,Yt.stack=U.trim()||void 0,Yt.priority=z.trim()||void 0,Yt.platforms=j.length>0?j:void 0,Yt.packs=Y.length>0?Y:void 0;try{const ht=await a.mutateAsync(Yt);y(ht.vault),C(ht.cli??null)}catch(ht){g(ht instanceof Error?ht.message:String(ht))}}const Bt="Enrich my dreamcontext: scan the codebase and fill soul, memory, and tech_stack with real detail, then propose initial feature PRDs and a first task. No placeholders.";async function Ht(){try{await navigator.clipboard.writeText(Bt),k(!0),setTimeout(()=>k(!1),1500)}catch{g("Could not copy to clipboard.")}}function re(Yt,ht,st){return m.jsx("input",{ref:tt,type:"text",className:"wiz-input",value:Yt,placeholder:st,onChange:Ot=>ht(Ot.target.value),onKeyDown:Ot=>{Ot.key==="Enter"&&it&&V()}})}function Dt(){var jt,ae,It;if(x)return m.jsxs("div",{className:"wiz-success",children:[m.jsx("div",{className:"wiz-success-check","aria-hidden":!0,children:"✓"}),m.jsxs("h2",{className:"wiz-q",children:["“",x.name,"” is ready"]}),m.jsx("p",{className:"wiz-hint",children:x.path}),(v==null?void 0:v.status)==="installed"&&m.jsx("p",{className:"wiz-hint",children:"Installed the dreamcontext CLI from npm so your hooks work."}),(v==null?void 0:v.status)==="failed"&&m.jsx("div",{className:"wiz-error",children:v.message??"Run: npm install -g dreamcontext"}),m.jsxs("div",{className:"wiz-handoff",children:[m.jsx("div",{className:"wiz-handoff-title",children:"Next: enrich it in Claude Code"}),m.jsx("p",{className:"wiz-hint",children:"The skeleton is in place. Open this project in Claude Code and paste the prompt below so the agent can scan your code and fill in real context."}),m.jsx("pre",{className:"wiz-handoff-prompt",children:Bt}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:Ht,children:_?"Copied ✓":"Copy prompt"})]}),m.jsxs("div",{className:"wiz-actions",children:[m.jsx("button",{type:"button",className:"wiz-btn",onClick:i,children:"Close"}),m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:()=>e(x.name),children:"Open project →"})]})]});if(c===null)return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Add a project"}),m.jsx("p",{className:"wiz-hint",children:"Create something new, or set up a folder you already have."}),m.jsxs("div",{className:"wiz-choices",children:[m.jsxs("button",{type:"button",className:"wiz-choice",onClick:()=>ot("new"),children:[m.jsx("span",{className:"wiz-choice-title",children:"Create new"}),m.jsx("span",{className:"wiz-hint",children:"Make a new folder and initialize dreamcontext in it."})]}),m.jsxs("button",{type:"button",className:"wiz-choice",onClick:()=>ot("existing"),children:[m.jsx("span",{className:"wiz-choice-title",children:"Open existing"}),m.jsx("span",{className:"wiz-hint",children:"Pick a folder on your Mac and set up dreamcontext there."})]})]})]});if(vt==="path")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Which folder?"}),m.jsx("p",{className:"wiz-hint",children:"Choose the project folder. If it's already a dreamcontext project, it opens straight away."}),m.jsxs("div",{className:"wiz-row",children:[m.jsx("input",{className:"wiz-input",type:"text",value:O,readOnly:!0,placeholder:"No folder chosen"}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>wt("project"),children:a.isPending?"Working…":"Browse…"})]})]});if(vt==="name")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:Wb.name.label}),m.jsx("p",{className:"wiz-hint",children:Wb.name.hint}),re(T,N,"my-project"),m.jsx("label",{className:"wiz-sublabel",children:"Where should it live?"}),m.jsxs("div",{className:"wiz-row",children:[m.jsx("input",{className:"wiz-input",type:"text",value:E,placeholder:((jt=r.data)==null?void 0:jt.defaultParent)??"~/projects",onChange:je=>B(je.target.value)}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>wt("parent"),children:"Browse…"})]}),T.trim()&&E.trim()&&m.jsxs("p",{className:"wiz-hint wiz-preview",children:["Creates: ",E.replace(/\/+$/,""),"/",T.trim()]})]});if(vt==="review")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Ready to set up"}),m.jsxs("dl",{className:"wiz-review",children:[m.jsx("dt",{children:"Name"}),m.jsx("dd",{children:T.trim()}),m.jsx("dt",{children:"Location"}),m.jsx("dd",{children:c==="new"?`${E.replace(/\/+$/,"")}/${T.trim()}`:O}),M.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Description"}),m.jsx("dd",{children:M.trim()})]}),D.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"For"}),m.jsx("dd",{children:D.trim()})]}),U.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Stack"}),m.jsx("dd",{children:U.trim()})]}),z.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Focus"}),m.jsx("dd",{children:z.trim()})]}),m.jsx("dt",{children:"Platforms"}),m.jsx("dd",{children:(j.length>0?j:["claude"]).map(je=>{var ve,He;return((He=(ve=n.data)==null?void 0:ve.platforms.find(Be=>Be.id===je))==null?void 0:He.label)??je}).join(", ")}),Y.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Skill packs"}),m.jsx("dd",{children:Y.join(", ")})]})]})]});if(vt==="platforms"){const je=((ae=n.data)==null?void 0:ae.platforms)??[];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Which agent platforms?"}),m.jsx("p",{className:"wiz-hint",children:"Where dreamcontext installs its skills, agents, and hooks. Pick one or more."}),m.jsx("div",{className:"wiz-choices",children:je.map(ve=>{const He=j.includes(ve.id);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${He?" wiz-select-on":""}`,onClick:()=>ft(j,H,ve.id),"aria-pressed":He,children:[m.jsxs("span",{className:"wiz-choice-title",children:[ve.label,ve.recommended&&m.jsx("span",{className:"wiz-badge",children:"Recommended"})]}),m.jsx("span",{className:"wiz-hint",children:ve.description})]},ve.id)})}),j.length===0&&m.jsx("p",{className:"wiz-hint wiz-preview",children:"Nothing selected — defaults to Claude."})]})}if(vt==="packs"){const je=((It=n.data)==null?void 0:It.packs)??[];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Add skill packs?"}),m.jsx("p",{className:"wiz-hint",children:"Optional curated skills for your agent. You can add more later. Skip if unsure."}),je.length===0?m.jsx("p",{className:"wiz-hint",children:"No optional packs available."}):m.jsx("div",{className:"wiz-choices",children:je.map(ve=>{const He=Y.includes(ve.name);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${He?" wiz-select-on":""}`,onClick:()=>ft(Y,Z,ve.name),"aria-pressed":He,children:[m.jsxs("span",{className:"wiz-choice-title",children:[m.jsx("span",{className:"wiz-check","aria-hidden":!0,children:He?"☑":"☐"})," ",ve.name]}),m.jsx("span",{className:"wiz-hint",children:ve.description})]},ve.name)})})]})}const ht=Wb[vt],st={description:[M,I,"A persistent brain for AI agents…"],targetUser:[D,F,"Developers"],stack:[U,K,"TypeScript, React, Node…"],priority:[z,W,"Initial setup"]},[Ot,$t,Gt]=st[vt];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:ht.label}),m.jsx("p",{className:"wiz-hint",children:ht.hint}),re(Ot,$t,Gt)]})}const xt=vt==="review",Ut=c!==null&&vt!=="path"&&!x;return m.jsx("div",{className:"wiz-overlay",role:"dialog","aria-modal":"true",onClick:i,children:m.jsxs("div",{className:"wiz-modal",onClick:Yt=>Yt.stopPropagation(),children:[m.jsx("button",{type:"button",className:"wiz-close",onClick:i,"aria-label":"Close",children:"×"}),m.jsx("div",{className:"wiz-body",children:Dt()}),f&&m.jsx("div",{className:"wiz-error",children:f}),Ut&&m.jsxs("div",{className:"wiz-actions",children:[m.jsx("button",{type:"button",className:"wiz-btn",onClick:at,children:"Back"}),xt?m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:Ct,disabled:a.isPending||!T.trim(),children:a.isPending?"Setting up…":"Set up project"}):m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:V,disabled:!it,children:"Next"})]})]})})}function i$(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(r=r.call(i)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function r$(i,e,r){return e=u$(e),e in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function f2(i,e){return s$(i)||i$(i,e)||kM(i,e)||c$()}function n$(i){return a$(i)||o$(i)||kM(i)||l$()}function a$(i){if(Array.isArray(i))return Kx(i)}function s$(i){if(Array.isArray(i))return i}function o$(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function kM(i,e){if(i){if(typeof i=="string")return Kx(i,e);var r=Object.prototype.toString.call(i).slice(8,-1);if(r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set")return Array.from(i);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kx(i,e)}}function Kx(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=i[r];return n}function l$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
51
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
52
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h$(i,e){if(typeof i!="object"||i===null)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function u$(i){var e=h$(i,"string");return typeof e=="symbol"?e:String(e)}var d$=function(e,r){var n=new Set(r);return Object.assign.apply(Object,[{}].concat(n$(Object.entries(e).filter(function(a){var o=f2(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=f2(a,2),c=o[0],h=o[1];return r$({},c,h)}))))};function Vx(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function f$(i){if(Array.isArray(i))return i}function p$(i){if(Array.isArray(i))return Vx(i)}function g$(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function m$(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function y$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
53
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
54
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x$(i,e){return f$(i)||m$(i,e)||wM(i,e)||y$()}function p2(i){return p$(i)||g$(i)||wM(i)||b$()}function wM(i,e){if(i){if(typeof i=="string")return Vx(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vx(i,e):void 0}}function v$(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.wrapperElementType,n=r===void 0?"div":r,a=e.nodeMapper,o=a===void 0?function(f){return f}:a,c=e.methodNames,h=c===void 0?[]:c,u=e.initPropNames,d=u===void 0?[]:u;return P.forwardRef(function(f,g){var x=P.useRef(),y=P.useMemo(function(){var _=Object.fromEntries(d.filter(function(k){return f.hasOwnProperty(k)}).map(function(k){return[k,f[k]]}));return i(_)},[]);g2(function(){y(o(x.current))},P.useLayoutEffect),g2(function(){return y._destructor instanceof Function?y._destructor:void 0});var v=P.useCallback(function(_){for(var k=arguments.length,T=new Array(k>1?k-1:0),N=1;N<k;N++)T[N-1]=arguments[N];return y[_]instanceof Function?y[_].apply(y,T):void 0},[y]),C=P.useRef({});return Object.keys(d$(f,[].concat(p2(h),p2(d)))).filter(function(_){return C.current[_]!==f[_]}).forEach(function(_){return v(_,f[_])}),C.current=f,P.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(_){return[_,function(){for(var k=arguments.length,T=new Array(k),N=0;N<k;N++)T[N]=arguments[N];return v.apply(void 0,[_].concat(T))}]}))},[v]),cM.createElement(n,{ref:x})})}function g2(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P.useEffect,r=P.useRef(),n=P.useRef(!1),a=P.useRef(!1),o=P.useState(0),c=x$(o,2);c[0];var h=c[1];n.current&&(a.current=!0),e(function(){return n.current||(r.current=i(),n.current=!0),h(function(u){return u+1}),function(){a.current&&r.current&&r.current()}},[])}var Xx="http://www.w3.org/1999/xhtml";const m2={svg:"http://www.w3.org/2000/svg",xhtml:Xx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nm(i){var e=i+="",r=e.indexOf(":");return r>=0&&(e=i.slice(0,r))!=="xmlns"&&(i=i.slice(r+1)),m2.hasOwnProperty(e)?{space:m2[e],local:i}:i}function C$(i){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Xx&&e.documentElement.namespaceURI===Xx?e.createElement(i):e.createElementNS(r,i)}}function _$(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function SM(i){var e=nm(i);return(e.local?_$:C$)(e)}function k$(){}function j1(i){return i==null?k$:function(){return this.querySelector(i)}}function w$(i){typeof i!="function"&&(i=j1(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=new Array(c),u,d,f=0;f<c;++f)(u=o[f])&&(d=i.call(u,u.__data__,f,o))&&("__data__"in u&&(d.__data__=u.__data__),h[f]=d);return new Fn(n,this._parents)}function S$(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function T$(){return[]}function TM(i){return i==null?T$:function(){return this.querySelectorAll(i)}}function E$(i){return function(){return S$(i.apply(this,arguments))}}function N$(i){typeof i=="function"?i=E$(i):i=TM(i);for(var e=this._groups,r=e.length,n=[],a=[],o=0;o<r;++o)for(var c=e[o],h=c.length,u,d=0;d<h;++d)(u=c[d])&&(n.push(i.call(u,u.__data__,d,c)),a.push(u));return new Fn(n,a)}function EM(i){return function(){return this.matches(i)}}function NM(i){return function(e){return e.matches(i)}}var A$=Array.prototype.find;function M$(i){return function(){return A$.call(this.children,i)}}function B$(){return this.firstElementChild}function L$(i){return this.select(i==null?B$:M$(typeof i=="function"?i:NM(i)))}var O$=Array.prototype.filter;function R$(){return Array.from(this.children)}function j$(i){return function(){return O$.call(this.children,i)}}function D$(i){return this.selectAll(i==null?R$:j$(typeof i=="function"?i:NM(i)))}function F$(i){typeof i!="function"&&(i=EM(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&i.call(u,u.__data__,d,o)&&h.push(u);return new Fn(n,this._parents)}function AM(i){return new Array(i.length)}function I$(){return new Fn(this._enter||this._groups.map(AM),this._parents)}function cg(i,e){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=e}cg.prototype={constructor:cg,appendChild:function(i){return this._parent.insertBefore(i,this._next)},insertBefore:function(i,e){return this._parent.insertBefore(i,e)},querySelector:function(i){return this._parent.querySelector(i)},querySelectorAll:function(i){return this._parent.querySelectorAll(i)}};function $$(i){return function(){return i}}function z$(i,e,r,n,a,o){for(var c=0,h,u=e.length,d=o.length;c<d;++c)(h=e[c])?(h.__data__=o[c],n[c]=h):r[c]=new cg(i,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function P$(i,e,r,n,a,o,c){var h,u,d=new Map,f=e.length,g=o.length,x=new Array(f),y;for(h=0;h<f;++h)(u=e[h])&&(x[h]=y=c.call(u,u.__data__,h,e)+"",d.has(y)?a[h]=u:d.set(y,u));for(h=0;h<g;++h)y=c.call(i,o[h],h,o)+"",(u=d.get(y))?(n[h]=u,u.__data__=o[h],d.delete(y)):r[h]=new cg(i,o[h]);for(h=0;h<f;++h)(u=e[h])&&d.get(x[h])===u&&(a[h]=u)}function q$(i){return i.__data__}function U$(i,e){if(!arguments.length)return Array.from(this,q$);var r=e?P$:z$,n=this._parents,a=this._groups;typeof i!="function"&&(i=$$(i));for(var o=a.length,c=new Array(o),h=new Array(o),u=new Array(o),d=0;d<o;++d){var f=n[d],g=a[d],x=g.length,y=H$(i.call(f,f&&f.__data__,d,n)),v=y.length,C=h[d]=new Array(v),_=c[d]=new Array(v),k=u[d]=new Array(x);r(f,g,C,_,k,y,e);for(var T=0,N=0,E,B;T<v;++T)if(E=C[T]){for(T>=N&&(N=T+1);!(B=_[N])&&++N<v;);E._next=B||null}}return c=new Fn(c,n),c._enter=h,c._exit=u,c}function H$(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function W$(){return new Fn(this._exit||this._groups.map(AM),this._parents)}function G$(i,e,r){var n=this.enter(),a=this,o=this.exit();return typeof i=="function"?(n=i(n),n&&(n=n.selection())):n=n.append(i+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?o.remove():r(o),n&&a?n.merge(a).order():a}function Y$(i){for(var e=i.selection?i.selection():i,r=this._groups,n=e._groups,a=r.length,o=n.length,c=Math.min(a,o),h=new Array(a),u=0;u<c;++u)for(var d=r[u],f=n[u],g=d.length,x=h[u]=new Array(g),y,v=0;v<g;++v)(y=d[v]||f[v])&&(x[v]=y);for(;u<a;++u)h[u]=r[u];return new Fn(h,this._parents)}function K$(){for(var i=this._groups,e=-1,r=i.length;++e<r;)for(var n=i[e],a=n.length-1,o=n[a],c;--a>=0;)(c=n[a])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function V$(i){i||(i=X$);function e(g,x){return g&&x?i(g.__data__,x.__data__):!g-!x}for(var r=this._groups,n=r.length,a=new Array(n),o=0;o<n;++o){for(var c=r[o],h=c.length,u=a[o]=new Array(h),d,f=0;f<h;++f)(d=c[f])&&(u[f]=d);u.sort(e)}return new Fn(a,this._parents).order()}function X$(i,e){return i<e?-1:i>e?1:i>=e?0:NaN}function Z$(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function Q$(){return Array.from(this)}function J$(){for(var i=this._groups,e=0,r=i.length;e<r;++e)for(var n=i[e],a=0,o=n.length;a<o;++a){var c=n[a];if(c)return c}return null}function t6(){let i=0;for(const e of this)++i;return i}function e6(){return!this.node()}function i6(i){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],o=0,c=a.length,h;o<c;++o)(h=a[o])&&i.call(h,h.__data__,o,a);return this}function r6(i){return function(){this.removeAttribute(i)}}function n6(i){return function(){this.removeAttributeNS(i.space,i.local)}}function a6(i,e){return function(){this.setAttribute(i,e)}}function s6(i,e){return function(){this.setAttributeNS(i.space,i.local,e)}}function o6(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(i):this.setAttribute(i,r)}}function l6(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(i.space,i.local):this.setAttributeNS(i.space,i.local,r)}}function c6(i,e){var r=nm(i);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?n6:r6:typeof e=="function"?r.local?l6:o6:r.local?s6:a6)(r,e))}function MM(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function h6(i){return function(){this.style.removeProperty(i)}}function u6(i,e,r){return function(){this.style.setProperty(i,e,r)}}function d6(i,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(i):this.style.setProperty(i,n,r)}}function f6(i,e,r){return arguments.length>1?this.each((e==null?h6:typeof e=="function"?d6:u6)(i,e,r??"")):bh(this.node(),i)}function bh(i,e){return i.style.getPropertyValue(e)||MM(i).getComputedStyle(i,null).getPropertyValue(e)}function p6(i){return function(){delete this[i]}}function g6(i,e){return function(){this[i]=e}}function m6(i,e){return function(){var r=e.apply(this,arguments);r==null?delete this[i]:this[i]=r}}function y6(i,e){return arguments.length>1?this.each((e==null?p6:typeof e=="function"?m6:g6)(i,e)):this.node()[i]}function BM(i){return i.trim().split(/^|\s+/)}function D1(i){return i.classList||new LM(i)}function LM(i){this._node=i,this._names=BM(i.getAttribute("class")||"")}LM.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function OM(i,e){for(var r=D1(i),n=-1,a=e.length;++n<a;)r.add(e[n])}function RM(i,e){for(var r=D1(i),n=-1,a=e.length;++n<a;)r.remove(e[n])}function b6(i){return function(){OM(this,i)}}function x6(i){return function(){RM(this,i)}}function v6(i,e){return function(){(e.apply(this,arguments)?OM:RM)(this,i)}}function C6(i,e){var r=BM(i+"");if(arguments.length<2){for(var n=D1(this.node()),a=-1,o=r.length;++a<o;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?v6:e?b6:x6)(r,e))}function _6(){this.textContent=""}function k6(i){return function(){this.textContent=i}}function w6(i){return function(){var e=i.apply(this,arguments);this.textContent=e??""}}function S6(i){return arguments.length?this.each(i==null?_6:(typeof i=="function"?w6:k6)(i)):this.node().textContent}function T6(){this.innerHTML=""}function E6(i){return function(){this.innerHTML=i}}function N6(i){return function(){var e=i.apply(this,arguments);this.innerHTML=e??""}}function A6(i){return arguments.length?this.each(i==null?T6:(typeof i=="function"?N6:E6)(i)):this.node().innerHTML}function M6(){this.nextSibling&&this.parentNode.appendChild(this)}function B6(){return this.each(M6)}function L6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function O6(){return this.each(L6)}function R6(i){var e=typeof i=="function"?i:SM(i);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function j6(){return null}function D6(i,e){var r=typeof i=="function"?i:SM(i),n=e==null?j6:typeof e=="function"?e:j1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function F6(){var i=this.parentNode;i&&i.removeChild(this)}function I6(){return this.each(F6)}function $6(){var i=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function z6(){var i=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function P6(i){return this.select(i?z6:$6)}function q6(i){return arguments.length?this.property("__data__",i):this.node().__data__}function U6(i){return function(e){i.call(this,e,this.__data__)}}function H6(i){return i.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function W6(i){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,o;r<a;++r)o=e[r],(!i.type||o.type===i.type)&&o.name===i.name?this.removeEventListener(o.type,o.listener,o.options):e[++n]=o;++n?e.length=n:delete this.__on}}}function G6(i,e,r){return function(){var n=this.__on,a,o=U6(e);if(n){for(var c=0,h=n.length;c<h;++c)if((a=n[c]).type===i.type&&a.name===i.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=r),a.value=e;return}}this.addEventListener(i.type,o,r),a={type:i.type,name:i.name,value:e,listener:o,options:r},n?n.push(a):this.__on=[a]}}function Y6(i,e,r){var n=H6(i+""),a,o=n.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var u=0,d=h.length,f;u<d;++u)for(a=0,f=h[u];a<o;++a)if((c=n[a]).type===f.type&&c.name===f.name)return f.value}return}for(h=e?G6:W6,a=0;a<o;++a)this.each(h(n[a],e,r));return this}function jM(i,e,r){var n=MM(i),a=n.CustomEvent;typeof a=="function"?a=new a(e,r):(a=n.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),i.dispatchEvent(a)}function K6(i,e){return function(){return jM(this,i,e)}}function V6(i,e){return function(){return jM(this,i,e.apply(this,arguments))}}function X6(i,e){return this.each((typeof e=="function"?V6:K6)(i,e))}function*Z6(){for(var i=this._groups,e=0,r=i.length;e<r;++e)for(var n=i[e],a=0,o=n.length,c;a<o;++a)(c=n[a])&&(yield c)}var DM=[null];function Fn(i,e){this._groups=i,this._parents=e}function zd(){return new Fn([[document.documentElement]],DM)}function Q6(){return this}Fn.prototype=zd.prototype={constructor:Fn,select:w$,selectAll:N$,selectChild:L$,selectChildren:D$,filter:F$,data:U$,enter:I$,exit:W$,join:G$,merge:Y$,selection:Q6,order:K$,sort:V$,call:Z$,nodes:Q$,node:J$,size:t6,empty:e6,each:i6,attr:c6,style:f6,property:y6,classed:C6,text:S6,html:A6,raise:B6,lower:O6,append:R6,insert:D6,remove:I6,clone:P6,datum:q6,on:Y6,dispatch:X6,[Symbol.iterator]:Z6};function ke(i){return typeof i=="string"?new Fn([[document.querySelector(i)]],[document.documentElement]):new Fn([[i]],DM)}function J6(i){let e;for(;e=i.sourceEvent;)i=e;return i}function $a(i,e){if(i=J6(i),e===void 0&&(e=i.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=i.clientX,n.y=i.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[i.clientX-a.left-e.clientLeft,i.clientY-a.top-e.clientTop]}}return[i.pageX,i.pageY]}var tz={value:()=>{}};function Pd(){for(var i=0,e=arguments.length,r={},n;i<e;++i){if(!(n=arguments[i]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Wp(r)}function Wp(i){this._=i}function ez(i,e){return i.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");if(a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Wp.prototype=Pd.prototype={constructor:Wp,on:function(i,e){var r=this._,n=ez(i+"",r),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(i=n[o]).type)&&(a=iz(r[a],i.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<c;)if(a=(i=n[o]).type)r[a]=y2(r[a],i.name,e);else if(e==null)for(a in r)r[a]=y2(r[a],i.name,null);return this},copy:function(){var i={},e=this._;for(var r in e)i[r]=e[r].slice();return new Wp(i)},call:function(i,e){if((a=arguments.length-2)>0)for(var r=new Array(a),n=0,a,o;n<a;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(o=this._[i],n=0,a=o.length;n<a;++n)o[n].value.apply(e,r)},apply:function(i,e,r){if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(var n=this._[i],a=0,o=n.length;a<o;++a)n[a].value.apply(e,r)}};function iz(i,e){for(var r=0,n=i.length,a;r<n;++r)if((a=i[r]).name===e)return a.value}function y2(i,e,r){for(var n=0,a=i.length;n<a;++n)if(i[n].name===e){i[n]=tz,i=i.slice(0,n).concat(i.slice(n+1));break}return r!=null&&i.push({name:e,value:r}),i}const rz={passive:!1},bd={capture:!0,passive:!1};function Gb(i){i.stopImmediatePropagation()}function qc(i){i.preventDefault(),i.stopImmediatePropagation()}function FM(i){var e=i.document.documentElement,r=ke(i).on("dragstart.drag",qc,bd);"onselectstart"in e?r.on("selectstart.drag",qc,bd):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function IM(i,e){var r=i.document.documentElement,n=ke(i).on("dragstart.drag",null);e&&(n.on("click.drag",qc,bd),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const gp=i=>()=>i;function Zx(i,{sourceEvent:e,subject:r,target:n,identifier:a,active:o,x:c,y:h,dx:u,dy:d,dispatch:f}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:f}})}Zx.prototype.on=function(){var i=this._.on.apply(this._,arguments);return i===this._?this:i};function nz(i){return!i.ctrlKey&&!i.button}function az(){return this.parentNode}function sz(i,e){return e??{x:i.x,y:i.y}}function oz(){return navigator.maxTouchPoints||"ontouchstart"in this}function lz(){var i=nz,e=az,r=sz,n=oz,a={},o=Pd("start","drag","end"),c=0,h,u,d,f,g=0;function x(E){E.on("mousedown.drag",y).filter(n).on("touchstart.drag",_).on("touchmove.drag",k,rz).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(E,B){if(!(f||!i.call(this,E,B))){var O=N(this,e.call(this,E,B),E,B,"mouse");O&&(ke(E.view).on("mousemove.drag",v,bd).on("mouseup.drag",C,bd),FM(E.view),Gb(E),d=!1,h=E.clientX,u=E.clientY,O("start",E))}}function v(E){if(qc(E),!d){var B=E.clientX-h,O=E.clientY-u;d=B*B+O*O>g}a.mouse("drag",E)}function C(E){ke(E.view).on("mousemove.drag mouseup.drag",null),IM(E.view,d),qc(E),a.mouse("end",E)}function _(E,B){if(i.call(this,E,B)){var O=E.changedTouches,A=e.call(this,E,B),M=O.length,I,D;for(I=0;I<M;++I)(D=N(this,A,E,B,O[I].identifier,O[I]))&&(Gb(E),D("start",E,O[I]))}}function k(E){var B=E.changedTouches,O=B.length,A,M;for(A=0;A<O;++A)(M=a[B[A].identifier])&&(qc(E),M("drag",E,B[A]))}function T(E){var B=E.changedTouches,O=B.length,A,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<O;++A)(M=a[B[A].identifier])&&(Gb(E),M("end",E,B[A]))}function N(E,B,O,A,M,I){var D=o.copy(),F=$a(I||O,B),U,K,z;if((z=r.call(E,new Zx("beforestart",{sourceEvent:O,target:x,identifier:M,active:c,x:F[0],y:F[1],dx:0,dy:0,dispatch:D}),A))!=null)return U=z.x-F[0]||0,K=z.y-F[1]||0,function W(j,H,Y){var Z=F,rt;switch(j){case"start":a[M]=W,rt=c++;break;case"end":delete a[M],--c;case"drag":F=$a(Y||H,B),rt=c;break}D.call(j,E,new Zx(j,{sourceEvent:H,subject:z,target:x,identifier:M,active:rt,x:F[0]+U,y:F[1]+K,dx:F[0]-Z[0],dy:F[1]-Z[1],dispatch:D}),A)}}return x.filter=function(E){return arguments.length?(i=typeof E=="function"?E:gp(!!E),x):i},x.container=function(E){return arguments.length?(e=typeof E=="function"?E:gp(E),x):e},x.subject=function(E){return arguments.length?(r=typeof E=="function"?E:gp(E),x):r},x.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:gp(!!E),x):n},x.on=function(){var E=o.on.apply(o,arguments);return E===o?x:E},x.clickDistance=function(E){return arguments.length?(g=(E=+E)*E,x):Math.sqrt(g)},x}function F1(i,e,r){i.prototype=e.prototype=r,r.constructor=i}function $M(i,e){var r=Object.create(i.prototype);for(var n in e)r[n]=e[n];return r}function qd(){}var xd=.7,hg=1/xd,Uc="\\s*([+-]?\\d+)\\s*",vd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cz=/^#([0-9a-f]{3,8})$/,hz=new RegExp(`^rgb\\(${Uc},${Uc},${Uc}\\)$`),uz=new RegExp(`^rgb\\(${Wa},${Wa},${Wa}\\)$`),dz=new RegExp(`^rgba\\(${Uc},${Uc},${Uc},${vd}\\)$`),fz=new RegExp(`^rgba\\(${Wa},${Wa},${Wa},${vd}\\)$`),pz=new RegExp(`^hsl\\(${vd},${Wa},${Wa}\\)$`),gz=new RegExp(`^hsla\\(${vd},${Wa},${Wa},${vd}\\)$`),b2={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};F1(qd,Cd,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:x2,formatHex:x2,formatHex8:mz,formatHsl:yz,formatRgb:v2,toString:v2});function x2(){return this.rgb().formatHex()}function mz(){return this.rgb().formatHex8()}function yz(){return zM(this).formatHsl()}function v2(){return this.rgb().formatRgb()}function Cd(i){var e,r;return i=(i+"").trim().toLowerCase(),(e=cz.exec(i))?(r=e[1].length,e=parseInt(e[1],16),r===6?C2(e):r===3?new Cn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?mp(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?mp(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=hz.exec(i))?new Cn(e[1],e[2],e[3],1):(e=uz.exec(i))?new Cn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=dz.exec(i))?mp(e[1],e[2],e[3],e[4]):(e=fz.exec(i))?mp(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=pz.exec(i))?w2(e[1],e[2]/100,e[3]/100,1):(e=gz.exec(i))?w2(e[1],e[2]/100,e[3]/100,e[4]):b2.hasOwnProperty(i)?C2(b2[i]):i==="transparent"?new Cn(NaN,NaN,NaN,0):null}function C2(i){return new Cn(i>>16&255,i>>8&255,i&255,1)}function mp(i,e,r,n){return n<=0&&(i=e=r=NaN),new Cn(i,e,r,n)}function bz(i){return i instanceof qd||(i=Cd(i)),i?(i=i.rgb(),new Cn(i.r,i.g,i.b,i.opacity)):new Cn}function Qx(i,e,r,n){return arguments.length===1?bz(i):new Cn(i,e,r,n??1)}function Cn(i,e,r,n){this.r=+i,this.g=+e,this.b=+r,this.opacity=+n}F1(Cn,Qx,$M(qd,{brighter(i){return i=i==null?hg:Math.pow(hg,i),new Cn(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?xd:Math.pow(xd,i),new Cn(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Cn(Ml(this.r),Ml(this.g),Ml(this.b),ug(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:_2,formatHex:_2,formatHex8:xz,formatRgb:k2,toString:k2}));function _2(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}`}function xz(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}${yl((isNaN(this.opacity)?1:this.opacity)*255)}`}function k2(){const i=ug(this.opacity);return`${i===1?"rgb(":"rgba("}${Ml(this.r)}, ${Ml(this.g)}, ${Ml(this.b)}${i===1?")":`, ${i})`}`}function ug(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function Ml(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function yl(i){return i=Ml(i),(i<16?"0":"")+i.toString(16)}function w2(i,e,r,n){return n<=0?i=e=r=NaN:r<=0||r>=1?i=e=NaN:e<=0&&(i=NaN),new ya(i,e,r,n)}function zM(i){if(i instanceof ya)return new ya(i.h,i.s,i.l,i.opacity);if(i instanceof qd||(i=Cd(i)),!i)return new ya;if(i instanceof ya)return i;i=i.rgb();var e=i.r/255,r=i.g/255,n=i.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),c=NaN,h=o-a,u=(o+a)/2;return h?(e===o?c=(r-n)/h+(r<n)*6:r===o?c=(n-e)/h+2:c=(e-r)/h+4,h/=u<.5?o+a:2-o-a,c*=60):h=u>0&&u<1?0:c,new ya(c,h,u,i.opacity)}function vz(i,e,r,n){return arguments.length===1?zM(i):new ya(i,e,r,n??1)}function ya(i,e,r,n){this.h=+i,this.s=+e,this.l=+r,this.opacity=+n}F1(ya,vz,$M(qd,{brighter(i){return i=i==null?hg:Math.pow(hg,i),new ya(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?xd:Math.pow(xd,i),new ya(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new Cn(Yb(i>=240?i-240:i+120,a,n),Yb(i,a,n),Yb(i<120?i+240:i-120,a,n),this.opacity)},clamp(){return new ya(S2(this.h),yp(this.s),yp(this.l),ug(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 i=ug(this.opacity);return`${i===1?"hsl(":"hsla("}${S2(this.h)}, ${yp(this.s)*100}%, ${yp(this.l)*100}%${i===1?")":`, ${i})`}`}}));function S2(i){return i=(i||0)%360,i<0?i+360:i}function yp(i){return Math.max(0,Math.min(1,i||0))}function Yb(i,e,r){return(i<60?e+(r-e)*i/60:i<180?r:i<240?e+(r-e)*(240-i)/60:e)*255}const I1=i=>()=>i;function PM(i,e){return function(r){return i+r*e}}function Cz(i,e,r){return i=Math.pow(i,r),e=Math.pow(e,r)-i,r=1/r,function(n){return Math.pow(i+n*e,r)}}function tlt(i,e){var r=e-i;return r?PM(i,r>180||r<-180?r-360*Math.round(r/360):r):I1(isNaN(i)?e:i)}function _z(i){return(i=+i)==1?qM:function(e,r){return r-e?Cz(e,r,i):I1(isNaN(e)?r:e)}}function qM(i,e){var r=e-i;return r?PM(i,r):I1(isNaN(i)?e:i)}const T2=(function i(e){var r=_z(e);function n(a,o){var c=r((a=Qx(a)).r,(o=Qx(o)).r),h=r(a.g,o.g),u=r(a.b,o.b),d=qM(a.opacity,o.opacity);return function(f){return a.r=c(f),a.g=h(f),a.b=u(f),a.opacity=d(f),a+""}}return n.gamma=i,n})(1);function xo(i,e){return i=+i,e=+e,function(r){return i*(1-r)+e*r}}var Jx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Kb=new RegExp(Jx.source,"g");function kz(i){return function(){return i}}function wz(i){return function(e){return i(e)+""}}function Sz(i,e){var r=Jx.lastIndex=Kb.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(i=i+"",e=e+"";(n=Jx.exec(i))&&(a=Kb.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),h[c]?h[c]+=o:h[++c]=o),(n=n[0])===(a=a[0])?h[c]?h[c]+=a:h[++c]=a:(h[++c]=null,u.push({i:c,x:xo(n,a)})),r=Kb.lastIndex;return r<e.length&&(o=e.slice(r),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?wz(u[0].x):kz(e):(e=u.length,function(d){for(var f=0,g;f<e;++f)h[(g=u[f]).i]=g.x(d);return h.join("")})}var E2=180/Math.PI,tv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function UM(i,e,r,n,a,o){var c,h,u;return(c=Math.sqrt(i*i+e*e))&&(i/=c,e/=c),(u=i*r+e*n)&&(r-=i*u,n-=e*u),(h=Math.sqrt(r*r+n*n))&&(r/=h,n/=h,u/=h),i*n<e*r&&(i=-i,e=-e,u=-u,c=-c),{translateX:a,translateY:o,rotate:Math.atan2(e,i)*E2,skewX:Math.atan(u)*E2,scaleX:c,scaleY:h}}var bp;function Tz(i){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return e.isIdentity?tv:UM(e.a,e.b,e.c,e.d,e.e,e.f)}function Ez(i){return i==null||(bp||(bp=document.createElementNS("http://www.w3.org/2000/svg","g")),bp.setAttribute("transform",i),!(i=bp.transform.baseVal.consolidate()))?tv:(i=i.matrix,UM(i.a,i.b,i.c,i.d,i.e,i.f))}function HM(i,e,r,n){function a(d){return d.length?d.pop()+" ":""}function o(d,f,g,x,y,v){if(d!==g||f!==x){var C=y.push("translate(",null,e,null,r);v.push({i:C-4,x:xo(d,g)},{i:C-2,x:xo(f,x)})}else(g||x)&&y.push("translate("+g+e+x+r)}function c(d,f,g,x){d!==f?(d-f>180?f+=360:f-d>180&&(d+=360),x.push({i:g.push(a(g)+"rotate(",null,n)-2,x:xo(d,f)})):f&&g.push(a(g)+"rotate("+f+n)}function h(d,f,g,x){d!==f?x.push({i:g.push(a(g)+"skewX(",null,n)-2,x:xo(d,f)}):f&&g.push(a(g)+"skewX("+f+n)}function u(d,f,g,x,y,v){if(d!==g||f!==x){var C=y.push(a(y)+"scale(",null,",",null,")");v.push({i:C-4,x:xo(d,g)},{i:C-2,x:xo(f,x)})}else(g!==1||x!==1)&&y.push(a(y)+"scale("+g+","+x+")")}return function(d,f){var g=[],x=[];return d=i(d),f=i(f),o(d.translateX,d.translateY,f.translateX,f.translateY,g,x),c(d.rotate,f.rotate,g,x),h(d.skewX,f.skewX,g,x),u(d.scaleX,d.scaleY,f.scaleX,f.scaleY,g,x),d=f=null,function(y){for(var v=-1,C=x.length,_;++v<C;)g[(_=x[v]).i]=_.x(y);return g.join("")}}}var Nz=HM(Tz,"px, ","px)","deg)"),Az=HM(Ez,", ",")",")"),Mz=1e-12;function N2(i){return((i=Math.exp(i))+1/i)/2}function Bz(i){return((i=Math.exp(i))-1/i)/2}function Lz(i){return((i=Math.exp(2*i))-1)/(i+1)}const Oz=(function i(e,r,n){function a(o,c){var h=o[0],u=o[1],d=o[2],f=c[0],g=c[1],x=c[2],y=f-h,v=g-u,C=y*y+v*v,_,k;if(C<Mz)k=Math.log(x/d)/e,_=function(A){return[h+A*y,u+A*v,d*Math.exp(e*A*k)]};else{var T=Math.sqrt(C),N=(x*x-d*d+n*C)/(2*d*r*T),E=(x*x-d*d-n*C)/(2*x*r*T),B=Math.log(Math.sqrt(N*N+1)-N),O=Math.log(Math.sqrt(E*E+1)-E);k=(O-B)/e,_=function(A){var M=A*k,I=N2(B),D=d/(r*T)*(I*Lz(e*M+B)-Bz(B));return[h+D*y,u+D*v,d*I/N2(e*M+B)]}}return _.duration=k*1e3*e/Math.SQRT2,_}return a.rho=function(o){var c=Math.max(.001,+o),h=c*c,u=h*h;return i(c,h,u)},a})(Math.SQRT2,2,4);var xh=0,Ku=0,_u=0,WM=1e3,dg,Vu,fg=0,jl=0,am=0,_d=typeof performance=="object"&&performance.now?performance:Date,GM=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function $1(){return jl||(GM(Rz),jl=_d.now()+am)}function Rz(){jl=0}function pg(){this._call=this._time=this._next=null}pg.prototype=z1.prototype={constructor:pg,restart:function(i,e,r){if(typeof i!="function")throw new TypeError("callback is not a function");r=(r==null?$1():+r)+(e==null?0:+e),!this._next&&Vu!==this&&(Vu?Vu._next=this:dg=this,Vu=this),this._call=i,this._time=r,ev()},stop:function(){this._call&&(this._call=null,this._time=1/0,ev())}};function z1(i,e,r){var n=new pg;return n.restart(i,e,r),n}function jz(){$1(),++xh;for(var i=dg,e;i;)(e=jl-i._time)>=0&&i._call.call(void 0,e),i=i._next;--xh}function A2(){jl=(fg=_d.now())+am,xh=Ku=0;try{jz()}finally{xh=0,Fz(),jl=0}}function Dz(){var i=_d.now(),e=i-fg;e>WM&&(am-=e,fg=i)}function Fz(){for(var i,e=dg,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),i=e,e=e._next):(r=e._next,e._next=null,e=i?i._next=r:dg=r);Vu=i,ev(n)}function ev(i){if(!xh){Ku&&(Ku=clearTimeout(Ku));var e=i-jl;e>24?(i<1/0&&(Ku=setTimeout(A2,i-_d.now()-am)),_u&&(_u=clearInterval(_u))):(_u||(fg=_d.now(),_u=setInterval(Dz,WM)),xh=1,GM(A2))}}function M2(i,e,r){var n=new pg;return e=e==null?0:+e,n.restart(a=>{n.stop(),i(a+e)},e,r),n}var Iz=Pd("start","end","cancel","interrupt"),$z=[],YM=0,B2=1,iv=2,Gp=3,L2=4,rv=5,Yp=6;function sm(i,e,r,n,a,o){var c=i.__transition;if(!c)i.__transition={};else if(r in c)return;zz(i,r,{name:e,index:n,group:a,on:Iz,tween:$z,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:YM})}function P1(i,e){var r=wa(i,e);if(r.state>YM)throw new Error("too late; already scheduled");return r}function Xa(i,e){var r=wa(i,e);if(r.state>Gp)throw new Error("too late; already running");return r}function wa(i,e){var r=i.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function zz(i,e,r){var n=i.__transition,a;n[e]=r,r.timer=z1(o,0,r.time);function o(d){r.state=B2,r.timer.restart(c,r.delay,r.time),r.delay<=d&&c(d-r.delay)}function c(d){var f,g,x,y;if(r.state!==B2)return u();for(f in n)if(y=n[f],y.name===r.name){if(y.state===Gp)return M2(c);y.state===L2?(y.state=Yp,y.timer.stop(),y.on.call("interrupt",i,i.__data__,y.index,y.group),delete n[f]):+f<e&&(y.state=Yp,y.timer.stop(),y.on.call("cancel",i,i.__data__,y.index,y.group),delete n[f])}if(M2(function(){r.state===Gp&&(r.state=L2,r.timer.restart(h,r.delay,r.time),h(d))}),r.state=iv,r.on.call("start",i,i.__data__,r.index,r.group),r.state===iv){for(r.state=Gp,a=new Array(x=r.tween.length),f=0,g=-1;f<x;++f)(y=r.tween[f].value.call(i,i.__data__,r.index,r.group))&&(a[++g]=y);a.length=g+1}}function h(d){for(var f=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(u),r.state=rv,1),g=-1,x=a.length;++g<x;)a[g].call(i,f);r.state===rv&&(r.on.call("end",i,i.__data__,r.index,r.group),u())}function u(){r.state=Yp,r.timer.stop(),delete n[e];for(var d in n)return;delete i.__transition}}function Kp(i,e){var r=i.__transition,n,a,o=!0,c;if(r){e=e==null?null:e+"";for(c in r){if((n=r[c]).name!==e){o=!1;continue}a=n.state>iv&&n.state<rv,n.state=Yp,n.timer.stop(),n.on.call(a?"interrupt":"cancel",i,i.__data__,n.index,n.group),delete r[c]}o&&delete i.__transition}}function Pz(i){return this.each(function(){Kp(this,i)})}function qz(i,e){var r,n;return function(){var a=Xa(this,i),o=a.tween;if(o!==r){n=r=o;for(var c=0,h=n.length;c<h;++c)if(n[c].name===e){n=n.slice(),n.splice(c,1);break}}a.tween=n}}function Uz(i,e,r){var n,a;if(typeof r!="function")throw new Error;return function(){var o=Xa(this,i),c=o.tween;if(c!==n){a=(n=c).slice();for(var h={name:e,value:r},u=0,d=a.length;u<d;++u)if(a[u].name===e){a[u]=h;break}u===d&&a.push(h)}o.tween=a}}function Hz(i,e){var r=this._id;if(i+="",arguments.length<2){for(var n=wa(this.node(),r).tween,a=0,o=n.length,c;a<o;++a)if((c=n[a]).name===i)return c.value;return null}return this.each((e==null?qz:Uz)(r,i,e))}function q1(i,e,r){var n=i._id;return i.each(function(){var a=Xa(this,n);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return wa(a,n).value[e]}}function KM(i,e){var r;return(typeof e=="number"?xo:e instanceof Cd?T2:(r=Cd(e))?(e=r,T2):Sz)(i,e)}function Wz(i){return function(){this.removeAttribute(i)}}function Gz(i){return function(){this.removeAttributeNS(i.space,i.local)}}function Yz(i,e,r){var n,a=r+"",o;return function(){var c=this.getAttribute(i);return c===a?null:c===n?o:o=e(n=c,r)}}function Kz(i,e,r){var n,a=r+"",o;return function(){var c=this.getAttributeNS(i.space,i.local);return c===a?null:c===n?o:o=e(n=c,r)}}function Vz(i,e,r){var n,a,o;return function(){var c,h=r(this),u;return h==null?void this.removeAttribute(i):(c=this.getAttribute(i),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Xz(i,e,r){var n,a,o;return function(){var c,h=r(this),u;return h==null?void this.removeAttributeNS(i.space,i.local):(c=this.getAttributeNS(i.space,i.local),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Zz(i,e){var r=nm(i),n=r==="transform"?Az:KM;return this.attrTween(i,typeof e=="function"?(r.local?Xz:Vz)(r,n,q1(this,"attr."+i,e)):e==null?(r.local?Gz:Wz)(r):(r.local?Kz:Yz)(r,n,e))}function Qz(i,e){return function(r){this.setAttribute(i,e.call(this,r))}}function Jz(i,e){return function(r){this.setAttributeNS(i.space,i.local,e.call(this,r))}}function t8(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&Jz(i,o)),r}return a._value=e,a}function e8(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&Qz(i,o)),r}return a._value=e,a}function i8(i,e){var r="attr."+i;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=nm(i);return this.tween(r,(n.local?t8:e8)(n,e))}function r8(i,e){return function(){P1(this,i).delay=+e.apply(this,arguments)}}function n8(i,e){return e=+e,function(){P1(this,i).delay=e}}function a8(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?r8:n8)(e,i)):wa(this.node(),e).delay}function s8(i,e){return function(){Xa(this,i).duration=+e.apply(this,arguments)}}function o8(i,e){return e=+e,function(){Xa(this,i).duration=e}}function l8(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?s8:o8)(e,i)):wa(this.node(),e).duration}function c8(i,e){if(typeof e!="function")throw new Error;return function(){Xa(this,i).ease=e}}function h8(i){var e=this._id;return arguments.length?this.each(c8(e,i)):wa(this.node(),e).ease}function u8(i,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Xa(this,i).ease=r}}function d8(i){if(typeof i!="function")throw new Error;return this.each(u8(this._id,i))}function f8(i){typeof i!="function"&&(i=EM(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&i.call(u,u.__data__,d,o)&&h.push(u);return new js(n,this._parents,this._name,this._id)}function p8(i){if(i._id!==this._id)throw new Error;for(var e=this._groups,r=i._groups,n=e.length,a=r.length,o=Math.min(n,a),c=new Array(n),h=0;h<o;++h)for(var u=e[h],d=r[h],f=u.length,g=c[h]=new Array(f),x,y=0;y<f;++y)(x=u[y]||d[y])&&(g[y]=x);for(;h<n;++h)c[h]=e[h];return new js(c,this._parents,this._name,this._id)}function g8(i){return(i+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function m8(i,e,r){var n,a,o=g8(e)?P1:Xa;return function(){var c=o(this,i),h=c.on;h!==n&&(a=(n=h).copy()).on(e,r),c.on=a}}function y8(i,e){var r=this._id;return arguments.length<2?wa(this.node(),r).on.on(i):this.each(m8(r,i,e))}function b8(i){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==i)return;e&&e.removeChild(this)}}function x8(){return this.on("end.remove",b8(this._id))}function v8(i){var e=this._name,r=this._id;typeof i!="function"&&(i=j1(i));for(var n=this._groups,a=n.length,o=new Array(a),c=0;c<a;++c)for(var h=n[c],u=h.length,d=o[c]=new Array(u),f,g,x=0;x<u;++x)(f=h[x])&&(g=i.call(f,f.__data__,x,h))&&("__data__"in f&&(g.__data__=f.__data__),d[x]=g,sm(d[x],e,r,x,d,wa(f,r)));return new js(o,this._parents,e,r)}function C8(i){var e=this._name,r=this._id;typeof i!="function"&&(i=TM(i));for(var n=this._groups,a=n.length,o=[],c=[],h=0;h<a;++h)for(var u=n[h],d=u.length,f,g=0;g<d;++g)if(f=u[g]){for(var x=i.call(f,f.__data__,g,u),y,v=wa(f,r),C=0,_=x.length;C<_;++C)(y=x[C])&&sm(y,e,r,C,x,v);o.push(x),c.push(f)}return new js(o,c,e,r)}var _8=zd.prototype.constructor;function k8(){return new _8(this._groups,this._parents)}function w8(i,e){var r,n,a;return function(){var o=bh(this,i),c=(this.style.removeProperty(i),bh(this,i));return o===c?null:o===r&&c===n?a:a=e(r=o,n=c)}}function VM(i){return function(){this.style.removeProperty(i)}}function S8(i,e,r){var n,a=r+"",o;return function(){var c=bh(this,i);return c===a?null:c===n?o:o=e(n=c,r)}}function T8(i,e,r){var n,a,o;return function(){var c=bh(this,i),h=r(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(i),bh(this,i))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function E8(i,e){var r,n,a,o="style."+e,c="end."+o,h;return function(){var u=Xa(this,i),d=u.on,f=u.value[o]==null?h||(h=VM(e)):void 0;(d!==r||a!==f)&&(n=(r=d).copy()).on(c,a=f),u.on=n}}function N8(i,e,r){var n=(i+="")=="transform"?Nz:KM;return e==null?this.styleTween(i,w8(i,n)).on("end.style."+i,VM(i)):typeof e=="function"?this.styleTween(i,T8(i,n,q1(this,"style."+i,e))).each(E8(this._id,i)):this.styleTween(i,S8(i,n,e),r).on("end.style."+i,null)}function A8(i,e,r){return function(n){this.style.setProperty(i,e.call(this,n),r)}}function M8(i,e,r){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&A8(i,c,r)),n}return o._value=e,o}function B8(i,e,r){var n="style."+(i+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,M8(i,e,r??""))}function L8(i){return function(){this.textContent=i}}function O8(i){return function(){var e=i(this);this.textContent=e??""}}function R8(i){return this.tween("text",typeof i=="function"?O8(q1(this,"text",i)):L8(i==null?"":i+""))}function j8(i){return function(e){this.textContent=i.call(this,e)}}function D8(i){var e,r;function n(){var a=i.apply(this,arguments);return a!==r&&(e=(r=a)&&j8(a)),e}return n._value=i,n}function F8(i){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(i==null)return this.tween(e,null);if(typeof i!="function")throw new Error;return this.tween(e,D8(i))}function I8(){for(var i=this._name,e=this._id,r=XM(),n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,d=0;d<h;++d)if(u=c[d]){var f=wa(u,e);sm(u,i,r,d,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new js(n,this._parents,i,r)}function $8(){var i,e,r=this,n=r._id,a=r.size();return new Promise(function(o,c){var h={value:c},u={value:function(){--a===0&&o()}};r.each(function(){var d=Xa(this,n),f=d.on;f!==i&&(e=(i=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(u)),d.on=e}),a===0&&o()})}var z8=0;function js(i,e,r,n){this._groups=i,this._parents=e,this._name=r,this._id=n}function XM(){return++z8}var ms=zd.prototype;js.prototype={constructor:js,select:v8,selectAll:C8,selectChild:ms.selectChild,selectChildren:ms.selectChildren,filter:f8,merge:p8,selection:k8,transition:I8,call:ms.call,nodes:ms.nodes,node:ms.node,size:ms.size,empty:ms.empty,each:ms.each,on:y8,attr:Zz,attrTween:i8,style:N8,styleTween:B8,text:R8,textTween:F8,remove:x8,tween:Hz,delay:a8,duration:l8,ease:h8,easeVarying:d8,end:$8,[Symbol.iterator]:ms[Symbol.iterator]};function P8(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var q8={time:null,delay:0,duration:250,ease:P8};function U8(i,e){for(var r;!(r=i.__transition)||!(r=r[e]);)if(!(i=i.parentNode))throw new Error(`transition ${e} not found`);return r}function H8(i){var e,r;i instanceof js?(e=i._id,i=i._name):(e=XM(),(r=q8).time=$1(),i=i==null?null:i+"");for(var n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,d=0;d<h;++d)(u=c[d])&&sm(u,i,e,d,c,r||U8(u,e));return new js(n,this._parents,i,e)}zd.prototype.interrupt=Pz;zd.prototype.transition=H8;const xp=i=>()=>i;function W8(i,{sourceEvent:e,target:r,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function Ns(i,e,r){this.k=i,this.x=e,this.y=r}Ns.prototype={constructor:Ns,scale:function(i){return i===1?this:new Ns(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new Ns(this.k,this.x+this.k*i,this.y+this.k*e)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var U1=new Ns(1,0,0);Fa.prototype=Ns.prototype;function Fa(i){for(;!i.__zoom;)if(!(i=i.parentNode))return U1;return i.__zoom}function Vb(i){i.stopImmediatePropagation()}function ku(i){i.preventDefault(),i.stopImmediatePropagation()}function G8(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function Y8(){var i=this;return i instanceof SVGElement?(i=i.ownerSVGElement||i,i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]):[[0,0],[i.clientWidth,i.clientHeight]]}function O2(){return this.__zoom||U1}function K8(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function V8(){return navigator.maxTouchPoints||"ontouchstart"in this}function X8(i,e,r){var n=i.invertX(e[0][0])-r[0][0],a=i.invertX(e[1][0])-r[1][0],o=i.invertY(e[0][1])-r[0][1],c=i.invertY(e[1][1])-r[1][1];return i.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c))}function Z8(){var i=G8,e=Y8,r=X8,n=K8,a=V8,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=Oz,d=Pd("start","zoom","end"),f,g,x,y=500,v=150,C=0,_=10;function k(z){z.property("__zoom",O2).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",D).filter(a).on("touchstart.zoom",F).on("touchmove.zoom",U).on("touchend.zoom touchcancel.zoom",K).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(z,W,j,H){var Y=z.selection?z.selection():z;Y.property("__zoom",O2),z!==Y?B(z,W,j,H):Y.interrupt().each(function(){O(this,arguments).event(H).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},k.scaleBy=function(z,W,j,H){k.scaleTo(z,function(){var Y=this.__zoom.k,Z=typeof W=="function"?W.apply(this,arguments):W;return Y*Z},j,H)},k.scaleTo=function(z,W,j,H){k.transform(z,function(){var Y=e.apply(this,arguments),Z=this.__zoom,rt=j==null?E(Y):typeof j=="function"?j.apply(this,arguments):j,G=Z.invert(rt),tt=typeof W=="function"?W.apply(this,arguments):W;return r(N(T(Z,tt),rt,G),Y,c)},j,H)},k.translateBy=function(z,W,j,H){k.transform(z,function(){return r(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof j=="function"?j.apply(this,arguments):j),e.apply(this,arguments),c)},null,H)},k.translateTo=function(z,W,j,H,Y){k.transform(z,function(){var Z=e.apply(this,arguments),rt=this.__zoom,G=H==null?E(Z):typeof H=="function"?H.apply(this,arguments):H;return r(U1.translate(G[0],G[1]).scale(rt.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof j=="function"?-j.apply(this,arguments):-j),Z,c)},H,Y)};function T(z,W){return W=Math.max(o[0],Math.min(o[1],W)),W===z.k?z:new Ns(W,z.x,z.y)}function N(z,W,j){var H=W[0]-j[0]*z.k,Y=W[1]-j[1]*z.k;return H===z.x&&Y===z.y?z:new Ns(z.k,H,Y)}function E(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function B(z,W,j,H){z.on("start.zoom",function(){O(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(H).end()}).tween("zoom",function(){var Y=this,Z=arguments,rt=O(Y,Z).event(H),G=e.apply(Y,Z),tt=j==null?E(G):typeof j=="function"?j.apply(Y,Z):j,ft=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),ct=Y.__zoom,vt=typeof W=="function"?W.apply(Y,Z):W,ot=u(ct.invert(tt).concat(ft/ct.k),vt.invert(tt).concat(ft/vt.k));return function(wt){if(wt===1)wt=vt;else{var it=ot(wt),V=ft/it[2];wt=new Ns(V,tt[0]-it[0]*V,tt[1]-it[1]*V)}rt.zoom(null,wt)}})}function O(z,W,j){return!j&&z.__zooming||new A(z,W)}function A(z,W){this.that=z,this.args=W,this.active=0,this.sourceEvent=null,this.extent=e.apply(z,W),this.taps=0}A.prototype={event:function(z){return z&&(this.sourceEvent=z),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(z,W){return this.mouse&&z!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&z!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&z!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(z){var W=ke(this.that).datum();d.call(z,this.that,new W8(z,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),W)}};function M(z,...W){if(!i.apply(this,arguments))return;var j=O(this,W).event(z),H=this.__zoom,Y=Math.max(o[0],Math.min(o[1],H.k*Math.pow(2,n.apply(this,arguments)))),Z=$a(z);if(j.wheel)(j.mouse[0][0]!==Z[0]||j.mouse[0][1]!==Z[1])&&(j.mouse[1]=H.invert(j.mouse[0]=Z)),clearTimeout(j.wheel);else{if(H.k===Y)return;j.mouse=[Z,H.invert(Z)],Kp(this),j.start()}ku(z),j.wheel=setTimeout(rt,v),j.zoom("mouse",r(N(T(H,Y),j.mouse[0],j.mouse[1]),j.extent,c));function rt(){j.wheel=null,j.end()}}function I(z,...W){if(x||!i.apply(this,arguments))return;var j=z.currentTarget,H=O(this,W,!0).event(z),Y=ke(z.view).on("mousemove.zoom",tt,!0).on("mouseup.zoom",ft,!0),Z=$a(z,j),rt=z.clientX,G=z.clientY;FM(z.view),Vb(z),H.mouse=[Z,this.__zoom.invert(Z)],Kp(this),H.start();function tt(ct){if(ku(ct),!H.moved){var vt=ct.clientX-rt,ot=ct.clientY-G;H.moved=vt*vt+ot*ot>C}H.event(ct).zoom("mouse",r(N(H.that.__zoom,H.mouse[0]=$a(ct,j),H.mouse[1]),H.extent,c))}function ft(ct){Y.on("mousemove.zoom mouseup.zoom",null),IM(ct.view,H.moved),ku(ct),H.event(ct).end()}}function D(z,...W){if(i.apply(this,arguments)){var j=this.__zoom,H=$a(z.changedTouches?z.changedTouches[0]:z,this),Y=j.invert(H),Z=j.k*(z.shiftKey?.5:2),rt=r(N(T(j,Z),H,Y),e.apply(this,W),c);ku(z),h>0?ke(this).transition().duration(h).call(B,rt,H,z):ke(this).call(k.transform,rt,H,z)}}function F(z,...W){if(i.apply(this,arguments)){var j=z.touches,H=j.length,Y=O(this,W,z.changedTouches.length===H).event(z),Z,rt,G,tt;for(Vb(z),rt=0;rt<H;++rt)G=j[rt],tt=$a(G,this),tt=[tt,this.__zoom.invert(tt),G.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==tt[2]&&(Y.touch1=tt,Y.taps=0):(Y.touch0=tt,Z=!0,Y.taps=1+!!f);f&&(f=clearTimeout(f)),Z&&(Y.taps<2&&(g=tt[0],f=setTimeout(function(){f=null},y)),Kp(this),Y.start())}}function U(z,...W){if(this.__zooming){var j=O(this,W).event(z),H=z.changedTouches,Y=H.length,Z,rt,G,tt;for(ku(z),Z=0;Z<Y;++Z)rt=H[Z],G=$a(rt,this),j.touch0&&j.touch0[2]===rt.identifier?j.touch0[0]=G:j.touch1&&j.touch1[2]===rt.identifier&&(j.touch1[0]=G);if(rt=j.that.__zoom,j.touch1){var ft=j.touch0[0],ct=j.touch0[1],vt=j.touch1[0],ot=j.touch1[1],wt=(wt=vt[0]-ft[0])*wt+(wt=vt[1]-ft[1])*wt,it=(it=ot[0]-ct[0])*it+(it=ot[1]-ct[1])*it;rt=T(rt,Math.sqrt(wt/it)),G=[(ft[0]+vt[0])/2,(ft[1]+vt[1])/2],tt=[(ct[0]+ot[0])/2,(ct[1]+ot[1])/2]}else if(j.touch0)G=j.touch0[0],tt=j.touch0[1];else return;j.zoom("touch",r(N(rt,G,tt),j.extent,c))}}function K(z,...W){if(this.__zooming){var j=O(this,W).event(z),H=z.changedTouches,Y=H.length,Z,rt;for(Vb(z),x&&clearTimeout(x),x=setTimeout(function(){x=null},y),Z=0;Z<Y;++Z)rt=H[Z],j.touch0&&j.touch0[2]===rt.identifier?delete j.touch0:j.touch1&&j.touch1[2]===rt.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&(rt=$a(rt,this),Math.hypot(g[0]-rt[0],g[1]-rt[1])<_)){var G=ke(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return k.wheelDelta=function(z){return arguments.length?(n=typeof z=="function"?z:xp(+z),k):n},k.filter=function(z){return arguments.length?(i=typeof z=="function"?z:xp(!!z),k):i},k.touchable=function(z){return arguments.length?(a=typeof z=="function"?z:xp(!!z),k):a},k.extent=function(z){return arguments.length?(e=typeof z=="function"?z:xp([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),k):e},k.scaleExtent=function(z){return arguments.length?(o[0]=+z[0],o[1]=+z[1],k):[o[0],o[1]]},k.translateExtent=function(z){return arguments.length?(c[0][0]=+z[0][0],c[1][0]=+z[1][0],c[0][1]=+z[0][1],c[1][1]=+z[1][1],k):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},k.constrain=function(z){return arguments.length?(r=z,k):r},k.duration=function(z){return arguments.length?(h=+z,k):h},k.interpolate=function(z){return arguments.length?(u=z,k):u},k.on=function(){var z=d.on.apply(d,arguments);return z===d?k:z},k.clickDistance=function(z){return arguments.length?(C=(z=+z)*z,k):Math.sqrt(C)},k.tapDistance=function(z){return arguments.length?(_=+z,k):_},k}class R2 extends Map{constructor(e,r=tP){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(j2(this,e))}has(e){return super.has(j2(this,e))}set(e,r){return super.set(Q8(this,e),r)}delete(e){return super.delete(J8(this,e))}}function j2({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):r}function Q8({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):(i.set(n,r),r)}function J8({_intern:i,_key:e},r){const n=e(r);return i.has(n)&&(r=i.get(n),i.delete(n)),r}function tP(i){return i!==null&&typeof i=="object"?i.valueOf():i}function D2(i,e){let r;if(e===void 0)for(const n of i)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of i)(a=e(a,++n,i))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function F2(i,e){let r;if(e===void 0)for(const n of i)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of i)(a=e(a,++n,i))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function eP(i,e){let r=0;for(let n of i)(n=+n)&&(r+=n);return r}var ZM=typeof global=="object"&&global&&global.Object===Object&&global,iP=typeof self=="object"&&self&&self.Object===Object&&self,Sa=ZM||iP||Function("return this")(),gg=Sa.Symbol,QM=Object.prototype,rP=QM.hasOwnProperty,nP=QM.toString,wu=gg?gg.toStringTag:void 0;function aP(i){var e=rP.call(i,wu),r=i[wu];try{i[wu]=void 0;var n=!0}catch{}var a=nP.call(i);return n&&(e?i[wu]=r:delete i[wu]),a}var sP=Object.prototype,oP=sP.toString;function lP(i){return oP.call(i)}var cP="[object Null]",hP="[object Undefined]",I2=gg?gg.toStringTag:void 0;function Gl(i){return i==null?i===void 0?hP:cP:I2&&I2 in Object(i)?aP(i):lP(i)}function Eh(i){return i!=null&&typeof i=="object"}var uP="[object Symbol]";function dP(i){return typeof i=="symbol"||Eh(i)&&Gl(i)==uP}var mg=Array.isArray,fP=/\s/;function pP(i){for(var e=i.length;e--&&fP.test(i.charAt(e)););return e}var gP=/^\s+/;function mP(i){return i&&i.slice(0,pP(i)+1).replace(gP,"")}function _a(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var $2=NaN,yP=/^[-+]0x[0-9a-f]+$/i,bP=/^0b[01]+$/i,xP=/^0o[0-7]+$/i,vP=parseInt;function z2(i){if(typeof i=="number")return i;if(dP(i))return $2;if(_a(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=_a(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=mP(i);var r=bP.test(i);return r||xP.test(i)?vP(i.slice(2),r?2:8):yP.test(i)?$2:+i}function JM(i){return i}var CP="[object AsyncFunction]",_P="[object Function]",kP="[object GeneratorFunction]",wP="[object Proxy]";function H1(i){if(!_a(i))return!1;var e=Gl(i);return e==_P||e==kP||e==CP||e==wP}var Xb=Sa["__core-js_shared__"],P2=(function(){var i=/[^.]+$/.exec(Xb&&Xb.keys&&Xb.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function SP(i){return!!P2&&P2 in i}var TP=Function.prototype,EP=TP.toString;function Yl(i){if(i!=null){try{return EP.call(i)}catch{}try{return i+""}catch{}}return""}var NP=/[\\^$.*+?()[\]{}|]/g,AP=/^\[object .+?Constructor\]$/,MP=Function.prototype,BP=Object.prototype,LP=MP.toString,OP=BP.hasOwnProperty,RP=RegExp("^"+LP.call(OP).replace(NP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jP(i){if(!_a(i)||SP(i))return!1;var e=H1(i)?RP:AP;return e.test(Yl(i))}function DP(i,e){return i==null?void 0:i[e]}function Kl(i,e){var r=DP(i,e);return jP(r)?r:void 0}var nv=Kl(Sa,"WeakMap"),q2=Object.create,FP=(function(){function i(){}return function(e){if(!_a(e))return{};if(q2)return q2(e);i.prototype=e;var r=new i;return i.prototype=void 0,r}})();function IP(i,e,r){switch(r.length){case 0:return i.call(e);case 1:return i.call(e,r[0]);case 2:return i.call(e,r[0],r[1]);case 3:return i.call(e,r[0],r[1],r[2])}return i.apply(e,r)}function $P(i,e){var r=-1,n=i.length;for(e||(e=Array(n));++r<n;)e[r]=i[r];return e}var zP=800,PP=16,qP=Date.now;function UP(i){var e=0,r=0;return function(){var n=qP(),a=PP-(n-r);if(r=n,a>0){if(++e>=zP)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}function HP(i){return function(){return i}}var yg=(function(){try{var i=Kl(Object,"defineProperty");return i({},"",{}),i}catch{}})(),WP=yg?function(i,e){return yg(i,"toString",{configurable:!0,enumerable:!1,value:HP(e),writable:!0})}:JM,GP=UP(WP),YP=9007199254740991,KP=/^(?:0|[1-9]\d*)$/;function tB(i,e){var r=typeof i;return e=e??YP,!!e&&(r=="number"||r!="symbol"&&KP.test(i))&&i>-1&&i%1==0&&i<e}function W1(i,e,r){e=="__proto__"&&yg?yg(i,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[e]=r}function om(i,e){return i===e||i!==i&&e!==e}var VP=Object.prototype,XP=VP.hasOwnProperty;function ZP(i,e,r){var n=i[e];(!(XP.call(i,e)&&om(n,r))||r===void 0&&!(e in i))&&W1(i,e,r)}function QP(i,e,r,n){var a=!r;r||(r={});for(var o=-1,c=e.length;++o<c;){var h=e[o],u=void 0;u===void 0&&(u=i[h]),a?W1(r,h,u):ZP(r,h,u)}return r}var U2=Math.max;function JP(i,e,r){return e=U2(e===void 0?i.length-1:e,0),function(){for(var n=arguments,a=-1,o=U2(n.length-e,0),c=Array(o);++a<o;)c[a]=n[e+a];a=-1;for(var h=Array(e+1);++a<e;)h[a]=n[a];return h[e]=r(c),IP(i,this,h)}}function tq(i,e){return GP(JP(i,e,JM),i+"")}var eq=9007199254740991;function eB(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=eq}function lm(i){return i!=null&&eB(i.length)&&!H1(i)}function iq(i,e,r){if(!_a(r))return!1;var n=typeof e;return(n=="number"?lm(r)&&tB(e,r.length):n=="string"&&e in r)?om(r[e],i):!1}function rq(i){return tq(function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,c=a>2?r[2]:void 0;for(o=i.length>3&&typeof o=="function"?(a--,o):void 0,c&&iq(r[0],r[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var h=r[n];h&&i(e,h,n,o)}return e})}var nq=Object.prototype;function cm(i){var e=i&&i.constructor,r=typeof e=="function"&&e.prototype||nq;return i===r}function aq(i,e){for(var r=-1,n=Array(i);++r<i;)n[r]=e(r);return n}var sq="[object Arguments]";function H2(i){return Eh(i)&&Gl(i)==sq}var iB=Object.prototype,oq=iB.hasOwnProperty,lq=iB.propertyIsEnumerable,bg=H2((function(){return arguments})())?H2:function(i){return Eh(i)&&oq.call(i,"callee")&&!lq.call(i,"callee")};function cq(){return!1}var rB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,W2=rB&&typeof module=="object"&&module&&!module.nodeType&&module,hq=W2&&W2.exports===rB,G2=hq?Sa.Buffer:void 0,uq=G2?G2.isBuffer:void 0,G1=uq||cq,dq="[object Arguments]",fq="[object Array]",pq="[object Boolean]",gq="[object Date]",mq="[object Error]",yq="[object Function]",bq="[object Map]",xq="[object Number]",vq="[object Object]",Cq="[object RegExp]",_q="[object Set]",kq="[object String]",wq="[object WeakMap]",Sq="[object ArrayBuffer]",Tq="[object DataView]",Eq="[object Float32Array]",Nq="[object Float64Array]",Aq="[object Int8Array]",Mq="[object Int16Array]",Bq="[object Int32Array]",Lq="[object Uint8Array]",Oq="[object Uint8ClampedArray]",Rq="[object Uint16Array]",jq="[object Uint32Array]",zi={};zi[Eq]=zi[Nq]=zi[Aq]=zi[Mq]=zi[Bq]=zi[Lq]=zi[Oq]=zi[Rq]=zi[jq]=!0;zi[dq]=zi[fq]=zi[Sq]=zi[pq]=zi[Tq]=zi[gq]=zi[mq]=zi[yq]=zi[bq]=zi[xq]=zi[vq]=zi[Cq]=zi[_q]=zi[kq]=zi[wq]=!1;function Dq(i){return Eh(i)&&eB(i.length)&&!!zi[Gl(i)]}function Fq(i){return function(e){return i(e)}}var nB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ad=nB&&typeof module=="object"&&module&&!module.nodeType&&module,Iq=ad&&ad.exports===nB,Zb=Iq&&ZM.process,Y2=(function(){try{var i=ad&&ad.require&&ad.require("util").types;return i||Zb&&Zb.binding&&Zb.binding("util")}catch{}})(),K2=Y2&&Y2.isTypedArray,Y1=K2?Fq(K2):Dq,$q=Object.prototype,zq=$q.hasOwnProperty;function Pq(i,e){var r=mg(i),n=!r&&bg(i),a=!r&&!n&&G1(i),o=!r&&!n&&!a&&Y1(i),c=r||n||a||o,h=c?aq(i.length,String):[],u=h.length;for(var d in i)(e||zq.call(i,d))&&!(c&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||tB(d,u)))&&h.push(d);return h}function aB(i,e){return function(r){return i(e(r))}}var qq=aB(Object.keys,Object),Uq=Object.prototype,Hq=Uq.hasOwnProperty;function Wq(i){if(!cm(i))return qq(i);var e=[];for(var r in Object(i))Hq.call(i,r)&&r!="constructor"&&e.push(r);return e}function Gq(i){var e=[];if(i!=null)for(var r in Object(i))e.push(r);return e}var Yq=Object.prototype,Kq=Yq.hasOwnProperty;function Vq(i){if(!_a(i))return Gq(i);var e=cm(i),r=[];for(var n in i)n=="constructor"&&(e||!Kq.call(i,n))||r.push(n);return r}function sB(i){return lm(i)?Pq(i,!0):Vq(i)}var kd=Kl(Object,"create");function Xq(){this.__data__=kd?kd(null):{},this.size=0}function Zq(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var Qq="__lodash_hash_undefined__",Jq=Object.prototype,t9=Jq.hasOwnProperty;function e9(i){var e=this.__data__;if(kd){var r=e[i];return r===Qq?void 0:r}return t9.call(e,i)?e[i]:void 0}var i9=Object.prototype,r9=i9.hasOwnProperty;function n9(i){var e=this.__data__;return kd?e[i]!==void 0:r9.call(e,i)}var a9="__lodash_hash_undefined__";function s9(i,e){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=kd&&e===void 0?a9:e,this}function Dl(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}Dl.prototype.clear=Xq;Dl.prototype.delete=Zq;Dl.prototype.get=e9;Dl.prototype.has=n9;Dl.prototype.set=s9;function o9(){this.__data__=[],this.size=0}function hm(i,e){for(var r=i.length;r--;)if(om(i[r][0],e))return r;return-1}var l9=Array.prototype,c9=l9.splice;function h9(i){var e=this.__data__,r=hm(e,i);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():c9.call(e,r,1),--this.size,!0}function u9(i){var e=this.__data__,r=hm(e,i);return r<0?void 0:e[r][1]}function d9(i){return hm(this.__data__,i)>-1}function f9(i,e){var r=this.__data__,n=hm(r,i);return n<0?(++this.size,r.push([i,e])):r[n][1]=e,this}function Fs(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}Fs.prototype.clear=o9;Fs.prototype.delete=h9;Fs.prototype.get=u9;Fs.prototype.has=d9;Fs.prototype.set=f9;var wd=Kl(Sa,"Map");function p9(){this.size=0,this.__data__={hash:new Dl,map:new(wd||Fs),string:new Dl}}function g9(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function um(i,e){var r=i.__data__;return g9(e)?r[typeof e=="string"?"string":"hash"]:r.map}function m9(i){var e=um(this,i).delete(i);return this.size-=e?1:0,e}function y9(i){return um(this,i).get(i)}function b9(i){return um(this,i).has(i)}function x9(i,e){var r=um(this,i),n=r.size;return r.set(i,e),this.size+=r.size==n?0:1,this}function qo(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}qo.prototype.clear=p9;qo.prototype.delete=m9;qo.prototype.get=y9;qo.prototype.has=b9;qo.prototype.set=x9;var v9="Expected a function";function Ud(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(v9);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var c=i.apply(this,n);return r.cache=o.set(a,c)||o,c};return r.cache=new(Ud.Cache||qo),r}Ud.Cache=qo;var oB=aB(Object.getPrototypeOf,Object),C9="[object Object]",_9=Function.prototype,k9=Object.prototype,lB=_9.toString,w9=k9.hasOwnProperty,S9=lB.call(Object);function T9(i){if(!Eh(i)||Gl(i)!=C9)return!1;var e=oB(i);if(e===null)return!0;var r=w9.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&lB.call(r)==S9}function E9(){this.__data__=new Fs,this.size=0}function N9(i){var e=this.__data__,r=e.delete(i);return this.size=e.size,r}function A9(i){return this.__data__.get(i)}function M9(i){return this.__data__.has(i)}var B9=200;function L9(i,e){var r=this.__data__;if(r instanceof Fs){var n=r.__data__;if(!wd||n.length<B9-1)return n.push([i,e]),this.size=++r.size,this;r=this.__data__=new qo(n)}return r.set(i,e),this.size=r.size,this}function Nh(i){var e=this.__data__=new Fs(i);this.size=e.size}Nh.prototype.clear=E9;Nh.prototype.delete=N9;Nh.prototype.get=A9;Nh.prototype.has=M9;Nh.prototype.set=L9;var cB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,V2=cB&&typeof module=="object"&&module&&!module.nodeType&&module,O9=V2&&V2.exports===cB,X2=O9?Sa.Buffer:void 0,Z2=X2?X2.allocUnsafe:void 0;function R9(i,e){if(e)return i.slice();var r=i.length,n=Z2?Z2(r):new i.constructor(r);return i.copy(n),n}var av=Kl(Sa,"DataView"),sv=Kl(Sa,"Promise"),ov=Kl(Sa,"Set"),Q2="[object Map]",j9="[object Object]",J2="[object Promise]",tT="[object Set]",eT="[object WeakMap]",iT="[object DataView]",D9=Yl(av),F9=Yl(wd),I9=Yl(sv),$9=Yl(ov),z9=Yl(nv),dl=Gl;(av&&dl(new av(new ArrayBuffer(1)))!=iT||wd&&dl(new wd)!=Q2||sv&&dl(sv.resolve())!=J2||ov&&dl(new ov)!=tT||nv&&dl(new nv)!=eT)&&(dl=function(i){var e=Gl(i),r=e==j9?i.constructor:void 0,n=r?Yl(r):"";if(n)switch(n){case D9:return iT;case F9:return Q2;case I9:return J2;case $9:return tT;case z9:return eT}return e});var rT=Sa.Uint8Array;function P9(i){var e=new i.constructor(i.byteLength);return new rT(e).set(new rT(i)),e}function q9(i,e){var r=e?P9(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}function U9(i){return typeof i.constructor=="function"&&!cm(i)?FP(oB(i)):{}}function H9(i){return function(e,r,n){for(var a=-1,o=Object(e),c=n(e),h=c.length;h--;){var u=c[++a];if(r(o[u],u,o)===!1)break}return e}}var W9=H9(),Qb=function(){return Sa.Date.now()},G9="Expected a function",Y9=Math.max,K9=Math.min;function hB(i,e,r){var n,a,o,c,h,u,d=0,f=!1,g=!1,x=!0;if(typeof i!="function")throw new TypeError(G9);e=z2(e)||0,_a(r)&&(f=!!r.leading,g="maxWait"in r,o=g?Y9(z2(r.maxWait)||0,e):o,x="trailing"in r?!!r.trailing:x);function y(O){var A=n,M=a;return n=a=void 0,d=O,c=i.apply(M,A),c}function v(O){return d=O,h=setTimeout(k,e),f?y(O):c}function C(O){var A=O-u,M=O-d,I=e-A;return g?K9(I,o-M):I}function _(O){var A=O-u,M=O-d;return u===void 0||A>=e||A<0||g&&M>=o}function k(){var O=Qb();if(_(O))return T(O);h=setTimeout(k,C(O))}function T(O){return h=void 0,x&&n?y(O):(n=a=void 0,c)}function N(){h!==void 0&&clearTimeout(h),d=0,n=u=a=h=void 0}function E(){return h===void 0?c:T(Qb())}function B(){var O=Qb(),A=_(O);if(n=arguments,a=this,u=O,A){if(h===void 0)return v(u);if(g)return clearTimeout(h),h=setTimeout(k,e),y(u)}return h===void 0&&(h=setTimeout(k,e)),c}return B.cancel=N,B.flush=E,B}function lv(i,e,r){(r!==void 0&&!om(i[e],r)||r===void 0&&!(e in i))&&W1(i,e,r)}function V9(i){return Eh(i)&&lm(i)}function cv(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}function X9(i){return QP(i,sB(i))}function Z9(i,e,r,n,a,o,c){var h=cv(i,r),u=cv(e,r),d=c.get(u);if(d){lv(i,r,d);return}var f=o?o(h,u,r+"",i,e,c):void 0,g=f===void 0;if(g){var x=mg(u),y=!x&&G1(u),v=!x&&!y&&Y1(u);f=u,x||y||v?mg(h)?f=h:V9(h)?f=$P(h):y?(g=!1,f=R9(u,!0)):v?(g=!1,f=q9(u,!0)):f=[]:T9(u)||bg(u)?(f=h,bg(h)?f=X9(h):(!_a(h)||H1(h))&&(f=U9(u))):g=!1}g&&(c.set(u,f),a(f,u,n,o,c),c.delete(u)),lv(i,r,f)}function uB(i,e,r,n,a){i!==e&&W9(e,function(o,c){if(a||(a=new Nh),_a(o))Z9(i,e,c,r,uB,n,a);else{var h=n?n(cv(i,c),o,c+"",i,e,a):void 0;h===void 0&&(h=o),lv(i,c,h)}},sB)}var Q9="[object Map]",J9="[object Set]",t7=Object.prototype,e7=t7.hasOwnProperty;function nT(i){if(i==null)return!0;if(lm(i)&&(mg(i)||typeof i=="string"||typeof i.splice=="function"||G1(i)||Y1(i)||bg(i)))return!i.length;var e=dl(i);if(e==Q9||e==J9)return!i.size;if(cm(i))return!Wq(i).length;for(var r in i)if(e7.call(i,r))return!1;return!0}var i7=rq(function(i,e,r){uB(i,e,r)}),r7="Expected a function";function n7(i,e,r){var n=!0,a=!0;if(typeof i!="function")throw new TypeError(r7);return _a(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),hB(i,e,{leading:n,maxWait:e,trailing:a})}var Bl=Object.freeze({Linear:Object.freeze({None:function(i){return i},In:function(i){return i},Out:function(i){return i},InOut:function(i){return i}}),Quadratic:Object.freeze({In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}}),Cubic:Object.freeze({In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}}),Quartic:Object.freeze({In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}}),Quintic:Object.freeze({In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}}),Sinusoidal:Object.freeze({In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}}),Exponential:Object.freeze({In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}}),Circular:Object.freeze({In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}}),Elastic:Object.freeze({In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(i){var e=1.70158;return i===1?1:i*i*((e+1)*i-e)},Out:function(i){var e=1.70158;return i===0?0:--i*i*((e+1)*i+e)+1},InOut:function(i){var e=2.5949095;return(i*=2)<1?.5*(i*i*((e+1)*i-e)):.5*((i-=2)*i*((e+1)*i+e)+2)}}),Bounce:Object.freeze({In:function(i){return 1-Bl.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?Bl.Bounce.In(i*2)*.5:Bl.Bounce.Out(i*2-1)*.5+.5}}),generatePow:function(i){return i===void 0&&(i=4),i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(e){return Math.pow(e,i)},Out:function(e){return 1-Math.pow(1-e,i)},InOut:function(e){return e<.5?Math.pow(e*2,i)/2:(1-Math.pow(2-e*2,i))/2+.5}}}}),Xu=function(){return performance.now()},dB=(function(){function i(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return i.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},i.prototype.removeAll=function(){this._tweens={}},i.prototype.add=function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var a=0,o=r;a<o.length;a++){var c=o[a];(e=c._group)===null||e===void 0||e.remove(c),c._group=this,this._tweens[c.getId()]=c,this._tweensAddedDuringUpdate[c.getId()]=c}},i.prototype.remove=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var n=0,a=e;n<a.length;n++){var o=a[n];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},i.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},i.prototype.update=function(e,r){e===void 0&&(e=Xu()),r===void 0&&(r=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var o=this._tweens[n[a]],c=!r;o&&o.update(e,c)===!1&&!r&&this.remove(o)}n=Object.keys(this._tweensAddedDuringUpdate)}},i})(),hv={Linear:function(i,e){var r=i.length-1,n=r*e,a=Math.floor(n),o=hv.Utils.Linear;return e<0?o(i[0],i[1],n):e>1?o(i[r],i[r-1],r-n):o(i[a],i[a+1>r?r:a+1],n-a)},Utils:{Linear:function(i,e,r){return(e-i)*r+i}}},fB=(function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i})(),uv=new dB,aT=(function(){function i(e,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Bl.Linear.None,this._interpolationFunction=hv.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=fB.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=uv,uv.add(this))}return i.prototype.getId=function(){return this._id},i.prototype.isPlaying=function(){return this._isPlaying},i.prototype.isPaused=function(){return this._isPaused},i.prototype.getDuration=function(){return this._duration},i.prototype.to=function(e,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},i.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},i.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},i.prototype.start=function(e,r){if(e===void 0&&(e=Xu()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},i.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},i.prototype._setupProperties=function(e,r,n,a,o){for(var c in n){var h=e[c],u=Array.isArray(h),d=u?"array":typeof h,f=!u&&Array.isArray(n[c]);if(!(d==="undefined"||d==="function")){if(f){var g=n[c];if(g.length===0)continue;for(var x=[h],y=0,v=g.length;y<v;y+=1){var C=this._handleRelativeValue(h,g[y]);if(isNaN(C)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}x.push(C)}f&&(n[c]=x)}if((d==="object"||u)&&h&&!f){r[c]=u?[]:{};var _=h;for(var k in _)r[c][k]=_[k];a[c]=u?[]:{};var g=n[c];if(!this._isDynamic){var T={};for(var k in g)T[k]=g[k];n[c]=g=T}this._setupProperties(_,r[c],g,a[c],o)}else(typeof r[c]>"u"||o)&&(r[c]=h),u||(r[c]*=1),f?a[c]=n[c].slice().reverse():a[c]=r[c]||0}}},i.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},i.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},i.prototype.pause=function(e){return e===void 0&&(e=Xu()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},i.prototype.resume=function(e){return e===void 0&&(e=Xu()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},i.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},i.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},i.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},i.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},i.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},i.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},i.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},i.prototype.easing=function(e){return e===void 0&&(e=Bl.Linear.None),this._easingFunction=e,this},i.prototype.interpolation=function(e){return e===void 0&&(e=hv.Linear),this._interpolationFunction=e,this},i.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},i.prototype.onStart=function(e){return this._onStartCallback=e,this},i.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},i.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},i.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},i.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},i.prototype.onStop=function(e){return this._onStopCallback=e,this},i.prototype.update=function(e,r){var n=this,a;if(e===void 0&&(e=Xu()),r===void 0&&(r=i.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var c=e-this._startTime,h=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),u=this._duration+this._repeat*h,d=function(){if(n._duration===0||c>u)return 1;var C=Math.trunc(c/h),_=c-C*h,k=Math.min(_/n._duration,1);return k===0&&c===n._duration?1:k},f=d(),g=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||c>=this._duration)if(this._repeat>0){var x=Math.min(Math.trunc((c-this._duration)/h)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=x);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=h*x,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,v=this._chainedTweens.length;y<v;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},i.prototype._updateProperties=function(e,r,n,a){for(var o in n)if(r[o]!==void 0){var c=r[o]||0,h=n[o],u=Array.isArray(e[o]),d=Array.isArray(h),f=!u&&d;f?e[o]=this._interpolationFunction(h,a):typeof h=="object"&&h?this._updateProperties(e[o],c,h,a):(h=this._handleRelativeValue(c,h),typeof h=="number"&&(e[o]=c+(h-c)*a))}},i.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},i.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],n=this._valuesEnd[e];typeof n=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(n):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},i.autoStartOnUpdate=!1,i})();fB.nextId;var Ga=uv;Ga.getAll.bind(Ga);Ga.removeAll.bind(Ga);Ga.add.bind(Ga);Ga.remove.bind(Ga);Ga.update.bind(Ga);function sT(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function a7(i){if(Array.isArray(i))return i}function s7(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function o7(i,e,r){return Object.defineProperty(i,"prototype",{writable:!1}),i}function l7(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function c7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
55
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h7(i,e){return a7(i)||l7(i,e)||u7(i,e)||c7()}function u7(i,e){if(i){if(typeof i=="string")return sT(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sT(i,e):void 0}}var d7=o7(function i(e,r){var n=r.default,a=n===void 0?null:n,o=r.triggerUpdate,c=o===void 0?!0:o,h=r.onChange,u=h===void 0?function(d,f){}:h;s7(this,i),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function K1(i){var e=i.stateInit,r=e===void 0?function(){return{}}:e,n=i.props,a=n===void 0?{}:n,o=i.methods,c=o===void 0?{}:o,h=i.aliases,u=h===void 0?{}:h,d=i.init,f=d===void 0?function(){}:d,g=i.update,x=g===void 0?function(){}:g,y=Object.keys(a).map(function(v){return new d7(v,a[v])});return function v(){for(var C=arguments.length,_=new Array(C),k=0;k<C;k++)_[k]=arguments[k];var T=!!(this instanceof v&&this.constructor),N=T?_.shift():void 0,E=_[0],B=E===void 0?{}:E,O=Object.assign({},r instanceof Function?r(B):r,{initialised:!1}),A={};function M(F){return I(F,B),D(),M}var I=function(U,K){f.call(M,U,O,K),O.initialised=!0},D=hB(function(){O.initialised&&(x.call(M,O,A),A={})},1);return y.forEach(function(F){M[F.name]=U(F);function U(K){var z=K.name,W=K.triggerUpdate,j=W===void 0?!1:W,H=K.onChange,Y=H===void 0?function(G,tt){}:H,Z=K.defaultVal,rt=Z===void 0?null:Z;return function(G){var tt=O[z];if(!arguments.length)return tt;var ft=G===void 0?rt:G;return O[z]=ft,Y.call(M,ft,O,tt),!A.hasOwnProperty(z)&&(A[z]=tt),j&&D(),M}}}),Object.keys(c).forEach(function(F){M[F]=function(){for(var U,K=arguments.length,z=new Array(K),W=0;W<K;W++)z[W]=arguments[W];return(U=c[F]).call.apply(U,[M,O].concat(z))}}),Object.entries(u).forEach(function(F){var U=h7(F,2),K=U[0],z=U[1];return M[K]=M[z]}),M.resetProps=function(){return y.forEach(function(F){M[F.name](F.defaultVal)}),M},M.resetProps(),O._rerender=D,T&&N&&M(N),M}}var xi=(function(i){return typeof i=="function"?i:typeof i=="string"?function(e){return e[i]}:function(e){return i}});function xg(i){"@babel/helpers - typeof";return xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xg(i)}var f7=/^\s+/,p7=/\s+$/;function pe(i,e){if(i=i||"",e=e||{},i instanceof pe)return i;if(!(this instanceof pe))return new pe(i,e);var r=g7(i);this._originalInput=i,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}pe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),r,n,a,o,c,h;return r=e.r/255,n=e.g/255,a=e.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?h=a/12.92:h=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*c+.0722*h},setAlpha:function(e){return this._a=pB(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=lT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=lT(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=oT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=oT(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return cT(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return x7(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Wi(this._r,255)*100)+"%",g:Math.round(Wi(this._g,255)*100)+"%",b:Math.round(Wi(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Wi(this._r,255)*100)+"%, "+Math.round(Wi(this._g,255)*100)+"%, "+Math.round(Wi(this._b,255)*100)+"%)":"rgba("+Math.round(Wi(this._r,255)*100)+"%, "+Math.round(Wi(this._g,255)*100)+"%, "+Math.round(Wi(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:B7[cT(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+hT(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=pe(e);n="#"+hT(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(e){var r=!!e;e=e||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!r&&a&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return pe(this.toString())},_applyModification:function(e,r){var n=e.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(k7,arguments)},brighten:function(){return this._applyModification(w7,arguments)},darken:function(){return this._applyModification(S7,arguments)},desaturate:function(){return this._applyModification(v7,arguments)},saturate:function(){return this._applyModification(C7,arguments)},greyscale:function(){return this._applyModification(_7,arguments)},spin:function(){return this._applyModification(T7,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(A7,arguments)},complement:function(){return this._applyCombination(E7,arguments)},monochromatic:function(){return this._applyCombination(M7,arguments)},splitcomplement:function(){return this._applyCombination(N7,arguments)},triad:function(){return this._applyCombination(uT,[3])},tetrad:function(){return this._applyCombination(uT,[4])}};pe.fromRatio=function(i,e){if(xg(i)=="object"){var r={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?r[n]=i[n]:r[n]=Zu(i[n]));i=r}return pe(i,e)};function g7(i){var e={r:0,g:0,b:0},r=1,n=null,a=null,o=null,c=!1,h=!1;return typeof i=="string"&&(i=j7(i)),xg(i)=="object"&&(ys(i.r)&&ys(i.g)&&ys(i.b)?(e=m7(i.r,i.g,i.b),c=!0,h=String(i.r).substr(-1)==="%"?"prgb":"rgb"):ys(i.h)&&ys(i.s)&&ys(i.v)?(n=Zu(i.s),a=Zu(i.v),e=b7(i.h,n,a),c=!0,h="hsv"):ys(i.h)&&ys(i.s)&&ys(i.l)&&(n=Zu(i.s),o=Zu(i.l),e=y7(i.h,n,o),c=!0,h="hsl"),i.hasOwnProperty("a")&&(r=i.a)),r=pB(r),{ok:c,format:i.format||h,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function m7(i,e,r){return{r:Wi(i,255)*255,g:Wi(e,255)*255,b:Wi(r,255)*255}}function oT(i,e,r){i=Wi(i,255),e=Wi(e,255),r=Wi(r,255);var n=Math.max(i,e,r),a=Math.min(i,e,r),o,c,h=(n+a)/2;if(n==a)o=c=0;else{var u=n-a;switch(c=h>.5?u/(2-n-a):u/(n+a),n){case i:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-i)/u+2;break;case r:o=(i-e)/u+4;break}o/=6}return{h:o,s:c,l:h}}function y7(i,e,r){var n,a,o;i=Wi(i,360),e=Wi(e,100),r=Wi(r,100);function c(d,f,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?d+(f-d)*6*g:g<1/2?f:g<2/3?d+(f-d)*(2/3-g)*6:d}if(e===0)n=a=o=r;else{var h=r<.5?r*(1+e):r+e-r*e,u=2*r-h;n=c(u,h,i+1/3),a=c(u,h,i),o=c(u,h,i-1/3)}return{r:n*255,g:a*255,b:o*255}}function lT(i,e,r){i=Wi(i,255),e=Wi(e,255),r=Wi(r,255);var n=Math.max(i,e,r),a=Math.min(i,e,r),o,c,h=n,u=n-a;if(c=n===0?0:u/n,n==a)o=0;else{switch(n){case i:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-i)/u+2;break;case r:o=(i-e)/u+4;break}o/=6}return{h:o,s:c,v:h}}function b7(i,e,r){i=Wi(i,360)*6,e=Wi(e,100),r=Wi(r,100);var n=Math.floor(i),a=i-n,o=r*(1-e),c=r*(1-a*e),h=r*(1-(1-a)*e),u=n%6,d=[r,c,o,o,h,r][u],f=[h,r,r,c,o,o][u],g=[o,o,h,r,r,c][u];return{r:d*255,g:f*255,b:g*255}}function cT(i,e,r,n){var a=[xa(Math.round(i).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function x7(i,e,r,n,a){var o=[xa(Math.round(i).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(r).toString(16)),xa(gB(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function hT(i,e,r,n){var a=[xa(gB(n)),xa(Math.round(i).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(r).toString(16))];return a.join("")}pe.equals=function(i,e){return!i||!e?!1:pe(i).toRgbString()==pe(e).toRgbString()};pe.random=function(){return pe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function v7(i,e){e=e===0?0:e||10;var r=pe(i).toHsl();return r.s-=e/100,r.s=dm(r.s),pe(r)}function C7(i,e){e=e===0?0:e||10;var r=pe(i).toHsl();return r.s+=e/100,r.s=dm(r.s),pe(r)}function _7(i){return pe(i).desaturate(100)}function k7(i,e){e=e===0?0:e||10;var r=pe(i).toHsl();return r.l+=e/100,r.l=dm(r.l),pe(r)}function w7(i,e){e=e===0?0:e||10;var r=pe(i).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),pe(r)}function S7(i,e){e=e===0?0:e||10;var r=pe(i).toHsl();return r.l-=e/100,r.l=dm(r.l),pe(r)}function T7(i,e){var r=pe(i).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,pe(r)}function E7(i){var e=pe(i).toHsl();return e.h=(e.h+180)%360,pe(e)}function uT(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=pe(i).toHsl(),n=[pe(i)],a=360/e,o=1;o<e;o++)n.push(pe({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function N7(i){var e=pe(i).toHsl(),r=e.h;return[pe(i),pe({h:(r+72)%360,s:e.s,l:e.l}),pe({h:(r+216)%360,s:e.s,l:e.l})]}function A7(i,e,r){e=e||6,r=r||30;var n=pe(i).toHsl(),a=360/r,o=[pe(i)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(pe(n));return o}function M7(i,e){e=e||6;for(var r=pe(i).toHsv(),n=r.h,a=r.s,o=r.v,c=[],h=1/e;e--;)c.push(pe({h:n,s:a,v:o})),o=(o+h)%1;return c}pe.mix=function(i,e,r){r=r===0?0:r||50;var n=pe(i).toRgb(),a=pe(e).toRgb(),o=r/100,c={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return pe(c)};pe.readability=function(i,e){var r=pe(i),n=pe(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};pe.isReadable=function(i,e,r){var n=pe.readability(i,e),a,o;switch(o=!1,a=D7(r),a.level+a.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};pe.mostReadable=function(i,e,r){var n=null,a=0,o,c,h,u;r=r||{},c=r.includeFallbackColors,h=r.level,u=r.size;for(var d=0;d<e.length;d++)o=pe.readability(i,e[d]),o>a&&(a=o,n=pe(e[d]));return pe.isReadable(i,n,{level:h,size:u})||!c?n:(r.includeFallbackColors=!1,pe.mostReadable(i,["#fff","#000"],r))};var dv=pe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",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:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",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:"f00",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",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B7=pe.hexNames=L7(dv);function L7(i){var e={};for(var r in i)i.hasOwnProperty(r)&&(e[i[r]]=r);return e}function pB(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Wi(i,e){O7(i)&&(i="100%");var r=R7(i);return i=Math.min(e,Math.max(0,parseFloat(i))),r&&(i=parseInt(i*e,10)/100),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function dm(i){return Math.min(1,Math.max(0,i))}function jn(i){return parseInt(i,16)}function O7(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function R7(i){return typeof i=="string"&&i.indexOf("%")!=-1}function xa(i){return i.length==1?"0"+i:""+i}function Zu(i){return i<=1&&(i=i*100+"%"),i}function gB(i){return Math.round(parseFloat(i)*255).toString(16)}function dT(i){return jn(i)/255}var da=(function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+i+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function ys(i){return!!da.CSS_UNIT.exec(i)}function j7(i){i=i.replace(f7,"").replace(p7,"").toLowerCase();var e=!1;if(dv[i])i=dv[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=da.rgb.exec(i))?{r:r[1],g:r[2],b:r[3]}:(r=da.rgba.exec(i))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=da.hsl.exec(i))?{h:r[1],s:r[2],l:r[3]}:(r=da.hsla.exec(i))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=da.hsv.exec(i))?{h:r[1],s:r[2],v:r[3]}:(r=da.hsva.exec(i))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=da.hex8.exec(i))?{r:jn(r[1]),g:jn(r[2]),b:jn(r[3]),a:dT(r[4]),format:e?"name":"hex8"}:(r=da.hex6.exec(i))?{r:jn(r[1]),g:jn(r[2]),b:jn(r[3]),format:e?"name":"hex"}:(r=da.hex4.exec(i))?{r:jn(r[1]+""+r[1]),g:jn(r[2]+""+r[2]),b:jn(r[3]+""+r[3]),a:dT(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=da.hex3.exec(i))?{r:jn(r[1]+""+r[1]),g:jn(r[2]+""+r[2]),b:jn(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function D7(i){var e,r;return i=i||{level:"AA",size:"small"},e=(i.level||"AA").toUpperCase(),r=(i.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}function fv(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function F7(i){if(Array.isArray(i))return fv(i)}function mB(i,e,r){if(typeof i=="function"?i===e:i.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function I7(i,e){if(e.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $7(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(i,e){return i.get(mB(i,e))}function fT(i,e,r){I7(i,e),e.set(i,r)}function pT(i,e,r){return i.set(mB(i,e),r),r}function z7(i,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,G7(n.key),n)}}function P7(i,e,r){return e&&z7(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function q7(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function U7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
56
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H7(i){return F7(i)||q7(i)||Y7(i)||U7()}function W7(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function G7(i){var e=W7(i,"string");return typeof e=="symbol"?e:e+""}function Y7(i,e){if(i){if(typeof i=="string")return fv(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fv(i,e):void 0}}var K7=123,V7=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},yB=function(e,r,n){return(e<<16)+(r<<8)+n},X7=function(e){var r=pe(e).toRgb(),n=r.r,a=r.g,o=r.b;return yB(n,a,o)},gT=function(e,r){return e*K7%Math.pow(2,r)},ll=new WeakMap,bs=new WeakMap,Z7=(function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;$7(this,i),fT(this,ll,void 0),fT(this,bs,void 0),pT(bs,this,e),this.reset()}return P7(i,[{key:"reset",value:function(){pT(ll,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Qn(ll,this).length>=Math.pow(2,24-Qn(bs,this)))return null;var n=Qn(ll,this).length,a=gT(n,Qn(bs,this)),o=V7(n+(a<<24-Qn(bs,this)));return Qn(ll,this).push(r),o}},{key:"lookup",value:function(r){if(!r)return null;var n=typeof r=="string"?X7(r):yB.apply(void 0,H7(r));if(!n)return null;var a=n&Math.pow(2,24-Qn(bs,this))-1,o=n>>24-Qn(bs,this)&Math.pow(2,Qn(bs,this))-1;return gT(a,Qn(bs,this))!==o||a>=Qn(ll,this).length?null:Qn(ll,this)[a]}}])})(),Hd,Gi,bB,xB,vo,mT,vB,CB,Jb,Vp,sd,_B,V1,pv,gv,vg={},Cg=[],Q7=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,fm=Array.isArray;function Ha(i,e){for(var r in e)i[r]=e[r];return i}function X1(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function J7(i,e,r){var n,a,o,c={};for(o in e)o=="key"?n=e[o]:o=="ref"?a=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?Hd.call(arguments,2):r),typeof i=="function"&&i.defaultProps!=null)for(o in i.defaultProps)c[o]===void 0&&(c[o]=i.defaultProps[o]);return od(i,c,n,a,null)}function od(i,e,r,n,a){var o={type:i,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++bB,__i:-1,__u:0};return a==null&&Gi.vnode!=null&&Gi.vnode(o),o}function pm(i){return i.children}function Xp(i,e){this.props=i,this.context=e}function vh(i,e){if(e==null)return i.__?vh(i.__,i.__i+1):null;for(var r;e<i.__k.length;e++)if((r=i.__k[e])!=null&&r.__e!=null)return r.__e;return typeof i.type=="function"?vh(i):null}function tU(i){if(i.__P&&i.__d){var e=i.__v,r=e.__e,n=[],a=[],o=Ha({},e);o.__v=e.__v+1,Gi.vnode&&Gi.vnode(o),Z1(i.__P,o,e,i.__n,i.__P.namespaceURI,32&e.__u?[r]:null,n,r??vh(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,TB(n,o,a),e.__e=e.__=null,o.__e!=r&&kB(o)}}function kB(i){if((i=i.__)!=null&&i.__c!=null)return i.__e=i.__c.base=null,i.__k.some(function(e){if(e!=null&&e.__e!=null)return i.__e=i.__c.base=e.__e}),kB(i)}function yT(i){(!i.__d&&(i.__d=!0)&&vo.push(i)&&!_g.__r++||mT!=Gi.debounceRendering)&&((mT=Gi.debounceRendering)||vB)(_g)}function _g(){try{for(var i,e=1;vo.length;)vo.length>e&&vo.sort(CB),i=vo.shift(),e=vo.length,tU(i)}finally{vo.length=_g.__r=0}}function wB(i,e,r,n,a,o,c,h,u,d,f){var g,x,y,v,C,_,k,T=n&&n.__k||Cg,N=e.length;for(u=eU(r,e,T,u,N),g=0;g<N;g++)(y=r.__k[g])!=null&&(x=y.__i!=-1&&T[y.__i]||vg,y.__i=g,_=Z1(i,y,x,a,o,c,h,u,d,f),v=y.__e,y.ref&&x.ref!=y.ref&&(x.ref&&Q1(x.ref,null,y),f.push(y.ref,y.__c||v,y)),C==null&&v!=null&&(C=v),(k=!!(4&y.__u))||x.__k===y.__k?(u=SB(y,u,i,k),k&&x.__e&&(x.__e=null)):typeof y.type=="function"&&_!==void 0?u=_:v&&(u=v.nextSibling),y.__u&=-7);return r.__e=C,u}function eU(i,e,r,n,a){var o,c,h,u,d,f=r.length,g=f,x=0;for(i.__k=new Array(a),o=0;o<a;o++)(c=e[o])!=null&&typeof c!="boolean"&&typeof c!="function"?(typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?c=i.__k[o]=od(null,c,null,null,null):fm(c)?c=i.__k[o]=od(pm,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=i.__k[o]=od(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):i.__k[o]=c,u=o+x,c.__=i,c.__b=i.__b+1,h=null,(d=c.__i=iU(c,r,u,g))!=-1&&(g--,(h=r[d])&&(h.__u|=2)),h==null||h.__v==null?(d==-1&&(a>f?x--:a<f&&x++),typeof c.type!="function"&&(c.__u|=4)):d!=u&&(d==u-1?x--:d==u+1?x++:(d>u?x--:x++,c.__u|=4))):i.__k[o]=null;if(g)for(o=0;o<f;o++)(h=r[o])!=null&&(2&h.__u)==0&&(h.__e==n&&(n=vh(h)),NB(h,h));return n}function SB(i,e,r,n){var a,o;if(typeof i.type=="function"){for(a=i.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=i,e=SB(a[o],e,r,n));return e}i.__e!=e&&(n&&(e&&i.type&&!e.parentNode&&(e=vh(i)),r.insertBefore(i.__e,e||null)),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function iU(i,e,r,n){var a,o,c,h=i.key,u=i.type,d=e[r],f=d!=null&&(2&d.__u)==0;if(d===null&&h==null||f&&h==d.key&&u==d.type)return r;if(n>(f?1:0)){for(a=r-1,o=r+1;a>=0||o<e.length;)if((d=e[c=a>=0?a--:o++])!=null&&(2&d.__u)==0&&h==d.key&&u==d.type)return c}return-1}function bT(i,e,r){e[0]=="-"?i.setProperty(e,r??""):i[e]=r==null?"":typeof r!="number"||Q7.test(e)?r:r+"px"}function vp(i,e,r,n,a){var o,c;t:if(e=="style")if(typeof r=="string")i.style.cssText=r;else{if(typeof n=="string"&&(i.style.cssText=n=""),n)for(e in n)r&&e in r||bT(i.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||bT(i.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(_B,"$1")),c=e.toLowerCase(),e=c in i||e=="onFocusOut"||e=="onFocusIn"?c.slice(2):e.slice(2),i.l||(i.l={}),i.l[e+o]=r,r?n?r[sd]=n[sd]:(r[sd]=V1,i.addEventListener(e,o?gv:pv,o)):i.removeEventListener(e,o?gv:pv,o);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in i)try{i[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?i.removeAttribute(e):i.setAttribute(e,e=="popover"&&r==1?"":r))}}function xT(i){return function(e){if(this.l){var r=this.l[e.type+i];if(e[Vp]==null)e[Vp]=V1++;else if(e[Vp]<r[sd])return;return r(Gi.event?Gi.event(e):e)}}}function Z1(i,e,r,n,a,o,c,h,u,d){var f,g,x,y,v,C,_,k,T,N,E,B,O,A,M,I=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),o=[h=e.__e=r.__e]),(f=Gi.__b)&&f(e);t:if(typeof I=="function")try{if(k=e.props,T=I.prototype&&I.prototype.render,N=(f=I.contextType)&&n[f.__c],E=f?N?N.props.value:f.__:n,r.__c?_=(g=e.__c=r.__c).__=g.__E:(T?e.__c=g=new I(k,E):(e.__c=g=new Xp(k,E),g.constructor=I,g.render=nU),N&&N.sub(g),g.state||(g.state={}),g.__n=n,x=g.__d=!0,g.__h=[],g._sb=[]),T&&g.__s==null&&(g.__s=g.state),T&&I.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Ha({},g.__s)),Ha(g.__s,I.getDerivedStateFromProps(k,g.__s))),y=g.props,v=g.state,g.__v=e,x)T&&I.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&I.getDerivedStateFromProps==null&&k!==y&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(k,E),e.__v==r.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(k,g.__s,E)===!1){e.__v!=r.__v&&(g.props=k,g.state=g.__s,g.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(D){D&&(D.__=e)}),Cg.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(k,g.__s,E),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(y,v,C)})}if(g.context=E,g.props=k,g.__P=i,g.__e=!1,B=Gi.__r,O=0,T)g.state=g.__s,g.__d=!1,B&&B(e),f=g.render(g.props,g.state,g.context),Cg.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,B&&B(e),f=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++O<25);g.state=g.__s,g.getChildContext!=null&&(n=Ha(Ha({},n),g.getChildContext())),T&&!x&&g.getSnapshotBeforeUpdate!=null&&(C=g.getSnapshotBeforeUpdate(y,v)),A=f!=null&&f.type===pm&&f.key==null?EB(f.props.children):f,h=wB(i,fm(A)?A:[A],e,r,n,a,o,c,h,u,d),g.base=e.__e,e.__u&=-161,g.__h.length&&c.push(g),_&&(g.__E=g.__=null)}catch(D){if(e.__v=null,u||o!=null)if(D.then){for(e.__u|=u?160:128;h&&h.nodeType==8&&h.nextSibling;)h=h.nextSibling;o[o.indexOf(h)]=null,e.__e=h}else{for(M=o.length;M--;)X1(o[M]);mv(e)}else e.__e=r.__e,e.__k=r.__k,D.then||mv(e);Gi.__e(D,e,r)}else o==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):h=e.__e=rU(r.__e,e,r,n,a,o,c,u,d);return(f=Gi.diffed)&&f(e),128&e.__u?void 0:h}function mv(i){i&&(i.__c&&(i.__c.__e=!0),i.__k&&i.__k.some(mv))}function TB(i,e,r){for(var n=0;n<r.length;n++)Q1(r[n],r[++n],r[++n]);Gi.__c&&Gi.__c(e,i),i.some(function(a){try{i=a.__h,a.__h=[],i.some(function(o){o.call(a)})}catch(o){Gi.__e(o,a.__v)}})}function EB(i){return typeof i!="object"||i==null||i.__b>0?i:fm(i)?i.map(EB):Ha({},i)}function rU(i,e,r,n,a,o,c,h,u){var d,f,g,x,y,v,C,_=r.props||vg,k=e.props,T=e.type;if(T=="svg"?a="http://www.w3.org/2000/svg":T=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((y=o[d])&&"setAttribute"in y==!!T&&(T?y.localName==T:y.nodeType==3)){i=y,o[d]=null;break}}if(i==null){if(T==null)return document.createTextNode(k);i=document.createElementNS(a,T,k.is&&k),h&&(Gi.__m&&Gi.__m(e,o),h=!1),o=null}if(T==null)_===k||h&&i.data==k||(i.data=k);else{if(o=o&&Hd.call(i.childNodes),!h&&o!=null)for(_={},d=0;d<i.attributes.length;d++)_[(y=i.attributes[d]).name]=y.value;for(d in _)y=_[d],d=="dangerouslySetInnerHTML"?g=y:d=="children"||d in k||d=="value"&&"defaultValue"in k||d=="checked"&&"defaultChecked"in k||vp(i,d,null,y,a);for(d in k)y=k[d],d=="children"?x=y:d=="dangerouslySetInnerHTML"?f=y:d=="value"?v=y:d=="checked"?C=y:h&&typeof y!="function"||_[d]===y||vp(i,d,y,_[d],a);if(f)h||g&&(f.__html==g.__html||f.__html==i.innerHTML)||(i.innerHTML=f.__html),e.__k=[];else if(g&&(i.innerHTML=""),wB(e.type=="template"?i.content:i,fm(x)?x:[x],e,r,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:r.__k&&vh(r,0),h,u),o!=null)for(d=o.length;d--;)X1(o[d]);h||(d="value",T=="progress"&&v==null?i.removeAttribute("value"):v!=null&&(v!==i[d]||T=="progress"&&!v||T=="option"&&v!=_[d])&&vp(i,d,v,_[d],a),d="checked",C!=null&&C!=i[d]&&vp(i,d,C,_[d],a))}return i}function Q1(i,e,r){try{if(typeof i=="function"){var n=typeof i.__u=="function";n&&i.__u(),n&&e==null||(i.__u=i(e))}else i.current=e}catch(a){Gi.__e(a,r)}}function NB(i,e,r){var n,a;if(Gi.unmount&&Gi.unmount(i),(n=i.ref)&&(n.current&&n.current!=i.__e||Q1(n,null,e)),(n=i.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){Gi.__e(o,e)}n.base=n.__P=null}if(n=i.__k)for(a=0;a<n.length;a++)n[a]&&NB(n[a],e,r||typeof i.type!="function");r||X1(i.__e),i.__c=i.__=i.__e=void 0}function nU(i,e,r){return this.constructor(i,r)}function aU(i,e,r){var n,a,o,c;e==document&&(e=document.documentElement),Gi.__&&Gi.__(i,e),a=(n=!1)?null:e.__k,o=[],c=[],Z1(e,i=e.__k=J7(pm,null,[i]),a||vg,vg,e.namespaceURI,a?null:e.firstChild?Hd.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),TB(o,i,c)}function AB(i,e,r){var n,a,o,c,h=Ha({},i.props);for(o in i.type&&i.type.defaultProps&&(c=i.type.defaultProps),e)o=="key"?n=e[o]:o=="ref"?a=e[o]:h[o]=e[o]===void 0&&c!=null?c[o]:e[o];return arguments.length>2&&(h.children=arguments.length>3?Hd.call(arguments,2):r),od(i.type,h,n||i.key,a||i.ref,null)}Hd=Cg.slice,Gi={__e:function(i,e,r,n){for(var a,o,c;e=e.__;)if((a=e.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(i)),c=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(i,n||{}),c=a.__d),c)return a.__E=a}catch(h){i=h}throw i}},bB=0,xB=function(i){return i!=null&&i.constructor===void 0},Xp.prototype.setState=function(i,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ha({},this.state),typeof i=="function"&&(i=i(Ha({},r),this.props)),i&&Ha(r,i),i!=null&&this.__v&&(e&&this._sb.push(e),yT(this))},Xp.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),yT(this))},Xp.prototype.render=pm,vo=[],vB=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,CB=function(i,e){return i.__v.__b-e.__v.__b},_g.__r=0,Jb=Math.random().toString(8),Vp="__d"+Jb,sd="__a"+Jb,_B=/(PointerCapture)$|Capture$/i,V1=0,pv=xT(!1),gv=xT(!0);function vT(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function sU(i){if(Array.isArray(i))return i}function oU(i,e,r){return(e=fU(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function lU(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function cU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CT(i,e){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),r.push.apply(r,n)}return r}function hU(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?CT(Object(r),!0).forEach(function(n){oU(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):CT(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function uU(i,e){return sU(i)||lU(i,e)||pU(i,e)||cU()}function dU(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function fU(i){var e=dU(i,"string");return typeof e=="symbol"?e:e+""}function kg(i){"@babel/helpers - typeof";return kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kg(i)}function pU(i,e){if(i){if(typeof i=="string")return vT(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vT(i,e):void 0}}var yv=function(e){if(kg(e)!=="object")return e;var r=AB(e);if(r.props){var n;r.props=hU({},r.props),r!=null&&(n=r.props)!==null&&n!==void 0&&n.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(yv):yv(r.props.children))}return r},gU=function(e){return xB(AB(e))},mU=function(e,r){delete r.__k,aU(yv(e),r)};function yU(i,e){e===void 0&&(e={});var r=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}}var bU=`.float-tooltip-kap {
|
|
58
|
-
position: absolute;
|
|
59
|
-
width: max-content; /* prevent shrinking near right edge */
|
|
60
|
-
max-width: max(50%, 150px);
|
|
61
|
-
padding: 3px 5px;
|
|
62
|
-
border-radius: 3px;
|
|
63
|
-
font: 12px sans-serif;
|
|
64
|
-
color: #eee;
|
|
65
|
-
background: rgba(0,0,0,0.6);
|
|
66
|
-
pointer-events: none;
|
|
67
|
-
}
|
|
68
|
-
`;yU(bU);var xU=K1({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.style,o=a===void 0?{}:a,c=!!e&&kg(e)==="object"&&!!e.node&&typeof e.node=="function",h=ke(c?e.node():e);h.style("position")==="static"&&h.style("position","relative"),r.tooltipEl=h.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var f=uU(d,2),g=f[0],x=f[1];return r.tooltipEl.style(g,x)}),r.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,h.on("mousemove.".concat(u),function(d){r.mouseInside=!0;var f=$a(d),g=h.node(),x=g.offsetWidth,y=g.offsetHeight,v=[r.offsetX===null||r.offsetX===void 0?"-".concat(f[0]/x*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?y>130&&y-f[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",f[0]+"px").style("top",f[1]+"px").style("transform","translate(".concat(v.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),h.on("mouseover.".concat(u),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),h.on("mouseout.".concat(u),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(e){e.tooltipEl.style("display",e.content&&e.mouseInside?"inline":"none"),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(""),e.tooltipEl.append(function(){return e.content})):typeof e.content=="string"?e.tooltipEl.html(e.content):gU(e.content)?(e.tooltipEl.text(""),mU(e.content,e.tooltipEl.node())):(e.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",e.content,e.content.toString())):e.tooltipEl.text("")}});function vU(i,e,r){var n,a=1;i==null&&(i=0),e==null&&(e=0),r==null&&(r=0);function o(){var c,h=n.length,u,d=0,f=0,g=0;for(c=0;c<h;++c)u=n[c],d+=u.x||0,f+=u.y||0,g+=u.z||0;for(d=(d/h-i)*a,f=(f/h-e)*a,g=(g/h-r)*a,c=0;c<h;++c)u=n[c],d&&(u.x-=d),f&&(u.y-=f),g&&(u.z-=g)}return o.initialize=function(c){n=c},o.x=function(c){return arguments.length?(i=+c,o):i},o.y=function(c){return arguments.length?(e=+c,o):e},o.z=function(c){return arguments.length?(r=+c,o):r},o.strength=function(c){return arguments.length?(a=+c,o):a},o}function CU(i){const e=+this._x.call(null,i);return MB(this.cover(e),e,i)}function MB(i,e,r){if(isNaN(e))return i;var n,a=i._root,o={data:r},c=i._x0,h=i._x1,u,d,f,g,x;if(!a)return i._root=o,i;for(;a.length;)if((f=e>=(u=(c+h)/2))?c=u:h=u,n=a,!(a=a[g=+f]))return n[g]=o,i;if(d=+i._x.call(null,a.data),e===d)return o.next=a,n?n[g]=o:i._root=o,i;do n=n?n[g]=new Array(2):i._root=new Array(2),(f=e>=(u=(c+h)/2))?c=u:h=u;while((g=+f)==(x=+(d>=u)));return n[x]=a,n[g]=o,i}function _U(i){Array.isArray(i)||(i=Array.from(i));const e=i.length,r=new Float64Array(e);let n=1/0,a=-1/0;for(let o=0,c;o<e;++o)isNaN(c=+this._x.call(null,i[o]))||(r[o]=c,c<n&&(n=c),c>a&&(a=c));if(n>a)return this;this.cover(n).cover(a);for(let o=0;o<e;++o)MB(this,r[o],i[o]);return this}function kU(i){if(isNaN(i=+i))return this;var e=this._x0,r=this._x1;if(isNaN(e))r=(e=Math.floor(i))+1;else{for(var n=r-e||1,a=this._root,o,c;e>i||i>=r;)switch(c=+(i<e),o=new Array(2),o[c]=a,a=o,n*=2,c){case 0:r=e+n;break;case 1:e=r-n;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._x1=r,this}function wU(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function SU(i){return arguments.length?this.cover(+i[0][0]).cover(+i[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Bs(i,e,r){this.node=i,this.x0=e,this.x1=r}function TU(i,e){var r,n=this._x0,a,o,c=this._x1,h=[],u=this._root,d,f;for(u&&h.push(new Bs(u,n,c)),e==null?e=1/0:(n=i-e,c=i+e);d=h.pop();)if(!(!(u=d.node)||(a=d.x0)>c||(o=d.x1)<n))if(u.length){var g=(a+o)/2;h.push(new Bs(u[1],g,o),new Bs(u[0],a,g)),(f=+(i>=g))&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-f],h[h.length-1-f]=d)}else{var x=Math.abs(i-+this._x.call(null,u.data));x<e&&(e=x,n=i-x,c=i+x,r=u.data)}return r}function EU(i){if(isNaN(u=+this._x.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._x1,u,d,f,g,x;if(!r)return this;if(r.length)for(;;){if((f=u>=(d=(c+h)/2))?c=d:h=d,e=r,!(r=r[g=+f]))return this;if(!r.length)break;e[g+1&1]&&(n=e,x=g)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[g]=o:delete e[g],(r=e[0]||e[1])&&r===(e[1]||e[0])&&!r.length&&(n?n[x]=r:this._root=r),this):(this._root=o,this)}function NU(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function AU(){return this._root}function MU(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function BU(i){var e=[],r,n=this._root,a,o,c;for(n&&e.push(new Bs(n,this._x0,this._x1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.x1)&&n.length){var h=(o+c)/2;(a=n[1])&&e.push(new Bs(a,h,c)),(a=n[0])&&e.push(new Bs(a,o,h))}return this}function LU(i){var e=[],r=[],n;for(this._root&&e.push(new Bs(this._root,this._x0,this._x1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.x1,u=(c+h)/2;(o=a[0])&&e.push(new Bs(o,c,u)),(o=a[1])&&e.push(new Bs(o,u,h))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.x1);return this}function OU(i){return i[0]}function RU(i){return arguments.length?(this._x=i,this):this._x}function J1(i,e){var r=new tC(e??OU,NaN,NaN);return i==null?r:r.addAll(i)}function tC(i,e,r){this._x=i,this._x0=e,this._x1=r,this._root=void 0}function _T(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var _n=J1.prototype=tC.prototype;_n.copy=function(){var i=new tC(this._x,this._x0,this._x1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=_T(e),i;for(r=[{source:e,target:i._root=new Array(2)}];e=r.pop();)for(var a=0;a<2;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(2)}):e.target[a]=_T(n));return i};_n.add=CU;_n.addAll=_U;_n.cover=kU;_n.data=wU;_n.extent=SU;_n.find=TU;_n.remove=EU;_n.removeAll=NU;_n.root=AU;_n.size=MU;_n.visit=BU;_n.visitAfter=LU;_n.x=RU;function jU(i){const e=+this._x.call(null,i),r=+this._y.call(null,i);return BB(this.cover(e,r),e,r,i)}function BB(i,e,r,n){if(isNaN(e)||isNaN(r))return i;var a,o=i._root,c={data:n},h=i._x0,u=i._y0,d=i._x1,f=i._y1,g,x,y,v,C,_,k,T;if(!o)return i._root=c,i;for(;o.length;)if((C=e>=(g=(h+d)/2))?h=g:d=g,(_=r>=(x=(u+f)/2))?u=x:f=x,a=o,!(o=o[k=_<<1|C]))return a[k]=c,i;if(y=+i._x.call(null,o.data),v=+i._y.call(null,o.data),e===y&&r===v)return c.next=o,a?a[k]=c:i._root=c,i;do a=a?a[k]=new Array(4):i._root=new Array(4),(C=e>=(g=(h+d)/2))?h=g:d=g,(_=r>=(x=(u+f)/2))?u=x:f=x;while((k=_<<1|C)===(T=(v>=x)<<1|y>=g));return a[T]=o,a[k]=c,i}function DU(i){var e,r,n=i.length,a,o,c=new Array(n),h=new Array(n),u=1/0,d=1/0,f=-1/0,g=-1/0;for(r=0;r<n;++r)isNaN(a=+this._x.call(null,e=i[r]))||isNaN(o=+this._y.call(null,e))||(c[r]=a,h[r]=o,a<u&&(u=a),a>f&&(f=a),o<d&&(d=o),o>g&&(g=o));if(u>f||d>g)return this;for(this.cover(u,d).cover(f,g),r=0;r<n;++r)BB(this,c[r],h[r],i[r]);return this}function FU(i,e){if(isNaN(i=+i)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(i))+1,o=(n=Math.floor(e))+1;else{for(var c=a-r||1,h=this._root,u,d;r>i||i>=a||n>e||e>=o;)switch(d=(e<n)<<1|i<r,u=new Array(4),u[d]=h,h=u,c*=2,d){case 0:a=r+c,o=n+c;break;case 1:r=a-c,o=n+c;break;case 2:a=r+c,n=o-c;break;case 3:r=a-c,n=o-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=n,this._x1=a,this._y1=o,this}function IU(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function $U(i){return arguments.length?this.cover(+i[0][0],+i[0][1]).cover(+i[1][0],+i[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Jr(i,e,r,n,a){this.node=i,this.x0=e,this.y0=r,this.x1=n,this.y1=a}function zU(i,e,r){var n,a=this._x0,o=this._y0,c,h,u,d,f=this._x1,g=this._y1,x=[],y=this._root,v,C;for(y&&x.push(new Jr(y,a,o,f,g)),r==null?r=1/0:(a=i-r,o=e-r,f=i+r,g=e+r,r*=r);v=x.pop();)if(!(!(y=v.node)||(c=v.x0)>f||(h=v.y0)>g||(u=v.x1)<a||(d=v.y1)<o))if(y.length){var _=(c+u)/2,k=(h+d)/2;x.push(new Jr(y[3],_,k,u,d),new Jr(y[2],c,k,_,d),new Jr(y[1],_,h,u,k),new Jr(y[0],c,h,_,k)),(C=(e>=k)<<1|i>=_)&&(v=x[x.length-1],x[x.length-1]=x[x.length-1-C],x[x.length-1-C]=v)}else{var T=i-+this._x.call(null,y.data),N=e-+this._y.call(null,y.data),E=T*T+N*N;if(E<r){var B=Math.sqrt(r=E);a=i-B,o=e-B,f=i+B,g=e+B,n=y.data}}return n}function PU(i){if(isNaN(f=+this._x.call(null,i))||isNaN(g=+this._y.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._y0,u=this._x1,d=this._y1,f,g,x,y,v,C,_,k;if(!r)return this;if(r.length)for(;;){if((v=f>=(x=(c+u)/2))?c=x:u=x,(C=g>=(y=(h+d)/2))?h=y:d=y,e=r,!(r=r[_=C<<1|v]))return this;if(!r.length)break;(e[_+1&3]||e[_+2&3]||e[_+3&3])&&(n=e,k=_)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[_]=o:delete e[_],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[k]=r:this._root=r),this):(this._root=o,this)}function qU(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function UU(){return this._root}function HU(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function WU(i){var e=[],r,n=this._root,a,o,c,h,u;for(n&&e.push(new Jr(n,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.y0,h=r.x1,u=r.y1)&&n.length){var d=(o+h)/2,f=(c+u)/2;(a=n[3])&&e.push(new Jr(a,d,f,h,u)),(a=n[2])&&e.push(new Jr(a,o,f,d,u)),(a=n[1])&&e.push(new Jr(a,d,c,h,f)),(a=n[0])&&e.push(new Jr(a,o,c,d,f))}return this}function GU(i){var e=[],r=[],n;for(this._root&&e.push(new Jr(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.x1,d=n.y1,f=(c+u)/2,g=(h+d)/2;(o=a[0])&&e.push(new Jr(o,c,h,f,g)),(o=a[1])&&e.push(new Jr(o,f,h,u,g)),(o=a[2])&&e.push(new Jr(o,c,g,f,d)),(o=a[3])&&e.push(new Jr(o,f,g,u,d))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.y0,n.x1,n.y1);return this}function YU(i){return i[0]}function KU(i){return arguments.length?(this._x=i,this):this._x}function VU(i){return i[1]}function XU(i){return arguments.length?(this._y=i,this):this._y}function eC(i,e,r){var n=new iC(e??YU,r??VU,NaN,NaN,NaN,NaN);return i==null?n:n.addAll(i)}function iC(i,e,r,n,a,o){this._x=i,this._y=e,this._x0=r,this._y0=n,this._x1=a,this._y1=o,this._root=void 0}function kT(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var on=eC.prototype=iC.prototype;on.copy=function(){var i=new iC(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=kT(e),i;for(r=[{source:e,target:i._root=new Array(4)}];e=r.pop();)for(var a=0;a<4;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(4)}):e.target[a]=kT(n));return i};on.add=jU;on.addAll=DU;on.cover=FU;on.data=IU;on.extent=$U;on.find=zU;on.remove=PU;on.removeAll=qU;on.root=UU;on.size=HU;on.visit=WU;on.visitAfter=GU;on.x=KU;on.y=XU;function ZU(i){const e=+this._x.call(null,i),r=+this._y.call(null,i),n=+this._z.call(null,i);return LB(this.cover(e,r,n),e,r,n,i)}function LB(i,e,r,n,a){if(isNaN(e)||isNaN(r)||isNaN(n))return i;var o,c=i._root,h={data:a},u=i._x0,d=i._y0,f=i._z0,g=i._x1,x=i._y1,y=i._z1,v,C,_,k,T,N,E,B,O,A,M;if(!c)return i._root=h,i;for(;c.length;)if((E=e>=(v=(u+g)/2))?u=v:g=v,(B=r>=(C=(d+x)/2))?d=C:x=C,(O=n>=(_=(f+y)/2))?f=_:y=_,o=c,!(c=c[A=O<<2|B<<1|E]))return o[A]=h,i;if(k=+i._x.call(null,c.data),T=+i._y.call(null,c.data),N=+i._z.call(null,c.data),e===k&&r===T&&n===N)return h.next=c,o?o[A]=h:i._root=h,i;do o=o?o[A]=new Array(8):i._root=new Array(8),(E=e>=(v=(u+g)/2))?u=v:g=v,(B=r>=(C=(d+x)/2))?d=C:x=C,(O=n>=(_=(f+y)/2))?f=_:y=_;while((A=O<<2|B<<1|E)===(M=(N>=_)<<2|(T>=C)<<1|k>=v));return o[M]=c,o[A]=h,i}function QU(i){Array.isArray(i)||(i=Array.from(i));const e=i.length,r=new Float64Array(e),n=new Float64Array(e),a=new Float64Array(e);let o=1/0,c=1/0,h=1/0,u=-1/0,d=-1/0,f=-1/0;for(let g=0,x,y,v,C;g<e;++g)isNaN(y=+this._x.call(null,x=i[g]))||isNaN(v=+this._y.call(null,x))||isNaN(C=+this._z.call(null,x))||(r[g]=y,n[g]=v,a[g]=C,y<o&&(o=y),y>u&&(u=y),v<c&&(c=v),v>d&&(d=v),C<h&&(h=C),C>f&&(f=C));if(o>u||c>d||h>f)return this;this.cover(o,c,h).cover(u,d,f);for(let g=0;g<e;++g)LB(this,r[g],n[g],a[g],i[g]);return this}function JU(i,e,r){if(isNaN(i=+i)||isNaN(e=+e)||isNaN(r=+r))return this;var n=this._x0,a=this._y0,o=this._z0,c=this._x1,h=this._y1,u=this._z1;if(isNaN(n))c=(n=Math.floor(i))+1,h=(a=Math.floor(e))+1,u=(o=Math.floor(r))+1;else{for(var d=c-n||1,f=this._root,g,x;n>i||i>=c||a>e||e>=h||o>r||r>=u;)switch(x=(r<o)<<2|(e<a)<<1|i<n,g=new Array(8),g[x]=f,f=g,d*=2,x){case 0:c=n+d,h=a+d,u=o+d;break;case 1:n=c-d,h=a+d,u=o+d;break;case 2:c=n+d,a=h-d,u=o+d;break;case 3:n=c-d,a=h-d,u=o+d;break;case 4:c=n+d,h=a+d,o=u-d;break;case 5:n=c-d,h=a+d,o=u-d;break;case 6:c=n+d,a=h-d,o=u-d;break;case 7:n=c-d,a=h-d,o=u-d;break}this._root&&this._root.length&&(this._root=f)}return this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this}function tH(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function eH(i){return arguments.length?this.cover(+i[0][0],+i[0][1],+i[0][2]).cover(+i[1][0],+i[1][1],+i[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Di(i,e,r,n,a,o,c){this.node=i,this.x0=e,this.y0=r,this.z0=n,this.x1=a,this.y1=o,this.z1=c}function iH(i,e,r,n){var a,o=this._x0,c=this._y0,h=this._z0,u,d,f,g,x,y,v=this._x1,C=this._y1,_=this._z1,k=[],T=this._root,N,E;for(T&&k.push(new Di(T,o,c,h,v,C,_)),n==null?n=1/0:(o=i-n,c=e-n,h=r-n,v=i+n,C=e+n,_=r+n,n*=n);N=k.pop();)if(!(!(T=N.node)||(u=N.x0)>v||(d=N.y0)>C||(f=N.z0)>_||(g=N.x1)<o||(x=N.y1)<c||(y=N.z1)<h))if(T.length){var B=(u+g)/2,O=(d+x)/2,A=(f+y)/2;k.push(new Di(T[7],B,O,A,g,x,y),new Di(T[6],u,O,A,B,x,y),new Di(T[5],B,d,A,g,O,y),new Di(T[4],u,d,A,B,O,y),new Di(T[3],B,O,f,g,x,A),new Di(T[2],u,O,f,B,x,A),new Di(T[1],B,d,f,g,O,A),new Di(T[0],u,d,f,B,O,A)),(E=(r>=A)<<2|(e>=O)<<1|i>=B)&&(N=k[k.length-1],k[k.length-1]=k[k.length-1-E],k[k.length-1-E]=N)}else{var M=i-+this._x.call(null,T.data),I=e-+this._y.call(null,T.data),D=r-+this._z.call(null,T.data),F=M*M+I*I+D*D;if(F<n){var U=Math.sqrt(n=F);o=i-U,c=e-U,h=r-U,v=i+U,C=e+U,_=r+U,a=T.data}}return a}const rH=(i,e,r,n,a,o)=>Math.sqrt((i-n)**2+(e-a)**2+(r-o)**2);function nH(i,e,r,n){const a=[],o=i-n,c=e-n,h=r-n,u=i+n,d=e+n,f=r+n;return this.visit((g,x,y,v,C,_,k)=>{if(!g.length)do{const T=g.data;rH(i,e,r,this._x(T),this._y(T),this._z(T))<=n&&a.push(T)}while(g=g.next);return x>u||y>d||v>f||C<o||_<c||k<h}),a}function aH(i){if(isNaN(x=+this._x.call(null,i))||isNaN(y=+this._y.call(null,i))||isNaN(v=+this._z.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._y0,u=this._z0,d=this._x1,f=this._y1,g=this._z1,x,y,v,C,_,k,T,N,E,B,O;if(!r)return this;if(r.length)for(;;){if((T=x>=(C=(c+d)/2))?c=C:d=C,(N=y>=(_=(h+f)/2))?h=_:f=_,(E=v>=(k=(u+g)/2))?u=k:g=k,e=r,!(r=r[B=E<<2|N<<1|T]))return this;if(!r.length)break;(e[B+1&7]||e[B+2&7]||e[B+3&7]||e[B+4&7]||e[B+5&7]||e[B+6&7]||e[B+7&7])&&(n=e,O=B)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[B]=o:delete e[B],(r=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&r===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[O]=r:this._root=r),this):(this._root=o,this)}function sH(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function oH(){return this._root}function lH(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function cH(i){var e=[],r,n=this._root,a,o,c,h,u,d,f;for(n&&e.push(new Di(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.y0,h=r.z0,u=r.x1,d=r.y1,f=r.z1)&&n.length){var g=(o+u)/2,x=(c+d)/2,y=(h+f)/2;(a=n[7])&&e.push(new Di(a,g,x,y,u,d,f)),(a=n[6])&&e.push(new Di(a,o,x,y,g,d,f)),(a=n[5])&&e.push(new Di(a,g,c,y,u,x,f)),(a=n[4])&&e.push(new Di(a,o,c,y,g,x,f)),(a=n[3])&&e.push(new Di(a,g,x,h,u,d,y)),(a=n[2])&&e.push(new Di(a,o,x,h,g,d,y)),(a=n[1])&&e.push(new Di(a,g,c,h,u,x,y)),(a=n[0])&&e.push(new Di(a,o,c,h,g,x,y))}return this}function hH(i){var e=[],r=[],n;for(this._root&&e.push(new Di(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.z0,d=n.x1,f=n.y1,g=n.z1,x=(c+d)/2,y=(h+f)/2,v=(u+g)/2;(o=a[0])&&e.push(new Di(o,c,h,u,x,y,v)),(o=a[1])&&e.push(new Di(o,x,h,u,d,y,v)),(o=a[2])&&e.push(new Di(o,c,y,u,x,f,v)),(o=a[3])&&e.push(new Di(o,x,y,u,d,f,v)),(o=a[4])&&e.push(new Di(o,c,h,v,x,y,g)),(o=a[5])&&e.push(new Di(o,x,h,v,d,y,g)),(o=a[6])&&e.push(new Di(o,c,y,v,x,f,g)),(o=a[7])&&e.push(new Di(o,x,y,v,d,f,g))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function uH(i){return i[0]}function dH(i){return arguments.length?(this._x=i,this):this._x}function fH(i){return i[1]}function pH(i){return arguments.length?(this._y=i,this):this._y}function gH(i){return i[2]}function mH(i){return arguments.length?(this._z=i,this):this._z}function rC(i,e,r,n){var a=new nC(e??uH,r??fH,n??gH,NaN,NaN,NaN,NaN,NaN,NaN);return i==null?a:a.addAll(i)}function nC(i,e,r,n,a,o,c,h,u){this._x=i,this._y=e,this._z=r,this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this._root=void 0}function wT(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Dr=rC.prototype=nC.prototype;Dr.copy=function(){var i=new nC(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=wT(e),i;for(r=[{source:e,target:i._root=new Array(8)}];e=r.pop();)for(var a=0;a<8;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(8)}):e.target[a]=wT(n));return i};Dr.add=ZU;Dr.addAll=QU;Dr.cover=JU;Dr.data=tH;Dr.extent=eH;Dr.find=iH;Dr.findAllWithinRadius=nH;Dr.remove=aH;Dr.removeAll=sH;Dr.root=oH;Dr.size=lH;Dr.visit=cH;Dr.visitAfter=hH;Dr.x=dH;Dr.y=pH;Dr.z=mH;function kr(i){return function(){return i}}function na(i){return(i()-.5)*1e-6}function t0(i){return i.x+i.vx}function ST(i){return i.y+i.vy}function yH(i){return i.z+i.vz}function bH(i){var e,r,n,a,o=1,c=1;typeof i!="function"&&(i=kr(i==null?1:+i));function h(){for(var f,g=e.length,x,y,v,C,_,k,T,N=0;N<c;++N)for(x=(r===1?J1(e,t0):r===2?eC(e,t0,ST):r===3?rC(e,t0,ST,yH):null).visitAfter(u),f=0;f<g;++f)y=e[f],k=n[y.index],T=k*k,v=y.x+y.vx,r>1&&(C=y.y+y.vy),r>2&&(_=y.z+y.vz),x.visit(E);function E(B,O,A,M,I,D,F){var U=[O,A,M,I,D,F],K=U[0],z=U[1],W=U[2],j=U[r],H=U[r+1],Y=U[r+2],Z=B.data,rt=B.r,G=k+rt;if(Z){if(Z.index>y.index){var tt=v-Z.x-Z.vx,ft=r>1?C-Z.y-Z.vy:0,ct=r>2?_-Z.z-Z.vz:0,vt=tt*tt+ft*ft+ct*ct;vt<G*G&&(tt===0&&(tt=na(a),vt+=tt*tt),r>1&&ft===0&&(ft=na(a),vt+=ft*ft),r>2&&ct===0&&(ct=na(a),vt+=ct*ct),vt=(G-(vt=Math.sqrt(vt)))/vt*o,y.vx+=(tt*=vt)*(G=(rt*=rt)/(T+rt)),r>1&&(y.vy+=(ft*=vt)*G),r>2&&(y.vz+=(ct*=vt)*G),Z.vx-=tt*(G=1-G),r>1&&(Z.vy-=ft*G),r>2&&(Z.vz-=ct*G))}return}return K>v+G||j<v-G||r>1&&(z>C+G||H<C-G)||r>2&&(W>_+G||Y<_-G)}}function u(f){if(f.data)return f.r=n[f.data.index];for(var g=f.r=0;g<Math.pow(2,r);++g)f[g]&&f[g].r>f.r&&(f.r=f[g].r)}function d(){if(e){var f,g=e.length,x;for(n=new Array(g),f=0;f<g;++f)x=e[f],n[x.index]=+i(x,f,e)}}return h.initialize=function(f,...g){e=f,a=g.find(x=>typeof x=="function")||Math.random,r=g.find(x=>[1,2,3].includes(x))||2,d()},h.iterations=function(f){return arguments.length?(c=+f,h):c},h.strength=function(f){return arguments.length?(o=+f,h):o},h.radius=function(f){return arguments.length?(i=typeof f=="function"?f:kr(+f),d(),h):i},h}function xH(i){return i.index}function TT(i,e){var r=i.get(e);if(!r)throw new Error("node not found: "+e);return r}function vH(i){var e=xH,r=x,n,a=kr(30),o,c,h,u,d,f,g=1;i==null&&(i=[]);function x(k){return 1/Math.min(u[k.source.index],u[k.target.index])}function y(k){for(var T=0,N=i.length;T<g;++T)for(var E=0,B,O,A,M=0,I=0,D=0,F,U;E<N;++E)B=i[E],O=B.source,A=B.target,M=A.x+A.vx-O.x-O.vx||na(f),h>1&&(I=A.y+A.vy-O.y-O.vy||na(f)),h>2&&(D=A.z+A.vz-O.z-O.vz||na(f)),F=Math.sqrt(M*M+I*I+D*D),F=(F-o[E])/F*k*n[E],M*=F,I*=F,D*=F,A.vx-=M*(U=d[E]),h>1&&(A.vy-=I*U),h>2&&(A.vz-=D*U),O.vx+=M*(U=1-U),h>1&&(O.vy+=I*U),h>2&&(O.vz+=D*U)}function v(){if(c){var k,T=c.length,N=i.length,E=new Map(c.map((O,A)=>[e(O,A,c),O])),B;for(k=0,u=new Array(T);k<N;++k)B=i[k],B.index=k,typeof B.source!="object"&&(B.source=TT(E,B.source)),typeof B.target!="object"&&(B.target=TT(E,B.target)),u[B.source.index]=(u[B.source.index]||0)+1,u[B.target.index]=(u[B.target.index]||0)+1;for(k=0,d=new Array(N);k<N;++k)B=i[k],d[k]=u[B.source.index]/(u[B.source.index]+u[B.target.index]);n=new Array(N),C(),o=new Array(N),_()}}function C(){if(c)for(var k=0,T=i.length;k<T;++k)n[k]=+r(i[k],k,i)}function _(){if(c)for(var k=0,T=i.length;k<T;++k)o[k]=+a(i[k],k,i)}return y.initialize=function(k,...T){c=k,f=T.find(N=>typeof N=="function")||Math.random,h=T.find(N=>[1,2,3].includes(N))||2,v()},y.links=function(k){return arguments.length?(i=k,v(),y):i},y.id=function(k){return arguments.length?(e=k,y):e},y.iterations=function(k){return arguments.length?(g=+k,y):g},y.strength=function(k){return arguments.length?(r=typeof k=="function"?k:kr(+k),C(),y):r},y.distance=function(k){return arguments.length?(a=typeof k=="function"?k:kr(+k),_(),y):a},y}const CH=1664525,_H=1013904223,ET=4294967296;function kH(){let i=1;return()=>(i=(CH*i+_H)%ET)/ET}var NT=3;function e0(i){return i.x}function AT(i){return i.y}function wH(i){return i.z}var SH=10,TH=Math.PI*(3-Math.sqrt(5)),EH=Math.PI*20/(9+Math.sqrt(221));function NH(i,e){e=e||2;var r=Math.min(NT,Math.max(1,Math.round(e))),n,a=1,o=.001,c=1-Math.pow(o,1/300),h=0,u=.6,d=new Map,f=z1(y),g=Pd("tick","end"),x=kH();i==null&&(i=[]);function y(){v(),g.call("tick",n),a<o&&(f.stop(),g.call("end",n))}function v(k){var T,N=i.length,E;k===void 0&&(k=1);for(var B=0;B<k;++B)for(a+=(h-a)*c,d.forEach(function(O){O(a)}),T=0;T<N;++T)E=i[T],E.fx==null?E.x+=E.vx*=u:(E.x=E.fx,E.vx=0),r>1&&(E.fy==null?E.y+=E.vy*=u:(E.y=E.fy,E.vy=0)),r>2&&(E.fz==null?E.z+=E.vz*=u:(E.z=E.fz,E.vz=0));return n}function C(){for(var k=0,T=i.length,N;k<T;++k){if(N=i[k],N.index=k,N.fx!=null&&(N.x=N.fx),N.fy!=null&&(N.y=N.fy),N.fz!=null&&(N.z=N.fz),isNaN(N.x)||r>1&&isNaN(N.y)||r>2&&isNaN(N.z)){var E=SH*(r>2?Math.cbrt(.5+k):r>1?Math.sqrt(.5+k):k),B=k*TH,O=k*EH;r===1?N.x=E:r===2?(N.x=E*Math.cos(B),N.y=E*Math.sin(B)):(N.x=E*Math.sin(B)*Math.cos(O),N.y=E*Math.cos(B),N.z=E*Math.sin(B)*Math.sin(O))}(isNaN(N.vx)||r>1&&isNaN(N.vy)||r>2&&isNaN(N.vz))&&(N.vx=0,r>1&&(N.vy=0),r>2&&(N.vz=0))}}function _(k){return k.initialize&&k.initialize(i,x,r),k}return C(),n={tick:v,restart:function(){return f.restart(y),n},stop:function(){return f.stop(),n},numDimensions:function(k){return arguments.length?(r=Math.min(NT,Math.max(1,Math.round(k))),d.forEach(_),n):r},nodes:function(k){return arguments.length?(i=k,C(),d.forEach(_),n):i},alpha:function(k){return arguments.length?(a=+k,n):a},alphaMin:function(k){return arguments.length?(o=+k,n):o},alphaDecay:function(k){return arguments.length?(c=+k,n):+c},alphaTarget:function(k){return arguments.length?(h=+k,n):h},velocityDecay:function(k){return arguments.length?(u=1-k,n):1-u},randomSource:function(k){return arguments.length?(x=k,d.forEach(_),n):x},force:function(k,T){return arguments.length>1?(T==null?d.delete(k):d.set(k,_(T)),n):d.get(k)},find:function(){var k=Array.prototype.slice.call(arguments),T=k.shift()||0,N=(r>1?k.shift():null)||0,E=(r>2?k.shift():null)||0,B=k.shift()||1/0,O=0,A=i.length,M,I,D,F,U,K;for(B*=B,O=0;O<A;++O)U=i[O],M=T-U.x,I=N-(U.y||0),D=E-(U.z||0),F=M*M+I*I+D*D,F<B&&(K=U,B=F);return K},on:function(k,T){return arguments.length>1?(g.on(k,T),n):g.on(k)}}}function AH(){var i,e,r,n,a,o=kr(-30),c,h=1,u=1/0,d=.81;function f(v){var C,_=i.length,k=(e===1?J1(i,e0):e===2?eC(i,e0,AT):e===3?rC(i,e0,AT,wH):null).visitAfter(x);for(a=v,C=0;C<_;++C)r=i[C],k.visit(y)}function g(){if(i){var v,C=i.length,_;for(c=new Array(C),v=0;v<C;++v)_=i[v],c[_.index]=+o(_,v,i)}}function x(v){var C=0,_,k,T=0,N,E,B,O,A=v.length;if(A){for(N=E=B=O=0;O<A;++O)(_=v[O])&&(k=Math.abs(_.value))&&(C+=_.value,T+=k,N+=k*(_.x||0),E+=k*(_.y||0),B+=k*(_.z||0));C*=Math.sqrt(4/A),v.x=N/T,e>1&&(v.y=E/T),e>2&&(v.z=B/T)}else{_=v,_.x=_.data.x,e>1&&(_.y=_.data.y),e>2&&(_.z=_.data.z);do C+=c[_.data.index];while(_=_.next)}v.value=C}function y(v,C,_,k,T){if(!v.value)return!0;var N=[_,k,T][e-1],E=v.x-r.x,B=e>1?v.y-r.y:0,O=e>2?v.z-r.z:0,A=N-C,M=E*E+B*B+O*O;if(A*A/d<M)return M<u&&(E===0&&(E=na(n),M+=E*E),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&O===0&&(O=na(n),M+=O*O),M<h&&(M=Math.sqrt(h*M)),r.vx+=E*v.value*a/M,e>1&&(r.vy+=B*v.value*a/M),e>2&&(r.vz+=O*v.value*a/M)),!0;if(v.length||M>=u)return;(v.data!==r||v.next)&&(E===0&&(E=na(n),M+=E*E),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&O===0&&(O=na(n),M+=O*O),M<h&&(M=Math.sqrt(h*M)));do v.data!==r&&(A=c[v.data.index]*a/M,r.vx+=E*A,e>1&&(r.vy+=B*A),e>2&&(r.vz+=O*A));while(v=v.next)}return f.initialize=function(v,...C){i=v,n=C.find(_=>typeof _=="function")||Math.random,e=C.find(_=>[1,2,3].includes(_))||2,g()},f.strength=function(v){return arguments.length?(o=typeof v=="function"?v:kr(+v),g(),f):o},f.distanceMin=function(v){return arguments.length?(h=v*v,f):Math.sqrt(h)},f.distanceMax=function(v){return arguments.length?(u=v*v,f):Math.sqrt(u)},f.theta=function(v){return arguments.length?(d=v*v,f):Math.sqrt(d)},f}function MH(i,e,r,n){var a,o,c=kr(.1),h,u;typeof i!="function"&&(i=kr(+i)),e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function d(g){for(var x=0,y=a.length;x<y;++x){var v=a[x],C=v.x-e||1e-6,_=(v.y||0)-r||1e-6,k=(v.z||0)-n||1e-6,T=Math.sqrt(C*C+_*_+k*k),N=(u[x]-T)*h[x]*g/T;v.vx+=C*N,o>1&&(v.vy+=_*N),o>2&&(v.vz+=k*N)}}function f(){if(a){var g,x=a.length;for(h=new Array(x),u=new Array(x),g=0;g<x;++g)u[g]=+i(a[g],g,a),h[g]=isNaN(u[g])?0:+c(a[g],g,a)}}return d.initialize=function(g,...x){a=g,o=x.find(y=>[1,2,3].includes(y))||2,f()},d.strength=function(g){return arguments.length?(c=typeof g=="function"?g:kr(+g),f(),d):c},d.radius=function(g){return arguments.length?(i=typeof g=="function"?g:kr(+g),f(),d):i},d.x=function(g){return arguments.length?(e=+g,d):e},d.y=function(g){return arguments.length?(r=+g,d):r},d.z=function(g){return arguments.length?(n=+g,d):n},d}function BH(i){var e=kr(.1),r,n,a;typeof i!="function"&&(i=kr(i==null?0:+i));function o(h){for(var u=0,d=r.length,f;u<d;++u)f=r[u],f.vx+=(a[u]-f.x)*n[u]*h}function c(){if(r){var h,u=r.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+i(r[h],h,r))?0:+e(r[h],h,r)}}return o.initialize=function(h){r=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:kr(+h),c(),o):e},o.x=function(h){return arguments.length?(i=typeof h=="function"?h:kr(+h),c(),o):i},o}function LH(i){var e=kr(.1),r,n,a;typeof i!="function"&&(i=kr(i==null?0:+i));function o(h){for(var u=0,d=r.length,f;u<d;++u)f=r[u],f.vy+=(a[u]-f.y)*n[u]*h}function c(){if(r){var h,u=r.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+i(r[h],h,r))?0:+e(r[h],h,r)}}return o.initialize=function(h){r=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:kr(+h),c(),o):e},o.y=function(h){return arguments.length?(i=typeof h=="function"?h:kr(+h),c(),o):i},o}const{abs:Su,cos:xs,sin:Tc,acos:OH,atan2:Tu,sqrt:po,pow:ea}=Math;function Eu(i){return i<0?-ea(-i,1/3):ea(i,1/3)}const OB=Math.PI,Cp=2*OB,go=OB/2,RH=1e-6,i0=Number.MAX_SAFE_INTEGER||9007199254740991,r0=Number.MIN_SAFE_INTEGER||-9007199254740991,jH={x:0,y:0,z:0},Pt={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(i,e){const r=e(i);let n=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(n+=r.z*r.z),po(n)},compute:function(i,e,r){if(i===0)return e[0].t=0,e[0];const n=e.length-1;if(i===1)return e[n].t=1,e[n];const a=1-i;let o=e;if(n===0)return e[0].t=i,e[0];if(n===1){const h={x:a*o[0].x+i*o[1].x,y:a*o[0].y+i*o[1].y,t:i};return r&&(h.z=a*o[0].z+i*o[1].z),h}if(n<4){let h=a*a,u=i*i,d,f,g,x=0;n===2?(o=[o[0],o[1],o[2],jH],d=h,f=a*i*2,g=u):n===3&&(d=h*a,f=h*i*3,g=a*u*3,x=i*u);const y={x:d*o[0].x+f*o[1].x+g*o[2].x+x*o[3].x,y:d*o[0].y+f*o[1].y+g*o[2].y+x*o[3].y,t:i};return r&&(y.z=d*o[0].z+f*o[1].z+g*o[2].z+x*o[3].z),y}const c=JSON.parse(JSON.stringify(e));for(;c.length>1;){for(let h=0;h<c.length-1;h++)c[h]={x:c[h].x+(c[h+1].x-c[h].x)*i,y:c[h].y+(c[h+1].y-c[h].y)*i},typeof c[h].z<"u"&&(c[h].z=c[h].z+(c[h+1].z-c[h].z)*i);c.splice(c.length-1,1)}return c[0].t=i,c[0]},computeWithRatios:function(i,e,r,n){const a=1-i,o=r,c=e;let h=o[0],u=o[1],d=o[2],f=o[3],g;if(h*=a,u*=i,c.length===2)return g=h+u,{x:(h*c[0].x+u*c[1].x)/g,y:(h*c[0].y+u*c[1].y)/g,z:n?(h*c[0].z+u*c[1].z)/g:!1,t:i};if(h*=a,u*=2*a,d*=i*i,c.length===3)return g=h+u+d,{x:(h*c[0].x+u*c[1].x+d*c[2].x)/g,y:(h*c[0].y+u*c[1].y+d*c[2].y)/g,z:n?(h*c[0].z+u*c[1].z+d*c[2].z)/g:!1,t:i};if(h*=a,u*=1.5*a,d*=3*a,f*=i*i*i,c.length===4)return g=h+u+d+f,{x:(h*c[0].x+u*c[1].x+d*c[2].x+f*c[3].x)/g,y:(h*c[0].y+u*c[1].y+d*c[2].y+f*c[3].y)/g,z:n?(h*c[0].z+u*c[1].z+d*c[2].z+f*c[3].z)/g:!1,t:i}},derive:function(i,e){const r=[];for(let n=i,a=n.length,o=a-1;a>1;a--,o--){const c=[];for(let h=0,u;h<o;h++)u={x:o*(n[h+1].x-n[h].x),y:o*(n[h+1].y-n[h].y)},e&&(u.z=o*(n[h+1].z-n[h].z)),c.push(u);r.push(c),n=c}return r},between:function(i,e,r){return e<=i&&i<=r||Pt.approximately(i,e)||Pt.approximately(i,r)},approximately:function(i,e,r){return Su(i-e)<=(r||RH)},length:function(i){const r=Pt.Tvalues.length;let n=0;for(let a=0,o;a<r;a++)o=.5*Pt.Tvalues[a]+.5,n+=Pt.Cvalues[a]*Pt.arcfn(o,i);return .5*n},map:function(i,e,r,n,a){const o=r-e,c=a-n,h=i-e,u=h/o;return n+c*u},lerp:function(i,e,r){const n={x:e.x+i*(r.x-e.x),y:e.y+i*(r.y-e.y)};return e.z!==void 0&&r.z!==void 0&&(n.z=e.z+i*(r.z-e.z)),n},pointToString:function(i){let e=i.x+"/"+i.y;return typeof i.z<"u"&&(e+="/"+i.z),e},pointsToString:function(i){return"["+i.map(Pt.pointToString).join(", ")+"]"},copy:function(i){return JSON.parse(JSON.stringify(i))},angle:function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=r.x-i.x,c=r.y-i.y,h=n*c-a*o,u=n*o+a*c;return Tu(h,u)},round:function(i,e){const r=""+i,n=r.indexOf(".");return parseFloat(r.substring(0,n+1+e))},dist:function(i,e){const r=i.x-e.x,n=i.y-e.y;return po(r*r+n*n)},closest:function(i,e){let r=ea(2,63),n,a;return i.forEach(function(o,c){a=Pt.dist(e,o),a<r&&(r=a,n=c)}),{mdist:r,mpos:n}},abcratio:function(i,e){if(e!==2&&e!==3)return!1;if(typeof i>"u")i=.5;else if(i===0||i===1)return i;const r=ea(i,e)+ea(1-i,e),n=r-1;return Su(n/r)},projectionratio:function(i,e){if(e!==2&&e!==3)return!1;if(typeof i>"u")i=.5;else if(i===0||i===1)return i;const r=ea(1-i,e),n=ea(i,e)+r;return r/n},lli8:function(i,e,r,n,a,o,c,h){const u=(i*n-e*r)*(a-c)-(i-r)*(a*h-o*c),d=(i*n-e*r)*(o-h)-(e-n)*(a*h-o*c),f=(i-r)*(o-h)-(e-n)*(a-c);return f==0?!1:{x:u/f,y:d/f}},lli4:function(i,e,r,n){const a=i.x,o=i.y,c=e.x,h=e.y,u=r.x,d=r.y,f=n.x,g=n.y;return Pt.lli8(a,o,c,h,u,d,f,g)},lli:function(i,e){return Pt.lli4(i,i.c,e,e.c)},makeline:function(i,e){return new $i(i.x,i.y,(i.x+e.x)/2,(i.y+e.y)/2,e.x,e.y)},findbbox:function(i){let e=i0,r=i0,n=r0,a=r0;return i.forEach(function(o){const c=o.bbox();e>c.x.min&&(e=c.x.min),r>c.y.min&&(r=c.y.min),n<c.x.max&&(n=c.x.max),a<c.y.max&&(a=c.y.max)}),{x:{min:e,mid:(e+n)/2,max:n,size:n-e},y:{min:r,mid:(r+a)/2,max:a,size:a-r}}},shapeintersections:function(i,e,r,n,a){if(!Pt.bboxoverlap(e,n))return[];const o=[],c=[i.startcap,i.forward,i.back,i.endcap],h=[r.startcap,r.forward,r.back,r.endcap];return c.forEach(function(u){u.virtual||h.forEach(function(d){if(d.virtual)return;const f=u.intersects(d,a);f.length>0&&(f.c1=u,f.c2=d,f.s1=i,f.s2=r,o.push(f))})}),o},makeshape:function(i,e,r){const n=e.points.length,a=i.points.length,o=Pt.makeline(e.points[n-1],i.points[0]),c=Pt.makeline(i.points[a-1],e.points[0]),h={startcap:o,forward:i,back:e,endcap:c,bbox:Pt.findbbox([o,i,e,c])};return h.intersections=function(u){return Pt.shapeintersections(h,h.bbox,u,u.bbox,r)},h},getminmax:function(i,e,r){if(!r)return{min:0,max:0};let n=i0,a=r0,o,c;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let h=0,u=r.length;h<u;h++)o=r[h],c=i.get(o),c[e]<n&&(n=c[e]),c[e]>a&&(a=c[e]);return{min:n,mid:(n+a)/2,max:a,size:a-n}},align:function(i,e){const r=e.p1.x,n=e.p1.y,a=-Tu(e.p2.y-n,e.p2.x-r),o=function(c){return{x:(c.x-r)*xs(a)-(c.y-n)*Tc(a),y:(c.x-r)*Tc(a)+(c.y-n)*xs(a)}};return i.map(o)},roots:function(i,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=i.length-1,n=Pt.align(i,e),a=function(A){return 0<=A&&A<=1};if(r===2){const A=n[0].y,M=n[1].y,I=n[2].y,D=A-2*M+I;if(D!==0){const F=-po(M*M-A*I),U=-A+M,K=-(F+U)/D,z=-(-F+U)/D;return[K,z].filter(a)}else if(M!==I&&D===0)return[(2*M-I)/(2*M-2*I)].filter(a);return[]}const o=n[0].y,c=n[1].y,h=n[2].y,u=n[3].y;let d=-o+3*c-3*h+u,f=3*o-6*c+3*h,g=-3*o+3*c,x=o;if(Pt.approximately(d,0)){if(Pt.approximately(f,0))return Pt.approximately(g,0)?[]:[-x/g].filter(a);const A=po(g*g-4*f*x),M=2*f;return[(A-g)/M,(-g-A)/M].filter(a)}f/=d,g/=d,x/=d;const y=(3*g-f*f)/3,v=y/3,C=(2*f*f*f-9*f*g+27*x)/27,_=C/2,k=_*_+v*v*v;let T,N,E,B,O;if(k<0){const A=-y/3,M=A*A*A,I=po(M),D=-C/(2*I),F=D<-1?-1:D>1?1:D,U=OH(F),K=Eu(I),z=2*K;return E=z*xs(U/3)-f/3,B=z*xs((U+Cp)/3)-f/3,O=z*xs((U+2*Cp)/3)-f/3,[E,B,O].filter(a)}else{if(k===0)return T=_<0?Eu(-_):-Eu(_),E=2*T-f/3,B=-T-f/3,[E,B].filter(a);{const A=po(k);return T=Eu(-_+A),N=Eu(_+A),[T-N-f/3].filter(a)}}},droots:function(i){if(i.length===3){const e=i[0],r=i[1],n=i[2],a=e-2*r+n;if(a!==0){const o=-po(r*r-e*n),c=-e+r,h=-(o+c)/a,u=-(-o+c)/a;return[h,u]}else if(r!==n&&a===0)return[(2*r-n)/(2*(r-n))];return[]}if(i.length===2){const e=i[0],r=i[1];return e!==r?[e/(e-r)]:[]}return[]},curvature:function(i,e,r,n,a){let o,c,h,u,d=0,f=0;const g=Pt.compute(i,e),x=Pt.compute(i,r),y=g.x*g.x+g.y*g.y;if(n?(o=po(ea(g.y*x.z-x.y*g.z,2)+ea(g.z*x.x-x.z*g.x,2)+ea(g.x*x.y-x.x*g.y,2)),c=ea(y+g.z*g.z,3/2)):(o=g.x*x.y-g.y*x.x,c=ea(y,3/2)),o===0||c===0)return{k:0,r:0};if(d=o/c,f=c/o,!a){const v=Pt.curvature(i-.001,e,r,n,!0).k,C=Pt.curvature(i+.001,e,r,n,!0).k;u=(C-d+(d-v))/2,h=(Su(C-d)+Su(d-v))/2}return{k:d,r:f,dk:u,adk:h}},inflections:function(i){if(i.length<4)return[];const e=Pt.align(i,{p1:i[0],p2:i.slice(-1)[0]}),r=e[2].x*e[1].y,n=e[3].x*e[1].y,a=e[1].x*e[2].y,o=e[3].x*e[2].y,c=18*(-3*r+2*n+3*a-o),h=18*(3*r-n-3*a),u=18*(a-r);if(Pt.approximately(c,0)){if(!Pt.approximately(h,0)){let x=-u/h;if(0<=x&&x<=1)return[x]}return[]}const d=2*c;if(Pt.approximately(d,0))return[];const f=h*h-4*c*u;if(f<0)return[];const g=Math.sqrt(f);return[(g-h)/d,-(h+g)/d].filter(function(x){return 0<=x&&x<=1})},bboxoverlap:function(i,e){const r=["x","y"],n=r.length;for(let a=0,o,c,h,u;a<n;a++)if(o=r[a],c=i[o].mid,h=e[o].mid,u=(i[o].size+e[o].size)/2,Su(c-h)>=u)return!1;return!0},expandbox:function(i,e){e.x.min<i.x.min&&(i.x.min=e.x.min),e.y.min<i.y.min&&(i.y.min=e.y.min),e.z&&e.z.min<i.z.min&&(i.z.min=e.z.min),e.x.max>i.x.max&&(i.x.max=e.x.max),e.y.max>i.y.max&&(i.y.max=e.y.max),e.z&&e.z.max>i.z.max&&(i.z.max=e.z.max),i.x.mid=(i.x.min+i.x.max)/2,i.y.mid=(i.y.min+i.y.max)/2,i.z&&(i.z.mid=(i.z.min+i.z.max)/2),i.x.size=i.x.max-i.x.min,i.y.size=i.y.max-i.y.min,i.z&&(i.z.size=i.z.max-i.z.min)},pairiteration:function(i,e,r){const n=i.bbox(),a=e.bbox(),o=1e5,c=r||.5;if(n.x.size+n.y.size<c&&a.x.size+a.y.size<c)return[(o*(i._t1+i._t2)/2|0)/o+"/"+(o*(e._t1+e._t2)/2|0)/o];let h=i.split(.5),u=e.split(.5),d=[{left:h.left,right:u.left},{left:h.left,right:u.right},{left:h.right,right:u.right},{left:h.right,right:u.left}];d=d.filter(function(g){return Pt.bboxoverlap(g.left.bbox(),g.right.bbox())});let f=[];return d.length===0||(d.forEach(function(g){f=f.concat(Pt.pairiteration(g.left,g.right,c))}),f=f.filter(function(g,x){return f.indexOf(g)===x})),f},getccenter:function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=r.x-e.x,c=r.y-e.y,h=n*xs(go)-a*Tc(go),u=n*Tc(go)+a*xs(go),d=o*xs(go)-c*Tc(go),f=o*Tc(go)+c*xs(go),g=(i.x+e.x)/2,x=(i.y+e.y)/2,y=(e.x+r.x)/2,v=(e.y+r.y)/2,C=g+h,_=x+u,k=y+d,T=v+f,N=Pt.lli8(g,x,C,_,y,v,k,T),E=Pt.dist(N,i);let B=Tu(i.y-N.y,i.x-N.x),O=Tu(e.y-N.y,e.x-N.x),A=Tu(r.y-N.y,r.x-N.x),M;return B<A?((B>O||O>A)&&(B+=Cp),B>A&&(M=A,A=B,B=M)):A<O&&O<B?(M=A,A=B,B=M):A+=Cp,N.s=B,N.e=A,N.r=E,N},numberSort:function(i,e){return i-e}};class ld{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(e){return Pt.pointsToString(e.points)}).join(", ")+"]"}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,r){return e+r})}curve(e){return this.curves[e]}bbox(){const e=this.curves;for(var r=e[0].bbox(),n=1;n<e.length;n++)Pt.expandbox(r,e[n].bbox());return r}offset(e){const r=[];return this.curves.forEach(function(n){r.push(...n.offset(e))}),new ld(r)}}const{abs:Nu,min:MT,max:BT,cos:DH,sin:FH,acos:IH,sqrt:Au}=Math,$H=Math.PI;class $i{constructor(e){let r=e&&e.forEach?e:Array.from(arguments).slice(),n=!1;if(typeof r[0]=="object"){n=r.length;const y=[];r.forEach(function(v){["x","y","z"].forEach(function(C){typeof v[C]<"u"&&y.push(v[C])})}),r=y}let a=!1;const o=r.length;if(n){if(n>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const c=this._3d=!a&&(o===9||o===12)||e&&e[0]&&typeof e[0].z<"u",h=this.points=[];for(let y=0,v=c?3:2;y<o;y+=v){var u={x:r[y],y:r[y+1]};c&&(u.z=r[y+2]),h.push(u)}const d=this.order=h.length-1,f=this.dims=["x","y"];c&&f.push("z"),this.dimlen=f.length;const g=Pt.align(h,{p1:h[0],p2:h[d]}),x=Pt.dist(h[0],h[d]);this._linear=g.reduce((y,v)=>y+Nu(v.y),0)<x/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(e,r,n,a){if(typeof a>"u"&&(a=.5),a===0)return new $i(r,r,n);if(a===1)return new $i(e,r,r);const o=$i.getABC(2,e,r,n,a);return new $i(e,o.A,n)}static cubicFromPoints(e,r,n,a,o){typeof a>"u"&&(a=.5);const c=$i.getABC(3,e,r,n,a);typeof o>"u"&&(o=Pt.dist(r,c.C));const h=o*(1-a)/a,u=Pt.dist(e,n),d=(n.x-e.x)/u,f=(n.y-e.y)/u,g=o*d,x=o*f,y=h*d,v=h*f,C={x:r.x-g,y:r.y-x},_={x:r.x+y,y:r.y+v},k=c.A,T={x:k.x+(C.x-k.x)/(1-a),y:k.y+(C.y-k.y)/(1-a)},N={x:k.x+(_.x-k.x)/a,y:k.y+(_.y-k.y)/a},E={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},B={x:n.x+(N.x-n.x)/(1-a),y:n.y+(N.y-n.y)/(1-a)};return new $i(e,E,B,n)}static getUtils(){return Pt}getUtils(){return $i.getUtils()}static get PolyBezier(){return ld}valueOf(){return this.toString()}toString(){return Pt.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,r=e[0].x,n=e[0].y,a=["M",r,n,this.order===2?"Q":"C"];for(let o=1,c=e.length;o<c;o++)a.push(e[o].x),a.push(e[o].y);return a.join(" ")}setRatios(e){if(e.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=e,this._lut=[]}verify(){const e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,r){return""+r+e.x+e.y+(e.z?e.z:0)}).join("")}update(){this._lut=[],this.dpoints=Pt.derive(this.points,this._3d),this.computedirection()}computedirection(){const e=this.points,r=Pt.angle(e[0],e[this.order],e[1]);this.clockwise=r>0}length(){return Pt.length(this.derivative.bind(this))}static getABC(e=2,r,n,a,o=.5){const c=Pt.projectionratio(o,e),h=1-c,u={x:c*r.x+h*a.x,y:c*r.y+h*a.y},d=Pt.abcratio(o,e);return{A:{x:n.x+(n.x-u.x)/d,y:n.y+(n.y-u.y)/d},B:n,C:u,S:r,E:a}}getABC(e,r){r=r||this.get(e);let n=this.points[0],a=this.points[this.order];return $i.getABC(this.order,n,r,a,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let r=0,n,a;r<e;r++)a=r/(e-1),n=this.compute(a),n.t=a,this._lut.push(n);return this._lut}on(e,r){r=r||5;const n=this.getLUT(),a=[];for(let o=0,c,h=0;o<n.length;o++)c=n[o],Pt.dist(c,e)<r&&(a.push(c),h+=o/n.length);return a.length?t/=a.length:!1}project(e){const r=this.getLUT(),n=r.length-1,a=Pt.closest(r,e),o=a.mpos,c=(o-1)/n,h=(o+1)/n,u=.1/n;let d=a.mdist,f=c,g=f,x;d+=1;for(let y;f<h+u;f+=u)x=this.compute(f),y=Pt.dist(e,x),y<d&&(d=y,g=f);return g=g<0?0:g>1?1:g,x=this.compute(g),x.t=g,x.d=d,x}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Pt.computeWithRatios(e,this.points,this.ratios,this._3d):Pt.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,r=[e[0]],n=e.length;for(let a=1,o,c;a<n;a++)o=e[a],c=e[a-1],r[a]={x:(n-a)/n*o.x+a/n*c.x,y:(n-a)/n*o.y+a/n*c.y};return r[n]=e[n-1],new $i(r)}derivative(e){return Pt.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Pt.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new $i(Pt.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return Pt.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Pt.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){const r=this.derivative(e),n=Au(r.x*r.x+r.y*r.y);return{t:e,x:-r.y/n,y:r.x/n}}__normal3(e){const r=this.derivative(e),n=this.derivative(e+.01),a=Au(r.x*r.x+r.y*r.y+r.z*r.z),o=Au(n.x*n.x+n.y*n.y+n.z*n.z);r.x/=a,r.y/=a,r.z/=a,n.x/=o,n.y/=o,n.z/=o;const c={x:n.y*r.z-n.z*r.y,y:n.z*r.x-n.x*r.z,z:n.x*r.y-n.y*r.x},h=Au(c.x*c.x+c.y*c.y+c.z*c.z);c.x/=h,c.y/=h,c.z/=h;const u=[c.x*c.x,c.x*c.y-c.z,c.x*c.z+c.y,c.x*c.y+c.z,c.y*c.y,c.y*c.z-c.x,c.x*c.z-c.y,c.y*c.z+c.x,c.z*c.z];return{t:e,x:u[0]*r.x+u[1]*r.y+u[2]*r.z,y:u[3]*r.x+u[4]*r.y+u[5]*r.z,z:u[6]*r.x+u[7]*r.y+u[8]*r.z}}hull(e){let r=this.points,n=[],a=[],o=0;for(a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],this.order===3&&(a[o++]=r[3]);r.length>1;){n=[];for(let c=0,h,u=r.length-1;c<u;c++)h=Pt.lerp(e,r[c],r[c+1]),a[o++]=h,n.push(h);r=n}return a}split(e,r){if(e===0&&r)return this.split(r).left;if(r===1)return this.split(e).right;const n=this.hull(e),a={left:this.order===2?new $i([n[0],n[3],n[5]]):new $i([n[0],n[4],n[7],n[9]]),right:this.order===2?new $i([n[5],n[4],n[2]]):new $i([n[9],n[8],n[6],n[3]]),span:n};return a.left._t1=Pt.map(0,0,1,this._t1,this._t2),a.left._t2=Pt.map(e,0,1,this._t1,this._t2),a.right._t1=Pt.map(e,0,1,this._t1,this._t2),a.right._t2=Pt.map(1,0,1,this._t1,this._t2),r?(r=Pt.map(r,e,1,0,1),a.right.split(r).left):a}extrema(){const e={};let r=[];return this.dims.forEach((function(n){let a=function(c){return c[n]},o=this.dpoints[0].map(a);e[n]=Pt.droots(o),this.order===3&&(o=this.dpoints[1].map(a),e[n]=e[n].concat(Pt.droots(o))),e[n]=e[n].filter(function(c){return c>=0&&c<=1}),r=r.concat(e[n].sort(Pt.numberSort))}).bind(this)),e.values=r.sort(Pt.numberSort).filter(function(n,a){return r.indexOf(n)===a}),e}bbox(){const e=this.extrema(),r={};return this.dims.forEach((function(n){r[n]=Pt.getminmax(this,n,e[n])}).bind(this)),r}overlaps(e){const r=this.bbox(),n=e.bbox();return Pt.bboxoverlap(r,n)}offset(e,r){if(typeof r<"u"){const n=this.get(e),a=this.normal(e),o={c:n,n:a,x:n.x+a.x*r,y:n.y+a.y*r};return this._3d&&(o.z=n.z+a.z*r),o}if(this._linear){const n=this.normal(0),a=this.points.map(function(o){const c={x:o.x+e*n.x,y:o.y+e*n.y};return o.z&&n.z&&(c.z=o.z+e*n.z),c});return[new $i(a)]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(this.order===3){const a=Pt.angle(this.points[0],this.points[3],this.points[1]),o=Pt.angle(this.points[0],this.points[3],this.points[2]);if(a>0&&o<0||a<0&&o>0)return!1}const e=this.normal(0),r=this.normal(1);let n=e.x*r.x+e.y*r.y;return this._3d&&(n+=e.z*r.z),Nu(IH(n))<$H/3}reduce(){let e,r=0,n=0,a=.01,o,c=[],h=[],u=this.extrema().values;for(u.indexOf(0)===-1&&(u=[0].concat(u)),u.indexOf(1)===-1&&u.push(1),r=u[0],e=1;e<u.length;e++)n=u[e],o=this.split(r,n),o._t1=r,o._t2=n,c.push(o),r=n;return c.forEach(function(d){for(r=0,n=0;n<=1;)for(n=r+a;n<=1+a;n+=a)if(o=d.split(r,n),!o.simple()){if(n-=a,Nu(r-n)<a)return[];o=d.split(r,n),o._t1=Pt.map(r,0,1,d._t1,d._t2),o._t2=Pt.map(n,0,1,d._t1,d._t2),h.push(o),r=n;break}r<1&&(o=d.split(r,1),o._t1=Pt.map(r,0,1,d._t1,d._t2),o._t2=d._t2,h.push(o))}),h}translate(e,r,n){n=typeof n=="number"?n:r;const a=this.order;let o=this.points.map((c,h)=>(1-h/a)*r+h/a*n);return new $i(this.points.map((c,h)=>({x:c.x+e.x*o[h],y:c.y+e.y*o[h]})))}scale(e){const r=this.order;let n=!1;if(typeof e=="function"&&(n=e),n&&r===2)return this.raise().scale(n);const a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const c=n?n(0):e,h=n?n(1):e,u=[this.offset(0,10),this.offset(1,10)],d=[],f=Pt.lli4(u[0],u[0].c,u[1],u[1].c);if(!f)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(g){const x=d[g*r]=Pt.copy(o[g*r]);x.x+=(g?h:c)*u[g].n.x,x.y+=(g?h:c)*u[g].n.y}),n?([0,1].forEach(function(g){if(!(r===2&&g)){var x=o[g+1],y={x:x.x-f.x,y:x.y-f.y},v=n?n((g+1)/r):e;n&&!a&&(v=-v);var C=Au(y.x*y.x+y.y*y.y);y.x/=C,y.y/=C,d[g+1]={x:x.x+v*y.x,y:x.y+v*y.y}}}),new $i(d)):([0,1].forEach(g=>{if(r===2&&g)return;const x=d[g*r],y=this.derivative(g),v={x:x.x+y.x,y:x.y+y.y};d[g+1]=Pt.lli4(x,v,f,o[g+1])}),new $i(d))}outline(e,r,n,a){if(r=r===void 0?e:r,this._linear){const B=this.normal(0),O=this.points[0],A=this.points[this.points.length-1];let M,I,D;n===void 0&&(n=e,a=r),M={x:O.x+B.x*e,y:O.y+B.y*e},D={x:A.x+B.x*n,y:A.y+B.y*n},I={x:(M.x+D.x)/2,y:(M.y+D.y)/2};const F=[M,I,D];M={x:O.x-B.x*r,y:O.y-B.y*r},D={x:A.x-B.x*a,y:A.y-B.y*a},I={x:(M.x+D.x)/2,y:(M.y+D.y)/2};const U=[D,I,M],K=Pt.makeline(U[2],F[0]),z=Pt.makeline(F[2],U[0]),W=[K,new $i(F),z,new $i(U)];return new ld(W)}const o=this.reduce(),c=o.length,h=[];let u=[],d,f=0,g=this.length();const x=typeof n<"u"&&typeof a<"u";function y(B,O,A,M,I){return function(D){const F=M/A,U=(M+I)/A,K=O-B;return Pt.map(D,0,1,B+F*K,B+U*K)}}o.forEach(function(B){const O=B.length();x?(h.push(B.scale(y(e,n,g,f,O))),u.push(B.scale(y(-r,-a,g,f,O)))):(h.push(B.scale(e)),u.push(B.scale(-r))),f+=O}),u=u.map(function(B){return d=B.points,d[3]?B.points=[d[3],d[2],d[1],d[0]]:B.points=[d[2],d[1],d[0]],B}).reverse();const v=h[0].points[0],C=h[c-1].points[h[c-1].points.length-1],_=u[c-1].points[u[c-1].points.length-1],k=u[0].points[0],T=Pt.makeline(_,v),N=Pt.makeline(C,k),E=[T].concat(h).concat([N]).concat(u);return new ld(E)}outlineshapes(e,r,n){r=r||e;const a=this.outline(e,r).curves,o=[];for(let c=1,h=a.length;c<h/2;c++){const u=Pt.makeshape(a[c],a[h-c],n);u.startcap.virtual=c>1,u.endcap.virtual=c<h/2-1,o.push(u)}return o}intersects(e,r){return e?e.p1&&e.p2?this.lineIntersects(e):(e instanceof $i&&(e=e.reduce()),this.curveintersects(this.reduce(),e,r)):this.selfintersects(r)}lineIntersects(e){const r=MT(e.p1.x,e.p2.x),n=MT(e.p1.y,e.p2.y),a=BT(e.p1.x,e.p2.x),o=BT(e.p1.y,e.p2.y);return Pt.roots(this.points,e).filter(c=>{var h=this.get(c);return Pt.between(h.x,r,a)&&Pt.between(h.y,n,o)})}selfintersects(e){const r=this.reduce(),n=r.length-2,a=[];for(let o=0,c,h,u;o<n;o++)h=r.slice(o,o+1),u=r.slice(o+2),c=this.curveintersects(h,u,e),a.push(...c);return a}curveintersects(e,r,n){const a=[];e.forEach(function(c){r.forEach(function(h){c.overlaps(h)&&a.push({left:c,right:h})})});let o=[];return a.forEach(function(c){const h=Pt.pairiteration(c.left,c.right,n);h.length>0&&(o=o.concat(h))}),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,r,n,a){const o=(a-n)/4,c=this.get(n+o),h=this.get(a-o),u=Pt.dist(e,r),d=Pt.dist(e,c),f=Pt.dist(e,h);return Nu(d-u)+Nu(f-u)}_iterate(e,r){let n=0,a=1,o;do{o=0,a=1;let c=this.get(n),h,u,d,f,g=!1,x=!1,y,v=a,C=1;do if(x=g,f=d,v=(n+a)/2,h=this.get(v),u=this.get(a),d=Pt.getccenter(c,h,u),d.interval={start:n,end:a},g=this._error(d,c,n,a)<=e,y=x&&!g,y||(C=a),g){if(a>=1){if(d.interval.end=C=1,f=d,a>1){let k={x:d.x+d.r*DH(d.e),y:d.y+d.r*FH(d.e)};d.e+=Pt.angle({x:d.x,y:d.y},k,this.get(1))}break}a=a+(a-n)/2}else a=v;while(!y&&o++<100);if(o>=100)break;f=f||d,r.push(f),n=C}while(a<1);return r}}function bv(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function zH(i){if(Array.isArray(i))return i}function PH(i){if(Array.isArray(i))return bv(i)}function qH(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function UH(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function HH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
69
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
70
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GH(i,e){if(i==null)return{};var r,n,a=YH(i,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(n=0;n<o.length;n++)r=o[n],e.includes(r)||{}.propertyIsEnumerable.call(i,r)&&(a[r]=i[r])}return a}function YH(i,e){if(i==null)return{};var r={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.includes(n))continue;r[n]=i[n]}return r}function KH(i,e){return zH(i)||UH(i,e)||RB(i,e)||HH()}function VH(i){return PH(i)||qH(i)||RB(i)||WH()}function XH(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function ZH(i){var e=XH(i,"string");return typeof e=="symbol"?e:e+""}function RB(i,e){if(i){if(typeof i=="string")return bv(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bv(i,e):void 0}}var QH=(function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(e instanceof Array?e.length?e:[void 0]:[e]).map(function(h){return{keyAccessor:h,isProp:!(h instanceof Function)}}),o=i.reduce(function(h,u){var d=h,f=u;return a.forEach(function(g,x){var y=g.keyAccessor,v=g.isProp,C;if(v){var _=f,k=_[y],T=GH(_,[y].map(ZH));C=k,f=T}else C=y(f,x);x+1<a.length?(d.hasOwnProperty(C)||(d[C]={}),d=d[C]):r?(d.hasOwnProperty(C)||(d[C]=[]),d[C].push(f)):d[C]=f}),h},{});r instanceof Function&&(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===a.length?Object.keys(u).forEach(function(f){return u[f]=r(u[f])}):Object.values(u).forEach(function(f){return h(f,d+1)})})(o);var c=o;return n&&(c=[],(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===a.length?c.push({keys:d,vals:u}):Object.entries(u).forEach(function(f){var g=KH(f,2),x=g[0],y=g[1];return h(y,[].concat(VH(d),[x]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function JH(i,e){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(e).domain(i);break}return this}const LT=Symbol("implicit");function jB(){var i=new R2,e=[],r=[],n=LT;function a(o){let c=i.get(o);if(c===void 0){if(n!==LT)return n;i.set(o,c=e.push(o)-1)}return r[c%r.length]}return a.domain=function(o){if(!arguments.length)return e.slice();e=[],i=new R2;for(const c of o)i.has(c)||i.set(c,e.push(c)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return jB(e,r).unknown(n)},JH.apply(a,arguments),a}function tW(i){for(var e=i.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+i.slice(n*6,++n*6);return r}const eW=tW("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function iW(i,e){e===void 0&&(e={});var r=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}}var rW=`.force-graph-container canvas {
|
|
71
|
-
display: block;
|
|
72
|
-
user-select: none;
|
|
73
|
-
outline: none;
|
|
74
|
-
-webkit-tap-highlight-color: transparent;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.force-graph-container .clickable {
|
|
78
|
-
cursor: pointer;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.force-graph-container .grabbable {
|
|
82
|
-
cursor: move;
|
|
83
|
-
cursor: grab;
|
|
84
|
-
cursor: -moz-grab;
|
|
85
|
-
cursor: -webkit-grab;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.force-graph-container .grabbable:active {
|
|
89
|
-
cursor: grabbing;
|
|
90
|
-
cursor: -moz-grabbing;
|
|
91
|
-
cursor: -webkit-grabbing;
|
|
92
|
-
}
|
|
93
|
-
`;iW(rW);function xv(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function nW(i){if(Array.isArray(i))return i}function aW(i){if(Array.isArray(i))return xv(i)}function OT(i,e,r){if(DB())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var a=new(i.bind.apply(i,n));return a}function Sd(i,e,r){return(e=uW(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function DB(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DB=function(){return!!i})()}function sW(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function oW(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function lW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RT(i,e){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),r.push.apply(r,n)}return r}function Ec(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?RT(Object(r),!0).forEach(function(n){Sd(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):RT(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function cd(i,e){return nW(i)||oW(i,e)||FB(i,e)||lW()}function aa(i){return aW(i)||sW(i)||FB(i)||cW()}function hW(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function uW(i){var e=hW(i,"string");return typeof e=="symbol"?e:e+""}function vv(i){"@babel/helpers - typeof";return vv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vv(i)}function FB(i,e){if(i){if(typeof i=="string")return xv(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xv(i,e):void 0}}var dW=jB(eW);function jT(i,e,r){!e||typeof r!="string"||i.filter(function(n){return!n[r]}).forEach(function(n){n[r]=dW(e(n))})}function fW(i,e){var r=i.nodes,n=i.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,c=o===void 0?function(){return!0}:o,h=a.onLoopError,u=h===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:h,d={};r.forEach(function(y){return d[e(y)]={data:y,out:[],depth:-1,skip:!c(y)}}),n.forEach(function(y){var v=y.source,C=y.target,_=E(v),k=E(C);if(!d.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!d.hasOwnProperty(k))throw"Missing target node with id: ".concat(k);var T=d[_],N=d[k];T.out.push(N);function E(B){return vv(B)==="object"?e(B):B}});var f=[];x(Object.values(d));var g=Object.assign.apply(Object,[{}].concat(aa(Object.entries(d).filter(function(y){var v=cd(y,2),C=v[1];return!C.skip}).map(function(y){var v=cd(y,2),C=v[0],_=v[1];return Sd({},C,_.depth)}))));return g;function x(y){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var E=y[k];if(v.indexOf(E)!==-1){var B=[].concat(aa(v.slice(v.indexOf(E))),[E]).map(function(O){return e(O.data)});return f.some(function(O){return O.length===B.length&&O.every(function(A,M){return A===B[M]})})||(f.push(B),u(B)),1}C>E.depth&&(E.depth=C,x(E.out,[].concat(aa(v),[E]),C+(E.skip?0:1)))},k=0,T=y.length;k<T;k++)_()}}var pW=2,$r=function(e,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},DT=function(e,r){if(!r.isShadow){var n=xi(r.linkDirectionalParticles);r.graphData.links.forEach(function(a){var o=Math.round(Math.abs(n(a)));o?a.__photons=aa(Array(o)).map(function(){return{}}):delete a.__photons})}},wg=K1({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,r){r.engineRunning=!1,DT(e,r)}},dagMode:{onChange:function(e,r){!e&&(r.graphData.nodes||[]).forEach(function(n){return n.fx=n.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:$r},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:$r},nodeColor:{default:"color",triggerUpdate:!1,onChange:$r},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:$r},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:$r},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:$r},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:$r},linkColor:{default:"color",triggerUpdate:!1,onChange:$r},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:$r},linkWidth:{default:1,triggerUpdate:!1,onChange:$r},linkCurvature:{default:0,triggerUpdate:!1,onChange:$r},linkCanvasObject:{triggerUpdate:!1,onChange:$r},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:$r},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:$r},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:$r},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:$r},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:DT},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,r,n){return n===void 0?e.forceLayout.force(r):(e.forceLayout.force(r,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&r(),a(),!e.isShadow&&o(),!e.isShadow&&c(),n(),this;function r(){e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick()))}function n(){var h=xi(e.nodeVisibility),u=xi(e.nodeVal),d=xi(e.nodeColor),f=xi(e.nodeCanvasObjectMode),g=e.ctx,x=e.isShadow/e.globalScale,y=e.graphData.nodes.filter(h);g.save(),y.forEach(function(v){var C=f(v);if(e.nodeCanvasObject&&(C==="before"||C==="replace")&&(e.nodeCanvasObject(v,g,e.globalScale),C==="replace")){g.restore();return}var _=Math.sqrt(Math.max(0,u(v)||1))*e.nodeRelSize+x;g.beginPath(),g.arc(v.x,v.y,_,0,2*Math.PI,!1),g.fillStyle=d(v)||"rgba(31, 120, 180, 0.92)",g.fill(),e.nodeCanvasObject&&C==="after"&&e.nodeCanvasObject(v,e.ctx,e.globalScale)}),g.restore()}function a(){var h=xi(e.linkVisibility),u=xi(e.linkColor),d=xi(e.linkWidth),f=xi(e.linkLineDash),g=xi(e.linkCurvature),x=xi(e.linkCanvasObjectMode),y=e.ctx,v=e.isShadow*2,C=e.graphData.links.filter(h);C.forEach(O);var _=[],k=[],T=C;if(e.linkCanvasObject){var N=[],E=[];C.forEach(function(A){return({before:_,after:k,replace:N}[x(A)]||E).push(A)}),T=[].concat(aa(_),k,E),_=_.concat(N)}y.save(),_.forEach(function(A){return e.linkCanvasObject(A,y,e.globalScale)}),y.restore();var B=QH(T,[u,d,f]);y.save(),Object.entries(B).forEach(function(A){var M=cd(A,2),I=M[0],D=M[1],F=!I||I==="undefined"?"rgba(0,0,0,0.15)":I;Object.entries(D).forEach(function(U){var K=cd(U,2),z=K[0],W=K[1],j=(z||1)/e.globalScale+v;Object.entries(W).forEach(function(H){var Y=cd(H,2);Y[0];var Z=Y[1],rt=f(Z[0]);y.beginPath(),Z.forEach(function(G){var tt=G.source,ft=G.target;if(!(!tt||!ft||!tt.hasOwnProperty("x")||!ft.hasOwnProperty("x"))){y.moveTo(tt.x,tt.y);var ct=G.__controlPoints;ct?y[ct.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,aa(ct).concat([ft.x,ft.y])):y.lineTo(ft.x,ft.y)}}),y.strokeStyle=F,y.lineWidth=j,y.setLineDash(rt||[]),y.stroke()})})}),y.restore(),y.save(),k.forEach(function(A){return e.linkCanvasObject(A,y,e.globalScale)}),y.restore();function O(A){var M=g(A);if(!M){A.__controlPoints=null;return}var I=A.source,D=A.target;if(!(!I||!D||!I.hasOwnProperty("x")||!D.hasOwnProperty("x"))){var F=Math.sqrt(Math.pow(D.x-I.x,2)+Math.pow(D.y-I.y,2));if(F>0){var U=Math.atan2(D.y-I.y,D.x-I.x),K=F*M,z={x:(I.x+D.x)/2+K*Math.cos(U-Math.PI/2),y:(I.y+D.y)/2+K*Math.sin(U-Math.PI/2)};A.__controlPoints=[z.x,z.y]}else{var W=M*70;A.__controlPoints=[D.x,D.y-W,D.x+W,D.y]}}}}function o(){var h=1.6,u=.2,d=xi(e.linkDirectionalArrowLength),f=xi(e.linkDirectionalArrowRelPos),g=xi(e.linkVisibility),x=xi(e.linkDirectionalArrowColor||e.linkColor),y=xi(e.nodeVal),v=e.ctx;v.save(),e.graphData.links.filter(g).forEach(function(C){var _=d(C);if(!(!_||_<0)){var k=C.source,T=C.target;if(!(!k||!T||!k.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var N=Math.sqrt(Math.max(0,y(k)||1))*e.nodeRelSize,E=Math.sqrt(Math.max(0,y(T)||1))*e.nodeRelSize,B=Math.min(1,Math.max(0,f(C))),O=x(C)||"rgba(0,0,0,0.28)",A=_/h/2,M=C.__controlPoints&&OT($i,[k.x,k.y].concat(aa(C.__controlPoints),[T.x,T.y])),I=M?function(j){return M.get(j)}:function(j){return{x:k.x+(T.x-k.x)*j||0,y:k.y+(T.y-k.y)*j||0}},D=M?M.length():Math.sqrt(Math.pow(T.x-k.x,2)+Math.pow(T.y-k.y,2)),F=N+_+(D-N-E-_)*B,U=I(F/D),K=I((F-_)/D),z=I((F-_*(1-u))/D),W=Math.atan2(U.y-K.y,U.x-K.x)-Math.PI/2;v.beginPath(),v.moveTo(U.x,U.y),v.lineTo(K.x+A*Math.cos(W),K.y+A*Math.sin(W)),v.lineTo(z.x,z.y),v.lineTo(K.x-A*Math.cos(W),K.y-A*Math.sin(W)),v.fillStyle=O,v.fill()}}}),v.restore()}function c(){var h=xi(e.linkDirectionalParticles),u=xi(e.linkDirectionalParticleSpeed),d=xi(e.linkDirectionalParticleOffset),f=xi(e.linkDirectionalParticleWidth),g=xi(e.linkVisibility),x=xi(e.linkDirectionalParticleColor||e.linkColor),y=e.ctx;y.save(),e.graphData.links.filter(g).forEach(function(v){var C=h(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var _=v.source,k=v.target;if(!(!_||!k||!_.hasOwnProperty("x")||!k.hasOwnProperty("x"))){var T=u(v),N=Math.abs(d(v)),E=v.__photons||[],B=Math.max(0,f(v)/2)/Math.sqrt(e.globalScale),O=x(v)||"rgba(0,0,0,0.28)";y.fillStyle=O;var A=v.__controlPoints?OT($i,[_.x,_.y].concat(aa(v.__controlPoints),[k.x,k.y])):null,M=0,I=!1;E.forEach(function(D){var F=!!D.__singleHop;if(D.hasOwnProperty("__progressRatio")||(D.__progressRatio=F?T<0?1:0:(M+N)/C),!F&&M++,D.__progressRatio+=T,D.__progressRatio>=1||D.__progressRatio<0)if(!F)D.__progressRatio=D.__progressRatio%1,D.__progressRatio<0&&D.__progressRatio++;else{I=!0;return}var U=D.__progressRatio,K=A?A.get(U):{x:_.x+(k.x-_.x)*U||0,y:_.y+(k.y-_.y)*U||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(K.x,K.y,v,y,e.globalScale):(y.beginPath(),y.arc(K.x,K.y,B,0,2*Math.PI,!1),y.fill())}),I&&(v.__photons=v.__photons.filter(function(D){return!D.__singleHop||D.__progressRatio<=1&&D.__progressRatio>=0}))}}}),y.restore()}},emitParticle:function(e,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:NH().force("link",vH()).force("charge",AH()).force("center",vU()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,r){r.ctx=e},update:function(e,r){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&jT(e.graphData.nodes,xi(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&jT(e.graphData.links,xi(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(x){x.source=x[e.linkSource],x.target=x[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id(function(x){return x[e.nodeId]}).links(e.graphData.links);var a=e.dagMode&&fW(e.graphData,function(x){return x[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),o=Math.max.apply(Math,aa(Object.values(a||[]))),c=e.dagLevelDistance||e.graphData.nodes.length/(o||1)*pW*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var h=["lr","rl"].includes(r.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(x){return delete x[h]})}if(["lr","rl","td","bu"].includes(e.dagMode)){var u=["rl","bu"].includes(e.dagMode),d=function(y){return(a[y[e.nodeId]]-o/2)*c*(u?-1:1)},f=["lr","rl"].includes(e.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(x){return x[f]=d(x)})}e.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(e.dagMode)!==-1?MH(function(x){var y=a[x[e.nodeId]]||-1;return(e.dagMode==="radialin"?o-y:y)*c}).strength(function(x){return e.dagNodeFilter(x)?1:0}):null);for(var g=0;g<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);g++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function IB(i,e){var r=i instanceof Array?i:[i],n=new e;return n._destructor&&n._destructor(),{linkProp:function(o){return{default:n[o](),onChange:function(h,u){r.forEach(function(d){return u[d][o](h)})},triggerUpdate:!1}},linkMethod:function(o){return function(c){for(var h=arguments.length,u=new Array(h>1?h-1:0),d=1;d<h;d++)u[d-1]=arguments[d];var f=[];return r.forEach(function(g){var x=c[g],y=x[o].apply(x,u);y!==x&&f.push(y)}),f.length?f[0]:this}}}}var gW=800,mW=4,yW=5,$B=IB("forceGraph",wg),bW=IB(["forceGraph","shadowGraph"],wg),xW=Object.assign.apply(Object,aa(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(i){return Sd({},i,$B.linkProp(i))})).concat(aa(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(i){return Sd({},i,bW.linkProp(i))})))),vW=Object.assign.apply(Object,aa(["d3Force","d3ReheatSimulation","emitParticle"].map(function(i){return Sd({},i,$B.linkMethod(i))})));function n0(i){if(i.canvas){var e=i.canvas.width,r=i.canvas.height;e===300&&r===150&&(e=r=0);var n=window.devicePixelRatio;e/=n,r/=n,[i.canvas,i.shadowCanvas].forEach(function(o){o.style.width="".concat(i.width,"px"),o.style.height="".concat(i.height,"px"),o.width=i.width*n,o.height=i.height*n,!e&&!r&&o.getContext("2d").scale(n,n)});var a=Fa(i.canvas).k;i.zoom.translateBy(i.zoom.__baseElem,(i.width-e)/2/a,(i.height-r)/2/a),i.needsRedraw=!0}}function zB(i){var e=window.devicePixelRatio;i.setTransform(e,0,0,e,0,0)}function FT(i,e,r){i.save(),zB(i),i.clearRect(0,0,e,r),i.restore()}var CW=K1({props:Ec({width:{default:window.innerWidth,onChange:function(e,r){return n0(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,r){return n0(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,r){[e.nodes,e.links].every(function(a){return(a||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach(n),r.forceGraph.graphData(e),r.shadowGraph.graphData(e);function n(a){var o=a.type,c=a.objs;c.filter(function(h){if(!h.hasOwnProperty("__indexColor"))return!0;var u=r.colorTracker.lookup(h.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==h}).forEach(function(h){h.__indexColor=r.colorTracker.register({type:o,d:h})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,r){r.canvas&&e&&(r.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,r){r.shadowGraph.nodeCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,r){r.shadowGraph.linkCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,r){r.zoom.scaleExtent([e,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},xW),aliases:{stopAnimation:"pauseAnimation"},methods:Ec({graph2ScreenCoords:function(e,r,n){var a=Fa(e.canvas);return{x:r*a.k+a.x,y:n*a.k+a.y}},screen2GraphCoords:function(e,r,n){var a=Fa(e.canvas);return{x:(r-a.x)/a.k,y:(n-a.y)/a.k}},centerAt:function(e,r,n,a){if(!e.canvas)return null;if(r!==void 0||n!==void 0){var o=Object.assign({},r!==void 0?{x:r}:{},n!==void 0?{y:n}:{});return a?e.tweenGroup.add(new aT(c()).to(o,a).easing(Bl.Quadratic.Out).onUpdate(h).onComplete(function(){e.tweenGroup.remove(this)}).start()):h(o),this}return c();function c(){var u=Fa(e.canvas);return{x:(e.width/2-u.x)/u.k,y:(e.height/2-u.y)/u.k}}function h(u){var d=u.x,f=u.y;e.zoom.translateTo(e.zoom.__baseElem,d===void 0?c().x:d,f===void 0?c().y:f),e.needsRedraw=!0}},zoom:function(e,r,n){if(!e.canvas)return null;if(r!==void 0)return n?e.tweenGroup.add(new aT({k:a()}).to({k:r},n).easing(Bl.Quadratic.Out).onUpdate(function(c){var h=c.k;return o(h)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):o(r),this;return a();function a(){return Fa(e.canvas).k}function o(c){e.zoom.scaleTo(e.zoom.__baseElem,c),e.needsRedraw=!0}},zoomToFit:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];var h=this.getGraphBbox.apply(this,o);if(h){var u={x:(h.x[0]+h.x[1])/2,y:(h.y[0]+h.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(e.width-n*2)/(h.x[1]-h.x[0]),(e.height-n*2)/(h.y[1]-h.y[0])));this.centerAt(u.x,u.y,r),this.zoom(d,r)}return this},getGraphBbox:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=xi(e.nodeVal),a=function(h){return Math.sqrt(Math.max(0,n(h)||1))*e.nodeRelSize},o=e.graphData.nodes.filter(r).map(function(c){return{x:c.x,y:c.y,r:a(c)}});return o.length?{x:[F2(o,function(c){return c.x-c.r}),D2(o,function(c){return c.x+c.r})],y:[F2(o,function(c){return c.y-c.r}),D2(o,function(c){return c.y+c.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},vW),stateInit:function(){return{lastSetZoom:1,zoom:Z8(),forceGraph:new wg,shadowGraph:new wg().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Z7,tweenGroup:new dB}},init:function(e,r){var n=this;e.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",e.appendChild(a),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),a.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var o=r.canvas.getContext("2d"),c=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),h={x:-1e12,y:-1e12},u=function(){var g=null,x=window.devicePixelRatio,y=h.x>0&&h.y>0?c.getImageData(h.x*x,h.y*x,1,1):null;return y&&(g=r.colorTracker.lookup(y.data)),g};ke(r.canvas).call(lz().subject(function(){if(!r.enableNodeDrag)return null;var f=u();return f&&f.type==="Node"?f.d:null}).on("start",function(f){var g=f.subject;g.__initialDragPos={x:g.x,y:g.y,fx:g.fx,fy:g.fy},f.active||(g.fx=g.x,g.fy=g.y),r.canvas.classList.add("grabbable")}).on("drag",function(f){var g=f.subject,x=g.__initialDragPos,y=f,v=Fa(r.canvas).k,C={x:x.x+(y.x-x.x)/v-g.x,y:x.y+(y.y-x.y)/v-g.y};["x","y"].forEach(function(_){return g["f".concat(_)]=g[_]=x[_]+(y[_]-x[_])/v}),!(!g.__dragged&&yW>=Math.sqrt(eP(["x","y"].map(function(_){return Math.pow(f[_]-x[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,g.__dragged=!0,r.onNodeDrag(g,C))}).on("end",function(f){var g=f.subject,x=g.__initialDragPos,y={x:g.x-x.x,y:g.y-x.y};x.fx===void 0&&(g.fx=void 0),x.fy===void 0&&(g.fy=void 0),delete g.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,r.onNodeDragEnd(g,y))})),r.zoom(r.zoom.__baseElem=ke(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||xi(r.enableZoomInteraction)(f))&&(f.type==="wheel"||xi(r.enablePanInteraction)(f))}).on("zoom",function(f){var g=f.transform;[o,c].forEach(function(x){zB(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Ec(Ec({},g),n.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Ec(Ec({},f.transform),n.centerAt()))}),n0(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){Fa(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=mW/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new xU(a),["pointermove","pointerdown"].forEach(function(f){return a.addEventListener(f,function(g){f==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=g),!r.isPointerDragging&&g.type==="pointermove"&&r.onBackgroundClick&&(g.pressure>0||r.isPointerPressed)&&(g.pointerType==="mouse"||g.movementX===void 0||[g.movementX,g.movementY].some(function(v){return Math.abs(v)>1}))&&(r.isPointerDragging=!0);var x=y(a);h.x=g.pageX-x.left,h.y=g.pageY-x.top;function y(v){var C=v.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,k=window.pageYOffset||document.documentElement.scrollTop;return{top:C.top+k,left:C.left+_}}},{passive:!0})}),a.addEventListener("pointerup",function(f){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var g=[f,r.pointerDownEvent];requestAnimationFrame(function(){if(f.button===0)if(r.hoverObj){var x=r["on".concat(r.hoverObj.type,"Click")];x&&x.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,g);if(f.button===2)if(r.hoverObj){var y=r["on".concat(r.hoverObj.type,"RightClick")];y&&y.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(f){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(f.preventDefault(),!1)}),r.forceGraph(o),r.shadowGraph(c);var d=n7(function(){FT(c,r.width,r.height),r.shadowGraph.linkWidth(function(g){return xi(r.linkWidth)(g)+r.linkHoverPrecision});var f=Fa(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},gW);r.flushShadowCanvas=d.flush,(this._animationCycle=function f(){var g=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(N){return N.__photons&&N.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var x=r.isPointerDragging?null:u();if(x!==r.hoverObj){var y=r.hoverObj,v=y?y.type:null,C=x?x.type:null;if(v&&v!==C){var _=r["on".concat(v,"Hover")];_&&_(null,y.d)}if(C){var k=r["on".concat(C,"Hover")];k&&k(x.d,v===C?y.d:null)}r.tooltip.content(x&&xi(r["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),r.canvas.classList[(x&&r["on".concat(C,"Click")]||!x&&r.onBackgroundClick)&&xi(r.showPointerCursor)(x==null?void 0:x.d)?"add":"remove"]("clickable"),r.hoverObj=x}g&&d()}if(g){FT(o,r.width,r.height);var T=Fa(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(o,T),r.forceGraph.globalScale(T).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(o,T)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(e){}}),a0={exports:{}},s0,IT;function _W(){if(IT)return s0;IT=1;var i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return s0=i,s0}var o0,$T;function kW(){if($T)return o0;$T=1;var i=_W();function e(){}function r(){}return r.resetWarningCache=e,o0=function(){function n(c,h,u,d,f,g){if(g!==i){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:e};return o.PropTypes=o,o},o0}var zT;function wW(){return zT||(zT=1,a0.exports=kW()()),a0.exports}var SW=wW();const lt=$d(SW),gm={width:lt.number,height:lt.number,graphData:lt.shape({nodes:lt.arrayOf(lt.object).isRequired,links:lt.arrayOf(lt.object).isRequired}),backgroundColor:lt.string,nodeRelSize:lt.number,nodeId:lt.string,nodeLabel:lt.oneOfType([lt.string,lt.func]),nodeVal:lt.oneOfType([lt.number,lt.string,lt.func]),nodeVisibility:lt.oneOfType([lt.bool,lt.string,lt.func]),nodeColor:lt.oneOfType([lt.string,lt.func]),nodeAutoColorBy:lt.oneOfType([lt.string,lt.func]),onNodeHover:lt.func,onNodeClick:lt.func,linkSource:lt.string,linkTarget:lt.string,linkLabel:lt.oneOfType([lt.string,lt.func]),linkVisibility:lt.oneOfType([lt.bool,lt.string,lt.func]),linkColor:lt.oneOfType([lt.string,lt.func]),linkAutoColorBy:lt.oneOfType([lt.string,lt.func]),linkWidth:lt.oneOfType([lt.number,lt.string,lt.func]),linkCurvature:lt.oneOfType([lt.number,lt.string,lt.func]),linkDirectionalArrowLength:lt.oneOfType([lt.number,lt.string,lt.func]),linkDirectionalArrowColor:lt.oneOfType([lt.string,lt.func]),linkDirectionalArrowRelPos:lt.oneOfType([lt.number,lt.string,lt.func]),linkDirectionalParticles:lt.oneOfType([lt.number,lt.string,lt.func]),linkDirectionalParticleSpeed:lt.oneOfType([lt.number,lt.string,lt.func]),linkDirectionalParticleOffset:lt.oneOfType([lt.number,lt.string,lt.func]),linkDirectionalParticleWidth:lt.oneOfType([lt.number,lt.string,lt.func]),linkDirectionalParticleColor:lt.oneOfType([lt.string,lt.func]),onLinkHover:lt.func,onLinkClick:lt.func,dagMode:lt.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:lt.number,dagNodeFilter:lt.func,onDagError:lt.func,d3AlphaMin:lt.number,d3AlphaDecay:lt.number,d3VelocityDecay:lt.number,warmupTicks:lt.number,cooldownTicks:lt.number,cooldownTime:lt.number,onEngineTick:lt.func,onEngineStop:lt.func,getGraphBbox:lt.func},PB={zoomToFit:lt.func,onNodeRightClick:lt.func,onNodeDrag:lt.func,onNodeDragEnd:lt.func,onLinkRightClick:lt.func,linkHoverPrecision:lt.number,onBackgroundClick:lt.func,onBackgroundRightClick:lt.func,showPointerCursor:lt.oneOfType([lt.bool,lt.func]),enablePointerInteraction:lt.bool,enableNodeDrag:lt.bool},aC={showNavInfo:lt.bool,nodeOpacity:lt.number,nodeResolution:lt.number,nodeThreeObject:lt.oneOfType([lt.object,lt.string,lt.func]),nodeThreeObjectExtend:lt.oneOfType([lt.bool,lt.string,lt.func]),nodePositionUpdate:lt.func,linkOpacity:lt.number,linkResolution:lt.number,linkCurveRotation:lt.oneOfType([lt.number,lt.string,lt.func]),linkMaterial:lt.oneOfType([lt.object,lt.string,lt.func]),linkThreeObject:lt.oneOfType([lt.object,lt.string,lt.func]),linkThreeObjectExtend:lt.oneOfType([lt.bool,lt.string,lt.func]),linkPositionUpdate:lt.func,linkDirectionalArrowResolution:lt.number,linkDirectionalParticleResolution:lt.number,linkDirectionalParticleThreeObject:lt.oneOfType([lt.object,lt.string,lt.func]),forceEngine:lt.oneOf(["d3","ngraph"]),ngraphPhysics:lt.object,numDimensions:lt.oneOf([1,2,3])},TW=Object.assign({},gm,PB,{linkLineDash:lt.oneOfType([lt.arrayOf(lt.number),lt.string,lt.func]),nodeCanvasObjectMode:lt.oneOfType([lt.string,lt.func]),nodeCanvasObject:lt.func,nodePointerAreaPaint:lt.func,linkCanvasObjectMode:lt.oneOfType([lt.string,lt.func]),linkCanvasObject:lt.func,linkPointerAreaPaint:lt.func,linkDirectionalParticleCanvasObject:lt.func,autoPauseRedraw:lt.bool,minZoom:lt.number,maxZoom:lt.number,enableZoomInteraction:lt.oneOfType([lt.bool,lt.func]),enablePanInteraction:lt.oneOfType([lt.bool,lt.func]),onZoom:lt.func,onZoomEnd:lt.func,onRenderFramePre:lt.func,onRenderFramePost:lt.func});Object.assign({},gm,PB,aC,{enableNavigationControls:lt.bool,controlType:lt.oneOf(["trackball","orbit","fly"]),rendererConfig:lt.object,extraRenderers:lt.arrayOf(lt.shape({render:lt.func.isRequired}))});Object.assign({},gm,aC,{nodeDesc:lt.oneOfType([lt.string,lt.func]),linkDesc:lt.oneOfType([lt.string,lt.func])});Object.assign({},gm,aC,{markerAttrs:lt.object,yOffset:lt.number,glScale:lt.number});const mm=v$(CW,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});mm.displayName="ForceGraph2D";mm.propTypes=TW;const EW="#1f2430",_p="#6741d9",NW="rgba(103,65,217,0.9)",l0={ok:{fill:"#b2f2bb",stroke:"#2f9e44"},stale:{fill:"#ffec99",stroke:"#f08c00"},gone:{fill:"#ffc9c9",stroke:"#e03131"}};function c0(i){return i.exists?i.needsUpdate?l0.stale:l0.ok:l0.gone}function mo(i){return typeof i=="string"?i:i.id}const AW=6;function kp(i,e,r,n,a,o){const c=Math.min(o,n/2,a/2);i.beginPath(),i.moveTo(e+c,r),i.arcTo(e+n,r,e+n,r+a,c),i.arcTo(e+n,r+a,e,r+a,c),i.arcTo(e,r+a,e,r,c),i.arcTo(e,r,e+n,r,c),i.closePath()}function wp(i,e,r,n,a,o){const c=a-i,h=o-e;if(c===0&&h===0)return{x:i,y:e};const u=c!==0?r/Math.abs(c):1/0,d=h!==0?n/Math.abs(h):1/0,f=Math.min(u,d);return{x:i+c*f,y:e+h*f}}function PT(i,e,r,n,a,o){i.save(),i.translate(e,r),i.rotate(n),i.fillStyle=o,i.beginPath(),i.moveTo(0,0),i.lineTo(-a,-a*.5),i.lineTo(-a,a*.5),i.closePath(),i.fill(),i.restore()}function MW(){const{data:i,isLoading:e,isError:r,error:n}=HI(),a=WI(),o=GI(),c=YI(),h=_M(),u=P.useRef(void 0),d=P.useRef(null),[f,g]=P.useState({w:0,h:0}),[x,y]=P.useState(!0),[v,C]=P.useState(null),[_,k]=P.useState(null),[T,N]=P.useState(!0),E=P.useRef(null),B=P.useRef(null),O=P.useRef(null),[A,M]=P.useState(null),[I,D]=P.useState(!1),F=P.useRef(null);F.current=A;const[U,K]=P.useState(null),z=P.useRef(null);z.current=U,P.useEffect(()=>{const ht=d.current;if(!ht)return;const st=new ResizeObserver(()=>g({w:ht.clientWidth,h:ht.clientHeight}));return st.observe(ht),g({w:ht.clientWidth,h:ht.clientHeight}),()=>st.disconnect()},[]);const W=P.useMemo(()=>{const ht=(i==null?void 0:i.nodes)??[],st=(i==null?void 0:i.connections)??[],Ot=new Set(ht.map(It=>It.name)),$t=new Map(ht.map(It=>[It.name,It.shareable])),Gt=new Map;for(const It of st)Gt.set(`${It.from}${It.to}`,It.direction);const jt=(It,je)=>{const ve=Gt.get(`${It}${je}`);return ve==="out"||ve==="both"},ae=[];for(const It of st)!Ot.has(It.from)||!Ot.has(It.to)||jt(It.from,It.to)&&ae.push({from:It.from,to:It.to,kind:"reads",active:$t.get(It.to)===!0});return ae},[i]),j=P.useMemo(()=>{const ht=((i==null?void 0:i.nodes)??[]).map(jt=>({...jt,id:jt.name})),st=jt=>`${jt.from}${jt.to}${jt.kind}`,Ot=new Map(W.map(jt=>[st(jt),jt])),$t=[],Gt=new Set;for(const jt of W){const ae=[jt.from,jt.to].sort().join("")+""+jt.kind;if(Gt.has(ae))continue;Gt.add(ae);const It=Ot.get(`${jt.to}${jt.from}${jt.kind}`);$t.push({source:jt.from,target:jt.to,kind:jt.kind,active:jt.active||((It==null?void 0:It.active)??!1),twoWay:!!It,curv:(jt.from<jt.to?1:-1)*.13})}return{nodes:ht,links:$t}},[i,W]),H=P.useMemo(()=>{const ht=new Map;for(const st of j.nodes)ht.set(st.id,st);return ht},[j]);P.useEffect(()=>{var st,Ot,$t;const ht=u.current;ht&&((st=ht.d3Force("charge"))==null||st.strength(-900),(Ot=ht.d3Force("link"))==null||Ot.distance(230),($t=ht.d3ReheatSimulation)==null||$t.call(ht))},[j]);const Y=P.useCallback(()=>{const ht=u.current;ht&&(ht.zoomToFit(500,140),window.setTimeout(()=>{try{ht.zoom()>1.4&&ht.zoom(1.4,350)}catch{}},540))},[]),Z=.15,rt=6,G=P.useCallback(ht=>{const st=u.current;if(!st)return;let Ot=1;try{Ot=st.zoom()}catch{}const $t=Math.max(Z,Math.min(rt,Ot*ht));st.zoom($t,220)},[]),tt=P.useCallback(()=>G(1.3),[G]),ft=P.useCallback(()=>G(1/1.3),[G]),ct=P.useCallback((ht,st)=>{const Ot=u.current;if(!Ot)return null;let $t=1;try{$t=Ot.zoom()}catch{}for(const Gt of j.nodes){if(Gt.x==null||Gt.y==null)continue;const jt=Ot.graph2ScreenCoords(Gt.x,Gt.y),ae=(Gt.__hw??50)*$t+4,It=(Gt.__hh??16)*$t+4;if(Math.abs(jt.x-ht)<=ae&&Math.abs(jt.y-st)<=It)return Gt}return null},[j]),vt=P.useCallback((ht,st)=>{const Ot=u.current;if(!Ot)return null;let $t=null,Gt=14;for(const jt of j.links){const ae=jt.source,It=jt.target;if(ae.x==null||ae.y==null||It.x==null||It.y==null)continue;const je=Math.hypot(It.x-ae.x,It.y-ae.y)||1,ve=(ae.x+It.x)/2,He=(ae.y+It.y)/2,Be=Math.atan2(It.y-ae.y,It.x-ae.x)+Math.PI/2,ki=ve+Math.cos(Be)*jt.curv*je,Li=He+Math.sin(Be)*jt.curv*je,Ge=wp(ae.x,ae.y,(ae.__hw??50)+2,(ae.__hh??16)+2,ki,Li),Ze=wp(It.x,It.y,(It.__hw??50)+2,(It.__hh??16)+2,ki,Li);for(let li=0;li<=14;li++){const ye=li/14,si=(1-ye)*(1-ye)*Ge.x+2*(1-ye)*ye*ki+ye*ye*Ze.x,$e=(1-ye)*(1-ye)*Ge.y+2*(1-ye)*ye*Li+ye*ye*Ze.y,Ei=Ot.graph2ScreenCoords(si,$e),Ce=Math.hypot(Ei.x-ht,Ei.y-st);Ce<Gt&&(Gt=Ce,$t=jt)}}return $t},[j]);function ot(ht){var Ot;const st=(Ot=d.current)==null?void 0:Ot.getBoundingClientRect();return{x:ht.clientX-((st==null?void 0:st.left)??0),y:ht.clientY-((st==null?void 0:st.top)??0)}}const wt=P.useCallback((ht,st)=>{k(null),a.mutate({from:ht.id,to:st.id},{onSuccess:()=>{st.shareable||(k(`“${ht.name}” now reads “${st.name}”, but “${st.name}” isn't Readable yet — click it and turn on Readable so the wire goes live.`),C(st))},onError:Ot=>k(Ot instanceof Error?Ot.message:"Failed to connect.")})},[a]);function it(ht){var Gt,jt,ae,It;const{x:st,y:Ot}=ot(ht);if(O.current={x:st,y:Ot},B.current={x:st,y:Ot},!x)return;(jt=(Gt=u.current)==null?void 0:Gt.resumeAnimation)==null||jt.call(Gt);const $t=ct(st,Ot);$t?(E.current=$t,(It=(ae=ht.target).setPointerCapture)==null||It.call(ae,ht.pointerId)):A&&M(null)}function V(ht){if(!x)return;const{x:st,y:Ot}=ot(ht);O.current={x:st,y:Ot};const $t=E.current??F.current;if(!$t){z.current&&K(null);return}const Gt=ct(st,Ot),jt=Gt&&Gt.id!==$t.id?Gt.id:null;jt!==z.current&&K(jt)}function at(ht){const{x:st,y:Ot}=ot(ht),$t=B.current!=null&&Math.hypot(st-B.current.x,Ot-B.current.y)>AW;B.current=null;const Gt=ct(st,Ot);if(!$t&&!Gt){const It=vt(st,Ot);if(It){Ht(It),O.current=null;return}}if(!x){O.current=null;return}const jt=E.current;E.current=null,K(null);const ae=F.current;if(jt&&$t&&Gt&&Gt.id!==jt.id){wt(jt,Gt),M(null),O.current=null;return}if(jt&&!$t&&Gt&&Gt.id===jt.id){if(ae&&ae.id!==jt.id){wt(ae,jt),M(null),O.current=null;return}if(ae&&ae.id===jt.id){M(null),O.current=null;return}M(jt);return}O.current=null}function Ct(ht){const st=E.current??F.current,Ot=u.current;if(!st||!O.current||!Ot||st.x==null||st.y==null)return;const $t=Ot.screen2GraphCoords(O.current.x,O.current.y);ht.save(),ht.strokeStyle=_p,ht.lineWidth=2,ht.setLineDash([6,5]),ht.globalAlpha=.95,ht.beginPath(),ht.moveTo(st.x,st.y),ht.lineTo($t.x,$t.y),ht.stroke(),ht.restore()}function Bt(ht){x||(C(ht),k(null))}function Ht(ht){var jt,ae;const st=mo(ht.source),Ot=mo(ht.target),$t=((jt=H.get(st))==null?void 0:jt.name)??st,Gt=((ae=H.get(Ot))==null?void 0:ae.name)??Ot;window.confirm(`Remove the read “${$t}” → “${Gt}”?`)&&(o.mutate({from:st,to:Ot}),ht.twoWay&&o.mutate({from:Ot,to:st}))}function re(ht){var $t,Gt;const st=(($t=H.get(mo(ht.source)))==null?void 0:$t.name)??mo(ht.source),Ot=((Gt=H.get(mo(ht.target)))==null?void 0:Gt.name)??mo(ht.target);return ht.twoWay?`${st} ⇄ ${Ot} — read each other`:`${st} reads ${Ot}${ht.active?"":" — not Readable yet"}`}function Dt(ht){const st=mo(ht.source),Ot=mo(ht.target);o.mutate({from:st,to:Ot}),ht.twoWay&&o.mutate({from:Ot,to:st})}P.useEffect(()=>{function ht(st){const Ot=st.target;Ot&&(Ot.tagName==="INPUT"||Ot.tagName==="TEXTAREA")||(st.key==="Escape"?(F.current?M(null):T?N(!1):v&&C(null),E.current=null,O.current=null,K(null)):st.key==="c"||st.key==="C"?y($t=>!$t):st.key==="?"?N(!0):st.key==="+"||st.key==="="?tt():st.key==="-"||st.key==="_"?ft():st.key==="0"&&Y())}return window.addEventListener("keydown",ht),()=>window.removeEventListener("keydown",ht)},[T,v,tt,ft,Y]);const xt=(i==null?void 0:i.nodes)??[],Ut=j.links.length>0,Yt=P.useMemo(()=>{if(!v)return[];const ht=[];for(const st of W)st.from!==v.id&&st.to!==v.id||(st.from===v.id?ht.push({text:`You read “${st.to}” live${st.active?"":" — not Readable yet"}`,onRemove:()=>o.mutate({from:st.from,to:st.to})}):ht.push({text:`“${st.from}” reads you live`,onRemove:()=>o.mutate({from:st.from,to:st.to})}));return ht},[v,W,o]);return m.jsxs("div",{className:"lgraph",children:[m.jsxs("div",{className:"lgraph-toolbar",children:[m.jsxs("button",{type:"button",className:`lgraph-mode${x?" lgraph-mode--on":""}`,onClick:()=>y(ht=>!ht),title:"Toggle Connect mode (C)",children:[m.jsx("span",{className:"lgraph-mode-dot","aria-hidden":!0}),x?"Connect mode":"View mode"]}),m.jsx("button",{type:"button",className:"lgraph-help",onClick:()=>N(!0),children:"How it works"}),m.jsxs("button",{type:"button",className:`lgraph-help${I?" lgraph-help--on":""}`,onClick:()=>D(ht=>!ht),children:["Connections",j.links.length?` (${j.links.length})`:""]}),m.jsx("span",{className:"lgraph-hint",children:x?A?`Now click the project “${A.name}” should read.`:"Click a project then the one it should read — or drag. Click a wire (or use Connections) to remove it.":"View mode — click a wire to remove it, or click a project for details. Press C to connect."}),m.jsx("span",{className:"lgraph-legend",children:m.jsxs("span",{className:"lgraph-legend-group",children:[m.jsx("i",{className:"lgwire lgwire--read"})," reads (live reference — nothing copied)",m.jsx("i",{className:"lgwire lgwire--inert"})," not readable yet"]})})]}),_&&m.jsxs("div",{className:"lgraph-note",children:[m.jsx("span",{children:_}),m.jsx("button",{className:"lgraph-note-x",onClick:()=>k(null),"aria-label":"Dismiss",children:"✕"})]}),m.jsxs("div",{className:"lgraph-canvas",ref:d,onPointerDown:it,onPointerMove:V,onPointerUp:at,children:[e&&m.jsx("div",{className:"lgraph-status",children:"Loading network…"}),r&&m.jsx("div",{className:"lgraph-status lgraph-status--err",children:n instanceof Error?n.message:"Failed to load the network."}),!e&&!r&&xt.length<2&&m.jsx("div",{className:"lgraph-status",children:"Add at least two projects to start wiring relationships between them."}),xt.length>=2&&m.jsxs("div",{className:"lgraph-zoom",role:"group","aria-label":"Zoom controls",onPointerDown:ht=>ht.stopPropagation(),children:[m.jsx("button",{type:"button",className:"lgraph-zoom-btn",onClick:tt,"aria-label":"Zoom in",title:"Zoom in",children:"+"}),m.jsx("button",{type:"button",className:"lgraph-zoom-btn",onClick:ft,"aria-label":"Zoom out",title:"Zoom out",children:"−"}),m.jsx("button",{type:"button",className:"lgraph-zoom-btn lgraph-zoom-fit",onClick:Y,"aria-label":"Fit graph to view",title:"Fit to view",children:"⤢"})]}),f.w>0&&xt.length>=2&&m.jsx(mm,{ref:u,graphData:j,width:f.w,height:f.h,backgroundColor:"#0b0b12",nodeId:"id",nodeRelSize:6,enablePanInteraction:!x,enableZoomInteraction:!0,enableNodeDrag:!1,cooldownTicks:140,onEngineStop:Y,onNodeClick:ht=>Bt(ht),onRenderFramePost:Ct,linkColor:()=>"rgba(0,0,0,0)",linkDirectionalArrowLength:0,linkCurvature:ht=>ht.curv,linkDirectionalParticles:ht=>ht.active?3:0,linkDirectionalParticleSpeed:.006,linkDirectionalParticleWidth:3.4,linkDirectionalParticleColor:()=>"#c9b8ff",linkCanvasObjectMode:()=>"replace",linkCanvasObject:(ht,st,Ot)=>{const $t=ht.source,Gt=ht.target;if($t.x==null||$t.y==null||Gt.x==null||Gt.y==null)return;const jt=Math.hypot(Gt.x-$t.x,Gt.y-$t.y)||1,ae=($t.x+Gt.x)/2,It=($t.y+Gt.y)/2,je=Math.atan2(Gt.y-$t.y,Gt.x-$t.x)+Math.PI/2,ve=ae+Math.cos(je)*ht.curv*jt,He=It+Math.sin(je)*ht.curv*jt,Be=wp($t.x,$t.y,($t.__hw??50)+2,($t.__hh??16)+2,ve,He),ki=wp(Gt.x,Gt.y,(Gt.__hw??50)+2,(Gt.__hh??16)+2,ve,He),Li=Be.x,Ge=Be.y,Ze=ki.x,li=ki.y,ye=Math.atan2(li-He,Ze-ve),si=Math.atan2(Ge-He,Li-ve);st.save(),st.lineCap="round",ht.active?(st.strokeStyle=NW,st.lineWidth=2.2,st.setLineDash([])):(st.strokeStyle="rgba(150,150,170,0.55)",st.lineWidth=1.6,st.setLineDash([5,5])),st.beginPath(),st.moveTo(Li,Ge),st.quadraticCurveTo(ve,He,Ze,li),st.stroke(),st.setLineDash([]);const $e=ht.active?_p:"rgba(150,150,170,0.75)";if(PT(st,Ze,li,ye,7,$e),ht.twoWay&&PT(st,Li,Ge,si,7,$e),Ot>.75){const Ei=.25*Li+.5*ve+.25*Ze,Ce=.25*Ge+.5*He+.25*li,Oi=8;st.font=`600 ${Oi}px -apple-system, BlinkMacSystemFont, sans-serif`,st.textAlign="center",st.textBaseline="middle";const Xi=ht.twoWay?"read each other":"reads",Ni=st.measureText(Xi).width;st.fillStyle="#0b0b12",kp(st,Ei-Ni/2-3,Ce-Oi/2-2,Ni+6,Oi+4,3),st.fill(),st.fillStyle="#c9b8ff",st.fillText(Xi,Ei,Ce)}st.restore()},nodeCanvasObject:(ht,st)=>{var li;const Ot=ht.x??0,$t=ht.y??0,Gt=c0(ht),jt=((li=F.current)==null?void 0:li.id)===ht.id,ae=z.current===ht.id,It=13;st.font=`600 ${It}px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`;const je=st.measureText(ht.name).width,ve=14,He=9,Be=Math.min(220,Math.max(72,je+ve*2)),ki=It+He*2;ht.__hw=Be/2,ht.__hh=ki/2;const Li=Ot-Be/2,Ge=$t-ki/2;st.save(),st.shadowColor="rgba(0,0,0,0.45)",st.shadowBlur=10,st.shadowOffsetY=3,kp(st,Li,Ge,Be,ki,9),st.fillStyle=Gt.fill,st.fill(),st.restore(),kp(st,Li,Ge,Be,ki,9),jt||ae?(st.strokeStyle=_p,st.lineWidth=2.4):(st.strokeStyle=Gt.stroke,st.lineWidth=1.6),st.stroke(),ht.shareable&&(st.beginPath(),st.arc(Li+Be-7,Ge+7,3.2,0,2*Math.PI),st.fillStyle=_p,st.fill(),st.lineWidth=1.2,st.strokeStyle="#0b0b12",st.stroke()),st.fillStyle=EW,st.textAlign="center",st.textBaseline="middle";const Ze=je>Be-ve*2?BW(st,ht.name,Be-ve*2):ht.name;st.fillText(Ze,Ot,$t+.5)},nodePointerAreaPaint:(ht,st,Ot)=>{const $t=(ht.__hw??50)*2,Gt=(ht.__hh??16)*2;kp(Ot,(ht.x??0)-$t/2,(ht.y??0)-Gt/2,$t,Gt,9),Ot.fillStyle=st,Ot.fill()}}),T&&xt.length>=2&&m.jsx(LW,{hasLinks:Ut,onClose:()=>N(!1)}),I&&m.jsxs("div",{className:"lgraph-conns",role:"dialog","aria-label":"All connections",children:[m.jsxs("div",{className:"lgraph-conns-head",children:[m.jsx("strong",{children:"All connections"}),m.jsx("button",{className:"lgraph-x",onClick:()=>D(!1),"aria-label":"Close",children:"✕"})]}),j.links.length===0?m.jsx("div",{className:"lgraph-conns-empty",children:"No connections yet. Switch on Connect mode and draw a wire."}):j.links.map((ht,st)=>m.jsxs("div",{className:"lgraph-conn-row",children:[m.jsx("span",{className:`lgchip-wire lgchip-wire--${ht.kind}`,"aria-hidden":!0}),m.jsx("span",{className:"lgraph-conn-label",children:re(ht)}),m.jsx("button",{className:"lgraph-conn-del",onClick:()=>Dt(ht),"aria-label":"Delete connection",title:"Delete",children:"✕"})]},st))]})]}),v&&m.jsxs("div",{className:"lgraph-detail",children:[m.jsxs("div",{className:"lgraph-detail-head",children:[m.jsx("span",{className:"lgchip",style:{background:c0(v).fill,borderColor:c0(v).stroke}}),m.jsx("strong",{children:v.name}),m.jsx("button",{className:"lgraph-x",onClick:()=>C(null),"aria-label":"Close",children:"✕"})]}),m.jsx("div",{className:"lgraph-detail-path",children:v.path}),m.jsxs("div",{className:"lgraph-detail-row",children:[m.jsx("span",{children:v.exists?v.needsUpdate?`Behind: v${v.setupVersion} → v${v.latestVersion}`:`Up to date (v${v.setupVersion})`:"Folder is gone."}),v.exists&&v.needsUpdate&&m.jsx("button",{className:"lgraph-btn",disabled:h.isPending,onClick:()=>h.mutate(v.name),children:h.isPending?"Updating…":"Update"})]}),m.jsxs("label",{className:"lgraph-detail-row lgraph-share",children:[m.jsx("input",{type:"checkbox",checked:v.shareable,disabled:!v.exists||c.isPending,onChange:ht=>c.mutate({name:v.name,shareable:ht.target.checked},{onSuccess:()=>C({...v,shareable:ht.target.checked})})}),m.jsx("span",{children:"Readable — let any connected project read this one"})]}),m.jsxs("div",{className:"lgraph-rels",children:[m.jsx("div",{className:"lgraph-rels-title",children:"Connections"}),Yt.length===0&&m.jsx("div",{className:"lgraph-rels-empty",children:"No connections yet."}),Yt.map((ht,st)=>m.jsxs("div",{className:"lgraph-rel",children:[m.jsx("span",{children:ht.text}),m.jsx("button",{className:"lgraph-rel-x",onClick:ht.onRemove,"aria-label":"Remove",children:"✕"})]},st))]})]})]})}function BW(i,e,r){let n=e;for(;n.length>1&&i.measureText(n+"…").width>r;)n=n.slice(0,-1);return n.length<e.length?n+"…":e}function LW({hasLinks:i,onClose:e}){return m.jsxs("div",{className:"lgraph-guide",role:"dialog","aria-label":"How the network works",children:[m.jsx("button",{className:"lgraph-guide-x",onClick:e,"aria-label":"Close",children:"✕"}),m.jsx("h3",{className:"lgraph-guide-title",children:"How reading works"}),m.jsx("div",{className:"lgraph-guide-demo","aria-hidden":!0,children:m.jsxs("svg",{viewBox:"0 0 260 60",className:"lgraph-guide-svg",children:[m.jsx("line",{className:"lgraph-guide-flow",x1:"92",y1:"30",x2:"168",y2:"30",stroke:"#6741d9",strokeWidth:"2.4"}),m.jsx("polygon",{points:"168,26 176,30 168,34",fill:"#6741d9"}),m.jsx("rect",{x:"14",y:"16",width:"70",height:"28",rx:"8",fill:"#b2f2bb",stroke:"#2f9e44",strokeWidth:"1.6"}),m.jsx("text",{x:"49",y:"31",textAnchor:"middle",className:"lgraph-guide-cardlabel",children:"App"}),m.jsx("rect",{x:"176",y:"16",width:"70",height:"28",rx:"8",fill:"#b2f2bb",stroke:"#2f9e44",strokeWidth:"1.6"}),m.jsx("circle",{cx:"240",cy:"20",r:"3.2",fill:"#6741d9",stroke:"#0b0b12",strokeWidth:"1"}),m.jsx("text",{x:"211",y:"31",textAnchor:"middle",className:"lgraph-guide-cardlabel",children:"Libs"}),m.jsx("text",{x:"130",y:"23",textAnchor:"middle",className:"lgraph-guide-wirelabel",fill:"#b9a6ff",children:"reads"})]})}),m.jsx("ul",{className:"lgraph-guide-defs",children:m.jsxs("li",{children:[m.jsx("span",{className:"lgraph-key lgraph-key--read"})," ",m.jsx("strong",{children:"Reads (violet):"})," App reads Libs' ",m.jsx("em",{children:"canonical"})," memory ",m.jsx("em",{children:"live"})," during recall — a reference, never a copy. Each project stays the single source of truth for its own knowledge. The target must be Readable (violet pip), or the wire is stored but inert."]})}),m.jsx("p",{className:"lgraph-guide-foot",children:"Click a project then the one it should read (or drag). Click any project to see exactly who reads it. (Copy-based sync is parked on the roadmap — federation only reads, live.)"}),m.jsx("button",{className:"lgraph-guide-cta",onClick:e,children:i?"Got it":"Start wiring"})]})}function OW(){const{data:i,isLoading:e,isError:r,error:n}=qI(),a=_M(),o=UI(),[c,h]=P.useState(""),[u,d]=P.useState(null),[f,g]=P.useState(!1),[x,y]=P.useState("cards"),v=(i==null?void 0:i.vaults)??[],C=P.useMemo(()=>{const E=c.trim().toLowerCase();return E?v.filter(B=>B.name.toLowerCase().includes(E)||B.path.toLowerCase().includes(E)):v},[v,c]);async function _(E){d(null);try{await ZI(E)}catch(B){d(B instanceof Error?B.message:String(B))}}function k(E){d(null),a.mutate(E,{onError:B=>d(B instanceof Error?B.message:String(B))})}function T(E){const B=E.exists?`Remove “${E.name}” from the launcher? (the folder stays on disk)`:`“${E.name}” folder is gone. Remove it from the launcher?`;window.confirm(B)&&(d(null),o.mutate(E.name,{onError:O=>d(O instanceof Error?O.message:String(O))}))}function N(E){y(E)}return m.jsxs("div",{className:"launcher",children:[m.jsxs("header",{className:"launcher-bar",children:[m.jsx("h1",{className:"launcher-title",children:"Launcher · all projects"}),m.jsxs("div",{className:"launcher-actions",children:[v.length>=2&&m.jsxs("div",{className:"launcher-viewtoggle",role:"group","aria-label":"View",children:[m.jsx("button",{type:"button",className:`launcher-btn${x==="cards"?" launcher-btn-active":""}`,onClick:()=>N("cards"),children:"Cards"}),m.jsx("button",{type:"button",className:`launcher-btn${x==="graph"?" launcher-btn-active":""}`,onClick:()=>N("graph"),children:"Network"})]}),x==="cards"&&m.jsx("input",{type:"search",className:"launcher-search",placeholder:"Search projects…",value:c,onChange:E=>h(E.target.value),"aria-label":"Search projects"}),m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-primary",onClick:()=>g(!0),children:"+ Add Project"})]})]}),u&&m.jsx("div",{className:"launcher-error",children:u}),e&&m.jsx("div",{className:"launcher-status",children:"Loading vaults…"}),r&&m.jsx("div",{className:"launcher-error",children:n instanceof Error?n.message:"Failed to load vaults."}),!e&&!r&&x==="graph"&&m.jsx(MW,{}),!e&&!r&&x==="cards"&&m.jsxs(m.Fragment,{children:[C.length===0&&m.jsx("div",{className:"launcher-empty",children:v.length===0?"No projects yet. Use “+ Add Project” to create one or set up an existing folder.":"No projects match your search."}),m.jsx("div",{className:"launcher-grid",children:C.map(E=>{const B=E.exists?E.needsUpdate?"launcher-card-dot--stale":"launcher-card-dot--ok":"launcher-card-dot--gone";return m.jsxs("div",{className:`launcher-card${E.exists?"":" launcher-card--gone"}`,children:[m.jsxs("div",{className:"launcher-card-head",children:[m.jsx("span",{className:`launcher-card-dot ${B}`,title:E.exists?E.needsUpdate?`Update available: v${E.setupVersion} → v${E.latestVersion}`:"Up to date":"Folder is gone","aria-hidden":!0}),m.jsx("span",{className:"launcher-card-name",children:E.name})]}),m.jsx("div",{className:"launcher-card-path",children:E.path}),!E.exists&&m.jsx("div",{className:"launcher-card-warn",children:"Folder no longer exists on disk."}),E.exists&&E.needsUpdate&&m.jsxs("div",{className:"launcher-card-warn launcher-card-warn--stale",children:["Skills out of date — v",E.setupVersion," → v",E.latestVersion,"."]}),m.jsxs("div",{className:"launcher-card-actions",children:[E.exists&&m.jsx("button",{type:"button",className:"launcher-card-open launcher-link-btn",onClick:()=>_(E.name),children:"Open →"}),E.exists&&E.needsUpdate&&m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-update",disabled:a.isPending,onClick:()=>k(E.name),children:a.isPending&&a.variables===E.name?"Updating…":"Update"}),m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-remove",disabled:o.isPending,onClick:()=>T(E),children:"Remove"})]})]},E.name)})})]}),f&&m.jsx(e$,{onClose:()=>g(!1),onReady:async E=>{g(!1),await _(E)}})]})}function sC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vl=sC();function qB(i){Vl=i}var hd={exec:()=>null};function _i(i,e=""){let r=typeof i=="string"?i:i.source;const n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(tn.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var tn={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:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},RW=/^(?:[ \t]*(?:\n|$))+/,jW=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,DW=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,FW=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oC=/(?:[*+-]|\d{1,9}[.)])/,UB=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,HB=_i(UB).replace(/bull/g,oC).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(),IW=_i(UB).replace(/bull/g,oC).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(),lC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$W=/^[^\n]+/,cC=/(?!\s*\])(?:\\.|[^\[\]\\])+/,zW=_i(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),PW=_i(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,oC).getRegex(),ym="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",hC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qW=_i("^ {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",hC).replace("tag",ym).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),WB=_i(lC).replace("hr",Wd).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",ym).getRegex(),UW=_i(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",WB).getRegex(),uC={blockquote:UW,code:jW,def:zW,fences:DW,heading:FW,hr:Wd,html:qW,lheading:HB,list:PW,newline:RW,paragraph:WB,table:hd,text:$W},qT=_i("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wd).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",ym).getRegex(),HW={...uC,lheading:IW,table:qT,paragraph:_i(lC).replace("hr",Wd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qT).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",ym).getRegex()},WW={...uC,html:_i(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hC).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:hd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_i(lC).replace("hr",Wd).replace("heading",` *#{1,6} *[^
|
|
96
|
-
]`).replace("lheading",HB).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},GW=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,YW=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,GB=/^( {2,}|\\)\n(?!\s*$)/,KW=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bm=/[\p{P}\p{S}]/u,dC=/[\s\p{P}\p{S}]/u,YB=/[^\s\p{P}\p{S}]/u,VW=_i(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dC).getRegex(),KB=/(?!~)[\p{P}\p{S}]/u,XW=/(?!~)[\s\p{P}\p{S}]/u,ZW=/(?:[^\s\p{P}\p{S}]|~)/u,QW=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,VB=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,JW=_i(VB,"u").replace(/punct/g,bm).getRegex(),tG=_i(VB,"u").replace(/punct/g,KB).getRegex(),XB="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",eG=_i(XB,"gu").replace(/notPunctSpace/g,YB).replace(/punctSpace/g,dC).replace(/punct/g,bm).getRegex(),iG=_i(XB,"gu").replace(/notPunctSpace/g,ZW).replace(/punctSpace/g,XW).replace(/punct/g,KB).getRegex(),rG=_i("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,YB).replace(/punctSpace/g,dC).replace(/punct/g,bm).getRegex(),nG=_i(/\\(punct)/,"gu").replace(/punct/g,bm).getRegex(),aG=_i(/^<(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(),sG=_i(hC).replace("(?:-->|$)","-->").getRegex(),oG=_i("^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",sG).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Sg=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,lG=_i(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Sg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ZB=_i(/^!?\[(label)\]\[(ref)\]/).replace("label",Sg).replace("ref",cC).getRegex(),QB=_i(/^!?\[(ref)\](?:\[\])?/).replace("ref",cC).getRegex(),cG=_i("reflink|nolink(?!\\()","g").replace("reflink",ZB).replace("nolink",QB).getRegex(),fC={_backpedal:hd,anyPunctuation:nG,autolink:aG,blockSkip:QW,br:GB,code:YW,del:hd,emStrongLDelim:JW,emStrongRDelimAst:eG,emStrongRDelimUnd:rG,escape:GW,link:lG,nolink:QB,punctuation:VW,reflink:ZB,reflinkSearch:cG,tag:oG,text:KW,url:hd},hG={...fC,link:_i(/^!?\[(label)\]\((.*?)\)/).replace("label",Sg).getRegex(),reflink:_i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sg).getRegex()},Cv={...fC,emStrongRDelimAst:iG,emStrongLDelim:tG,url:_i(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},uG={...Cv,br:_i(GB).replace("{2,}","*").getRegex(),text:_i(Cv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sp={normal:uC,gfm:HW,pedantic:WW},Mu={normal:fC,gfm:Cv,breaks:uG,pedantic:hG},dG={"&":"&","<":"<",">":">",'"':""","'":"'"},UT=i=>dG[i];function Oa(i,e){if(e){if(tn.escapeTest.test(i))return i.replace(tn.escapeReplace,UT)}else if(tn.escapeTestNoEncode.test(i))return i.replace(tn.escapeReplaceNoEncode,UT);return i}function HT(i){try{i=encodeURI(i).replace(tn.percentDecode,"%")}catch{return null}return i}function WT(i,e){var o;const r=i.replace(tn.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=r.split(tn.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(tn.slashPipe,"|");return n}function Bu(i,e,r){const n=i.length;if(n===0)return"";let a=0;for(;a<n&&i.charAt(n-a-1)===e;)a++;return i.slice(0,n-a)}function fG(i,e){if(i.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])r++;else if(i[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function GT(i,e,r,n,a){const o=e.href,c=e.title||null,h=i[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:i[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function pG(i,e,r){const n=i.match(r.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
|
|
97
|
-
`).map(o=>{const c=o.match(r.other.beginningSpace);if(c===null)return o;const[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
98
|
-
`)}var Tg=class{constructor(i){ge(this,"options");ge(this,"rules");ge(this,"lexer");this.options=i||Vl}space(i){const e=this.rules.block.newline.exec(i);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(i){const e=this.rules.block.code.exec(i);if(e){const r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Bu(r,`
|
|
99
|
-
`)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const r=e[0],n=pG(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(i){const e=this.rules.block.heading.exec(i);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){const n=Bu(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(i){const e=this.rules.block.hr.exec(i);if(e)return{type:"hr",raw:Bu(e[0],`
|
|
100
|
-
`)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let r=Bu(e[0],`
|
|
101
|
-
`).split(`
|
|
102
|
-
`),n="",a="";const o=[];for(;r.length>0;){let c=!1;const h=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))h.push(r[u]),c=!0;else if(!c)h.push(r[u]);else break;r=r.slice(u);const d=h.join(`
|
|
103
|
-
`),f=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
104
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
105
|
-
${d}`:d,a=a?`${a}
|
|
106
|
-
${f}`:f;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=g,r.length===0)break;const x=o.at(-1);if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){const y=x,v=y.raw+`
|
|
107
|
-
`+r.join(`
|
|
108
|
-
`),C=this.blockquote(v);o[o.length-1]=C,n=n.substring(0,n.length-y.raw.length)+C.raw,a=a.substring(0,a.length-y.text.length)+C.text;break}else if((x==null?void 0:x.type)==="list"){const y=x,v=y.raw+`
|
|
109
|
-
`+r.join(`
|
|
110
|
-
`),C=this.list(v);o[o.length-1]=C,n=n.substring(0,n.length-x.raw.length)+C.raw,a=a.substring(0,a.length-y.raw.length)+C.raw,r=v.substring(o.at(-1).raw.length).split(`
|
|
111
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(i){let e=this.rules.block.list.exec(i);if(e){let r=e[1].trim();const n=r.length>1,a={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=this.rules.other.listItemRegex(r);let c=!1;for(;i;){let u=!1,d="",f="";if(!(e=o.exec(i))||this.rules.block.hr.test(i))break;d=e[0],i=i.substring(d.length);let g=e[2].split(`
|
|
112
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),x=i.split(`
|
|
113
|
-
`,1)[0],y=!g.trim(),v=0;if(this.options.pedantic?(v=2,f=g.trimStart()):y?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,f=g.slice(v),v+=e[1].length),y&&this.rules.other.blankLine.test(x)&&(d+=x+`
|
|
114
|
-
`,i=i.substring(x.length+1),u=!0),!u){const k=this.rules.other.nextBulletRegex(v),T=this.rules.other.hrRegex(v),N=this.rules.other.fencesBeginRegex(v),E=this.rules.other.headingBeginRegex(v),B=this.rules.other.htmlBeginRegex(v);for(;i;){const O=i.split(`
|
|
115
|
-
`,1)[0];let A;if(x=O,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),A=x):A=x.replace(this.rules.other.tabCharGlobal," "),N.test(x)||E.test(x)||B.test(x)||k.test(x)||T.test(x))break;if(A.search(this.rules.other.nonSpaceChar)>=v||!x.trim())f+=`
|
|
116
|
-
`+A.slice(v);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(g)||E.test(g)||T.test(g))break;f+=`
|
|
117
|
-
`+x}!y&&!x.trim()&&(y=!0),d+=O+`
|
|
118
|
-
`,i=i.substring(O.length+1),g=A.slice(v)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let C=null,_;this.options.gfm&&(C=this.rules.other.listIsTask.exec(f),C&&(_=C[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!C,checked:_,loose:!1,text:f,tokens:[]}),a.raw+=d}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const d=a.items[u].tokens.filter(g=>g.type==="space"),f=d.length>0&&d.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=f}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(i){const e=this.rules.block.html.exec(i);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(i){const e=this.rules.block.def.exec(i);if(e){const r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:a}}}table(i){var c;const e=this.rules.block.table.exec(i);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const r=WT(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
119
|
-
`):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const h of n)this.rules.other.tableAlignRight.test(h)?o.align.push("right"):this.rules.other.tableAlignCenter.test(h)?o.align.push("center"):this.rules.other.tableAlignLeft.test(h)?o.align.push("left"):o.align.push(null);for(let h=0;h<r.length;h++)o.header.push({text:r[h],tokens:this.lexer.inline(r[h]),header:!0,align:o.align[h]});for(const h of a)o.rows.push(WT(h,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(i){const e=this.rules.block.lheading.exec(i);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(i){const e=this.rules.block.paragraph.exec(i);if(e){const r=e[1].charAt(e[1].length-1)===`
|
|
120
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(i){const e=this.rules.block.text.exec(i);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(i){const e=this.rules.inline.escape.exec(i);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(i){const e=this.rules.inline.tag.exec(i);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(i){const e=this.rules.inline.link.exec(i);if(e){const r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=Bu(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=fG(e[2],"()");if(o===-2)return;if(o>-1){const h=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let n=e[2],a="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),GT(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(i,e){let r;if((r=this.rules.inline.reflink.exec(i))||(r=this.rules.inline.nolink.exec(i))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return GT(r,a,r[0],this.lexer,this.rules)}}emStrong(i,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(i);if(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const o=[...n[0]].length-1;let c,h,u=o,d=0;const f=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*i.length+o);(n=f.exec(e))!=null;){if(c=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!c)continue;if(h=[...c].length,n[3]||n[4]){u+=h;continue}else if((n[5]||n[6])&&o%3&&!((o+h)%3)){d+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+d);const g=[...n[0]][0].length,x=i.slice(0,o+n.index+g+h);if(Math.min(o,h)%2){const v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}const y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(i){const e=this.rules.inline.code.exec(i);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(i){const e=this.rules.inline.br.exec(i);if(e)return{type:"br",raw:e[0]}}del(i){const e=this.rules.inline.del.exec(i);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(i){const e=this.rules.inline.autolink.exec(i);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(i){var r;let e;if(e=this.rules.inline.url.exec(i)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let o;do o=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(o!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(i){const e=this.rules.inline.text.exec(i);if(e){const r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},As=class _v{constructor(e){ge(this,"tokens");ge(this,"options");ge(this,"state");ge(this,"tokenizer");ge(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Vl,this.options.tokenizer=this.options.tokenizer||new Tg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:tn,block:Sp.normal,inline:Mu.normal};this.options.pedantic?(r.block=Sp.pedantic,r.inline=Mu.pedantic):this.options.gfm&&(r.block=Sp.gfm,this.options.breaks?r.inline=Mu.breaks:r.inline=Mu.gfm),this.tokenizer.rules=r}static get rules(){return{block:Sp,inline:Mu}}static lex(e,r){return new _v(r).lex(e)}static lexInline(e,r){return new _v(r).inlineTokens(e)}lex(e){e=e.replace(tn.carriageReturn,`
|
|
121
|
-
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(tn.tabCharGlobal," ").replace(tn.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);const d=r.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
|
|
122
|
-
`:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
123
|
-
`+h.raw,d.text+=`
|
|
124
|
-
`+h.text,this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
125
|
-
`+h.raw,d.text+=`
|
|
126
|
-
`+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const f=e.slice(1);let g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},f),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){const d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
|
|
127
|
-
`+h.raw,d.text+=`
|
|
128
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
129
|
-
`+h.raw,d.text+=`
|
|
130
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var h,u,d;let n=e,a=null;if(this.tokens.links){const f=Object.keys(this.tokens.links);if(f.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)f.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,c="";for(;e;){o||(c=""),o=!1;let f;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(x=>(f=x.call({lexer:this},e,r))?(e=e.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(f.raw.length);const x=r.at(-1);f.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=f.raw,x.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(e,n,c)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(e)){e=e.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(e))){e=e.substring(f.raw.length),r.push(f);continue}let g=e;if((d=this.options.extensions)!=null&&d.startInline){let x=1/0;const y=e.slice(1);let v;this.options.extensions.startInline.forEach(C=>{v=C.call({lexer:this},y),typeof v=="number"&&v>=0&&(x=Math.min(x,v))}),x<1/0&&x>=0&&(g=e.substring(0,x+1))}if(f=this.tokenizer.inlineText(g)){e=e.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(c=f.raw.slice(-1)),o=!0;const x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=f.raw,x.text+=f.text):r.push(f);continue}if(e){const x="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},Eg=class{constructor(i){ge(this,"options");ge(this,"parser");this.options=i||Vl}space(i){return""}code({text:i,lang:e,escaped:r}){var o;const n=(o=(e||"").match(tn.notSpaceStart))==null?void 0:o[0],a=i.replace(tn.endingNewline,"")+`
|
|
131
|
-
`;return n?'<pre><code class="language-'+Oa(n)+'">'+(r?a:Oa(a,!0))+`</code></pre>
|
|
132
|
-
`:"<pre><code>"+(r?a:Oa(a,!0))+`</code></pre>
|
|
133
|
-
`}blockquote({tokens:i}){return`<blockquote>
|
|
134
|
-
${this.parser.parse(i)}</blockquote>
|
|
135
|
-
`}html({text:i}){return i}heading({tokens:i,depth:e}){return`<h${e}>${this.parser.parseInline(i)}</h${e}>
|
|
136
|
-
`}hr(i){return`<hr>
|
|
137
|
-
`}list(i){const e=i.ordered,r=i.start;let n="";for(let c=0;c<i.items.length;c++){const h=i.items[c];n+=this.listitem(h)}const a=e?"ol":"ul",o=e&&r!==1?' start="'+r+'"':"";return"<"+a+o+`>
|
|
138
|
-
`+n+"</"+a+`>
|
|
139
|
-
`}listitem(i){var r;let e="";if(i.task){const n=this.checkbox({checked:!!i.checked});i.loose?((r=i.tokens[0])==null?void 0:r.type)==="paragraph"?(i.tokens[0].text=n+" "+i.tokens[0].text,i.tokens[0].tokens&&i.tokens[0].tokens.length>0&&i.tokens[0].tokens[0].type==="text"&&(i.tokens[0].tokens[0].text=n+" "+Oa(i.tokens[0].tokens[0].text),i.tokens[0].tokens[0].escaped=!0)):i.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(i.tokens,!!i.loose),`<li>${e}</li>
|
|
140
|
-
`}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
|
|
141
|
-
`}table(i){let e="",r="";for(let a=0;a<i.header.length;a++)r+=this.tablecell(i.header[a]);e+=this.tablerow({text:r});let n="";for(let a=0;a<i.rows.length;a++){const o=i.rows[a];r="";for(let c=0;c<o.length;c++)r+=this.tablecell(o[c]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
142
|
-
<thead>
|
|
143
|
-
`+e+`</thead>
|
|
144
|
-
`+n+`</table>
|
|
145
|
-
`}tablerow({text:i}){return`<tr>
|
|
146
|
-
${i}</tr>
|
|
147
|
-
`}tablecell(i){const e=this.parser.parseInline(i.tokens),r=i.header?"th":"td";return(i.align?`<${r} align="${i.align}">`:`<${r}>`)+e+`</${r}>
|
|
148
|
-
`}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Oa(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:e,tokens:r}){const n=this.parser.parseInline(r),a=HT(i);if(a===null)return n;i=a;let o='<a href="'+i+'"';return e&&(o+=' title="'+Oa(e)+'"'),o+=">"+n+"</a>",o}image({href:i,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const a=HT(i);if(a===null)return Oa(r);i=a;let o=`<img src="${i}" alt="${r}"`;return e&&(o+=` title="${Oa(e)}"`),o+=">",o}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Oa(i.text)}},pC=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},Ms=class kv{constructor(e){ge(this,"options");ge(this,"renderer");ge(this,"textRenderer");this.options=e||Vl,this.options.renderer=this.options.renderer||new Eg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pC}static parse(e,r){return new kv(r).parse(e)}static parseInline(e,r){return new kv(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const d=h,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=f||"";continue}}const u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,f=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],f+=`
|
|
149
|
-
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):n+=f;continue}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=d||"";continue}}const u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},Lx,Zp=(Lx=class{constructor(i){ge(this,"options");ge(this,"block");this.options=i||Vl}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?As.lex:As.lexInline}provideParser(){return this.block?Ms.parse:Ms.parseInline}},ge(Lx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Lx),gG=class{constructor(...i){ge(this,"defaults",sC());ge(this,"options",this.setOptions);ge(this,"parse",this.parseMarkdown(!0));ge(this,"parseInline",this.parseMarkdown(!1));ge(this,"Parser",Ms);ge(this,"Renderer",Eg);ge(this,"TextRenderer",pC);ge(this,"Lexer",As);ge(this,"Tokenizer",Tg);ge(this,"Hooks",Zp);this.use(...i)}walkTokens(i,e){var n,a;let r=[];for(const o of i)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const c=o;for(const h of c.header)r=r.concat(this.walkTokens(h.tokens,e));for(const h of c.rows)for(const u of h)r=r.concat(this.walkTokens(u.tokens,e));break}case"list":{const c=o;r=r.concat(this.walkTokens(c.items,e));break}default:{const c=o;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{const u=c[h].flat(1/0);r=r.concat(this.walkTokens(u,e))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,e)))}}return r}use(...i){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=e.renderers[a.name];o?e.renderers[a.name]=function(...c){let h=a.renderer.apply(this,c);return h===!1&&(h=o.apply(this,c)),h}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[a.level];o?o.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),n.extensions=e),r.renderer){const a=this.defaults.renderer||new Eg(this.defaults);for(const o in r.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const c=o,h=r.renderer[c],u=a[c];a[c]=(...d)=>{let f=h.apply(a,d);return f===!1&&(f=u.apply(a,d)),f||""}}n.renderer=a}if(r.tokenizer){const a=this.defaults.tokenizer||new Tg(this.defaults);for(const o in r.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const c=o,h=r.tokenizer[c],u=a[c];a[c]=(...d)=>{let f=h.apply(a,d);return f===!1&&(f=u.apply(a,d)),f}}n.tokenizer=a}if(r.hooks){const a=this.defaults.hooks||new Zp;for(const o in r.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const c=o,h=r.hooks[c],u=a[c];Zp.passThroughHooks.has(o)?a[c]=d=>{if(this.defaults.async)return Promise.resolve(h.call(a,d)).then(g=>u.call(a,g));const f=h.call(a,d);return u.call(a,f)}:a[c]=(...d)=>{let f=h.apply(a,d);return f===!1&&(f=u.apply(a,d)),f}}n.hooks=a}if(r.walkTokens){const a=this.defaults.walkTokens,o=r.walkTokens;n.walkTokens=function(c){let h=[];return h.push(o.call(this,c)),a&&(h=h.concat(a.call(this,c))),h}}this.defaults={...this.defaults,...n}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,e){return As.lex(i,e??this.defaults)}parser(i,e){return Ms.parse(i,e??this.defaults)}parseMarkdown(i){return(r,n)=>{const a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(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 c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=i);const h=o.hooks?o.hooks.provideLexer():i?As.lex:As.lexInline,u=o.hooks?o.hooks.provideParser():i?Ms.parse:Ms.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(d=>h(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>u(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let d=h(r,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let f=u(d,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(d){return c(d)}}}onError(i,e){return r=>{if(r.message+=`
|
|
150
|
-
Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+Oa(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Fl=new gG;function Re(i,e){return Fl.parse(i,e)}Re.options=Re.setOptions=function(i){return Fl.setOptions(i),Re.defaults=Fl.defaults,qB(Re.defaults),Re};Re.getDefaults=sC;Re.defaults=Vl;Re.use=function(...i){return Fl.use(...i),Re.defaults=Fl.defaults,qB(Re.defaults),Re};Re.walkTokens=function(i,e){return Fl.walkTokens(i,e)};Re.parseInline=Fl.parseInline;Re.Parser=Ms;Re.parser=Ms.parse;Re.Renderer=Eg;Re.TextRenderer=pC;Re.Lexer=As;Re.lexer=As.lex;Re.Tokenizer=Tg;Re.Hooks=Zp;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;Ms.parse;As.lex;/*! @license DOMPurify 3.4.7 | (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.7/LICENSE */function YT(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function mG(i){if(Array.isArray(i))return i}function yG(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function bG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
151
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xG(i,e){return mG(i)||yG(i,e)||vG(i,e)||bG()}function vG(i,e){if(i){if(typeof i=="string")return YT(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?YT(i,e):void 0}}const JB=Object.entries,KT=Object.setPrototypeOf,CG=Object.isFrozen,_G=Object.getPrototypeOf,kG=Object.getOwnPropertyDescriptor;let nn=Object.freeze,sa=Object.seal,jc=Object.create,tL=typeof Reflect<"u"&&Reflect,wv=tL.apply,Sv=tL.construct;nn||(nn=function(e){return e});sa||(sa=function(e){return e});wv||(wv=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];return e.apply(r,a)});Sv||(Sv=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return new e(...n)});const Nc=gr(Array.prototype.forEach),wG=gr(Array.prototype.lastIndexOf),VT=gr(Array.prototype.pop),Ac=gr(Array.prototype.push),SG=gr(Array.prototype.splice),Xr=Array.isArray,Qu=gr(String.prototype.toLowerCase),h0=gr(String.prototype.toString),XT=gr(String.prototype.match),Mc=gr(String.prototype.replace),ZT=gr(String.prototype.indexOf),TG=gr(String.prototype.trim),EG=gr(Number.prototype.toString),NG=gr(Boolean.prototype.toString),QT=typeof BigInt>"u"?null:gr(BigInt.prototype.toString),JT=typeof Symbol>"u"?null:gr(Symbol.prototype.toString),ir=gr(Object.prototype.hasOwnProperty),Lu=gr(Object.prototype.toString),Or=gr(RegExp.prototype.test),Ou=AG(TypeError);function gr(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return wv(i,e,n)}}function AG(i){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Sv(i,r)}}function Ue(i,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qu;if(KT&&KT(i,null),!Xr(e))return i;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const o=r(a);o!==a&&(CG(e)||(e[n]=o),a=o)}i[a]=!0}return i}function MG(i){for(let e=0;e<i.length;e++)ir(i,e)||(i[e]=null);return i}function Pr(i){const e=jc(null);for(const n of JB(i)){var r=xG(n,2);const a=r[0],o=r[1];ir(i,a)&&(Xr(o)?e[a]=MG(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=Pr(o):e[a]=o)}return e}function BG(i){switch(typeof i){case"string":return i;case"number":return EG(i);case"boolean":return NG(i);case"bigint":return QT?QT(i):"0";case"symbol":return JT?JT(i):"Symbol()";case"undefined":return Lu(i);case"function":case"object":{if(i===null)return Lu(i);const e=i,r=Ra(e,"toString");if(typeof r=="function"){const n=r(e);return typeof n=="string"?n:Lu(n)}return Lu(i)}default:return Lu(i)}}function Ra(i,e){for(;i!==null;){const n=kG(i,e);if(n){if(n.get)return gr(n.get);if(typeof n.value=="function")return gr(n.value)}i=_G(i)}function r(){return null}return r}function LG(i){try{return Or(i,""),!0}catch{return!1}}const tE=nn(["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"]),u0=nn(["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"]),d0=nn(["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"]),OG=nn(["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"]),f0=nn(["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"]),RG=nn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),eE=nn(["#text"]),iE=nn(["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"]),p0=nn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","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-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"]),rE=nn(["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"]),Tp=nn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jG=sa(/{{[\w\W]*|^[\w\W]*}}/g),DG=sa(/<%[\w\W]*|^[\w\W]*%>/g),FG=sa(/\${[\w\W]*/g),IG=sa(/^data-[\-\w.\u00B7-\uFFFF]+$/),$G=sa(/^aria-[\-\w]+$/),nE=sa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zG=sa(/^(?:\w+script|data):/i),PG=sa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qG=sa(/^html$/i),UG=sa(/^[a-z][.\w]*(-[.\w]+)+$/i),La={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},HG=function(){return typeof window>"u"?null:window},WG=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},aE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function eL(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:HG();const e=ee=>eL(ee);if(e.version="3.4.7",e.removed=[],!i||!i.document||i.document.nodeType!==La.document||!i.Element)return e.isSupported=!1,e;let r=i.document;const n=r,a=n.currentScript;i.DocumentFragment;const o=i.HTMLTemplateElement,c=i.Node,h=i.Element,u=i.NodeFilter,d=i.NamedNodeMap;d===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const f=i.DOMParser,g=i.trustedTypes,x=h.prototype,y=Ra(x,"cloneNode"),v=Ra(x,"remove"),C=Ra(x,"nextSibling"),_=Ra(x,"childNodes"),k=Ra(x,"parentNode"),T=Ra(x,"shadowRoot"),N=Ra(x,"attributes"),E=c&&c.prototype?Ra(c.prototype,"nodeType"):null,B=c&&c.prototype?Ra(c.prototype,"nodeName"):null;if(typeof o=="function"){const ee=r.createElement("template");ee.content&&ee.content.ownerDocument&&(r=ee.content.ownerDocument)}let O,A="";const M=r,I=M.implementation,D=M.createNodeIterator,F=M.createDocumentFragment,U=M.getElementsByTagName,K=n.importNode;let z=aE();e.isSupported=typeof JB=="function"&&typeof k=="function"&&I&&I.createHTMLDocument!==void 0;const W=jG,j=DG,H=FG,Y=IG,Z=$G,rt=zG,G=PG,tt=UG;let ft=nE,ct=null;const vt=Ue({},[...tE,...u0,...d0,...f0,...eE]);let ot=null;const wt=Ue({},[...iE,...p0,...rE,...Tp]);let it=Object.seal(jc(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}})),V=null,at=null;const Ct=Object.seal(jc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Bt=!0,Ht=!0,re=!1,Dt=!0,xt=!1,Ut=!0,Yt=!1,ht=!1,st=!1,Ot=!1,$t=!1,Gt=!1,jt=!0,ae=!1;const It="user-content-";let je=!0,ve=!1,He={},Be=null;const ki=Ue({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Li=null;const Ge=Ue({},["audio","video","img","source","image","track"]);let Ze=null;const li=Ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ye="http://www.w3.org/1998/Math/MathML",si="http://www.w3.org/2000/svg",$e="http://www.w3.org/1999/xhtml";let Ei=$e,Ce=!1,Oi=null;const Xi=Ue({},[ye,si,$e],h0);let Ni=Ue({},["mi","mo","mn","ms","mtext"]),J=Ue({},["annotation-xml"]);const Et=Ue({},["title","style","font","a","script"]);let qt=null;const _e=["application/xhtml+xml","text/html"],gi="text/html";let Se=null,Jt=null;const Xt=r.createElement("form"),be=function(X){return X instanceof RegExp||X instanceof Function},mi=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Jt&&Jt===X)return;(!X||typeof X!="object")&&(X={}),X=Pr(X),qt=_e.indexOf(X.PARSER_MEDIA_TYPE)===-1?gi:X.PARSER_MEDIA_TYPE,Se=qt==="application/xhtml+xml"?h0:Qu,ct=ir(X,"ALLOWED_TAGS")&&Xr(X.ALLOWED_TAGS)?Ue({},X.ALLOWED_TAGS,Se):vt,ot=ir(X,"ALLOWED_ATTR")&&Xr(X.ALLOWED_ATTR)?Ue({},X.ALLOWED_ATTR,Se):wt,Oi=ir(X,"ALLOWED_NAMESPACES")&&Xr(X.ALLOWED_NAMESPACES)?Ue({},X.ALLOWED_NAMESPACES,h0):Xi,Ze=ir(X,"ADD_URI_SAFE_ATTR")&&Xr(X.ADD_URI_SAFE_ATTR)?Ue(Pr(li),X.ADD_URI_SAFE_ATTR,Se):li,Li=ir(X,"ADD_DATA_URI_TAGS")&&Xr(X.ADD_DATA_URI_TAGS)?Ue(Pr(Ge),X.ADD_DATA_URI_TAGS,Se):Ge,Be=ir(X,"FORBID_CONTENTS")&&Xr(X.FORBID_CONTENTS)?Ue({},X.FORBID_CONTENTS,Se):ki,V=ir(X,"FORBID_TAGS")&&Xr(X.FORBID_TAGS)?Ue({},X.FORBID_TAGS,Se):Pr({}),at=ir(X,"FORBID_ATTR")&&Xr(X.FORBID_ATTR)?Ue({},X.FORBID_ATTR,Se):Pr({}),He=ir(X,"USE_PROFILES")?X.USE_PROFILES&&typeof X.USE_PROFILES=="object"?Pr(X.USE_PROFILES):X.USE_PROFILES:!1,Bt=X.ALLOW_ARIA_ATTR!==!1,Ht=X.ALLOW_DATA_ATTR!==!1,re=X.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xt=X.SAFE_FOR_TEMPLATES||!1,Ut=X.SAFE_FOR_XML!==!1,Yt=X.WHOLE_DOCUMENT||!1,Ot=X.RETURN_DOM||!1,$t=X.RETURN_DOM_FRAGMENT||!1,Gt=X.RETURN_TRUSTED_TYPE||!1,st=X.FORCE_BODY||!1,jt=X.SANITIZE_DOM!==!1,ae=X.SANITIZE_NAMED_PROPS||!1,je=X.KEEP_CONTENT!==!1,ve=X.IN_PLACE||!1,ft=LG(X.ALLOWED_URI_REGEXP)?X.ALLOWED_URI_REGEXP:nE,Ei=typeof X.NAMESPACE=="string"?X.NAMESPACE:$e,Ni=ir(X,"MATHML_TEXT_INTEGRATION_POINTS")&&X.MATHML_TEXT_INTEGRATION_POINTS&&typeof X.MATHML_TEXT_INTEGRATION_POINTS=="object"?Pr(X.MATHML_TEXT_INTEGRATION_POINTS):Ue({},["mi","mo","mn","ms","mtext"]),J=ir(X,"HTML_INTEGRATION_POINTS")&&X.HTML_INTEGRATION_POINTS&&typeof X.HTML_INTEGRATION_POINTS=="object"?Pr(X.HTML_INTEGRATION_POINTS):Ue({},["annotation-xml"]);const Tt=ir(X,"CUSTOM_ELEMENT_HANDLING")&&X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING=="object"?Pr(X.CUSTOM_ELEMENT_HANDLING):jc(null);if(it=jc(null),ir(Tt,"tagNameCheck")&&be(Tt.tagNameCheck)&&(it.tagNameCheck=Tt.tagNameCheck),ir(Tt,"attributeNameCheck")&&be(Tt.attributeNameCheck)&&(it.attributeNameCheck=Tt.attributeNameCheck),ir(Tt,"allowCustomizedBuiltInElements")&&typeof Tt.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=Tt.allowCustomizedBuiltInElements),xt&&(Ht=!1),$t&&(Ot=!0),He&&(ct=Ue({},eE),ot=jc(null),He.html===!0&&(Ue(ct,tE),Ue(ot,iE)),He.svg===!0&&(Ue(ct,u0),Ue(ot,p0),Ue(ot,Tp)),He.svgFilters===!0&&(Ue(ct,d0),Ue(ot,p0),Ue(ot,Tp)),He.mathMl===!0&&(Ue(ct,f0),Ue(ot,rE),Ue(ot,Tp))),Ct.tagCheck=null,Ct.attributeCheck=null,ir(X,"ADD_TAGS")&&(typeof X.ADD_TAGS=="function"?Ct.tagCheck=X.ADD_TAGS:Xr(X.ADD_TAGS)&&(ct===vt&&(ct=Pr(ct)),Ue(ct,X.ADD_TAGS,Se))),ir(X,"ADD_ATTR")&&(typeof X.ADD_ATTR=="function"?Ct.attributeCheck=X.ADD_ATTR:Xr(X.ADD_ATTR)&&(ot===wt&&(ot=Pr(ot)),Ue(ot,X.ADD_ATTR,Se))),ir(X,"ADD_URI_SAFE_ATTR")&&Xr(X.ADD_URI_SAFE_ATTR)&&Ue(Ze,X.ADD_URI_SAFE_ATTR,Se),ir(X,"FORBID_CONTENTS")&&Xr(X.FORBID_CONTENTS)&&(Be===ki&&(Be=Pr(Be)),Ue(Be,X.FORBID_CONTENTS,Se)),ir(X,"ADD_FORBID_CONTENTS")&&Xr(X.ADD_FORBID_CONTENTS)&&(Be===ki&&(Be=Pr(Be)),Ue(Be,X.ADD_FORBID_CONTENTS,Se)),je&&(ct["#text"]=!0),Yt&&Ue(ct,["html","head","body"]),ct.table&&(Ue(ct,["tbody"]),delete V.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ou('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ou('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=X.TRUSTED_TYPES_POLICY,A=O.createHTML("")}else O===void 0&&(O=WG(g,a)),O!==null&&typeof A=="string"&&(A=O.createHTML(""));(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&ct===vt&&(ct=Pr(ct)),z.uponSanitizeAttribute.length>0&&ot===wt&&(ot=Pr(ot)),nn&&nn(X),Jt=X},wi=Ue({},[...u0,...d0,...OG]),ln=Ue({},[...f0,...RG]),Yr=function(X){let Tt=k(X);(!Tt||!Tt.tagName)&&(Tt={namespaceURI:Ei,tagName:"template"});const pt=Qu(X.tagName),zt=Qu(Tt.tagName);return Oi[X.namespaceURI]?X.namespaceURI===si?Tt.namespaceURI===$e?pt==="svg":Tt.namespaceURI===ye?pt==="svg"&&(zt==="annotation-xml"||Ni[zt]):!!wi[pt]:X.namespaceURI===ye?Tt.namespaceURI===$e?pt==="math":Tt.namespaceURI===si?pt==="math"&&J[zt]:!!ln[pt]:X.namespaceURI===$e?Tt.namespaceURI===si&&!J[zt]||Tt.namespaceURI===ye&&!Ni[zt]?!1:!ln[pt]&&(Et[pt]||!wi[pt]):!!(qt==="application/xhtml+xml"&&Oi[X.namespaceURI]):!1},lr=function(X){Ac(e.removed,{element:X});try{k(X).removeChild(X)}catch{v(X)}},cr=function(X,Tt){try{Ac(e.removed,{attribute:Tt.getAttributeNode(X),from:Tt})}catch{Ac(e.removed,{attribute:null,from:Tt})}if(Tt.removeAttribute(X),X==="is")if(Ot||$t)try{lr(Tt)}catch{}else try{Tt.setAttribute(X,"")}catch{}},Ri=function(X){let Tt=null,pt=null;if(st)X="<remove></remove>"+X;else{const de=XT(X,/^[\r\n\t ]+/);pt=de&&de[0]}qt==="application/xhtml+xml"&&Ei===$e&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const zt=O?O.createHTML(X):X;if(Ei===$e)try{Tt=new f().parseFromString(zt,qt)}catch{}if(!Tt||!Tt.documentElement){Tt=I.createDocument(Ei,"template",null);try{Tt.documentElement.innerHTML=Ce?A:zt}catch{}}const Kt=Tt.body||Tt.documentElement;return X&&pt&&Kt.insertBefore(r.createTextNode(pt),Kt.childNodes[0]||null),Ei===$e?U.call(Tt,Yt?"html":"body")[0]:Yt?Tt.documentElement:Kt},Zi=function(X){return D.call(X.ownerDocument||X,X,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},kn=function(X){X.normalize();const Tt=D.call(X.ownerDocument||X,X,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let pt=Tt.nextNode();for(;pt;){let zt=pt.data;Nc([W,j,H],Kt=>{zt=Mc(zt,Kt," ")}),pt.data=zt,pt=Tt.nextNode()}},In=function(X){const Tt=B?B(X):null;return typeof Tt!="string"||Se(Tt)!=="form"?!1:typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||X.attributes!==N(X)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function"||X.nodeType!==E(X)||X.childNodes!==_(X)},wn=function(X){if(!E||typeof X!="object"||X===null)return!1;try{return E(X)===La.documentFragment}catch{return!1}},Sn=function(X){if(!E||typeof X!="object"||X===null)return!1;try{return typeof E(X)=="number"}catch{return!1}};function Er(ee,X,Tt){Nc(ee,pt=>{pt.call(e,X,Tt,Jt)})}const $n=function(X){let Tt=null;if(Er(z.beforeSanitizeElements,X,null),In(X))return lr(X),!0;const pt=Se(X.nodeName);if(Er(z.uponSanitizeElement,X,{tagName:pt,allowedTags:ct}),Ut&&X.hasChildNodes()&&!Sn(X.firstElementChild)&&Or(/<[/\w!]/g,X.innerHTML)&&Or(/<[/\w!]/g,X.textContent)||Ut&&X.namespaceURI===$e&&pt==="style"&&Sn(X.firstElementChild)||X.nodeType===La.progressingInstruction||Ut&&X.nodeType===La.comment&&Or(/<[/\w]/g,X.data))return lr(X),!0;if(V[pt]||!(Ct.tagCheck instanceof Function&&Ct.tagCheck(pt))&&!ct[pt]){if(!V[pt]&&Kr(pt)&&(it.tagNameCheck instanceof RegExp&&Or(it.tagNameCheck,pt)||it.tagNameCheck instanceof Function&&it.tagNameCheck(pt)))return!1;if(je&&!Be[pt]){const Kt=k(X),de=_(X);if(de&&Kt){const Ke=de.length;for(let bi=Ke-1;bi>=0;--bi){const ii=y(de[bi],!0);Kt.insertBefore(ii,C(X))}}}return lr(X),!0}return(E?E(X):X.nodeType)===La.element&&!Yr(X)||(pt==="noscript"||pt==="noembed"||pt==="noframes")&&Or(/<\/no(script|embed|frames)/i,X.innerHTML)?(lr(X),!0):(xt&&X.nodeType===La.text&&(Tt=X.textContent,Nc([W,j,H],Kt=>{Tt=Mc(Tt,Kt," ")}),X.textContent!==Tt&&(Ac(e.removed,{element:X.cloneNode()}),X.textContent=Tt)),Er(z.afterSanitizeElements,X,null),!1)},Ea=function(X,Tt,pt){if(at[Tt]||jt&&(Tt==="id"||Tt==="name")&&(pt in r||pt in Xt))return!1;const zt=ot[Tt]||Ct.attributeCheck instanceof Function&&Ct.attributeCheck(Tt,X);if(!(Ht&&!at[Tt]&&Or(Y,Tt))){if(!(Bt&&Or(Z,Tt))){if(!zt||at[Tt]){if(!(Kr(X)&&(it.tagNameCheck instanceof RegExp&&Or(it.tagNameCheck,X)||it.tagNameCheck instanceof Function&&it.tagNameCheck(X))&&(it.attributeNameCheck instanceof RegExp&&Or(it.attributeNameCheck,Tt)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(Tt,X))||Tt==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Or(it.tagNameCheck,pt)||it.tagNameCheck instanceof Function&&it.tagNameCheck(pt))))return!1}else if(!Ze[Tt]){if(!Or(ft,Mc(pt,G,""))){if(!((Tt==="src"||Tt==="xlink:href"||Tt==="href")&&X!=="script"&&ZT(pt,"data:")===0&&Li[X])){if(!(re&&!Or(rt,Mc(pt,G,"")))){if(pt)return!1}}}}}}return!0},mr=Ue({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Kr=function(X){return!mr[Qu(X)]&&Or(tt,X)},cn=function(X){Er(z.beforeSanitizeAttributes,X,null);const Tt=X.attributes;if(!Tt||In(X))return;const pt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ot,forceKeepAttr:void 0};let zt=Tt.length;for(;zt--;){const Kt=Tt[zt],de=Kt.name,Ke=Kt.namespaceURI,bi=Kt.value,ii=Se(de),Yi=bi;let Le=de==="value"?Yi:TG(Yi);if(pt.attrName=ii,pt.attrValue=Le,pt.keepAttr=!0,pt.forceKeepAttr=void 0,Er(z.uponSanitizeAttribute,X,pt),Le=pt.attrValue,ae&&(ii==="id"||ii==="name")&&ZT(Le,It)!==0&&(cr(de,X),Le=It+Le),Ut&&Or(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Le)){cr(de,X);continue}if(ii==="attributename"&&XT(Le,"href")){cr(de,X);continue}if(pt.forceKeepAttr)continue;if(!pt.keepAttr){cr(de,X);continue}if(!Dt&&Or(/\/>/i,Le)){cr(de,X);continue}xt&&Nc([W,j,H],zn=>{Le=Mc(Le,zn," ")});const Qi=Se(X.nodeName);if(!Ea(Qi,ii,Le)){cr(de,X);continue}if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Ke)switch(g.getAttributeType(Qi,ii)){case"TrustedHTML":{Le=O.createHTML(Le);break}case"TrustedScriptURL":{Le=O.createScriptURL(Le);break}}if(Le!==Yi)try{Ke?X.setAttributeNS(Ke,de,Le):X.setAttribute(de,Le),In(X)?lr(X):VT(e.removed)}catch{cr(de,X)}}Er(z.afterSanitizeAttributes,X,null)},yr=function(X){let Tt=null;const pt=Zi(X);for(Er(z.beforeSanitizeShadowDOM,X,null);Tt=pt.nextNode();)if(Er(z.uponSanitizeShadowNode,Tt,null),$n(Tt),cn(Tt),wn(Tt.content)&&yr(Tt.content),(E?E(Tt):Tt.nodeType)===La.element){const Kt=T?T(Tt):Tt.shadowRoot;wn(Kt)&&(yi(Kt),yr(Kt))}Er(z.afterSanitizeShadowDOM,X,null)},yi=function(X){const Tt=E?E(X):X.nodeType;if(Tt===La.element){const Kt=T?T(X):X.shadowRoot;wn(Kt)&&(yi(Kt),yr(Kt))}const pt=_?_(X):X.childNodes;if(!pt)return;const zt=[];Nc(pt,Kt=>{Ac(zt,Kt)});for(const Kt of zt)yi(Kt);if(Tt===La.element){const Kt=B?B(X):null;if(typeof Kt=="string"&&Se(Kt)==="template"){const de=X.content;wn(de)&&yi(de)}}};return e.sanitize=function(ee){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Tt=null,pt=null,zt=null,Kt=null;if(Ce=!ee,Ce&&(ee="<!-->"),typeof ee!="string"&&!Sn(ee)&&(ee=BG(ee),typeof ee!="string"))throw Ou("dirty is not a string, aborting");if(!e.isSupported)return ee;if(ht||mi(X),e.removed=[],typeof ee=="string"&&(ve=!1),ve){const bi=B?B(ee):ee.nodeName;if(typeof bi=="string"){const ii=Se(bi);if(!ct[ii]||V[ii])throw Ou("root node is forbidden and cannot be sanitized in-place")}if(In(ee))throw Ou("root node is clobbered and cannot be sanitized in-place");yi(ee)}else if(Sn(ee))Tt=Ri("<!---->"),pt=Tt.ownerDocument.importNode(ee,!0),pt.nodeType===La.element&&pt.nodeName==="BODY"||pt.nodeName==="HTML"?Tt=pt:Tt.appendChild(pt),yi(pt);else{if(!Ot&&!xt&&!Yt&&ee.indexOf("<")===-1)return O&&Gt?O.createHTML(ee):ee;if(Tt=Ri(ee),!Tt)return Ot?null:Gt?A:""}Tt&&st&&lr(Tt.firstChild);const de=Zi(ve?ee:Tt);for(;zt=de.nextNode();)$n(zt),cn(zt),wn(zt.content)&&yr(zt.content);if(ve)return xt&&kn(ee),ee;if(Ot){if(xt&&kn(Tt),$t)for(Kt=F.call(Tt.ownerDocument);Tt.firstChild;)Kt.appendChild(Tt.firstChild);else Kt=Tt;return(ot.shadowroot||ot.shadowrootmode)&&(Kt=K.call(n,Kt,!0)),Kt}let Ke=Yt?Tt.outerHTML:Tt.innerHTML;return Yt&&ct["!doctype"]&&Tt.ownerDocument&&Tt.ownerDocument.doctype&&Tt.ownerDocument.doctype.name&&Or(qG,Tt.ownerDocument.doctype.name)&&(Ke="<!DOCTYPE "+Tt.ownerDocument.doctype.name+`>
|
|
152
|
-
`+Ke),xt&&Nc([W,j,H],bi=>{Ke=Mc(Ke,bi," ")}),O&&Gt?O.createHTML(Ke):Ke},e.setConfig=function(){let ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mi(ee),ht=!0},e.clearConfig=function(){Jt=null,ht=!1},e.isValidAttribute=function(ee,X,Tt){Jt||mi({});const pt=Se(ee),zt=Se(X);return Ea(pt,zt,Tt)},e.addHook=function(ee,X){typeof X=="function"&&Ac(z[ee],X)},e.removeHook=function(ee,X){if(X!==void 0){const Tt=wG(z[ee],X);return Tt===-1?void 0:SG(z[ee],Tt,1)[0]}return VT(z[ee])},e.removeHooks=function(ee){z[ee]=[]},e.removeAllHooks=function(){z=aE()},e}var Do=eL();const iL="sleepy:config:v1",rL=iL,Tv="sleepy",sE=420,GG=520,Ev={enabled:!1,hotkey:"Alt+Cmd+S"};function gC(){try{const i=localStorage.getItem(rL);if(i){const e=JSON.parse(i);return{enabled:!!e.enabled,hotkey:typeof e.hotkey=="string"&&e.hotkey.trim()?e.hotkey:Ev.hotkey}}}catch{}return{...Ev}}function nL(i){try{localStorage.setItem(rL,JSON.stringify(i))}catch{}}function YG(i){nL(i),ie.post("/launcher/sleepy-config",i).catch(()=>{})}async function KG(){try{const i=await ie.get("/launcher/sleepy-config"),e={enabled:!!i.enabled,hotkey:typeof i.hotkey=="string"&&i.hotkey.trim()?i.hotkey:Ev.hotkey};return nL(e),e}catch{return gC()}}async function VG(i){try{const{currentMonitor:e}=await Fe(async()=>{const{currentMonitor:o}=await import("./window-D0tFurhp.js").then(c=>c.w);return{currentMonitor:o}},__vite__mapDeps([3,1])),r=await e(),n=(r==null?void 0:r.scaleFactor)??1,a=((r==null?void 0:r.size.width)??1440)/n;return{x:Math.max(0,Math.round((a-i)/2)),y:0}}catch{return{x:420,y:0}}}async function XG(){if(!Po())return;const{WebviewWindow:i}=await Fe(async()=>{const{WebviewWindow:o}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:o}},__vite__mapDeps([2,3,1])),e=await i.getByLabel(Tv);if(e){await e.close();return}const{x:r,y:n}=await VG(sE),a=new i(Tv,{url:`${window.location.origin}/?capture=1`,width:sE,height:GG,x:r,y:n,decorations:!1,transparent:!0,alwaysOnTop:!0,skipTaskbar:!0,resizable:!1,shadow:!1,focus:!0,title:"dreamcontext capture"});await new Promise(o=>{a.once("tauri://created",()=>o()),a.once("tauri://error",()=>o())});try{await a.setFocus()}catch{}}async function ZG(){if(!Po())return;const{WebviewWindow:i}=await Fe(async()=>{const{WebviewWindow:r}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:r}},__vite__mapDeps([2,3,1])),e=await i.getByLabel(Tv);e&&await e.close()}async function oE(){if(Po())try{const{getCurrentWebviewWindow:i}=await Fe(async()=>{const{getCurrentWebviewWindow:e}=await import("./webviewWindow-Dlc9MvRw.js");return{getCurrentWebviewWindow:e}},__vite__mapDeps([2,3,1]));await i().close()}catch{await ZG()}}async function QG(i){if(!Po())return()=>{};try{const{getCurrentWebviewWindow:e}=await Fe(async()=>{const{getCurrentWebviewWindow:n}=await import("./webviewWindow-Dlc9MvRw.js");return{getCurrentWebviewWindow:n}},__vite__mapDeps([2,3,1]));return await e().onFocusChanged(({payload:n})=>i(n))}catch{return()=>{}}}async function Nv(i){if(Po())try{const{register:e,unregisterAll:r}=await Fe(async()=>{const{register:n,unregisterAll:a}=await import("./index-D-gsCv2F.js");return{register:n,unregisterAll:a}},__vite__mapDeps([4,1]));if(await r(),!i.enabled||!i.hotkey.trim())return;await e(i.hotkey,n=>{n.state==="Pressed"&&XG()})}catch(e){console.warn("[sleepy] hotkey registration failed:",e)}}Re.setOptions({gfm:!0,breaks:!0});function JG(i){return Do.sanitize(Re.parse(i))}const lE="sleepy:lastVault",tY=120;function eY(i){return i>=10?"sleeps":i>=8?"sleepy":"idle"}function iY(){const[i,e]=P.useState([]),[r,n]=P.useState(""),[a,o]=P.useState(""),[c,h]=P.useState("idle"),[u,d]=P.useState(""),[f,g]=P.useState("ask"),[x,y]=P.useState(null),[v,C]=P.useState("idle"),_=P.useRef(null),k=P.useRef(null),T=P.useRef(!1),N=P.useRef(!1);function E(I){I&&(I.style.height="auto",I.style.height=`${Math.min(I.scrollHeight,tY)}px`)}P.useEffect(()=>{const I=document.documentElement,D=I.style.background,F=document.body.style.background;return I.style.background="transparent",document.body.style.background="transparent",()=>{I.style.background=D,document.body.style.background=F}},[]),P.useEffect(()=>{ie.get("/vaults").then(I=>{var z;const D=I.vaults.filter(W=>W.exists!==!1),F=D.length>0?D:I.vaults;e(F);const U=localStorage.getItem(lE),K=U&&F.some(W=>W.name===U)?U:((z=F[0])==null?void 0:z.name)??"";n(K)}).catch(()=>h("error"))},[]),P.useEffect(()=>{if(!r)return;CM(r);let I=!1;return ie.get("/sleep").then(D=>{I||C(eY(typeof D.debt=="number"?D.debt:0))}).catch(()=>{I||C("idle")}),()=>{I=!0}},[r]),P.useEffect(()=>{var D;(D=_.current)==null||D.focus();const I=F=>{F.key==="Escape"&&(F.preventDefault(),oE())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[]),P.useEffect(()=>{let I=!1,D=!1,F=()=>{};return QG(U=>{if(U){I=!0;return}I&&!T.current&&!N.current&&oE()}).then(U=>{D?U():F=U}),()=>{D=!0,F()}},[]),P.useEffect(()=>()=>{k.current&&window.clearTimeout(k.current)},[]);function B(I,D){k.current&&window.clearTimeout(k.current);let F=0;const U=D==="sleep"?750:150;let K=0;const z=async()=>{F+=1;try{const W=await ie.get(`/launcher/capture/status?id=${encodeURIComponent(I)}`);K=W.state==="unknown"?K+1:0,y({state:W.state,output:W.output,mode:D}),(W.state==="running"||W.state==="unknown")&&F<U&&K<3&&(k.current=window.setTimeout(()=>void z(),1200))}catch{y({state:"error",output:"Lost contact with the run.",mode:D})}};k.current=window.setTimeout(()=>void z(),600)}async function O(){var F;const I=a.trim(),D=f;if(!(D!=="sleep"&&!I||!r||c==="saving")){h("saving"),d(""),y(null);try{const U=await ie.post("/launcher/capture",{vault:r,text:I,mode:D});localStorage.setItem(lE,r),o(""),h(D==="learn"?"saved":"idle"),_.current&&(_.current.style.height="auto"),(F=_.current)==null||F.focus(),U.captureId&&(y({state:"running",output:"",mode:D}),B(U.captureId,D)),window.setTimeout(()=>h("idle"),1400)}catch(U){d(U instanceof Error?U.message:"Capture failed"),h("error"),window.setTimeout(()=>h("idle"),5e3)}}}const A=(x==null?void 0:x.mode)==="sleep"&&(x.state==="running"||x.state==="unknown");N.current=A;const M=A?"sleeps":v;return m.jsxs("div",{className:"cap-root",children:[m.jsx("div",{className:"cap-notch","data-tauri-drag-region":!0,children:m.jsx("img",{className:"cap-char",src:`/api/sleepy/anim?mode=${M}`,alt:"",draggable:!1},M)}),m.jsxs("div",{className:`cap-bar cap-${c}`,children:[m.jsxs("div",{className:"cap-bar-head",children:[m.jsxs("div",{className:"cap-vault-wrap",children:[m.jsxs("select",{className:"cap-vault",value:r,onFocus:()=>{T.current=!0},onBlur:()=>{T.current=!1},onChange:I=>n(I.target.value),"aria-label":"Project",children:[i.length===0&&m.jsx("option",{value:"",children:"No projects"}),i.map(I=>m.jsx("option",{value:I.name,children:I.name},I.name))]}),m.jsx("span",{className:"cap-chev","aria-hidden":!0,children:"⌄"})]}),m.jsx("span",{className:`cap-status cap-status-${c}`,"aria-hidden":!0,children:c==="saving"?"saving…":c==="saved"?"captured ✓":c==="error"?"failed":""}),m.jsx("div",{className:"cap-mode-toggle",role:"radiogroup","aria-label":"Mode",children:["ask","learn","sleep"].map(I=>m.jsx("button",{type:"button",className:`cap-mode-opt ${f===I?"is-active":""}`,role:"radio","aria-checked":f===I,disabled:A,onClick:()=>g(I),children:I==="learn"?"Learn":I==="ask"?"Ask":"Sleep"},I))})]}),f==="sleep"?m.jsx("button",{type:"button",className:"cap-sleep-btn",disabled:A||!r,onClick:()=>void O(),children:A?"Sleeping…":`💤 Sleep — consolidate ${r||"project"}`}):m.jsx("textarea",{ref:_,className:"cap-input",placeholder:f==="ask"?"Ask one question about this project…":"Capture a thought or command…",rows:1,value:a,onChange:I=>{o(I.target.value),E(I.target)},onKeyDown:I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),O())}}),c==="error"&&u&&m.jsx("div",{className:"cap-error-msg",children:u}),x&&m.jsxs("div",{className:`cap-enrich cap-enrich-${x.state}`,children:[m.jsx("div",{className:"cap-enrich-head",children:x.state==="running"||x.state==="unknown"?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"cap-spinner","aria-hidden":!0}),m.jsx("span",{children:x.mode==="ask"?"Sleepy is thinking…":x.mode==="sleep"?"Sleepy is sleeping — consolidating memory…":"Sleepy is learning…"})]}):x.state==="done"?m.jsx("span",{className:"cap-enrich-done",children:x.mode==="ask"?"✓ Answer":x.mode==="sleep"?"✓ Slept":"✓ Learned"}):m.jsx("span",{className:"cap-enrich-err",children:x.mode==="ask"?"Couldn't answer":x.mode==="sleep"?"Sleep failed":"Enrichment failed"})}),x.output&&(x.state==="error"?m.jsx("div",{className:"cap-enrich-body",children:x.output}):m.jsx("div",{className:"cap-enrich-body cap-md",dangerouslySetInnerHTML:{__html:JG(x.output)}}))]})]})]})}const aL=P.createContext(null);function sL(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function cE(i){return i==="system"?sL():i}function hE({children:i}){const[e,r]=P.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=P.useState(()=>cE(e)),o=c=>{r(c),localStorage.setItem("dreamcontext-theme",c)};return P.useEffect(()=>{const c=cE(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),P.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=sL();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),m.jsx(aL.Provider,{value:{theme:e,resolved:n,setTheme:o},children:i})}function Gd(){const i=P.useContext(aL);if(!i)throw new Error("useTheme must be used within ThemeProvider");return i}const rY={en:{"nav.brain":"Brain","nav.tasks":"Tasks","nav.core":"Core Files","nav.knowledge":"Knowledge","nav.features":"Features","nav.sleep":"Sleep State","nav.council":"Council","nav.settings":"Settings","nav.packs":"Packs","nav.taxonomy":"Taxonomy","nav.about":"What is this?","nav.group.workspace":"Workspace","nav.group.control":"Control Panel","nav.collapse":"Collapse","nav.expand":"Expand","council.title":"Council","council.tab.verdict":"Verdict","council.tab.matrix":"Matrix","council.tab.transcript":"Transcript","council.search.placeholder":"Search sessions…","council.search.matrix":"Filter cells by text…","council.search.transcript":"Search transcript…","council.filter.all":"All","council.filter.status":"Status","council.inspector.empty":"Select a persona or cell to inspect.","council.inspector.selectCell":"Select a cell in the matrix for round details.","council.verdict.awaitingSynthesis":"Awaiting synthesis","council.verdict.synthPending":"The final report will appear here once the synthesizer runs.","council.empty.list":"No council sessions yet.","council.empty.detail":"Select a council session from the list.","tasks.title":"Tasks","tasks.create":"New Task","tasks.filter":"Filter","tasks.todo":"To Do","tasks.in_progress":"In Progress","tasks.in_review":"In Review","tasks.completed":"Completed","tasks.name":"Task Name","tasks.description":"Description","tasks.priority":"Priority","tasks.tags":"Tags","tasks.save":"Create Task","tasks.cancel":"Cancel","tasks.changelog":"Changelog","tasks.add_entry":"Add Entry","rice.title":"RICE","rice.reach":"Reach","rice.impact":"Impact","rice.confidence":"Confidence","rice.effort":"Effort","rice.score":"Score","rice.clear":"Clear RICE","rice.tooltip.reach":"How many people / sessions / units affected (1–10)","rice.tooltip.impact":"How much per affected unit (1=minimal, 5=massive)","rice.tooltip.confidence":"How sure are you? (25, 50, 75, 100)","rice.tooltip.effort":"Person-weeks (0.5–8 typical, max 52)","rice.empty":"Not rated","sort.rice":"RICE score","filter.min_rice":"Min RICE","priority.critical":"Critical","priority.high":"High","priority.medium":"Medium","priority.low":"Low","sleep.title":"Sleep State","sleep.debt":"Debt","sleep.level":"Level","sleep.last_sleep":"Last Sleep","sleep.sessions":"Sessions","sleep.alert":"Alert","sleep.drowsy":"Drowsy","sleep.sleepy":"Sleepy","sleep.must_sleep":"Must Sleep","sleep.changelog":"Changelog","sleep.changelog.pending":"Will fold into next sleep","sleep.changelog.breaking":"BREAKING","sleep.changelog.earlier":"earlier entries not shown","core.title":"Core Files","knowledge.title":"Knowledge","knowledge.pin":"Pin","knowledge.unpin":"Unpin","knowledge.search":"Search knowledge...","knowledge.fullscreen":"Full screen","features.title":"Features","features.search":"Search features...","settings.title":"Settings","settings.platforms":"Platforms","settings.save":"Save","settings.saving":"Saving...","settings.saved":"Saved","settings.no_config":"No configuration file found. Saving will create one with your selections.","settings.platform.claude":"Claude (Anthropic)","settings.platform.codex":"Codex (OpenAI)","settings.packs.installed":"Installed","settings.memory":"Memory","settings.native_memory.label":"Disable Claude's native memory","settings.native_memory.hint":"Recommended — dreamcontext becomes the single source of project memory instead of Claude Code’s built-in MEMORY.md.","settings.tasks":"Tasks","settings.cloud_tasks.label":"Cloud Task Management","settings.cloud_tasks.hint":"Tasks live in a remote backend; a gitignored local mirror keeps recall, snapshots, and the dashboard working unchanged.","settings.cloud_tasks.provider":"Provider","settings.cloud_tasks.provider.clickup":"ClickUp","settings.cloud_tasks.provider.github":"GitHub","settings.cloud_tasks.team":"Team ID","settings.cloud_tasks.space":"Space ID","settings.cloud_tasks.list":"List ID","settings.cloud_tasks.token_hint":"The API key is CLI-managed: run `dreamcontext config clickup-token` (stored in a gitignored secrets file, never in this config).","settings.cloud_tasks.github.hint":"Tasks sync to a GitHub repository's Issues; a gitignored local mirror keeps recall, snapshots, and the dashboard working unchanged.","settings.cloud_tasks.github.owner":"Owner","settings.cloud_tasks.github.repo":"Repository","settings.cloud_tasks.github.pick":"Pick the repository to sync to…","settings.cloud_tasks.github.search":"Search repositories…","settings.cloud_tasks.github.token_hint":"The token is CLI-managed: run `dreamcontext config github-token` (stored in a gitignored secrets file, never in this config).","settings.cloud_tasks.github.provision":"Provision labels","settings.cloud_tasks.github.provisioning":"Provisioning…","settings.cloud_tasks.list_pick":"Pick the list to sync to…","settings.cloud_tasks.list_search":"Search lists…","settings.cloud_tasks.keep_current":"(keep current)","settings.cloud_tasks.list_label":"List","settings.cloud_tasks.provision":"Provision fields","settings.cloud_tasks.provisioning":"Provisioning…","settings.cloud_tasks.test":"Test connection","settings.cloud_tasks.testing":"Testing…","settings.cloud_tasks.test_ok":"Connected as","settings.cloud_tasks.status":"Sync status","settings.cloud_tasks.pending":"pending push","settings.cloud_tasks.conflicts":"conflict(s) preserved in state/.conflicts/","settings.federation":"Cross-Project Federation","federation.intro.title":"What is cross-project federation?","federation.intro.body":"Federation lets your projects share knowledge with each other. Connect two projects and one can “read” the other — its agent can recall decisions, changelog and knowledge from across the link. It’s off by default: nothing is shared until you opt in.","federation.intro.step1":"1. Turn on Sharing below so other projects are allowed to read this one.","federation.intro.step2":"2. Add a connection to a peer and choose the direction — read it, share to it, or both.","federation.intro.step3":"3. Incoming knowledge lands in the digest inbox and is folded in on the next sleep cycle.","federation.sharing":"Sharing","federation.shareable.label":"Let other projects read this one","federation.shareable.hint":"When on, projects you’ve connected may pull this project’s knowledge into their recall. Off = private (the default). This only controls who may READ you — it never stops you reading others.","federation.vaults":"Registered vaults","federation.vaults.empty":"No vaults registered. Run `dreamcontext vaults discover --register` to add sibling projects.","federation.current":"This project","federation.connections":"Connections","federation.connections.empty":"No connections yet. Add a peer below to read or share knowledge across projects.","federation.stale":"Stale","federation.remove":"Remove","federation.direction":"Direction","federation.direction.out":"⮞ Share to","federation.direction.in":"⮜ Read from","federation.direction.both":"⇄ Two-way","federation.direction.out.hint":"Your knowledge flows to this peer, and your recall can reach into theirs.","federation.direction.in.hint":"Accept this peer’s digests into your inbox.","federation.direction.both.hint":"Read from and share to this peer.","federation.topics.placeholder":"topics (comma-separated, blank = all)","federation.topics.label":"Limit to topics","federation.add":"Add a connection","federation.add.pick":"Pick a vault…","federation.add.none":"Every registered vault is already connected (or none are available to add).","federation.connect":"Connect","federation.error.pick_vault":"Pick a vault to connect to.","federation.inbox":"Digest inbox","federation.inbox.pending":"Pending","federation.inbox.consumed":"Consumed","federation.inbox.empty":"Inbox is empty — no peer digests waiting. The next sleep cycle drains it.","federation.inbox.quarantined":"Quarantined (incompatible schema — left in place)","federation.inbox.from":"from","federation.preview":"Preview sync","federation.preview.running":"Previewing…","federation.preview.hint":"Dry-run: computes the digests that would be pushed to consenting peers. Writes nothing.","federation.preview.none":"No out/both connections to preview.","federation.preview.stale":"unreachable (stale)","federation.preview.noconsent":"no consent (peer must link in/both back)","federation.preview.nodelta":"no new entries since last sync","federation.preview.entries":"entries would be pushed","packs.title":"Skill Packs","packs.section.packs":"Packs","packs.section.standalone":"Standalone Skills","packs.detail.base":"Base Skill","packs.detail.subskills":"Sub-Skills","packs.detail.agents":"Related Agents","packs.detail.close":"Close","packs.action.install":"Install","packs.action.remove":"Remove","packs.action.installing":"Installing…","packs.action.removing":"Removing…","packs.action.error":"Action failed","update.available":"Update available","update.title":"Update Available","update.dismiss":"Dismiss","update.managePacks":"Manage packs →","taxonomy.title":"Taxonomy","common.loading":"Loading...","common.error":"Error","common.empty":"Nothing here yet.","common.close":"Close"}},oL=P.createContext(null);function nY({children:i}){const[e,r]=P.useState("en"),n=a=>{var o;return((o=rY[e])==null?void 0:o[a])??a};return m.jsx(oL.Provider,{value:{locale:e,setLocale:r,t:n},children:i})}function qi(){const i=P.useContext(oL);if(!i)throw new Error("useI18n must be used within I18nProvider");return i}const lL=P.createContext({projectId:"",contextRoot:""});function aY(i){let e=0;for(let r=0;r<i.length;r++)e=(e<<5)-e+i.charCodeAt(r)|0;return Math.abs(e).toString(36)}function sY({children:i}){const[e,r]=P.useState({kind:"loading"});return P.useEffect(()=>{ie.get("/health").then(n=>{r({kind:"ready",value:{contextRoot:n.contextRoot,projectId:aY(n.contextRoot)}})}).catch(()=>{r({kind:"ready",value:{projectId:"",contextRoot:""}})})},[]),e.kind==="loading"?m.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",color:"var(--color-text-secondary, #888)",fontSize:"14px"},children:"Loading project…"}):m.jsx(lL.Provider,{value:e.value,children:i})}function cL(){return P.useContext(lL)}function hL(i){return i<=3?"Alert":i<=6?"Drowsy":i<=9?"Sleepy":"Must Sleep"}function uL(i){return i<=3?"alert":i<=6?"drowsy":i<=9?"sleepy":"must_sleep"}function dL(){return oi({queryKey:["sleep"],queryFn:()=>ie.get("/sleep")})}function oY(){return oi({queryKey:["version-check"],queryFn:()=>ie.get("/version-check")})}var Qp={exports:{}},lY=Qp.exports,uE;function cY(){return uE||(uE=1,(function(i,e){(function(r,n){i.exports=n()})(lY,(function(){var r=1e3,n=6e4,a=36e5,o="millisecond",c="second",h="minute",u="hour",d="day",f="week",g="month",x="quarter",y="year",v="date",C="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={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(z){var W=["th","st","nd","rd"],j=z%100;return"["+z+(W[(j-20)%10]||W[j]||W[0])+"]"}},N=function(z,W,j){var H=String(z);return!H||H.length>=W?z:""+Array(W+1-H.length).join(j)+z},E={s:N,z:function(z){var W=-z.utcOffset(),j=Math.abs(W),H=Math.floor(j/60),Y=j%60;return(W<=0?"+":"-")+N(H,2,"0")+":"+N(Y,2,"0")},m:function z(W,j){if(W.date()<j.date())return-z(j,W);var H=12*(j.year()-W.year())+(j.month()-W.month()),Y=W.clone().add(H,g),Z=j-Y<0,rt=W.clone().add(H+(Z?-1:1),g);return+(-(H+(j-Y)/(Z?Y-rt:rt-Y))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:g,y,w:f,d,D:v,h:u,m:h,s:c,ms:o,Q:x}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},B="en",O={};O[B]=T;var A="$isDayjsObject",M=function(z){return z instanceof U||!(!z||!z[A])},I=function z(W,j,H){var Y;if(!W)return B;if(typeof W=="string"){var Z=W.toLowerCase();O[Z]&&(Y=Z),j&&(O[Z]=j,Y=Z);var rt=W.split("-");if(!Y&&rt.length>1)return z(rt[0])}else{var G=W.name;O[G]=W,Y=G}return!H&&Y&&(B=Y),Y||!H&&B},D=function(z,W){if(M(z))return z.clone();var j=typeof W=="object"?W:{};return j.date=z,j.args=arguments,new U(j)},F=E;F.l=I,F.i=M,F.w=function(z,W){return D(z,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var U=(function(){function z(j){this.$L=I(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[A]=!0}var W=z.prototype;return W.parse=function(j){this.$d=(function(H){var Y=H.date,Z=H.utc;if(Y===null)return new Date(NaN);if(F.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var rt=Y.match(_);if(rt){var G=rt[2]-1||0,tt=(rt[7]||"0").substring(0,3);return Z?new Date(Date.UTC(rt[1],G,rt[3]||1,rt[4]||0,rt[5]||0,rt[6]||0,tt)):new Date(rt[1],G,rt[3]||1,rt[4]||0,rt[5]||0,rt[6]||0,tt)}}return new Date(Y)})(j),this.init()},W.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},W.$utils=function(){return F},W.isValid=function(){return this.$d.toString()!==C},W.isSame=function(j,H){var Y=D(j);return this.startOf(H)<=Y&&Y<=this.endOf(H)},W.isAfter=function(j,H){return D(j)<this.startOf(H)},W.isBefore=function(j,H){return this.endOf(H)<D(j)},W.$g=function(j,H,Y){return F.u(j)?this[H]:this.set(Y,j)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(j,H){var Y=this,Z=!!F.u(H)||H,rt=F.p(j),G=function(V,at){var Ct=F.w(Y.$u?Date.UTC(Y.$y,at,V):new Date(Y.$y,at,V),Y);return Z?Ct:Ct.endOf(d)},tt=function(V,at){return F.w(Y.toDate()[V].apply(Y.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(at)),Y)},ft=this.$W,ct=this.$M,vt=this.$D,ot="set"+(this.$u?"UTC":"");switch(rt){case y:return Z?G(1,0):G(31,11);case g:return Z?G(1,ct):G(0,ct+1);case f:var wt=this.$locale().weekStart||0,it=(ft<wt?ft+7:ft)-wt;return G(Z?vt-it:vt+(6-it),ct);case d:case v:return tt(ot+"Hours",0);case u:return tt(ot+"Minutes",1);case h:return tt(ot+"Seconds",2);case c:return tt(ot+"Milliseconds",3);default:return this.clone()}},W.endOf=function(j){return this.startOf(j,!1)},W.$set=function(j,H){var Y,Z=F.p(j),rt="set"+(this.$u?"UTC":""),G=(Y={},Y[d]=rt+"Date",Y[v]=rt+"Date",Y[g]=rt+"Month",Y[y]=rt+"FullYear",Y[u]=rt+"Hours",Y[h]=rt+"Minutes",Y[c]=rt+"Seconds",Y[o]=rt+"Milliseconds",Y)[Z],tt=Z===d?this.$D+(H-this.$W):H;if(Z===g||Z===y){var ft=this.clone().set(v,1);ft.$d[G](tt),ft.init(),this.$d=ft.set(v,Math.min(this.$D,ft.daysInMonth())).$d}else G&&this.$d[G](tt);return this.init(),this},W.set=function(j,H){return this.clone().$set(j,H)},W.get=function(j){return this[F.p(j)]()},W.add=function(j,H){var Y,Z=this;j=Number(j);var rt=F.p(H),G=function(ct){var vt=D(Z);return F.w(vt.date(vt.date()+Math.round(ct*j)),Z)};if(rt===g)return this.set(g,this.$M+j);if(rt===y)return this.set(y,this.$y+j);if(rt===d)return G(1);if(rt===f)return G(7);var tt=(Y={},Y[h]=n,Y[u]=a,Y[c]=r,Y)[rt]||1,ft=this.$d.getTime()+j*tt;return F.w(ft,this)},W.subtract=function(j,H){return this.add(-1*j,H)},W.format=function(j){var H=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||C;var Z=j||"YYYY-MM-DDTHH:mm:ssZ",rt=F.z(this),G=this.$H,tt=this.$m,ft=this.$M,ct=Y.weekdays,vt=Y.months,ot=Y.meridiem,wt=function(at,Ct,Bt,Ht){return at&&(at[Ct]||at(H,Z))||Bt[Ct].slice(0,Ht)},it=function(at){return F.s(G%12||12,at,"0")},V=ot||function(at,Ct,Bt){var Ht=at<12?"AM":"PM";return Bt?Ht.toLowerCase():Ht};return Z.replace(k,(function(at,Ct){return Ct||(function(Bt){switch(Bt){case"YY":return String(H.$y).slice(-2);case"YYYY":return F.s(H.$y,4,"0");case"M":return ft+1;case"MM":return F.s(ft+1,2,"0");case"MMM":return wt(Y.monthsShort,ft,vt,3);case"MMMM":return wt(vt,ft);case"D":return H.$D;case"DD":return F.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return wt(Y.weekdaysMin,H.$W,ct,2);case"ddd":return wt(Y.weekdaysShort,H.$W,ct,3);case"dddd":return ct[H.$W];case"H":return String(G);case"HH":return F.s(G,2,"0");case"h":return it(1);case"hh":return it(2);case"a":return V(G,tt,!0);case"A":return V(G,tt,!1);case"m":return String(tt);case"mm":return F.s(tt,2,"0");case"s":return String(H.$s);case"ss":return F.s(H.$s,2,"0");case"SSS":return F.s(H.$ms,3,"0");case"Z":return rt}return null})(at)||rt.replace(":","")}))},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(j,H,Y){var Z,rt=this,G=F.p(H),tt=D(j),ft=(tt.utcOffset()-this.utcOffset())*n,ct=this-tt,vt=function(){return F.m(rt,tt)};switch(G){case y:Z=vt()/12;break;case g:Z=vt();break;case x:Z=vt()/3;break;case f:Z=(ct-ft)/6048e5;break;case d:Z=(ct-ft)/864e5;break;case u:Z=ct/a;break;case h:Z=ct/n;break;case c:Z=ct/r;break;default:Z=ct}return Y?Z:F.a(Z)},W.daysInMonth=function(){return this.endOf(g).$D},W.$locale=function(){return O[this.$L]},W.locale=function(j,H){if(!j)return this.$L;var Y=this.clone(),Z=I(j,H,!0);return Z&&(Y.$L=Z),Y},W.clone=function(){return F.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},z})(),K=U.prototype;return D.prototype=K,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",g],["$y",y],["$D",v]].forEach((function(z){K[z[1]]=function(W){return this.$g(W,z[0],z[1])}})),D.extend=function(z,W){return z.$i||(z(W,U,D),z.$i=!0),D},D.locale=I,D.isDayjs=M,D.unix=function(z){return D(1e3*z)},D.en=O[B],D.Ls=O,D.p={},D}))})(Qp)),Qp.exports}var hY=cY();const uY=$d(hY);var fL=Object.defineProperty,L=(i,e)=>fL(i,"name",{value:e,configurable:!0}),dY=(i,e)=>{for(var r in e)fL(i,r,{get:e[r],enumerable:!0})},vs={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Lt={trace:L((...i)=>{},"trace"),debug:L((...i)=>{},"debug"),info:L((...i)=>{},"info"),warn:L((...i)=>{},"warn"),error:L((...i)=>{},"error"),fatal:L((...i)=>{},"fatal")},mC=L(function(i="fatal"){let e=vs.fatal;typeof i=="string"?i.toLowerCase()in vs&&(e=vs[i]):typeof i=="number"&&(e=i),Lt.trace=()=>{},Lt.debug=()=>{},Lt.info=()=>{},Lt.warn=()=>{},Lt.error=()=>{},Lt.fatal=()=>{},e<=vs.fatal&&(Lt.fatal=console.error?console.error.bind(console,Jn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Jn("FATAL"))),e<=vs.error&&(Lt.error=console.error?console.error.bind(console,Jn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Jn("ERROR"))),e<=vs.warn&&(Lt.warn=console.warn?console.warn.bind(console,Jn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Jn("WARN"))),e<=vs.info&&(Lt.info=console.info?console.info.bind(console,Jn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Jn("INFO"))),e<=vs.debug&&(Lt.debug=console.debug?console.debug.bind(console,Jn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jn("DEBUG"))),e<=vs.trace&&(Lt.trace=console.debug?console.debug.bind(console,Jn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jn("TRACE")))},"setLogLevel"),Jn=L(i=>`%c${uY().format("ss.SSS")} : ${i} : `,"format");const Jp={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:i=>i>=255?255:i<0?0:i,g:i=>i>=255?255:i<0?0:i,b:i=>i>=255?255:i<0?0:i,h:i=>i%360,s:i=>i>=100?100:i<0?0:i,l:i=>i>=100?100:i<0?0:i,a:i=>i>=1?1:i<0?0:i},toLinear:i=>{const e=i/255;return i>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(i,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?i+(e-i)*6*r:r<1/2?e:r<2/3?i+(e-i)*(2/3-r)*6:i),hsl2rgb:({h:i,s:e,l:r},n)=>{if(!e)return r*2.55;i/=360,e/=100,r/=100;const a=r<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return Jp.hue2rgb(o,a,i+1/3)*255;case"g":return Jp.hue2rgb(o,a,i)*255;case"b":return Jp.hue2rgb(o,a,i-1/3)*255}},rgb2hsl:({r:i,g:e,b:r},n)=>{i/=255,e/=255,r/=255;const a=Math.max(i,e,r),o=Math.min(i,e,r),c=(a+o)/2;if(n==="l")return c*100;if(a===o)return 0;const h=a-o,u=c>.5?h/(2-a-o):h/(a+o);if(n==="s")return u*100;switch(a){case i:return((e-r)/h+(e<r?6:0))*60;case e:return((r-i)/h+2)*60;case r:return((i-e)/h+4)*60;default:return-1}}},fY={clamp:(i,e,r)=>e>r?Math.min(e,Math.max(r,i)):Math.min(r,Math.max(e,i)),round:i=>Math.round(i*1e10)/1e10},pY={dec2hex:i=>{const e=Math.round(i).toString(16);return e.length>1?e:`0${e}`}},Oe={channel:Jp,lang:fY,unit:pY},bo={};for(let i=0;i<=255;i++)bo[i]=Oe.unit.dec2hex(i);const qr={ALL:0,RGB:1,HSL:2};class gY{constructor(){this.type=qr.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=qr.ALL}is(e){return this.type===e}}class mY{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new gY}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=qr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:a}=e;r===void 0&&(e.h=Oe.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Oe.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=Oe.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:a}=e;r===void 0&&(e.r=Oe.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Oe.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=Oe.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(qr.HSL)&&r!==void 0?r:(this._ensureHSL(),Oe.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(qr.HSL)&&r!==void 0?r:(this._ensureHSL(),Oe.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(qr.HSL)&&r!==void 0?r:(this._ensureHSL(),Oe.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(qr.RGB)&&r!==void 0?r:(this._ensureRGB(),Oe.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(qr.RGB)&&r!==void 0?r:(this._ensureRGB(),Oe.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(qr.RGB)&&r!==void 0?r:(this._ensureRGB(),Oe.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(qr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(qr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(qr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(qr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(qr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(qr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const xm=new mY({r:0,g:0,b:0,a:0},"transparent"),Hc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const e=i.match(Hc.re);if(!e)return;const r=e[1],n=parseInt(r,16),a=r.length,o=a%4===0,c=a>4,h=c?1:17,u=c?8:4,d=o?0:-1,f=c?255:15;return xm.set({r:(n>>u*(d+3)&f)*h,g:(n>>u*(d+2)&f)*h,b:(n>>u*(d+1)&f)*h,a:o?(n&f)*h/255:1},i)},stringify:i=>{const{r:e,g:r,b:n,a}=i;return a<1?`#${bo[Math.round(e)]}${bo[Math.round(r)]}${bo[Math.round(n)]}${bo[Math.round(a*255)]}`:`#${bo[Math.round(e)]}${bo[Math.round(r)]}${bo[Math.round(n)]}`}},bl={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:i=>{const e=i.match(bl.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return Oe.channel.clamp.h(parseFloat(r)*.9);case"rad":return Oe.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Oe.channel.clamp.h(parseFloat(r)*360)}}return Oe.channel.clamp.h(parseFloat(i))},parse:i=>{const e=i.charCodeAt(0);if(e!==104&&e!==72)return;const r=i.match(bl.re);if(!r)return;const[,n,a,o,c,h]=r;return xm.set({h:bl._hue2deg(n),s:Oe.channel.clamp.s(parseFloat(a)),l:Oe.channel.clamp.l(parseFloat(o)),a:c?Oe.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},i)},stringify:i=>{const{h:e,s:r,l:n,a}=i;return a<1?`hsla(${Oe.lang.round(e)}, ${Oe.lang.round(r)}%, ${Oe.lang.round(n)}%, ${a})`:`hsl(${Oe.lang.round(e)}, ${Oe.lang.round(r)}%, ${Oe.lang.round(n)}%)`}},ud={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:i=>{i=i.toLowerCase();const e=ud.colors[i];if(e)return Hc.parse(e)},stringify:i=>{const e=Hc.stringify(i);for(const r in ud.colors)if(ud.colors[r]===e)return r}},Ju={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:i=>{const e=i.charCodeAt(0);if(e!==114&&e!==82)return;const r=i.match(Ju.re);if(!r)return;const[,n,a,o,c,h,u,d,f]=r;return xm.set({r:Oe.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:Oe.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:Oe.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:d?Oe.channel.clamp.a(f?parseFloat(d)/100:parseFloat(d)):1},i)},stringify:i=>{const{r:e,g:r,b:n,a}=i;return a<1?`rgba(${Oe.lang.round(e)}, ${Oe.lang.round(r)}, ${Oe.lang.round(n)}, ${Oe.lang.round(a)})`:`rgb(${Oe.lang.round(e)}, ${Oe.lang.round(r)}, ${Oe.lang.round(n)})`}},Ya={format:{keyword:ud,hex:Hc,rgb:Ju,rgba:Ju,hsl:bl,hsla:bl},parse:i=>{if(typeof i!="string")return i;const e=Hc.parse(i)||Ju.parse(i)||bl.parse(i)||ud.parse(i);if(e)return e;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(qr.HSL)||i.data.r===void 0?bl.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?Ju.stringify(i):Hc.stringify(i)},pL=(i,e)=>{const r=Ya.parse(i);for(const n in e)r[n]=Oe.channel.clamp[n](e[n]);return Ya.stringify(r)},Oo=(i,e,r=0,n=1)=>{if(typeof i!="number")return pL(i,{a:e});const a=xm.set({r:Oe.channel.clamp.r(i),g:Oe.channel.clamp.g(e),b:Oe.channel.clamp.b(r),a:Oe.channel.clamp.a(n)});return Ya.stringify(a)},yY=i=>{const{r:e,g:r,b:n}=Ya.parse(i),a=.2126*Oe.channel.toLinear(e)+.7152*Oe.channel.toLinear(r)+.0722*Oe.channel.toLinear(n);return Oe.lang.round(a)},bY=i=>yY(i)>=.5,Ta=i=>!bY(i),gL=(i,e,r)=>{const n=Ya.parse(i),a=n[e],o=Oe.channel.clamp[e](a+r);return a!==o&&(n[e]=o),Ya.stringify(n)},St=(i,e)=>gL(i,"l",e),_t=(i,e)=>gL(i,"l",-e),$=(i,e)=>{const r=Ya.parse(i),n={};for(const a in e)e[a]&&(n[a]=r[a]+e[a]);return pL(i,n)},xY=(i,e,r=50)=>{const{r:n,g:a,b:o,a:c}=Ya.parse(i),{r:h,g:u,b:d,a:f}=Ya.parse(e),g=r/100,x=g*2-1,y=c-f,C=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,_=1-C,k=n*C+h*_,T=a*C+u*_,N=o*C+d*_,E=c*g+f*(1-g);return Oo(k,T,N,E)},ut=(i,e=100)=>{const r=Ya.parse(i);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,xY(r,i,e)};var mL=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,dd=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vY=/\s*%%.*\n/gm,nh,yL=(nh=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},L(nh,"UnknownDiagramError"),nh),Il={},yC=L(function(i,e){i=i.replace(mL,"").replace(dd,"").replace(vY,`
|
|
153
|
-
`);for(const[r,{detector:n}]of Object.entries(Il))if(n(i,e))return r;throw new yL(`No diagram type detected matching given configuration for text: ${i}`)},"detectType"),Av=L((...i)=>{for(const{id:e,detector:r,loader:n}of i)bL(e,r,n)},"registerLazyLoadedDiagrams"),bL=L((i,e,r)=>{Il[i]&&Lt.warn(`Detector with key ${i} already exists. Overwriting.`),Il[i]={detector:e,loader:r},Lt.debug(`Detector with key ${i} added${r?" with loader":""}`)},"addDetector"),CY=L(i=>Il[i].loader,"getDiagramLoader"),Mv=L((i,e,{depth:r=2,clobber:n=!1}={})=>{const a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(i)?(e.forEach(o=>Mv(i,o,a)),i):Array.isArray(e)&&Array.isArray(i)?(e.forEach(o=>{i.includes(o)||i.push(o)}),i):i===void 0||r<=0?i!=null&&typeof i=="object"&&typeof e=="object"?Object.assign(i,e):e:(e!==void 0&&typeof i=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&e[o]!==null&&(i[o]===void 0||typeof i[o]=="object")?(i[o]===void 0&&(i[o]=Array.isArray(e[o])?[]:{}),i[o]=Mv(i[o],e[o],{depth:r-1,clobber:n})):(n||typeof i[o]!="object"&&typeof e[o]!="object")&&(i[o]=e[o])}),i)},"assignWithDepth"),Cr=Mv,Za="#ffffff",Qa="#f2f2f2",Ae=L((i,e)=>e?$(i,{s:-40,l:10}):$(i,{s:-40,l:-10}),"mkBorder"),ah,_Y=(ah=class{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(){var r,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O,A;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?_t(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||_t(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||St(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||_t(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||_t(this.mainBkg,10)):(this.rowOdd=this.rowOdd||St(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||St(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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.darkMode)for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=_t(this["cScale"+M],75);else for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=_t(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||ut(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||St(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||_t(this["cScale"+M],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||$(this.mainBkg,{h:180,s:-15,l:e*(5+M*3)}),this["surfacePeer"+M]=this["surfacePeer"+M]||$(this.mainBkg,{h:180,s:-15,l:e*(8+M*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(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||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(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??$(this.primaryColor,{l:-30}),this.venn2=this.venn2??$(this.secondaryColor,{l:-30}),this.venn3=this.venn3??$(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??$(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??$(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??$(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??$(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??$(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((d=this.radar)==null?void 0:d.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,dataLabelColor:((v=this.xyChart)==null?void 0:v.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((C=this.xyChart)==null?void 0:C.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((N=this.xyChart)==null?void 0:N.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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?_t(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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(ah,"Theme"),ah),kY=L(i=>{const e=new _Y;return e.calculate(i),e},"getThemeVariables"),sh,wY=(sh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=St(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=St(ut("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Oo(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=_t("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=_t(this.sectionBkgColor,10),this.taskBorderColor=Oo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oo(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||St(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||_t(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(){var e,r,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.secondBkg=St(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=St(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=St(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=ut(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=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330});for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||ut(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScalePeer"+A]=this["cScalePeer"+A]||St(this["cScale"+A],10);for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{h:30,s:-30,l:-(-10+A*4)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{h:30,s:-30,l:-(-7+A*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["pie"+A]=this["cScale"+A];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 A=0;A<8;A++)this["venn"+(A+1)]=this["venn"+(A+1)]??St(this["cScale"+A],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?_t(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=St(this.secondaryColor,20),this.git1=St(this.pie2||this.secondaryColor,20),this.git2=St(this.pie3||this.tertiaryColor,20),this.git3=St(this.pie4||$(this.primaryColor,{h:-30}),20),this.git4=St(this.pie5||$(this.primaryColor,{h:-60}),20),this.git5=St(this.pie6||$(this.primaryColor,{h:-90}),10),this.git6=St(this.pie7||$(this.primaryColor,{h:60}),10),this.git7=St(this.pie8||$(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||St(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||St(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(sh,"Theme"),sh),SY=L(i=>{const e=new wY;return e.calculate(i),e},"getThemeVariables"),oh,TY=(oh=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=$(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ae(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=Oo(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(){var e,r,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||_t(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||_t(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=_t(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||_t(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||$(this["cScale"+A],{h:180});for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{h:30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{h:30,l:-(7+A*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ut(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ut(this.labelTextColor);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||St(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||St(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=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||$(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-30}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||$(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||$(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??$(this.primaryColor,{l:-30}),this.venn2=this.venn2??$(this.secondaryColor,{l:-30}),this.venn3=this.venn3??$(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??$(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??$(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??$(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??$(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??$(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((N=this.xyChart)==null?void 0:N.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||_t(ut(this.git0),25),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(oh,"Theme"),oh),EY=L(i=>{const e=new TY;return e.calculate(i),e},"getThemeVariables"),lh,NY=(lh=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=St("#cde498",10),this.primaryBorderColor=Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.primaryColor),this.lineColor=ut(this.background),this.textColor=ut(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(){var e,r,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.actorBorder=_t(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||_t(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||_t(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=_t(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||_t(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||$(this["cScale"+A],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{h:30,s:-30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{h:30,s:-30,l:-(8+A*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||St(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||St(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=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(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||$(this.primaryColor,{l:-30}),this.pie5=this.pie5||$(this.secondaryColor,{l:-30}),this.pie6=this.pie6||$(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||$(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??$(this.primaryColor,{l:-30}),this.venn2=this.venn2??$(this.secondaryColor,{l:-30}),this.venn3=this.venn3??$(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??$(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??$(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??$(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??$(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??$(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((N=this.xyChart)==null?void 0:N.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(lh,"Theme"),lh),AY=L(i=>{const e=new NY;return e.calculate(i),e},"getThemeVariables"),ch,MY=(ch=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=St(this.contrast,55),this.background="#ffffff",this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(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||St(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(){var e,r,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.secondBkg=St(this.contrast,55),this.border2=this.contrast,this.actorBorder=St(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||ut(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this.darkMode?this["cScalePeer"+A]=this["cScalePeer"+A]||St(this["cScale"+A],10):this["cScalePeer"+A]=this["cScalePeer"+A]||_t(this["cScale"+A],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{l:-(8+A*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=St(this.contrast,30),this.sectionBkgColor2=St(this.contrast,30),this.taskBorderColor=_t(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=St(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=_t(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=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128});for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["pie"+A]=this["cScale"+A];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 A=0;A<8;A++)this["venn"+(A+1)]=this["venn"+(A+1)]??this["cScale"+A];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=_t(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||$(this.primaryColor,{h:-30}),this.git4=this.pie5||$(this.primaryColor,{h:-60}),this.git5=this.pie6||$(this.primaryColor,{h:-90}),this.git6=this.pie7||$(this.primaryColor,{h:60}),this.git7=this.pie8||$(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(ch,"Theme"),ch),BY=L(i=>{const e=new MY;return e.calculate(i),e},"getThemeVariables"),hh,LY=(hh=class{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=Ae(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(){var o,c,h,u,d,f,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?_t(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||_t(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=$(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,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||St(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||r,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||$(e,{h:30}),this.cScale4=this.cScale4||$(e,{h:60}),this.cScale5=this.cScale5||$(e,{h:90}),this.cScale6=this.cScale6||$(e,{h:120}),this.cScale7=this.cScale7||$(e,{h:150}),this.cScale8=this.cScale8||$(e,{h:210,l:150}),this.cScale9=this.cScale9||$(e,{h:270}),this.cScale10=this.cScale10||$(e,{h:300}),this.cScale11=this.cScale11||$(e,{h:330}),this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=_t(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=_t(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ut(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||St(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(r,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(r,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(r,{l:-10}),this.pie6=this.pie6||$(n,{l:-10}),this.pie7=this.pie7||$(e,{h:60,l:-10}),this.pie8=this.pie8||$(e,{h:-60,l:-10}),this.pie9=this.pie9||$(e,{h:120,l:0}),this.pie10=this.pie10||$(e,{h:60,l:-20}),this.pie11=this.pie11||$(e,{h:-60,l:-20}),this.pie12=this.pie12||$(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||$(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((f=this.xyChart)==null?void 0:f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?_t(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||$(e,{h:-30}),this.git4=this.git4||$(e,{h:-60}),this.git5=this.git5||$(e,{h:-90}),this.git6=this.git6||$(e,{h:60}),this.git7=this.git7||$(e,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(hh,"Theme"),hh),OY=L(i=>{const e=new LY;return e.calculate(i),e},"getThemeVariables"),uh,RY=(uh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=St(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=St(ut("#323D47"),10),this.border1="#ccc",this.border2=Oo(255,255,255,.25),this.arrowheadColor=ut(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(){var r,n,a,o,c,h,u,d,f,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?_t(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||_t(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||St(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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=_t(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=_t(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||ut(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||St(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||_t(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(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||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(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||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?_t(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=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(uh,"Theme"),uh),jY=L(i=>{const e=new RY;return e.calculate(i),e},"getThemeVariables"),dh,DY=(dh=class{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=Ae("#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(){var o,c,h,u,d,f,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?_t(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||_t(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=$(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,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||St(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=this.mainBkg;if(this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=_t(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=_t(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ut(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||St(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(r,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(r,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(r,{l:-10}),this.pie6=this.pie6||$(n,{l:-10}),this.pie7=this.pie7||$(e,{h:60,l:-10}),this.pie8=this.pie8||$(e,{h:-60,l:-10}),this.pie9=this.pie9||$(e,{h:120,l:0}),this.pie10=this.pie10||$(e,{h:60,l:-20}),this.pie11=this.pie11||$(e,{h:-60,l:-20}),this.pie12=this.pie12||$(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||$(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((f=this.xyChart)==null?void 0:f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?_t(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||$(e,{h:-30}),this.git4=this.git4||$(e,{h:-60}),this.git5=this.git5||$(e,{h:-90}),this.git6=this.git6||$(e,{h:60}),this.git7=this.git7||$(e,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(dh,"Theme"),dh),FY=L(i=>{const e=new DY;return e.calculate(i),e},"getThemeVariables"),fh,IY=(fh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=St(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=St(ut("#323D47"),10),this.border1="#ccc",this.border2=Oo(255,255,255,.25),this.arrowheadColor=ut(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(){var r,n,a,o,c,h,u,d,f,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?_t(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||_t(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||St(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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=_t(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=_t(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||ut(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||St(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||_t(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(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||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(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||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?_t(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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(fh,"Theme"),fh),$Y=L(i=>{const e=new IY;return e.calculate(i),e},"getThemeVariables"),ph,zY=(ph=class{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=Ae(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(){var o,c,h,u,d,f,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?_t(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||_t(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=$(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,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||St(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ut(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||St(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(r,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(r,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(r,{l:-10}),this.pie6=this.pie6||$(n,{l:-10}),this.pie7=this.pie7||$(e,{h:60,l:-10}),this.pie8=this.pie8||$(e,{h:-60,l:-10}),this.pie9=this.pie9||$(e,{h:120,l:0}),this.pie10=this.pie10||$(e,{h:60,l:-20}),this.pie11=this.pie11||$(e,{h:-60,l:-20}),this.pie12=this.pie12||$(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||$(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((f=this.xyChart)==null?void 0:f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?_t(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||$(e,{h:-30}),this.git4=this.git4||$(e,{h:-60}),this.git5=this.git5||$(e,{h:-90}),this.git6=this.git6||$(e,{h:60}),this.git7=this.git7||$(e,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(ph,"Theme"),ph),PY=L(i=>{const e=new zY;return e.calculate(i),e},"getThemeVariables"),gh,qY=(gh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=St(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=St(ut("#323D47"),10),this.border1="#ccc",this.border2=Oo(255,255,255,.25),this.arrowheadColor=ut(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(){var r,n,a,o,c,h,u,d,f,g,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?_t(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||_t(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),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||St(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||ut(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||St(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||_t(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=_t(this["cScale"+y],75);const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(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||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(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||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?St(this.quadrant1Fill):_t(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?_t(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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=St(this.git0,25),this.git1=St(this.git1,25),this.git2=St(this.git2,25),this.git3=St(this.git3,25),this.git4=St(this.git4,25),this.git5=St(this.git5,25),this.git6=St(this.git6,25),this.git7=St(this.git7,25)):(this.git0=_t(this.git0,25),this.git1=_t(this.git1,25),this.git2=_t(this.git2,25),this.git3=_t(this.git3,25),this.git4=_t(this.git4,25),this.git5=_t(this.git5,25),this.git6=_t(this.git6,25),this.git7=_t(this.git7,25)),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},L(gh,"Theme"),gh),UY=L(i=>{const e=new qY;return e.calculate(i),e},"getThemeVariables"),Ls={base:{getThemeVariables:kY},dark:{getThemeVariables:SY},default:{getThemeVariables:EY},forest:{getThemeVariables:AY},neutral:{getThemeVariables:BY},neo:{getThemeVariables:OY},"neo-dark":{getThemeVariables:jY},redux:{getThemeVariables:FY},"redux-dark":{getThemeVariables:$Y},"redux-color":{getThemeVariables:PY},"redux-dark-color":{getThemeVariables:UY}},On={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},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,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},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},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},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},xL={...On,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ls.default.getThemeVariables(),sequence:{...On.sequence,messageFont:L(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:L(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:L(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...On.gantt,tickInterval:void 0,useWidth:void 0},c4:{...On.c4,useWidth:void 0,personFont:L(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...On.flowchart,inheritDir:!1},external_personFont:L(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:L(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:L(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:L(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:L(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:L(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:L(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:L(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:L(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:L(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:L(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:L(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:L(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:L(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:L(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:L(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:L(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:L(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:L(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:L(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:L(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...On.pie,useWidth:984},xyChart:{...On.xyChart,useWidth:void 0},requirement:{...On.requirement,useWidth:void 0},packet:{...On.packet},treeView:{...On.treeView,useWidth:void 0},radar:{...On.radar},ishikawa:{...On.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...On.venn}},vL=L((i,e="")=>Object.keys(i).reduce((r,n)=>Array.isArray(i[n])?r:typeof i[n]=="object"&&i[n]!==null?[...r,e+n,...vL(i[n],"")]:[...r,e+n],[]),"keyify"),HY=new Set(vL(xL,"")),CL=xL,Ng=L(i=>{if(Lt.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(e=>Ng(e));return}for(const e of Object.keys(i)){if(Lt.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!HY.has(e)||i[e]==null){Lt.debug("sanitize deleting key: ",e),delete i[e];continue}if(typeof i[e]=="object"){Lt.debug("sanitizing object",e),Ng(i[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(Lt.debug("sanitizing css option",e),i[e]=WY(i[e]))}if(i.themeVariables)for(const e of Object.keys(i.themeVariables)){const r=i.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[e]="")}Lt.debug("After sanitization",i)}},"sanitizeDirective"),WY=L(i=>{let e=0,r=0;for(const n of i){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":i},"sanitizeCss"),Ch=Object.freeze(CL),Is=L(i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),"evaluate"),xn=Cr({},Ch),Ag,$l=[],fd=Cr({},Ch),vm=L((i,e)=>{let r=Cr({},i),n={};for(const a of e)wL(a),n=Cr(n,a);if(r=Cr(r,n),n.theme&&n.theme in Ls){const a=Cr({},Ag),o=Cr(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in Ls&&(r.themeVariables=Ls[r.theme].getThemeVariables(o))}return fd=r,TL(fd),fd},"updateCurrentConfig"),GY=L(i=>(xn=Cr({},Ch),xn=Cr(xn,i),i.theme&&Ls[i.theme]&&(xn.themeVariables=Ls[i.theme].getThemeVariables(i.themeVariables)),vm(xn,$l),xn),"setSiteConfig"),YY=L(i=>{Ag=Cr({},i)},"saveConfigFromInitialize"),KY=L(i=>(xn=Cr(xn,i),vm(xn,$l),xn),"updateSiteConfig"),_L=L(()=>Cr({},xn),"getSiteConfig"),kL=L(i=>(TL(i),Cr(fd,i),Vi()),"setConfig"),Vi=L(()=>Cr({},fd),"getConfig"),wL=L(i=>{i&&(["secure",...xn.secure??[]].forEach(e=>{Object.hasOwn(i,e)&&(Lt.debug(`Denied attempt to modify a secure key ${e}`,i[e]),delete i[e])}),Object.keys(i).forEach(e=>{e.startsWith("__")&&delete i[e]}),Object.keys(i).forEach(e=>{typeof i[e]=="string"&&(i[e].includes("<")||i[e].includes(">")||i[e].includes("url(data:"))&&delete i[e],typeof i[e]=="object"&&wL(i[e])}))},"sanitize"),VY=L(i=>{var e;Ng(i),i.fontFamily&&!((e=i.themeVariables)!=null&&e.fontFamily)&&(i.themeVariables={...i.themeVariables,fontFamily:i.fontFamily}),$l.push(i),vm(xn,$l)},"addDirective"),Mg=L((i=xn)=>{$l=[],vm(i,$l)},"reset"),XY={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."},dE={},SL=L(i=>{dE[i]||(Lt.warn(XY[i]),dE[i]=!0)},"issueWarning"),TL=L(i=>{i&&(i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&SL("LAZY_LOAD_DEPRECATED")},"checkConfig"),elt=L(()=>{let i={};Ag&&(i=Cr(i,Ag));for(const e of $l)i=Cr(i,e);return i},"getUserDefinedConfig"),an=L(i=>{var e,r;return((e=i.flowchart)==null?void 0:e.htmlLabels)!=null&&SL("FLOWCHART_HTML_LABELS_DEPRECATED"),Is(i.htmlLabels??((r=i.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Yd=/<br\s*\/?>/gi,ZY=L(i=>i?AL(i).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),QY=(()=>{let i=!1;return()=>{i||(EL(),i=!0)}})();function EL(){const i="data-temp-href-target";Do.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(i,e.getAttribute("target")??"")}),Do.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(i)&&(e.setAttribute("target",e.getAttribute(i)??""),e.removeAttribute(i),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}L(EL,"setupDompurifyHooks");var NL=L(i=>(QY(),Do.sanitize(i)),"removeScript"),fE=L((i,e)=>{if(an(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?i=NL(i):r!=="loose"&&(i=AL(i),i=i.replace(/</g,"<").replace(/>/g,">"),i=i.replace(/=/g,"="),i=iK(i))}return i},"sanitizeMore"),ka=L((i,e)=>i&&(e.dompurifyConfig?i=Do.sanitize(fE(i,e),e.dompurifyConfig).toString():i=Do.sanitize(fE(i,e),{FORBID_TAGS:["style"]}).toString(),i),"sanitizeText"),JY=L((i,e)=>typeof i=="string"?ka(i,e):i.flat().map(r=>ka(r,e)),"sanitizeTextOrArray"),tK=L(i=>Yd.test(i),"hasBreaks"),eK=L(i=>i.split(Yd),"splitBreaks"),iK=L(i=>i.replace(/#br#/g,"<br/>"),"placeholderToBreak"),AL=L(i=>i.replace(Yd,"#br#"),"breakToPlaceholder"),rK=L(i=>{let e="";return i&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),nK=L(function(...i){const e=i.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),aK=L(function(...i){const e=i.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),pE=L(function(i){const e=i.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let a=e[n];if(a===","&&n>0&&n+1<e.length){const o=e[n-1],c=e[n+1];sK(o,c)&&(a=o+","+c,n++,r.pop())}r.push(oK(a))}return r.join("")},"parseGenericTypes"),Bv=L((i,e)=>Math.max(0,i.split(e).length-1),"countOccurrence"),sK=L((i,e)=>{const r=Bv(i,"~"),n=Bv(e,"~");return r===1&&n===1},"shouldCombineSets"),oK=L(i=>{const e=Bv(i,"~");let r=!1;if(e<=1)return i;e%2!==0&&i.startsWith("~")&&(i=i.substring(1),r=!0);const n=[...i];let a=n.indexOf("~"),o=n.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)n[a]="<",n[o]=">",a=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),gE=L(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Lv=/\$\$(.*)\$\$/g,Td=L(i=>{var e;return(((e=i.match(Lv))==null?void 0:e.length)??0)>0},"hasKatex"),ilt=L(async(i,e)=>{const r=document.createElement("div");r.innerHTML=await ML(i,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),lK=L(async(i,e)=>{if(!Td(i))return i;if(!(gE()||e.legacyMathML||e.forceLegacyMathML))return i.replace(Lv,"MathML is unsupported in this environment.");{const{default:r}=await Fe(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!gE()&&e.legacyMathML?"htmlAndMathml":"mathml";return i.split(Yd).map(a=>Td(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Lv,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),ML=L(async(i,e)=>ka(await lK(i,e),e),"renderKatexSanitized"),Kd={getRows:ZY,sanitizeText:ka,sanitizeTextOrArray:JY,hasBreaks:tK,splitBreaks:eK,lineBreakRegex:Yd,removeScript:NL,getUrl:rK,evaluate:Is,getMax:nK,getMin:aK},cK=L(function(i,e){for(let r of e)i.attr(r[0],r[1])},"d3Attrs"),hK=L(function(i,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",i),n.set("width",e)),n},"calculateSvgSizeAttrs"),BL=L(function(i,e,r,n){const a=hK(e,r,n);cK(i,a)},"configureSvgSize"),uK=L(function(i,e,r,n){const a=e.node().getBBox(),o=a.width,c=a.height;Lt.info(`SVG bounds: ${o}x${c}`,a);let h=0,u=0;Lt.info(`Graph bounds: ${h}x${u}`,i),h=o+r*2,u=c+r*2,Lt.info(`Calculated bounds: ${h}x${u}`),BL(e,u,h,n);const d=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",d)},"setupGraphViewbox"),tg={},dK=L((i,e,r,n)=>{let a="";return i in tg&&tg[i]?a=tg[i]({...r,svgId:n}):Lt.warn(`No theme found for ${i}`),` & {
|
|
154
|
-
font-family: ${r.fontFamily};
|
|
155
|
-
font-size: ${r.fontSize};
|
|
156
|
-
fill: ${r.textColor}
|
|
157
|
-
}
|
|
158
|
-
@keyframes edge-animation-frame {
|
|
159
|
-
from {
|
|
160
|
-
stroke-dashoffset: 0;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
@keyframes dash {
|
|
164
|
-
to {
|
|
165
|
-
stroke-dashoffset: 0;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
& .edge-animation-slow {
|
|
169
|
-
stroke-dasharray: 9,5 !important;
|
|
170
|
-
stroke-dashoffset: 900;
|
|
171
|
-
animation: dash 50s linear infinite;
|
|
172
|
-
stroke-linecap: round;
|
|
173
|
-
}
|
|
174
|
-
& .edge-animation-fast {
|
|
175
|
-
stroke-dasharray: 9,5 !important;
|
|
176
|
-
stroke-dashoffset: 900;
|
|
177
|
-
animation: dash 20s linear infinite;
|
|
178
|
-
stroke-linecap: round;
|
|
179
|
-
}
|
|
180
|
-
/* Classes common for multiple diagrams */
|
|
181
|
-
|
|
182
|
-
& .error-icon {
|
|
183
|
-
fill: ${r.errorBkgColor};
|
|
184
|
-
}
|
|
185
|
-
& .error-text {
|
|
186
|
-
fill: ${r.errorTextColor};
|
|
187
|
-
stroke: ${r.errorTextColor};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
& .edge-thickness-normal {
|
|
191
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
192
|
-
}
|
|
193
|
-
& .edge-thickness-thick {
|
|
194
|
-
stroke-width: 3.5px
|
|
195
|
-
}
|
|
196
|
-
& .edge-pattern-solid {
|
|
197
|
-
stroke-dasharray: 0;
|
|
198
|
-
}
|
|
199
|
-
& .edge-thickness-invisible {
|
|
200
|
-
stroke-width: 0;
|
|
201
|
-
fill: none;
|
|
202
|
-
}
|
|
203
|
-
& .edge-pattern-dashed{
|
|
204
|
-
stroke-dasharray: 3;
|
|
205
|
-
}
|
|
206
|
-
.edge-pattern-dotted {
|
|
207
|
-
stroke-dasharray: 2;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
& .marker {
|
|
211
|
-
fill: ${r.lineColor};
|
|
212
|
-
stroke: ${r.lineColor};
|
|
213
|
-
}
|
|
214
|
-
& .marker.cross {
|
|
215
|
-
stroke: ${r.lineColor};
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
& svg {
|
|
219
|
-
font-family: ${r.fontFamily};
|
|
220
|
-
font-size: ${r.fontSize};
|
|
221
|
-
}
|
|
222
|
-
& p {
|
|
223
|
-
margin: 0
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
${a}
|
|
227
|
-
.node .neo-node {
|
|
228
|
-
stroke: ${r.nodeBorder};
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
232
|
-
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
233
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
[data-look="neo"].node path {
|
|
238
|
-
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
239
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
[data-look="neo"].node .outer-path {
|
|
243
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
[data-look="neo"].node .neo-line path {
|
|
247
|
-
stroke: ${r.nodeBorder};
|
|
248
|
-
filter: none;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
[data-look="neo"].node circle{
|
|
252
|
-
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
253
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
[data-look="neo"].node circle .state-start{
|
|
257
|
-
fill: #000000;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
[data-look="neo"].icon-shape .icon {
|
|
261
|
-
fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
262
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
266
|
-
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
267
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
${e}
|
|
271
|
-
`},"getStyles"),fK=L((i,e)=>{e!==void 0&&(tg[i]=e)},"addStylesForDiagram"),pK=dK,LL={};dY(LL,{clear:()=>gK,getAccDescription:()=>xK,getAccTitle:()=>yK,getDiagramTitle:()=>CK,setAccDescription:()=>bK,setAccTitle:()=>mK,setDiagramTitle:()=>vK});var bC="",xC="",vC="",CC=L(i=>ka(i,Vi()),"sanitizeText"),gK=L(()=>{bC="",vC="",xC=""},"clear"),mK=L(i=>{bC=CC(i).replace(/^\s+/g,"")},"setAccTitle"),yK=L(()=>bC,"getAccTitle"),bK=L(i=>{vC=CC(i).replace(/\n\s+/g,`
|
|
272
|
-
`)},"setAccDescription"),xK=L(()=>vC,"getAccDescription"),vK=L(i=>{xC=CC(i)},"setDiagramTitle"),CK=L(()=>xC,"getDiagramTitle"),mE=Lt,_K=mC,di=Vi,rlt=kL,nlt=Ch,_C=L(i=>ka(i,di()),"sanitizeText"),kK=uK,wK=L(()=>LL,"getCommonDb"),Bg={},Lg=L((i,e,r)=>{var n;Bg[i]&&mE.warn(`Diagram with id ${i} already registered. Overwriting.`),Bg[i]=e,r&&bL(i,r),fK(i,e.styles),(n=e.injectUtils)==null||n.call(e,mE,_K,di,_C,kK,wK(),()=>{})},"registerDiagram"),Ov=L(i=>{if(i in Bg)return Bg[i];throw new SK(i)},"getDiagram"),mh,SK=(mh=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},L(mh,"DiagramNotFoundError"),mh);const Rv=Math.PI,jv=2*Rv,fl=1e-6,TK=jv-fl;function OL(i){this._+=i[0];for(let e=1,r=i.length;e<r;++e)this._+=arguments[e]+i[e]}function EK(i){let e=Math.floor(i);if(!(e>=0))throw new Error(`invalid digits: ${i}`);if(e>15)return OL;const r=10**e;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class NK{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?OL:EK(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,o,c){this._append`C${+e},${+r},${+n},${+a},${this._x1=+o},${this._y1=+c}`}arcTo(e,r,n,a,o){if(e=+e,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,h=this._y1,u=n-e,d=a-r,f=c-e,g=h-r,x=f*f+g*g;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(x>fl)if(!(Math.abs(g*u-d*f)>fl)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let y=n-c,v=a-h,C=u*u+d*d,_=y*y+v*v,k=Math.sqrt(C),T=Math.sqrt(x),N=o*Math.tan((Rv-Math.acos((C+x-_)/(2*k*T)))/2),E=N/T,B=N/k;Math.abs(E-1)>fl&&this._append`L${e+E*f},${r+E*g}`,this._append`A${o},${o},0,0,${+(g*y>f*v)},${this._x1=e+B*u},${this._y1=r+B*d}`}}arc(e,r,n,a,o,c){if(e=+e,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let h=n*Math.cos(a),u=n*Math.sin(a),d=e+h,f=r+u,g=1^c,x=c?a-o:o-a;this._x1===null?this._append`M${d},${f}`:(Math.abs(this._x1-d)>fl||Math.abs(this._y1-f)>fl)&&this._append`L${d},${f}`,n&&(x<0&&(x=x%jv+jv),x>TK?this._append`A${n},${n},0,1,${g},${e-h},${r-u}A${n},${n},0,1,${g},${this._x1=d},${this._y1=f}`:x>fl&&this._append`A${n},${n},0,${+(x>=Rv)},${g},${this._x1=e+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(e,r,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function Bc(i){return function(){return i}}const alt=Math.abs,slt=Math.atan2,olt=Math.cos,llt=Math.max,clt=Math.min,hlt=Math.sin,ult=Math.sqrt,yE=1e-12,kC=Math.PI,bE=kC/2,dlt=2*kC;function flt(i){return i>1?0:i<-1?kC:Math.acos(i)}function plt(i){return i>=1?bE:i<=-1?-bE:Math.asin(i)}function AK(i){let e=3;return i.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return i},()=>new NK(e)}function MK(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function RL(i){this._context=i}RL.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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;default:this._context.lineTo(i,e);break}}};function pd(i){return new RL(i)}function BK(i){return i[0]}function LK(i){return i[1]}function OK(i,e){var r=Bc(!0),n=null,a=pd,o=null,c=AK(h);i=typeof i=="function"?i:i===void 0?BK:Bc(i),e=typeof e=="function"?e:e===void 0?LK:Bc(e);function h(u){var d,f=(u=MK(u)).length,g,x=!1,y;for(n==null&&(o=a(y=c())),d=0;d<=f;++d)!(d<f&&r(g=u[d],d,u))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+i(g,d,u),+e(g,d,u));if(y)return o=null,y+""||null}return h.x=function(u){return arguments.length?(i=typeof u=="function"?u:Bc(+u),h):i},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:Bc(+u),h):e},h.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Bc(!!u),h):r},h.curve=function(u){return arguments.length?(a=u,n!=null&&(o=a(n)),h):a},h.context=function(u){return arguments.length?(u==null?n=o=null:o=a(n=u),h):n},h}class jL{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function DL(i){return new jL(i,!0)}function FL(i){return new jL(i,!1)}function Fo(){}function Og(i,e,r){i._context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+e)/6,(i._y0+4*i._y1+r)/6)}function Cm(i){this._context=i}Cm.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:Og(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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Og(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function Dv(i){return new Cm(i)}function IL(i){this._context=i}IL.prototype={areaStart:Fo,areaEnd:Fo,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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x2=i,this._y2=e;break;case 1:this._point=2,this._x3=i,this._y3=e;break;case 2:this._point=3,this._x4=i,this._y4=e,this._context.moveTo((this._x0+4*this._x1+i)/6,(this._y0+4*this._y1+e)/6);break;default:Og(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function RK(i){return new IL(i)}function $L(i){this._context=i}$L.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(i,e){switch(i=+i,e=+e,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+i)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Og(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function jK(i){return new $L(i)}function zL(i,e){this._basis=new Cm(i),this._beta=e}zL.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var i=this._x,e=this._y,r=i.length-1;if(r>0)for(var n=i[0],a=e[0],o=i[r]-n,c=e[r]-a,h=-1,u;++h<=r;)u=h/r,this._basis.point(this._beta*i[h]+(1-this._beta)*(n+u*o),this._beta*e[h]+(1-this._beta)*(a+u*c));this._x=this._y=null,this._basis.lineEnd()},point:function(i,e){this._x.push(+i),this._y.push(+e)}};const DK=(function i(e){function r(n){return e===1?new Cm(n):new zL(n,e)}return r.beta=function(n){return i(+n)},r})(.85);function Rg(i,e,r){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-e),i._y2+i._k*(i._y1-r),i._x2,i._y2)}function wC(i,e){this._context=i,this._k=(1-e)/6}wC.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:Rg(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2,this._x1=i,this._y1=e;break;case 2:this._point=3;default:Rg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const PL=(function i(e){function r(n){return new wC(n,e)}return r.tension=function(n){return i(+n)},r})(0);function SC(i,e){this._context=i,this._k=(1-e)/6}SC.prototype={areaStart:Fo,areaEnd:Fo,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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:Rg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FK=(function i(e){function r(n){return new SC(n,e)}return r.tension=function(n){return i(+n)},r})(0);function TC(i,e){this._context=i,this._k=(1-e)/6}TC.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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Rg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const IK=(function i(e){function r(n){return new TC(n,e)}return r.tension=function(n){return i(+n)},r})(0);function EC(i,e,r){var n=i._x1,a=i._y1,o=i._x2,c=i._y2;if(i._l01_a>yE){var h=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,u=3*i._l01_a*(i._l01_a+i._l12_a);n=(n*h-i._x0*i._l12_2a+i._x2*i._l01_2a)/u,a=(a*h-i._y0*i._l12_2a+i._y2*i._l01_2a)/u}if(i._l23_a>yE){var d=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,f=3*i._l23_a*(i._l23_a+i._l12_a);o=(o*d+i._x1*i._l23_2a-e*i._l12_2a)/f,c=(c*d+i._y1*i._l23_2a-r*i._l12_2a)/f}i._context.bezierCurveTo(n,a,o,c,i._x2,i._y2)}function qL(i,e){this._context=i,this._alpha=e}qL.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(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3;default:EC(this,i,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const UL=(function i(e){function r(n){return e?new qL(n,e):new wC(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function HL(i,e){this._context=i,this._alpha=e}HL.prototype={areaStart:Fo,areaEnd:Fo,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(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:EC(this,i,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $K=(function i(e){function r(n){return e?new HL(n,e):new SC(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function WL(i,e){this._context=i,this._alpha=e}WL.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(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:EC(this,i,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zK=(function i(e){function r(n){return e?new WL(n,e):new TC(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function GL(i){this._context=i}GL.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(i,e){i=+i,e=+e,this._point?this._context.lineTo(i,e):(this._point=1,this._context.moveTo(i,e))}};function PK(i){return new GL(i)}function xE(i){return i<0?-1:1}function vE(i,e,r){var n=i._x1-i._x0,a=e-i._x1,o=(i._y1-i._y0)/(n||a<0&&-0),c=(r-i._y1)/(a||n<0&&-0),h=(o*a+c*n)/(n+a);return(xE(o)+xE(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function CE(i,e){var r=i._x1-i._x0;return r?(3*(i._y1-i._y0)/r-e)/2:e}function g0(i,e,r){var n=i._x0,a=i._y0,o=i._x1,c=i._y1,h=(o-n)/3;i._context.bezierCurveTo(n+h,a+h*e,o-h,c-h*r,o,c)}function jg(i){this._context=i}jg.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:g0(this,this._t0,CE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){var r=NaN;if(i=+i,e=+e,!(i===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3,g0(this,CE(this,r=vE(this,i,e)),r);break;default:g0(this,this._t0,r=vE(this,i,e));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e,this._t0=r}}};function YL(i){this._context=new KL(i)}(YL.prototype=Object.create(jg.prototype)).point=function(i,e){jg.prototype.point.call(this,e,i)};function KL(i){this._context=i}KL.prototype={moveTo:function(i,e){this._context.moveTo(e,i)},closePath:function(){this._context.closePath()},lineTo:function(i,e){this._context.lineTo(e,i)},bezierCurveTo:function(i,e,r,n,a,o){this._context.bezierCurveTo(e,i,n,r,o,a)}};function VL(i){return new jg(i)}function XL(i){return new YL(i)}function ZL(i){this._context=i}ZL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var i=this._x,e=this._y,r=i.length;if(r)if(this._line?this._context.lineTo(i[0],e[0]):this._context.moveTo(i[0],e[0]),r===2)this._context.lineTo(i[1],e[1]);else for(var n=_E(i),a=_E(e),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],i[c],e[c]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(i,e){this._x.push(+i),this._y.push(+e)}};function _E(i){var e,r=i.length-1,n,a=new Array(r),o=new Array(r),c=new Array(r);for(a[0]=0,o[0]=2,c[0]=i[0]+2*i[1],e=1;e<r-1;++e)a[e]=1,o[e]=4,c[e]=4*i[e]+2*i[e+1];for(a[r-1]=2,o[r-1]=7,c[r-1]=8*i[r-1]+i[r],e=1;e<r;++e)n=a[e]/o[e-1],o[e]-=n,c[e]-=n*c[e-1];for(a[r-1]=c[r-1]/o[r-1],e=r-2;e>=0;--e)a[e]=(c[e]-a[e+1])/o[e];for(o[r-1]=(i[r]+a[r-1])/2,e=0;e<r-1;++e)o[e]=2*i[e+1]-a[e+1];return[a,o]}function QL(i){return new ZL(i)}function _m(i,e){this._context=i,this._t=e}_m.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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(i,e);else{var r=this._x*(1-this._t)+i*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=i,this._y=e}};function JL(i){return new _m(i,.5)}function tO(i){return new _m(i,0)}function eO(i){return new _m(i,1)}var qK=L(i=>{var a;const{securityLevel:e}=di();let r=ke("body");if(e==="sandbox"){const c=((a=ke(`#i${i}`).node())==null?void 0:a.contentDocument)??document;r=ke(c.body)}return r.select(`#${i}`)},"selectSvgElement");function NC(i){return typeof i>"u"||i===null}L(NC,"isNothing");function iO(i){return typeof i=="object"&&i!==null}L(iO,"isObject");function rO(i){return Array.isArray(i)?i:NC(i)?[]:[i]}L(rO,"toArray");function nO(i,e){var r,n,a,o;if(e)for(o=Object.keys(e),r=0,n=o.length;r<n;r+=1)a=o[r],i[a]=e[a];return i}L(nO,"extend");function aO(i,e){var r="",n;for(n=0;n<e;n+=1)r+=i;return r}L(aO,"repeat");function sO(i){return i===0&&Number.NEGATIVE_INFINITY===1/i}L(sO,"isNegativeZero");var UK=NC,HK=iO,WK=rO,GK=aO,YK=sO,KK=nO,_r={isNothing:UK,isObject:HK,toArray:WK,repeat:GK,isNegativeZero:YK,extend:KK};function AC(i,e){var r="",n=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(r+='in "'+i.mark.name+'" '),r+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!e&&i.mark.snippet&&(r+=`
|
|
273
|
-
|
|
274
|
-
`+i.mark.snippet),n+" "+r):n}L(AC,"formatError");function _h(i,e){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=e,this.message=AC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}L(_h,"YAMLException$1");_h.prototype=Object.create(Error.prototype);_h.prototype.constructor=_h;_h.prototype.toString=L(function(e){return this.name+": "+AC(this,e)},"toString");var vn=_h;function eg(i,e,r,n,a){var o="",c="",h=Math.floor(a/2)-1;return n-e>h&&(o=" ... ",e=n-h+o.length),r-n>h&&(c=" ...",r=n+h-c.length),{str:o+i.slice(e,r).replace(/\t/g,"→")+c,pos:n-e+o.length}}L(eg,"getLine");function ig(i,e){return _r.repeat(" ",e-i.length)+i}L(ig,"padStart");function oO(i,e){if(e=Object.create(e||null),!i.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],a=[],o,c=-1;o=r.exec(i.buffer);)a.push(o.index),n.push(o.index+o[0].length),i.position<=o.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var h="",u,d,f=Math.min(i.line+e.linesAfter,a.length).toString().length,g=e.maxLength-(e.indent+f+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)d=eg(i.buffer,n[c-u],a[c-u],i.position-(n[c]-n[c-u]),g),h=_r.repeat(" ",e.indent)+ig((i.line-u+1).toString(),f)+" | "+d.str+`
|
|
275
|
-
`+h;for(d=eg(i.buffer,n[c],a[c],i.position,g),h+=_r.repeat(" ",e.indent)+ig((i.line+1).toString(),f)+" | "+d.str+`
|
|
276
|
-
`,h+=_r.repeat("-",e.indent+f+3+d.pos)+`^
|
|
277
|
-
`,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)d=eg(i.buffer,n[c+u],a[c+u],i.position-(n[c]-n[c+u]),g),h+=_r.repeat(" ",e.indent)+ig((i.line+u+1).toString(),f)+" | "+d.str+`
|
|
278
|
-
`;return h.replace(/\n$/,"")}L(oO,"makeSnippet");var VK=oO,XK=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ZK=["scalar","sequence","mapping"];function lO(i){var e={};return i!==null&&Object.keys(i).forEach(function(r){i[r].forEach(function(n){e[String(n)]=r})}),e}L(lO,"compileStyleAliases");function cO(i,e){if(e=e||{},Object.keys(e).forEach(function(r){if(XK.indexOf(r)===-1)throw new vn('Unknown option "'+r+'" is met in definition of "'+i+'" YAML type.')}),this.options=e,this.tag=i,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=lO(e.styleAliases||null),ZK.indexOf(this.kind)===-1)throw new vn('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}L(cO,"Type$1");var Wr=cO;function Fv(i,e){var r=[];return i[e].forEach(function(n){var a=r.length;r.forEach(function(o,c){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=c)}),r[a]=n}),r}L(Fv,"compileList");function hO(){var i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(a){a.multi?(i.multi[a.kind].push(a),i.multi.fallback.push(a)):i[a.kind][a.tag]=i.fallback[a.tag]=a}for(L(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return i}L(hO,"compileMap");function Dg(i){return this.extend(i)}L(Dg,"Schema$1");Dg.prototype.extend=L(function(e){var r=[],n=[];if(e instanceof Wr)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new vn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Wr))throw new vn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new vn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new vn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof Wr))throw new vn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Dg.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=Fv(a,"implicit"),a.compiledExplicit=Fv(a,"explicit"),a.compiledTypeMap=hO(a.compiledImplicit,a.compiledExplicit),a},"extend");var QK=Dg,JK=new Wr("tag:yaml.org,2002:str",{kind:"scalar",construct:L(function(i){return i!==null?i:""},"construct")}),tV=new Wr("tag:yaml.org,2002:seq",{kind:"sequence",construct:L(function(i){return i!==null?i:[]},"construct")}),eV=new Wr("tag:yaml.org,2002:map",{kind:"mapping",construct:L(function(i){return i!==null?i:{}},"construct")}),iV=new QK({explicit:[JK,tV,eV]});function uO(i){if(i===null)return!0;var e=i.length;return e===1&&i==="~"||e===4&&(i==="null"||i==="Null"||i==="NULL")}L(uO,"resolveYamlNull");function dO(){return null}L(dO,"constructYamlNull");function fO(i){return i===null}L(fO,"isNull");var rV=new Wr("tag:yaml.org,2002:null",{kind:"scalar",resolve:uO,construct:dO,predicate:fO,represent:{canonical:L(function(){return"~"},"canonical"),lowercase:L(function(){return"null"},"lowercase"),uppercase:L(function(){return"NULL"},"uppercase"),camelcase:L(function(){return"Null"},"camelcase"),empty:L(function(){return""},"empty")},defaultStyle:"lowercase"});function pO(i){if(i===null)return!1;var e=i.length;return e===4&&(i==="true"||i==="True"||i==="TRUE")||e===5&&(i==="false"||i==="False"||i==="FALSE")}L(pO,"resolveYamlBoolean");function gO(i){return i==="true"||i==="True"||i==="TRUE"}L(gO,"constructYamlBoolean");function mO(i){return Object.prototype.toString.call(i)==="[object Boolean]"}L(mO,"isBoolean");var nV=new Wr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:pO,construct:gO,predicate:mO,represent:{lowercase:L(function(i){return i?"true":"false"},"lowercase"),uppercase:L(function(i){return i?"TRUE":"FALSE"},"uppercase"),camelcase:L(function(i){return i?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function yO(i){return 48<=i&&i<=57||65<=i&&i<=70||97<=i&&i<=102}L(yO,"isHexCode");function bO(i){return 48<=i&&i<=55}L(bO,"isOctCode");function xO(i){return 48<=i&&i<=57}L(xO,"isDecCode");function vO(i){if(i===null)return!1;var e=i.length,r=0,n=!1,a;if(!e)return!1;if(a=i[r],(a==="-"||a==="+")&&(a=i[++r]),a==="0"){if(r+1===e)return!0;if(a=i[++r],a==="b"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!yO(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!bO(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=i[r],a!=="_"){if(!xO(i.charCodeAt(r)))return!1;n=!0}return!(!n||a==="_")}L(vO,"resolveYamlInteger");function CO(i){var e=i,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}L(CO,"constructYamlInteger");function _O(i){return Object.prototype.toString.call(i)==="[object Number]"&&i%1===0&&!_r.isNegativeZero(i)}L(_O,"isInteger");var aV=new Wr("tag:yaml.org,2002:int",{kind:"scalar",resolve:vO,construct:CO,predicate:_O,represent:{binary:L(function(i){return i>=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},"binary"),octal:L(function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},"octal"),decimal:L(function(i){return i.toString(10)},"decimal"),hexadecimal:L(function(i){return i>=0?"0x"+i.toString(16).toUpperCase():"-0x"+i.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sV=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function kO(i){return!(i===null||!sV.test(i)||i[i.length-1]==="_")}L(kO,"resolveYamlFloat");function wO(i){var e,r;return e=i.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}L(wO,"constructYamlFloat");var oV=/^[-+]?[0-9]+e/;function SO(i,e){var r;if(isNaN(i))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===i)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===i)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_r.isNegativeZero(i))return"-0.0";return r=i.toString(10),oV.test(r)?r.replace("e",".e"):r}L(SO,"representYamlFloat");function TO(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||_r.isNegativeZero(i))}L(TO,"isFloat");var lV=new Wr("tag:yaml.org,2002:float",{kind:"scalar",resolve:kO,construct:wO,predicate:TO,represent:SO,defaultStyle:"lowercase"}),EO=iV.extend({implicit:[rV,nV,aV,lV]}),cV=EO,NO=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),AO=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 MO(i){return i===null?!1:NO.exec(i)!==null||AO.exec(i)!==null}L(MO,"resolveYamlTimestamp");function BO(i){var e,r,n,a,o,c,h,u=0,d=null,f,g,x;if(e=NO.exec(i),e===null&&(e=AO.exec(i)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,n,a));if(o=+e[4],c=+e[5],h=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(f=+e[10],g=+(e[11]||0),d=(f*60+g)*6e4,e[9]==="-"&&(d=-d)),x=new Date(Date.UTC(r,n,a,o,c,h,u)),d&&x.setTime(x.getTime()-d),x}L(BO,"constructYamlTimestamp");function LO(i){return i.toISOString()}L(LO,"representYamlTimestamp");var hV=new Wr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:MO,construct:BO,instanceOf:Date,represent:LO});function OO(i){return i==="<<"||i===null}L(OO,"resolveYamlMerge");var uV=new Wr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:OO}),MC=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
279
|
-
\r`;function RO(i){if(i===null)return!1;var e,r,n=0,a=i.length,o=MC;for(r=0;r<a;r++)if(e=o.indexOf(i.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}L(RO,"resolveYamlBinary");function jO(i){var e,r,n=i.replace(/[\r\n=]/g,""),a=n.length,o=MC,c=0,h=[];for(e=0;e<a;e++)e%4===0&&e&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|o.indexOf(n.charAt(e));return r=a%4*6,r===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):r===18?(h.push(c>>10&255),h.push(c>>2&255)):r===12&&h.push(c>>4&255),new Uint8Array(h)}L(jO,"constructYamlBinary");function DO(i){var e="",r=0,n,a,o=i.length,c=MC;for(n=0;n<o;n++)n%3===0&&n&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+i[n];return a=o%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}L(DO,"representYamlBinary");function FO(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}L(FO,"isBinary");var dV=new Wr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:RO,construct:jO,predicate:FO,represent:DO}),fV=Object.prototype.hasOwnProperty,pV=Object.prototype.toString;function IO(i){if(i===null)return!0;var e=[],r,n,a,o,c,h=i;for(r=0,n=h.length;r<n;r+=1){if(a=h[r],c=!1,pV.call(a)!=="[object Object]")return!1;for(o in a)if(fV.call(a,o))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}L(IO,"resolveYamlOmap");function $O(i){return i!==null?i:[]}L($O,"constructYamlOmap");var gV=new Wr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:IO,construct:$O}),mV=Object.prototype.toString;function zO(i){if(i===null)return!0;var e,r,n,a,o,c=i;for(o=new Array(c.length),e=0,r=c.length;e<r;e+=1){if(n=c[e],mV.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}L(zO,"resolveYamlPairs");function PO(i){if(i===null)return[];var e,r,n,a,o,c=i;for(o=new Array(c.length),e=0,r=c.length;e<r;e+=1)n=c[e],a=Object.keys(n),o[e]=[a[0],n[a[0]]];return o}L(PO,"constructYamlPairs");var yV=new Wr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:zO,construct:PO}),bV=Object.prototype.hasOwnProperty;function qO(i){if(i===null)return!0;var e,r=i;for(e in r)if(bV.call(r,e)&&r[e]!==null)return!1;return!0}L(qO,"resolveYamlSet");function UO(i){return i!==null?i:{}}L(UO,"constructYamlSet");var xV=new Wr("tag:yaml.org,2002:set",{kind:"mapping",resolve:qO,construct:UO}),HO=cV.extend({implicit:[hV,uV],explicit:[dV,gV,yV,xV]}),Io=Object.prototype.hasOwnProperty,Fg=1,WO=2,GO=3,Ig=4,m0=1,vV=2,kE=3,CV=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_V=/[\x85\u2028\u2029]/,kV=/[,\[\]\{\}]/,YO=/^(?:!|!!|![a-z\-]+!)$/i,KO=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Iv(i){return Object.prototype.toString.call(i)}L(Iv,"_class");function va(i){return i===10||i===13}L(va,"is_EOL");function Ro(i){return i===9||i===32}L(Ro,"is_WHITE_SPACE");function en(i){return i===9||i===32||i===10||i===13}L(en,"is_WS_OR_EOL");function xl(i){return i===44||i===91||i===93||i===123||i===125}L(xl,"is_FLOW_INDICATOR");function VO(i){var e;return 48<=i&&i<=57?i-48:(e=i|32,97<=e&&e<=102?e-97+10:-1)}L(VO,"fromHexCode");function XO(i){return i===120?2:i===117?4:i===85?8:0}L(XO,"escapedHexLen");function ZO(i){return 48<=i&&i<=57?i-48:-1}L(ZO,"fromDecimalCode");function $v(i){return i===48?"\0":i===97?"\x07":i===98?"\b":i===116||i===9?" ":i===110?`
|
|
280
|
-
`:i===118?"\v":i===102?"\f":i===114?"\r":i===101?"\x1B":i===32?" ":i===34?'"':i===47?"/":i===92?"\\":i===78?"
":i===95?" ":i===76?"\u2028":i===80?"\u2029":""}L($v,"simpleEscapeSequence");function QO(i){return i<=65535?String.fromCharCode(i):String.fromCharCode((i-65536>>10)+55296,(i-65536&1023)+56320)}L(QO,"charFromCodepoint");function BC(i,e,r){e==="__proto__"?Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):i[e]=r}L(BC,"setProperty");var JO=new Array(256),tR=new Array(256);for(cl=0;cl<256;cl++)JO[cl]=$v(cl)?1:0,tR[cl]=$v(cl);var cl;function eR(i,e){this.input=i,this.filename=e.filename||null,this.schema=e.schema||HO,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=i.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}L(eR,"State$1");function LC(i,e){var r={name:i.filename,buffer:i.input.slice(0,-1),position:i.position,line:i.line,column:i.position-i.lineStart};return r.snippet=VK(r),new vn(e,r)}L(LC,"generateError");function fe(i,e){throw LC(i,e)}L(fe,"throwError");function Ed(i,e){i.onWarning&&i.onWarning.call(null,LC(i,e))}L(Ed,"throwWarning");var wE={YAML:L(function(e,r,n){var a,o,c;e.version!==null&&fe(e,"duplication of %YAML directive"),n.length!==1&&fe(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&fe(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&fe(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Ed(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:L(function(e,r,n){var a,o;n.length!==2&&fe(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],YO.test(a)||fe(e,"ill-formed tag handle (first argument) of the TAG directive"),Io.call(e.tagMap,a)&&fe(e,'there is a previously declared suffix for "'+a+'" tag handle'),KO.test(o)||fe(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{fe(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function Os(i,e,r,n){var a,o,c,h;if(e<r){if(h=i.input.slice(e,r),n)for(a=0,o=h.length;a<o;a+=1)c=h.charCodeAt(a),c===9||32<=c&&c<=1114111||fe(i,"expected valid JSON character");else CV.test(h)&&fe(i,"the stream contains non-printable characters");i.result+=h}}L(Os,"captureSegment");function zv(i,e,r,n){var a,o,c,h;for(_r.isObject(r)||fe(i,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,h=a.length;c<h;c+=1)o=a[c],Io.call(e,o)||(BC(e,o,r[o]),n[o]=!0)}L(zv,"mergeMappings");function vl(i,e,r,n,a,o,c,h,u){var d,f;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,f=a.length;d<f;d+=1)Array.isArray(a[d])&&fe(i,"nested arrays are not supported inside keys"),typeof a=="object"&&Iv(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Iv(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(d=0,f=o.length;d<f;d+=1)zv(i,e,o[d],r);else zv(i,e,o,r);else!i.json&&!Io.call(r,a)&&Io.call(e,a)&&(i.line=c||i.line,i.lineStart=h||i.lineStart,i.position=u||i.position,fe(i,"duplicated mapping key")),BC(e,a,o),delete r[a];return e}L(vl,"storeMappingPair");function km(i){var e;e=i.input.charCodeAt(i.position),e===10?i.position++:e===13?(i.position++,i.input.charCodeAt(i.position)===10&&i.position++):fe(i,"a line break is expected"),i.line+=1,i.lineStart=i.position,i.firstTabInLine=-1}L(km,"readLineBreak");function or(i,e,r){for(var n=0,a=i.input.charCodeAt(i.position);a!==0;){for(;Ro(a);)a===9&&i.firstTabInLine===-1&&(i.firstTabInLine=i.position),a=i.input.charCodeAt(++i.position);if(e&&a===35)do a=i.input.charCodeAt(++i.position);while(a!==10&&a!==13&&a!==0);if(va(a))for(km(i),a=i.input.charCodeAt(i.position),n++,i.lineIndent=0;a===32;)i.lineIndent++,a=i.input.charCodeAt(++i.position);else break}return r!==-1&&n!==0&&i.lineIndent<r&&Ed(i,"deficient indentation"),n}L(or,"skipSeparationSpace");function Vd(i){var e=i.position,r;return r=i.input.charCodeAt(e),!!((r===45||r===46)&&r===i.input.charCodeAt(e+1)&&r===i.input.charCodeAt(e+2)&&(e+=3,r=i.input.charCodeAt(e),r===0||en(r)))}L(Vd,"testDocumentSeparator");function wm(i,e){e===1?i.result+=" ":e>1&&(i.result+=_r.repeat(`
|
|
281
|
-
`,e-1))}L(wm,"writeFoldedLines");function iR(i,e,r){var n,a,o,c,h,u,d,f,g=i.kind,x=i.result,y;if(y=i.input.charCodeAt(i.position),en(y)||xl(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(a=i.input.charCodeAt(i.position+1),en(a)||r&&xl(a)))return!1;for(i.kind="scalar",i.result="",o=c=i.position,h=!1;y!==0;){if(y===58){if(a=i.input.charCodeAt(i.position+1),en(a)||r&&xl(a))break}else if(y===35){if(n=i.input.charCodeAt(i.position-1),en(n))break}else{if(i.position===i.lineStart&&Vd(i)||r&&xl(y))break;if(va(y))if(u=i.line,d=i.lineStart,f=i.lineIndent,or(i,!1,-1),i.lineIndent>=e){h=!0,y=i.input.charCodeAt(i.position);continue}else{i.position=c,i.line=u,i.lineStart=d,i.lineIndent=f;break}}h&&(Os(i,o,c,!1),wm(i,i.line-u),o=c=i.position,h=!1),Ro(y)||(c=i.position+1),y=i.input.charCodeAt(++i.position)}return Os(i,o,c,!1),i.result?!0:(i.kind=g,i.result=x,!1)}L(iR,"readPlainScalar");function rR(i,e){var r,n,a;if(r=i.input.charCodeAt(i.position),r!==39)return!1;for(i.kind="scalar",i.result="",i.position++,n=a=i.position;(r=i.input.charCodeAt(i.position))!==0;)if(r===39)if(Os(i,n,i.position,!0),r=i.input.charCodeAt(++i.position),r===39)n=i.position,i.position++,a=i.position;else return!0;else va(r)?(Os(i,n,a,!0),wm(i,or(i,!1,e)),n=a=i.position):i.position===i.lineStart&&Vd(i)?fe(i,"unexpected end of the document within a single quoted scalar"):(i.position++,a=i.position);fe(i,"unexpected end of the stream within a single quoted scalar")}L(rR,"readSingleQuotedScalar");function nR(i,e){var r,n,a,o,c,h;if(h=i.input.charCodeAt(i.position),h!==34)return!1;for(i.kind="scalar",i.result="",i.position++,r=n=i.position;(h=i.input.charCodeAt(i.position))!==0;){if(h===34)return Os(i,r,i.position,!0),i.position++,!0;if(h===92){if(Os(i,r,i.position,!0),h=i.input.charCodeAt(++i.position),va(h))or(i,!1,e);else if(h<256&&JO[h])i.result+=tR[h],i.position++;else if((c=XO(h))>0){for(a=c,o=0;a>0;a--)h=i.input.charCodeAt(++i.position),(c=VO(h))>=0?o=(o<<4)+c:fe(i,"expected hexadecimal character");i.result+=QO(o),i.position++}else fe(i,"unknown escape sequence");r=n=i.position}else va(h)?(Os(i,r,n,!0),wm(i,or(i,!1,e)),r=n=i.position):i.position===i.lineStart&&Vd(i)?fe(i,"unexpected end of the document within a double quoted scalar"):(i.position++,n=i.position)}fe(i,"unexpected end of the stream within a double quoted scalar")}L(nR,"readDoubleQuotedScalar");function aR(i,e){var r=!0,n,a,o,c=i.tag,h,u=i.anchor,d,f,g,x,y,v=Object.create(null),C,_,k,T;if(T=i.input.charCodeAt(i.position),T===91)f=93,y=!1,h=[];else if(T===123)f=125,y=!0,h={};else return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=h),T=i.input.charCodeAt(++i.position);T!==0;){if(or(i,!0,e),T=i.input.charCodeAt(i.position),T===f)return i.position++,i.tag=c,i.anchor=u,i.kind=y?"mapping":"sequence",i.result=h,!0;r?T===44&&fe(i,"expected the node content, but found ','"):fe(i,"missed comma between flow collection entries"),_=C=k=null,g=x=!1,T===63&&(d=i.input.charCodeAt(i.position+1),en(d)&&(g=x=!0,i.position++,or(i,!0,e))),n=i.line,a=i.lineStart,o=i.position,zl(i,e,Fg,!1,!0),_=i.tag,C=i.result,or(i,!0,e),T=i.input.charCodeAt(i.position),(x||i.line===n)&&T===58&&(g=!0,T=i.input.charCodeAt(++i.position),or(i,!0,e),zl(i,e,Fg,!1,!0),k=i.result),y?vl(i,h,v,_,C,k,n,a,o):g?h.push(vl(i,null,v,_,C,k,n,a,o)):h.push(C),or(i,!0,e),T=i.input.charCodeAt(i.position),T===44?(r=!0,T=i.input.charCodeAt(++i.position)):r=!1}fe(i,"unexpected end of the stream within a flow collection")}L(aR,"readFlowCollection");function sR(i,e){var r,n,a=m0,o=!1,c=!1,h=e,u=0,d=!1,f,g;if(g=i.input.charCodeAt(i.position),g===124)n=!1;else if(g===62)n=!0;else return!1;for(i.kind="scalar",i.result="";g!==0;)if(g=i.input.charCodeAt(++i.position),g===43||g===45)m0===a?a=g===43?kE:vV:fe(i,"repeat of a chomping mode identifier");else if((f=ZO(g))>=0)f===0?fe(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?fe(i,"repeat of an indentation width identifier"):(h=e+f-1,c=!0);else break;if(Ro(g)){do g=i.input.charCodeAt(++i.position);while(Ro(g));if(g===35)do g=i.input.charCodeAt(++i.position);while(!va(g)&&g!==0)}for(;g!==0;){for(km(i),i.lineIndent=0,g=i.input.charCodeAt(i.position);(!c||i.lineIndent<h)&&g===32;)i.lineIndent++,g=i.input.charCodeAt(++i.position);if(!c&&i.lineIndent>h&&(h=i.lineIndent),va(g)){u++;continue}if(i.lineIndent<h){a===kE?i.result+=_r.repeat(`
|
|
282
|
-
`,o?1+u:u):a===m0&&o&&(i.result+=`
|
|
283
|
-
`);break}for(n?Ro(g)?(d=!0,i.result+=_r.repeat(`
|
|
284
|
-
`,o?1+u:u)):d?(d=!1,i.result+=_r.repeat(`
|
|
285
|
-
`,u+1)):u===0?o&&(i.result+=" "):i.result+=_r.repeat(`
|
|
286
|
-
`,u):i.result+=_r.repeat(`
|
|
287
|
-
`,o?1+u:u),o=!0,c=!0,u=0,r=i.position;!va(g)&&g!==0;)g=i.input.charCodeAt(++i.position);Os(i,r,i.position,!1)}return!0}L(sR,"readBlockScalar");function Pv(i,e){var r,n=i.tag,a=i.anchor,o=[],c,h=!1,u;if(i.firstTabInLine!==-1)return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=o),u=i.input.charCodeAt(i.position);u!==0&&(i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,fe(i,"tab characters must not be used in indentation")),!(u!==45||(c=i.input.charCodeAt(i.position+1),!en(c))));){if(h=!0,i.position++,or(i,!0,-1)&&i.lineIndent<=e){o.push(null),u=i.input.charCodeAt(i.position);continue}if(r=i.line,zl(i,e,GO,!1,!0),o.push(i.result),or(i,!0,-1),u=i.input.charCodeAt(i.position),(i.line===r||i.lineIndent>e)&&u!==0)fe(i,"bad indentation of a sequence entry");else if(i.lineIndent<e)break}return h?(i.tag=n,i.anchor=a,i.kind="sequence",i.result=o,!0):!1}L(Pv,"readBlockSequence");function oR(i,e,r){var n,a,o,c,h,u,d=i.tag,f=i.anchor,g={},x=Object.create(null),y=null,v=null,C=null,_=!1,k=!1,T;if(i.firstTabInLine!==-1)return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=g),T=i.input.charCodeAt(i.position);T!==0;){if(!_&&i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,fe(i,"tab characters must not be used in indentation")),n=i.input.charCodeAt(i.position+1),o=i.line,(T===63||T===58)&&en(n))T===63?(_&&(vl(i,g,x,y,v,null,c,h,u),y=v=C=null),k=!0,_=!0,a=!0):_?(_=!1,a=!0):fe(i,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),i.position+=1,T=n;else{if(c=i.line,h=i.lineStart,u=i.position,!zl(i,r,WO,!1,!0))break;if(i.line===o){for(T=i.input.charCodeAt(i.position);Ro(T);)T=i.input.charCodeAt(++i.position);if(T===58)T=i.input.charCodeAt(++i.position),en(T)||fe(i,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(vl(i,g,x,y,v,null,c,h,u),y=v=C=null),k=!0,_=!1,a=!1,y=i.tag,v=i.result;else if(k)fe(i,"can not read an implicit mapping pair; a colon is missed");else return i.tag=d,i.anchor=f,!0}else if(k)fe(i,"can not read a block mapping entry; a multiline key may not be an implicit key");else return i.tag=d,i.anchor=f,!0}if((i.line===o||i.lineIndent>e)&&(_&&(c=i.line,h=i.lineStart,u=i.position),zl(i,e,Ig,!0,a)&&(_?v=i.result:C=i.result),_||(vl(i,g,x,y,v,C,c,h,u),y=v=C=null),or(i,!0,-1),T=i.input.charCodeAt(i.position)),(i.line===o||i.lineIndent>e)&&T!==0)fe(i,"bad indentation of a mapping entry");else if(i.lineIndent<e)break}return _&&vl(i,g,x,y,v,null,c,h,u),k&&(i.tag=d,i.anchor=f,i.kind="mapping",i.result=g),k}L(oR,"readBlockMapping");function lR(i){var e,r=!1,n=!1,a,o,c;if(c=i.input.charCodeAt(i.position),c!==33)return!1;if(i.tag!==null&&fe(i,"duplication of a tag property"),c=i.input.charCodeAt(++i.position),c===60?(r=!0,c=i.input.charCodeAt(++i.position)):c===33?(n=!0,a="!!",c=i.input.charCodeAt(++i.position)):a="!",e=i.position,r){do c=i.input.charCodeAt(++i.position);while(c!==0&&c!==62);i.position<i.length?(o=i.input.slice(e,i.position),c=i.input.charCodeAt(++i.position)):fe(i,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!en(c);)c===33&&(n?fe(i,"tag suffix cannot contain exclamation marks"):(a=i.input.slice(e-1,i.position+1),YO.test(a)||fe(i,"named tag handle cannot contain such characters"),n=!0,e=i.position+1)),c=i.input.charCodeAt(++i.position);o=i.input.slice(e,i.position),kV.test(o)&&fe(i,"tag suffix cannot contain flow indicator characters")}o&&!KO.test(o)&&fe(i,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{fe(i,"tag name is malformed: "+o)}return r?i.tag=o:Io.call(i.tagMap,a)?i.tag=i.tagMap[a]+o:a==="!"?i.tag="!"+o:a==="!!"?i.tag="tag:yaml.org,2002:"+o:fe(i,'undeclared tag handle "'+a+'"'),!0}L(lR,"readTagProperty");function cR(i){var e,r;if(r=i.input.charCodeAt(i.position),r!==38)return!1;for(i.anchor!==null&&fe(i,"duplication of an anchor property"),r=i.input.charCodeAt(++i.position),e=i.position;r!==0&&!en(r)&&!xl(r);)r=i.input.charCodeAt(++i.position);return i.position===e&&fe(i,"name of an anchor node must contain at least one character"),i.anchor=i.input.slice(e,i.position),!0}L(cR,"readAnchorProperty");function hR(i){var e,r,n;if(n=i.input.charCodeAt(i.position),n!==42)return!1;for(n=i.input.charCodeAt(++i.position),e=i.position;n!==0&&!en(n)&&!xl(n);)n=i.input.charCodeAt(++i.position);return i.position===e&&fe(i,"name of an alias node must contain at least one character"),r=i.input.slice(e,i.position),Io.call(i.anchorMap,r)||fe(i,'unidentified alias "'+r+'"'),i.result=i.anchorMap[r],or(i,!0,-1),!0}L(hR,"readAlias");function zl(i,e,r,n,a){var o,c,h,u=1,d=!1,f=!1,g,x,y,v,C,_;if(i.listener!==null&&i.listener("open",i),i.tag=null,i.anchor=null,i.kind=null,i.result=null,o=c=h=Ig===r||GO===r,n&&or(i,!0,-1)&&(d=!0,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)),u===1)for(;lR(i)||cR(i);)or(i,!0,-1)?(d=!0,h=o,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)):h=!1;if(h&&(h=d||a),(u===1||Ig===r)&&(Fg===r||WO===r?C=e:C=e+1,_=i.position-i.lineStart,u===1?h&&(Pv(i,_)||oR(i,_,C))||aR(i,C)?f=!0:(c&&sR(i,C)||rR(i,C)||nR(i,C)?f=!0:hR(i)?(f=!0,(i.tag!==null||i.anchor!==null)&&fe(i,"alias node should not have any properties")):iR(i,C,Fg===r)&&(f=!0,i.tag===null&&(i.tag="?")),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):u===0&&(f=h&&Pv(i,_))),i.tag===null)i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);else if(i.tag==="?"){for(i.result!==null&&i.kind!=="scalar"&&fe(i,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+i.kind+'"'),g=0,x=i.implicitTypes.length;g<x;g+=1)if(v=i.implicitTypes[g],v.resolve(i.result)){i.result=v.construct(i.result),i.tag=v.tag,i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);break}}else if(i.tag!=="!"){if(Io.call(i.typeMap[i.kind||"fallback"],i.tag))v=i.typeMap[i.kind||"fallback"][i.tag];else for(v=null,y=i.typeMap.multi[i.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(i.tag.slice(0,y[g].tag.length)===y[g].tag){v=y[g];break}v||fe(i,"unknown tag !<"+i.tag+">"),i.result!==null&&v.kind!==i.kind&&fe(i,"unacceptable node kind for !<"+i.tag+'> tag; it should be "'+v.kind+'", not "'+i.kind+'"'),v.resolve(i.result,i.tag)?(i.result=v.construct(i.result,i.tag),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):fe(i,"cannot resolve a node with !<"+i.tag+"> explicit tag")}return i.listener!==null&&i.listener("close",i),i.tag!==null||i.anchor!==null||f}L(zl,"composeNode");function uR(i){var e=i.position,r,n,a,o=!1,c;for(i.version=null,i.checkLineBreaks=i.legacy,i.tagMap=Object.create(null),i.anchorMap=Object.create(null);(c=i.input.charCodeAt(i.position))!==0&&(or(i,!0,-1),c=i.input.charCodeAt(i.position),!(i.lineIndent>0||c!==37));){for(o=!0,c=i.input.charCodeAt(++i.position),r=i.position;c!==0&&!en(c);)c=i.input.charCodeAt(++i.position);for(n=i.input.slice(r,i.position),a=[],n.length<1&&fe(i,"directive name must not be less than one character in length");c!==0;){for(;Ro(c);)c=i.input.charCodeAt(++i.position);if(c===35){do c=i.input.charCodeAt(++i.position);while(c!==0&&!va(c));break}if(va(c))break;for(r=i.position;c!==0&&!en(c);)c=i.input.charCodeAt(++i.position);a.push(i.input.slice(r,i.position))}c!==0&&km(i),Io.call(wE,n)?wE[n](i,n,a):Ed(i,'unknown document directive "'+n+'"')}if(or(i,!0,-1),i.lineIndent===0&&i.input.charCodeAt(i.position)===45&&i.input.charCodeAt(i.position+1)===45&&i.input.charCodeAt(i.position+2)===45?(i.position+=3,or(i,!0,-1)):o&&fe(i,"directives end mark is expected"),zl(i,i.lineIndent-1,Ig,!1,!0),or(i,!0,-1),i.checkLineBreaks&&_V.test(i.input.slice(e,i.position))&&Ed(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&Vd(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,or(i,!0,-1));return}if(i.position<i.length-1)fe(i,"end of the stream or a document separator is expected");else return}L(uR,"readDocument");function OC(i,e){i=String(i),e=e||{},i.length!==0&&(i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
288
|
-
`),i.charCodeAt(0)===65279&&(i=i.slice(1)));var r=new eR(i,e),n=i.indexOf("\0");for(n!==-1&&(r.position=n,fe(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;)uR(r);return r.documents}L(OC,"loadDocuments");function wV(i,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=OC(i,r);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}L(wV,"loadAll$1");function dR(i,e){var r=OC(i,e);if(r.length!==0){if(r.length===1)return r[0];throw new vn("expected a single document in the stream, but found more")}}L(dR,"load$1");var SV=dR,TV={load:SV},fR=Object.prototype.toString,pR=Object.prototype.hasOwnProperty,RC=65279,EV=9,Nd=10,NV=13,AV=32,MV=33,BV=34,qv=35,LV=37,OV=38,RV=39,jV=42,gR=44,DV=45,$g=58,FV=61,IV=62,$V=63,zV=64,mR=91,yR=93,PV=96,bR=123,qV=124,xR=125,Gr={};Gr[0]="\\0";Gr[7]="\\a";Gr[8]="\\b";Gr[9]="\\t";Gr[10]="\\n";Gr[11]="\\v";Gr[12]="\\f";Gr[13]="\\r";Gr[27]="\\e";Gr[34]='\\"';Gr[92]="\\\\";Gr[133]="\\N";Gr[160]="\\_";Gr[8232]="\\L";Gr[8233]="\\P";var UV=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],HV=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function vR(i,e){var r,n,a,o,c,h,u;if(e===null)return{};for(r={},n=Object.keys(e),a=0,o=n.length;a<o;a+=1)c=n[a],h=String(e[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),u=i.compiledTypeMap.fallback[c],u&&pR.call(u.styleAliases,h)&&(h=u.styleAliases[h]),r[c]=h;return r}L(vR,"compileStyleMap");function CR(i){var e,r,n;if(e=i.toString(16).toUpperCase(),i<=255)r="x",n=2;else if(i<=65535)r="u",n=4;else if(i<=4294967295)r="U",n=8;else throw new vn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+_r.repeat("0",n-e.length)+e}L(CR,"encodeHex");var WV=1,Ad=2;function _R(i){this.schema=i.schema||HO,this.indent=Math.max(1,i.indent||2),this.noArrayIndent=i.noArrayIndent||!1,this.skipInvalid=i.skipInvalid||!1,this.flowLevel=_r.isNothing(i.flowLevel)?-1:i.flowLevel,this.styleMap=vR(this.schema,i.styles||null),this.sortKeys=i.sortKeys||!1,this.lineWidth=i.lineWidth||80,this.noRefs=i.noRefs||!1,this.noCompatMode=i.noCompatMode||!1,this.condenseFlow=i.condenseFlow||!1,this.quotingType=i.quotingType==='"'?Ad:WV,this.forceQuotes=i.forceQuotes||!1,this.replacer=typeof i.replacer=="function"?i.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}L(_R,"State");function Uv(i,e){for(var r=_r.repeat(" ",e),n=0,a=-1,o="",c,h=i.length;n<h;)a=i.indexOf(`
|
|
289
|
-
`,n),a===-1?(c=i.slice(n),n=h):(c=i.slice(n,a+1),n=a+1),c.length&&c!==`
|
|
290
|
-
`&&(o+=r),o+=c;return o}L(Uv,"indentString");function zg(i,e){return`
|
|
291
|
-
`+_r.repeat(" ",i.indent*e)}L(zg,"generateNextLine");function kR(i,e){var r,n,a;for(r=0,n=i.implicitTypes.length;r<n;r+=1)if(a=i.implicitTypes[r],a.resolve(e))return!0;return!1}L(kR,"testImplicitResolving");function Md(i){return i===AV||i===EV}L(Md,"isWhitespace");function kh(i){return 32<=i&&i<=126||161<=i&&i<=55295&&i!==8232&&i!==8233||57344<=i&&i<=65533&&i!==RC||65536<=i&&i<=1114111}L(kh,"isPrintable");function Hv(i){return kh(i)&&i!==RC&&i!==NV&&i!==Nd}L(Hv,"isNsCharOrWhitespace");function Wv(i,e,r){var n=Hv(i),a=n&&!Md(i);return(r?n:n&&i!==gR&&i!==mR&&i!==yR&&i!==bR&&i!==xR)&&i!==qv&&!(e===$g&&!a)||Hv(e)&&!Md(e)&&i===qv||e===$g&&a}L(Wv,"isPlainSafe");function wR(i){return kh(i)&&i!==RC&&!Md(i)&&i!==DV&&i!==$V&&i!==$g&&i!==gR&&i!==mR&&i!==yR&&i!==bR&&i!==xR&&i!==qv&&i!==OV&&i!==jV&&i!==MV&&i!==qV&&i!==FV&&i!==IV&&i!==RV&&i!==BV&&i!==LV&&i!==zV&&i!==PV}L(wR,"isPlainSafeFirst");function SR(i){return!Md(i)&&i!==$g}L(SR,"isPlainSafeLast");function zc(i,e){var r=i.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<i.length&&(n=i.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}L(zc,"codePointAt");function jC(i){var e=/^\n* /;return e.test(i)}L(jC,"needIndentIndicator");var TR=1,Gv=2,ER=3,NR=4,Dc=5;function AR(i,e,r,n,a,o,c,h){var u,d=0,f=null,g=!1,x=!1,y=n!==-1,v=-1,C=wR(zc(i,0))&&SR(zc(i,i.length-1));if(e||c)for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=zc(i,u),!kh(d))return Dc;C=C&&Wv(d,f,h),f=d}else{for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=zc(i,u),d===Nd)g=!0,y&&(x=x||u-v-1>n&&i[v+1]!==" ",v=u);else if(!kh(d))return Dc;C=C&&Wv(d,f,h),f=d}x=x||y&&u-v-1>n&&i[v+1]!==" "}return!g&&!x?C&&!c&&!a(i)?TR:o===Ad?Dc:Gv:r>9&&jC(i)?Dc:c?o===Ad?Dc:Gv:x?NR:ER}L(AR,"chooseScalarStyle");function MR(i,e,r,n,a){i.dump=(function(){if(e.length===0)return i.quotingType===Ad?'""':"''";if(!i.noCompatMode&&(UV.indexOf(e)!==-1||HV.test(e)))return i.quotingType===Ad?'"'+e+'"':"'"+e+"'";var o=i.indent*Math.max(1,r),c=i.lineWidth===-1?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-o),h=n||i.flowLevel>-1&&r>=i.flowLevel;function u(d){return kR(i,d)}switch(L(u,"testAmbiguity"),AR(e,h,i.indent,c,u,i.quotingType,i.forceQuotes&&!n,a)){case TR:return e;case Gv:return"'"+e.replace(/'/g,"''")+"'";case ER:return"|"+Yv(e,i.indent)+Kv(Uv(e,o));case NR:return">"+Yv(e,i.indent)+Kv(Uv(BR(e,c),o));case Dc:return'"'+LR(e)+'"';default:throw new vn("impossible error: invalid scalar style")}})()}L(MR,"writeScalar");function Yv(i,e){var r=jC(i)?String(e):"",n=i[i.length-1]===`
|
|
292
|
-
`,a=n&&(i[i.length-2]===`
|
|
293
|
-
`||i===`
|
|
294
|
-
`),o=a?"+":n?"":"-";return r+o+`
|
|
295
|
-
`}L(Yv,"blockHeader");function Kv(i){return i[i.length-1]===`
|
|
296
|
-
`?i.slice(0,-1):i}L(Kv,"dropEndingNewline");function BR(i,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var d=i.indexOf(`
|
|
297
|
-
`);return d=d!==-1?d:i.length,r.lastIndex=d,Vv(i.slice(0,d),e)})(),a=i[0]===`
|
|
298
|
-
`||i[0]===" ",o,c;c=r.exec(i);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
|
|
299
|
-
`:"")+Vv(u,e),a=o}return n}L(BR,"foldString");function Vv(i,e){if(i===""||i[0]===" ")return i;for(var r=/ [^ ]/g,n,a=0,o,c=0,h=0,u="";n=r.exec(i);)h=n.index,h-a>e&&(o=c>a?c:h,u+=`
|
|
300
|
-
`+i.slice(a,o),a=o+1),c=h;return u+=`
|
|
301
|
-
`,i.length-a>e&&c>a?u+=i.slice(a,c)+`
|
|
302
|
-
`+i.slice(c+1):u+=i.slice(a),u.slice(1)}L(Vv,"foldLine");function LR(i){for(var e="",r=0,n,a=0;a<i.length;r>=65536?a+=2:a++)r=zc(i,a),n=Gr[r],!n&&kh(r)?(e+=i[a],r>=65536&&(e+=i[a+1])):e+=n||CR(r);return e}L(LR,"escapeString");function OR(i,e,r){var n="",a=i.tag,o,c,h;for(o=0,c=r.length;o<c;o+=1)h=r[o],i.replacer&&(h=i.replacer.call(r,String(o),h)),(Ka(i,e,h,!1,!1)||typeof h>"u"&&Ka(i,e,null,!1,!1))&&(n!==""&&(n+=","+(i.condenseFlow?"":" ")),n+=i.dump);i.tag=a,i.dump="["+n+"]"}L(OR,"writeFlowSequence");function Xv(i,e,r,n){var a="",o=i.tag,c,h,u;for(c=0,h=r.length;c<h;c+=1)u=r[c],i.replacer&&(u=i.replacer.call(r,String(c),u)),(Ka(i,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Ka(i,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=zg(i,e)),i.dump&&Nd===i.dump.charCodeAt(0)?a+="-":a+="- ",a+=i.dump);i.tag=o,i.dump=a||"[]"}L(Xv,"writeBlockSequence");function RR(i,e,r){var n="",a=i.tag,o=Object.keys(r),c,h,u,d,f;for(c=0,h=o.length;c<h;c+=1)f="",n!==""&&(f+=", "),i.condenseFlow&&(f+='"'),u=o[c],d=r[u],i.replacer&&(d=i.replacer.call(r,u,d)),Ka(i,e,u,!1,!1)&&(i.dump.length>1024&&(f+="? "),f+=i.dump+(i.condenseFlow?'"':"")+":"+(i.condenseFlow?"":" "),Ka(i,e,d,!1,!1)&&(f+=i.dump,n+=f));i.tag=a,i.dump="{"+n+"}"}L(RR,"writeFlowMapping");function jR(i,e,r,n){var a="",o=i.tag,c=Object.keys(r),h,u,d,f,g,x;if(i.sortKeys===!0)c.sort();else if(typeof i.sortKeys=="function")c.sort(i.sortKeys);else if(i.sortKeys)throw new vn("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)x="",(!n||a!=="")&&(x+=zg(i,e)),d=c[h],f=r[d],i.replacer&&(f=i.replacer.call(r,d,f)),Ka(i,e+1,d,!0,!0,!0)&&(g=i.tag!==null&&i.tag!=="?"||i.dump&&i.dump.length>1024,g&&(i.dump&&Nd===i.dump.charCodeAt(0)?x+="?":x+="? "),x+=i.dump,g&&(x+=zg(i,e)),Ka(i,e+1,f,!0,g)&&(i.dump&&Nd===i.dump.charCodeAt(0)?x+=":":x+=": ",x+=i.dump,a+=x));i.tag=o,i.dump=a||"{}"}L(jR,"writeBlockMapping");function Zv(i,e,r){var n,a,o,c,h,u;for(a=r?i.explicitTypes:i.implicitTypes,o=0,c=a.length;o<c;o+=1)if(h=a[o],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof e=="object"&&e instanceof h.instanceOf)&&(!h.predicate||h.predicate(e))){if(r?h.multi&&h.representName?i.tag=h.representName(e):i.tag=h.tag:i.tag="?",h.represent){if(u=i.styleMap[h.tag]||h.defaultStyle,fR.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(pR.call(h.represent,u))n=h.represent[u](e,u);else throw new vn("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');i.dump=n}return!0}return!1}L(Zv,"detectType");function Ka(i,e,r,n,a,o,c){i.tag=null,i.dump=r,Zv(i,r,!1)||Zv(i,r,!0);var h=fR.call(i.dump),u=n,d;n&&(n=i.flowLevel<0||i.flowLevel>e);var f=h==="[object Object]"||h==="[object Array]",g,x;if(f&&(g=i.duplicates.indexOf(r),x=g!==-1),(i.tag!==null&&i.tag!=="?"||x||i.indent!==2&&e>0)&&(a=!1),x&&i.usedDuplicates[g])i.dump="*ref_"+g;else{if(f&&x&&!i.usedDuplicates[g]&&(i.usedDuplicates[g]=!0),h==="[object Object]")n&&Object.keys(i.dump).length!==0?(jR(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(RR(i,e,i.dump),x&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object Array]")n&&i.dump.length!==0?(i.noArrayIndent&&!c&&e>0?Xv(i,e-1,i.dump,a):Xv(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(OR(i,e,i.dump),x&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object String]")i.tag!=="?"&&MR(i,i.dump,e,o,u);else{if(h==="[object Undefined]")return!1;if(i.skipInvalid)return!1;throw new vn("unacceptable kind of an object to dump "+h)}i.tag!==null&&i.tag!=="?"&&(d=encodeURI(i.tag[0]==="!"?i.tag.slice(1):i.tag).replace(/!/g,"%21"),i.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",i.dump=d+" "+i.dump)}return!0}L(Ka,"writeNode");function DR(i,e){var r=[],n=[],a,o;for(Pg(i,r,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(o)}L(DR,"getDuplicateReferences");function Pg(i,e,r){var n,a,o;if(i!==null&&typeof i=="object")if(a=e.indexOf(i),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(i),Array.isArray(i))for(a=0,o=i.length;a<o;a+=1)Pg(i[a],e,r);else for(n=Object.keys(i),a=0,o=n.length;a<o;a+=1)Pg(i[n[a]],e,r)}L(Pg,"inspectNode");function GV(i,e){e=e||{};var r=new _R(e);r.noRefs||DR(i,r);var n=i;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ka(r,0,n,!0,!0)?r.dump+`
|
|
303
|
-
`:""}L(GV,"dump$1");function YV(i,e){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}L(YV,"renamed");var KV=EO,VV=TV.load;/*! Bundled license information:
|
|
304
|
-
|
|
305
|
-
js-yaml/dist/js-yaml.mjs:
|
|
306
|
-
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
307
|
-
*/var Ru=L((i,e)=>{if(e)return"translate("+-i.width/2+", "+-i.height/2+")";const r=i.x??0,n=i.y??0;return"translate("+-(r+i.width/2)+", "+-(n+i.height/2)+")"},"computeLabelTransform"),Hr={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},SE={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function td(i,e){if(i===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};i=Hi(i),e=Hi(e);const[r,n]=[i.x,i.y],[a,o]=[e.x,e.y],c=a-r,h=o-n;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}L(td,"calculateDeltaAndAngle");var Hi=L(i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,"pointTransformer"),XV=L(i=>({x:L(function(e,r,n){let a=0;const o=Hi(n[0]).x<Hi(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Hr,i.arrowTypeStart)){const{angle:y,deltaX:v}=td(n[0],n[1]);a=Hr[i.arrowTypeStart]*Math.cos(y)*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Hr,i.arrowTypeEnd)){const{angle:y,deltaX:v}=td(n[n.length-1],n[n.length-2]);a=Hr[i.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(Hi(e).x-Hi(n[n.length-1]).x),h=Math.abs(Hi(e).y-Hi(n[n.length-1]).y),u=Math.abs(Hi(e).x-Hi(n[0]).x),d=Math.abs(Hi(e).y-Hi(n[0]).y),f=Hr[i.arrowTypeStart],g=Hr[i.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=o==="right"?-1:1,a-=y}if(u<f&&u>0&&d<f){let y=f+x-u;y*=o==="right"?-1:1,a+=y}return Hi(e).x+a},"x"),y:L(function(e,r,n){let a=0;const o=Hi(n[0]).y<Hi(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Hr,i.arrowTypeStart)){const{angle:y,deltaY:v}=td(n[0],n[1]);a=Hr[i.arrowTypeStart]*Math.abs(Math.sin(y))*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Hr,i.arrowTypeEnd)){const{angle:y,deltaY:v}=td(n[n.length-1],n[n.length-2]);a=Hr[i.arrowTypeEnd]*Math.abs(Math.sin(y))*(v>=0?1:-1)}const c=Math.abs(Hi(e).y-Hi(n[n.length-1]).y),h=Math.abs(Hi(e).x-Hi(n[n.length-1]).x),u=Math.abs(Hi(e).y-Hi(n[0]).y),d=Math.abs(Hi(e).x-Hi(n[0]).x),f=Hr[i.arrowTypeStart],g=Hr[i.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=o==="up"?-1:1,a-=y}if(u<f&&u>0&&d<f){let y=f+x-u;y*=o==="up"?-1:1,a+=y}return Hi(e).y+a},"y")}),"getLineFunctionsWithOffset"),Ep={},xr={},TE;function ZV(){return TE||(TE=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.BLANK_URL=xr.relativeFirstCharacters=xr.whitespaceEscapeCharsRegex=xr.urlSchemeRegex=xr.ctrlCharactersRegex=xr.htmlCtrlEntityRegex=xr.htmlEntitiesRegex=xr.invalidProtocolRegex=void 0,xr.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,xr.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,xr.htmlCtrlEntityRegex=/&(newline|tab);/gi,xr.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,xr.urlSchemeRegex=/^.+(:|:)/gim,xr.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,xr.relativeFirstCharacters=[".","/"],xr.BLANK_URL="about:blank"),xr}var EE;function QV(){if(EE)return Ep;EE=1,Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.sanitizeUrl=o;var i=ZV();function e(c){return i.relativeFirstCharacters.indexOf(c[0])>-1}function r(c){var h=c.replace(i.ctrlCharactersRegex,"");return h.replace(i.htmlEntitiesRegex,function(u,d){return String.fromCharCode(d)})}function n(c){return URL.canParse(c)}function a(c){try{return decodeURIComponent(c)}catch{return c}}function o(c){if(!c)return i.BLANK_URL;var h,u=a(c.trim());do u=r(u).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim(),u=a(u),h=u.match(i.ctrlCharactersRegex)||u.match(i.htmlEntitiesRegex)||u.match(i.htmlCtrlEntityRegex)||u.match(i.whitespaceEscapeCharsRegex);while(h&&h.length>0);var d=u;if(!d)return i.BLANK_URL;if(e(d))return d;var f=d.trimStart(),g=f.match(i.urlSchemeRegex);if(!g)return d;var x=g[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(x))return i.BLANK_URL;var y=f.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return y;if(x==="http:"||x==="https:"){if(!n(y))return i.BLANK_URL;var v=new URL(y);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return y}return Ep}var JV=QV(),tX="",eX={curveBasis:Dv,curveBasisClosed:RK,curveBasisOpen:jK,curveBumpX:DL,curveBumpY:FL,curveBundle:DK,curveCardinalClosed:FK,curveCardinalOpen:IK,curveCardinal:PL,curveCatmullRomClosed:$K,curveCatmullRomOpen:zK,curveCatmullRom:UL,curveLinear:pd,curveLinearClosed:PK,curveMonotoneX:VL,curveMonotoneY:XL,curveNatural:QL,curveStep:JL,curveStepAfter:eO,curveStepBefore:tO},iX=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,rX=L(function(i,e){const r=FR(i,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const c=r.map(h=>h.args);Ng(c),n=Cr(n,[...c])}else n=r.args;if(!n)return;let a=yC(i,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),FR=L(function(i,e=null){var r,n;try{const a=new RegExp(`[%]{2}(?![{]${iX.source})(?=[}][%]{2}).*
|
|
308
|
-
`,"ig");i=i.trim().replace(a,"").replace(/'/gm,'"'),Lt.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${i}`);let o;const c=[];for(;(o=dd.exec(i))!==null;)if(o.index===dd.lastIndex&&dd.lastIndex++,o&&!e||e&&((r=o[1])!=null&&r.match(e))||e&&((n=o[2])!=null&&n.match(e))){const h=o[1]?o[1]:o[2],u=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;c.push({type:h,args:u})}return c.length===0?{type:i,args:null}:c.length===1?c[0]:c}catch(a){return Lt.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${i}'`),{type:void 0,args:null}}},"detectDirective"),nX=L(function(i){return i.replace(dd,"")},"removeDirectives"),aX=L(function(i,e){for(const[r,n]of e.entries())if(n.match(i))return r;return-1},"isSubstringInArray");function DC(i,e){if(!i)return e;const r=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return eX[r]??e}L(DC,"interpolateToCurve");function IR(i,e){const r=i.trim();if(r)return e.securityLevel!=="loose"?JV.sanitizeUrl(r):r}L(IR,"formatUrl");var sX=L((i,...e)=>{const r=i.split("."),n=r.length-1,a=r[n];let o=window;for(let c=0;c<n;c++)if(o=o[r[c]],!o){Lt.error(`Function name: ${i} not found in window`);return}o[a](...e)},"runFunc");function FC(i,e){return!i||!e?0:Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}L(FC,"distance");function $R(i){let e,r=0;i.forEach(a=>{r+=FC(a,e),e=a});const n=r/2;return IC(i,n)}L($R,"traverseEdge");function zR(i){return i.length===1?i[0]:$R(i)}L(zR,"calcLabelPosition");var NE=L((i,e=2)=>{const r=Math.pow(10,e);return Math.round(i*r)/r},"roundNumber"),IC=L((i,e)=>{let r,n=e;for(const a of i){if(r){const o=FC(a,r);if(o===0)return r;if(o<n)n-=o;else{const c=n/o;if(c<=0)return r;if(c>=1)return{x:a.x,y:a.y};if(c>0&&c<1)return{x:NE((1-c)*r.x+c*a.x,5),y:NE((1-c)*r.y+c*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),oX=L((i,e,r)=>{Lt.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const a=IC(e,25),o=i?10:5,c=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(c)*o+(e[0].x+a.x)/2,h.y=-Math.cos(c)*o+(e[0].y+a.y)/2,h},"calcCardinalityPosition");function PR(i,e,r){const n=structuredClone(r);Lt.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+i,o=IC(n,a),c=10+i*.5,h=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*c+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(h)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2-5):(u.x=Math.sin(h)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2),u}L(PR,"calcTerminalLabelPosition");function qR(i){let e="",r="";for(const n of i)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}L(qR,"getStylesFromArray");var AE=0,lX=L(()=>(AE++,"id-"+Math.random().toString(36).substr(2,12)+"-"+AE),"generateId");function UR(i){let e="";const r="0123456789abcdef",n=r.length;for(let a=0;a<i;a++)e+=r.charAt(Math.floor(Math.random()*n));return e}L(UR,"makeRandomHex");var cX=L(i=>UR(i.length),"random"),hX=L(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"),uX=L(function(i,e){const r=e.text.replace(Kd.lineBreakRegex," "),[,n]=Sm(e.fontSize),a=i.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),dX=Ud((i,e,r)=>{if(!i||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Kd.lineBreakRegex.test(i)))return i;const n=i.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=Ds(`${c} `,r),d=Ds(o,r);if(u>e){const{hyphenatedStrings:x,remainingWord:y}=fX(c,e,"-",r);a.push(o,...x),o=y}else d+u>=e?(a.push(o),o=c):o=[o,c].filter(Boolean).join(" ");h+1===n.length&&a.push(o)}),a.filter(c=>c!=="").join(r.joinWith)},(i,e,r)=>`${i}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),fX=Ud((i,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const a=[...i],o=[];let c="";return a.forEach((h,u)=>{const d=`${c}${h}`;if(Ds(d,n)>=e){const g=u+1,x=a.length===g,y=`${d}${r}`;o.push(x?d:y),c=""}else c=d}),{hyphenatedStrings:o,remainingWord:c}},(i,e,r="-",n)=>`${i}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function HR(i,e){return $C(i,e).height}L(HR,"calculateTextHeight");function Ds(i,e){return $C(i,e).width}L(Ds,"calculateTextWidth");var $C=Ud((i,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!i)return{width:0,height:0};const[,o]=Sm(r),c=["sans-serif",n],h=i.split(Kd.lineBreakRegex),u=[],d=ke("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const f=d.append("svg");for(const x of c){let y=0;const v={width:0,height:0,lineHeight:0};for(const C of h){const _=hX();_.text=C||tX;const k=uX(f,_).style("font-size",o).style("font-weight",a).style("font-family",x),T=(k._groups||k)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,T.width)),y=Math.round(T.height),v.height+=y,v.lineHeight=Math.round(Math.max(v.lineHeight,y))}u.push(v)}f.remove();const g=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[g]},(i,e)=>`${i}${e.fontSize}${e.fontWeight}${e.fontFamily}`),yh,pX=(yh=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},L(yh,"InitIDGenerator"),yh),Np,gX=L(function(i){return Np=Np||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Np.innerHTML=i,unescape(Np.textContent)},"entityDecode");function zC(i){return"str"in i}L(zC,"isDetailedError");var mX=L((i,e,r,n)=>{var o;if(!n)return;const a=(o=i.node())==null?void 0:o.getBBox();a&&i.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Sm=L(i=>{if(typeof i=="number")return[i,i+"px"];const e=parseInt(i??"",10);return Number.isNaN(e)?[void 0,void 0]:i===String(e)?[e,i+"px"]:[e,i]},"parseFontSize");function PC(i,e){return i7({},i,e)}L(PC,"cleanAndMerge");var ba={assignWithDepth:Cr,wrapLabel:dX,calculateTextHeight:HR,calculateTextWidth:Ds,calculateTextDimensions:$C,cleanAndMerge:PC,detectInit:rX,detectDirective:FR,isSubstringInArray:aX,interpolateToCurve:DC,calcLabelPosition:zR,calcCardinalityPosition:oX,calcTerminalLabelPosition:PR,formatUrl:IR,getStylesFromArray:qR,generateId:lX,random:cX,runFunc:sX,entityDecode:gX,insertTitle:mX,isLabelCoordinateInPath:WR,parseFontSize:Sm,InitIDGenerator:pX},yX=L(function(i){let e=i;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),Pl=L(function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),glt=L((i,e,{counter:r=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${i}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function Tr(i){return i??null}L(Tr,"handleUndefinedAttr");function WR(i,e){const r=Math.round(i.x),n=Math.round(i.y),a=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(r.toString())||a.includes(n.toString())}L(WR,"isLabelCoordinateInPath");var qC=L(({flowchart:i})=>{var a,o;const e=((a=i==null?void 0:i.subGraphTitleMargin)==null?void 0:a.top)??0,r=((o=i==null?void 0:i.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");async function GR(i,e){const r=i.getElementsByTagName("img");if(!r||r.length===0)return;const n=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(o=>{function c(){if(a.style.display="flex",a.style.flexDirection="column",n){const h=di().fontSize?di().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[d=CL.fontSize]=Sm(h),f=d*u+"px";a.style.minWidth=f,a.style.maxWidth=f}else a.style.width="100%";o(a)}L(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}L(GR,"configureLabelImages");var bX=L(i=>{const{handDrawnSeed:e}=di();return{fill:i,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:i,seed:e}},"solidStateFill"),Ah=L(i=>{const e=xX([...i.cssCompiledStyles||[],...i.cssStyles||[],...i.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),xX=L(i=>{const e=new Map;return i.forEach(r=>{const[n,a]=r.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),YR=L(i=>i==="color"||i==="font-size"||i==="font-family"||i==="font-weight"||i==="font-style"||i==="text-decoration"||i==="text-align"||i==="text-transform"||i==="line-height"||i==="letter-spacing"||i==="word-spacing"||i==="text-shadow"||i==="text-overflow"||i==="white-space"||i==="word-wrap"||i==="word-break"||i==="overflow-wrap"||i==="hyphens","isLabelStyle"),le=L(i=>{const{stylesArray:e}=Ah(i),r=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];YR(h)?r.push(c.join(":")+" !important"):(n.push(c.join(":")+" !important"),h.includes("stroke")&&a.push(c.join(":")+" !important"),h==="fill"&&o.push(c.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:o}},"styles2String"),oe=L((i,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=di(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:c}=Ah(i);return Object.assign({roughness:.7,fill:c.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||a,seed:n,strokeWidth:((u=c.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:vX(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),vX=L(i=>{if(!i)return[0,0];const e=i.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray");const CX=Object.freeze({left:0,top:0,width:16,height:16}),qg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),KR=Object.freeze({...CX,...qg}),_X=Object.freeze({...KR,body:"",hidden:!1}),kX=Object.freeze({width:null,height:null}),wX=Object.freeze({...kX,...qg}),SX=(i,e,r,n="")=>{const a=i.split(":");if(i.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const h=a.pop(),u=a.pop(),d={provider:a.length>0?a[0]:n,prefix:u,name:h};return y0(d)?d:null}const o=a[0],c=o.split("-");if(c.length>1){const h={provider:n,prefix:c.shift(),name:c.join("-")};return y0(h)?h:null}if(r&&n===""){const h={provider:n,prefix:"",name:o};return y0(h,r)?h:null}return null},y0=(i,e)=>i?!!((e&&i.prefix===""||i.prefix)&&i.name):!1;function TX(i,e){const r={};!i.hFlip!=!e.hFlip&&(r.hFlip=!0),!i.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((i.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function ME(i,e){const r=TX(i,e);for(const n in _X)n in qg?n in i&&!(n in r)&&(r[n]=qg[n]):n in e?r[n]=e[n]:n in i&&(r[n]=i[n]);return r}function EX(i,e){const r=i.icons,n=i.aliases||Object.create(null),a=Object.create(null);function o(c){if(r[c])return a[c]=[];if(!(c in a)){a[c]=null;const h=n[c]&&n[c].parent,u=h&&o(h);u&&(a[c]=[h].concat(u))}return a[c]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(o),a}function BE(i,e,r){const n=i.icons,a=i.aliases||Object.create(null);let o={};function c(h){o=ME(n[h]||a[h],o)}return c(e),r.forEach(c),ME(i,o)}function NX(i,e){if(i.icons[e])return BE(i,e,[]);const r=EX(i,[e])[e];return r?BE(i,e,r):null}const AX=/(-?[0-9.]*[0-9]+[0-9.]*)/g,MX=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function LE(i,e,r){if(e===1)return i;if(r=r||100,typeof i=="number")return Math.ceil(i*e*r)/r;if(typeof i!="string")return i;const n=i.split(AX);if(n===null||!n.length)return i;const a=[];let o=n.shift(),c=MX.test(o);for(;;){if(c){const h=parseFloat(o);isNaN(h)?a.push(o):a.push(Math.ceil(h*e*r)/r)}else a.push(o);if(o=n.shift(),o===void 0)return a.join("");c=!c}}function BX(i,e="defs"){let r="";const n=i.indexOf("<"+e);for(;n>=0;){const a=i.indexOf(">",n),o=i.indexOf("</"+e);if(a===-1||o===-1)break;const c=i.indexOf(">",o);if(c===-1)break;r+=i.slice(a+1,o).trim(),i=i.slice(0,n).trim()+i.slice(c+1)}return{defs:r,content:i}}function LX(i,e){return i?"<defs>"+i+"</defs>"+e:e}function OX(i,e,r){const n=BX(i);return LX(n.defs,e+n.content+r)}const RX=i=>i==="unset"||i==="undefined"||i==="none";function jX(i,e){const r={...KR,...i},n={...wX,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(C=>{const _=[],k=C.hFlip,T=C.vFlip;let N=C.rotate;k?T?N+=2:(_.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),_.push("scale(-1 1)"),a.top=a.left=0):T&&(_.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),_.push("scale(1 -1)"),a.top=a.left=0);let E;switch(N<0&&(N-=Math.floor(N/4)*4),N=N%4,N){case 1:E=a.height/2+a.top,_.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:_.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:E=a.width/2+a.left,_.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}N%2===1&&(a.left!==a.top&&(E=a.left,a.left=a.top,a.top=E),a.width!==a.height&&(E=a.width,a.width=a.height,a.height=E)),_.length&&(o=OX(o,'<g transform="'+_.join(" ")+'">',"</g>"))});const c=n.width,h=n.height,u=a.width,d=a.height;let f,g;c===null?(g=h===null?"1em":h==="auto"?d:h,f=LE(g,u/d)):(f=c==="auto"?u:c,g=h===null?LE(f,d/u):h==="auto"?d:h);const x={},y=(C,_)=>{RX(_)||(x[C]=_.toString())};y("width",f),y("height",g);const v=[a.left,a.top,u,d];return x.viewBox=v.join(" "),{attributes:x,viewBox:v,body:o}}const DX=/\sid="(\S+)"/g,OE=new Map;function FX(i){i=i.replace(/[0-9]+$/,"")||"a";const e=OE.get(i)||0;return OE.set(i,e+1),e?`${i}${e}`:i}function IX(i){const e=[];let r;for(;r=DX.exec(i);)e.push(r[1]);if(!e.length)return i;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(a=>{const o=FX(a),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),i=i.replace(new RegExp(n,"g"),""),i}function $X(i,e){let r=i.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+i+"</svg>"}function UC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Xl=UC();function VR(i){Xl=i}var gd={exec:()=>null};function fi(i,e=""){let r=typeof i=="string"?i:i.source,n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(rn.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var zX=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),rn={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:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},PX=/^(?:[ \t]*(?:\n|$))+/,qX=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,UX=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,HX=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,HC=/(?:[*+-]|\d{1,9}[.)])/,XR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ZR=fi(XR).replace(/bull/g,HC).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(),WX=fi(XR).replace(/bull/g,HC).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(),WC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GX=/^[^\n]+/,GC=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,YX=fi(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",GC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),KX=fi(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,HC).getRegex(),Tm="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",YC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,VX=fi("^ {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",YC).replace("tag",Tm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),QR=fi(WC).replace("hr",Xd).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",Tm).getRegex(),XX=fi(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",QR).getRegex(),KC={blockquote:XX,code:qX,def:YX,fences:UX,heading:HX,hr:Xd,html:VX,lheading:ZR,list:KX,newline:PX,paragraph:QR,table:gd,text:GX},RE=fi("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xd).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",Tm).getRegex(),ZX={...KC,lheading:WX,table:RE,paragraph:fi(WC).replace("hr",Xd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",RE).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",Tm).getRegex()},QX={...KC,html:fi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",YC).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:gd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fi(WC).replace("hr",Xd).replace("heading",` *#{1,6} *[^
|
|
309
|
-
]`).replace("lheading",ZR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},JX=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tZ=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,JR=/^( {2,}|\\)\n(?!\s*$)/,eZ=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Em=/[\p{P}\p{S}]/u,VC=/[\s\p{P}\p{S}]/u,t3=/[^\s\p{P}\p{S}]/u,iZ=fi(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,VC).getRegex(),e3=/(?!~)[\p{P}\p{S}]/u,rZ=/(?!~)[\s\p{P}\p{S}]/u,nZ=/(?:[^\s\p{P}\p{S}]|~)/u,aZ=fi(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",zX?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),i3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sZ=fi(i3,"u").replace(/punct/g,Em).getRegex(),oZ=fi(i3,"u").replace(/punct/g,e3).getRegex(),r3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lZ=fi(r3,"gu").replace(/notPunctSpace/g,t3).replace(/punctSpace/g,VC).replace(/punct/g,Em).getRegex(),cZ=fi(r3,"gu").replace(/notPunctSpace/g,nZ).replace(/punctSpace/g,rZ).replace(/punct/g,e3).getRegex(),hZ=fi("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,t3).replace(/punctSpace/g,VC).replace(/punct/g,Em).getRegex(),uZ=fi(/\\(punct)/,"gu").replace(/punct/g,Em).getRegex(),dZ=fi(/^<(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(),fZ=fi(YC).replace("(?:-->|$)","-->").getRegex(),pZ=fi("^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",fZ).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ug=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gZ=fi(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ug).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),n3=fi(/^!?\[(label)\]\[(ref)\]/).replace("label",Ug).replace("ref",GC).getRegex(),a3=fi(/^!?\[(ref)\](?:\[\])?/).replace("ref",GC).getRegex(),mZ=fi("reflink|nolink(?!\\()","g").replace("reflink",n3).replace("nolink",a3).getRegex(),jE=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,XC={_backpedal:gd,anyPunctuation:uZ,autolink:dZ,blockSkip:aZ,br:JR,code:tZ,del:gd,emStrongLDelim:sZ,emStrongRDelimAst:lZ,emStrongRDelimUnd:hZ,escape:JX,link:gZ,nolink:a3,punctuation:iZ,reflink:n3,reflinkSearch:mZ,tag:pZ,text:eZ,url:gd},yZ={...XC,link:fi(/^!?\[(label)\]\((.*?)\)/).replace("label",Ug).getRegex(),reflink:fi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ug).getRegex()},Qv={...XC,emStrongRDelimAst:cZ,emStrongLDelim:oZ,url:fi(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",jE).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:fi(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",jE).getRegex()},bZ={...Qv,br:fi(JR).replace("{2,}","*").getRegex(),text:fi(Qv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ap={normal:KC,gfm:ZX,pedantic:QX},ju={normal:XC,gfm:Qv,breaks:bZ,pedantic:yZ},xZ={"&":"&","<":"<",">":">",'"':""","'":"'"},DE=i=>xZ[i];function ja(i,e){if(e){if(rn.escapeTest.test(i))return i.replace(rn.escapeReplace,DE)}else if(rn.escapeTestNoEncode.test(i))return i.replace(rn.escapeReplaceNoEncode,DE);return i}function FE(i){try{i=encodeURI(i).replace(rn.percentDecode,"%")}catch{return null}return i}function IE(i,e){var o;let r=i.replace(rn.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=r.split(rn.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(rn.slashPipe,"|");return n}function Du(i,e,r){let n=i.length;if(n===0)return"";let a=0;for(;a<n&&i.charAt(n-a-1)===e;)a++;return i.slice(0,n-a)}function vZ(i,e){if(i.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])r++;else if(i[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function $E(i,e,r,n,a){let o=e.href,c=e.title||null,h=i[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:i[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function CZ(i,e,r){let n=i.match(r.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
|
|
310
|
-
`).map(o=>{let c=o.match(r.other.beginningSpace);if(c===null)return o;let[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
311
|
-
`)}var Hg=class{constructor(e){ge(this,"options");ge(this,"rules");ge(this,"lexer");this.options=e||Xl}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Du(n,`
|
|
312
|
-
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],a=CZ(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let a=Du(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Du(r[0],`
|
|
313
|
-
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Du(r[0],`
|
|
314
|
-
`).split(`
|
|
315
|
-
`),a="",o="",c=[];for(;n.length>0;){let h=!1,u=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))u.push(n[d]),h=!0;else if(!h)u.push(n[d]);else break;n=n.slice(d);let f=u.join(`
|
|
316
|
-
`),g=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
317
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
318
|
-
${f}`:f,o=o?`${o}
|
|
319
|
-
${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,n.length===0)break;let y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let v=y,C=v.raw+`
|
|
320
|
-
`+n.join(`
|
|
321
|
-
`),_=this.blockquote(C);c[c.length-1]=_,a=a.substring(0,a.length-v.raw.length)+_.raw,o=o.substring(0,o.length-v.text.length)+_.text;break}else if((y==null?void 0:y.type)==="list"){let v=y,C=v.raw+`
|
|
322
|
-
`+n.join(`
|
|
323
|
-
`),_=this.list(C);c[c.length-1]=_,a=a.substring(0,a.length-y.raw.length)+_.raw,o=o.substring(0,o.length-v.raw.length)+_.raw,n=C.substring(c.at(-1).raw.length).split(`
|
|
324
|
-
`);continue}}return{type:"blockquote",raw:a,tokens:c,text:o}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),a=n.length>1,o={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let c=this.rules.other.listItemRegex(n),h=!1;for(;e;){let d=!1,f="",g="";if(!(r=c.exec(e))||this.rules.block.hr.test(e))break;f=r[0],e=e.substring(f.length);let x=r[2].split(`
|
|
325
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),y=e.split(`
|
|
326
|
-
`,1)[0],v=!x.trim(),C=0;if(this.options.pedantic?(C=2,g=x.trimStart()):v?C=r[1].length+1:(C=r[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=r[1].length),v&&this.rules.other.blankLine.test(y)&&(f+=y+`
|
|
327
|
-
`,e=e.substring(y.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(C),N=this.rules.other.hrRegex(C),E=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),O=this.rules.other.htmlBeginRegex(C);for(;e;){let A=e.split(`
|
|
328
|
-
`,1)[0],M;if(y=A,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),M=y):M=y.replace(this.rules.other.tabCharGlobal," "),E.test(y)||B.test(y)||O.test(y)||T.test(y)||N.test(y))break;if(M.search(this.rules.other.nonSpaceChar)>=C||!y.trim())g+=`
|
|
329
|
-
`+M.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(x)||B.test(x)||N.test(x))break;g+=`
|
|
330
|
-
`+y}!v&&!y.trim()&&(v=!0),f+=A+`
|
|
331
|
-
`,e=e.substring(A.length+1),x=M.slice(C)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(h=!0));let _=null,k;this.options.gfm&&(_=this.rules.other.listIsTask.exec(g),_&&(k=_[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!_,checked:k,loose:!1,text:g,tokens:[]}),o.raw+=f}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter(x=>x.type==="space"),g=f.length>0&&f.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=g}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:a,title:o}}}table(e){var h;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=IE(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=r[3])!=null&&h.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
332
|
-
`):[],c={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<n.length;u++)c.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:c.align[u]});for(let u of o)c.rows.push(IE(u,c.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[f]})));return c}}lheading(e){let r=this.rules.block.lheading.exec(e);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(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
|
|
333
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);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(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let c=Du(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=vZ(r[2],"()");if(c===-2)return;if(c>-1){let h=(r[0].indexOf("!")===0?5:4)+r[1].length+c;r[2]=r[2].substring(0,c),r[0]=r[0].substring(0,h).trim(),r[3]=""}}let a=r[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(a);c&&(a=c[1],o=c[3])}else o=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),$E(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[a.toLowerCase()];if(!o){let c=n[0].charAt(0);return{type:"text",raw:c,text:c}}return $E(n,o,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...a[0]].length-1,c,h,u=o,d=0,f=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,r=r.slice(-1*e.length+o);(a=f.exec(r))!=null;){if(c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!c)continue;if(h=[...c].length,a[3]||a[4]){u+=h;continue}else if((a[5]||a[6])&&o%3&&!((o+h)%3)){d+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+d);let g=[...a[0]][0].length,x=e.slice(0,o+a.index+g+h);if(Math.min(o,h)%2){let v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}let y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,a;return r[2]==="@"?(n=r[1],a="mailto:"+n):(n=r[1],a=n),{type:"link",raw:r[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let a,o;if(r[2]==="@")a=r[0],o="mailto:"+a;else{let c;do c=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(c!==r[0]);a=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},ga=class Jv{constructor(e){ge(this,"tokens");ge(this,"options");ge(this,"state");ge(this,"tokenizer");ge(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Xl,this.options.tokenizer=this.options.tokenizer||new Hg,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:rn,block:Ap.normal,inline:ju.normal};this.options.pedantic?(r.block=Ap.pedantic,r.inline=ju.pedantic):this.options.gfm&&(r.block=Ap.gfm,this.options.breaks?r.inline=ju.breaks:r.inline=ju.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ap,inline:ju}}static lex(e,r){return new Jv(r).lex(e)}static lexInline(e,r){return new Jv(r).inlineTokens(e)}lex(e){e=e.replace(rn.carriageReturn,`
|
|
334
|
-
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(rn.tabCharGlobal," ").replace(rn.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);let d=r.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
|
|
335
|
-
`:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
336
|
-
`)?"":`
|
|
337
|
-
`)+h.raw,d.text+=`
|
|
338
|
-
`+h.text,this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
339
|
-
`)?"":`
|
|
340
|
-
`)+h.raw,d.text+=`
|
|
341
|
-
`+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},r.push(h));continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0,f=e.slice(1),g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},f),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
|
|
342
|
-
`)?"":`
|
|
343
|
-
`)+h.raw,d.text+=`
|
|
344
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
345
|
-
`)?"":`
|
|
346
|
-
`)+h.raw,d.text+=`
|
|
347
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,d,f,g,x;let n=e,a=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)y.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=a[2]?a[2].length:0,n=n.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((d=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:d.call({lexer:this},n))??n;let c=!1,h="";for(;e;){c||(h=""),c=!1;let y;if((g=(f=this.options.extensions)==null?void 0:f.inline)!=null&&g.some(C=>(y=C.call({lexer:this},e,r))?(e=e.substring(y.raw.length),r.push(y),!0):!1))continue;if(y=this.tokenizer.escape(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.tag(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.link(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(y.raw.length);let C=r.at(-1);y.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(y=this.tokenizer.emStrong(e,n,h)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.codespan(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.br(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.del(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.autolink(e)){e=e.substring(y.raw.length),r.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(e))){e=e.substring(y.raw.length),r.push(y);continue}let v=e;if((x=this.options.extensions)!=null&&x.startInline){let C=1/0,_=e.slice(1),k;this.options.extensions.startInline.forEach(T=>{k=T.call({lexer:this},_),typeof k=="number"&&k>=0&&(C=Math.min(C,k))}),C<1/0&&C>=0&&(v=e.substring(0,C+1))}if(y=this.tokenizer.inlineText(v)){e=e.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(h=y.raw.slice(-1)),c=!0;let C=r.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(e){let C="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return r}},Wg=class{constructor(e){ge(this,"options");ge(this,"parser");this.options=e||Xl}space(e){return""}code({text:e,lang:r,escaped:n}){var c;let a=(c=(r||"").match(rn.notSpaceStart))==null?void 0:c[0],o=e.replace(rn.endingNewline,"")+`
|
|
348
|
-
`;return a?'<pre><code class="language-'+ja(a)+'">'+(n?o:ja(o,!0))+`</code></pre>
|
|
349
|
-
`:"<pre><code>"+(n?o:ja(o,!0))+`</code></pre>
|
|
350
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
351
|
-
${this.parser.parse(e)}</blockquote>
|
|
352
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
353
|
-
`}hr(e){return`<hr>
|
|
354
|
-
`}list(e){let r=e.ordered,n=e.start,a="";for(let h=0;h<e.items.length;h++){let u=e.items[h];a+=this.listitem(u)}let o=r?"ol":"ul",c=r&&n!==1?' start="'+n+'"':"";return"<"+o+c+`>
|
|
355
|
-
`+a+"</"+o+`>
|
|
356
|
-
`}listitem(e){var n;let r="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+ja(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
|
|
357
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
358
|
-
`}table(e){let r="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);r+=this.tablerow({text:n});let a="";for(let o=0;o<e.rows.length;o++){let c=e.rows[o];n="";for(let h=0;h<c.length;h++)n+=this.tablecell(c[h]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
359
|
-
<thead>
|
|
360
|
-
`+r+`</thead>
|
|
361
|
-
`+a+`</table>
|
|
362
|
-
`}tablerow({text:e}){return`<tr>
|
|
363
|
-
${e}</tr>
|
|
364
|
-
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
365
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ja(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let a=this.parser.parseInline(n),o=FE(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return r&&(c+=' title="'+ja(r)+'"'),c+=">"+a+"</a>",c}image({href:e,title:r,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let o=FE(e);if(o===null)return ja(n);e=o;let c=`<img src="${e}" alt="${n}"`;return r&&(c+=` title="${ja(r)}"`),c+=">",c}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ja(e.text)}},ZC=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ma=class t1{constructor(e){ge(this,"options");ge(this,"renderer");ge(this,"textRenderer");this.options=e||Xl,this.options.renderer=this.options.renderer||new Wg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ZC}static parse(e,r){return new t1(r).parse(e)}static parseInline(e,r){return new t1(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let d=h,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){n+=f||"";continue}}let u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,f=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],f+=`
|
|
366
|
-
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):n+=f;continue}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=d||"";continue}}let u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},Up,ed=(Up=class{constructor(e){ge(this,"options");ge(this,"block");this.options=e||Xl}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ga.lex:ga.lexInline}provideParser(){return this.block?ma.parse:ma.parseInline}},ge(Up,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ge(Up,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Up),_Z=class{constructor(...e){ge(this,"defaults",UC());ge(this,"options",this.setOptions);ge(this,"parse",this.parseMarkdown(!0));ge(this,"parseInline",this.parseMarkdown(!1));ge(this,"Parser",ma);ge(this,"Renderer",Wg);ge(this,"TextRenderer",ZC);ge(this,"Lexer",ga);ge(this,"Tokenizer",Hg);ge(this,"Hooks",ed);this.use(...e)}walkTokens(e,r){var a,o;let n=[];for(let c of e)switch(n=n.concat(r.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of h.rows)for(let d of u)n=n.concat(this.walkTokens(d.tokens,r));break}case"list":{let h=c;n=n.concat(this.walkTokens(h.items,r));break}default:{let h=c;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let d=h[u].flat(1/0);n=n.concat(this.walkTokens(d,r))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let c=r.renderers[o.name];c?r.renderers[o.name]=function(...h){let u=o.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=r[o.level];c?c.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),a.extensions=r),n.renderer){let o=this.defaults.renderer||new Wg(this.defaults);for(let c in n.renderer){if(!(c in o))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=n.renderer[h],d=o[h];o[h]=(...f)=>{let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g||""}}a.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Hg(this.defaults);for(let c in n.tokenizer){if(!(c in o))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=n.tokenizer[h],d=o[h];o[h]=(...f)=>{let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}a.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new ed;for(let c in n.hooks){if(!(c in o))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=n.hooks[h],d=o[h];ed.passThroughHooks.has(c)?o[h]=f=>{if(this.defaults.async&&ed.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(o,f);return d.call(o,x)})();let g=u.call(o,f);return d.call(o,g)}:o[h]=(...f)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(o,f);return x===!1&&(x=await d.apply(o,f)),x})();let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}a.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,c=n.walkTokens;a.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),o&&(u=u.concat(o.call(this,h))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return ga.lex(e,r??this.defaults)}parser(e,r){return ma.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(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 c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(r):r,u=await(o.hooks?await o.hooks.provideLexer():e?ga.lex:ga.lexInline)(h,o),d=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():e?ma.parse:ma.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let h=(o.hooks?o.hooks.provideLexer():e?ga.lex:ga.lexInline)(r,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():e?ma.parse:ma.parseInline)(h,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(e,r){return n=>{if(n.message+=`
|
|
367
|
-
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+ja(n.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(n);throw n}}},ql=new _Z;function vi(i,e){return ql.parse(i,e)}vi.options=vi.setOptions=function(i){return ql.setOptions(i),vi.defaults=ql.defaults,VR(vi.defaults),vi};vi.getDefaults=UC;vi.defaults=Xl;vi.use=function(...i){return ql.use(...i),vi.defaults=ql.defaults,VR(vi.defaults),vi};vi.walkTokens=function(i,e){return ql.walkTokens(i,e)};vi.parseInline=ql.parseInline;vi.Parser=ma;vi.parser=ma.parse;vi.Renderer=Wg;vi.TextRenderer=ZC;vi.Lexer=ga;vi.lexer=ga.lex;vi.Tokenizer=Hg;vi.Hooks=ed;vi.parse=vi;vi.options;vi.setOptions;vi.use;vi.walkTokens;vi.parseInline;ma.parse;ga.lex;function s3(i){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof i=="string"?[i]:i);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var a=n.reduce(function(h,u){var d=u.match(/\n([\t ]+|(?!\s).)/g);return d?h.concat(d.map(function(f){var g,x;return(x=(g=f.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&x!==void 0?x:0})):h},[]);if(a.length){var o=new RegExp(`
|
|
368
|
-
[ ]{`+Math.min.apply(Math,a)+"}","g");n=n.map(function(h){return h.replace(o,`
|
|
369
|
-
`)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return e.forEach(function(h,u){var d=c.match(/(?:^|\n)( *)$/),f=d?d[1]:"",g=h;typeof h=="string"&&h.includes(`
|
|
370
|
-
`)&&(g=String(h).split(`
|
|
371
|
-
`).map(function(x,y){return y===0?x:""+f+x}).join(`
|
|
372
|
-
`)),c+=g+n[u+1]}),c}var kZ={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},e1=new Map,o3=new Map,wZ=L(i=>{for(const e of i){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Lt.debug("Registering icon pack:",e.name),"loader"in e)o3.set(e.name,e.loader);else if("icons"in e)e1.set(e.name,e.icons);else throw Lt.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),l3=L(async(i,e)=>{const r=SX(i,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${i}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${i}`);let a=e1.get(n);if(!a){const c=o3.get(n);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await c(),prefix:n},e1.set(n,a)}catch(h){throw Lt.error(h),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=NX(a,r.name);if(!o)throw new Error(`Icon not found: ${i}`);return o},"getRegisteredIconData"),SZ=L(async i=>{try{return await l3(i),!0}catch{return!1}},"isIconAvailable"),Zd=L(async(i,e,r)=>{let n;try{n=await l3(i,e==null?void 0:e.fallbackPrefix)}catch(c){Lt.error(c),n=kZ}const a=jX(n,e),o=$X(IX(a.body),{...a.attributes,...r});return ka(o,Vi())},"getIconSVG");function c3(i,{markdownAutoWrap:e}){const n=i.replace(/<br\/>/g,`
|
|
373
|
-
`).replace(/\n{2,}/g,`
|
|
374
|
-
`);return s3(n)}L(c3,"preprocessMarkdown");function h3(i){return i.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var r;return((r=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(n=>({content:n,type:"normal"})))??[]})}L(h3,"nonMarkdownToLines");function u3(i,e={}){const r=c3(i,e),n=vi.lexer(r),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
|
|
375
|
-
`).forEach((f,g)=>{g!==0&&(o++,a.push([])),f.split(" ").forEach(x=>{x=x.replace(/'/g,"'"),x&&a[o].push({content:x,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(d=>{c(d,h.type)}):h.type==="html"&&a[o].push({content:h.text,type:"normal"})}return L(c,"processNode"),n.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(d=>{c(d)}):h.type==="html"?a[o].push({content:h.text,type:"normal"}):a[o].push({content:h.raw,type:"normal"})}),a}L(u3,"markdownToLines");function d3(i){return i?`<p>${i.replace(/\\n|\n/g,"<br />")}</p>`:""}L(d3,"nonMarkdownToHTML");function f3(i,{markdownAutoWrap:e}={}){const r=vi.lexer(i);function n(a){var o,c,h;return a.type==="text"?e===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(n).join("")}</strong>`:a.type==="em"?`<em>${(c=a.tokens)==null?void 0:c.map(n).join("")}</em>`:a.type==="paragraph"?`<p>${(h=a.tokens)==null?void 0:h.map(n).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(Lt.warn(`Unsupported markdown: ${a.type}`),a.raw)}return L(n,"output"),r.map(n).join("")}L(f3,"markdownToHTML");function p3(i){return Intl.Segmenter?[...new Intl.Segmenter().segment(i)].map(e=>e.segment):[...i]}L(p3,"splitTextToChars");function g3(i,e){const r=p3(e.content);return QC(i,[],r,e.type)}L(g3,"splitWordToFitWidth");function QC(i,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[a,...o]=r,c=[...e,a];return i([{content:c.join(""),type:n}])?QC(i,c,o,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}L(QC,"splitWordToFitWidthRecursion");function m3(i,e){if(i.some(({content:r})=>r.includes(`
|
|
376
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Gg(i,e)}L(m3,"splitLineToFitWidth");function Gg(i,e,r=[],n=[]){if(i.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let a="";i[0].content===" "&&(a=" ",i.shift());const o=i.shift()??{content:" ",type:"normal"},c=[...n];if(a!==""&&c.push({content:a,type:"normal"}),c.push(o),e(c))return Gg(i,e,r,c);if(n.length>0)r.push(n),i.unshift(o);else if(o.content){const[h,u]=g3(e,o);r.push([h]),u.content&&i.unshift(u)}return Gg(i,e,r)}L(Gg,"splitLineToFitWidthRecursion");function i1(i,e){e&&i.attr("style",e)}L(i1,"applyStyle");var zE=16384;async function y3(i,e,r,n,a=!1,o=Vi()){const c=i.append("foreignObject");c.attr("width",`${Math.min(10*r,zE)}px`),c.attr("height",`${Math.min(10*r,zE)}px`);const h=c.append("xhtml:div"),u=Td(e.label)?await ML(e.label.replace(Kd.lineBreakRegex,`
|
|
377
|
-
`),o):ka(e.label,o),d=e.isNode?"nodeLabel":"edgeLabel",f=h.append("span");f.html(u),i1(f,e.labelStyle),f.attr("class",`${d} ${n}`),i1(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===r&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px"),g=h.node().getBoundingClientRect()),c.node()}L(y3,"addHtmlSpan");function Nm(i,e,r,n=!1){const a=i.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return n&&a.attr("text-anchor","middle"),a}L(Nm,"createTspan");function b3(i,e,r){const n=i.append("text"),a=Nm(n,1,e);Am(a,r);const o=a.node().getComputedTextLength();return n.remove(),o}L(b3,"computeWidthOfText");function TZ(i,e,r){var c;const n=i.append("text"),a=Nm(n,1,e);Am(a,[{content:r,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}L(TZ,"computeDimensionOfText");function x3(i,e,r,n=!1,a=!1){const c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");a&&u.attr("text-anchor","middle");let d=0;for(const f of r){const g=L(y=>b3(c,1.1,y)<=i,"checkWidth"),x=g(f)?[f]:m3(f,g);for(const y of x){const v=Nm(u,d,1.1,a);Am(v,y),d++}}if(n){const f=u.node().getBBox(),g=2;return h.attr("x",f.x-g).attr("y",f.y-g).attr("width",f.width+2*g).attr("height",f.height+2*g),c.node()}else return u.node()}L(x3,"createFormattedText");function r1(i){const e=/&(amp|lt|gt);/g;return i.replace(e,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}L(r1,"decodeHTMLEntities");function Am(i,e){i.text(""),e.forEach((r,n)=>{const a=i.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?a.text(r1(r.content)):a.text(" "+r1(r.content))})}L(Am,"updateTextContentAndStyles");async function v3(i,e={}){const r=[];i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(r.push((async()=>{const h=`${o}:${c}`;return await SZ(h)?await Zd(h,void 0,{class:"label-icon"}):`<i class='${ka(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(r);return i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}L(v3,"replaceIconSubstring");var $s=L(async(i,e="",{style:r="",isTitle:n=!1,classes:a="",useHtmlLabels:o=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:d=!1}={},f)=>{if(Lt.debug("XYZ createText",e,r,n,a,o,h,"addSvgBackground: ",d),o){const g=c?f3(e,f):d3(e),x=await v3(Pl(g),f),y=e.replace(/\\\\/g,"\\"),v={isNode:h,label:Td(e)?y:x,labelStyle:r.replace("fill:","color:")};return await y3(i,v,u,a,d,f)}else{const g=Pl(e.replace(/<br\s*\/?>/g,"<br/>")),x=c?u3(g.replace("<br>","<br/>"),f):h3(g),y=x3(u,i,x,e?d:!1,!h);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ke(y).attr("style",v)}else{const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ke(y).select("rect").attr("style",v.replace(/background:/g,"fill:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ke(y).select("text").attr("style",C)}return n?ke(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ke(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function b0(i,e,r){if(i&&i.length){const[n,a]=e,o=Math.PI/180*r,c=Math.cos(o),h=Math.sin(o);for(const u of i){const[d,f]=u;u[0]=(d-n)*c-(f-a)*h+n,u[1]=(d-n)*h+(f-a)*c+a}}}function EZ(i,e){return i[0]===e[0]&&i[1]===e[1]}function NZ(i,e,r,n=1){const a=r,o=Math.max(e,.1),c=i[0]&&i[0][0]&&typeof i[0][0]=="number"?[i]:i,h=[0,0];if(a)for(const d of c)b0(d,h,a);const u=(function(d,f,g){const x=[];for(const T of d){const N=[...T];EZ(N[0],N[N.length-1])||N.push([N[0][0],N[0][1]]),N.length>2&&x.push(N)}const y=[];f=Math.max(f,.1);const v=[];for(const T of x)for(let N=0;N<T.length-1;N++){const E=T[N],B=T[N+1];if(E[1]!==B[1]){const O=Math.min(E[1],B[1]);v.push({ymin:O,ymax:Math.max(E[1],B[1]),x:O===E[1]?E[0]:B[0],islope:(B[0]-E[0])/(B[1]-E[1])})}}if(v.sort(((T,N)=>T.ymin<N.ymin?-1:T.ymin>N.ymin?1:T.x<N.x?-1:T.x>N.x?1:T.ymax===N.ymax?0:(T.ymax-N.ymax)/Math.abs(T.ymax-N.ymax))),!v.length)return y;let C=[],_=v[0].ymin,k=0;for(;C.length||v.length;){if(v.length){let T=-1;for(let N=0;N<v.length&&!(v[N].ymin>_);N++)T=N;v.splice(0,T+1).forEach((N=>{C.push({s:_,edge:N})}))}if(C=C.filter((T=>!(T.edge.ymax<=_))),C.sort(((T,N)=>T.edge.x===N.edge.x?0:(T.edge.x-N.edge.x)/Math.abs(T.edge.x-N.edge.x))),(g!==1||k%f==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const N=T+1;if(N>=C.length)break;const E=C[T].edge,B=C[N].edge;y.push([[Math.round(E.x),_],[Math.round(B.x),_]])}_+=g,C.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),k++}return y})(c,o,n);if(a){for(const d of c)b0(d,h,-a);(function(d,f,g){const x=[];d.forEach((y=>x.push(...y))),b0(x,f,g)})(u,h,-a)}return u}function Qd(i,e){var r;const n=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),NZ(i,a,n,o||1)}class JC{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Qd(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){const n=[];for(const a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return n}}function Mm(i){const e=i[0],r=i[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class AZ extends JC{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const a=Qd(e,Object.assign({},r,{hachureGap:n})),o=Math.PI/180*r.hachureAngle,c=[],h=.5*n*Math.cos(o),u=.5*n*Math.sin(o);for(const[d,f]of a)Mm([d,f])&&c.push([[d[0]-h,d[1]+u],[...f]],[[d[0]+h,d[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(c,r)}}}class MZ extends JC{fillPolygons(e,r){const n=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(e,a);return n.ops=n.ops.concat(o.ops),n}}class BZ{constructor(e){this.helper=e}fillPolygons(e,r){const n=Qd(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){const n=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const c=a/4;for(const h of e){const u=Mm(h),d=u/a,f=Math.ceil(d)-1,g=u-f*a,x=(h[0][0]+h[1][0])/2-a/4,y=Math.min(h[0][1],h[1][1]);for(let v=0;v<f;v++){const C=y+g+v*a,_=x-c+2*Math.random()*c,k=C-c+2*Math.random()*c,T=this.helper.ellipse(_,k,o,o,r);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}}class LZ{constructor(e){this.helper=e}fillPolygons(e,r){const n=Qd(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){const n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return e.forEach((c=>{const h=Mm(c),u=Math.floor(h/(n+a)),d=(h+a-u*(n+a))/2;let f=c[0],g=c[1];f[0]>g[0]&&(f=c[1],g=c[0]);const x=Math.atan((g[1]-f[1])/(g[0]-f[0]));for(let y=0;y<u;y++){const v=y*(n+a),C=v+n,_=[f[0]+v*Math.cos(x)+d*Math.cos(x),f[1]+v*Math.sin(x)+d*Math.sin(x)],k=[f[0]+C*Math.cos(x)+d*Math.cos(x),f[1]+C*Math.sin(x)+d*Math.sin(x)];o.push(...this.helper.doubleLineOps(_[0],_[1],k[0],k[1],r))}})),o}}class OZ{constructor(e){this.helper=e}fillPolygons(e,r){const n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?n:r.zigzagOffset,o=Qd(e,r=Object.assign({},r,{hachureGap:n+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(e,r,n){const a=[];return e.forEach((o=>{const c=Mm(o),h=Math.round(c/(2*r));let u=o[0],d=o[1];u[0]>d[0]&&(u=o[1],d=o[0]);const f=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let g=0;g<h;g++){const x=2*g*r,y=2*(g+1)*r,v=Math.sqrt(2*Math.pow(r,2)),C=[u[0]+x*Math.cos(f),u[1]+x*Math.sin(f)],_=[u[0]+y*Math.cos(f),u[1]+y*Math.sin(f)],k=[C[0]+v*Math.cos(f+Math.PI/4),C[1]+v*Math.sin(f+Math.PI/4)];a.push(...this.helper.doubleLineOps(C[0],C[1],k[0],k[1],n),...this.helper.doubleLineOps(k[0],k[1],_[0],_[1],n))}})),a}}const mn={};class RZ{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const jZ=0,x0=1,PE=2,Mp={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 v0(i,e){return i.type===e}function t_(i){const e=[],r=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:jZ,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:x0,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:PE,text:""},h})(i);let n="BOD",a=0,o=r[a];for(;!v0(o,PE);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return t_("M0,0"+i);a++,c=Mp[o.text],n=o.text}else v0(o,x0)?c=Mp[n]:(a++,c=Mp[o.text],n=o.text);if(!(a+c<r.length))throw new Error("Path data ended short");for(let u=a;u<a+c;u++){const d=r[u];if(!v0(d,x0))throw new Error("Param not a number: "+n+","+d.text);h[h.length]=+d.text}if(typeof Mp[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:h};e.push(u),a+=c,o=r[a],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function C3(i){let e=0,r=0,n=0,a=0;const o=[];for(const{key:c,data:h}of i)switch(c){case"M":o.push({key:"M",data:[...h]}),[e,r]=h,[n,a]=h;break;case"m":e+=h[0],r+=h[1],o.push({key:"M",data:[e,r]}),n=e,a=r;break;case"L":o.push({key:"L",data:[...h]}),[e,r]=h;break;case"l":e+=h[0],r+=h[1],o.push({key:"L",data:[e,r]});break;case"C":o.push({key:"C",data:[...h]}),e=h[4],r=h[5];break;case"c":{const u=h.map(((d,f)=>f%2?d+r:d+e));o.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":o.push({key:"Q",data:[...h]}),e=h[2],r=h[3];break;case"q":{const u=h.map(((d,f)=>f%2?d+r:d+e));o.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":o.push({key:"A",data:[...h]}),e=h[5],r=h[6];break;case"a":e+=h[5],r+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,r]});break;case"H":o.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...h]}),r=h[0];break;case"v":r+=h[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...h]}),e=h[2],r=h[3];break;case"s":{const u=h.map(((d,f)=>f%2?d+r:d+e));o.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":o.push({key:"T",data:[...h]}),e=h[0],r=h[1];break;case"t":e+=h[0],r+=h[1],o.push({key:"T",data:[e,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=n,r=a}return o}function _3(i){const e=[];let r="",n=0,a=0,o=0,c=0,h=0,u=0;for(const{key:d,data:f}of i){switch(d){case"M":e.push({key:"M",data:[...f]}),[n,a]=f,[o,c]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],a=f[5],h=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,a]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,a]});break;case"V":a=f[0],e.push({key:"L",data:[n,a]});break;case"S":{let g=0,x=0;r==="C"||r==="S"?(g=n+(n-h),x=a+(a-u)):(g=n,x=a),e.push({key:"C",data:[g,x,...f]}),h=f[0],u=f[1],n=f[2],a=f[3];break}case"T":{const[g,x]=f;let y=0,v=0;r==="Q"||r==="T"?(y=n+(n-h),v=a+(a-u)):(y=n,v=a);const C=n+2*(y-n)/3,_=a+2*(v-a)/3,k=g+2*(y-g)/3,T=x+2*(v-x)/3;e.push({key:"C",data:[C,_,k,T,g,x]}),h=y,u=v,n=g,a=x;break}case"Q":{const[g,x,y,v]=f,C=n+2*(g-n)/3,_=a+2*(x-a)/3,k=y+2*(g-y)/3,T=v+2*(x-v)/3;e.push({key:"C",data:[C,_,k,T,y,v]}),h=g,u=x,n=y,a=v;break}case"A":{const g=Math.abs(f[0]),x=Math.abs(f[1]),y=f[2],v=f[3],C=f[4],_=f[5],k=f[6];g===0||x===0?(e.push({key:"C",data:[n,a,_,k,_,k]}),n=_,a=k):(n!==_||a!==k)&&(k3(n,a,_,k,g,x,y,v,C).forEach((function(T){e.push({key:"C",data:T})})),n=_,a=k);break}case"Z":e.push({key:"Z",data:[]}),n=o,a=c}r=d}return e}function Fu(i,e,r){return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function k3(i,e,r,n,a,o,c,h,u,d){const f=(g=c,Math.PI*g/180);var g;let x=[],y=0,v=0,C=0,_=0;if(d)[y,v,C,_]=d;else{[i,e]=Fu(i,e,-f),[r,n]=Fu(r,n,-f);const K=(i-r)/2,z=(e-n)/2;let W=K*K/(a*a)+z*z/(o*o);W>1&&(W=Math.sqrt(W),a*=W,o*=W);const j=a*a,H=o*o,Y=j*H-j*z*z-H*K*K,Z=j*z*z+H*K*K,rt=(h===u?-1:1)*Math.sqrt(Math.abs(Y/Z));C=rt*a*z/o+(i+r)/2,_=rt*-o*K/a+(e+n)/2,y=Math.asin(parseFloat(((e-_)/o).toFixed(9))),v=Math.asin(parseFloat(((n-_)/o).toFixed(9))),i<C&&(y=Math.PI-y),r<C&&(v=Math.PI-v),y<0&&(y=2*Math.PI+y),v<0&&(v=2*Math.PI+v),u&&y>v&&(y-=2*Math.PI),!u&&v>y&&(v-=2*Math.PI)}let k=v-y;if(Math.abs(k)>120*Math.PI/180){const K=v,z=r,W=n;v=u&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=k3(r=C+a*Math.cos(v),n=_+o*Math.sin(v),z,W,a,o,c,0,u,[v,K,C,_])}k=v-y;const T=Math.cos(y),N=Math.sin(y),E=Math.cos(v),B=Math.sin(v),O=Math.tan(k/4),A=4/3*a*O,M=4/3*o*O,I=[i,e],D=[i+A*N,e-M*T],F=[r+A*B,n-M*E],U=[r,n];if(D[0]=2*I[0]-D[0],D[1]=2*I[1]-D[1],d)return[D,F,U].concat(x);{x=[D,F,U].concat(x);const K=[];for(let z=0;z<x.length;z+=3){const W=Fu(x[z][0],x[z][1],f),j=Fu(x[z+1][0],x[z+1][1],f),H=Fu(x[z+2][0],x[z+2][1],f);K.push([W[0],W[1],j[0],j[1],H[0],H[1]])}return K}}const DZ={randOffset:function(i,e){return Ne(i,e)},randOffsetWithRange:function(i,e,r){return Yg(i,e,r)},ellipse:function(i,e,r,n,a){const o=S3(r,n,a);return n1(i,e,a,o).opset},doubleLineOps:function(i,e,r,n,a){return $o(i,e,r,n,a,!0)}};function w3(i,e,r,n,a){return{type:"path",ops:$o(i,e,r,n,a)}}function rg(i,e,r){const n=(i||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...$o(i[o][0],i[o][1],i[o+1][0],i[o+1][1],r));return e&&a.push(...$o(i[n-1][0],i[n-1][1],i[0][0],i[0][1],r)),{type:"path",ops:a}}return n===2?w3(i[0][0],i[0][1],i[1][0],i[1][1],r):{type:"path",ops:[]}}function FZ(i,e,r,n,a){return(function(o,c){return rg(o,!0,c)})([[i,e],[i+r,e],[i+r,e+n],[i,e+n]],a)}function qE(i,e){if(i.length){const r=typeof i[0][0]=="number"?[i]:i,n=Bp(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Bp(r[0],1.5*(1+.22*e.roughness),WE(e));for(let o=1;o<r.length;o++){const c=r[o];if(c.length){const h=Bp(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:Bp(c,1.5*(1+.22*e.roughness),WE(e));for(const d of h)d.op!=="move"&&n.push(d);for(const d of u)d.op!=="move"&&a.push(d)}}return{type:"path",ops:n.concat(a)}}return{type:"path",ops:[]}}function S3(i,e,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(i/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/a;let c=Math.abs(i/2),h=Math.abs(e/2);const u=1-r.curveFitting;return c+=Ne(c*u,r),h+=Ne(h*u,r),{increment:o,rx:c,ry:h}}function n1(i,e,r,n){const[a,o]=GE(n.increment,i,e,n.rx,n.ry,1,n.increment*Yg(.1,Yg(.4,1,r),r),r);let c=Kg(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[h]=GE(n.increment,i,e,n.rx,n.ry,1.5,0,r),u=Kg(h,null,r);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function UE(i,e,r,n,a,o,c,h,u){const d=i,f=e;let g=Math.abs(r/2),x=Math.abs(n/2);g+=Ne(.01*g,u),x+=Ne(.01*x,u);let y=a,v=o;for(;y<0;)y+=2*Math.PI,v+=2*Math.PI;v-y>2*Math.PI&&(y=0,v=2*Math.PI);const C=2*Math.PI/u.curveStepCount,_=Math.min(C/2,(v-y)/2),k=YE(_,d,f,g,x,y,v,1,u);if(!u.disableMultiStroke){const T=YE(_,d,f,g,x,y,v,1.5,u);k.push(...T)}return c&&(h?k.push(...$o(d,f,d+g*Math.cos(y),f+x*Math.sin(y),u),...$o(d,f,d+g*Math.cos(v),f+x*Math.sin(v),u)):k.push({op:"lineTo",data:[d,f]},{op:"lineTo",data:[d+g*Math.cos(y),f+x*Math.sin(y)]})),{type:"path",ops:k}}function HE(i,e){const r=_3(C3(t_(i))),n=[];let a=[0,0],o=[0,0];for(const{key:c,data:h}of r)switch(c){case"M":o=[h[0],h[1]],a=[h[0],h[1]];break;case"L":n.push(...$o(o[0],o[1],h[0],h[1],e)),o=[h[0],h[1]];break;case"C":{const[u,d,f,g,x,y]=h;n.push(...IZ(u,d,f,g,x,y,o,e)),o=[x,y];break}case"Z":n.push(...$o(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function C0(i,e){const r=[];for(const n of i)if(n.length){const a=e.maxRandomnessOffset||0,o=n.length;if(o>2){r.push({op:"move",data:[n[0][0]+Ne(a,e),n[0][1]+Ne(a,e)]});for(let c=1;c<o;c++)r.push({op:"lineTo",data:[n[c][0]+Ne(a,e),n[c][1]+Ne(a,e)]})}}return{type:"fillPath",ops:r}}function Lc(i,e){return(function(r,n){let a=r.fillStyle||"hachure";if(!mn[a])switch(a){case"zigzag":mn[a]||(mn[a]=new AZ(n));break;case"cross-hatch":mn[a]||(mn[a]=new MZ(n));break;case"dots":mn[a]||(mn[a]=new BZ(n));break;case"dashed":mn[a]||(mn[a]=new LZ(n));break;case"zigzag-line":mn[a]||(mn[a]=new OZ(n));break;default:a="hachure",mn[a]||(mn[a]=new JC(n))}return mn[a]})(e,DZ).fillPolygons(i,e)}function WE(i){const e=Object.assign({},i);return e.randomizer=void 0,i.seed&&(e.seed=i.seed+1),e}function T3(i){return i.randomizer||(i.randomizer=new RZ(i.seed||0)),i.randomizer.next()}function Yg(i,e,r,n=1){return r.roughness*n*(T3(r)*(e-i)+i)}function Ne(i,e,r=1){return Yg(-i,i,e,r)}function $o(i,e,r,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=a1(i,e,r,n,a,!0,!1);if(c)return h;const u=a1(i,e,r,n,a,!0,!0);return h.concat(u)}function a1(i,e,r,n,a,o,c){const h=Math.pow(i-r,2)+Math.pow(e-n,2),u=Math.sqrt(h);let d=1;d=u<200?1:u>500?.4:-.0016668*u+1.233334;let f=a.maxRandomnessOffset||0;f*f*100>h&&(f=u/10);const g=f/2,x=.2+.2*T3(a);let y=a.bowing*a.maxRandomnessOffset*(n-e)/200,v=a.bowing*a.maxRandomnessOffset*(i-r)/200;y=Ne(y,a,d),v=Ne(v,a,d);const C=[],_=()=>Ne(g,a,d),k=()=>Ne(f,a,d),T=a.preserveVertices;return c?C.push({op:"move",data:[i+(T?0:_()),e+(T?0:_())]}):C.push({op:"move",data:[i+(T?0:Ne(f,a,d)),e+(T?0:Ne(f,a,d))]}),c?C.push({op:"bcurveTo",data:[y+i+(r-i)*x+_(),v+e+(n-e)*x+_(),y+i+2*(r-i)*x+_(),v+e+2*(n-e)*x+_(),r+(T?0:_()),n+(T?0:_())]}):C.push({op:"bcurveTo",data:[y+i+(r-i)*x+k(),v+e+(n-e)*x+k(),y+i+2*(r-i)*x+k(),v+e+2*(n-e)*x+k(),r+(T?0:k()),n+(T?0:k())]}),C}function Bp(i,e,r){if(!i.length)return[];const n=[];n.push([i[0][0]+Ne(e,r),i[0][1]+Ne(e,r)]),n.push([i[0][0]+Ne(e,r),i[0][1]+Ne(e,r)]);for(let a=1;a<i.length;a++)n.push([i[a][0]+Ne(e,r),i[a][1]+Ne(e,r)]),a===i.length-1&&n.push([i[a][0]+Ne(e,r),i[a][1]+Ne(e,r)]);return Kg(n,null,r)}function Kg(i,e,r){const n=i.length,a=[];if(n>3){const o=[],c=1-r.curveTightness;a.push({op:"move",data:[i[1][0],i[1][1]]});for(let h=1;h+2<n;h++){const u=i[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*i[h+1][0]-c*i[h-1][0])/6,u[1]+(c*i[h+1][1]-c*i[h-1][1])/6],o[2]=[i[h+1][0]+(c*i[h][0]-c*i[h+2][0])/6,i[h+1][1]+(c*i[h][1]-c*i[h+2][1])/6],o[3]=[i[h+1][0],i[h+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else n===3?(a.push({op:"move",data:[i[1][0],i[1][1]]}),a.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[2][0],i[2][1]]})):n===2&&a.push(...a1(i[0][0],i[0][1],i[1][0],i[1][1],r,!0,!0));return a}function GE(i,e,r,n,a,o,c,h){const u=[],d=[];if(h.roughness===0){i/=4,d.push([e+n*Math.cos(-i),r+a*Math.sin(-i)]);for(let f=0;f<=2*Math.PI;f+=i){const g=[e+n*Math.cos(f),r+a*Math.sin(f)];u.push(g),d.push(g)}d.push([e+n*Math.cos(0),r+a*Math.sin(0)]),d.push([e+n*Math.cos(i),r+a*Math.sin(i)])}else{const f=Ne(.5,h)-Math.PI/2;d.push([Ne(o,h)+e+.9*n*Math.cos(f-i),Ne(o,h)+r+.9*a*Math.sin(f-i)]);const g=2*Math.PI+f-.01;for(let x=f;x<g;x+=i){const y=[Ne(o,h)+e+n*Math.cos(x),Ne(o,h)+r+a*Math.sin(x)];u.push(y),d.push(y)}d.push([Ne(o,h)+e+n*Math.cos(f+2*Math.PI+.5*c),Ne(o,h)+r+a*Math.sin(f+2*Math.PI+.5*c)]),d.push([Ne(o,h)+e+.98*n*Math.cos(f+c),Ne(o,h)+r+.98*a*Math.sin(f+c)]),d.push([Ne(o,h)+e+.9*n*Math.cos(f+.5*c),Ne(o,h)+r+.9*a*Math.sin(f+.5*c)])}return[d,u]}function YE(i,e,r,n,a,o,c,h,u){const d=o+Ne(.1,u),f=[];f.push([Ne(h,u)+e+.9*n*Math.cos(d-i),Ne(h,u)+r+.9*a*Math.sin(d-i)]);for(let g=d;g<=c;g+=i)f.push([Ne(h,u)+e+n*Math.cos(g),Ne(h,u)+r+a*Math.sin(g)]);return f.push([e+n*Math.cos(c),r+a*Math.sin(c)]),f.push([e+n*Math.cos(c),r+a*Math.sin(c)]),Kg(f,null,u)}function IZ(i,e,r,n,a,o,c,h){const u=[],d=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let f=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let y=0;y<g;y++)y===0?u.push({op:"move",data:[c[0],c[1]]}):u.push({op:"move",data:[c[0]+(x?0:Ne(d[0],h)),c[1]+(x?0:Ne(d[0],h))]}),f=x?[a,o]:[a+Ne(d[y],h),o+Ne(d[y],h)],u.push({op:"bcurveTo",data:[i+Ne(d[y],h),e+Ne(d[y],h),r+Ne(d[y],h),n+Ne(d[y],h),f[0],f[1]]});return u}function Iu(i){return[...i]}function KE(i,e=0){const r=i.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(r===3)n.push(Iu(i[0]),Iu(i[1]),Iu(i[2]),Iu(i[2]));else{const a=[];a.push(i[0],i[0]);for(let h=1;h<i.length;h++)a.push(i[h]),h===i.length-1&&a.push(i[h]);const o=[],c=1-e;n.push(Iu(a[0]));for(let h=1;h+2<a.length;h++){const u=a[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*a[h+1][0]-c*a[h-1][0])/6,u[1]+(c*a[h+1][1]-c*a[h-1][1])/6],o[2]=[a[h+1][0]+(c*a[h][0]-c*a[h+2][0])/6,a[h+1][1]+(c*a[h][1]-c*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push(o[1],o[2],o[3])}}return n}function ng(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)}function $Z(i,e,r){const n=ng(e,r);if(n===0)return ng(i,e);let a=((i[0]-e[0])*(r[0]-e[0])+(i[1]-e[1])*(r[1]-e[1]))/n;return a=Math.max(0,Math.min(1,a)),ng(i,pl(e,r,a))}function pl(i,e,r){return[i[0]+(e[0]-i[0])*r,i[1]+(e[1]-i[1])*r]}function s1(i,e,r,n){const a=n||[];if((function(h,u){const d=h[u+0],f=h[u+1],g=h[u+2],x=h[u+3];let y=3*f[0]-2*d[0]-x[0];y*=y;let v=3*f[1]-2*d[1]-x[1];v*=v;let C=3*g[0]-2*x[0]-d[0];C*=C;let _=3*g[1]-2*x[1]-d[1];return _*=_,y<C&&(y=C),v<_&&(v=_),y+v})(i,e)<r){const h=i[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(ng(o,c))>1&&a.push(h)):a.push(h),a.push(i[e+3])}else{const u=i[e+0],d=i[e+1],f=i[e+2],g=i[e+3],x=pl(u,d,.5),y=pl(d,f,.5),v=pl(f,g,.5),C=pl(x,y,.5),_=pl(y,v,.5),k=pl(C,_,.5);s1([u,x,C,k],0,r,a),s1([k,_,v,g],0,r,a)}var o,c;return a}function zZ(i,e){return Vg(i,0,i.length,e)}function Vg(i,e,r,n,a){const o=a||[],c=i[e],h=i[r-1];let u=0,d=1;for(let f=e+1;f<r-1;++f){const g=$Z(i[f],c,h);g>u&&(u=g,d=f)}return Math.sqrt(u)>n?(Vg(i,e,d+1,n,o),Vg(i,d,r,n,o)):(o.length||o.push(c),o.push(h)),o}function _0(i,e=.15,r){const n=[],a=(i.length-1)/3;for(let o=0;o<a;o++)s1(i,3*o,e,n);return r&&r>0?Vg(n,0,n.length,r):n}const Rn="none";class Xg{constructor(e){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=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,a,o){const c=this._o(o);return this._d("line",[w3(e,r,n,a,c)],c)}rectangle(e,r,n,a,o){const c=this._o(o),h=[],u=FZ(e,r,n,a,c);if(c.fill){const d=[[e,r],[e+n,r],[e+n,r+a],[e,r+a]];c.fillStyle==="solid"?h.push(C0([d],c)):h.push(Lc([d],c))}return c.stroke!==Rn&&h.push(u),this._d("rectangle",h,c)}ellipse(e,r,n,a,o){const c=this._o(o),h=[],u=S3(n,a,c),d=n1(e,r,c,u);if(c.fill)if(c.fillStyle==="solid"){const f=n1(e,r,c,u).opset;f.type="fillPath",h.push(f)}else h.push(Lc([d.estimatedPoints],c));return c.stroke!==Rn&&h.push(d.opset),this._d("ellipse",h,c)}circle(e,r,n,a){const o=this.ellipse(e,r,n,n,a);return o.shape="circle",o}linearPath(e,r){const n=this._o(r);return this._d("linearPath",[rg(e,!1,n)],n)}arc(e,r,n,a,o,c,h=!1,u){const d=this._o(u),f=[],g=UE(e,r,n,a,o,c,h,!0,d);if(h&&d.fill)if(d.fillStyle==="solid"){const x=Object.assign({},d);x.disableMultiStroke=!0;const y=UE(e,r,n,a,o,c,!0,!1,x);y.type="fillPath",f.push(y)}else f.push((function(x,y,v,C,_,k,T){const N=x,E=y;let B=Math.abs(v/2),O=Math.abs(C/2);B+=Ne(.01*B,T),O+=Ne(.01*O,T);let A=_,M=k;for(;A<0;)A+=2*Math.PI,M+=2*Math.PI;M-A>2*Math.PI&&(A=0,M=2*Math.PI);const I=(M-A)/T.curveStepCount,D=[];for(let F=A;F<=M;F+=I)D.push([N+B*Math.cos(F),E+O*Math.sin(F)]);return D.push([N+B*Math.cos(M),E+O*Math.sin(M)]),D.push([N,E]),Lc([D],T)})(e,r,n,a,o,c,d));return d.stroke!==Rn&&f.push(g),this._d("arc",f,d)}curve(e,r){const n=this._o(r),a=[],o=qE(e,n);if(n.fill&&n.fill!==Rn)if(n.fillStyle==="solid"){const c=qE(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=e;if(h.length){const u=typeof h[0][0]=="number"?[h]:h;for(const d of u)d.length<3?c.push(...d):d.length===3?c.push(..._0(KE([d[0],d[0],d[1],d[2]]),10,(1+n.roughness)/2)):c.push(..._0(KE(d),10,(1+n.roughness)/2))}c.length&&a.push(Lc([c],n))}return n.stroke!==Rn&&a.push(o),this._d("curve",a,n)}polygon(e,r){const n=this._o(r),a=[],o=rg(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(C0([e],n)):a.push(Lc([e],n))),n.stroke!==Rn&&a.push(o),this._d("polygon",a,n)}path(e,r){const n=this._o(r),a=[];if(!e)return this._d("path",a,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&n.fill!=="transparent"&&n.fill!==Rn,c=n.stroke!==Rn,h=!!(n.simplification&&n.simplification<1),u=(function(f,g,x){const y=_3(C3(t_(f))),v=[];let C=[],_=[0,0],k=[];const T=()=>{k.length>=4&&C.push(..._0(k,g)),k=[]},N=()=>{T(),C.length&&(v.push(C),C=[])};for(const{key:B,data:O}of y)switch(B){case"M":N(),_=[O[0],O[1]],C.push(_);break;case"L":T(),C.push([O[0],O[1]]);break;case"C":if(!k.length){const A=C.length?C[C.length-1]:_;k.push([A[0],A[1]])}k.push([O[0],O[1]]),k.push([O[2],O[3]]),k.push([O[4],O[5]]);break;case"Z":T(),C.push([_[0],_[1]])}if(N(),!x)return v;const E=[];for(const B of v){const O=zZ(B,x);O.length&&E.push(O)}return E})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),d=HE(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const f=HE(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else a.push(C0(u,n));else a.push(Lc(u,n));return c&&(h?u.forEach((f=>{a.push(rg(f,!1,n))})):a.push(d)),this._d("path",a,n)}opsToPath(e,r){let n="";for(const a of e.ops){const o=typeof r=="number"&&r>=0?a.data.map((c=>+c.toFixed(r))):a.data;switch(a.op){case"move":n+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":n+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":n+=`L${o[0]} ${o[1]} `}}return n.trim()}toPaths(e){const r=e.sets||[],n=e.options||this.defaultOptions,a=[];for(const o of r){let c=null;switch(o.type){case"path":c={d:this.opsToPath(o),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Rn};break;case"fillPath":c={d:this.opsToPath(o),stroke:Rn,strokeWidth:0,fill:n.fill||Rn};break;case"fillSketch":c=this.fillSketch(o,n)}c&&a.push(c)}return a}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Rn,strokeWidth:n,fill:Rn}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}}class PZ{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Xg(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const c of r)switch(c.type){case"path":a.save(),a.strokeStyle=n.stroke==="none"?"transparent":n.stroke,a.lineWidth=n.strokeWidth,n.strokeLineDash&&a.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(a.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(a,c,o),a.restore();break;case"fillPath":{a.save(),a.fillStyle=n.fill||"";const h=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,c,o,h),a.restore();break}case"fillSketch":this.fillSketch(a,c,n)}}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=a,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,a="nonzero"){e.beginPath();for(const o of r.ops){const c=typeof n=="number"&&n>=0?o.data.map((h=>+h.toFixed(n))):o.data;switch(o.op){case"move":e.moveTo(c[0],c[1]);break;case"bcurveTo":e.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":e.lineTo(c[0],c[1])}}r.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,a,o){const c=this.gen.line(e,r,n,a,o);return this.draw(c),c}rectangle(e,r,n,a,o){const c=this.gen.rectangle(e,r,n,a,o);return this.draw(c),c}ellipse(e,r,n,a,o){const c=this.gen.ellipse(e,r,n,a,o);return this.draw(c),c}circle(e,r,n,a){const o=this.gen.circle(e,r,n,a);return this.draw(o),o}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,a,o,c,h=!1,u){const d=this.gen.arc(e,r,n,a,o,c,h,u);return this.draw(d),d}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){const n=this.gen.path(e,r);return this.draw(n),n}}const Lp="http://www.w3.org/2000/svg";class qZ{constructor(e,r){this.svg=e,this.gen=new Xg(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Lp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of r){let u=null;switch(h.type){case"path":u=a.createElementNS(Lp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=a.createElementNS(Lp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(a,h,n)}u&&o.appendChild(u)}return o}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);const o=e.createElementNS(Lp,"path");return o.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,a,o){const c=this.gen.line(e,r,n,a,o);return this.draw(c)}rectangle(e,r,n,a,o){const c=this.gen.rectangle(e,r,n,a,o);return this.draw(c)}ellipse(e,r,n,a,o){const c=this.gen.ellipse(e,r,n,a,o);return this.draw(c)}circle(e,r,n,a){const o=this.gen.circle(e,r,n,a);return this.draw(o)}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,a,o,c,h=!1,u){const d=this.gen.arc(e,r,n,a,o,c,h,u);return this.draw(d)}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n)}path(e,r){const n=this.gen.path(e,r);return this.draw(n)}}var se={canvas:(i,e)=>new PZ(i,e),svg:(i,e)=>new qZ(i,e),generator:i=>new Xg(i),newSeed:()=>Xg.newSeed()},Ee=L(async(i,e,r)=>{var y,v;let n;const a=e.useHtmlLabels||Is((y=di())==null?void 0:y.htmlLabels);r?n=r:n="node default";const o=i.insert("g").attr("class",n).attr("id",e.domId||e.id),c=o.insert("g").attr("class","label").attr("style",Tr(e.labelStyle));let h;e.label===void 0?h="":h=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,d=e.labelType==="markdown",f=await $s(c,ka(Pl(h),di()),{useHtmlLabels:a,width:e.width||((v=di().flowchart)==null?void 0:v.wrappingWidth),classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},di());let g=f.getBBox();const x=((e==null?void 0:e.padding)??0)/2;if(a){const C=f.children[0],_=ke(f);await GR(C,h),g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height)}return a?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:x,label:c}},"labelHelper"),k0=L(async(i,e,r)=>{var u,d;const n=r.useHtmlLabels??an(di()),a=i.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await $s(a,ka(Pl(e),di()),{useHtmlLabels:n,width:r.width||((d=(u=di())==null?void 0:u.flowchart)==null?void 0:d.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=o.getBBox();const h=r.padding/2;if(an(di())){const f=o.children[0],g=ke(o);c=f.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return n?a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):a.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:i,bbox:c,halfPadding:h,label:a}},"insertLabel"),ue=L((i,e)=>{const r=e.node().getBBox();i.width=r.width,i.height=r.height},"updateNodeBounds"),we=L((i,e)=>(i.look==="handDrawn"?"rough-node":"node")+" "+i.cssClasses+" "+(e||""),"getNodeClasses");function ai(i){const e=i.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}L(ai,"createPathFromPoints");function zo(i,e,r,n,a,o){const c=[],u=r-i,d=n-e,f=u/o,g=2*Math.PI/f,x=e+d/2;for(let y=0;y<=50;y++){const v=y/50,C=i+v*u,_=x+a*Math.sin(g*(C-i));c.push({x:C,y:_})}return c}L(zo,"generateFullSineWavePoints");function Bd(i,e,r,n,a,o){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}L(Bd,"generateCirclePoints");function o1(i){const e=Array.from(i.childNodes).filter(u=>u.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",n);const a=e.find(u=>u.getAttribute("fill")!=="none"),o=e.find(u=>u.getAttribute("stroke")!=="none"),c=L((u,d)=>(u==null?void 0:u.getAttribute(d))??void 0,"getAttr");if(a){const u={fill:c(a,"fill"),"fill-opacity":c(a,"fill-opacity")??"1"};Object.entries(u).forEach(([d,f])=>{f&&r.setAttribute(d,f)})}if(o){const u={stroke:c(o,"stroke"),"stroke-width":c(o,"stroke-width")??"1","stroke-opacity":c(o,"stroke-opacity")??"1"};Object.entries(u).forEach(([d,f])=>{f&&r.setAttribute(d,f)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(r),h}L(o1,"mergePaths");var UZ=L((i,e)=>{var r=i.x,n=i.y,a=e.x-r,o=e.y-n,c=i.width/2,h=i.height/2,u,d;return Math.abs(o)*c>Math.abs(a)*h?(o<0&&(h=-h),u=o===0?0:h*a/o,d=h):(a<0&&(c=-c),u=c,d=a===0?0:c*o/a),{x:r+u,y:n+d}},"intersectRect"),Mh=UZ,HZ=L(async(i,e,r,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=di(),h=an(c);return await $s(i,o,{style:r,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Mo=HZ,Uo=L((i,e,r,n,a)=>["M",i+a,e,"H",i+r-a,"A",a,a,0,0,1,i+r,e+a,"V",e+n-a,"A",a,a,0,0,1,i+r-a,e+n,"H",i+a,"A",a,a,0,0,1,i,e+n-a,"V",e+a,"A",a,a,0,0,1,i+a,e,"Z"].join(" "),"createRoundedRectPathD"),E3=L(async(i,e)=>{Lt.info("Creating subgraph rect for ",e.id,e);const r=di(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=le(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=an(r),y=g.insert("g").attr("class","cluster-label ");let v;e.labelType==="markdown"?v=await $s(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}):v=await Mo(y,e.label,e.labelStyle||"",!1,!0);let C=v.getBBox();if(an(r)){const A=v.children[0],M=ke(v);C=A.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-_/2,N=e.y-k/2;Lt.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const A=se.svg(g),M=oe(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),I=A.path(Uo(T,N,_,k,0),M);E=g.insert(()=>(Lt.debug("Rough node insert CXC",I),I),":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";")),E.select("path").attr("style",f.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",N).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:B}=qC(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+B})`),h){const A=y.select("span");A&&A.attr("style",h)}const O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=C.height-e.padding/2,e.intersect=function(A){return Mh(e,A)},{cluster:g,labelBBox:C}},"rect"),WZ=L((i,e)=>{const r=i.insert("g").attr("class","note-cluster").attr("id",e.domId),n=r.insert("rect",":first-child"),a=0*e.padding,o=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const c=n.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return Mh(e,h)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),GZ=L(async(i,e)=>{const r=di(),{themeVariables:n,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=n,d=i.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=d.insert("g",":first-child"),g=d.insert("g").attr("class","cluster-label");let x=d.append("rect");const y=await Mo(g,e.label,e.labelStyle,void 0,!0);let v=y.getBBox();if(an(r)){const I=y.children[0],D=ke(y);v=I.getBoundingClientRect(),D.attr("width",v.width),D.attr("height",v.height)}const C=0*e.padding,_=C/2,k=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+C;e.width<=v.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+C,N=e.height+C-v.height-6,E=e.x-k/2,B=e.y-T/2;e.width=k;const O=e.y-e.height/2-_+v.height+2;let A;if(e.look==="handDrawn"){const I=e.cssClasses.includes("statediagram-cluster-alt"),D=se.svg(d),F=e.rx||e.ry?D.path(Uo(E,B,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):D.rectangle(E,B,k,T,{seed:a});A=d.insert(()=>F,":first-child");const U=D.rectangle(E,O,k,N,{fill:I?o:c,fillStyle:I?"hachure":"solid",stroke:u,seed:a});A=d.insert(()=>F,":first-child"),x=d.insert(()=>U)}else A=f.insert("rect",":first-child"),A.attr("class","outer").attr("x",E).attr("y",B).attr("width",k).attr("height",T).attr("data-look",e.look),x.attr("class","inner").attr("x",E).attr("y",O).attr("width",k).attr("height",N);g.attr("transform",`translate(${e.x-v.width/2}, ${B+1-(an(r)?0:3)})`);const M=A.node().getBBox();return e.height=M.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(I){return Mh(e,I)},{cluster:d,labelBBox:v}},"roundedWithTitle"),YZ=L(async(i,e)=>{Lt.info("Creating subgraph rect for ",e.id,e);const r=di(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=le(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=an(r),y=g.insert("g").attr("class","cluster-label "),v=await $s(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let C=v.getBBox();if(an(r)){const A=v.children[0],M=ke(v);C=A.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-_/2,N=e.y-k/2;Lt.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const A=se.svg(g),M=oe(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),I=A.path(Uo(T,N,_,k,e.rx),M);E=g.insert(()=>(Lt.debug("Rough node insert CXC",I),I),":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";")),E.select("path").attr("style",f.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",N).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:B}=qC(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+B})`),h){const A=y.select("span");A&&A.attr("style",h)}const O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=C.height-e.padding/2,e.intersect=function(A){return Mh(e,A)},{cluster:g,labelBBox:C}},"kanbanSection"),KZ=L((i,e)=>{const r=di(),{themeVariables:n,handDrawnSeed:a}=r,{nodeBorder:o}=n,c=i.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=c.insert("g",":first-child"),u=0*e.padding,d=e.width+u;e.diff=-e.padding;const f=e.height+u,g=e.x-d/2,x=e.y-f/2;e.width=d;let y;if(e.look==="handDrawn"){const _=se.svg(c).rectangle(g,x,d,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});y=c.insert(()=>_,":first-child")}else{y=h.insert("rect",":first-child");let C="outer";e.look,C="divider",y.attr("class",C).attr("x",g).attr("y",x).attr("width",d).attr("height",f).attr("data-look",e.look)}const v=y.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(C){return Mh(e,C)},{cluster:c,labelBBox:{}}},"divider"),VZ=E3,XZ={rect:E3,squareRect:VZ,roundedWithTitle:GZ,noteGroup:WZ,divider:KZ,kanbanSection:YZ},N3=new Map,ZZ=L(async(i,e)=>{const r=e.shape||"rect",n=await XZ[r](i,e);return N3.set(e.id,n),n},"insertCluster"),Clt=L(()=>{N3=new Map},"clear");function A3(i,e){return i.intersect(e)}L(A3,"intersectNode");var QZ=A3;function M3(i,e,r,n){var a=i.x,o=i.y,c=a-n.x,h=o-n.y,u=Math.sqrt(e*e*h*h+r*r*c*c),d=Math.abs(e*r*c/u);n.x<a&&(d=-d);var f=Math.abs(e*r*h/u);return n.y<o&&(f=-f),{x:a+d,y:o+f}}L(M3,"intersectEllipse");var B3=M3;function L3(i,e,r){return B3(i,e,e,r)}L(L3,"intersectCircle");var JZ=L3;function O3(i,e,r,n){{const a=e.y-i.y,o=i.x-e.x,c=e.x*i.y-i.x*e.y,h=a*r.x+o*r.y+c,u=a*n.x+o*n.y+c,d=1e-6;if(h!==0&&u!==0&&l1(h,u))return;const f=n.y-r.y,g=r.x-n.x,x=n.x*r.y-r.x*n.y,y=f*i.x+g*i.y+x,v=f*e.x+g*e.y+x;if(Math.abs(y)<d&&Math.abs(v)<d&&l1(y,v))return;const C=a*g-f*o;if(C===0)return;const _=Math.abs(C/2);let k=o*x-g*c;const T=k<0?(k-_)/C:(k+_)/C;k=f*c-a*x;const N=k<0?(k-_)/C:(k+_)/C;return{x:T,y:N}}}L(O3,"intersectLine");function l1(i,e){return i*e>0}L(l1,"sameSign");var tQ=O3;function R3(i,e,r){let n=i.x,a=i.y,o=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){c=Math.min(c,f.x),h=Math.min(h,f.y)}):(c=Math.min(c,e.x),h=Math.min(h,e.y));let u=n-i.width/2-c,d=a-i.height/2-h;for(let f=0;f<e.length;f++){let g=e[f],x=e[f<e.length-1?f+1:0],y=tQ(i,r,{x:u+g.x,y:d+g.y},{x:u+x.x,y:d+x.y});y&&o.push(y)}return o.length?(o.length>1&&o.sort(function(f,g){let x=f.x-r.x,y=f.y-r.y,v=Math.sqrt(x*x+y*y),C=g.x-r.x,_=g.y-r.y,k=Math.sqrt(C*C+_*_);return v<k?-1:v===k?0:1}),o[0]):i}L(R3,"intersectPolygon");var eQ=R3,te={node:QZ,circle:JZ,ellipse:B3,polygon:eQ,rect:Mh};function j3(i,e){const{labelStyles:r}=le(e);e.labelStyle=r;const n=we(e);let a=n;n||(a="anchor");const o=i.insert("g").attr("class",a).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,u=se.svg(o),d=oe(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(d.roughness=0);const f=u.circle(0,0,c*2,d),g=o.insert(()=>f,":first-child");return g.attr("class","anchor").attr("style",Tr(h)),ue(e,g),e.intersect=function(x){return Lt.info("Circle intersect",e,c,x),te.circle(e,c,x)},o}L(j3,"anchor");function c1(i,e,r,n,a,o,c){const u=(i+r)/2,d=(e+n)/2,f=Math.atan2(n-e,r-i),g=(r-i)/2,x=(n-e)/2,y=g/a,v=x/o,C=Math.sqrt(y**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const _=Math.sqrt(1-C**2),k=u+_*o*Math.sin(f)*(c?-1:1),T=d-_*a*Math.cos(f)*(c?-1:1),N=Math.atan2((e-T)/o,(i-k)/a);let B=Math.atan2((n-T)/o,(r-k)/a)-N;c&&B<0&&(B+=2*Math.PI),!c&&B>0&&(B-=2*Math.PI);const O=[];for(let A=0;A<20;A++){const M=A/19,I=N+M*B,D=k+a*Math.cos(I),F=T+o*Math.sin(I);O.push({x:D,y:F})}return O}L(c1,"generateArcPoints");function D3(i,e,r){const[n,a]=[e,r].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(i/n/2)**2))}L(D3,"calculateArcSagitta");async function F3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=L(I=>I+c,"calcTotalHeight"),u=L(I=>{const D=I/2;return[D/(2.5+I/50),D]},"calcEllipseRadius"),{shapeSvg:d,bbox:f}=await Ee(i,e,we(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:f.height),[x,y]=u(g),v=D3(g,x,y),_=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+v-v,k=g,{cssStyles:T}=e,N=[{x:_/2,y:-k/2},{x:-_/2,y:-k/2},...c1(-_/2,-k/2,-_/2,k/2,x,y,!1),{x:_/2,y:k/2},...c1(_/2,k/2,_/2,-k/2,x,y,!0)],E=se.svg(d),B=oe(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=ai(N),A=E.path(O,B),M=d.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(${x/2}, 0)`),ue(e,M),e.intersect=function(I){return te.polygon(e,N,I)},d}L(F3,"bowTieRect");function zs(i,e,r,n){return i.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}L(zs,"insertPolygonShape");var Op=12;async function I3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?28:a,c=e.look==="neo"?24:a,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+Op),f=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,x=d,y=-f,v=0,C=[{x:g+Op,y},{x,y},{x,y:v},{x:g,y:v},{x:g,y:y+Op},{x:g+Op,y}];let _;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=se.svg(h),N=oe(e,{}),E=ai(C),B=T.path(E,N);_=h.insert(()=>B,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),k&&_.attr("style",k)}else _=zs(h,d,f,C);return n&&_.attr("style",n),ue(e,_),e.intersect=function(T){return te.polygon(e,C,T)},h}L(I3,"card");function $3(i,e){const{nodeStyles:r}=le(e);e.label="";const n=i.insert("g").attr("class",we(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),c=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],h=se.svg(n),u=oe(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ai(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(x){return te.polygon(e,c,x)},n}L($3,"choice");async function e_(i,e,r){const{labelStyles:n,nodeStyles:a}=le(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await Ee(i,e,we(e)),u=16,d=(r==null?void 0:r.padding)??h,f=e.look==="neo"?c.width/2+u*2:c.width/2+d;let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const y=se.svg(o),v=oe(e,{}),C=y.circle(0,0,f*2,v);g=o.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",Tr(x))}else g=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0);return ue(e,g),e.calcIntersect=function(y,v){const C=y.width/2;return te.circle(y,C,v)},e.intersect=function(y){return Lt.info("Circle intersect",e,f,y),te.circle(e,f,y)},o}L(e_,"circle");function z3(i){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=i*2,a={x:n/2*e,y:n/2*r},o={x:-(n/2)*e,y:n/2*r},c={x:-(n/2)*e,y:-(n/2)*r},h={x:n/2*e,y:-(n/2)*r};return`M ${o.x},${o.y} L ${h.x},${h.y}
|
|
378
|
-
M ${a.x},${a.y} L ${c.x},${c.y}`}L(z3,"createLine");function P3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r,e.label="";const a=i.insert("g").attr("class",we(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=se.svg(a),u=oe(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,o*2,u),f=z3(o),g=h.path(f,u),x=a.insert(()=>d,":first-child");return x.insert(()=>g),x.attr("class","outer-path"),c&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",c),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),ue(e,x),e.intersect=function(y){return Lt.info("crossedCircle intersect",e,{radius:o,point:y}),te.circle(e,o,y)},a}L(P3,"crossedCircle");function _s(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}L(_s,"generateCirclePoints");async function q3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Ee(i,e,we(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+h,f=o.height+u,g=Math.max(5,f*.1),{cssStyles:x}=e,y=[..._s(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},..._s(d/2+g*2,-g,g,20,-180,-270),..._s(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},..._s(d/2,f/2,g,20,0,90)],v=[{x:d/2,y:-f/2-g},{x:-d/2,y:-f/2-g},..._s(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},..._s(d/2+d*.1,-g,g,20,-180,-270),..._s(d/2+d*.1,g,g,20,-90,-180),{x:-d/2-g,y:f/2},..._s(d/2,f/2,g,20,0,90),{x:-d/2,y:f/2+g},{x:d/2,y:f/2+g}],C=se.svg(a),_=oe(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ai(y).replace("Z",""),N=C.path(T,_),E=ai(v),B=C.path(E,{..._}),O=a.insert("g",":first-child");return O.insert(()=>B,":first-child").attr("stroke-opacity",0),O.insert(()=>N,":first-child"),O.attr("class","text"),x&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-d/2+g-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),ue(e,O),e.intersect=function(A){return te.polygon(e,v,A)},a}L(q3,"curlyBraceLeft");function ks(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:y,y:v})}return c}L(ks,"generateCirclePoints");async function U3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Ee(i,e,we(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+(e.look==="neo"?h*2:h),f=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,f*.1),{cssStyles:x}=e,y=[...ks(d/2,-f/2,g,20,-90,0),{x:d/2+g,y:-g},...ks(d/2+g*2,-g,g,20,-180,-270),...ks(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:f/2},...ks(d/2,f/2,g,20,0,90)],v=[{x:-d/2,y:-f/2-g},{x:d/2,y:-f/2-g},...ks(d/2,-f/2,g,20,-90,0),{x:d/2+g,y:-g},...ks(d/2+g*2,-g,g,20,-180,-270),...ks(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:f/2},...ks(d/2,f/2,g,20,0,90),{x:d/2,y:f/2+g},{x:-d/2,y:f/2+g}],C=se.svg(a),_=oe(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ai(y).replace("Z",""),N=C.path(T,_),E=ai(v),B=C.path(E,{..._}),O=a.insert("g",":first-child");return O.insert(()=>B,":first-child").attr("stroke-opacity",0),O.insert(()=>N,":first-child"),O.attr("class","text"),x&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),ue(e,O),e.intersect=function(A){return te.polygon(e,v,A)},a}L(U3,"curlyBraceRight");function Rr(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}L(Rr,"generateCirclePoints");async function H3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Ee(i,e,we(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+(e.look==="neo"?h*2:h),f=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,f*.1),{cssStyles:x}=e,y=[...Rr(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},...Rr(d/2+g*2,-g,g,20,-180,-270),...Rr(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},...Rr(d/2,f/2,g,20,0,90)],v=[...Rr(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Rr(-d/2-g/2,-g,g,20,0,90),...Rr(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Rr(-d/2+g+g/2,f/2,g,30,-180,-270)],C=[{x:d/2,y:-f/2-g},{x:-d/2,y:-f/2-g},...Rr(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},...Rr(d/2+g*2,-g,g,20,-180,-270),...Rr(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:f/2},...Rr(d/2,f/2,g,20,0,90),{x:-d/2,y:f/2+g},{x:d/2-g-g/2,y:f/2+g},...Rr(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Rr(-d/2-g/2,-g,g,20,0,90),...Rr(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Rr(-d/2+g+g/2,f/2,g,30,-180,-270)],_=se.svg(a),k=oe(e,{fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const N=ai(y).replace("Z",""),E=_.path(N,k),O=ai(v).replace("Z",""),A=_.path(O,k),M=ai(C),I=_.path(M,{...k}),D=a.insert("g",":first-child");return D.insert(()=>I,":first-child").attr("stroke-opacity",0),D.insert(()=>E,":first-child"),D.insert(()=>A,":first-child"),D.attr("class","text"),x&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),ue(e,D),e.intersect=function(F){return te.polygon(e,C,F)},a}L(H3,"curlyBraces");async function W3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=20,u=5,{shapeSvg:d,bbox:f}=await Ee(i,e,we(e)),g=Math.max(h,(f.width+o*2)*1.25,(e==null?void 0:e.width)??0),x=Math.max(u,f.height+c*2,(e==null?void 0:e.height)??0),y=x/2,{cssStyles:v}=e,C=se.svg(d),_=oe(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=g,T=x,N=k-y,E=T/4,B=[{x:N,y:0},{x:E,y:0},{x:0,y:T/2},{x:E,y:T},{x:N,y:T},...Bd(-N,-T/2,y,50,270,90)],O=ai(B),A=C.path(O,_),M=d.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&M.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&M.selectChildren("path").attr("style",n),M.attr("transform",`translate(${-g/2}, ${-x/2})`),ue(e,M),e.intersect=function(I){return te.polygon(e,B,I)},d}L(W3,"curvedTrapezoid");var iQ=L((i,e,r,n,a,o)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),rQ=L((i,e,r,n,a,o)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),nQ=L((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),VE=8,XE=8;async function G3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?24:a,c=e.look==="neo"?24:a;if(e.width||e.height){const _=e.width??0;e.width=(e.width??0)-c,e.width<XE&&(e.width=XE);const T=_/2/(2.5+_/50);e.height=(e.height??0)-o-T*3,e.height<VE&&(e.height=VE)}const{shapeSvg:h,bbox:u,label:d}=await Ee(i,e,we(e)),f=(e.width?e.width:u.width)+c,g=f/2,x=g/(2.5+f/50),y=(e.height?e.height:u.height)+o+x;let v;const{cssStyles:C}=e;if(e.look==="handDrawn"){const _=se.svg(h),k=rQ(0,0,f,y,g,x),T=nQ(0,x,f,y,g,x),N=oe(e,{}),E=_.path(k,N),B=_.path(T,oe(e,{fill:"none"}));v=h.insert(()=>B,":first-child"),v=h.insert(()=>E,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const _=iQ(0,0,f,y,g,x);v=h.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",Tr(C)).attr("style",n)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),ue(e,v),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(_){const k=te.rect(e,_),T=k.x-(e.x??0);if(g!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(k.y-(e.y??0))>(e.height??0)/2-x)){let N=x*x*(1-T*T/(g*g));N>0&&(N=Math.sqrt(N)),N=x-N,_.y-(e.y??0)>0&&(N=-N),k.y+=N}return k},h}L(G3,"cylinder");async function Y3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Ee(i,e,we(e)),d=h.width+a,f=h.height+o,g=f*.2,x=-d/2,y=-f/2-g/2,{cssStyles:v}=e,C=se.svg(c),_=oe(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],T=C.polygon(k.map(E=>[E.x,E.y]),_),N=c.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),u.attr("transform",`translate(${x+(e.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(e.padding??0)/2-(h.y-(h.top??0))})`),ue(e,N),e.intersect=function(E){return te.rect(e,E)},c}L(Y3,"dividedRectangle");async function K3(i,e){var y,v;const{labelStyles:r,nodeStyles:n}=le(e),a=e.look==="neo"?12:5;e.labelStyle=r;const o=e.padding??0,c=e.look==="neo"?16:o,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=(e!=null&&e.width?(e==null?void 0:e.width)/2:u.width/2)+(c??0),f=d-a;let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const C=se.svg(h),_=oe(e,{roughness:.2,strokeWidth:2.5}),k=oe(e,{roughness:.2,strokeWidth:1.5}),T=C.circle(0,0,d*2,_),N=C.circle(0,0,f*2,k);g=h.insert("g",":first-child"),g.attr("class",Tr(e.cssClasses)).attr("style",Tr(x)),(y=g.node())==null||y.appendChild(T),(v=g.node())==null||v.appendChild(N)}else{g=h.insert("g",":first-child");const C=g.insert("circle",":first-child"),_=g.insert("circle");g.attr("class","basic label-container").attr("style",n),C.attr("class","outer-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0),_.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return ue(e,g),e.intersect=function(C){return Lt.info("DoubleCircle intersect",e,d,C),te.circle(e,d,C)},h}L(K3,"doublecircle");function V3(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=le(e);e.label="",e.labelStyle=n;const o=i.insert("g").attr("class",we(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=se.svg(o),{nodeBorder:d}=r,f=oe(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);const g=u.circle(0,0,c*2,f),x=o.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${d} !important;`),h&&h.length>0&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",h),a&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",a),ue(e,x),e.intersect=function(y){return Lt.info("filledCircle intersect",e,{radius:c,point:y}),te.circle(e,c,y)},o}L(V3,"filledCircle");var ZE=10,QE=10;async function X3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.height=(e==null?void 0:e.height)??0,e.height<ZE&&(e.height=ZE),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<QE&&(e.width=QE));const{shapeSvg:c,bbox:h,label:u}=await Ee(i,e,we(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+(o??0),f=e!=null&&e.height?e==null?void 0:e.height:d+h.height,g=f,x=[{x:0,y:-f},{x:g,y:-f},{x:g/2,y:0}],{cssStyles:y}=e,v=se.svg(c),C=oe(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=ai(x),k=v.path(_,C),T=c.insert(()=>k,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return y&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=d,e.height=f,ue(e,T),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(N){return Lt.info("Triangle intersect",e,x,N),te.polygon(e,x,N)},c}L(X3,"flippedTriangle");function Z3(i,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=le(e);e.label="";const c=i.insert("g").attr("class",we(e)).attr("id",e.domId??e.id),{cssStyles:h}=e;let u=Math.max(70,(e==null?void 0:e.width)??0),d=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(u=Math.max(10,(e==null?void 0:e.width)??0),d=Math.max(70,(e==null?void 0:e.height)??0));const f=-1*u/2,g=-1*d/2,x=se.svg(c),y=oe(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=x.rectangle(f,g,u,d,y),C=c.insert(()=>v,":first-child");h&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",h),o&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",o),ue(e,C);const _=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=_/2||0,e.height+=_/2||0),e.intersect=function(k){return te.rect(e,k)},c}L(Z3,"forkJoin");async function Q3(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=15,o=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.height=((e==null?void 0:e.height)??0)-h*2,e.height<o&&(e.height=o),e.width=((e==null?void 0:e.width)??0)-c*2,e.width<a&&(e.width=a));const{shapeSvg:u,bbox:d}=await Ee(i,e,we(e)),f=(e!=null&&e.width?e==null?void 0:e.width:Math.max(a,d.width))+c*2,g=(e!=null&&e.height?e==null?void 0:e.height:Math.max(o,d.height))+h*2,x=g/2,{cssStyles:y}=e,v=se.svg(u),C=oe(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-f/2,y:-g/2},{x:f/2-x,y:-g/2},...Bd(-f/2+x,0,x,50,90,270),{x:f/2-x,y:g/2},{x:-f/2,y:g/2}],k=ai(_),T=v.path(k,C),N=u.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",n),ue(e,N),e.intersect=function(E){return Lt.info("Pill intersect",e,{radius:x,point:E}),te.polygon(e,_,E)},u}L(Q3,"halfRoundedRectangle");var aQ=L((i,e,r,n,a)=>[`M${i+a},${e}`,`L${i+r-a},${e}`,`L${i+r},${e-n/2}`,`L${i+r-a},${e-n}`,`L${i+a},${e-n}`,`L${i},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function J3(i,e){const{labelStyles:r,nodeStyles:n}=le(e),a=e.look==="neo"?3.5:4;e.labelStyle=r;const o=e.padding??0,c=70,h=32,u=e.look==="neo"?c:o,d=e.look==="neo"?h:o;if(e.width||e.height){const N=(e.height??0)/a;e.width=((e==null?void 0:e.width)??0)-2*N-d,e.height=(e.height??0)-u}const{shapeSvg:f,bbox:g}=await Ee(i,e,we(e)),x=(e!=null&&e.height?e==null?void 0:e.height:g.height)+u,y=x/a,v=(e!=null&&e.width?e==null?void 0:e.width:g.width)+2*y+d,C=[{x:y,y:0},{x:v-y,y:0},{x:v,y:-x/2},{x:v-y,y:-x},{x:y,y:-x},{x:0,y:-x/2}];let _;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=se.svg(f),N=oe(e,{}),E=aQ(0,0,v,x,y),B=T.path(E,N);_=f.insert(()=>B,":first-child").attr("transform",`translate(${-v/2}, ${x/2})`),k&&_.attr("style",k)}else _=zs(f,v,x,C);return n&&_.attr("style",n),e.width=v,e.height=x,ue(e,_),e.intersect=function(T){return te.polygon(e,C,T)},f}L(J3,"hexagon");async function tj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await Ee(i,e,we(e)),o=Math.max(30,(e==null?void 0:e.width)??0),c=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=se.svg(a),d=oe(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:0,y:0},{x:o,y:0},{x:0,y:c},{x:o,y:c}],g=ai(f),x=u.path(g,d),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(${-o/2}, ${-c/2})`),ue(e,y),e.intersect=function(v){return Lt.info("Pill intersect",e,{points:f}),te.polygon(e,f,v)},a}L(tj,"hourglass");async function ej(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=le(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,label:g}=await Ee(i,e,"icon-shape default"),x=e.pos==="t",y=h,v=h,{nodeBorder:C}=r,{stylesMap:_}=Ah(e),k=-v/2,T=-y/2,N=e.label?8:0,E=se.svg(d),B=oe(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=E.rectangle(k,T,v,y,B),A=Math.max(v,f.width),M=y+f.height+N,I=E.rectangle(-A/2,-M/2,A,M,{...B,fill:"transparent",stroke:"none"}),D=d.insert(()=>O,":first-child"),F=d.insert(()=>I);if(e.icon){const U=d.append("g");U.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const K=U.node().getBBox(),z=K.width,W=K.height,j=K.x,H=K.y;U.attr("transform",`translate(${-z/2-j},${x?f.height/2+N/2-W/2-H:-f.height/2-N/2-W/2-H})`),U.attr("style",`color: ${_.get("stroke")??C};`)}return g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${x?-M/2:M/2-f.height})`),D.attr("transform",`translate(0,${x?f.height/2+N/2:-f.height/2-N/2})`),ue(e,F),e.intersect=function(U){if(Lt.info("iconSquare intersect",e,U),!e.label)return te.rect(e,U);const K=e.x??0,z=e.y??0,W=e.height??0;let j=[];return x?j=[{x:K-f.width/2,y:z-W/2},{x:K+f.width/2,y:z-W/2},{x:K+f.width/2,y:z-W/2+f.height+N},{x:K+v/2,y:z-W/2+f.height+N},{x:K+v/2,y:z+W/2},{x:K-v/2,y:z+W/2},{x:K-v/2,y:z-W/2+f.height+N},{x:K-f.width/2,y:z-W/2+f.height+N}]:j=[{x:K-v/2,y:z-W/2},{x:K+v/2,y:z-W/2},{x:K+v/2,y:z-W/2+y},{x:K+f.width/2,y:z-W/2+y},{x:K+f.width/2/2,y:z+W/2},{x:K-f.width/2,y:z+W/2},{x:K-f.width/2,y:z-W/2+y},{x:K-v/2,y:z-W/2+y}],te.polygon(e,j,U)},d}L(ej,"icon");async function ij(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=le(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,label:g}=await Ee(i,e,"icon-shape default"),x=20,y=e.label?8:0,v=e.pos==="t",{nodeBorder:C,mainBkg:_}=r,{stylesMap:k}=Ah(e),T=se.svg(d),N=oe(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const E=k.get("fill");N.stroke=E??_;const B=d.append("g");e.icon&&B.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const O=B.node().getBBox(),A=O.width,M=O.height,I=O.x,D=O.y,F=Math.max(A,M)*Math.SQRT2+x*2,U=T.circle(0,0,F,N),K=Math.max(F,f.width),z=F+f.height+y,W=T.rectangle(-K/2,-z/2,K,z,{...N,fill:"transparent",stroke:"none"}),j=d.insert(()=>U,":first-child"),H=d.insert(()=>W);return B.attr("transform",`translate(${-A/2-I},${v?f.height/2+y/2-M/2-D:-f.height/2-y/2-M/2-D})`),B.attr("style",`color: ${k.get("stroke")??C};`),g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-z/2:z/2-f.height})`),j.attr("transform",`translate(0,${v?f.height/2+y/2:-f.height/2-y/2})`),ue(e,H),e.intersect=function(Y){return Lt.info("iconSquare intersect",e,Y),te.rect(e,Y)},d}L(ij,"iconCircle");async function rj(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=le(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,halfPadding:g,label:x}=await Ee(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:k}=r,{stylesMap:T}=Ah(e),N=-C/2,E=-v/2,B=e.label?8:0,O=se.svg(d),A=oe(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const I=O.path(Uo(N,E,C,v,5),A),D=Math.max(C,f.width),F=v+f.height+B,U=O.rectangle(-D/2,-F/2,D,F,{...A,fill:"transparent",stroke:"none"}),K=d.insert(()=>I,":first-child").attr("class","icon-shape2"),z=d.insert(()=>U);if(e.icon){const W=d.append("g");W.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=W.node().getBBox(),H=j.width,Y=j.height,Z=j.x,rt=j.y;W.attr("transform",`translate(${-H/2-Z},${y?f.height/2+B/2-Y/2-rt:-f.height/2-B/2-Y/2-rt})`),W.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-F/2:F/2-f.height})`),K.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),ue(e,z),e.intersect=function(W){if(Lt.info("iconSquare intersect",e,W),!e.label)return te.rect(e,W);const j=e.x??0,H=e.y??0,Y=e.height??0;let Z=[];return y?Z=[{x:j-f.width/2,y:H-Y/2},{x:j+f.width/2,y:H-Y/2},{x:j+f.width/2,y:H-Y/2+f.height+B},{x:j+C/2,y:H-Y/2+f.height+B},{x:j+C/2,y:H+Y/2},{x:j-C/2,y:H+Y/2},{x:j-C/2,y:H-Y/2+f.height+B},{x:j-f.width/2,y:H-Y/2+f.height+B}]:Z=[{x:j-C/2,y:H-Y/2},{x:j+C/2,y:H-Y/2},{x:j+C/2,y:H-Y/2+v},{x:j+f.width/2,y:H-Y/2+v},{x:j+f.width/2/2,y:H+Y/2},{x:j-f.width/2,y:H+Y/2},{x:j-f.width/2,y:H-Y/2+v},{x:j-C/2,y:H-Y/2+v}],te.polygon(e,Z,W)},d}L(rj,"iconRounded");async function nj(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=le(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,halfPadding:g,label:x}=await Ee(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:k}=r,{stylesMap:T}=Ah(e),N=-C/2,E=-v/2,B=e.label?8:0,O=se.svg(d),A=oe(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const I=O.path(Uo(N,E,C,v,.1),A),D=Math.max(C,f.width),F=v+f.height+B,U=O.rectangle(-D/2,-F/2,D,F,{...A,fill:"transparent",stroke:"none"}),K=d.insert(()=>I,":first-child"),z=d.insert(()=>U);if(e.icon){const W=d.append("g");W.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=W.node().getBBox(),H=j.width,Y=j.height,Z=j.x,rt=j.y;W.attr("transform",`translate(${-H/2-Z},${y?f.height/2+B/2-Y/2-rt:-f.height/2-B/2-Y/2-rt})`),W.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-F/2:F/2-f.height})`),K.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),ue(e,z),e.intersect=function(W){if(Lt.info("iconSquare intersect",e,W),!e.label)return te.rect(e,W);const j=e.x??0,H=e.y??0,Y=e.height??0;let Z=[];return y?Z=[{x:j-f.width/2,y:H-Y/2},{x:j+f.width/2,y:H-Y/2},{x:j+f.width/2,y:H-Y/2+f.height+B},{x:j+C/2,y:H-Y/2+f.height+B},{x:j+C/2,y:H+Y/2},{x:j-C/2,y:H+Y/2},{x:j-C/2,y:H-Y/2+f.height+B},{x:j-f.width/2,y:H-Y/2+f.height+B}]:Z=[{x:j-C/2,y:H-Y/2},{x:j+C/2,y:H-Y/2},{x:j+C/2,y:H-Y/2+v},{x:j+f.width/2,y:H-Y/2+v},{x:j+f.width/2/2,y:H+Y/2},{x:j-f.width/2,y:H+Y/2},{x:j-f.width/2,y:H-Y/2+v},{x:j-C/2,y:H-Y/2+v}],te.polygon(e,Z,W)},d}L(nj,"iconSquare");async function aj(i,e,{config:{flowchart:r}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const a=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:c}=le(e);e.labelStyle=c;const h=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const u=Math.max(e.label?h??0:0,(e==null?void 0:e.assetWidth)??a),d=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,f=e.constraint==="on"?d/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??o;e.width=Math.max(d,h??0);const{shapeSvg:g,bbox:x,label:y}=await Ee(i,e,"image-shape default"),v=e.pos==="t",C=-d/2,_=-f/2,k=e.label?8:0,T=se.svg(g),N=oe(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const E=T.rectangle(C,_,d,f,N),B=Math.max(d,x.width),O=f+x.height+k,A=T.rectangle(-B/2,-O/2,B,O,{...N,fill:"none",stroke:"none"}),M=g.insert(()=>E,":first-child"),I=g.insert(()=>A);if(e.img){const D=g.append("image");D.attr("href",e.img),D.attr("width",d),D.attr("height",f),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-d/2},${v?O/2-f:-O/2})`)}return y.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${v?-f/2-x.height/2-k/2:f/2-x.height/2+k/2})`),M.attr("transform",`translate(0,${v?x.height/2+k/2:-x.height/2-k/2})`),ue(e,I),e.intersect=function(D){if(Lt.info("iconSquare intersect",e,D),!e.label)return te.rect(e,D);const F=e.x??0,U=e.y??0,K=e.height??0;let z=[];return v?z=[{x:F-x.width/2,y:U-K/2},{x:F+x.width/2,y:U-K/2},{x:F+x.width/2,y:U-K/2+x.height+k},{x:F+d/2,y:U-K/2+x.height+k},{x:F+d/2,y:U+K/2},{x:F-d/2,y:U+K/2},{x:F-d/2,y:U-K/2+x.height+k},{x:F-x.width/2,y:U-K/2+x.height+k}]:z=[{x:F-d/2,y:U-K/2},{x:F+d/2,y:U-K/2},{x:F+d/2,y:U-K/2+f},{x:F+x.width/2,y:U-K/2+f},{x:F+x.width/2/2,y:U+K/2},{x:F-x.width/2,y:U+K/2},{x:F-x.width/2,y:U-K/2+f},{x:F-d/2,y:U-K/2+f}],te.polygon(e,z,D)},g}L(aj,"imageSquare");async function sj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=Math.max(u.width+(c??0)*2,(e==null?void 0:e.width)??0),f=Math.max(u.height+(o??0)*2,(e==null?void 0:e.height)??0),g=[{x:0,y:0},{x:d,y:0},{x:d+3*f/6,y:-f},{x:-3*f/6,y:-f}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=se.svg(h),C=oe(e,{}),_=ai(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),y&&x.attr("style",y)}else x=zs(h,d,f,g);return n&&x.attr("style",n),e.width=d,e.height=f,ue(e,x),e.intersect=function(v){return te.polygon(e,g,v)},h}L(sj,"inv_trapezoid");async function Jd(i,e,r){const{labelStyles:n,nodeStyles:a}=le(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await Ee(i,e,we(e)),h=Math.max(c.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(c.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),d=-h/2,f=-u/2;let g,{rx:x,ry:y}=e;const{cssStyles:v}=e;if(r!=null&&r.rx&&r.ry&&(x=r.rx,y=r.ry),e.look==="handDrawn"){const C=se.svg(o),_=oe(e,{}),k=x||y?C.path(Uo(d,f,h,u,x||0),_):C.rectangle(d,f,h,u,_);g=o.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Tr(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",Tr(x)).attr("ry",Tr(y)).attr("x",d).attr("y",f).attr("width",h).attr("height",u);return ue(e,g),e.calcIntersect=function(C,_){return te.rect(C,_)},e.intersect=function(C){return te.rect(e,C)},o}L(Jd,"drawRect");async function oj(i,e){const{shapeSvg:r,bbox:n,label:a}=await Ee(i,e,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ue(e,o),e.intersect=function(u){return te.rect(e,u)},r}L(oj,"labelRect");async function lj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=((e==null?void 0:e.height)??u.height)+o,f=((e==null?void 0:e.width)??u.width)+c,g=[{x:0,y:0},{x:f+3*d/6,y:0},{x:f,y:-d},{x:-(3*d)/6,y:-d}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=se.svg(h),C=oe(e,{}),_=ai(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),y&&x.attr("style",y)}else x=zs(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,ue(e,x),e.intersect=function(v){return te.polygon(e,g,v)},h}L(lj,"lean_left");async function cj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=((e==null?void 0:e.height)??u.height)+o,f=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*d/6,y:0},{x:f,y:0},{x:f+3*d/6,y:-d},{x:0,y:-d}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=se.svg(h),C=oe(e,{}),_=ai(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),y&&x.attr("style",y)}else x=zs(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,ue(e,x),e.intersect=function(v){return te.polygon(e,g,v)},h}L(cj,"lean_right");function hj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.label="",e.labelStyle=r;const a=i.insert("g").attr("class",we(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=Math.max(35,(e==null?void 0:e.width)??0),h=Math.max(35,(e==null?void 0:e.height)??0),u=7,d=[{x:c,y:0},{x:0,y:h+u/2},{x:c-2*u,y:h+u/2},{x:0,y:2*h},{x:c,y:h-u/2},{x:2*u,y:h-u/2}],f=se.svg(a),g=oe(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ai(d),y=f.path(x,g),v=a.insert(()=>y,":first-child");return v.attr("class","outer-path"),o&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(-${c/2},${-h})`),ue(e,v),e.intersect=function(C){return Lt.info("lightningBolt intersect",e,C),te.polygon(e,d,C)},a}L(hj,"lightningBolt");var sQ=L((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oQ=L((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lQ=L((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),JE=10,tN=10;async function uj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?24:a;if(e.width||e.height){const k=e.width??0;e.width=(e.width??0)-o,e.width<tN&&(e.width=tN);const N=k/2/(2.5+k/50);e.height=(e.height??0)-c-N*3,e.height<JE&&(e.height=JE)}const{shapeSvg:h,bbox:u,label:d}=await Ee(i,e,we(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=f/2,x=g/(2.5+f/50),y=(e!=null&&e.height?e==null?void 0:e.height:u.height)+x+c*2,v=y*.1;let C;const{cssStyles:_}=e;if(e.look==="handDrawn"){const k=se.svg(h),T=oQ(0,0,f,y,g,x,v),N=lQ(0,x,f,y,g,x),E=oe(e,{}),B=k.path(T,E),O=k.path(N,E);h.insert(()=>O,":first-child").attr("class","line"),C=h.insert(()=>B,":first-child"),C.attr("class","basic label-container"),_&&C.attr("style",_)}else{const k=sQ(0,0,f,y,g,x,v);C=h.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",Tr(_)).attr("style",n)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),ue(e,C),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),e.intersect=function(k){const T=te.rect(e,k),N=T.x-(e.x??0);if(g!=0&&(Math.abs(N)<(e.width??0)/2||Math.abs(N)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-x)){let E=x*x*(1-N*N/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,k.y-(e.y??0)>0&&(E=-E),T.y+=E}return T},h}L(uj,"linedCylinder");async function dj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;if(e.width||e.height){const E=e.width;e.width=(E??0)*10/11-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:d}=await Ee(i,e,we(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+(o??0)*2,g=(e!=null&&e.height?e==null?void 0:e.height:u.height)+(c??0)*2,x=e.look==="neo"?g/4:g/8,y=g+x,{cssStyles:v}=e,C=se.svg(h),_=oe(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:-f/2-f/2*.1,y:-y/2},{x:-f/2-f/2*.1,y:y/2},...zo(-f/2-f/2*.1,y/2,f/2+f/2*.1,y/2,x,.8),{x:f/2+f/2*.1,y:-y/2},{x:-f/2-f/2*.1,y:-y/2},{x:-f/2,y:-y/2},{x:-f/2,y:y/2*1.1},{x:-f/2,y:-y/2}],T=C.polygon(k.map(E=>[E.x,E.y]),_),N=h.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(0,${-x/2})`),d.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*.1/2-(u.x-(u.left??0))},${-g/2+(e.padding??0)-x/2-(u.y-(u.top??0))})`),ue(e,N),e.intersect=function(E){return te.polygon(e,k,E)},h}L(dj,"linedWaveEdgedRect");async function fj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=e.look==="neo"?10:5;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-2*h,10),e.height=Math.max(((e==null?void 0:e.height)??0)-c*2-2*h,10));const{shapeSvg:u,bbox:d,label:f}=await Ee(i,e,we(e)),g=(e!=null&&e.width?e==null?void 0:e.width:d.width)+o*2+2*h,x=(e!=null&&e.height?e==null?void 0:e.height:d.height)+c*2+2*h,y=g-2*h,v=x-2*h,C=-y/2,_=-v/2,{cssStyles:k}=e,T=se.svg(u),N=oe(e,{}),E=[{x:C-h,y:_+h},{x:C-h,y:_+v+h},{x:C+y-h,y:_+v+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_+v-h},{x:C+y+h,y:_+v-h},{x:C+y+h,y:_-h},{x:C+h,y:_-h},{x:C+h,y:_},{x:C,y:_},{x:C,y:_+h}],B=[{x:C,y:_+h},{x:C+y-h,y:_+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_},{x:C,y:_}];e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const O=ai(E);let A=T.path(O,N);const M=ai(B);let I=T.path(M,N);e.look!=="handDrawn"&&(A=o1(A),I=o1(I));const D=u.insert("g",":first-child");return D.insert(()=>A),D.insert(()=>I),D.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",k),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),f.attr("transform",`translate(${-(d.width/2)-h-(d.x-(d.left??0))}, ${-(d.height/2)+h-(d.y-(d.top??0))})`),ue(e,D),e.intersect=function(F){return te.polygon(e,E,F)},u}L(fj,"multiRect");async function pj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Ee(i,e,we(e)),h=e.padding??0,u=e.look==="neo"?16:h,d=e.look==="neo"?12:h;let f=!0;(e.width||e.height)&&(f=!1,e.width=((e==null?void 0:e.width)??0)-u*2,e.height=((e==null?void 0:e.height)??0)-d*3);const g=Math.max(o.width,(e==null?void 0:e.width)??0)+u*2,x=Math.max(o.height,(e==null?void 0:e.height)??0)+d*3,y=e.look==="neo"?x/4:x/8,v=x+(f?y/2:-y/2),C=-g/2,_=-v/2,k=10,{cssStyles:T}=e,N=zo(C-k,_+v+k,C+g-k,_+v+k,y,.8),E=N==null?void 0:N[N.length-1],B=[{x:C-k,y:_+k},{x:C-k,y:_+v+k},...N,{x:C+g-k,y:E.y-k},{x:C+g,y:E.y-k},{x:C+g,y:E.y-2*k},{x:C+g+k,y:E.y-2*k},{x:C+g+k,y:_-k},{x:C+k,y:_-k},{x:C+k,y:_},{x:C,y:_},{x:C,y:_+k}],O=[{x:C,y:_+k},{x:C+g-k,y:_+k},{x:C+g-k,y:E.y-k},{x:C+g,y:E.y-k},{x:C+g,y:_},{x:C,y:_}],A=se.svg(a),M=oe(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const I=ai(B),D=A.path(I,M),F=ai(O),U=A.path(F,M),K=a.insert(()=>D,":first-child");return K.insert(()=>U),K.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&K.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&K.selectAll("path").attr("style",n),K.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(o.width/2)-k-(o.x-(o.left??0))}, ${-(o.height/2)+k-y/2-(o.y-(o.top??0))})`),ue(e,K),e.intersect=function(z){return te.polygon(e,B,z)},a}L(pj,"multiWaveEdgedRectangle");async function gj(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=le(e);e.labelStyle=n,e.useHtmlLabels||an(Vi())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await Ee(i,e,we(e)),d=Math.max(h.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),f=Math.max(h.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),g=-d/2,x=-f/2,{cssStyles:y}=e,v=se.svg(c),C=oe(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=v.rectangle(g,x,d,f,C),k=c.insert(()=>_,":first-child");return k.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),y&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",y),a&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",a),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ue(e,k),e.intersect=function(T){return te.rect(e,T)},c}L(gj,"note");var cQ=L((i,e,r)=>[`M${i+r/2},${e}`,`L${i+r},${e-r/2}`,`L${i+r/2},${e-r}`,`L${i},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function mj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await Ee(i,e,we(e)),c=o.width+(e.padding??0),h=o.height+(e.padding??0),u=c+h,d=.5,f=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const y=se.svg(a),v=oe(e,{}),C=cQ(0,0,u),_=y.path(C,v);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),x&&g.attr("style",x)}else g=zs(a,u,u,f),g.attr("transform",`translate(${-u/2+d}, ${u/2})`);return n&&g.attr("style",n),ue(e,g),e.calcIntersect=function(y,v){const C=y.width,_=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],k=te.polygon(y,_,v);return{x:k.x-.5,y:k.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}L(mj,"question");async function yj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?21:a??0,c=e.look==="neo"?12:a??0,{shapeSvg:h,bbox:u,label:d}=await Ee(i,e,we(e)),f=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o),g=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),x=-f/2,y=-g/2,v=y/2,C=[{x:x+v,y},{x,y:0},{x:x+v,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:_}=e,k=se.svg(h),T=oe(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const N=ai(C),E=k.path(N,T),B=h.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${-v/2},0)`),d.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),ue(e,B),e.intersect=function(O){return te.polygon(e,C,O)},h}L(yj,"rect_left_inv_arrow");async function bj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const o=i.insert("g").attr("class",a).attr("id",e.domId||e.id),c=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",n),u=e.description,d=e.label,f=await Mo(h,d,e.labelStyle,!0,!0);let g={width:0,height:0};if(an(di())){const M=f.children[0],I=ke(f);g=M.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}Lt.info("Text 2",u);const x=u||[],y=f.getBBox(),v=await Mo(h,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),C=v.children[0],_=ke(v);g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height);const k=(e.padding||0)/2;ke(v).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+k+5)+")"),ke(f).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-k+3)+")");const T=g.width+(e.padding||0),N=g.height+(e.padding||0),E=-g.width/2-k,B=-g.height/2-k;let O,A;if(e.look==="handDrawn"){const M=se.svg(o),I=oe(e,{}),D=M.path(Uo(E,B,T,N,e.rx||0),I),F=M.line(-g.width/2-k,-g.height/2-k+y.height+k,g.width/2+k,-g.height/2-k+y.height+k,I);A=o.insert(()=>(Lt.debug("Rough node insert CXC",D),F),":first-child"),O=o.insert(()=>(Lt.debug("Rough node insert CXC",D),D),":first-child")}else O=c.insert("rect",":first-child"),A=c.insert("line"),O.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-k).attr("y",-g.height/2-k).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),A.attr("class","divider").attr("x1",-g.width/2-k).attr("x2",g.width/2+k).attr("y1",-g.height/2-k+y.height+k).attr("y2",-g.height/2-k+y.height+k);return ue(e,O),e.intersect=function(M){return te.rect(e,M)},o}L(bj,"rectWithTitle");async function xj(i,e,{config:{themeVariables:r}}){const n=(r==null?void 0:r.radius)??5,a={rx:n,ry:n,labelPaddingX:((e==null?void 0:e.padding)??0)*1,labelPaddingY:((e==null?void 0:e.padding)??0)*1};return Jd(i,e,a)}L(xj,"roundedRect");var hl=8;async function vj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Ee(i,e,we(e)),d=((e==null?void 0:e.width)??h.width)+a*2+(e.look==="neo"?hl:hl*2),f=((e==null?void 0:e.height)??h.height)+o*2,g=d-hl,x=f,y=hl-d/2,v=-f/2,{cssStyles:C}=e,_=se.svg(c),k=oe(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x:y,y:v},{x:y+g,y:v},{x:y+g,y:v+x},{x:y-hl,y:v+x},{x:y-hl,y:v},{x:y,y:v},{x:y,y:v+x}],N=_.polygon(T.map(B=>[B.x,B.y]),k),E=c.insert(()=>N,":first-child");return E.attr("class","basic label-container outer-path").attr("style",Tr(C)),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),C&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${hl/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ue(e,E),e.intersect=function(B){return te.rect(e,B)},c}L(vj,"shadedProcess");async function Cj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2,10),e.height=Math.max(((e==null?void 0:e.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:u,label:d}=await Ee(i,e,we(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=((e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2)*1.5,x=f,y=g/1.5,v=-x/2,C=-y/2,{cssStyles:_}=e,k=se.svg(h),T=oe(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const N=[{x:v,y:C},{x:v,y:C+y},{x:v+x,y:C+y},{x:v+x,y:C-y/2}],E=ai(N),B=k.path(E,T),O=h.insert(()=>B,":first-child");return O.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",_),n&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",n),O.attr("transform",`translate(0, ${y/4})`),d.attr("transform",`translate(${-x/2+(e.padding??0)-(u.x-(u.left??0))}, ${-y/4+(e.padding??0)-(u.y-(u.top??0))})`),ue(e,O),e.intersect=function(A){return te.polygon(e,N,A)},h}L(Cj,"slopedRect");async function _j(i,e){const r=e.padding??0,n=e.look==="neo"?16:r*2,a=e.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:e.labelPaddingX??n,labelPaddingY:a};return Jd(i,e,o)}L(_j,"squareRect");async function kj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?20:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=u.height+(e.look==="neo"?c*2:c),f=u.width+d/4+(e.look==="neo"?o*2:o),g=d/2,{cssStyles:x}=e,y=se.svg(h),v=oe(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-f/2+g,y:-d/2},{x:f/2-g,y:-d/2},...Bd(-f/2+g,0,g,50,90,270),{x:f/2-g,y:d/2},...Bd(f/2-g,0,g,50,270,450)],_=ai(C),k=y.path(_,v),T=h.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",x),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),ue(e,T),e.intersect=function(N){return te.polygon(e,C,N)},h}L(kj,"stadium");async function wj(i,e){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Jd(i,e,r)}L(wj,"state");function Sj(i,e,{config:{themeVariables:r}}){var T,N;const{labelStyles:n,nodeStyles:a}=le(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:d}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const f=i.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=se.svg(f),x=oe(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),v=h??u,C=(e.width??0)*5/14,_=g.circle(0,0,C,{...x,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),k=f.insert(()=>y,":first-child");if(k.insert(()=>_),e.look!=="handDrawn"&&k.attr("class","outer-path"),o&&k.selectAll("path").attr("style",o),a&&k.selectAll("path").attr("style",a),e.width<25&&d&&e.look!=="handDrawn"){const E=((N=(T=i.node())==null?void 0:T.ownerSVGElement)==null?void 0:N.id)??"",B=E?`${E}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${B})`)}return ue(e,k),e.intersect=function(E){return te.circle(e,(e.width??0)/2,E)},f}L(Sj,"stateEnd");function Tj(i,e,{config:{themeVariables:r}}){var h,u;const{lineColor:n,nodeShadow:a}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const o=i.insert("g").attr("class","node default").attr("id",e.domId||e.id);let c;if(e.look==="handDrawn"){const f=se.svg(o).circle(0,0,e.width,bX(n));c=o.insert(()=>f),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=o.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&a&&e.look!=="handDrawn"){const d=((u=(h=i.node())==null?void 0:h.ownerSVGElement)==null?void 0:u.id)??"",f=d?`${d}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${f})`)}return ue(e,c),e.intersect=function(d){return te.circle(e,(e.width??7)/2,d)},o}L(Tj,"stateStart");var Oc=8;async function Ej(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=(e==null?void 0:e.padding)??8,o=e.look==="neo"?28:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=((e==null?void 0:e.width)??u.width)+2*Oc+o,f=((e==null?void 0:e.height)??u.height)+c,g=d-2*Oc,x=f,y=-d/2,v=-f/2,C=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){const _=se.svg(h),k=oe(e,{}),T=_.rectangle(y,v,g+16,x,k),N=_.line(y+Oc,v,y+Oc,v+x,k),E=_.line(y+Oc+g,v,y+Oc+g,v+x,k);h.insert(()=>N,":first-child"),h.insert(()=>E,":first-child");const B=h.insert(()=>T,":first-child"),{cssStyles:O}=e;B.attr("class","basic label-container").attr("style",Tr(O)),ue(e,B)}else{const _=zs(h,g,x,C);n&&_.attr("style",n),ue(e,_)}return e.intersect=function(_){return te.polygon(e,C,_)},h}L(Ej,"subroutine");var w0=.2;async function Nj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.height=Math.max(((e==null?void 0:e.height)??0)-c*2,10),e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-w0*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,f=w0*d,g=w0*d,y=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2+f-f,v=d,C=-y/2,_=-v/2,{cssStyles:k}=e,T=se.svg(h),N=oe(e,{}),E=[{x:C-f/2,y:_},{x:C+y+f/2,y:_},{x:C+y+f/2,y:_+v},{x:C-f/2,y:_+v}],B=[{x:C+y-f/2,y:_+v},{x:C+y+f/2,y:_+v},{x:C+y+f/2,y:_+v-g}];e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const O=ai(E),A=T.path(O,N),M=ai(B),I=T.path(M,{...N,fillStyle:"solid"}),D=h.insert(()=>I,":first-child");return D.insert(()=>A,":first-child"),D.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",k),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),ue(e,D),e.intersect=function(F){return te.polygon(e,E,F)},h}L(Nj,"taggedRect");async function Aj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Ee(i,e,we(e)),h=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),d=u/8,f=.2*h,g=.2*u,x=u+d,{cssStyles:y}=e,v=se.svg(a),C=oe(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-h/2-h/2*.1,y:x/2},...zo(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,d,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],k=-h/2+h/2*.1,T=-x/2-g*.4,N=[{x:k+h-f,y:(T+u)*1.3},{x:k+h,y:T+u-g},{x:k+h,y:(T+u)*.9},...zo(k+h,(T+u)*1.25,k+h-f,(T+u)*1.3,-u*.02,.5)],E=ai(_),B=v.path(E,C),O=ai(N),A=v.path(O,{...C,fillStyle:"solid"}),M=a.insert(()=>A,":first-child");return M.insert(()=>B,":first-child"),M.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),ue(e,M),e.intersect=function(I){return te.polygon(e,_,I)},a}L(Aj,"taggedWaveEdgedRectangle");async function Mj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await Ee(i,e,we(e)),c=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)||0),h=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)||0),u=-c/2,d=-h/2,f=a.insert("rect",":first-child");return f.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",d).attr("width",c).attr("height",h),ue(e,f),e.intersect=function(g){return te.rect(e,g)},a}L(Mj,"text");var hQ=L((i,e,r,n,a,o)=>`M${i},${e}
|
|
379
|
-
a${a},${o} 0,0,1 0,${-n}
|
|
380
|
-
l${r},0
|
|
381
|
-
a${a},${o} 0,0,1 0,${n}
|
|
382
|
-
M${r},${-n}
|
|
383
|
-
a${a},${o} 0,0,0 0,${n}
|
|
384
|
-
l${-r},0`,"createCylinderPathD"),uQ=L((i,e,r,n,a,o)=>[`M${i},${e}`,`M${i+r},${e}`,`a${a},${o} 0,0,0 0,${-n}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),dQ=L((i,e,r,n,a,o)=>[`M${i+r/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),eN=5,iN=10;async function Bj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?12:a/2;if(e.width||e.height){const C=e.height??0;e.height=(e.height??0)-o,e.height<eN&&(e.height=eN);const k=C/2/(2.5+C/50);e.width=(e.width??0)-o-k*3,e.width<iN&&(e.width=iN)}const{shapeSvg:c,bbox:h,label:u}=await Ee(i,e,we(e)),d=(e.height?e.height:h.height)+o,f=d/2,g=f/(2.5+d/50),x=(e.width?e.width:h.width)+g+o,{cssStyles:y}=e;let v;if(e.look==="handDrawn"){const C=se.svg(c),_=uQ(0,0,x,d,g,f),k=dQ(0,0,x,d,g,f),T=C.path(_,oe(e,{})),N=C.path(k,oe(e,{fill:"none"}));v=c.insert(()=>N,":first-child"),v=c.insert(()=>T,":first-child"),v.attr("class","basic label-container"),y&&v.attr("style",y)}else{const C=hQ(0,0,x,d,g,f);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Tr(y)).attr("style",n),v.attr("class","basic label-container outer-path"),y&&v.selectAll("path").attr("style",y),n&&v.selectAll("path").attr("style",n)}return v.attr("label-offset-x",g),v.attr("transform",`translate(${-x/2}, ${d/2} )`),u.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ue(e,v),e.intersect=function(C){const _=te.rect(e,C),k=_.y-(e.y??0);if(f!=0&&(Math.abs(k)<(e.height??0)/2||Math.abs(k)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-g)){let T=g*g*(1-k*k/(f*f));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,C.x-(e.x??0)>0&&(T=-T),_.x+=T}return _},c}L(Bj,"tiltedCylinder");async function Lj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=(e.look==="neo",a),c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=((e==null?void 0:e.height)??u.height)+o,f=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*d/6,y:0},{x:f+3*d/6,y:0},{x:f,y:-d},{x:0,y:-d}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=se.svg(h),C=oe(e,{}),_=ai(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),y&&x.attr("style",y)}else x=zs(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,ue(e,x),e.intersect=function(v){return te.polygon(e,g,v)},h}L(Lj,"trapezoid");async function Oj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=15,u=5;(e.width||e.height)&&(e.height=(e.height??0)-c*2,e.height<u&&(e.height=u),e.width=(e.width??0)-o*2,e.width<h&&(e.width=h));const{shapeSvg:d,bbox:f}=await Ee(i,e,we(e)),g=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2,x=(e!=null&&e.height?e==null?void 0:e.height:f.height)+c*2,{cssStyles:y}=e,v=se.svg(d),C=oe(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-g/2*.8,y:-x/2},{x:g/2*.8,y:-x/2},{x:g/2,y:-x/2*.6},{x:g/2,y:x/2},{x:-g/2,y:x/2},{x:-g/2,y:-x/2*.6}],k=ai(_),T=v.path(k,C),N=d.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",n),ue(e,N),e.intersect=function(E){return te.polygon(e,_,E)},d}L(Oj,"trapezoidalPentagon");var rN=10,nN=10;async function Rj(i,e){var E;const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.width=(((e==null?void 0:e.width)??0)-o)/2,e.width<nN&&(e.width=nN),e.height=(e==null?void 0:e.height)??0,e.height<rN&&(e.height=rN));const{shapeSvg:c,bbox:h,label:u}=await Ee(i,e,we(e)),d=Is((E=di().flowchart)==null?void 0:E.htmlLabels),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+o,g=e!=null&&e.height?e==null?void 0:e.height:f+h.height,x=g,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:v}=e,C=se.svg(c),_=oe(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=ai(y),T=C.path(k,_),N=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",n),e.width=f,e.height=g,ue(e,N),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(e.padding??0)/(d?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(B){return Lt.info("Triangle intersect",e,y,B),te.polygon(e,y,B)},c}L(Rj,"triangle");async function jj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;let h=!0;(e.width||e.height)&&(h=!1,e.width=((e==null?void 0:e.width)??0)-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10));const{shapeSvg:u,bbox:d,label:f}=await Ee(i,e,we(e)),g=(e!=null&&e.width?e==null?void 0:e.width:d.width)+(o??0)*2,x=(e!=null&&e.height?e==null?void 0:e.height:d.height)+(c??0)*2,y=e.look==="neo"?x/4:x/8,v=x+(h?y:-y),{cssStyles:C}=e,k=14-g,T=k>0?k/2:0,N=se.svg(u),E=oe(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=[{x:-g/2-T,y:v/2},...zo(-g/2-T,v/2,g/2+T,v/2,y,.8),{x:g/2+T,y:-v/2},{x:-g/2-T,y:-v/2}],O=ai(B),A=N.path(O,E),M=u.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(0,${-y/2})`),f.attr("transform",`translate(${-g/2+(e.padding??0)-(d.x-(d.left??0))},${-x/2+(e.padding??0)-y-(d.y-(d.top??0))})`),ue(e,M),e.intersect=function(I){return te.polygon(e,B,I)},u}L(jj,"waveEdgedRectangle");async function Dj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?20:a;if(e.width||e.height){e.width=(e==null?void 0:e.width)??0,e.width<20&&(e.width=20),e.height=(e==null?void 0:e.height)??0,e.height<10&&(e.height=10);const E=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-E*(20/9)),e.width=e.width-o*2}const{shapeSvg:h,bbox:u}=await Ee(i,e,we(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,f=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c,g=f/8,x=f+g*2,{cssStyles:y}=e,v=se.svg(h),C=oe(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-d/2,y:x/2},...zo(-d/2,x/2,d/2,x/2,g,1),{x:d/2,y:-x/2},...zo(d/2,-x/2,-d/2,-x/2,g,-1)],k=ai(_),T=v.path(k,C),N=h.insert(()=>T,":first-child");return N.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),ue(e,N),e.intersect=function(E){return te.polygon(e,_,E)},h}L(Dj,"waveRectangle");var er=10;async function Fj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-a*2-er,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-er,10));const{shapeSvg:c,bbox:h,label:u}=await Ee(i,e,we(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+er,f=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+er,g=d-er,x=f-er,y=-g/2,v=-x/2,{cssStyles:C}=e,_=se.svg(c),k=oe(e,{}),T=[{x:y-er,y:v-er},{x:y-er,y:v+x},{x:y+g,y:v+x},{x:y+g,y:v-er}],N=`M${y-er},${v-er} L${y+g},${v-er} L${y+g},${v+x} L${y-er},${v+x} L${y-er},${v-er}
|
|
385
|
-
M${y-er},${v} L${y+g},${v}
|
|
386
|
-
M${y},${v-er} L${y},${v+x}`;e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=_.path(N,k),B=c.insert(()=>E,":first-child");return B.attr("transform",`translate(${er/2}, ${er/2})`),B.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+er/2-(h.x-(h.left??0))}, ${-(h.height/2)+er/2-(h.y-(h.top??0))})`),ue(e,B),e.intersect=function(O){return te.polygon(e,T,O)},c}L(Fj,"windowPane");var aN=new Set(["redux-color","redux-dark-color"]),fQ=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function i_(i,e){var ot,wt,it,V;const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:a}=Vi(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:at}=Vi(),{background:Ct}=at,Bt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await i_(i,Bt)}const d=Vi();e.useHtmlLabels=d.htmlLabels;let f=((ot=d.er)==null?void 0:ot.diagramPadding)??10,g=((wt=d.er)==null?void 0:wt.entityPadding)??6;const{cssStyles:x}=e,{labelStyles:y,nodeStyles:v}=le(e);if(r.attributes.length===0&&e.label){const at={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5};Ds(e.label,d)+at.labelPaddingX*2<d.er.minEntityWidth&&(e.width=d.er.minEntityWidth);const Ct=await Jd(i,e,at);if(n!=null&&aN.has(n)){const Bt=r.colorIndex??0;Ct.attr("data-color-id",`color-${Bt%u.length}`)}if(!Is(d.htmlLabels)){const Bt=Ct.select("text"),Ht=(it=Bt.node())==null?void 0:it.getBBox();Bt.attr("transform",`translate(${-Ht.width/2}, 0)`)}return Ct}d.htmlLabels||(f*=1.25,g*=1.25);let C=we(e);C||(C="node default");const _=i.insert("g").attr("class",C).attr("id",e.domId||e.id),k=await Fc(_,e.label??"",d,0,0,["name"],y);k.height+=g;let T=0;const N=[],E=[];let B=0,O=0,A=0,M=0,I=!0,D=!0;for(const at of r.attributes){const Ct=await Fc(_,at.type,d,0,T,["attribute-type"],y);B=Math.max(B,Ct.width+f);const Bt=await Fc(_,at.name,d,0,T,["attribute-name"],y);O=Math.max(O,Bt.width+f);const Ht=await Fc(_,at.keys.join(),d,0,T,["attribute-keys"],y);A=Math.max(A,Ht.width+f);const re=await Fc(_,at.comment,d,0,T,["attribute-comment"],y);M=Math.max(M,re.width+f);const Dt=Math.max(Ct.height,Bt.height,Ht.height,re.height)+g;E.push({yOffset:T,rowHeight:Dt}),T+=Dt}let F=4;A<=f&&(I=!1,A=0,F--),M<=f&&(D=!1,M=0,F--);const U=_.node().getBBox();if(k.width+f*2-(B+O+A+M)>0){const at=k.width+f*2-(B+O+A+M);B+=at/F,O+=at/F,A>0&&(A+=at/F),M>0&&(M+=at/F)}const K=B+O+A+M,z=se.svg(_),W=oe(e,{});e.look!=="handDrawn"&&(W.roughness=0,W.fillStyle="solid");let j=0;E.length>0&&(j=E.reduce((at,Ct)=>at+((Ct==null?void 0:Ct.rowHeight)??0),0));const H=Math.max(U.width+f*2,(e==null?void 0:e.width)||0,K),Y=Math.max((j??0)+k.height,(e==null?void 0:e.height)||0),Z=-H/2,rt=-Y/2;if(_.selectAll("g:not(:first-child)").each((at,Ct,Bt)=>{const Ht=ke(Bt[Ct]),re=Ht.attr("transform");let Dt=0,xt=0;if(re){const Yt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(re);Yt&&(Dt=parseFloat(Yt[1]),xt=parseFloat(Yt[2]),Ht.attr("class").includes("attribute-name")?Dt+=B:Ht.attr("class").includes("attribute-keys")?Dt+=B+O:Ht.attr("class").includes("attribute-comment")&&(Dt+=B+O+A))}Ht.attr("transform",`translate(${Z+f/2+Dt}, ${xt+rt+k.height+g/2})`)}),_.select(".name").attr("transform","translate("+-k.width/2+", "+(rt+g/2)+")"),n!=null&&aN.has(n)){const at=r.colorIndex??0;_.attr("data-color-id",`color-${at%u.length}`)}const G=z.rectangle(Z,rt,H,Y,W),tt=_.insert(()=>G,":first-child").attr("class","outer-path").attr("style",x.join(""));N.push(0);for(const[at,Ct]of E.entries()){const Ht=(at+1)%2===0&&Ct.yOffset!==0,re=z.rectangle(Z,k.height+rt+(Ct==null?void 0:Ct.yOffset),H,Ct==null?void 0:Ct.rowHeight,{...W,fill:Ht?o:c,stroke:h});_.insert(()=>re,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Ht?"even":"odd"}`)}const ft=1e-4;let ct=Ic(Z,k.height+rt,H+Z,k.height+rt,ft),vt=z.polygon(ct.map(at=>[at.x,at.y]),W);if(_.insert(()=>vt).attr("class","divider"),ct=Ic(B+Z,k.height+rt,B+Z,Y+rt,ft),vt=z.polygon(ct.map(at=>[at.x,at.y]),W),_.insert(()=>vt).attr("class","divider"),I){const at=B+O+Z;ct=Ic(at,k.height+rt,at,Y+rt,ft),vt=z.polygon(ct.map(Ct=>[Ct.x,Ct.y]),W),_.insert(()=>vt).attr("class","divider")}if(D){const at=B+O+A+Z;ct=Ic(at,k.height+rt,at,Y+rt,ft),vt=z.polygon(ct.map(Ct=>[Ct.x,Ct.y]),W),_.insert(()=>vt).attr("class","divider")}for(const at of N){const Ct=k.height+rt+at;ct=Ic(Z,Ct,H+Z,Ct,ft),vt=z.polygon(ct.map(Bt=>[Bt.x,Bt.y]),W),_.insert(()=>vt).attr("class","divider")}if(ue(e,tt),v&&e.look!=="handDrawn")if(n!=null&&fQ.has(n))_.selectAll("path").attr("style",v);else{const at=v.split(";"),Ct=(V=at==null?void 0:at.filter(Bt=>Bt.includes("stroke")))==null?void 0:V.map(Bt=>`${Bt}`).join("; ");_.selectAll("path").attr("style",Ct??""),_.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(at){return te.rect(e,at)},_}L(i_,"erBox");async function Fc(i,e,r,n=0,a=0,o=[],c=""){const h=i.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",c);e!==pE(e)&&(e=pE(e),e=e.replaceAll("<","<").replaceAll(">",">"));const u=h.node().appendChild(await $s(h,e,{width:Ds(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let f=u.children[0];for(f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">")}let d=u.getBBox();if(Is(r.htmlLabels)){const f=u.children[0];f.style.textAlign="start";const g=ke(u);d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}L(Fc,"addText");function Ic(i,e,r,n,a){return i===r?[{x:i-a/2,y:e},{x:i+a/2,y:e},{x:r+a/2,y:n},{x:r-a/2,y:n}]:[{x:i,y:e-a/2},{x:i,y:e+a/2},{x:r,y:n+a/2},{x:r,y:n-a/2}]}L(Ic,"lineToPolygon");async function Ij(i,e,r,n,a=r.class.padding??12){const o=n?0:3,c=i.insert("g").attr("class",we(e)).attr("id",e.domId||e.id);let h=null,u=null,d=null,f=null,g=0,x=0,y=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const T=e.annotations[0];await id(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await id(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();x=v.height,d=c.insert("g").attr("class","members-group text");let C=0;for(const T of e.members){const N=await id(d,T,C,[T.parseClassifier()]);C+=N+o}y=d.node().getBBox().height,y<=0&&(y=a/2),f=c.insert("g").attr("class","methods-group text");let _=0;for(const T of e.methods){const N=await id(f,T,_,[T.parseClassifier()]);_+=N+o}let k=c.node().getBBox();if(h!==null){const T=h.node().getBBox();h.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),k=c.node().getBBox(),d.attr("transform",`translate(0, ${g+x+a*2})`),k=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+(y?y+a*4:a*2)})`),k=c.node().getBBox(),{shapeSvg:c,bbox:k}}L(Ij,"textHelper");async function id(i,e,r,n=[]){const a=i.insert("g").attr("class","label").attr("style",n.join("; ")),o=Vi();let c="useHtmlLabels"in e?e.useHtmlLabels:Is(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),Td(h)&&(c=!0);const u=await $s(a,_C(Pl(h)),{width:Ds(h,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let d,f=1;if(c){const g=u.children[0],x=ke(u);f=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(f+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const v=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(C=>new Promise(_=>{function k(){var T;if(C.style.display="flex",C.style.flexDirection="column",v){const N=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,B=parseInt(N,10)*5+"px";C.style.minWidth=B,C.style.maxWidth=B}else C.style.width="100%";_(C)}L(k,"setupImage"),setTimeout(()=>{C.complete&&k()}),C.addEventListener("error",k),C.addEventListener("load",k)})))}d=g.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}else{n.includes("font-weight: bolder")&&ke(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;const g=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(g.textContent=h[0]+h.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),d=u.getBBox()}return a.attr("transform","translate(0,"+(-d.height/(2*f)+r)+")"),d.height}L(id,"addText");async function $j(i,e){var z,W;const r=di(),{themeVariables:n}=r,{useGradient:a}=n,o=r.class.padding??12,c=o,h=e.useHtmlLabels??Is(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:d,bbox:f}=await Ij(i,e,r,h,c),{labelStyles:g,nodeStyles:x}=le(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=((z=u.styles)==null?void 0:z.join(";"))||x||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((W=r.class)!=null&&W.hideEmptyMembersBox),C=se.svg(d),_=oe(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=Math.max(e.width??0,f.width);let T=Math.max(e.height??0,f.height);const N=(e.height??0)>f.height;u.members.length===0&&u.methods.length===0?T+=c:u.members.length>0&&u.methods.length===0&&(T+=c*2);const E=-k/2,B=-T/2;let O=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;N&&(O=o*2);const A=C.rectangle(E-o,B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0),k+2*o,T+2*o+O,_),M=d.insert(()=>A,":first-child");M.attr("class","basic label-container outer-path");const I=M.node().getBBox(),D=d.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,F=d.select(".label-group").node().getBBox().height-(v?o/2:0)||0,U=d.select(".members-group").node().getBBox().height-(v?o/2:0)||0,K=(D+F+B+o-(B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each((j,H,Y)=>{var ct,vt;const Z=ke(Y[H]),rt=Z.attr("transform");let G=0;if(rt){const wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(rt);wt&&(G=parseFloat(wt[2]))}let tt=G+B+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(Z.attr("class").includes("methods-group")){const ot=Math.max(U,c/2);N?tt=Math.max(K,D+F+ot+B+c*2+o)+c*2:tt=D+F+ot+B+c*4+o}u.members.length===0&&u.methods.length===0&&((ct=r.class)!=null&&ct.hideEmptyMembersBox)&&(u.annotations.length>0?tt=G-c:tt=G),h||(tt-=4);let ft=E;(Z.attr("class").includes("label-group")||Z.attr("class").includes("annotation-group"))&&(ft=-((vt=Z.node())==null?void 0:vt.getBBox().width)/2||0,d.selectAll("text").each(function(ot,wt,it){window.getComputedStyle(it[wt]).textAnchor==="middle"&&(ft=0)})),Z.attr("transform",`translate(${ft}, ${tt})`)}),u.members.length>0||u.methods.length>0||v){const j=D+F+B+o,H=C.line(I.x,j,I.x+I.width,j+.001,_);d.insert(()=>H).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(v||u.members.length>0||u.methods.length>0){const j=D+F+U+B+c*2+o,H=C.line(I.x,N?Math.max(K,j):j,I.x+I.width,(N?Math.max(K,j):j)+.001,_);d.insert(()=>H).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(u.look!=="handDrawn"&&d.selectAll("path").attr("style",y),M.select(":nth-child(2)").attr("style",y),d.selectAll(".divider").select("path").attr("style",y),e.labelStyle?d.selectAll("span").attr("style",e.labelStyle):d.selectAll("span").attr("style",y),!h){const j=RegExp(/color\s*:\s*([^;]*)/),H=j.exec(y);if(H){const Y=H[0].replace("color","fill");d.selectAll("tspan").attr("style",Y)}else if(g){const Y=j.exec(g);if(Y){const Z=Y[0].replace("color","fill");d.selectAll("tspan").attr("style",Z)}}}return ue(e,M),e.intersect=function(j){return te.rect(e,j)},d}L($j,"classBox");async function zj(i,e){var I,D;const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,d=we(e),{themeVariables:f}=di(),{borderColorArray:g,requirementEdgeLabelBackground:x}=f,y=i.insert("g").attr("class",d).attr("id",e.domId??e.id);let v;u?v=await Da(y,`<<${a.type}>>`,0,e.labelStyle):v=await Da(y,"<<Element>>",0,e.labelStyle);let C=v;const _=await Da(y,a.name,C,e.labelStyle+"; font-weight: bold;");if(C+=_+h,u){const F=await Da(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,C,e.labelStyle);C+=F;const U=await Da(y,`${a.text?`Text: ${a.text}`:""}`,C,e.labelStyle);C+=U;const K=await Da(y,`${a.risk?`Risk: ${a.risk}`:""}`,C,e.labelStyle);C+=K,await Da(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,C,e.labelStyle)}else{const F=await Da(y,`${o.type?`Type: ${o.type}`:""}`,C,e.labelStyle);C+=F,await Da(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,e.labelStyle)}const k=(((I=y.node())==null?void 0:I.getBBox().width)??200)+c,T=(((D=y.node())==null?void 0:D.getBBox().height)??200)+c,N=-k/2,E=-T/2,B=se.svg(y),O=oe(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const A=B.rectangle(N,E,k,T,O),M=y.insert(()=>A,":first-child");if(M.attr("class","basic label-container outer-path").attr("style",n),g!=null&&g.length){const F=e.colorIndex??0;y.attr("data-color-id",`color-${F%g.length}`)}if(y.selectAll(".label").each((F,U,K)=>{const z=ke(K[U]),W=z.attr("transform");let j=0,H=0;if(W){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);G&&(j=parseFloat(G[1]),H=parseFloat(G[2]))}const Y=H-T/2;let Z=N+c/2;(U===0||U===1)&&(Z=j),z.attr("transform",`translate(${Z}, ${Y+c})`)}),C>v+_+h){const F=E+v+_+h;let U;if(e.look==="neo"){const W=[[N,F],[N+k,F],[N+k,F+.001],[N,F+.001]];U=B.polygon(W,O)}else U=B.line(N,F,N+k,F,O);y.insert(()=>U).attr("class","divider")}return ue(e,M),e.intersect=function(F){return te.rect(e,F)},n&&e.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}L(zj,"requirementBox");async function Da(i,e,r,n=""){if(e==="")return 0;const a=i.insert("g").attr("class","label").attr("style",n),o=di(),c=o.htmlLabels??!0,h=await $s(a,_C(Pl(e)),{width:Ds(e,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},o);let u;if(c){const d=h.children[0],f=ke(h);u=d.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{const d=h.children[0];for(const f of d.children)n&&f.setAttribute("style",n);u=h.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}L(Da,"addText");var pQ=L(i=>{switch(i){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 Pj(i,e,{config:r}){var U,K;const{labelStyles:n,nodeStyles:a}=le(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:d}=await Ee(i,e,we(e)),f=e.padding||10;let g="",x;"ticket"in e&&e.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(g=(K=r==null?void 0:r.kanban)==null?void 0:K.ticketBaseUrl.replace("#TICKET#",e.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let v,C;x?{label:v,bbox:C}=await k0(x,"ticket"in e&&e.ticket||"",y):{label:v,bbox:C}=await k0(h,"ticket"in e&&e.ticket||"",y);const{label:_,bbox:k}=await k0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,N=(e==null?void 0:e.width)||0,E=Math.max(C.height,k.height)/2,B=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+E,O=-N/2,A=-B/2;d.attr("transform","translate("+(f-N/2)+", "+(-E-u.height/2)+")"),v.attr("transform","translate("+(f-N/2)+", "+(-E+u.height/2)+")"),_.attr("transform","translate("+(f+N/2-k.width-2*o)+", "+(-E+u.height/2)+")");let M;const{rx:I,ry:D}=e,{cssStyles:F}=e;if(e.look==="handDrawn"){const z=se.svg(h),W=oe(e,{}),j=I||D?z.path(Uo(O,A,N,B,I||0),W):z.rectangle(O,A,N,B,W);M=h.insert(()=>j,":first-child"),M.attr("class","basic label-container").attr("style",F||null)}else{M=h.insert("rect",":first-child"),M.attr("class","basic label-container __APA__").attr("style",a).attr("rx",I??5).attr("ry",D??5).attr("x",O).attr("y",A).attr("width",N).attr("height",B);const z="priority"in e&&e.priority;if(z){const W=h.append("line"),j=O+2,H=A+Math.floor((I??0)/2),Y=A+B-Math.floor((I??0)/2);W.attr("x1",j).attr("y1",H).attr("x2",j).attr("y2",Y).attr("stroke-width","4").attr("stroke",pQ(z))}}return ue(e,M),e.height=B,e.intersect=function(z){return te.rect(e,z)},h}L(Pj,"kanbanItem");async function qj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Ee(i,e,we(e)),u=o.width+10*c,d=o.height+8*c,f=.15*u,{cssStyles:g}=e,x=o.width+20,y=o.height+20,v=Math.max(u,x),C=Math.max(d,y);h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let _;const k=`M0 0
|
|
387
|
-
a${f},${f} 1 0,0 ${v*.25},${-1*C*.1}
|
|
388
|
-
a${f},${f} 1 0,0 ${v*.25},0
|
|
389
|
-
a${f},${f} 1 0,0 ${v*.25},0
|
|
390
|
-
a${f},${f} 1 0,0 ${v*.25},${C*.1}
|
|
391
|
-
|
|
392
|
-
a${f},${f} 1 0,0 ${v*.15},${C*.33}
|
|
393
|
-
a${f*.8},${f*.8} 1 0,0 0,${C*.34}
|
|
394
|
-
a${f},${f} 1 0,0 ${-1*v*.15},${C*.33}
|
|
395
|
-
|
|
396
|
-
a${f},${f} 1 0,0 ${-1*v*.25},${C*.15}
|
|
397
|
-
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
398
|
-
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
399
|
-
a${f},${f} 1 0,0 ${-1*v*.25},${-1*C*.15}
|
|
400
|
-
|
|
401
|
-
a${f},${f} 1 0,0 ${-1*v*.1},${-1*C*.33}
|
|
402
|
-
a${f*.8},${f*.8} 1 0,0 0,${-1*C*.34}
|
|
403
|
-
a${f},${f} 1 0,0 ${v*.1},${-1*C*.33}
|
|
404
|
-
H0 V0 Z`;if(e.look==="handDrawn"){const T=se.svg(a),N=oe(e,{}),E=T.path(k,N);_=a.insert(()=>E,":first-child"),_.attr("class","basic label-container").attr("style",Tr(g))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",k);return _.attr("transform",`translate(${-v/2}, ${-C/2})`),ue(e,_),e.calcIntersect=function(T,N){return te.rect(T,N)},e.intersect=function(T){return Lt.info("Bang intersect",e,T),te.rect(e,T)},a}L(qj,"bang");async function Uj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Ee(i,e,we(e)),u=o.width+2*c,d=o.height+2*c,f=.15*u,g=.25*u,x=.35*u,y=.2*u,{cssStyles:v}=e;let C;const _=`M0 0
|
|
405
|
-
a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
|
|
406
|
-
a${x},${x} 1 0,1 ${u*.4},${-1*u*.1}
|
|
407
|
-
a${g},${g} 1 0,1 ${u*.35},${u*.2}
|
|
408
|
-
|
|
409
|
-
a${f},${f} 1 0,1 ${u*.15},${d*.35}
|
|
410
|
-
a${y},${y} 1 0,1 ${-1*u*.15},${d*.65}
|
|
411
|
-
|
|
412
|
-
a${g},${f} 1 0,1 ${-1*u*.25},${u*.15}
|
|
413
|
-
a${x},${x} 1 0,1 ${-1*u*.5},0
|
|
414
|
-
a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
415
|
-
|
|
416
|
-
a${f},${f} 1 0,1 ${-1*u*.1},${-1*d*.35}
|
|
417
|
-
a${y},${y} 1 0,1 ${u*.1},${-1*d*.65}
|
|
418
|
-
H0 V0 Z`;if(e.look==="handDrawn"){const k=se.svg(a),T=oe(e,{}),N=k.path(_,T);C=a.insert(()=>N,":first-child"),C.attr("class","basic label-container").attr("style",Tr(v))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",_);return h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),C.attr("transform",`translate(${-u/2}, ${-d/2})`),ue(e,C),e.calcIntersect=function(k,T){return te.rect(k,T)},e.intersect=function(k){return Lt.info("Cloud intersect",e,k),te.rect(e,k)},a}L(Uj,"cloud");async function Hj(i,e){const{labelStyles:r,nodeStyles:n}=le(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Ee(i,e,we(e)),u=o.width+8*c,d=o.height+2*c,f=5,g=e.look==="neo"?`
|
|
419
|
-
M${-u/2} ${d/2-f}
|
|
420
|
-
v${-d+2*f}
|
|
421
|
-
q0,-${f} ${f},-${f}
|
|
422
|
-
h${u-2*f}
|
|
423
|
-
q${f},0 ${f},${f}
|
|
424
|
-
v${d-f}
|
|
425
|
-
H${-u/2}
|
|
426
|
-
Z
|
|
427
|
-
`:`
|
|
428
|
-
M${-u/2} ${d/2-f}
|
|
429
|
-
v${-d+2*f}
|
|
430
|
-
q0,-${f} ${f},-${f}
|
|
431
|
-
h${u-2*f}
|
|
432
|
-
q${f},0 ${f},${f}
|
|
433
|
-
v${d-2*f}
|
|
434
|
-
q0,${f} ${-f},${f}
|
|
435
|
-
h${-(u-2*f)}
|
|
436
|
-
q${-f},0 ${-f},${-f}
|
|
437
|
-
Z
|
|
438
|
-
`;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",g);return a.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",d/2).attr("x2",u/2).attr("y2",d/2),h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>h.node()),ue(e,x),e.calcIntersect=function(y,v){return te.rect(y,v)},e.intersect=function(y){return te.rect(e,y)},a}L(Hj,"defaultMindmapNode");async function Wj(i,e){const r={padding:e.padding??0};return e_(i,e,r)}L(Wj,"mindmapCircle");var gQ=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:_j},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:xj},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:kj},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ej},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:G3},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:e_},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:qj},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Uj},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:mj},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:J3},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:cj},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:lj},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Lj},{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:sj},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:K3},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Mj},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:I3},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:vj},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Tj},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Sj},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Z3},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tj},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:q3},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:U3},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:H3},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:hj},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:jj},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Q3},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Bj},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:uj},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:W3},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Y3},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Rj},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Fj},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:V3},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Oj},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:X3},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Cj},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:pj},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:fj},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:F3},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:P3},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Aj},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Nj},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Dj},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:yj},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:dj}],mQ=L(()=>{const e=[...Object.entries({state:wj,choice:$3,note:gj,rectWithTitle:bj,labelRect:oj,iconSquare:nj,iconCircle:ij,icon:ej,iconRounded:rj,imageSquare:aj,anchor:j3,kanbanItem:Pj,mindmapCircle:Wj,defaultMindmapNode:Hj,classBox:$j,erBox:i_,requirementBox:zj}),...gQ.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Gj=mQ();function yQ(i){return i in Gj}L(yQ,"isValidShape");var Bm=new Map;async function Yj(i,e,r){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?Gj[e.shape]:void 0;if(!o)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;r.config.securityLevel==="sandbox"?c="_top":e.linkTarget&&(c=e.linkTarget||"_blank"),n=i.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),a=await o(n,e,r)}else a=await o(i,e,r),n=a;return n.attr("data-look",Tr(e.look)),e.tooltip&&a.attr("title",e.tooltip),Bm.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}L(Yj,"insertNode");var _lt=L((i,e)=>{Bm.set(e.id,i)},"setNodeElem"),klt=L(()=>{Bm.clear()},"clear"),wlt=L(i=>{const e=Bm.get(i.id);Lt.trace("Transforming node",i.diff,i,"translate("+(i.x-i.width/2-5)+", "+i.width/2+")");const r=8,n=i.diff||0;return i.clusterNode?e.attr("transform","translate("+(i.x+n-i.width/2)+", "+(i.y-i.height/2-r)+")"):e.attr("transform","translate("+i.x+", "+i.y+")"),n},"positionNode"),bQ=L((i,e,r,n,a,o=!1,c)=>{e.arrowTypeStart&&sN(i,"start",e.arrowTypeStart,r,n,a,o,c),e.arrowTypeEnd&&sN(i,"end",e.arrowTypeEnd,r,n,a,o,c)},"addEdgeMarkers"),xQ={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}},vQ=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],sN=L((i,e,r,n,a,o,c=!1,h)=>{var v;const u=xQ[r],d=u&&vQ.includes(u.type);if(!u){Lt.warn(`Unknown arrow type: ${r}`);return}const f=u.type,y=`${a}_${o}-${f}${e==="start"?"Start":"End"}${c&&d?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),_=`${y}_${C}`;if(!document.getElementById(_)){const k=document.getElementById(y);if(k){const T=k.cloneNode(!0);T.id=_,T.querySelectorAll("path, circle, line").forEach(E=>{E.setAttribute("stroke",h),u.fill&&E.setAttribute("fill",h)}),(v=k.parentNode)==null||v.appendChild(T)}}i.attr(`marker-${e}`,`url(${n}#${_})`)}else i.attr(`marker-${e}`,`url(${n}#${y})`)},"addEdgeMarker"),CQ=L(i=>{var e,r;return typeof i=="string"?i:(r=(e=di())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Zg=new Map,jr=new Map,Slt=L(()=>{Zg.clear(),jr.clear()},"clear"),$u=L(i=>i?typeof i=="string"?i:i.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),_Q=L(async(i,e)=>{const r=di();let n=an(r);const{labelStyles:a}=le(e);e.labelStyle=a;const o=i.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",d=await $s(i,e.label,{style:$u(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},r);c.node().appendChild(d),Lt.info("abc82",e,e.labelType);let f=d.getBBox(),g=f;if(n){const y=d.children[0],v=ke(d);f=y.getBoundingClientRect(),g=f,v.attr("width",f.width),v.attr("height",f.height)}else{const y=ke(d).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",Ru(g,n)),Zg.set(e.id,o),e.width=f.width,e.height=f.height;let x;if(e.startLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.startLabelLeft,$u(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ke(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),jr.get(e.id)||jr.set(e.id,{}),jr.get(e.id).startLeft=y,rd(x,e.startLabelLeft)}if(e.startLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.startLabelRight,$u(e.labelStyle)||"",!1,!1);x=C,v.node().appendChild(C);let _=C.getBBox();if(n){const k=C.children[0],T=ke(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),jr.get(e.id)||jr.set(e.id,{}),jr.get(e.id).startRight=y,rd(x,e.startLabelRight)}if(e.endLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.endLabelLeft,$u(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ke(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),y.node().appendChild(C),jr.get(e.id)||jr.set(e.id,{}),jr.get(e.id).endLeft=y,rd(x,e.endLabelLeft)}if(e.endLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.endLabelRight,$u(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ke(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),y.node().appendChild(C),jr.get(e.id)||jr.set(e.id,{}),jr.get(e.id).endRight=y,rd(x,e.endLabelRight)}return d},"insertEdgeLabel");function rd(i,e){an(di())&&i&&(i.style.width=e.length*9+"px",i.style.height="12px")}L(rd,"setTerminalWidth");var kQ=L((i,e)=>{Lt.debug("Moving label abc88 ",i.id,i.label,Zg.get(i.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=di(),{subGraphTitleTotalMargin:a}=qC(n);if(i.label){const o=Zg.get(i.id);let c=i.x,h=i.y;if(r){const u=ba.calcLabelPosition(r);Lt.debug("Moving label "+i.label+" from (",c,",",h,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(c=u.x,h=u.y)}o.attr("transform",`translate(${c}, ${h+a/2})`)}if(i.startLabelLeft){const o=jr.get(i.id).startLeft;let c=i.x,h=i.y;if(r){const u=ba.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.startLabelRight){const o=jr.get(i.id).startRight;let c=i.x,h=i.y;if(r){const u=ba.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.endLabelLeft){const o=jr.get(i.id).endLeft;let c=i.x,h=i.y;if(r){const u=ba.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.endLabelRight){const o=jr.get(i.id).endRight;let c=i.x,h=i.y;if(r){const u=ba.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),wQ=L((i,e)=>{const r=i.x,n=i.y,a=Math.abs(e.x-r),o=Math.abs(e.y-n),c=i.width/2,h=i.height/2;return a>=c||o>=h},"outsideNode"),SQ=L((i,e,r)=>{Lt.debug(`intersection calc abc89:
|
|
439
|
-
outsidePoint: ${JSON.stringify(e)}
|
|
440
|
-
insidePoint : ${JSON.stringify(r)}
|
|
441
|
-
node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const n=i.x,a=i.y,o=Math.abs(n-r.x),c=i.width/2;let h=r.x<e.x?c-o:c+o;const u=i.height/2,d=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*c>Math.abs(n-e.x)*u){let g=r.y<e.y?e.y-u-a:a-u-e.y;h=f*g/d;const x={x:r.x<e.x?r.x+h:r.x-f+h,y:r.y<e.y?r.y+d-g:r.y-d+g};return h===0&&(x.x=e.x,x.y=e.y),f===0&&(x.x=e.x),d===0&&(x.y=e.y),Lt.debug(`abc89 top/bottom calc, Q ${d}, q ${g}, R ${f}, r ${h}`,x),x}else{r.x<e.x?h=e.x-c-n:h=n-c-e.x;let g=d*h/f,x=r.x<e.x?r.x+f-h:r.x-f+h,y=r.y<e.y?r.y+g:r.y-g;return Lt.debug(`sides calc abc89, Q ${d}, q ${g}, R ${f}, r ${h}`,{_x:x,_y:y}),h===0&&(x=e.x,y=e.y),f===0&&(x=e.x),d===0&&(y=e.y),{x,y}}},"intersection"),oN=L((i,e)=>{Lt.warn("abc88 cutPathAtIntersect",i,e);let r=[],n=i[0],a=!1;return i.forEach(o=>{if(Lt.info("abc88 checking point",o,e),!wQ(e,o)&&!a){const c=SQ(e,n,o);Lt.debug("abc88 inside",o,n,c),Lt.debug("abc88 intersection",c,e);let h=!1;r.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),r.some(u=>u.x===c.x&&u.y===c.y)?Lt.warn("abc88 no intersect",c,r):r.push(c),a=!0}else Lt.warn("abc88 outside",o,n),n=o,a||r.push(o)}),Lt.debug("returning points",r),r},"cutPathAtIntersect");function Kj(i){const e=[],r=[];for(let n=1;n<i.length-1;n++){const a=i[n-1],o=i[n],c=i[n+1];(a.x===o.x&&o.y===c.y&&Math.abs(o.x-c.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===c.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-c.y)>5)&&(e.push(o),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}L(Kj,"extractCornerPoints");var lN=L(function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=Math.sqrt(n*n+a*a),c=r/o;return{x:e.x-c*n,y:e.y-c*a}},"findAdjacentPoint"),TQ=L(function(i){const{cornerPointPositions:e}=Kj(i),r=[];for(let n=0;n<i.length;n++)if(e.includes(n)){const a=i[n-1],o=i[n+1],c=i[n],h=lN(a,c,5),u=lN(o,c,5),d=u.x-h.x,f=u.y-h.y;r.push(h);const g=Math.sqrt(2)*2;let x={x:c.x,y:c.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){Lt.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const y=5;c.x===h.x?x={x:d<0?h.x-y+g:h.x+y-g,y:f<0?h.y-g:h.y+g}:x={x:d<0?h.x-g:h.x+g,y:f<0?h.y-y+g:h.y+y-g}}else Lt.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(x,u)}else r.push(i[n]);return r},"fixCorners"),EQ=L((i,e,r)=>{const n=i-e-r,a=2,o=2,c=a+o,h=Math.floor(n/c),u=Array(h).fill(`${a} ${o}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),NQ=L(function(i,e,r,n,a,o,c,h=!1){var H;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=di();let d=e.points,f=!1;const g=a;var x=o;const y=[];for(const Y in e.cssCompiledStyles)YR(Y)||y.push(e.cssCompiledStyles[Y]);Lt.debug("UIO intersect check",e.points,x.x,g.x),x.intersect&&g.intersect&&!h&&(d=d.slice(1,e.points.length-1),d.unshift(g.intersect(d[0])),Lt.debug("Last point UIO",e.start,"-->",e.end,d[d.length-1],x,x.intersect(d[d.length-1])),d.push(x.intersect(d[d.length-1])));const v=btoa(JSON.stringify(d));e.toCluster&&(Lt.info("to cluster abc88",r.get(e.toCluster)),d=oN(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(Lt.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(d,null,2)),d=oN(d.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let C=d.filter(Y=>!Number.isNaN(Y.y));const _=CQ(e.curve);_!=="rounded"&&(C=TQ(C));let k=pd;switch(_){case"linear":k=pd;break;case"basis":k=Dv;break;case"cardinal":k=PL;break;case"bumpX":k=DL;break;case"bumpY":k=FL;break;case"catmullRom":k=UL;break;case"monotoneX":k=VL;break;case"monotoneY":k=XL;break;case"natural":k=QL;break;case"step":k=JL;break;case"stepAfter":k=eO;break;case"stepBefore":k=tO;break;case"rounded":k=pd;break;default:k=Dv}const{x:T,y:N}=XV(e),E=OK().x(T).y(N).curve(k);let B;switch(e.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(e.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 O,A=_==="rounded"?Vj(Xj(C,e),5):E(C);const M=Array.isArray(e.style)?e.style:[e.style];let I=M.find(Y=>Y==null?void 0:Y.startsWith("stroke:")),D="";e.animate&&(D="edge-animation-fast"),e.animation&&(D="edge-animation-"+e.animation);let F=!1;if(e.look==="handDrawn"){const Y=se.svg(i);Object.assign([],C);const Z=Y.path(A,{roughness:.3,seed:u});B+=" transition",O=ke(Z).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",M?M.reduce((G,tt)=>G+";"+tt,""):"");let rt=O.attr("d");O.attr("d",rt),i.node().appendChild(O.node())}else{const Y=y.join(";"),Z=M?M.reduce((vt,ot)=>vt+ot+";",""):"",rt=(Y?Y+";"+Z+";":Z)+";"+(M?M.reduce((vt,ot)=>vt+";"+ot,""):"");O=i.append("path").attr("d",A).attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",rt),I=(H=rt.match(/stroke:([^;]+)/))==null?void 0:H[1],F=e.animate===!0||!!e.animation||Y.includes("animation");const G=O.node(),tt=typeof G.getTotalLength=="function"?G.getTotalLength():0,ft=SE[e.arrowTypeStart]||0,ct=SE[e.arrowTypeEnd]||0;if(e.look==="neo"&&!F){const ot=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?EQ(tt,ft,ct):`0 ${ft} ${tt-ft-ct} ${ct}`}; stroke-dashoffset: 0;`;O.attr("style",ot+O.attr("style"))}}O.attr("data-edge",!0),O.attr("data-et","edge"),O.attr("data-id",e.id),O.attr("data-points",v),O.attr("data-look",Tr(e.look)),e.showPoints&&C.forEach(Y=>{i.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Y.x).attr("cy",Y.y)});let U="";(di().flowchart.arrowMarkerAbsolute||di().state.arrowMarkerAbsolute)&&(U=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,U=U.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Lt.info("arrowTypeStart",e.arrowTypeStart),Lt.info("arrowTypeEnd",e.arrowTypeEnd);const K=!F&&(e==null?void 0:e.look)==="neo";bQ(O,e,U,c,n,K,I);const z=Math.floor(d.length/2),W=d[z];ba.isLabelCoordinateInPath(W,O.attr("d"))||(f=!0);let j={};return f&&(j.updatedPath=d),j.originalPath=e.points,j},"insertEdge");function Vj(i,e){if(i.length<2)return"";let r="";const n=i.length,a=1e-5;for(let o=0;o<n;o++){const c=i[o],h=i[o-1],u=i[o+1];if(o===0)r+=`M${c.x},${c.y}`;else if(o===n-1)r+=`L${c.x},${c.y}`;else{const d=c.x-h.x,f=c.y-h.y,g=u.x-c.x,x=u.y-c.y,y=Math.hypot(d,f),v=Math.hypot(g,x);if(y<a||v<a){r+=`L${c.x},${c.y}`;continue}const C=d/y,_=f/y,k=g/v,T=x/v,N=C*k+_*T,E=Math.max(-1,Math.min(1,N)),B=Math.acos(E);if(B<a||Math.abs(Math.PI-B)<a){r+=`L${c.x},${c.y}`;continue}const O=Math.min(e/Math.sin(B/2),y/2,v/2),A=c.x-C*O,M=c.y-_*O,I=c.x+k*O,D=c.y+T*O;r+=`L${A},${M}`,r+=`Q${c.x},${c.y} ${I},${D}`}}return r}L(Vj,"generateRoundedPath");function h1(i,e){if(!i||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-i.x,n=e.y-i.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}L(h1,"calculateDeltaAndAngle");function Xj(i,e){const r=i.map(a=>({...a}));if(i.length>=2&&Hr[e.arrowTypeStart]){const a=Hr[e.arrowTypeStart],o=i[0],c=i[1],{angle:h}=h1(o,c),u=a*Math.cos(h),d=a*Math.sin(h);r[0].x=o.x+u,r[0].y=o.y+d}const n=i.length;if(n>=2&&Hr[e.arrowTypeEnd]){const a=Hr[e.arrowTypeEnd],o=i[n-1],c=i[n-2],{angle:h}=h1(c,o),u=a*Math.cos(h),d=a*Math.sin(h);r[n-1].x=o.x-u,r[n-1].y=o.y-d}return r}L(Xj,"applyMarkerOffsetsToPoints");var AQ=L((i,e,r,n)=>{e.forEach(a=>{QQ[a](i,r,n)})},"insertMarkers"),MQ=L((i,e,r)=>{Lt.trace("Making markers for ",r),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),i.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),BQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),LQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),OQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),RQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),jQ=L((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),DQ=L((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),FQ=L((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),i.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),IQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),$Q=L((i,e,r)=>{const n=Vi(),{themeVariables:a}=n,{transitionColor:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),zQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),PQ=L((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),qQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),UQ=L((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),HQ=L((i,e,r)=>{const n=Vi(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),WQ=L((i,e,r)=>{const n=Vi(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const u=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),GQ=L((i,e,r)=>{const n=Vi(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),YQ=L((i,e,r)=>{const n=Vi(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const u=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),KQ=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
442
|
-
L20,10
|
|
443
|
-
M20,10
|
|
444
|
-
L0,20`)},"requirement_arrow"),VQ=L((i,e,r)=>{const n=Vi(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
445
|
-
L20,10
|
|
446
|
-
M20,10
|
|
447
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),XQ=L((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ZQ=L((i,e,r)=>{const n=Vi(),{themeVariables:a}=n,{strokeWidth:o}=a,c=i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),QQ={extension:MQ,composition:BQ,aggregation:LQ,dependency:OQ,lollipop:RQ,point:jQ,circle:DQ,cross:FQ,barb:IQ,barbNeo:$Q,only_one:zQ,zero_or_one:PQ,one_or_more:qQ,zero_or_more:UQ,only_one_neo:HQ,zero_or_one_neo:WQ,one_or_more_neo:GQ,zero_or_more_neo:YQ,requirement_arrow:KQ,requirement_contains:XQ,requirement_arrow_neo:VQ,requirement_contains_neo:ZQ},JQ=AQ,tJ={common:Kd,getConfig:Vi,insertCluster:ZZ,insertEdge:NQ,insertEdgeLabel:_Q,insertMarkers:JQ,insertNode:Yj,interpolateToCurve:DC,labelHelper:Ee,log:Lt,positionEdgeLabel:kQ},Ld={},Zj=L(i=>{for(const e of i)Ld[e.name]=e},"registerLayoutLoaders"),eJ=L(()=>{Zj([{name:"dagre",loader:L(async()=>await Fe(()=>import("./dagre-KV5264BT-Du_qjhF2.js"),__vite__mapDeps([5,6,7,8,9,10])),"loader")},{name:"cose-bilkent",loader:L(async()=>await Fe(()=>import("./cose-bilkent-S5V4N54A-KvwZaKE7.js"),__vite__mapDeps([11,12])),"loader")}])},"registerDefaultLayoutLoaders");eJ();var Tlt=L(async(i,e)=>{if(!(i.layoutAlgorithm in Ld))throw new Error(`Unknown layout algorithm: ${i.layoutAlgorithm}`);if(i.diagramId)for(const f of i.nodes){const g=f.domId||f.id;f.domId=`${i.diagramId}-${g}`}const r=Ld[i.layoutAlgorithm],n=await r.loader(),{theme:a,themeVariables:o}=i.config,{useGradient:c,gradientStart:h,gradientStop:u}=o,d=e.attr("id");if(e.append("defs").append("filter").attr("id",`${d}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${d}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),c){const f=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),f.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return n.render(i,e,tJ,{algorithm:r.algorithm})},"render"),Elt=L((i="",{fallback:e="dagre"}={})=>{if(i in Ld)return i;if(e in Ld)return Lt.warn(`Layout algorithm ${i} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${i} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),Qj="comm",Jj="rule",t5="decl",iJ="@import",rJ="@namespace",nJ="@keyframes",aJ="@layer",sJ=Math.abs,md=String.fromCharCode;function e5(i){return i.trim()}function u1(i,e,r){return i.replace(e,r)}function Wc(i,e){return i.charCodeAt(e)|0}function wh(i,e,r){return i.slice(e,r)}function za(i){return i.length}function oJ(i){return i.length}function Rp(i,e){return e.push(i),i}var Lm=1,Sh=1,i5=0,oa=0,pr=0,Bh="";function r_(i,e,r,n,a,o,c,h){return{value:i,root:e,parent:r,type:n,props:a,children:o,line:Lm,column:Sh,length:c,return:"",siblings:h}}function lJ(){return pr}function cJ(){return pr=oa>0?Wc(Bh,--oa):0,Sh--,pr===10&&(Sh=1,Lm--),pr}function Ca(){return pr=oa<i5?Wc(Bh,oa++):0,Sh++,pr===10&&(Sh=1,Lm++),pr}function Bo(){return Wc(Bh,oa)}function ag(){return oa}function Om(i,e){return wh(Bh,i,e)}function Od(i){switch(i){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 hJ(i){return Lm=Sh=1,i5=za(Bh=i),oa=0,[]}function uJ(i){return Bh="",i}function S0(i){return e5(Om(oa-1,d1(i===91?i+2:i===40?i+1:i)))}function dJ(i){for(;(pr=Bo())&&pr<33;)Ca();return Od(i)>2||Od(pr)>3?"":" "}function fJ(i,e){for(;--e&&Ca()&&!(pr<48||pr>102||pr>57&&pr<65||pr>70&&pr<97););return Om(i,ag()+(e<6&&Bo()==32&&Ca()==32))}function d1(i){for(;Ca();)switch(pr){case i:return oa;case 34:case 39:i!==34&&i!==39&&d1(pr);break;case 40:i===41&&d1(i);break;case 92:Ca();break}return oa}function pJ(i,e){for(;Ca()&&i+pr!==57;)if(i+pr===84&&Bo()===47)break;return"/*"+Om(e,oa-1)+"*"+md(i===47?i:Ca())}function gJ(i){for(;!Od(Bo());)Ca();return Om(i,oa)}function mJ(i){return uJ(sg("",null,null,null,[""],i=hJ(i),0,[0],i))}function sg(i,e,r,n,a,o,c,h,u){for(var d=0,f=0,g=c,x=0,y=0,v=0,C=1,_=1,k=1,T=0,N=0,E="",B=a,O=o,A=n,M=E;_;)switch(v=N,N=Ca()){case 40:v!=108&&Wc(M,g-1)==58?(T++,M+="("):M+=S0(N);break;case 41:T--,M+=")";break;case 34:case 39:case 91:M+=S0(N);break;case 9:case 10:case 13:case 32:if(T>0){M+=md(N);break}M+=dJ(v);break;case 92:M+=fJ(ag()-1,7);continue;case 47:switch(Bo()){case 42:case 47:Rp(yJ(pJ(Ca(),ag()),e,r,u),u),(Od(v||1)==5||Od(Bo()||1)==5)&&za(M)&&wh(M,-1,void 0)!==" "&&(M+=" ");break;default:M+="/"}break;case 123*C:h[d++]=za(M)*k;case 125*C:case 59:case 0:if(T>0&&N){M+=md(N);break}switch(N){case 0:case 125:_=0;case 59+f:k==-1&&(M=u1(M,/\f/g,"")),y>0&&(za(M)-g||C===0)&&Rp(y>32?hN(M+";",n,r,g-1,u):hN(u1(M," ","")+";",n,r,g-2,u),u);break;case 59:M+=";";default:if(Rp(A=cN(M,e,r,d,f,a,h,E,B=[],O=[],g,o),o),N===123)if(f===0)sg(M,e,A,A,B,o,g,h,O);else{switch(x){case 99:if(Wc(M,3)===110)break;case 108:if(Wc(M,2)===97)break;default:f=0;case 100:case 109:case 115:}f?sg(i,A,A,n&&Rp(cN(i,A,A,0,0,a,h,E,a,B=[],g,O),O),a,O,g,h,n?B:O):sg(M,A,A,A,[""],O,0,h,O)}}d=f=y=0,C=k=1,E=M="",g=c;break;case 58:g=1+za(M),y=v;default:if(C<1){if(N==123)--C;else if(N==125&&C++==0&&cJ()==125)continue}switch(M+=md(N),N*C){case 38:k=f>0?1:(M+="\f",-1);break;case 44:if(T>0)break;h[d++]=(za(M)-1)*k,k=1;break;case 64:Bo()===45&&(M+=S0(Ca())),x=Bo(),f=g=za(E=M+=gJ(ag())),N++;break;case 45:v===45&&za(M)==2&&(C=0)}}return o}function cN(i,e,r,n,a,o,c,h,u,d,f,g){for(var x=a-1,y=a===0?o:[""],v=oJ(y),C=0,_=0,k=0;C<n;++C)for(var T=0,N=wh(i,x+1,x=sJ(_=c[C])),E=i;T<v;++T)(E=e5(_>0?y[T]+" "+N:u1(N,/&\f/g,y[T])))&&(u[k++]=E);return r_(i,e,r,a===0?Jj:h,u,d,f,g)}function yJ(i,e,r,n){return r_(i,e,r,Qj,md(lJ()),wh(i,2,-2),0,n)}function hN(i,e,r,n,a){return r_(i,e,r,t5,wh(i,0,n),wh(i,n+1,-1),n,a)}function f1(i,e){for(var r="",n=0;n<i.length;n++)r+=e(i[n],n,i,e)||"";return r}function bJ(i,e,r,n){switch(i.type){case aJ:if(i.children.length)break;case iJ:case rJ:case t5:return i.return=i.return||i.value;case Qj:return"";case nJ:return i.return=i.value+"{"+f1(i.children,n)+"}";case Jj:if(!za(i.value=i.props.join(",")))return""}return za(r=f1(i.children,n))?i.return=i.value+"{"+r+"}":""}var r5="c4",xJ=L(i=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),vJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-B1KEuF7Q.js");return{diagram:e}},__vite__mapDeps([13,14]));return{id:r5,diagram:i}},"loader"),CJ={id:r5,detector:xJ,loader:vJ},_J=CJ,n5="flowchart",kJ=L((i,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(i)},"detector"),wJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DRYxEOwt.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:n5,diagram:i}},"loader"),SJ={id:n5,detector:kJ,loader:wJ},TJ=SJ,a5="flowchart-v2",EJ=L((i,e)=>{var r,n,a;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(i)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(i))},"detector"),NJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DRYxEOwt.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:a5,diagram:i}},"loader"),AJ={id:a5,detector:EJ,loader:NJ},MJ=AJ,s5="er",BJ=L(i=>/^\s*erDiagram/.test(i),"detector"),LJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-Bgu7PR3l.js");return{diagram:e}},__vite__mapDeps([20,17,18,19]));return{id:s5,diagram:i}},"loader"),OJ={id:s5,detector:BJ,loader:LJ},RJ=OJ,o5="gitGraph",jJ=L(i=>/^\s*gitGraph/.test(i),"detector"),DJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-B-fWXvro.js");return{diagram:e}},__vite__mapDeps([21,22,23,24,9,7]));return{id:o5,diagram:i}},"loader"),FJ={id:o5,detector:jJ,loader:DJ},IJ=FJ,l5="gantt",$J=L(i=>/^\s*gantt/.test(i),"detector"),zJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-CNf0-tRS.js");return{diagram:e}},__vite__mapDeps([25,26,27]));return{id:l5,diagram:i}},"loader"),PJ={id:l5,detector:$J,loader:zJ},qJ=PJ,c5="info",UJ=L(i=>/^\s*info/.test(i),"detector"),HJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-zeTnmz1D.js");return{diagram:e}},__vite__mapDeps([28,24,9,7]));return{id:c5,diagram:i}},"loader"),WJ={id:c5,detector:UJ,loader:HJ},h5="pie",GJ=L(i=>/^\s*pie/.test(i),"detector"),YJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-BNsvSiV8.js");return{diagram:e}},__vite__mapDeps([29,22,24,9,7,30]));return{id:h5,diagram:i}},"loader"),KJ={id:h5,detector:GJ,loader:YJ},u5="quadrantChart",VJ=L(i=>/^\s*quadrantChart/.test(i),"detector"),XJ=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-CnG8TUp0.js");return{diagram:e}},__vite__mapDeps([31,26,27]));return{id:u5,diagram:i}},"loader"),ZJ={id:u5,detector:VJ,loader:XJ},QJ=ZJ,d5="xychart",JJ=L(i=>/^\s*xychart(-beta)?/.test(i),"detector"),ttt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-BCfqQ3yb.js");return{diagram:e}},__vite__mapDeps([32,26,27]));return{id:d5,diagram:i}},"loader"),ett={id:d5,detector:JJ,loader:ttt},itt=ett,f5="requirement",rtt=L(i=>/^\s*requirement(Diagram)?/.test(i),"detector"),ntt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-CVzV4vf5.js");return{diagram:e}},__vite__mapDeps([33,17,18]));return{id:f5,diagram:i}},"loader"),att={id:f5,detector:rtt,loader:ntt},stt=att,p5="sequence",ott=L(i=>/^\s*sequenceDiagram/.test(i),"detector"),ltt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-DjCIzK1N.js");return{diagram:e}},__vite__mapDeps([34,14,23]));return{id:p5,diagram:i}},"loader"),ctt={id:p5,detector:ott,loader:ltt},htt=ctt,g5="class",utt=L((i,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(i)},"detector"),dtt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-B2f-mNIc.js");return{diagram:e}},__vite__mapDeps([35,36,16,14,17,18]));return{id:g5,diagram:i}},"loader"),ftt={id:g5,detector:utt,loader:dtt},ptt=ftt,m5="classDiagram",gtt=L((i,e)=>{var r;return/^\s*classDiagram/.test(i)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(i)},"detector"),mtt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-B2f-mNIc.js");return{diagram:e}},__vite__mapDeps([37,36,16,14,17,18]));return{id:m5,diagram:i}},"loader"),ytt={id:m5,detector:gtt,loader:mtt},btt=ytt,y5="state",xtt=L((i,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(i)},"detector"),vtt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-D9Z-sJAh.js");return{diagram:e}},__vite__mapDeps([38,39,17,18,6,7,8,9]));return{id:y5,diagram:i}},"loader"),Ctt={id:y5,detector:xtt,loader:vtt},_tt=Ctt,b5="stateDiagram",ktt=L((i,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(i)||/^\s*stateDiagram/.test(i)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),wtt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-nhVyYoyX.js");return{diagram:e}},__vite__mapDeps([40,39,17,18]));return{id:b5,diagram:i}},"loader"),Stt={id:b5,detector:ktt,loader:wtt},Ttt=Stt,x5="journey",Ett=L(i=>/^\s*journey/.test(i),"detector"),Ntt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-DFWvXLzk.js");return{diagram:e}},__vite__mapDeps([41,16,14,30]));return{id:x5,diagram:i}},"loader"),Att={id:x5,detector:Ett,loader:Ntt},Mtt=Att,Btt=L((i,e,r)=>{Lt.debug(`rendering svg for syntax error
|
|
448
|
-
`);const n=qK(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),BL(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),v5={draw:Btt},Ltt=v5,Ott={db:{},renderer:v5,parser:{parse:L(()=>{},"parse")}},Rtt=Ott,C5="flowchart-elk",jtt=L((i,e={})=>{var r;return/^\s*flowchart-elk/.test(i)||/^\s*(flowchart|graph)/.test(i)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),Dtt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DRYxEOwt.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:C5,diagram:i}},"loader"),Ftt={id:C5,detector:jtt,loader:Dtt},Itt=Ftt,_5="timeline",$tt=L(i=>/^\s*timeline/.test(i),"detector"),ztt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-n1YhmZQ4.js");return{diagram:e}},__vite__mapDeps([42,30]));return{id:_5,diagram:i}},"loader"),Ptt={id:_5,detector:$tt,loader:ztt},qtt=Ptt,k5="mindmap",Utt=L(i=>/^\s*mindmap/.test(i),"detector"),Htt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-BSWtNXnF.js");return{diagram:e}},__vite__mapDeps([43,17,18]));return{id:k5,diagram:i}},"loader"),Wtt={id:k5,detector:Utt,loader:Htt},Gtt=Wtt,w5="kanban",Ytt=L(i=>/^\s*kanban/.test(i),"detector"),Ktt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-DhKLuu7C.js");return{diagram:e}},__vite__mapDeps([44,16]));return{id:w5,diagram:i}},"loader"),Vtt={id:w5,detector:Ytt,loader:Ktt},Xtt=Vtt,S5="sankey",Ztt=L(i=>/^\s*sankey(-beta)?/.test(i),"detector"),Qtt=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-CZLhklJg.js");return{diagram:e}},[]);return{id:S5,diagram:i}},"loader"),Jtt={id:S5,detector:Ztt,loader:Qtt},tet=Jtt,T5="packet",eet=L(i=>/^\s*packet(-beta)?/.test(i),"detector"),iet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-BGh7adH7.js");return{diagram:e}},__vite__mapDeps([45,22,24,9,7]));return{id:T5,diagram:i}},"loader"),ret={id:T5,detector:eet,loader:iet},E5="radar",net=L(i=>/^\s*radar-beta/.test(i),"detector"),aet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-BxckEUHv.js");return{diagram:e}},__vite__mapDeps([46,22,24,9,7]));return{id:E5,diagram:i}},"loader"),set={id:E5,detector:net,loader:aet},N5="block",oet=L(i=>/^\s*block(-beta)?/.test(i),"detector"),cet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-YPBR1t-F.js");return{diagram:e}},__vite__mapDeps([47,16,10,6,7,19]));return{id:N5,diagram:i}},"loader"),het={id:N5,detector:oet,loader:cet},uet=het,A5="treeView",det=L(i=>/^\s*treeView-beta/.test(i),"detector"),fet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-D7slatQr.js");return{diagram:e}},__vite__mapDeps([48,22,23,24,9,7]));return{id:A5,diagram:i}},"loader"),pet={id:A5,detector:det,loader:fet},get=pet,M5="architecture",met=L(i=>/^\s*architecture/.test(i),"detector"),yet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-DgYle1Hc.js");return{diagram:e}},__vite__mapDeps([49,22,24,9,7,12]));return{id:M5,diagram:i}},"loader"),bet={id:M5,detector:met,loader:yet},xet=bet,B5="ishikawa",vet=L(i=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),Cet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-Bb756K5U.js");return{diagram:e}},[]);return{id:B5,diagram:i}},"loader"),_et={id:B5,detector:vet,loader:Cet},L5="venn",ket=L(i=>/^\s*venn-beta/.test(i),"detector"),wet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-EZuBw-Y1.js");return{diagram:e}},[]);return{id:L5,diagram:i}},"loader"),Tet={id:L5,detector:ket,loader:wet},Eet=Tet,O5="treemap",Net=L(i=>/^\s*treemap/.test(i),"detector"),Aet=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-DiCZYy5B.js");return{diagram:e}},__vite__mapDeps([50,18,22,24,9,7,27]));return{id:O5,diagram:i}},"loader"),Met={id:O5,detector:Net,loader:Aet},R5="wardley-beta",Bet=L(i=>/^\s*wardley-beta/i.test(i),"detector"),Let=L(async()=>{const{diagram:i}=await Fe(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-DhmpY-nw.js");return{diagram:e}},__vite__mapDeps([51,22,24,9,7]));return{id:R5,diagram:i}},"loader"),Oet={id:R5,detector:Bet,loader:Let},Ret=Oet,uN=!1,Rm=L(()=>{uN||(uN=!0,Lg("error",Rtt,i=>i.toLowerCase().trim()==="error"),Lg("---",{db:{clear:L(()=>{},"clear")},styles:{},renderer:{draw:L(()=>{},"draw")},parser:{parse:L(()=>{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:L(()=>null,"init")},i=>i.toLowerCase().trimStart().startsWith("---")),Av(Itt,Gtt,xet),Av(_J,Xtt,btt,ptt,RJ,qJ,WJ,KJ,stt,htt,MJ,TJ,qtt,IJ,Ttt,_tt,Mtt,QJ,tet,ret,itt,uet,get,set,_et,Met,Eet,Ret))},"addDiagrams"),jet=L(async()=>{Lt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Il).map(async([r,{detector:n,loader:a}])=>{if(a)try{Ov(r)}catch{try{const{diagram:o,id:c}=await a();Lg(c,o,n)}catch(o){throw Lt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Il[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){Lt.error(`Failed to load ${e.length} external diagrams`);for(const r of e)Lt.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),Det="graphics-document document";function j5(i,e){i.attr("role",Det),e!==""&&i.attr("aria-roledescription",e)}L(j5,"setA11yDiagramInfo");function D5(i,e,r,n){if(i.insert!==void 0){if(r){const a=`chart-desc-${n}`;i.attr("aria-describedby",a),i.insert("desc",":first-child").attr("id",a).text(r)}if(e){const a=`chart-title-${n}`;i.attr("aria-labelledby",a),i.insert("title",":first-child").attr("id",a).text(e)}}}L(D5,"addSVGa11yTitleDescription");var Ll,p1=(Ll=class{constructor(e,r,n,a,o){this.type=e,this.text=r,this.db=n,this.parser=a,this.renderer=o}static async fromText(e,r={}){var d,f;const n=Vi(),a=yC(e,n);e=yX(e)+`
|
|
449
|
-
`;try{Ov(a)}catch{const g=CY(a);if(!g)throw new yL(`Diagram ${a} not found.`);const{id:x,diagram:y}=await g();Lg(x,y)}const{db:o,parser:c,renderer:h,init:u}=Ov(a);return c.parser&&(c.parser.yy=o),(d=o.clear)==null||d.call(o),u==null||u(n),r.title&&((f=o.setDiagramTitle)==null||f.call(o,r.title)),await c.parse(e),new Ll(a,e,o,c,h)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},L(Ll,"Diagram"),Ll),dN=[],Fet=L(()=>{dN.forEach(i=>{i()}),dN=[]},"attachFunctions"),Iet=L(i=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function F5(i){const e=i.match(mL);if(!e)return{text:i,metadata:{}};let r=VV(e[1],{schema:KV})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:i.slice(e[0].length),metadata:n}}L(F5,"extractFrontMatter");var $et=L(i=>i.replace(/\r\n?/g,`
|
|
450
|
-
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),zet=L(i=>{const{text:e,metadata:r}=F5(i),{displayMode:n,title:a,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:a,config:o,text:e}},"processFrontmatter"),Pet=L(i=>{const e=ba.detectInit(i)??{},r=ba.detectDirective(i,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:nX(i),directive:e}},"processDirectives");function n_(i){const e=$et(i),r=zet(e),n=Pet(r.text),a=PC(r.config,n.directive);return i=Iet(n.text),{code:i,title:r.title,config:a}}L(n_,"preprocessDiagram");function I5(i){const e=new TextEncoder().encode(i),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}L(I5,"toBase64");var qet=5e4,Uet="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Het="sandbox",Wet="loose",Get="http://www.w3.org/2000/svg",Yet="http://www.w3.org/1999/xlink",Ket="http://www.w3.org/1999/xhtml",Vet="100%",Xet="100%",Zet="border:0;margin:0;",Qet="margin:0",Jet="allow-top-navigation-by-user-activation allow-popups",tit='The "iframe" tag is not supported by your browser.',eit=["foreignobject"],iit=["dominant-baseline"];function a_(i){const e=n_(i);return Mg(),VY(e.config??{}),e}L(a_,"processAndSetConfigs");async function $5(i,e){Rm();try{const{code:r,config:n}=a_(i);return{diagramType:(await P5(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}L($5,"parse");var fN=L((i,e,r=[])=>`
|
|
451
|
-
.${i} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),rit=L((i,e=new Map)=>{let r="";if(i.themeCSS!==void 0&&(r+=`
|
|
452
|
-
${i.themeCSS}`),i.fontFamily!==void 0&&(r+=`
|
|
453
|
-
:root { --mermaid-font-family: ${i.fontFamily}}`),i.altFontFamily!==void 0&&(r+=`
|
|
454
|
-
:root { --mermaid-alt-font-family: ${i.altFontFamily}}`),e instanceof Map){const c=an(i)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{nT(h.styles)||c.forEach(u=>{r+=fN(h.id,u,h.styles)}),nT(h.textStyles)||(r+=fN(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),nit=L((i,e,r,n)=>{const a=rit(i,r),o=pK(e,a,{...i.themeVariables,theme:i.theme,look:i.look},n);return f1(mJ(`${n}{${o}}`),bJ)},"createUserStyles"),ait=L((i="",e,r)=>{let n=i;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Pl(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),sit=L((i="",e)=>{var a,o;const r=(o=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":Xet,n=I5(`<body style="${Qet}">${i}</body>`);return`<iframe style="width:${Vet};height:${r};${Zet}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${Jet}">
|
|
455
|
-
${tit}
|
|
456
|
-
</iframe>`},"putIntoIFrame"),pN=L((i,e,r,n,a)=>{const o=i.append("div");o.attr("id",r),n&&o.attr("style",n);const c=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Get);return a&&c.attr("xmlns:xlink",a),c.append("g"),i},"appendDivSvgG");function g1(i,e){return i.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}L(g1,"sandboxedIframe");var oit=L((i,e,r,n)=>{var a,o,c;(a=i.getElementById(e))==null||a.remove(),(o=i.getElementById(r))==null||o.remove(),(c=i.getElementById(n))==null||c.remove()},"removeExistingElements"),lit=L(async function(i,e,r){var U,K,z,W,j,H;Rm();const n=a_(e);e=n.code;const a=Vi();Lt.debug(a),e.length>((a==null?void 0:a.maxTextSize)??qet)&&(e=Uet);const o="#"+i,c="i"+i,h="#"+c,u="d"+i,d="#"+u,f=L(()=>{const Z=ke(x?h:d).node();Z&&"remove"in Z&&Z.remove()},"removeTempElements");let g=ke("body");const x=a.securityLevel===Het,y=a.securityLevel===Wet,v=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),x){const Y=g1(ke(r),c);g=ke(Y.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ke(r);pN(g,i,u,`font-family: ${v}`,Yet)}else{if(oit(document,i,u,c),x){const Y=g1(ke("body"),c);g=ke(Y.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ke("body");pN(g,i,u)}let C,_;try{C=await p1.fromText(e,{title:n.title})}catch(Y){if(a.suppressErrorRendering)throw f(),Y;C=await p1.fromText("error"),_=Y}const k=g.select(d).node(),T=C.type,N=k.firstChild,E=N.firstChild,B=(K=(U=C.renderer).getClasses)==null?void 0:K.call(U,e,C),O=nit(a,T,B,o),A=document.createElement("style");A.innerHTML=O,N.insertBefore(A,E);try{await C.renderer.draw(e,i,"11.14.0",C)}catch(Y){throw a.suppressErrorRendering?f():Ltt.draw(e,i,"11.14.0"),Y}const M=g.select(`${d} svg`),I=(W=(z=C.db).getAccTitle)==null?void 0:W.call(z),D=(H=(j=C.db).getAccDescription)==null?void 0:H.call(j);q5(T,M,I,D),g.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",Ket);let F=g.select(d).node().innerHTML;if(Lt.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),F=ait(F,x,Is(a.arrowMarkerAbsolute)),x){const Y=g.select(d+" svg").node();F=sit(F,Y)}else y||(F=Do.sanitize(F,{ADD_TAGS:eit,ADD_ATTR:iit,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Fet(),_)throw _;return f(),{diagramType:T,svg:F,bindFunctions:C.db.bindFunctions}},"render");function z5(i={}){var n;const e=Cr({},i);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),YY(e),e!=null&&e.theme&&e.theme in Ls?e.themeVariables=Ls[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ls.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?GY(e):_L();mC(r.logLevel),Rm()}L(z5,"initialize");var P5=L((i,e={})=>{const{code:r}=n_(i);return p1.fromText(r,e)},"getDiagramFromText");function q5(i,e,r,n){j5(e,i),D5(e,r,n,e.attr("id"))}L(q5,"addA11yInfo");var Ul=Object.freeze({render:lit,parse:$5,getDiagramFromText:P5,initialize:z5,getConfig:Vi,setConfig:kL,getSiteConfig:_L,updateSiteConfig:KY,reset:L(()=>{Mg()},"reset"),globalReset:L(()=>{Mg(Ch)},"globalReset"),defaultConfig:Ch});mC(Vi().logLevel);Mg(Vi());var cit=L((i,e,r)=>{Lt.warn(i),zC(i)?(r&&r(i.str,i.hash),e.push({...i,message:i.str,error:i})):(r&&r(i),i instanceof Error&&e.push({str:i.message,message:i.message,hash:i.name,error:i}))},"handleError"),U5=L(async function(i={querySelector:".mermaid"}){try{await hit(i)}catch(e){if(zC(e)&&Lt.error(e.str),Dn.parseError&&Dn.parseError(e),!i.suppressErrors)throw Lt.error("Use the suppressErrors option to suppress these errors"),e}},"run"),hit=L(async function({postRenderCallback:i,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Ul.getConfig();Lt.debug(`${i?"":"No "}Callback function found`);let a;if(r)a=r;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");Lt.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(Lt.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),Ul.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const o=new ba.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let c;const h=[];for(const u of Array.from(a)){if(Lt.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const d=`mermaid-${o.next()}`;c=u.innerHTML,c=s3(ba.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const f=ba.detectInit(c);f&&Lt.debug("Detected early reinit: ",f);try{const{svg:g,bindFunctions:x}=await Y5(d,c,u);u.innerHTML=g,i&&await i(d),x&&x(u)}catch(g){cit(g,h,Dn.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),H5=L(function(i){Ul.initialize(i)},"initialize"),uit=L(async function(i,e,r){Lt.warn("mermaid.init is deprecated. Please use run instead."),i&&H5(i);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await U5(n)},"init"),dit=L(async(i,{lazyLoad:e=!0}={})=>{Rm(),Av(...i),e===!1&&await jet()},"registerExternalDiagrams"),W5=L(function(){if(Dn.startOnLoad){const{startOnLoad:i}=Ul.getConfig();i&&Dn.run().catch(e=>Lt.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",W5,!1);var fit=L(function(i){Dn.parseError=i},"setParseErrorHandler"),Qg=[],T0=!1,G5=L(async()=>{if(!T0){for(T0=!0;Qg.length>0;){const i=Qg.shift();if(i)try{await i()}catch(e){Lt.error("Error executing queue",e)}}T0=!1}},"executeQueue"),pit=L(async(i,e)=>new Promise((r,n)=>{const a=L(()=>new Promise((o,c)=>{Ul.parse(i,e).then(h=>{o(h),r(h)},h=>{var u;Lt.error("Error parsing",h),(u=Dn.parseError)==null||u.call(Dn,h),c(h),n(h)})}),"performCall");Qg.push(a),G5().catch(n)}),"parse"),Y5=L((i,e,r)=>new Promise((n,a)=>{const o=L(()=>new Promise((c,h)=>{Ul.render(i,e,r).then(u=>{c(u),n(u)},u=>{var d;Lt.error("Error parsing",u),(d=Dn.parseError)==null||d.call(Dn,u),h(u),a(u)})}),"performCall");Qg.push(o),G5().catch(a)}),"render"),git=L(()=>Object.keys(Il).map(i=>({id:i})),"getRegisteredDiagramsMetadata"),Dn={startOnLoad:!0,mermaidAPI:Ul,parse:pit,render:Y5,init:uit,run:U5,registerExternalDiagrams:dit,registerLayoutLoaders:Zj,initialize:H5,parseError:void 0,contentLoaded:W5,setParseErrorHandler:fit,detectType:yC,registerIconPacks:wZ,getRegisteredDiagramsMetadata:git},s_=Dn;/*! Check if previously processed *//*!
|
|
457
|
-
* Wait for document loaded before starting the execution
|
|
458
|
-
*/let gN=null;function mit(i){const e="'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif";return i==="dark"?{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#1c1f2a",primaryColor:"rgba(157, 140, 255, 0.18)",primaryTextColor:"#f5f6fa",primaryBorderColor:"#9d8cff",secondaryColor:"rgba(96, 165, 250, 0.18)",secondaryBorderColor:"#93c5fd",secondaryTextColor:"#f5f6fa",tertiaryColor:"rgba(74, 222, 128, 0.16)",tertiaryBorderColor:"#86efac",tertiaryTextColor:"#f5f6fa",noteBkgColor:"rgba(251, 191, 36, 0.18)",noteBorderColor:"#fcd34d",noteTextColor:"#fcd34d",lineColor:"#9aa0b3",textColor:"#f5f6fa",mainBkg:"rgba(157, 140, 255, 0.18)",nodeBorder:"#9d8cff",clusterBkg:"rgba(255, 255, 255, 0.04)",clusterBorder:"#3d4358",edgeLabelBackground:"#1c1f2a",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}:{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ede9fe",primaryTextColor:"#5b21b6",primaryBorderColor:"#7b68ee",secondaryColor:"#dbeafe",secondaryBorderColor:"#1d4ed8",secondaryTextColor:"#1d4ed8",tertiaryColor:"#dcfce7",tertiaryBorderColor:"#15803d",tertiaryTextColor:"#15803d",noteBkgColor:"#fef3c7",noteBorderColor:"#a16207",noteTextColor:"#a16207",lineColor:"#646464",textColor:"#292d34",mainBkg:"#ede9fe",nodeBorder:"#7b68ee",clusterBkg:"#f7f8f8",clusterBorder:"#e8e8e8",edgeLabelBackground:"#ffffff",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}}function K5(i){gN!==i&&(s_.initialize(mit(i)),gN=i)}function yit(i){const e=i.getAttribute("style");if(!e)return;const r=e.split(";").filter(n=>{var o;const a=(o=n.trim().split(":")[0])==null?void 0:o.trim().toLowerCase();return a&&a!=="fill"&&a!=="stroke"&&a!=="color"}).join(";");r.trim()?i.setAttribute("style",r):i.removeAttribute("style")}function V5(i){const e=[".node > rect",".node > polygon",".node > path",".node > circle",".node .label",".node .label *",".node foreignObject *",".cluster > rect",".cluster > polygon",".cluster-label",".cluster-label *",".cluster-label foreignObject *",".edgeLabel",".edgeLabel rect",".edgeLabel foreignObject *",".edgePath path",".marker",".arrowheadPath"];i.querySelectorAll(e.join(", ")).forEach(yit);const r=i.querySelector("style");if(r&&r.textContent){const n=r.textContent.replace(/#[\w-]+\s+\.[\w-]+\s*(?:>\s*\*|\s+span|\s+tspan)\s*\{[^}]*\}/g,"");r.textContent=n}}async function bit(i,e){i.querySelectorAll(".mermaid-rendered").forEach(o=>{const c=o.dataset.mermaidSource;if(!c)return;const h=document.createElement("pre"),u=document.createElement("code");u.className="language-mermaid",u.textContent=c,h.appendChild(u),o.replaceWith(h)});const n=i.querySelectorAll("pre > code.language-mermaid");if(n.length===0)return;let a=0;for(const o of n){const c=o.parentElement;if(!c)continue;const h=(o.textContent??"").trim();if(!h)continue;const u=`${e}-${a++}-${Date.now().toString(36)}`,d=document.createElement("div");d.className="mermaid-rendered",d.dataset.mermaidSource=h;const f=document.createElement("div");f.className="mermaid-stage",d.appendChild(f),c.replaceWith(d);try{const{svg:g}=await s_.render(u,h);f.innerHTML=g;const x=f.querySelector("svg");x&&(x.removeAttribute("height"),x.style.maxWidth="100%",x.style.height="auto",V5(x))}catch(g){const x=g instanceof Error?g.message:String(g);f.innerHTML=`<div class="mermaid-error">Diagram error: ${x.replace(/[<>&]/g,y=>({"<":"<",">":">","&":"&"})[y]??y)}</div>`}}}function xit(i,e,r,n="mmd"){P.useEffect(()=>{const a=i.current;if(!a||!e)return;K5(r);let o=!1;return queueMicrotask(()=>{o||bit(a,n)}),()=>{o=!0}},[i,e,r,n])}var E0,mN;function vit(){if(mN)return E0;mN=1;function i(J){return J instanceof Map?J.clear=J.delete=J.set=function(){throw new Error("map is read-only")}:J instanceof Set&&(J.add=J.clear=J.delete=function(){throw new Error("set is read-only")}),Object.freeze(J),Object.getOwnPropertyNames(J).forEach(Et=>{const qt=J[Et],_e=typeof qt;(_e==="object"||_e==="function")&&!Object.isFrozen(qt)&&i(qt)}),J}class e{constructor(Et){Et.data===void 0&&(Et.data={}),this.data=Et.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(J){return J.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function n(J,...Et){const qt=Object.create(null);for(const _e in J)qt[_e]=J[_e];return Et.forEach(function(_e){for(const gi in _e)qt[gi]=_e[gi]}),qt}const a="</span>",o=J=>!!J.scope,c=(J,{prefix:Et})=>{if(J.startsWith("language:"))return J.replace("language:","language-");if(J.includes(".")){const qt=J.split(".");return[`${Et}${qt.shift()}`,...qt.map((_e,gi)=>`${_e}${"_".repeat(gi+1)}`)].join(" ")}return`${Et}${J}`};class h{constructor(Et,qt){this.buffer="",this.classPrefix=qt.classPrefix,Et.walk(this)}addText(Et){this.buffer+=r(Et)}openNode(Et){if(!o(Et))return;const qt=c(Et.scope,{prefix:this.classPrefix});this.span(qt)}closeNode(Et){o(Et)&&(this.buffer+=a)}value(){return this.buffer}span(Et){this.buffer+=`<span class="${Et}">`}}const u=(J={})=>{const Et={children:[]};return Object.assign(Et,J),Et};class d{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Et){this.top.children.push(Et)}openNode(Et){const qt=u({scope:Et});this.add(qt),this.stack.push(qt)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Et){return this.constructor._walk(Et,this.rootNode)}static _walk(Et,qt){return typeof qt=="string"?Et.addText(qt):qt.children&&(Et.openNode(qt),qt.children.forEach(_e=>this._walk(Et,_e)),Et.closeNode(qt)),Et}static _collapse(Et){typeof Et!="string"&&Et.children&&(Et.children.every(qt=>typeof qt=="string")?Et.children=[Et.children.join("")]:Et.children.forEach(qt=>{d._collapse(qt)}))}}class f extends d{constructor(Et){super(),this.options=Et}addText(Et){Et!==""&&this.add(Et)}startScope(Et){this.openNode(Et)}endScope(){this.closeNode()}__addSublanguage(Et,qt){const _e=Et.root;qt&&(_e.scope=`language:${qt}`),this.add(_e)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(J){return J?typeof J=="string"?J:J.source:null}function x(J){return C("(?=",J,")")}function y(J){return C("(?:",J,")*")}function v(J){return C("(?:",J,")?")}function C(...J){return J.map(qt=>g(qt)).join("")}function _(J){const Et=J[J.length-1];return typeof Et=="object"&&Et.constructor===Object?(J.splice(J.length-1,1),Et):{}}function k(...J){return"("+(_(J).capture?"":"?:")+J.map(_e=>g(_e)).join("|")+")"}function T(J){return new RegExp(J.toString()+"|").exec("").length-1}function N(J,Et){const qt=J&&J.exec(Et);return qt&&qt.index===0}const E=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B(J,{joinWith:Et}){let qt=0;return J.map(_e=>{qt+=1;const gi=qt;let Se=g(_e),Jt="";for(;Se.length>0;){const Xt=E.exec(Se);if(!Xt){Jt+=Se;break}Jt+=Se.substring(0,Xt.index),Se=Se.substring(Xt.index+Xt[0].length),Xt[0][0]==="\\"&&Xt[1]?Jt+="\\"+String(Number(Xt[1])+gi):(Jt+=Xt[0],Xt[0]==="("&&qt++)}return Jt}).map(_e=>`(${_e})`).join(Et)}const O=/\b\B/,A="[a-zA-Z]\\w*",M="[a-zA-Z_]\\w*",I="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",U="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",K=(J={})=>{const Et=/^#![ ]*\//;return J.binary&&(J.begin=C(Et,/.*\b/,J.binary,/\b.*/)),n({scope:"meta",begin:Et,end:/$/,relevance:0,"on:begin":(qt,_e)=>{qt.index!==0&&_e.ignoreMatch()}},J)},z={begin:"\\\\[\\s\\S]",relevance:0},W={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},H={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Y=function(J,Et,qt={}){const _e=n({scope:"comment",begin:J,end:Et,contains:[]},qt);_e.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const gi=k("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return _e.contains.push({begin:C(/[ ]+/,"(",gi,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),_e},Z=Y("//","$"),rt=Y("/\\*","\\*/"),G=Y("#","$"),tt={scope:"number",begin:I,relevance:0},ft={scope:"number",begin:D,relevance:0},ct={scope:"number",begin:F,relevance:0},vt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[z,{begin:/\[/,end:/\]/,relevance:0,contains:[z]}]},ot={scope:"title",begin:A,relevance:0},wt={scope:"title",begin:M,relevance:0},it={begin:"\\.\\s*"+M,relevance:0};var at=Object.freeze({__proto__:null,APOS_STRING_MODE:W,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:ct,BINARY_NUMBER_RE:F,COMMENT:Y,C_BLOCK_COMMENT_MODE:rt,C_LINE_COMMENT_MODE:Z,C_NUMBER_MODE:ft,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(J){return Object.assign(J,{"on:begin":(Et,qt)=>{qt.data._beginMatch=Et[1]},"on:end":(Et,qt)=>{qt.data._beginMatch!==Et[1]&&qt.ignoreMatch()}})},HASH_COMMENT_MODE:G,IDENT_RE:A,MATCH_NOTHING_RE:O,METHOD_GUARD:it,NUMBER_MODE:tt,NUMBER_RE:I,PHRASAL_WORDS_MODE:H,QUOTE_STRING_MODE:j,REGEXP_MODE:vt,RE_STARTERS_RE:U,SHEBANG:K,TITLE_MODE:ot,UNDERSCORE_IDENT_RE:M,UNDERSCORE_TITLE_MODE:wt});function Ct(J,Et){J.input[J.index-1]==="."&&Et.ignoreMatch()}function Bt(J,Et){J.className!==void 0&&(J.scope=J.className,delete J.className)}function Ht(J,Et){Et&&J.beginKeywords&&(J.begin="\\b("+J.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",J.__beforeBegin=Ct,J.keywords=J.keywords||J.beginKeywords,delete J.beginKeywords,J.relevance===void 0&&(J.relevance=0))}function re(J,Et){Array.isArray(J.illegal)&&(J.illegal=k(...J.illegal))}function Dt(J,Et){if(J.match){if(J.begin||J.end)throw new Error("begin & end are not supported with match");J.begin=J.match,delete J.match}}function xt(J,Et){J.relevance===void 0&&(J.relevance=1)}const Ut=(J,Et)=>{if(!J.beforeMatch)return;if(J.starts)throw new Error("beforeMatch cannot be used with starts");const qt=Object.assign({},J);Object.keys(J).forEach(_e=>{delete J[_e]}),J.keywords=qt.keywords,J.begin=C(qt.beforeMatch,x(qt.begin)),J.starts={relevance:0,contains:[Object.assign(qt,{endsParent:!0})]},J.relevance=0,delete qt.beforeMatch},Yt=["of","and","for","in","not","or","if","then","parent","list","value"],ht="keyword";function st(J,Et,qt=ht){const _e=Object.create(null);return typeof J=="string"?gi(qt,J.split(" ")):Array.isArray(J)?gi(qt,J):Object.keys(J).forEach(function(Se){Object.assign(_e,st(J[Se],Et,Se))}),_e;function gi(Se,Jt){Et&&(Jt=Jt.map(Xt=>Xt.toLowerCase())),Jt.forEach(function(Xt){const be=Xt.split("|");_e[be[0]]=[Se,Ot(be[0],be[1])]})}}function Ot(J,Et){return Et?Number(Et):$t(J)?0:1}function $t(J){return Yt.includes(J.toLowerCase())}const Gt={},jt=J=>{console.error(J)},ae=(J,...Et)=>{console.log(`WARN: ${J}`,...Et)},It=(J,Et)=>{Gt[`${J}/${Et}`]||(console.log(`Deprecated as of ${J}. ${Et}`),Gt[`${J}/${Et}`]=!0)},je=new Error;function ve(J,Et,{key:qt}){let _e=0;const gi=J[qt],Se={},Jt={};for(let Xt=1;Xt<=Et.length;Xt++)Jt[Xt+_e]=gi[Xt],Se[Xt+_e]=!0,_e+=T(Et[Xt-1]);J[qt]=Jt,J[qt]._emit=Se,J[qt]._multi=!0}function He(J){if(Array.isArray(J.begin)){if(J.skip||J.excludeBegin||J.returnBegin)throw jt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),je;if(typeof J.beginScope!="object"||J.beginScope===null)throw jt("beginScope must be object"),je;ve(J,J.begin,{key:"beginScope"}),J.begin=B(J.begin,{joinWith:""})}}function Be(J){if(Array.isArray(J.end)){if(J.skip||J.excludeEnd||J.returnEnd)throw jt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),je;if(typeof J.endScope!="object"||J.endScope===null)throw jt("endScope must be object"),je;ve(J,J.end,{key:"endScope"}),J.end=B(J.end,{joinWith:""})}}function ki(J){J.scope&&typeof J.scope=="object"&&J.scope!==null&&(J.beginScope=J.scope,delete J.scope)}function Li(J){ki(J),typeof J.beginScope=="string"&&(J.beginScope={_wrap:J.beginScope}),typeof J.endScope=="string"&&(J.endScope={_wrap:J.endScope}),He(J),Be(J)}function Ge(J){function Et(Jt,Xt){return new RegExp(g(Jt),"m"+(J.case_insensitive?"i":"")+(J.unicodeRegex?"u":"")+(Xt?"g":""))}class qt{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Xt,be){be.position=this.position++,this.matchIndexes[this.matchAt]=be,this.regexes.push([be,Xt]),this.matchAt+=T(Xt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Xt=this.regexes.map(be=>be[1]);this.matcherRe=Et(B(Xt,{joinWith:"|"}),!0),this.lastIndex=0}exec(Xt){this.matcherRe.lastIndex=this.lastIndex;const be=this.matcherRe.exec(Xt);if(!be)return null;const mi=be.findIndex((ln,Yr)=>Yr>0&&ln!==void 0),wi=this.matchIndexes[mi];return be.splice(0,mi),Object.assign(be,wi)}}class _e{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Xt){if(this.multiRegexes[Xt])return this.multiRegexes[Xt];const be=new qt;return this.rules.slice(Xt).forEach(([mi,wi])=>be.addRule(mi,wi)),be.compile(),this.multiRegexes[Xt]=be,be}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Xt,be){this.rules.push([Xt,be]),be.type==="begin"&&this.count++}exec(Xt){const be=this.getMatcher(this.regexIndex);be.lastIndex=this.lastIndex;let mi=be.exec(Xt);if(this.resumingScanAtSamePosition()&&!(mi&&mi.index===this.lastIndex)){const wi=this.getMatcher(0);wi.lastIndex=this.lastIndex+1,mi=wi.exec(Xt)}return mi&&(this.regexIndex+=mi.position+1,this.regexIndex===this.count&&this.considerAll()),mi}}function gi(Jt){const Xt=new _e;return Jt.contains.forEach(be=>Xt.addRule(be.begin,{rule:be,type:"begin"})),Jt.terminatorEnd&&Xt.addRule(Jt.terminatorEnd,{type:"end"}),Jt.illegal&&Xt.addRule(Jt.illegal,{type:"illegal"}),Xt}function Se(Jt,Xt){const be=Jt;if(Jt.isCompiled)return be;[Bt,Dt,Li,Ut].forEach(wi=>wi(Jt,Xt)),J.compilerExtensions.forEach(wi=>wi(Jt,Xt)),Jt.__beforeBegin=null,[Ht,re,xt].forEach(wi=>wi(Jt,Xt)),Jt.isCompiled=!0;let mi=null;return typeof Jt.keywords=="object"&&Jt.keywords.$pattern&&(Jt.keywords=Object.assign({},Jt.keywords),mi=Jt.keywords.$pattern,delete Jt.keywords.$pattern),mi=mi||/\w+/,Jt.keywords&&(Jt.keywords=st(Jt.keywords,J.case_insensitive)),be.keywordPatternRe=Et(mi,!0),Xt&&(Jt.begin||(Jt.begin=/\B|\b/),be.beginRe=Et(be.begin),!Jt.end&&!Jt.endsWithParent&&(Jt.end=/\B|\b/),Jt.end&&(be.endRe=Et(be.end)),be.terminatorEnd=g(be.end)||"",Jt.endsWithParent&&Xt.terminatorEnd&&(be.terminatorEnd+=(Jt.end?"|":"")+Xt.terminatorEnd)),Jt.illegal&&(be.illegalRe=Et(Jt.illegal)),Jt.contains||(Jt.contains=[]),Jt.contains=[].concat(...Jt.contains.map(function(wi){return li(wi==="self"?Jt:wi)})),Jt.contains.forEach(function(wi){Se(wi,be)}),Jt.starts&&Se(Jt.starts,Xt),be.matcher=gi(be),be}if(J.compilerExtensions||(J.compilerExtensions=[]),J.contains&&J.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return J.classNameAliases=n(J.classNameAliases||{}),Se(J)}function Ze(J){return J?J.endsWithParent||Ze(J.starts):!1}function li(J){return J.variants&&!J.cachedVariants&&(J.cachedVariants=J.variants.map(function(Et){return n(J,{variants:null},Et)})),J.cachedVariants?J.cachedVariants:Ze(J)?n(J,{starts:J.starts?n(J.starts):null}):Object.isFrozen(J)?n(J):J}var ye="11.11.1";class si extends Error{constructor(Et,qt){super(Et),this.name="HTMLInjectionError",this.html=qt}}const $e=r,Ei=n,Ce=Symbol("nomatch"),Oi=7,Xi=function(J){const Et=Object.create(null),qt=Object.create(null),_e=[];let gi=!0;const Se="Could not find the language '{}', did you forget to load/include a language module?",Jt={disableAutodetect:!0,name:"Plain text",contains:[]};let Xt={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function be(pt){return Xt.noHighlightRe.test(pt)}function mi(pt){let zt=pt.className+" ";zt+=pt.parentNode?pt.parentNode.className:"";const Kt=Xt.languageDetectRe.exec(zt);if(Kt){const de=mr(Kt[1]);return de||(ae(Se.replace("{}",Kt[1])),ae("Falling back to no-highlight mode for this block.",pt)),de?Kt[1]:"no-highlight"}return zt.split(/\s+/).find(de=>be(de)||mr(de))}function wi(pt,zt,Kt){let de="",Ke="";typeof zt=="object"?(de=pt,Kt=zt.ignoreIllegals,Ke=zt.language):(It("10.7.0","highlight(lang, code, ...args) has been deprecated."),It("10.7.0",`Please use highlight(code, options) instead.
|
|
459
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Ke=pt,de=zt),Kt===void 0&&(Kt=!0);const bi={code:de,language:Ke};X("before:highlight",bi);const ii=bi.result?bi.result:ln(bi.language,bi.code,Kt);return ii.code=bi.code,X("after:highlight",ii),ii}function ln(pt,zt,Kt,de){const Ke=Object.create(null);function bi(Wt,ce){return Wt.keywords[ce]}function ii(){if(!Vt.keywords){Ye.addText(Qe);return}let Wt=0;Vt.keywordPatternRe.lastIndex=0;let ce=Vt.keywordPatternRe.exec(Qe),Ie="";for(;ce;){Ie+=Qe.substring(Wt,ce.index);const Je=Rt.case_insensitive?ce[0].toLowerCase():ce[0],Ki=bi(Vt,Je);if(Ki){const[Un,Lh]=Ki;if(Ye.addText(Ie),Ie="",Ke[Je]=(Ke[Je]||0)+1,Ke[Je]<=Oi&&(Fr+=Lh),Un.startsWith("_"))Ie+=ce[0];else{const nf=Rt.classNameAliases[Un]||Un;Qi(ce[0],nf)}}else Ie+=ce[0];Wt=Vt.keywordPatternRe.lastIndex,ce=Vt.keywordPatternRe.exec(Qe)}Ie+=Qe.substring(Wt),Ye.addText(Ie)}function Yi(){if(Qe==="")return;let Wt=null;if(typeof Vt.subLanguage=="string"){if(!Et[Vt.subLanguage]){Ye.addText(Qe);return}Wt=ln(Vt.subLanguage,Qe,!0,ci[Vt.subLanguage]),ci[Vt.subLanguage]=Wt._top}else Wt=lr(Qe,Vt.subLanguage.length?Vt.subLanguage:null);Vt.relevance>0&&(Fr+=Wt.relevance),Ye.__addSublanguage(Wt._emitter,Wt.language)}function Le(){Vt.subLanguage!=null?Yi():ii(),Qe=""}function Qi(Wt,ce){Wt!==""&&(Ye.startScope(ce),Ye.addText(Wt),Ye.endScope())}function zn(Wt,ce){let Ie=1;const Je=ce.length-1;for(;Ie<=Je;){if(!Wt._emit[Ie]){Ie++;continue}const Ki=Rt.classNameAliases[Wt[Ie]]||Wt[Ie],Un=ce[Ie];Ki?Qi(Un,Ki):(Qe=Un,ii(),Qe=""),Ie++}}function la(Wt,ce){return Wt.scope&&typeof Wt.scope=="string"&&Ye.openNode(Rt.classNameAliases[Wt.scope]||Wt.scope),Wt.beginScope&&(Wt.beginScope._wrap?(Qi(Qe,Rt.classNameAliases[Wt.beginScope._wrap]||Wt.beginScope._wrap),Qe=""):Wt.beginScope._multi&&(zn(Wt.beginScope,ce),Qe="")),Vt=Object.create(Wt,{parent:{value:Vt}}),Vt}function Ps(Wt,ce,Ie){let Je=N(Wt.endRe,Ie);if(Je){if(Wt["on:end"]){const Ki=new e(Wt);Wt["on:end"](ce,Ki),Ki.isMatchIgnored&&(Je=!1)}if(Je){for(;Wt.endsParent&&Wt.parent;)Wt=Wt.parent;return Wt}}if(Wt.endsWithParent)return Ps(Wt.parent,ce,Ie)}function Ja(Wt){return Vt.matcher.regexIndex===0?(Qe+=Wt[0],1):(Us=!0,0)}function Wo(Wt){const ce=Wt[0],Ie=Wt.rule,Je=new e(Ie),Ki=[Ie.__beforeBegin,Ie["on:begin"]];for(const Un of Ki)if(Un&&(Un(Wt,Je),Je.isMatchIgnored))return Ja(ce);return Ie.skip?Qe+=ce:(Ie.excludeBegin&&(Qe+=ce),Le(),!Ie.returnBegin&&!Ie.excludeBegin&&(Qe=ce)),la(Ie,Wt),Ie.returnBegin?0:ce.length}function Nr(Wt){const ce=Wt[0],Ie=zt.substring(Wt.index),Je=Ps(Vt,Wt,Ie);if(!Je)return Ce;const Ki=Vt;Vt.endScope&&Vt.endScope._wrap?(Le(),Qi(ce,Vt.endScope._wrap)):Vt.endScope&&Vt.endScope._multi?(Le(),zn(Vt.endScope,Wt)):Ki.skip?Qe+=ce:(Ki.returnEnd||Ki.excludeEnd||(Qe+=ce),Le(),Ki.excludeEnd&&(Qe=ce));do Vt.scope&&Ye.closeNode(),!Vt.skip&&!Vt.subLanguage&&(Fr+=Vt.relevance),Vt=Vt.parent;while(Vt!==Je.parent);return Je.starts&&la(Je.starts,Wt),Ki.returnEnd?0:ce.length}function Pn(){const Wt=[];for(let ce=Vt;ce!==Rt;ce=ce.parent)ce.scope&&Wt.unshift(ce.scope);Wt.forEach(ce=>Ye.openNode(ce))}let yt={};function Ft(Wt,ce){const Ie=ce&&ce[0];if(Qe+=Wt,Ie==null)return Le(),0;if(yt.type==="begin"&&ce.type==="end"&&yt.index===ce.index&&Ie===""){if(Qe+=zt.slice(ce.index,ce.index+1),!gi){const Je=new Error(`0 width match regex (${pt})`);throw Je.languageName=pt,Je.badRule=yt.rule,Je}return 1}if(yt=ce,ce.type==="begin")return Wo(ce);if(ce.type==="illegal"&&!Kt){const Je=new Error('Illegal lexeme "'+Ie+'" for mode "'+(Vt.scope||"<unnamed>")+'"');throw Je.mode=Vt,Je}else if(ce.type==="end"){const Je=Nr(ce);if(Je!==Ce)return Je}if(ce.type==="illegal"&&Ie==="")return Qe+=`
|
|
460
|
-
`,1;if(qs>1e5&&qs>ce.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Qe+=Ie,Ie.length}const Rt=mr(pt);if(!Rt)throw jt(Se.replace("{}",pt)),new Error('Unknown language: "'+pt+'"');const Zt=Ge(Rt);let Pe="",Vt=de||Zt;const ci={},Ye=new Xt.__emitter(Xt);Pn();let Qe="",Fr=0,qn=0,qs=0,Us=!1;try{if(Rt.__emitTokens)Rt.__emitTokens(zt,Ye);else{for(Vt.matcher.considerAll();;){qs++,Us?Us=!1:Vt.matcher.considerAll(),Vt.matcher.lastIndex=qn;const Wt=Vt.matcher.exec(zt);if(!Wt)break;const ce=zt.substring(qn,Wt.index),Ie=Ft(ce,Wt);qn=Wt.index+Ie}Ft(zt.substring(qn))}return Ye.finalize(),Pe=Ye.toHTML(),{language:pt,value:Pe,relevance:Fr,illegal:!1,_emitter:Ye,_top:Vt}}catch(Wt){if(Wt.message&&Wt.message.includes("Illegal"))return{language:pt,value:$e(zt),illegal:!0,relevance:0,_illegalBy:{message:Wt.message,index:qn,context:zt.slice(qn-100,qn+100),mode:Wt.mode,resultSoFar:Pe},_emitter:Ye};if(gi)return{language:pt,value:$e(zt),illegal:!1,relevance:0,errorRaised:Wt,_emitter:Ye,_top:Vt};throw Wt}}function Yr(pt){const zt={value:$e(pt),illegal:!1,relevance:0,_top:Jt,_emitter:new Xt.__emitter(Xt)};return zt._emitter.addText(pt),zt}function lr(pt,zt){zt=zt||Xt.languages||Object.keys(Et);const Kt=Yr(pt),de=zt.filter(mr).filter(cn).map(Le=>ln(Le,pt,!1));de.unshift(Kt);const Ke=de.sort((Le,Qi)=>{if(Le.relevance!==Qi.relevance)return Qi.relevance-Le.relevance;if(Le.language&&Qi.language){if(mr(Le.language).supersetOf===Qi.language)return 1;if(mr(Qi.language).supersetOf===Le.language)return-1}return 0}),[bi,ii]=Ke,Yi=bi;return Yi.secondBest=ii,Yi}function cr(pt,zt,Kt){const de=zt&&qt[zt]||Kt;pt.classList.add("hljs"),pt.classList.add(`language-${de}`)}function Ri(pt){let zt=null;const Kt=mi(pt);if(be(Kt))return;if(X("before:highlightElement",{el:pt,language:Kt}),pt.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",pt);return}if(pt.children.length>0&&(Xt.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(pt)),Xt.throwUnescapedHTML))throw new si("One of your code blocks includes unescaped HTML.",pt.innerHTML);zt=pt;const de=zt.textContent,Ke=Kt?wi(de,{language:Kt,ignoreIllegals:!0}):lr(de);pt.innerHTML=Ke.value,pt.dataset.highlighted="yes",cr(pt,Kt,Ke.language),pt.result={language:Ke.language,re:Ke.relevance,relevance:Ke.relevance},Ke.secondBest&&(pt.secondBest={language:Ke.secondBest.language,relevance:Ke.secondBest.relevance}),X("after:highlightElement",{el:pt,result:Ke,text:de})}function Zi(pt){Xt=Ei(Xt,pt)}const kn=()=>{Sn(),It("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function In(){Sn(),It("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let wn=!1;function Sn(){function pt(){Sn()}if(document.readyState==="loading"){wn||window.addEventListener("DOMContentLoaded",pt,!1),wn=!0;return}document.querySelectorAll(Xt.cssSelector).forEach(Ri)}function Er(pt,zt){let Kt=null;try{Kt=zt(J)}catch(de){if(jt("Language definition for '{}' could not be registered.".replace("{}",pt)),gi)jt(de);else throw de;Kt=Jt}Kt.name||(Kt.name=pt),Et[pt]=Kt,Kt.rawDefinition=zt.bind(null,J),Kt.aliases&&Kr(Kt.aliases,{languageName:pt})}function $n(pt){delete Et[pt];for(const zt of Object.keys(qt))qt[zt]===pt&&delete qt[zt]}function Ea(){return Object.keys(Et)}function mr(pt){return pt=(pt||"").toLowerCase(),Et[pt]||Et[qt[pt]]}function Kr(pt,{languageName:zt}){typeof pt=="string"&&(pt=[pt]),pt.forEach(Kt=>{qt[Kt.toLowerCase()]=zt})}function cn(pt){const zt=mr(pt);return zt&&!zt.disableAutodetect}function yr(pt){pt["before:highlightBlock"]&&!pt["before:highlightElement"]&&(pt["before:highlightElement"]=zt=>{pt["before:highlightBlock"](Object.assign({block:zt.el},zt))}),pt["after:highlightBlock"]&&!pt["after:highlightElement"]&&(pt["after:highlightElement"]=zt=>{pt["after:highlightBlock"](Object.assign({block:zt.el},zt))})}function yi(pt){yr(pt),_e.push(pt)}function ee(pt){const zt=_e.indexOf(pt);zt!==-1&&_e.splice(zt,1)}function X(pt,zt){const Kt=pt;_e.forEach(function(de){de[Kt]&&de[Kt](zt)})}function Tt(pt){return It("10.7.0","highlightBlock will be removed entirely in v12.0"),It("10.7.0","Please use highlightElement now."),Ri(pt)}Object.assign(J,{highlight:wi,highlightAuto:lr,highlightAll:Sn,highlightElement:Ri,highlightBlock:Tt,configure:Zi,initHighlighting:kn,initHighlightingOnLoad:In,registerLanguage:Er,unregisterLanguage:$n,listLanguages:Ea,getLanguage:mr,registerAliases:Kr,autoDetection:cn,inherit:Ei,addPlugin:yi,removePlugin:ee}),J.debugMode=function(){gi=!1},J.safeMode=function(){gi=!0},J.versionString=ye,J.regex={concat:C,lookahead:x,either:k,optional:v,anyNumberOfTimes:y};for(const pt in at)typeof at[pt]=="object"&&i(at[pt]);return Object.assign(J,at),J},Ni=Xi({});return Ni.newInstance=()=>Xi({}),E0=Ni,Ni.HighlightJS=Ni,Ni.default=Ni,E0}var N0,yN;function Cit(){if(yN)return N0;yN=1;function i(e){const r=e.regex,n=r.concat(/[\p{L}_]/u,r.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},h=e.inherit(c,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[c,d,u,h,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,h,d,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:r.concat(/</,r.lookahead(r.concat(n,r.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:f}]},{className:"tag",begin:r.concat(/<\//,r.lookahead(r.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return N0=i,N0}var A0,bN;function _it(){if(bN)return A0;bN=1;function i(e){const r=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:r.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},c=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),h={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(u);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},g={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),C={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},_=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],T={match:/(\/[a-z._-]+)+/},N=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:_,literal:k,built_in:[...N,...E,"set","shopt",...B,...O]},contains:[v,e.SHEBANG(),C,x,c,h,T,u,d,f,g,n]}}return A0=i,A0}var M0,xN;function kit(){if(xN)return M0;xN=1;function i(e){const r=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",h="("+a+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:r.optional(o)+e.IDENT_RE,relevance:0},v=r.optional(o)+e.IDENT_RE+"\\s*\\(",k={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},T=[x,u,n,e.C_BLOCK_COMMENT_MODE,g,f],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:T.concat([{begin:/\(/,end:/\)/,keywords:k,contains:T.concat(["self"]),relevance:0}]),relevance:0},E={begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:k,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:k,disableAutodetect:!0,illegal:"</",contains:[].concat(N,E,T,[x,{begin:e.IDENT_RE+"::",keywords:k},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:x,strings:f,keywords:k}}}return M0=i,M0}var B0,vN;function wit(){if(vN)return B0;vN=1;function i(e){const r=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",h="(?!struct)("+a+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:r.optional(o)+e.IDENT_RE,relevance:0},v=r.optional(o)+e.IDENT_RE+"\\s*\\(",C=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],B={type:_,keyword:C,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},O={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},A=[O,x,u,n,e.C_BLOCK_COMMENT_MODE,g,f],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:B,contains:A.concat([{begin:/\(/,end:/\)/,keywords:B,contains:A.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:B,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:B,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:B,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,I,O,A,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:B,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:B},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return B0=i,B0}var L0,CN;function Sit(){if(CN)return L0;CN=1;function i(e){const r=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],c=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],h={keyword:o.concat(c),built_in:r,literal:a},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:h},v=e.inherit(y,{illegal:/\n/}),C={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},_={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},k=e.inherit(_,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});y.contains=[_,C,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],v.contains=[k,C,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[f,_,C,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},N={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},E=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",B={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:h,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},T,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,N,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,N,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+E+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:h,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,N],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,relevance:0,contains:[T,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},B]}}return L0=i,L0}var O0,_N;function Tit(){if(_N)return O0;_N=1;const i=d=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:d.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:d.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...r],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(d){const f=d.regex,g=i(d),x={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},y="and or not only",v=/@-?\w[\w]*(-\w+)*/,C="[a-zA-Z-][a-zA-Z0-9_-]*",_=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[g.BLOCK_COMMENT,x,g.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+C,relevance:0},g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[g.BLOCK_COMMENT,g.HEXCOLOR,g.IMPORTANT,g.CSS_NUMBER_MODE,..._,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[..._,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},g.FUNCTION_DISPATCH]},{begin:f.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:v},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:y,attribute:a.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},..._,g.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b"}]}}return O0=u,O0}var R0,kN;function Eit(){if(kN)return R0;kN=1;function i(e){const r=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},h={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:r.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},x=e.inherit(f,{contains:[]}),y=e.inherit(g,{contains:[]});f.contains.push(y),g.contains.push(x);let v=[n,d];return[f,g,x,y].forEach(T=>{T.contains=T.contains.concat(v)}),v=v.concat(f,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},n,c,f,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},o,a,d,h,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return R0=i,R0}var j0,wN;function Nit(){if(wN)return j0;wN=1;function i(e){const r=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:r.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:r.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return j0=i,j0}var D0,SN;function Ait(){if(SN)return D0;SN=1;function i(e){const r=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=r.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=r.concat(a,/(::\w+)*/),h={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[u]}),e.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:h},x={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:r.concat(/<<[-~]?'?/,r.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",C={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:h}]},A=[x,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:h},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:h},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:n}],relevance:0},C,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:h},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);g.contains=A,_.contains=A;const F=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:h,contains:A}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:h,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(F).concat(f).concat(A)}}return D0=i,D0}var F0,TN;function Mit(){if(TN)return F0;TN=1;function i(e){const c={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:c,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,illegal:/["']/}]}]}}return F0=i,F0}var I0,EN;function Bit(){if(EN)return I0;EN=1;function i(e){const r=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:r.concat(n,r.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return I0=i,I0}var $0,NN;function Lit(){if(NN)return $0;NN=1;function i(e){const r=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},c={className:"literal",begin:/\bon|off|true|false|yes|no\b/},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[a,c,o,h,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,g=/'[^']*'/,x=r.either(d,f,g),y=r.concat(x,"(\\s*\\.\\s*",x,")*",r.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[a,u,c,o,h,n]}}]}}return $0=i,$0}var z0,AN;function Oit(){if(AN)return z0;AN=1;var i="[0-9](_*[0-9])*",e=`\\.(${i})`,r="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${i})((${e})|\\.)?|(${e}))[eE][+-]?(${i})[fFdD]?\\b`},{begin:`\\b(${i})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${i})[fFdD]\\b`},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?(${i})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(c,h,u){return u===-1?"":c.replace(h,d=>a(c,h,u-1))}function o(c){const h=c.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",d=u+a("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),v={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},C={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},_={className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:v,illegal:/<\/|#/,contains:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[c.BACKSLASH_ESCAPE]},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[h.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[_,c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+d+"\\s+)",c.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:v,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[C,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,n,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},n,C]}}return z0=o,z0}var P0,MN;function Rit(){if(MN)return P0;MN=1;const i="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],r=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],h=[].concat(o,n,a);function u(d){const f=d.regex,g=(wt,{after:it})=>{const V="</"+wt[0].slice(1);return wt.input.indexOf(V,it)!==-1},x=i,y={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,C={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(wt,it)=>{const V=wt[0].length+wt.index,at=wt.input[V];if(at==="<"||at===","){it.ignoreMatch();return}at===">"&&(g(wt,{after:V})||it.ignoreMatch());let Ct;const Bt=wt.input.substring(V);if(Ct=Bt.match(/^\s*=/)){it.ignoreMatch();return}if((Ct=Bt.match(/^\s+extends\s+/))&&Ct.index===0){it.ignoreMatch();return}}},_={$pattern:i,keyword:e,literal:r,built_in:h,"variable.language":c},k="[0-9](_?[0-9])*",T=`\\.(${k})`,N="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${N})((${T})|\\.)?|(${T}))[eE][+-]?(${k})\\b`},{begin:`\\b(${N})\\b((${T})\\b|\\.)?|(${T})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},B={className:"subst",begin:"\\$\\{",end:"\\}",keywords:_,contains:[]},O={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"css"}},M={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"graphql"}},I={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,B]},F={className:"comment",variants:[d.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:x+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),d.C_BLOCK_COMMENT_MODE,d.C_LINE_COMMENT_MODE]},U=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,O,A,M,I,{match:/\$\d+/},E];B.contains=U.concat({begin:/\{/,end:/\}/,keywords:_,contains:["self"].concat(U)});const K=[].concat(F,B.contains),z=K.concat([{begin:/(\s*)\(/,end:/\)/,keywords:_,contains:["self"].concat(K)}]),W={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:z},j={variants:[{match:[/class/,/\s+/,x,/\s+/,/extends/,/\s+/,f.concat(x,"(",f.concat(/\./,x),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,x],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:f.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},Y={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},Z={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[W],illegal:/%/},rt={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(wt){return f.concat("(?!",wt.join("|"),")")}const tt={match:f.concat(/\b/,G([...o,"super","import"].map(wt=>`${wt}\\s*\\(`)),x,f.lookahead(/\s*\(/)),className:"title.function",relevance:0},ft={begin:f.concat(/\./,f.lookahead(f.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ct={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},W]},vt="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",ot={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(vt)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[W]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:_,exports:{PARAMS_CONTAINS:z,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),Y,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,O,A,M,I,F,{match:/\$\d+/},E,H,{scope:"attr",match:x+f.lookahead(":"),relevance:0},ot,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[F,d.REGEXP_MODE,{className:"function",begin:vt,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:z}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:y.begin,end:y.end},{match:v},{begin:C.begin,"on:begin":C.isTrulyOpeningTag,end:C.end}],subLanguage:"xml",contains:[{begin:C.begin,end:C.end,skip:!0,contains:["self"]}]}]},Z,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[W,d.inherit(d.TITLE_MODE,{begin:x,className:"title.function"})]},{match:/\.\.\./,relevance:0},ft,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[W]},tt,rt,j,ct,{match:/\$[(.]/}]}}return P0=u,P0}var q0,BN;function jit(){if(BN)return q0;BN=1;function i(e){const r={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],o={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[r,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return q0=i,q0}var U0,LN;function Dit(){if(LN)return U0;LN=1;var i="[0-9](_*[0-9])*",e=`\\.(${i})`,r="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${i})((${e})|\\.)?|(${e}))[eE][+-]?(${i})[fFdD]?\\b`},{begin:`\\b(${i})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${i})[fFdD]\\b`},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?(${i})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(o){const c={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},h={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:o.UNDERSCORE_IDENT_RE+"@"},d={className:"subst",begin:/\$\{/,end:/\}/,contains:[o.C_NUMBER_MODE]},f={className:"variable",begin:"\\$"+o.UNDERSCORE_IDENT_RE},g={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[f,d]},{begin:"'",end:"'",illegal:/\n/,contains:[o.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[o.BACKSLASH_ESCAPE,f,d]}]};d.contains.push(g);const x={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+o.UNDERSCORE_IDENT_RE+")?"},y={className:"meta",begin:"@"+o.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[o.inherit(g,{className:"string"}),"self"]}]},v=n,C=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),_={variants:[{className:"type",begin:o.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},k=_;return k.variants[1].contains=[_],_.variants[1].contains=[k],{name:"Kotlin",aliases:["kt","kts"],keywords:c,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),o.C_LINE_COMMENT_MODE,C,h,u,x,y,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:o.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[o.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[_,o.C_LINE_COMMENT_MODE,C],relevance:0},o.C_LINE_COMMENT_MODE,C,x,y,g,o.C_NUMBER_MODE]},C]},{begin:[/class|interface|trait/,/\s+/,o.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},o.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},x,y]},g,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
461
|
-
`},v]}}return U0=a,U0}var H0,ON;function Fit(){if(ON)return H0;ON=1;const i=f=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:f.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:f.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...r],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=o.concat(c).sort().reverse();function d(f){const g=i(f),x=u,y="and or not only",v="[\\w-]+",C="("+v+"|@\\{"+v+"\\})",_=[],k=[],T=function(K){return{className:"string",begin:"~?"+K+".*?"+K}},N=function(K,z,W){return{className:K,begin:z,relevance:W}},E={$pattern:/[a-z-]+/,keyword:y,attribute:a.join(" ")},B={begin:"\\(",end:"\\)",contains:k,keywords:E,relevance:0};k.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,T("'"),T('"'),g.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},g.HEXCOLOR,B,N("variable","@@?"+v,10),N("variable","@\\{"+v+"\\}"),N("built_in","~?`[^`]*?`"),{className:"attribute",begin:v+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},g.IMPORTANT,{beginKeywords:"and not"},g.FUNCTION_DISPATCH);const O=k.concat({begin:/\{/,end:/\}/,contains:_}),A={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(k)},M={begin:C+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:k}}]},I={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:E,returnEnd:!0,contains:k,relevance:0}},D={className:"variable",variants:[{begin:"@"+v+"\\s*:",relevance:15},{begin:"@"+v}],starts:{end:"[;}]",returnEnd:!0,contains:O}},F={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:C,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,A,N("keyword","all\\b"),N("variable","@\\{"+v+"\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},g.CSS_NUMBER_MODE,N("selector-tag",C,0),N("selector-id","#"+C),N("selector-class","\\."+C,0),N("selector-tag","&",0),g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:O},{begin:"!important"},g.FUNCTION_DISPATCH]},U={begin:v+`:(:)?(${x.join("|")})`,returnBegin:!0,contains:[F]};return _.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,I,D,U,M,F,A,g.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:_}}return H0=d,H0}var W0,RN;function Iit(){if(RN)return W0;RN=1;function i(e){const r="\\[=*\\[",n="\\]=*\\]",a={begin:r,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+r+")","$"),e.COMMENT("--"+r,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:r,end:n,contains:[a],relevance:5}])}}return W0=i,W0}var G0,jN;function $it(){if(jN)return G0;jN=1;function i(e){const r={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[r,n]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},c={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},h={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[r]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,r,n,a,o,c,h]}}return G0=i,G0}var Y0,DN;function zit(){if(DN)return Y0;DN=1;function i(e){const r=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},h={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:r.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,c,d],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(_,k,T="\\1")=>{const N=T==="\\1"?T:r.concat(T,k);return r.concat(r.concat("(?:",_,")"),k,/(?:\\.|[^\\\/])*?/,N,/(?:\\.|[^\\\/])*?/,T,a)},v=(_,k,T)=>r.concat(r.concat("(?:",_,")"),k,/(?:\\.|[^\\\/])*?/,T,a),C=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),h,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",r.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",r.either(...x,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=C,h.contains=C,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:C}}return Y0=i,Y0}var K0,FN;function Pit(){if(FN)return K0;FN=1;function i(e){const r={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}return K0=i,K0}var V0,IN;function qit(){if(IN)return V0;IN=1;function i(e){const r=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=r.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=r.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),c=r.concat(/[A-Z]+/,n),h={scope:"variable",match:"\\$+"+a},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),x={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(W,j)=>{j.data._beginMatch=W[1]||W[2]},"on:end":(W,j)=>{j.data._beginMatch!==W[1]&&j.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
462
|
-
]`,C={scope:"string",variants:[g,f,x,y]},_={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},k=["false","null","true"],T=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],N=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],B={keyword:T,literal:(W=>{const j=[];return W.forEach(H=>{j.push(H),H.toLowerCase()===H?j.push(H.toUpperCase()):j.push(H.toLowerCase())}),j})(k),built_in:N},O=W=>W.map(j=>j.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,r.concat(v,"+"),r.concat("(?!",O(N).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},M=r.concat(a,"\\b(?!\\()"),I={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,r.concat(/::/,r.lookahead(/(?!class\b)/)),M],scope:{1:"title.class",3:"variable.constant"}},{match:[o,r.concat("::",r.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},D={scope:"attr",match:r.concat(a,r.lookahead(":"),r.lookahead(/(?!::)/))},F={relevance:0,begin:/\(/,end:/\)/,keywords:B,contains:[D,h,I,e.C_BLOCK_COMMENT_MODE,C,_,A]},U={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",O(T).join("\\b|"),"|",O(N).join("\\b|"),"\\b)"),a,r.concat(v,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[F]};F.contains.push(U);const K=[D,I,e.C_BLOCK_COMMENT_MODE,C,_,A],z={begin:r.concat(/#\[\s*\\?/,r.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:B,contains:[z,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},h,U,I,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:B,contains:["self",z,h,I,e.C_BLOCK_COMMENT_MODE,C,_]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},C,_]}}return V0=i,V0}var X0,$N;function Uit(){if($N)return X0;$N=1;function i(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return X0=i,X0}var Z0,zN;function Hit(){if(zN)return Z0;zN=1;function i(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Z0=i,Z0}var Q0,PN;function Wit(){if(PN)return Q0;PN=1;function i(e){const r=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},g={begin:/\{\{/,relevance:0},x={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,g,f]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",v=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,C=`\\b|${a.join("|")}`,_={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${C})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${C})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${C})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${C})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${C})`},{begin:`\\b(${y})[jJ](?=${C})`}]},k={className:"comment",begin:r.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},T={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",d,_,x,e.HASH_COMMENT_MODE]}]};return f.contains=[x,_,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[d,_,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[T]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[_,T,x]}]}}return Q0=i,Q0}var J0,qN;function Git(){if(qN)return J0;qN=1;function i(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return J0=i,J0}var tx,UN;function Yit(){if(UN)return tx;UN=1;function i(e){const r=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=r.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,c=r.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:r.lookahead(r.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[c,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return tx=i,tx}var ex,HN;function Kit(){if(HN)return ex;HN=1;function i(e){const r=e.regex,n=/(r#)?/,a=r.concat(n,e.UNDERSCORE_IDENT_RE),o=r.concat(n,e.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:r.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,r.lookahead(/\s*\(/))},h="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],f=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:u,literal:d,built_in:f},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+h},{begin:"\\b0o([0-7_]+)"+h},{begin:"\\b0x([A-Fa-f0-9_]+)"+h},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+h}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:f,type:g}},{className:"punctuation",begin:"->"},c]}}return ex=i,ex}var ix,WN;function Vit(){if(WN)return ix;WN=1;const i=d=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:d.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:d.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...r],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(d){const f=i(d),g=c,x=o,y="@[a-z-]+",v="and or not only",_={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,f.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+x.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+g.join("|")+")"},_,{begin:/\(/,end:/\)/,contains:[f.CSS_NUMBER_MODE]},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[f.BLOCK_COMMENT,_,f.HEXCOLOR,f.CSS_NUMBER_MODE,d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,f.IMPORTANT,f.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:y,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:v,attribute:a.join(" ")},contains:[{begin:y,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},_,d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,f.HEXCOLOR,f.CSS_NUMBER_MODE]},f.FUNCTION_DISPATCH]}}return ix=u,ix}var rx,GN;function Xit(){if(GN)return rx;GN=1;function i(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return rx=i,rx}var nx,YN;function Zit(){if(YN)return nx;YN=1;function i(e){const r=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],h=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,C=[...f,...d].filter(O=>!g.includes(O)),_={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},T={match:r.concat(/\b/,r.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function N(O){return r.concat(/\b/,r.either(...O.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const E={scope:"keyword",match:N(y),relevance:0};function B(O,{exceptions:A,when:M}={}){const I=M;return A=A||[],O.map(D=>D.match(/\|\d+$/)||A.includes(D)?D:I(D)?`${D}|0`:D)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:B(C,{when:O=>O.length<3}),literal:c,type:u,built_in:x},contains:[{scope:"type",match:N(h)},E,T,_,a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}return nx=i,nx}var ax,KN;function Qit(){if(KN)return ax;KN=1;function i(M){return M?typeof M=="string"?M:M.source:null}function e(M){return r("(?=",M,")")}function r(...M){return M.map(D=>i(D)).join("")}function n(M){const I=M[M.length-1];return typeof I=="object"&&I.constructor===Object?(M.splice(M.length-1,1),I):{}}function a(...M){return"("+(n(M).capture?"":"?:")+M.map(F=>i(F)).join("|")+")"}const o=M=>r(/\b/,M,/\w$/.test(M)?/\b/:/\B/),c=["Protocol","Type"].map(o),h=["init","self"].map(o),u=["Any","Self"],d=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],f=["false","nil","true"],g=["assignment","associativity","higherThan","left","lowerThan","none","right"],x=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],y=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],v=a(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),C=a(v,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_=r(v,C,"*"),k=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),T=a(k,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),N=r(k,T,"*"),E=r(/[A-Z]/,T,"*"),B=["attached","autoclosure",r(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",r(/objc\(/,N,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],O=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function A(M){const I={match:/\s+/,relevance:0},D=M.COMMENT("/\\*","\\*/",{contains:["self"]}),F=[M.C_LINE_COMMENT_MODE,D],U={match:[/\./,a(...c,...h)],className:{2:"keyword"}},K={match:r(/\./,a(...d)),relevance:0},z=d.filter(Ce=>typeof Ce=="string").concat(["_|0"]),W=d.filter(Ce=>typeof Ce!="string").concat(u).map(o),j={variants:[{className:"keyword",match:a(...W,...h)}]},H={$pattern:a(/\b\w+/,/#\w+/),keyword:z.concat(x),literal:f},Y=[U,K,j],Z={match:r(/\./,a(...y)),relevance:0},rt={className:"built_in",match:r(/\b/,a(...y),/(?=\()/)},G=[Z,rt],tt={match:/->/,relevance:0},ft={className:"operator",relevance:0,variants:[{match:_},{match:`\\.(\\.|${C})+`}]},ct=[tt,ft],vt="([0-9]_*)+",ot="([0-9a-fA-F]_*)+",wt={className:"number",relevance:0,variants:[{match:`\\b(${vt})(\\.(${vt}))?([eE][+-]?(${vt}))?\\b`},{match:`\\b0x(${ot})(\\.(${ot}))?([pP][+-]?(${vt}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},it=(Ce="")=>({className:"subst",variants:[{match:r(/\\/,Ce,/[0\\tnr"']/)},{match:r(/\\/,Ce,/u\{[0-9a-fA-F]{1,8}\}/)}]}),V=(Ce="")=>({className:"subst",match:r(/\\/,Ce,/[\t ]*(?:[\r\n]|\r\n)/)}),at=(Ce="")=>({className:"subst",label:"interpol",begin:r(/\\/,Ce,/\(/),end:/\)/}),Ct=(Ce="")=>({begin:r(Ce,/"""/),end:r(/"""/,Ce),contains:[it(Ce),V(Ce),at(Ce)]}),Bt=(Ce="")=>({begin:r(Ce,/"/),end:r(/"/,Ce),contains:[it(Ce),at(Ce)]}),Ht={className:"string",variants:[Ct(),Ct("#"),Ct("##"),Ct("###"),Bt(),Bt("#"),Bt("##"),Bt("###")]},re=[M.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[M.BACKSLASH_ESCAPE]}],Dt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:re},xt=Ce=>{const Oi=r(Ce,/\//),Xi=r(/\//,Ce);return{begin:Oi,end:Xi,contains:[...re,{scope:"comment",begin:`#(?!.*${Xi})`,end:/$/}]}},Ut={scope:"regexp",variants:[xt("###"),xt("##"),xt("#"),Dt]},Yt={match:r(/`/,N,/`/)},ht={className:"variable",match:/\$\d+/},st={className:"variable",match:`\\$${T}+`},Ot=[Yt,ht,st],$t={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:O,contains:[...ct,wt,Ht]}]}},Gt={scope:"keyword",match:r(/@/,a(...B),e(a(/\(/,/\s+/)))},jt={scope:"meta",match:r(/@/,N)},ae=[$t,Gt,jt],It={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:r(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,T,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:r(/\s+&\s+/,e(E)),relevance:0}]},je={begin:/</,end:/>/,keywords:H,contains:[...F,...Y,...ae,tt,It]};It.contains.push(je);const ve={match:r(N,/\s*:/),keywords:"_|0",relevance:0},He={begin:/\(/,end:/\)/,relevance:0,keywords:H,contains:["self",ve,...F,Ut,...Y,...G,...ct,wt,Ht,...Ot,...ae,It]},Be={begin:/</,end:/>/,keywords:"repeat each",contains:[...F,It]},ki={begin:a(e(r(N,/\s*:/)),e(r(N,/\s+/,N,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:N}]},Li={begin:/\(/,end:/\)/,keywords:H,contains:[ki,...F,...Y,...ct,wt,Ht,...ae,It,He],endsParent:!0,illegal:/["']/},Ge={match:[/(func|macro)/,/\s+/,a(Yt.match,N,_)],className:{1:"keyword",3:"title.function"},contains:[Be,Li,I],illegal:[/\[/,/%/]},Ze={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Be,Li,I],illegal:/\[|%/},li={match:[/operator/,/\s+/,_],className:{1:"keyword",3:"title"}},ye={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[It],keywords:[...g,...f],end:/}/},si={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},$e={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ei={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,N,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:H,contains:[Be,...Y,{begin:/:/,end:/\{/,keywords:H,contains:[{scope:"title.class.inherited",match:E},...Y],relevance:0}]};for(const Ce of Ht.variants){const Oi=Ce.contains.find(Ni=>Ni.label==="interpol");Oi.keywords=H;const Xi=[...Y,...G,...ct,wt,Ht,...Ot];Oi.contains=[...Xi,{begin:/\(/,end:/\)/,contains:["self",...Xi]}]}return{name:"Swift",keywords:H,contains:[...F,Ge,Ze,si,$e,Ei,li,ye,{beginKeywords:"import",end:/$/,contains:[...F],relevance:0},Ut,...Y,...G,...ct,wt,Ht,...Ot,...ae,It,He]}}return ax=A,ax}var sx,VN;function Jit(){if(VN)return sx;VN=1;function i(e){const r="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},h={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},u=e.inherit(h,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:r,relevance:0},C={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},_={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},k=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:r,keywords:{literal:r}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},C,_,c,h],T=[...k];return T.pop(),T.push(u),v.contains=T,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}return sx=i,sx}var ox,XN;function trt(){if(XN)return ox;XN=1;const i="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],r=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],h=[].concat(o,n,a);function u(f){const g=f.regex,x=(it,{after:V})=>{const at="</"+it[0].slice(1);return it.input.indexOf(at,V)!==-1},y=i,v={begin:"<>",end:"</>"},C=/<[A-Za-z0-9\\._:-]+\s*\/>/,_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(it,V)=>{const at=it[0].length+it.index,Ct=it.input[at];if(Ct==="<"||Ct===","){V.ignoreMatch();return}Ct===">"&&(x(it,{after:at})||V.ignoreMatch());let Bt;const Ht=it.input.substring(at);if(Bt=Ht.match(/^\s*=/)){V.ignoreMatch();return}if((Bt=Ht.match(/^\s+extends\s+/))&&Bt.index===0){V.ignoreMatch();return}}},k={$pattern:i,keyword:e,literal:r,built_in:h,"variable.language":c},T="[0-9](_?[0-9])*",N=`\\.(${T})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",B={className:"number",variants:[{begin:`(\\b(${E})((${N})|\\.)?|(${N}))[eE][+-]?(${T})\\b`},{begin:`\\b(${E})\\b((${N})\\b|\\.)?|(${N})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},O={className:"subst",begin:"\\$\\{",end:"\\}",keywords:k,contains:[]},A={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,O],subLanguage:"xml"}},M={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,O],subLanguage:"css"}},I={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,O],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[f.BACKSLASH_ESCAPE,O]},U={className:"comment",variants:[f.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),f.C_BLOCK_COMMENT_MODE,f.C_LINE_COMMENT_MODE]},K=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,I,D,{match:/\$\d+/},B];O.contains=K.concat({begin:/\{/,end:/\}/,keywords:k,contains:["self"].concat(K)});const z=[].concat(U,O.contains),W=z.concat([{begin:/(\s*)\(/,end:/\)/,keywords:k,contains:["self"].concat(z)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:k,contains:W},H={variants:[{match:[/class/,/\s+/,y,/\s+/,/extends/,/\s+/,g.concat(y,"(",g.concat(/\./,y),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,y],scope:{1:"keyword",3:"title.class"}}]},Y={relevance:0,match:g.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},Z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},rt={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},G={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function tt(it){return g.concat("(?!",it.join("|"),")")}const ft={match:g.concat(/\b/,tt([...o,"super","import"].map(it=>`${it}\\s*\\(`)),y,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},ct={begin:g.concat(/\./,g.lookahead(g.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},vt={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},ot="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",wt={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(ot)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:k,exports:{PARAMS_CONTAINS:W,CLASS_REFERENCE:Y},illegal:/#(?![$_A-z])/,contains:[f.SHEBANG({label:"shebang",binary:"node",relevance:5}),Z,f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,I,D,U,{match:/\$\d+/},B,Y,{scope:"attr",match:y+g.lookahead(":"),relevance:0},wt,{begin:"("+f.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[U,f.REGEXP_MODE,{className:"function",begin:ot,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:f.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:k,contains:W}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:v.begin,end:v.end},{match:C},{begin:_.begin,"on:begin":_.isTrulyOpeningTag,end:_.end}],subLanguage:"xml",contains:[{begin:_.begin,end:_.end,skip:!0,contains:["self"]}]}]},rt,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+f.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,f.inherit(f.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},ct,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},ft,G,H,vt,{match:/\$[(.]/}]}}function d(f){const g=f.regex,x=u(f),y=i,v=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],C={begin:[/namespace/,/\s+/,f.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},_={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:v},contains:[x.exports.CLASS_REFERENCE]},k={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},T=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],N={$pattern:i,keyword:e.concat(T),literal:r,built_in:h.concat(v),"variable.language":c},E={className:"meta",begin:"@"+y},B=(I,D,F)=>{const U=I.contains.findIndex(K=>K.label===D);if(U===-1)throw new Error("can not find mode to replace");I.contains.splice(U,1,F)};Object.assign(x.keywords,N),x.exports.PARAMS_CONTAINS.push(E);const O=x.contains.find(I=>I.scope==="attr"),A=Object.assign({},O,{match:g.concat(y,g.lookahead(/\s*\?:/))});x.exports.PARAMS_CONTAINS.push([x.exports.CLASS_REFERENCE,O,A]),x.contains=x.contains.concat([E,C,_,A]),B(x,"shebang",f.SHEBANG()),B(x,"use_strict",k);const M=x.contains.find(I=>I.label==="func.def");return M.relevance=0,Object.assign(x,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),x}return ox=d,ox}var lx,ZN;function ert(){if(ZN)return lx;ZN=1;function i(e){const r=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,h=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:r.concat(/# */,r.either(c,o),/ *#/)},{begin:r.concat(/# */,u,/ *#/)},{begin:r.concat(/# */,h,/ *#/)},{begin:r.concat(/# */,r.either(c,o),/ +/,r.either(h,u),/ *#/)}]},f={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},x=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,d,f,g,x,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}return lx=i,lx}var cx,QN;function irt(){if(QN)return cx;QN=1;function i(e){e.regex;const r=e.COMMENT(/\(;/,/;\)/);r.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},c={className:"variable",begin:/\$[\w_]+/},h={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,r,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,h,o,e.QUOTE_STRING_MODE,d,f,u]}}return cx=i,cx}var hx,JN;function rrt(){if(JN)return hx;JN=1;var i=vit();return i.registerLanguage("xml",Cit()),i.registerLanguage("bash",_it()),i.registerLanguage("c",kit()),i.registerLanguage("cpp",wit()),i.registerLanguage("csharp",Sit()),i.registerLanguage("css",Tit()),i.registerLanguage("markdown",Eit()),i.registerLanguage("diff",Nit()),i.registerLanguage("ruby",Ait()),i.registerLanguage("go",Mit()),i.registerLanguage("graphql",Bit()),i.registerLanguage("ini",Lit()),i.registerLanguage("java",Oit()),i.registerLanguage("javascript",Rit()),i.registerLanguage("json",jit()),i.registerLanguage("kotlin",Dit()),i.registerLanguage("less",Fit()),i.registerLanguage("lua",Iit()),i.registerLanguage("makefile",$it()),i.registerLanguage("perl",zit()),i.registerLanguage("objectivec",Pit()),i.registerLanguage("php",qit()),i.registerLanguage("php-template",Uit()),i.registerLanguage("plaintext",Hit()),i.registerLanguage("python",Wit()),i.registerLanguage("python-repl",Git()),i.registerLanguage("r",Yit()),i.registerLanguage("rust",Kit()),i.registerLanguage("scss",Vit()),i.registerLanguage("shell",Xit()),i.registerLanguage("sql",Zit()),i.registerLanguage("swift",Qit()),i.registerLanguage("yaml",Jit()),i.registerLanguage("typescript",trt()),i.registerLanguage("vbnet",ert()),i.registerLanguage("wasm",irt()),i.HighlightJS=i,i.default=i,hx=i,hx}var nrt=rrt();const art=$d(nrt);function srt(i,e){P.useEffect(()=>{const r=i.current;r&&r.querySelectorAll("pre > code:not(.language-mermaid)").forEach(n=>{if(n.dataset.highlighted!=="yes")try{art.highlightElement(n)}catch{}})},[i,e])}Re.setOptions({gfm:!0,breaks:!0});function tf({content:i,frontmatter:e}){const r=P.useMemo(()=>Do.sanitize(Re.parse(i)),[i]),n=P.useRef(null),{resolved:a}=Gd();xit(n,r,a,"md-mmd"),srt(n,r);const o=e?Object.entries(e).filter(([,c])=>c!=null&&c!==""):[];return m.jsxs("div",{className:"md-preview",children:[o.length>0&&m.jsx("div",{className:"md-frontmatter",children:o.map(([c,h])=>m.jsxs("div",{className:"md-fm-row",children:[m.jsx("span",{className:"md-fm-key",children:c}),m.jsx("span",{className:"md-fm-value",children:String(h)})]},c))}),m.jsx("div",{ref:n,className:"markdown-body",dangerouslySetInnerHTML:{__html:r}})]})}function ort({onManagePacks:i}){const{t:e}=qi(),{data:r}=oY(),n=(r==null?void 0:r.nudge)??null,a=(r==null?void 0:r.newPacks)??[],[o,c]=P.useState(!1),h=P.useCallback(u=>{u.key==="Escape"&&o&&c(!1)},[o]);return P.useEffect(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),n?m.jsxs("div",{className:"update-badge",children:[m.jsxs("button",{className:"update-badge-trigger",onClick:()=>c(u=>!u),"aria-expanded":o,title:e("update.title"),children:[m.jsx("span",{className:"update-badge-dot"}),m.jsx("span",{className:"update-badge-label",children:e("update.available")})]}),o&&m.jsxs("div",{className:"update-badge-popover",children:[m.jsxs("div",{className:"update-badge-popover-header",children:[m.jsx("span",{className:"update-badge-popover-title",children:e("update.title")}),m.jsx("button",{className:"update-badge-dismiss",onClick:()=>c(!1),title:e("update.dismiss"),"aria-label":e("update.dismiss"),children:"×"})]}),m.jsx("div",{className:"update-badge-content",children:m.jsx(tf,{content:n})}),a.length>0&&i&&m.jsx("button",{className:"update-badge-action",onClick:()=>{i(),c(!1)},children:e("update.managePacks")})]})]}):null}const nd=[.85,.9,1,1.1,1.2],X5="dreamcontext-zoom";function lrt(){try{const i=localStorage.getItem(X5);if(i!==null){const e=parseFloat(i);if(nd.includes(e))return e}}catch{}return 1}function crt(i){document.documentElement.style.setProperty("--zoom",String(i))}function hrt({onNavigate:i}){const{theme:e,setTheme:r,resolved:n}=Gd(),{data:a}=dL(),o=Pi(),[c,h]=P.useState(lrt),[u,d]=P.useState(!1),f=async()=>{d(!0);try{await o.refetchQueries({type:"active"})}finally{d(!1)}};P.useEffect(()=>{crt(c)},[c]);const g=(a==null?void 0:a.debt)??0,x=hL(g),y=uL(g),v=()=>{r(e==="system"?"light":e==="light"?"dark":"system")},C=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",_=nd.indexOf(c),k=_>0,T=_<nd.length-1,N=E=>{const B=_+E;if(B<0||B>=nd.length)return;const O=nd[B];h(O);try{localStorage.setItem(X5,String(O))}catch{}};return m.jsxs("header",{className:"header",children:[m.jsxs("div",{className:"header-left",children:[m.jsxs("div",{className:`agent-avatar agent-avatar--${y}`,children:[m.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M14 2L24 14L14 26L4 14L14 2Z",fill:"url(#diamond-gradient)",opacity:y==="must_sleep"?.4:y==="sleepy"?.6:y==="drowsy"?.8:1}),m.jsx("path",{d:"M14 8L19 14L14 20L9 14L14 8Z",fill:"url(#diamond-inner)",opacity:y==="must_sleep"?.3:.7}),m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:"diamond-gradient",x1:"4",y1:"2",x2:"24",y2:"26",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"hsl(287, 100%, 33%)"}),m.jsx("stop",{offset:"1",stopColor:"hsl(311, 97%, 43%)"})]}),m.jsxs("linearGradient",{id:"diamond-inner",x1:"9",y1:"8",x2:"19",y2:"20",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"hsl(276, 74%, 50%)"}),m.jsx("stop",{offset:"1",stopColor:"hsl(287, 100%, 45%)"})]})]})]}),y==="must_sleep"&&m.jsx("span",{className:"zzz",children:"zzz"})]}),m.jsxs("div",{className:"header-brand",children:[m.jsx("span",{className:"brand-name",children:"dreamcontext"}),m.jsxs("span",{className:`sleep-badge sleep-badge--${y}`,children:[x," (",g,")"]})]})]}),m.jsxs("div",{className:"header-right",children:[m.jsx("button",{className:`header-refresh ${u?"header-refresh--spinning":""}`,onClick:f,disabled:u,title:"Refresh now","aria-label":"Refresh now",children:m.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M13.65 4.5A6 6 0 1 0 14 8"}),m.jsx("path",{d:"M14 2v3h-3"})]})}),m.jsx(ort,{onManagePacks:i?()=>i("packs"):void 0}),m.jsxs("div",{className:"zoom-controls",children:[m.jsx("button",{className:"zoom-btn",onClick:()=>N(-1),disabled:!k,title:"Zoom out",children:"-"}),m.jsxs("span",{className:"zoom-label",children:[Math.round(c*100),"%"]}),m.jsx("button",{className:"zoom-btn",onClick:()=>N(1),disabled:!T,title:"Zoom in",children:"+"})]}),m.jsx("button",{className:"theme-toggle",onClick:v,title:`Theme: ${C}`,children:n==="dark"?m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{d:"M8 1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 1zm0 10a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 11zm7-3a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 15 8zM5 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 5 8zm7.07-4.07a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 1 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zM6.05 10.66a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 0 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zm7.72 3.12a.5.5 0 0 1-.71 0l-1.41-1.41a.5.5 0 1 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM5.34 6.05a.5.5 0 0 1-.71 0L3.22 4.64a.5.5 0 0 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8z"})}):m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"})})})]})]})}const urt=[{labelKey:"nav.group.workspace",items:[{page:"brain",icon:"◉",labelKey:"nav.brain"},{page:"tasks",icon:"▦",labelKey:"nav.tasks"},{page:"knowledge",icon:"✦",labelKey:"nav.knowledge"},{page:"features",icon:"⚑",labelKey:"nav.features"},{page:"core",icon:"◈",labelKey:"nav.core"},{page:"council",icon:"⚔",labelKey:"nav.council"},{page:"taxonomy",icon:"◆",labelKey:"nav.taxonomy"},{page:"sleep",icon:"◑",labelKey:"nav.sleep"}]},{labelKey:"nav.group.control",items:[{page:"packs",icon:"◳",labelKey:"nav.packs"},{page:"settings",icon:"⚙",labelKey:"nav.settings"}]}],Z5="dreamcontext.dashboard.sidebarCollapsed",Q5="dreamcontext.dashboard.aboutSeen",Rc=typeof window<"u"&&window.matchMedia?window.matchMedia("(max-width: 1024px)"):null;function drt(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Z5)==="1"}catch{return!1}}function frt(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Q5)==="1"}catch{return!1}}function prt({activePage:i,onNavigate:e}){const{t:r}=qi(),[n,a]=P.useState(drt),[o,c]=P.useState((Rc==null?void 0:Rc.matches)??!1),[h,u]=P.useState(frt);P.useEffect(()=>{if(!Rc)return;const v=C=>c(C.matches);return Rc.addEventListener("change",v),()=>Rc.removeEventListener("change",v)},[]);const d=o||n,f=()=>{a(v=>{const C=!v;try{window.localStorage.setItem(Z5,C?"1":"0")}catch{}return C})},g=()=>{if(!h){u(!0);try{window.localStorage.setItem(Q5,"1")}catch{}}e("about")},x=!h&&i!=="about";let y=0;return m.jsxs("nav",{className:`sidebar${d?" sidebar--collapsed":""}`,"aria-label":"Primary",children:[m.jsxs("button",{type:"button",className:"sidebar-toggle","data-testid":"sidebar-collapse",onClick:f,"aria-expanded":!d,"aria-label":r(d?"nav.expand":"nav.collapse"),title:r(d?"nav.expand":"nav.collapse"),children:[m.jsx("span",{className:"sidebar-toggle-icon",children:d?"»":"«"}),m.jsx("span",{className:"sidebar-label",children:r("nav.collapse")})]}),urt.map(v=>m.jsxs("div",{className:"sidebar-group",children:[m.jsx("span",{className:"sidebar-group-label",children:r(v.labelKey)}),m.jsx("ul",{className:"sidebar-nav",children:v.items.map(({page:C,icon:_,labelKey:k})=>{y+=1;const T=r(k);return m.jsx("li",{className:`animate-stagger animate-stagger-${y}`,children:m.jsxs("button",{className:`sidebar-item ${i===C?"sidebar-item--active":""}`,onClick:()=>e(C),title:T,"aria-current":i===C?"page":void 0,children:[m.jsx("span",{className:"sidebar-icon",children:_}),m.jsx("span",{className:"sidebar-label",children:T})]})},C)})})]},v.labelKey)),m.jsx("div",{className:"sidebar-footer",children:m.jsxs("button",{className:`sidebar-item sidebar-item--about ${i==="about"?"sidebar-item--active":""}${x?" sidebar-item--nudge":""}`,onClick:g,title:r("nav.about"),"aria-current":i==="about"?"page":void 0,children:[m.jsx("span",{className:"sidebar-icon",children:"✷"}),m.jsx("span",{className:"sidebar-label",children:r("nav.about")})]})})]})}const J5="dreamcontext.dashboard.activePage",grt=["tasks","core","knowledge","features","sleep","brain","council","taxonomy","settings","packs","about"];function mrt(){if(typeof window>"u")return"brain";try{const i=window.localStorage.getItem(J5);if(i&&grt.includes(i))return i}catch{}return"brain"}function yrt({children:i}){const[e,r]=P.useState(mrt),[n,a]=P.useState(null),[o,c]=P.useState(0),h=P.useCallback((f,g)=>{r(f),a(g),c(x=>x+1);try{window.localStorage.setItem(J5,f)}catch{}},[]),u=P.useCallback(f=>{h(f,null)},[h]),d=P.useCallback(()=>a(null),[]);return m.jsxs("div",{className:"shell",children:[m.jsx(hrt,{onNavigate:u}),m.jsxs("div",{className:"shell-body",children:[m.jsx(prt,{activePage:e,onNavigate:u}),m.jsx("main",{className:"shell-main",children:i({page:e,focusId:n,nonce:o,navigate:h,clearFocus:d})})]})]})}function brt(){return oi({queryKey:["tasks"],queryFn:()=>ie.get("/tasks"),select:i=>i.tasks})}function xrt(){const i=Pi();return nr({mutationFn:e=>ie.post("/tasks",e),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function tD(){const i=Pi();return nr({mutationFn:({slug:e,updates:r})=>ie.patch(`/tasks/${e}`,r),onSuccess:(e,r)=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks",r.slug]})}})}function eD(){const i=Pi();return nr({mutationFn:e=>ie.del(`/tasks/${e}`),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function vrt(){return oi({queryKey:["task-members"],queryFn:()=>ie.get("/tasks/members"),select:i=>i.members,staleTime:300*1e3})}function Crt(){return oi({queryKey:["tasks-sync-status"],queryFn:()=>ie.get("/tasks/sync-status"),select:i=>i.status,refetchInterval:3e4})}function _rt(){const i=Pi();return nr({mutationFn:()=>ie.post("/tasks/sync",{direction:"both"}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks-sync-status"]})}})}function krt(){return oi({queryKey:["features"],queryFn:()=>ie.get("/features"),select:i=>i.features??[],staleTime:6e4})}function wrt(){const i=Pi();return nr({mutationFn:({slug:e,content:r})=>ie.post(`/tasks/${e}/changelog`,{content:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function iD(){return oi({queryKey:["releases"],queryFn:()=>ie.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"}))})}function rD(){return oi({queryKey:["releases"],queryFn:()=>ie.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function Srt(){const i=Pi();return nr({mutationFn:e=>ie.post("/releases",{...e,status:"planning"}),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}function Trt(){const i=Pi();return nr({mutationFn:({version:e,updates:r})=>ie.patch(`/releases/${encodeURIComponent(e)}`,r),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}const nD="dreamcontext:",aD="kanban-presets",m1=`${nD}${aD}`;function sD(i){return i?`${nD}${i}:${aD}`:m1}function Ert(i){const e=sD(i);try{const r=localStorage.getItem(e);if(r!==null){const n=JSON.parse(r);return Array.isArray(n)?n:[]}if(i){const n=localStorage.getItem(m1);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(m1);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function oD(i,e){try{localStorage.setItem(sD(i),JSON.stringify(e))}catch{}}const Jg=new Map;function o_(i){let e=Jg.get(i);return e===void 0&&(e=Ert(i),Jg.set(i,e)),e}const y1=new Set;function Nrt(i){return y1.add(i),()=>{y1.delete(i)}}function lD(){for(const i of y1)i()}function Art(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function Mrt(i){return P.useSyncExternalStore(Nrt,()=>o_(i))}function Brt(i,e,r){const n={id:Art(),name:e,filters:r},o=[...o_(i),n];return Jg.set(i,o),oD(i,o),lD(),n}function Lrt(i,e){const r=o_(i),n=r.filter(a=>a.id!==e);n.length!==r.length&&(Jg.set(i,n),oD(i,n),lD())}const Ort=10;function Va(i){let e=2166136261;for(let r=0;r<i.length;r++)e^=i.charCodeAt(r),e=Math.imul(e,16777619);return(e>>>0)%Ort}function ef({task:i,onClick:e,onDragStart:r,onContextMenu:n,dragging:a=!1}){return m.jsxs("div",{className:`task-card${a?" task-card--dragging":""}`,draggable:!0,onDragStart:r,onClick:e,onContextMenu:n,role:"button",tabIndex:0,onKeyDown:o=>{o.key==="Enter"&&e()},children:[m.jsxs("div",{className:"task-card-header",children:[m.jsx("span",{className:`priority-dot priority-dot--${i.priority}`,title:`Priority: ${i.priority}`}),i.urgency&&i.urgency!=="medium"&&m.jsx("span",{className:`urgency-bar urgency-bar--${i.urgency}`,title:`Urgency: ${i.urgency}`}),m.jsx("span",{className:"task-card-name",children:i.name})]}),i.description&&m.jsxs("p",{className:"task-card-desc",children:[i.description.slice(0,100),i.description.length>100?"...":""]}),m.jsxs("div",{className:"task-card-footer",children:[i.tags.length>0&&m.jsx("div",{className:"task-card-tags",children:i.tags.slice(0,3).map(o=>m.jsx("span",{className:"task-tag","data-hue":Va(o),children:o},o))}),m.jsx("span",{className:"task-card-date",children:i.updated_at})]})]})}function Rrt({label:i,color:e,tasks:r,onTaskClick:n,onTaskContextMenu:a,onDragStart:o}){const[c,h]=P.useState(!1);return m.jsxs("div",{className:"sub-group",children:[m.jsxs("button",{className:"sub-group-header",onClick:()=>h(u=>!u),children:[m.jsx("svg",{className:`sub-group-chevron ${c?"":"sub-group-chevron--open"}`,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M3 2L7 5L3 8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})}),e&&m.jsx("span",{className:"sub-group-dot",style:{background:e}}),m.jsx("span",{className:"sub-group-label",children:i}),m.jsx("span",{className:"sub-group-count",children:r.length})]}),!c&&m.jsx("div",{className:"sub-group-cards",children:r.map(u=>m.jsx(ef,{task:u,onClick:()=>n(u),onContextMenu:a?d=>a(u,d):void 0,onDragStart:d=>o(d,u)},u.slug))})]})}function tA({title:i,status:e,tasks:r,count:n,colorVar:a,onTaskClick:o,onTaskContextMenu:c,onDrop:h,subGroups:u}){const[d,f]=P.useState(!1),g=C=>{C.preventDefault(),C.dataTransfer.dropEffect="move",f(!0)},x=()=>{f(!1)},y=C=>{C.preventDefault(),f(!1);const _=C.dataTransfer.getData("text/plain");_&&h(_,e)},v=(C,_)=>{C.dataTransfer.setData("text/plain",_.slug),C.dataTransfer.effectAllowed="move"};return m.jsxs("div",{className:`kanban-column ${d?"kanban-column--dragover":""}`,onDragOver:g,onDragLeave:x,onDrop:y,children:[m.jsxs("div",{className:"kanban-column-header",children:[m.jsx("span",{className:"kanban-column-dot",style:{background:`var(${a})`}}),m.jsx("span",{className:"kanban-column-title",children:i}),m.jsx("span",{className:"kanban-column-count",children:n})]}),m.jsx("div",{className:"kanban-column-cards",children:u&&u.length>0?u.map(C=>m.jsx(Rrt,{label:C.label,color:C.color,tasks:C.tasks,onTaskClick:o,onTaskContextMenu:c,onDragStart:v},C.key)):r.map(C=>m.jsx(ef,{task:C,onClick:()=>o(C),onContextMenu:c?_=>c(C,_):void 0,onDragStart:_=>v(_,C)},C.slug))})]})}function $c({trigger:i,content:e,isOpen:r,onClose:n,align:a="left",width:o}){const c=P.useRef(null),h=P.useCallback(d=>{c.current&&!c.current.contains(d.target)&&n()},[n]),u=P.useCallback(d=>{d.key==="Escape"&&n()},[n]);return P.useEffect(()=>{if(r)return document.addEventListener("mousedown",h),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",u)}},[r,h,u]),m.jsxs("div",{className:"filter-popover",ref:c,children:[i,r&&m.jsx("div",{className:`filter-popover-dropdown filter-popover-dropdown--${a}`,style:o?{width:`${o}px`}:void 0,children:e})]})}function jrt({open:i}){return m.jsx("svg",{className:`filter-chip-chevron ${i?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:m.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function zu({label:i,options:e,selected:r,onChange:n,isOpen:a,onToggle:o,onClose:c}){var k,T;const h=r.length>0,[u,d]=P.useState(""),f=P.useRef(null);P.useEffect(()=>{a?requestAnimationFrame(()=>{var N;return(N=f.current)==null?void 0:N.focus()}):d("")},[a]);const g=u.trim()?e.filter(N=>N.label.toLowerCase().includes(u.trim().toLowerCase())):e,x=N=>{r.includes(N)?n(r.filter(E=>E!==N)):n([...r,N])},y=()=>n(e.map(N=>N.value)),v=()=>n([]),C=h?r.length<=2?r.map(N=>{var E;return((E=e.find(B=>B.value===N))==null?void 0:E.label)??N}).join(", "):`${((k=e.find(N=>N.value===r[0]))==null?void 0:k.label)??r[0]} +${r.length-1}`:i,_=e.length>5;return m.jsx($c,{isOpen:a,onClose:c,trigger:m.jsxs("button",{className:`filter-chip ${h?"filter-chip--active":""}`,onClick:o,children:[h&&r.length===1&&m.jsx("span",{className:"filter-chip-dot",style:{background:(T=e.find(N=>N.value===r[0]))==null?void 0:T.color}}),m.jsx("span",{className:"filter-chip-label",children:C}),m.jsx(jrt,{open:a})]}),content:m.jsxs("div",{className:"multi-select-list",children:[_&&m.jsx("div",{className:"multi-select-search-wrap",children:m.jsx("input",{ref:f,className:"multi-select-search",placeholder:"Search...",value:u,onChange:N=>d(N.target.value)})}),m.jsxs("div",{className:"multi-select-actions",children:[m.jsx("button",{className:"multi-select-action",onClick:y,children:"All"}),m.jsx("button",{className:"multi-select-action",onClick:v,children:"None"})]}),m.jsxs("div",{className:"multi-select-options",children:[g.map(N=>m.jsxs("label",{className:"multi-select-option",children:[m.jsx("input",{type:"checkbox",checked:r.includes(N.value),onChange:()=>x(N.value)}),N.color&&m.jsx("span",{className:"filter-option-dot",style:{background:N.color}}),m.jsx("span",{className:"filter-option-label",children:N.label})]},N.value)),g.length===0&&m.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function eA(i){return String(i).padStart(2,"0")}function jo(i){return`${i.getFullYear()}-${eA(i.getMonth()+1)}-${eA(i.getDate())}`}function cD(){return jo(new Date)}function jp(i){const e=new Date;return e.setDate(e.getDate()-i),jo(e)}function Drt(){const i=new Date,e=i.getDay();return i.setDate(i.getDate()-(e===0?6:e-1)),jo(i)}function Frt(){const i=new Date;return i.setDate(1),jo(i)}function Irt(){const i=new Date;return i.setMonth(0,1),jo(i)}function iA(i){return new Date(i+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function $rt(){const i=cD();return[{label:"Today",from:i,to:i},{label:"Yesterday",from:jp(1),to:jp(1)},{label:"This week",from:Drt(),to:i},{label:"Last 7 days",from:jp(6),to:i},{label:"This month",from:Frt(),to:i},{label:"Last 30 days",from:jp(29),to:i},{label:"This year",from:Irt(),to:i}]}const zrt=["January","February","March","April","May","June","July","August","September","October","November","December"],Prt=["Mo","Tu","We","Th","Fr","Sa","Su"];function qrt({dateField:i,dateFrom:e,dateTo:r,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=P.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[d,f]=P.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=P.useMemo($rt,[]),x=P.useMemo(()=>{const E=new Date(h,d+1,0).getDate(),B=new Date(h,d,1).getDay(),O=B===0?6:B-1,A=[],M=new Date(h,d,0).getDate();for(let D=O-1;D>=0;D--){const F=M-D,U=d===0?11:d-1,K=d===0?h-1:h;A.push({date:jo(new Date(K,U,F)),day:F,isCurrentMonth:!1})}for(let D=1;D<=E;D++)A.push({date:jo(new Date(h,d,D)),day:D,isCurrentMonth:!0});const I=42-A.length;for(let D=1;D<=I;D++){const F=d===11?0:d+1,U=d===11?h+1:h;A.push({date:jo(new Date(U,F,D)),day:D,isCurrentMonth:!1})}return A},[h,d]),y=E=>{!e||e&&r?(a(E),o("")):E<e?(o(e),a(E)):o(E)},v=E=>{a(E.from),o(E.to);const B=new Date(E.from+"T00:00:00");u(B.getFullYear()),f(B.getMonth())},C=()=>{a(""),o("")},_=()=>{d===0?(f(11),u(E=>E-1)):f(E=>E-1)},k=()=>{d===11?(f(0),u(E=>E+1)):f(E=>E+1)},T=cD(),N=g.find(E=>E.from===e&&E.to===r);return m.jsxs("div",{className:"mini-cal",children:[m.jsxs("div",{className:"mini-cal-field-toggle",children:[m.jsx("button",{className:`mini-cal-field-btn ${i==="updated_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("updated_at"),children:"Updated"}),m.jsx("button",{className:`mini-cal-field-btn ${i==="created_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("created_at"),children:"Created"})]}),m.jsx("div",{className:"mini-cal-presets",children:g.map(E=>m.jsx("button",{className:`mini-cal-preset ${(N==null?void 0:N.label)===E.label?"mini-cal-preset--active":""}`,onClick:()=>v(E),children:E.label},E.label))}),m.jsx("div",{className:"mini-cal-divider"}),m.jsxs("div",{className:"mini-cal-nav-row",children:[m.jsx("button",{className:"mini-cal-nav-btn",onClick:_,"aria-label":"Previous month",children:m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),m.jsxs("span",{className:"mini-cal-month-label",children:[zrt[d]," ",h]}),m.jsx("button",{className:"mini-cal-nav-btn",onClick:k,"aria-label":"Next month",children:m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M5.5 3L9.5 7L5.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),m.jsxs("div",{className:"mini-cal-grid",children:[Prt.map(E=>m.jsx("div",{className:"mini-cal-day-label",children:E},E)),x.map((E,B)=>{const O=E.date===e,A=E.date===r,M=e&&r&&E.date>e&&E.date<r,I=O&&!r,D=O||A,F=["mini-cal-day",!E.isCurrentMonth&&"mini-cal-day--outside",E.date===T&&"mini-cal-day--today",D&&"mini-cal-day--selected",O&&r&&"mini-cal-day--range-start",A&&e&&"mini-cal-day--range-end",M&&"mini-cal-day--in-range",I&&"mini-cal-day--single"].filter(Boolean).join(" ");return m.jsx("button",{className:F,onClick:()=>y(E.date),children:E.day},B)})]}),(e||r)&&m.jsxs("div",{className:"mini-cal-footer",children:[m.jsxs("span",{className:"mini-cal-range-text",children:[e&&m.jsx("span",{children:iA(e)}),e&&r&&e!==r&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mini-cal-arrow",children:"→"}),m.jsx("span",{children:iA(r)})]}),e&&!r&&m.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),m.jsx("button",{className:"mini-cal-clear-btn",onClick:C,children:"Clear"})]})]})}const tm={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function Urt(){return m.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("circle",{cx:"5.8",cy:"5.8",r:"4.3",stroke:"currentColor",strokeWidth:"1.4"}),m.jsx("path",{d:"M9 9L12.5 12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function Dp({open:i}){return m.jsx("svg",{className:`filter-chip-chevron ${i?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:m.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function ux(){return m.jsx("svg",{className:"filter-option-check",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M3 7L6 10L11 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function rA(){return m.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:m.jsx("path",{d:"M2.5 2.5L7.5 7.5M7.5 2.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function Hrt(){return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("path",{d:"M1.5 5.5H12.5",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("path",{d:"M4.5 1V3.5M9.5 1V3.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Wrt(){return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("path",{d:"M4 1.5V5H10V1.5",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"4",y:"7.5",width:"6",height:"3.5",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"})]})}function Grt(){return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("rect",{x:"1",y:"1",width:"3.5",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"5.25",y:"1",width:"3.5",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"9.5",y:"1",width:"3.5",height:"10",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function Yrt(){return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("rect",{x:"1",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"7.5",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"1",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"7.5",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function Krt(){return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("circle",{cx:"3",cy:"11",r:"1.4",fill:"currentColor"}),m.jsx("circle",{cx:"6",cy:"6",r:"1.6",fill:"currentColor"}),m.jsx("circle",{cx:"10",cy:"8",r:"1.2",fill:"currentColor"}),m.jsx("circle",{cx:"11",cy:"3",r:"1",fill:"currentColor"})]})}function Vrt(){return m.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M2 3.5H12M2 7H12M2 10.5H12",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function Xrt(){return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("path",{d:"M2 2V12",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),m.jsx("path",{d:"M2 3H9L7 5.5L9 8H2",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}const Zrt=[{value:"todo",label:"To Do",color:"var(--color-status-todo)"},{value:"in_progress",label:"In Progress",color:"var(--color-status-in-progress)"},{value:"in_review",label:"In Review",color:"var(--color-status-in-review)"},{value:"completed",label:"Completed",color:"var(--color-status-completed)"}],Qrt=[{value:"critical",label:"Critical",color:"var(--color-priority-critical)"},{value:"high",label:"High",color:"var(--color-priority-high)"},{value:"medium",label:"Medium",color:"var(--color-priority-medium)"},{value:"low",label:"Low",color:"var(--color-priority-low)"}],Jrt=[{value:"critical",label:"Critical",color:"var(--color-urgency-critical)"},{value:"high",label:"High",color:"var(--color-urgency-high)"},{value:"medium",label:"Medium",color:"var(--color-urgency-medium)"},{value:"low",label:"Low",color:"var(--color-urgency-low)"}],nA=[{value:"updated_at",label:"Last updated"},{value:"created_at",label:"Date created"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"rice",label:"RICE score"},{value:"name",label:"Name"}],dx=[{value:"status",label:"Status"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"tags",label:"Tags"},{value:"version",label:"Version"},{value:"none",label:"No grouping"}];function tnt(i){let e=0;return i.priorityFilter.length>0&&e++,i.statusFilter.length>0&&e++,i.urgencyFilter.length>0&&e++,i.tagFilter.length>0&&e++,i.versionFilter.length>0&&e++,i.searchQuery.trim()&&e++,(i.dateFrom||i.dateTo)&&e++,i.minRice!==null&&i.minRice!==void 0&&e++,e}function ent(i){if(!i.dateFrom&&!i.dateTo)return null;const e=new Date().toISOString().slice(0,10);if(i.dateFrom===e&&i.dateTo===e)return"Today";const r=new Date;r.setDate(r.getDate()-1);const n=r.toISOString().slice(0,10);if(i.dateFrom===n&&i.dateTo===n)return"Yesterday";if(i.dateTo===e){const a=new Date;if(a.setDate(a.getDate()-6),i.dateFrom===a.toISOString().slice(0,10))return"Last 7 days";const o=new Date;if(o.setDate(o.getDate()-29),i.dateFrom===o.toISOString().slice(0,10))return"Last 30 days"}return"Custom"}function int({filters:i,onFilterChange:e,onClearFilters:r,onCreateClick:n,syncSlot:a,presets:o,onSavePreset:c,onLoadPreset:h,onDeletePreset:u,allTags:d,allVersions:f,onVersionManagerClick:g}){var D,F;const{t:x}=qi(),[y,v]=P.useState(null),[C,_]=P.useState(""),k=tnt(i),T=P.useMemo(()=>ent(i),[i]),N=U=>v(K=>K===U?null:U),E=()=>v(null),B=(D=nA.find(U=>U.value===i.sortField))==null?void 0:D.label,O=(F=dx.find(U=>U.value===i.groupBy))==null?void 0:F.label,A=P.useMemo(()=>d.map(U=>({value:U,label:U})),[d]),M=P.useMemo(()=>f.map(U=>({value:U,label:U})),[f]),I=P.useMemo(()=>dx.filter(U=>U.value!==i.groupBy&&U.value!=="none").concat({value:"none",label:"No sub-group"}),[i.groupBy]);return m.jsxs("div",{className:"filter-bar",children:[m.jsxs("div",{className:"filter-search",children:[m.jsx(Urt,{}),m.jsx("input",{className:"filter-search-input",placeholder:"Search tasks...",value:i.searchQuery,onChange:U=>e("searchQuery",U.target.value)}),i.searchQuery&&m.jsx("button",{className:"filter-search-clear",onClick:()=>e("searchQuery",""),children:m.jsx(rA,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx(zu,{id:"status",label:"Status",options:Zrt,selected:i.statusFilter,onChange:U=>e("statusFilter",U),isOpen:y==="status",onToggle:()=>N("status"),onClose:E}),m.jsx(zu,{id:"priority",label:"Priority",options:Qrt,selected:i.priorityFilter,onChange:U=>e("priorityFilter",U),isOpen:y==="priority",onToggle:()=>N("priority"),onClose:E}),m.jsx(zu,{id:"urgency",label:"Urgency",options:Jrt,selected:i.urgencyFilter,onChange:U=>e("urgencyFilter",U),isOpen:y==="urgency",onToggle:()=>N("urgency"),onClose:E}),A.length>0&&m.jsx(zu,{id:"tags",label:"Tags",options:A,selected:i.tagFilter,onChange:U=>e("tagFilter",U),isOpen:y==="tags",onToggle:()=>N("tags"),onClose:E}),M.length>0&&m.jsx(zu,{id:"version",label:"Version",options:M,selected:i.versionFilter,onChange:U=>e("versionFilter",U),isOpen:y==="version",onToggle:()=>N("version"),onClose:E}),m.jsx($c,{isOpen:y==="date",onClose:E,width:320,trigger:m.jsxs("button",{className:`filter-chip ${T?"filter-chip--active":""}`,onClick:()=>N("date"),children:[m.jsx(Hrt,{}),m.jsx("span",{className:"filter-chip-label",children:T??"Date"}),m.jsx(Dp,{open:y==="date"})]}),content:m.jsx(qrt,{dateField:i.dateField,dateFrom:i.dateFrom,dateTo:i.dateTo,onDateFieldChange:U=>e("dateField",U),onDateFromChange:U=>e("dateFrom",U),onDateToChange:U=>e("dateTo",U)})}),m.jsx($c,{isOpen:y==="minRice",onClose:E,width:220,trigger:m.jsxs("button",{className:`filter-chip ${i.minRice!==null?"filter-chip--active":""}`,onClick:()=>N("minRice"),children:[m.jsx("span",{className:"filter-chip-label",children:i.minRice!==null?`${x("filter.min_rice")} ≥ ${i.minRice}`:x("filter.min_rice")}),m.jsx(Dp,{open:y==="minRice"})]}),content:m.jsxs("div",{className:"filter-min-rice",children:[m.jsx("label",{className:"filter-min-rice-label",htmlFor:"filter-min-rice-input",children:x("filter.min_rice")}),m.jsx("input",{id:"filter-min-rice-input",type:"number",min:"0",step:"0.1",className:"field-input",value:i.minRice??"",placeholder:"e.g. 5",onChange:U=>{const K=U.target.value.trim();if(K===""){e("minRice",null);return}const z=Number(K);e("minRice",Number.isFinite(z)?z:null)}}),i.minRice!==null&&m.jsx("button",{type:"button",className:"filter-min-rice-clear",onClick:()=>e("minRice",null),children:"Clear"})]})}),k>0&&m.jsxs("button",{className:"filter-clear-all",onClick:r,children:["Clear ",m.jsx("span",{className:"filter-clear-count",children:k})]}),m.jsx("div",{className:"filter-bar-spacer"}),m.jsxs("div",{className:"filter-view-toggle",children:[m.jsx("button",{className:`filter-view-btn ${i.viewMode==="kanban"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","kanban"),title:"Kanban view",children:m.jsx(Grt,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:m.jsx(Yrt,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="scatter"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","scatter"),title:"RICE scatter (Impact × Effort)",children:m.jsx(Krt,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:m.jsx(Vrt,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx($c,{isOpen:y==="sort",onClose:E,align:"right",trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>N("sort"),children:[m.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M2 4H12M4 7H10M6 10H8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),m.jsx("span",{className:"filter-chip-label",children:B}),m.jsx(Dp,{open:y==="sort"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Sort by"}),nA.map(U=>m.jsxs("button",{className:`filter-option ${i.sortField===U.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",U.value),E()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),i.sortField===U.value&&m.jsx(ux,{})]},U.value))]})}),m.jsx($c,{isOpen:y==="group",onClose:E,align:"right",trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>N("group"),children:[m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"8",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"1.5",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"8",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]}),m.jsx("span",{className:"filter-chip-label",children:O}),m.jsx(Dp,{open:y==="group"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Group by"}),dx.map(U=>m.jsxs("button",{className:`filter-option ${i.groupBy===U.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",U.value),E()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),i.groupBy===U.value&&m.jsx(ux,{})]},U.value)),i.groupBy!=="none"&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"filter-popover-section",style:{marginTop:"var(--space-2)"},children:"Sub-group by"}),I.map(U=>m.jsxs("button",{className:`filter-option ${i.subGroupBy===U.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",U.value),E()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),i.subGroupBy===U.value&&m.jsx(ux,{})]},`sub-${U.value}`))]})]})}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx("button",{className:"filter-chip filter-chip--subtle",onClick:g,title:"Manage versions",children:m.jsx(Xrt,{})}),m.jsx($c,{isOpen:y==="views",onClose:E,align:"right",width:220,trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>N("views"),children:[m.jsx(Wrt,{}),m.jsx("span",{className:"filter-chip-label",children:"Views"}),o.length>0&&m.jsx("span",{className:"filter-chip-badge",children:o.length})]}),content:m.jsxs("div",{className:"filter-views",children:[o.length===0?m.jsx("div",{className:"filter-views-empty",children:"No saved views yet"}):m.jsx("div",{className:"filter-views-list",children:o.map(U=>m.jsxs("div",{className:"filter-views-item",children:[m.jsx("button",{className:"filter-views-load",onClick:()=>{h(U),E()},children:U.name}),m.jsx("button",{className:"filter-views-delete",onClick:()=>u(U.id),children:m.jsx(rA,{})})]},U.id))}),m.jsx("div",{className:"filter-popover-divider"}),m.jsxs("div",{className:"filter-views-save",children:[m.jsx("input",{className:"filter-views-input",placeholder:"Save current view...",value:C,onChange:U=>_(U.target.value),onKeyDown:U=>{U.key==="Enter"&&C.trim()&&(c(C.trim()),_(""))}}),m.jsx("button",{className:"filter-views-save-btn",disabled:!C.trim(),onClick:()=>{C.trim()&&(c(C.trim()),_(""))},children:"Save"})]})]})}),a,m.jsxs("button",{className:"filter-create-btn",onClick:n,children:[m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),x("tasks.create")]})]})}function rnt({onClose:i}){const{t:e}=qi(),r=xrt(),{data:n}=rD(),[a,o]=P.useState(""),[c,h]=P.useState(""),[u,d]=P.useState("medium"),[f,g]=P.useState("medium"),[x,y]=P.useState(""),[v,C]=P.useState(""),[_,k]=P.useState(""),T=N=>{if(N.preventDefault(),!a.trim())return;const E=x.split(",").map(B=>B.trim()).filter(Boolean);r.mutate({name:a.trim(),description:c,priority:u,tags:E,urgency:f!=="medium"?f:void 0,why:v.trim()||void 0,version:_||void 0},{onSuccess:()=>i()})};return m.jsx("div",{className:"modal-overlay",onClick:i,children:m.jsxs("div",{className:"modal",onClick:N=>N.stopPropagation(),children:[m.jsxs("div",{className:"modal-header",children:[m.jsx("h2",{className:"modal-title",children:e("tasks.create")}),m.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),m.jsxs("form",{onSubmit:T,className:"modal-body",children:[m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.name")}),m.jsx("input",{className:"field-input",value:a,onChange:N=>o(N.target.value),placeholder:"e.g. Implement user auth",autoFocus:!0,required:!0})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.description")}),m.jsx("textarea",{className:"field-textarea",value:c,onChange:N=>h(N.target.value),placeholder:"What needs to be done?",rows:3})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.priority")}),m.jsxs("select",{className:"field-select",value:u,onChange:N=>d(N.target.value),children:[m.jsx("option",{value:"low",children:e("priority.low")}),m.jsx("option",{value:"medium",children:e("priority.medium")}),m.jsx("option",{value:"high",children:e("priority.high")}),m.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Urgency"}),m.jsxs("select",{className:"field-select",value:f,onChange:N=>g(N.target.value),children:[m.jsx("option",{value:"low",children:e("priority.low")}),m.jsx("option",{value:"medium",children:e("priority.medium")}),m.jsx("option",{value:"high",children:e("priority.high")}),m.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Version"}),m.jsxs("select",{className:"field-select",value:_,onChange:N=>k(N.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(n??[]).map(N=>m.jsx("option",{value:N.version,children:N.version},N.version))]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Why"}),m.jsx("textarea",{className:"field-textarea",value:v,onChange:N=>C(N.target.value),placeholder:"Why is this task needed?",rows:2})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.tags")}),m.jsx("input",{className:"field-input",value:x,onChange:N=>y(N.target.value),placeholder:"Comma-separated tags"})]}),m.jsxs("div",{className:"modal-actions",children:[m.jsx("button",{type:"button",className:"btn btn--ghost",onClick:i,children:e("tasks.cancel")}),m.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!a.trim()||r.isPending,children:r.isPending?"...":e("tasks.save")})]})]})]})})}var Pu={exports:{}},aA;function nnt(){if(aA)return Pu.exports;aA=1,Pu.exports=i,Pu.exports.addWheelListener=i,Pu.exports.removeWheelListener=e;function i(r,n,a){r.addEventListener("wheel",n,a)}function e(r,n,a){r.removeEventListener("wheel",n,a)}return Pu.exports}var qu={exports:{}},fx,sA;function ant(){if(sA)return fx;sA=1;var i=4,e=.001,r=1e-7,n=10,a=11,o=1/(a-1),c=typeof Float32Array=="function";function h(C,_){return 1-3*_+3*C}function u(C,_){return 3*_-6*C}function d(C){return 3*C}function f(C,_,k){return((h(_,k)*C+u(_,k))*C+d(_))*C}function g(C,_,k){return 3*h(_,k)*C*C+2*u(_,k)*C+d(_)}function x(C,_,k,T,N){var E,B,O=0;do B=_+(k-_)/2,E=f(B,T,N)-C,E>0?k=B:_=B;while(Math.abs(E)>r&&++O<n);return B}function y(C,_,k,T){for(var N=0;N<i;++N){var E=g(_,k,T);if(E===0)return _;var B=f(_,k,T)-C;_-=B/E}return _}function v(C){return C}return fx=function(_,k,T,N){if(!(0<=_&&_<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(_===k&&T===N)return v;for(var E=c?new Float32Array(a):new Array(a),B=0;B<a;++B)E[B]=f(B*o,_,T);function O(A){for(var M=0,I=1,D=a-1;I!==D&&E[I]<=A;++I)M+=o;--I;var F=(A-E[I])/(E[I+1]-E[I]),U=M+F*o,K=g(U,_,T);return K>=e?y(A,U,_,T):K===0?U:x(A,M,M+o,_,T)}return function(M){return M===0?0:M===1?1:f(O(M),k,N)}},fx}var oA;function snt(){if(oA)return qu.exports;oA=1;var i=ant(),e={ease:i(.25,.1,.25,1),easeIn:i(.42,0,1,1),easeOut:i(0,0,.58,1),easeInOut:i(.42,0,.58,1),linear:i(0,0,1,1)};qu.exports=r,qu.exports.makeAggregateRaf=h,qu.exports.sharedScheduler=h();function r(u,d,f){var g=Object.create(null),x=Object.create(null);f=f||{};var y=typeof f.easing=="function"?f.easing:e[f.easing];y||(f.easing&&console.warn("Unknown easing function in amator: "+f.easing),y=e.ease);var v=typeof f.step=="function"?f.step:n,C=typeof f.done=="function"?f.done:n,_=a(f.scheduler),k=Object.keys(d);k.forEach(function(I){g[I]=u[I],x[I]=d[I]-u[I]});var T=typeof f.duration=="number"?f.duration:400,N=Math.max(1,T*.06),E,B=0;return E=_.next(A),{cancel:O};function O(){_.cancel(E),E=0}function A(){var I=y(B/N);B+=1,M(I),B<=N?(E=_.next(A),v(u)):(E=0,setTimeout(function(){C(u)},0))}function M(I){k.forEach(function(D){u[D]=x[D]*I+g[D]})}}function n(){}function a(u){if(!u){var d=typeof window<"u"&&window.requestAnimationFrame;return d?o():c()}if(typeof u.next!="function")throw new Error("Scheduler is supposed to have next(cb) function");if(typeof u.cancel!="function")throw new Error("Scheduler is supposed to have cancel(handle) function");return u}function o(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function c(){return{next:function(u){return setTimeout(u,1e3/60)},cancel:function(u){return clearTimeout(u)}}}function h(){var u=new Set,d=new Set,f=0;return{next:x,cancel:x,clearAll:g};function g(){u.clear(),d.clear(),cancelAnimationFrame(f),f=0}function x(C){d.add(C),y()}function y(){f||(f=requestAnimationFrame(v))}function v(){f=0;var C=d;d=u,u=C,u.forEach(function(_){_()}),u.clear()}}return qu.exports}var px,lA;function ont(){if(lA)return px;lA=1;function i(n){r(n);const a=e(n);return n.on=a.on,n.off=a.off,n.fire=a.fire,n}function e(n){let a=Object.create(null);return{on:function(o,c,h){if(typeof c!="function")throw new Error("callback is expected to be a function");let u=a[o];return u||(u=a[o]=[]),u.push({callback:c,ctx:h}),n},off:function(o,c){if(typeof o>"u")return a=Object.create(null),n;if(a[o])if(typeof c!="function")delete a[o];else{const h=a[o];for(let u=0;u<h.length;++u)h[u].callback===c&&h.splice(u,1)}return n},fire:function(o){const c=a[o];if(!c)return n;let h;arguments.length>1&&(h=Array.prototype.slice.call(arguments,1));for(let u=0;u<c.length;++u){const d=c[u];d.callback.apply(d.ctx,h)}return n}}}function r(n){if(!n)throw new Error("Eventify cannot use falsy object as events subject");const a=["on","fire","off"];for(let o=0;o<a.length;++o)if(n.hasOwnProperty(a[o]))throw new Error("Subject cannot be eventified, since it already has property '"+a[o]+"'")}return px=i,px}var gx,cA;function lnt(){if(cA)return gx;cA=1,gx=i;function i(n,a,o){typeof o!="object"&&(o={});var c=typeof o.minVelocity=="number"?o.minVelocity:5,h=typeof o.amplitude=="number"?o.amplitude:.25,u=typeof o.cancelAnimationFrame=="function"?o.cancelAnimationFrame:e(),d=typeof o.requestAnimationFrame=="function"?o.requestAnimationFrame:r(),f,g,x=342,y,v,C,_,k,T,N,E;return{start:O,stop:M,cancel:B};function B(){u(y),u(E)}function O(){f=n(),_=N=v=k=0,g=new Date,u(y),u(E),y=d(A)}function A(){var D=Date.now(),F=D-g;g=D;var U=n(),K=U.x-f.x,z=U.y-f.y;f=U;var W=1e3/(1+F);v=.8*K*W+.2*v,k=.8*z*W+.2*k,y=d(A)}function M(){u(y),u(E);var D=n();C=D.x,T=D.y,g=Date.now(),(v<-c||v>c)&&(_=h*v,C+=_),(k<-c||k>c)&&(N=h*k,T+=N),E=d(I)}function I(){var D=Date.now()-g,F=!1,U=0,K=0;_&&(U=-_*Math.exp(-D/x),U>.5||U<-.5?F=!0:U=_=0),N&&(K=-N*Math.exp(-D/x),K>.5||K<-.5?F=!0:K=N=0),F&&(a(C+U,T+K),E=d(I))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function r(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return gx}var mx,hA;function cnt(){if(hA)return mx;hA=1,mx=i;function i(n){if(n)return{capture:r,release:r};var a,o,c,h=!1;return{capture:u,release:d};function u(f){h=!0,o=window.document.onselectstart,c=window.document.ondragstart,window.document.onselectstart=e,a=f,a.ondragstart=e}function d(){h&&(h=!1,window.document.onselectstart=o,a&&(a.ondragstart=c))}}function e(n){return n.stopPropagation(),!1}function r(){}return mx}var yx,uA;function hnt(){if(uA)return yx;uA=1,yx=i;function i(){this.x=0,this.y=0,this.scale=1}return yx}var Fp={exports:{}},dA;function unt(){if(dA)return Fp.exports;dA=1,Fp.exports=i,Fp.exports.canAttach=e;function i(r,n){if(!e(r))throw new Error("svg element is required for svg.panzoom to work");var a=r.ownerSVGElement;if(!a)throw new Error("Do not apply panzoom to the root <svg> element. Use its child instead (e.g. <g></g>). As of March 2016 only FireFox supported transform on the root element");n.disableKeyboardInteraction||a.setAttribute("tabindex",0);var o={getBBox:h,getScreenCTM:u,getOwner:c,applyTransform:f,initTransform:d};return o;function c(){return a}function h(){var g=r.getBBox();return{left:g.x,top:g.y,width:g.width,height:g.height}}function u(){var g=a.getCTM();return g||a.getScreenCTM()}function d(g){var x=r.getCTM();x===null&&(x=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix()),g.x=x.e,g.y=x.f,g.scale=x.a,a.removeAttributeNS(null,"viewBox")}function f(g){r.setAttribute("transform","matrix("+g.scale+" 0 0 "+g.scale+" "+g.x+" "+g.y+")")}}function e(r){return r&&r.ownerSVGElement&&r.getCTM}return Fp.exports}var Ip={exports:{}},fA;function dnt(){if(fA)return Ip.exports;fA=1,Ip.exports=i,Ip.exports.canAttach=e;function i(r,n){var a=e(r);if(!a)throw new Error("panzoom requires DOM element to be attached to the DOM tree");var o=r.parentElement;r.scrollTop=0,n.disableKeyboardInteraction||o.setAttribute("tabindex",0);var c={getBBox:u,getOwner:h,applyTransform:d};return c;function h(){return o}function u(){return{left:0,top:0,width:r.clientWidth,height:r.clientHeight}}function d(f){r.style.transformOrigin="0 0 0",r.style.transform="matrix("+f.scale+", 0, 0, "+f.scale+", "+f.x+", "+f.y+")"}}function e(r){return r&&r.parentElement&&r.style}return Ip.exports}var bx,pA;function fnt(){if(pA)return bx;pA=1;var i=nnt(),e=snt(),r=ont(),n=lnt(),a=cnt(),o=a(),c=a(!0),h=hnt(),u=unt(),d=dnt(),f=1,g=1.75,x=300,y=200;bx=v;function v(A,M){M=M||{};var I=M.controller;if(I||(u.canAttach(A)?I=u(A,M):d.canAttach(A)&&(I=d(A,M))),!I)throw new Error("Cannot create panzoom for the current type of dom element");var D=I.getOwner(),F={x:0,y:0},U=!1,K=new h;I.initTransform&&I.initTransform(K);var z=typeof M.filterKey=="function"?M.filterKey:k,W=typeof M.pinchSpeed=="number"?M.pinchSpeed:1,j=M.bounds,H=typeof M.maxZoom=="number"?M.maxZoom:Number.POSITIVE_INFINITY,Y=typeof M.minZoom=="number"?M.minZoom:0,Z=typeof M.boundsPadding=="number"?M.boundsPadding:.05,rt=typeof M.zoomDoubleClickSpeed=="number"?M.zoomDoubleClickSpeed:g,G=M.beforeWheel||k,tt=M.beforeMouseDown||k,ft=typeof M.zoomSpeed=="number"?M.zoomSpeed:f,ct=C(M.transformOrigin),vt=M.enableTextSelection?c:o;T(j),M.autocenter&&Ze();var ot,wt=0,it=0,V=0,at=null,Ct=new Date,Bt,Ht=!1,re=!1,Dt,xt,Ut,Yt,ht,st;"smoothScroll"in M&&!M.smoothScroll?st=B():st=n(J,lr,M.smoothScroll);var Ot,$t,Gt,jt=!1;Ri();var ae={dispose:cr,moveBy:Yr,moveTo:Et,smoothMoveTo:ln,centerOn:wi,zoomTo:zn,zoomAbs:mi,smoothZoom:Yi,smoothZoomAbs:Le,showRectangle:Li,pause:He,resume:Be,isPaused:ki,getTransform:li,getMinZoom:ye,setMinZoom:si,getMaxZoom:$e,setMaxZoom:Ei,getTransformOrigin:Ce,setTransformOrigin:Oi,getZoomSpeed:Xi,setZoomSpeed:Ni};r(ae);var It=typeof M.initialX=="number"?M.initialX:K.x,je=typeof M.initialY=="number"?M.initialY:K.y,ve=typeof M.initialZoom=="number"?M.initialZoom:K.scale;return(It!=K.x||je!=K.y||ve!=K.scale)&&mi(It,je,ve),ae;function He(){Zi(),jt=!0}function Be(){jt&&(Ri(),jt=!1)}function ki(){return jt}function Li(yt){var Ft=D.getBoundingClientRect(),Rt=Ge(Ft.width,Ft.height),Zt=yt.right-yt.left,Pe=yt.bottom-yt.top;if(!Number.isFinite(Zt)||!Number.isFinite(Pe))throw new Error("Invalid rectangle");var Vt=Rt.x/Zt,ci=Rt.y/Pe,Ye=Math.min(Vt,ci);K.x=-(yt.left+Zt/2)*Ye+Rt.x/2,K.y=-(yt.top+Pe/2)*Ye+Rt.y/2,K.scale=Ye}function Ge(yt,Ft){if(I.getScreenCTM){var Rt=I.getScreenCTM(),Zt=Rt.a,Pe=Rt.d,Vt=Rt.e,ci=Rt.f;F.x=yt*Zt-Vt,F.y=Ft*Pe-ci}else F.x=yt,F.y=Ft;return F}function Ze(){var yt,Ft,Rt=0,Zt=0,Pe=gi();if(Pe)Rt=Pe.left,Zt=Pe.top,yt=Pe.right-Pe.left,Ft=Pe.bottom-Pe.top;else{var Vt=D.getBoundingClientRect();yt=Vt.width,Ft=Vt.height}var ci=I.getBBox();if(!(ci.width===0||ci.height===0)){var Ye=Ft/ci.height,Qe=yt/ci.width,Fr=Math.min(Qe,Ye);K.x=-(ci.left+ci.width/2)*Fr+yt/2+Rt,K.y=-(ci.top+ci.height/2)*Fr+Ft/2+Zt,K.scale=Fr}}function li(){return K}function ye(){return Y}function si(yt){Y=yt}function $e(){return H}function Ei(yt){H=yt}function Ce(){return ct}function Oi(yt){ct=C(yt)}function Xi(){return ft}function Ni(yt){if(!Number.isFinite(yt))throw new Error("Zoom speed should be a number");ft=yt}function J(){return{x:K.x,y:K.y}}function Et(yt,Ft){K.x=yt,K.y=Ft,_e(),Pn("pan"),Xt()}function qt(yt,Ft){Et(K.x+yt,K.y+Ft)}function _e(){var yt=gi();if(yt){var Ft=!1,Rt=Se(),Zt=yt.left-Rt.right;return Zt>0&&(K.x+=Zt,Ft=!0),Zt=yt.right-Rt.left,Zt<0&&(K.x+=Zt,Ft=!0),Zt=yt.top-Rt.bottom,Zt>0&&(K.y+=Zt,Ft=!0),Zt=yt.bottom-Rt.top,Zt<0&&(K.y+=Zt,Ft=!0),Ft}}function gi(){if(j){if(typeof j=="boolean"){var yt=D.getBoundingClientRect(),Ft=yt.width,Rt=yt.height;return{left:Ft*Z,top:Rt*Z,right:Ft*(1-Z),bottom:Rt*(1-Z)}}return j}}function Se(){var yt=I.getBBox(),Ft=Jt(yt.left,yt.top);return{left:Ft.x,top:Ft.y,right:yt.width*K.scale+Ft.x,bottom:yt.height*K.scale+Ft.y}}function Jt(yt,Ft){return{x:yt*K.scale+K.x,y:Ft*K.scale+K.y}}function Xt(){U=!0,ot=window.requestAnimationFrame(kn)}function be(yt,Ft,Rt){if(E(yt)||E(Ft)||E(Rt))throw new Error("zoom requires valid numbers");var Zt=K.scale*Rt;if(Zt<Y){if(K.scale===Y)return;Rt=Y/K.scale}if(Zt>H){if(K.scale===H)return;Rt=H/K.scale}var Pe=Ge(yt,Ft);if(K.x=Pe.x-Rt*(Pe.x-K.x),K.y=Pe.y-Rt*(Pe.y-K.y),j&&Z===1&&Y===1)K.scale*=Rt,_e();else{var Vt=_e();Vt||(K.scale*=Rt)}Pn("zoom"),Xt()}function mi(yt,Ft,Rt){var Zt=Rt/K.scale;be(yt,Ft,Zt)}function wi(yt){var Ft=yt.ownerSVGElement;if(!Ft)throw new Error("ui element is required to be within the scene");var Rt=yt.getBoundingClientRect(),Zt=Rt.left+Rt.width/2,Pe=Rt.top+Rt.height/2,Vt=Ft.getBoundingClientRect(),ci=Vt.width/2-Zt,Ye=Vt.height/2-Pe;Yr(ci,Ye,!0)}function ln(yt,Ft){Yr(yt-K.x,Ft-K.y,!0)}function Yr(yt,Ft,Rt){if(!Rt)return qt(yt,Ft);Ot&&Ot.cancel();var Zt={x:0,y:0},Pe={x:yt,y:Ft},Vt=0,ci=0;Ot=e(Zt,Pe,{step:function(Ye){qt(Ye.x-Vt,Ye.y-ci),Vt=Ye.x,ci=Ye.y}})}function lr(yt,Ft){la(),Et(yt,Ft)}function cr(){Zi()}function Ri(){D.addEventListener("mousedown",pt,{passive:!1}),D.addEventListener("dblclick",Tt,{passive:!1}),D.addEventListener("touchstart",Er,{passive:!1}),D.addEventListener("keydown",wn,{passive:!1}),i.addWheelListener(D,bi,{passive:!1}),Xt()}function Zi(){i.removeWheelListener(D,bi),D.removeEventListener("mousedown",pt),D.removeEventListener("keydown",wn),D.removeEventListener("dblclick",Tt),D.removeEventListener("touchstart",Er),ot&&(window.cancelAnimationFrame(ot),ot=0),st.cancel(),de(),Ke(),vt.release(),Wo()}function kn(){U&&In()}function In(){U=!1,I.applyTransform(K),Pn("transform"),ot=0}function wn(yt){var Ft=0,Rt=0,Zt=0;if(yt.keyCode===38?Rt=1:yt.keyCode===40?Rt=-1:yt.keyCode===37?Ft=1:yt.keyCode===39?Ft=-1:yt.keyCode===189||yt.keyCode===109?Zt=1:(yt.keyCode===187||yt.keyCode===107)&&(Zt=-1),!z(yt,Ft,Rt,Zt)){if(Ft||Rt){yt.preventDefault(),yt.stopPropagation();var Pe=D.getBoundingClientRect(),Vt=Math.min(Pe.width,Pe.height),ci=.05,Ye=Vt*ci*Ft,Qe=Vt*ci*Rt;Yr(Ye,Qe)}if(Zt){var Fr=Ps(Zt*100),Vt=ct?Qi():Sn();zn(Vt.x,Vt.y,Fr)}}}function Sn(){var yt=D.getBoundingClientRect();return{x:yt.width/2,y:yt.height/2}}function Er(yt){if($n(yt),yr(),yt.touches.length===1)return mr(yt,yt.touches[0]);yt.touches.length===2&&(ht=X(yt.touches[0],yt.touches[1]),Gt=!0,Kr())}function $n(yt){M.onTouch&&!M.onTouch(yt)||(yt.stopPropagation(),yt.preventDefault())}function Ea(yt){yr(),!(M.onDoubleClick&&!M.onDoubleClick(yt))&&(yt.preventDefault(),yt.stopPropagation())}function mr(yt){it=new Date;var Ft=yt.touches[0],Rt=ii(Ft);Bt=Rt;var Zt=Ge(Rt.x,Rt.y);Dt=Zt.x,xt=Zt.y,Ut=Dt,Yt=xt,st.cancel(),Kr()}function Kr(){Ht||(Ht=!0,document.addEventListener("touchmove",cn),document.addEventListener("touchend",ee),document.addEventListener("touchcancel",ee))}function cn(yt){if(yt.touches.length===1){yt.stopPropagation();var Ft=yt.touches[0],Rt=ii(Ft),Zt=Ge(Rt.x,Rt.y),Pe=Zt.x-Dt,Vt=Zt.y-xt;Pe!==0&&Vt!==0&&Ja(),Dt=Zt.x,xt=Zt.y,Yr(Pe,Vt)}else if(yt.touches.length===2){Gt=!0;var ci=yt.touches[0],Ye=yt.touches[1],Qe=X(ci,Ye),Fr=1+(Qe/ht-1)*W,qn=ii(ci),qs=ii(Ye);if(Dt=(qn.x+qs.x)/2,xt=(qn.y+qs.y)/2,ct){var Rt=Qi();Dt=Rt.x,xt=Rt.y}zn(Dt,xt,Fr),ht=Qe,yt.stopPropagation(),yt.preventDefault()}}function yr(){V&&(clearTimeout(V),V=0)}function yi(yt){if(M.onClick){yr();var Ft=Dt-Ut,Rt=xt-Yt,Zt=Math.sqrt(Ft*Ft+Rt*Rt);Zt>5||(V=setTimeout(function(){V=0,M.onClick(yt)},x))}}function ee(yt){if(yr(),yt.touches.length>0){var Ft=ii(yt.touches[0]),Rt=Ge(Ft.x,Ft.y);Dt=Rt.x,xt=Rt.y}else{var Zt=new Date;if(Zt-wt<x)if(ct){var Ft=Qi();Yi(Ft.x,Ft.y,rt)}else Yi(Bt.x,Bt.y,rt);else Zt-it<y&&yi(yt);wt=Zt,Wo(),Ke()}}function X(yt,Ft){var Rt=yt.clientX-Ft.clientX,Zt=yt.clientY-Ft.clientY;return Math.sqrt(Rt*Rt+Zt*Zt)}function Tt(yt){Ea(yt);var Ft=ii(yt);ct&&(Ft=Qi()),Yi(Ft.x,Ft.y,rt)}function pt(yt){if(yr(),!tt(yt)){if(at=yt,Ct=new Date,Ht)return yt.stopPropagation(),!1;var Ft=yt.button===1&&window.event!==null||yt.button===0;if(Ft){st.cancel();var Rt=ii(yt),Zt=Ge(Rt.x,Rt.y);return Ut=Dt=Zt.x,Yt=xt=Zt.y,document.addEventListener("mousemove",zt),document.addEventListener("mouseup",Kt),vt.capture(yt.target||yt.srcElement),!1}}}function zt(yt){if(!Ht){Ja();var Ft=ii(yt),Rt=Ge(Ft.x,Ft.y),Zt=Rt.x-Dt,Pe=Rt.y-xt;Dt=Rt.x,xt=Rt.y,Yr(Zt,Pe)}}function Kt(){var yt=new Date;yt-Ct<y&&yi(at),vt.release(),Wo(),de()}function de(){document.removeEventListener("mousemove",zt),document.removeEventListener("mouseup",Kt),re=!1}function Ke(){document.removeEventListener("touchmove",cn),document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),re=!1,Gt=!1,Ht=!1}function bi(yt){if(!G(yt)){st.cancel();var Ft=yt.deltaY;yt.deltaMode>0&&(Ft*=100);var Rt=Ps(Ft);if(Rt!==1){var Zt=ct?Qi():ii(yt);zn(Zt.x,Zt.y,Rt),yt.preventDefault()}}}function ii(yt){var Ft,Rt,Zt=D.getBoundingClientRect();return Ft=yt.clientX-Zt.left,Rt=yt.clientY-Zt.top,{x:Ft,y:Rt}}function Yi(yt,Ft,Rt){var Zt=K.scale,Pe={scale:Zt},Vt={scale:Rt*Zt};st.cancel(),la(),$t=e(Pe,Vt,{step:function(ci){mi(yt,Ft,ci.scale)},done:Nr})}function Le(yt,Ft,Rt){var Zt=K.scale,Pe={scale:Zt},Vt={scale:Rt};st.cancel(),la(),$t=e(Pe,Vt,{step:function(ci){mi(yt,Ft,ci.scale)},done:Nr})}function Qi(){var yt=D.getBoundingClientRect();return{x:yt.width*ct.x,y:yt.height*ct.y}}function zn(yt,Ft,Rt){return st.cancel(),la(),be(yt,Ft,Rt)}function la(){$t&&($t.cancel(),$t=null)}function Ps(yt){var Ft=Math.sign(yt),Rt=Math.min(.25,Math.abs(ft*yt/128));return 1-Ft*Rt}function Ja(){re||(Pn("panstart"),re=!0,st.start())}function Wo(){re&&(Gt||st.stop(),Pn("panend"))}function Nr(){Pn("zoomend")}function Pn(yt){ae.fire(yt,ae)}}function C(A){if(A){if(typeof A=="object")return(!N(A.x)||!N(A.y))&&_(A),A;_()}}function _(A){throw console.error(A),new Error(["Cannot parse transform origin.","Some good examples:",' "center center" can be achieved with {x: 0.5, y: 0.5}',' "top center" can be achieved with {x: 0.5, y: 0}',' "bottom right" can be achieved with {x: 1, y: 1}'].join(`
|
|
463
|
-
`))}function k(){}function T(A){var M=typeof A;if(!(M==="undefined"||M==="boolean")){var I=N(A.left)&&N(A.top)&&N(A.bottom)&&N(A.right);if(!I)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function N(A){return Number.isFinite(A)}function E(A){return Number.isNaN?Number.isNaN(A):A!==A}function B(){return{start:k,stop:k,cancel:k}}function O(){if(typeof document>"u")return;var A=document.getElementsByTagName("script");if(!A)return;for(var M,I=0;I<A.length;++I){var D=A[I];if(D.src&&D.src.match(/\bpanzoom(\.min)?\.js/)){M=D;break}}if(!M)return;var F=M.getAttribute("query");if(!F)return;var U=M.getAttribute("name")||"pz",K=Date.now();z();function z(){var H=document.querySelector(F);if(!H){var Y=Date.now(),Z=Y-K;if(Z<2e3){setTimeout(z,100);return}console.error("Cannot find the panzoom element",U);return}var rt=W(M);console.log(rt),window[U]=v(H,rt)}function W(H){for(var Y=H.attributes,Z={},rt=0;rt<Y.length;++rt){var G=Y[rt],tt=j(G);tt&&(Z[tt.name]=tt.value)}return Z}function j(H){if(H.name){var Y=H.name[0]==="p"&&H.name[1]==="z"&&H.name[2]==="-";if(Y){var Z=H.name.substr(3),rt=JSON.parse(H.value);return{name:Z,value:rt}}}}}return O(),bx}var pnt=fnt();const gnt=$d(pnt);function xx(i){return i.replace(/ı/g,"i").replace(/İ/g,"i").replace(/ş/g,"s").replace(/Ş/g,"s").replace(/ğ/g,"g").replace(/Ğ/g,"g").normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase()}function em({value:i,options:e,placeholder:r="Select…",searchPlaceholder:n="Search…",onChange:a,allowCustom:o=!1,clearLabel:c="None"}){const[h,u]=P.useState(!1),[d,f]=P.useState(""),g=P.useRef(null),x=P.useMemo(()=>{const _=xx(d.trim());return _?e.filter(k=>xx(k.label).includes(_)||xx(k.value).includes(_)):e},[e,d]),y=e.find(_=>_.value===i),v=o&&d.trim()&&!e.some(_=>_.value===d.trim());P.useEffect(()=>{if(!h)return;const _=T=>{g.current&&!g.current.contains(T.target)&&u(!1)},k=T=>{T.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",_),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",k)}},[h]);const C=_=>{a(_),u(!1),f("")};return m.jsxs("div",{className:"ss-root",ref:g,children:[m.jsxs("button",{type:"button",className:"ss-trigger",onClick:()=>{u(_=>!_),f("")},children:[m.jsx("span",{className:y||i?"ss-value":"ss-placeholder",children:(y==null?void 0:y.label)??i??r}),m.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",className:"ss-chevron",children:m.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),h&&m.jsxs("div",{className:"ss-pop",children:[m.jsx("input",{autoFocus:!0,className:"ss-search",placeholder:n,value:d,onChange:_=>f(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),x.length>0?C(x[0].value):v&&C(d.trim()))}}),m.jsxs("div",{className:"ss-list",children:[m.jsx("button",{type:"button",className:"ss-item ss-item--clear",onClick:()=>C(null),children:c}),x.map(_=>m.jsxs("button",{type:"button",className:`ss-item${_.value===i?" ss-item--active":""}`,onClick:()=>C(_.value),children:[m.jsx("span",{children:_.label}),_.hint&&m.jsx("span",{className:"ss-hint",children:_.hint})]},_.value)),v&&m.jsxs("button",{type:"button",className:"ss-item",onClick:()=>C(d.trim()),children:["Use “",d.trim(),"”"]}),x.length===0&&!v&&m.jsx("div",{className:"ss-empty",children:e.length===0&&o&&!d.trim()?"Type a name…":"No matches"})]})]})]})}Re.setOptions({gfm:!0,breaks:!0});const mnt={"[":"]","(":")","{":"}"};function ynt(i){if(/^\s*(classDef|class|style|linkStyle|click|subgraph)\b/.test(i))return i;let e="",r=0;const n=i.length;for(;r<n;){const a=i.slice(r).match(/^(\s*[A-Za-z_]\w*\s*)([\[\(\{])/);if(!a){e+=i[r],r++;continue}const o=a[1],c=a[2],h=mnt[c],u=r+o.length+1,d=i.lastIndexOf(h);if(d<=u){e+=i[r],r++;continue}const g=i.slice(u,d).trim();if(g.startsWith('"')&&g.endsWith('"')){e+=i.slice(r,d+1),r=d+1;continue}if(g===""){e+=i.slice(r,d+1),r=d+1;continue}const x=g.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");e+=`${o}${c}"${x}"${h}`,r=d+1}return e}function bnt(i){return i.split(`
|
|
464
|
-
`).map(ynt).join(`
|
|
465
|
-
`)}const xnt=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function vnt(i,e,r){const n=i.split(`
|
|
466
|
-
`);let a=0,o=!1,c="";for(let h=0;h<n.length;h++){const u=n[h],d=/^(\s*)(```|~~~)/.exec(u);if(d){o?u.includes(c)&&(o=!1,c=""):(o=!0,c=d[2]);continue}if(o)continue;const f=xnt.exec(u);if(f){if(a===e){const[,g,,x,y]=f,v=r?"[x]":"[ ]";n[h]=`${g}${v}${x}${y}`;const C=/<!--\s*node:([A-Za-z0-9_-]+)\s*-->/.exec(y);return{body:n.join(`
|
|
467
|
-
`),nodeId:C?C[1]:null}}a++}}return null}const Cnt=/-->|---|==>|==|-\.|~~~|\.->/;function _nt(i,e,r){const n=r?"done":"todo",a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`^(\\s*)(${a})((?:\\[[^\\]]*\\]|\\([^)]*\\)|\\{[^}]*\\})?)(\\s*:::(?:done|todo|active|blocked)\\b)?\\s*$`),c=i.split(`
|
|
468
|
-
`);let h=!1,u="";for(let d=0;d<c.length;d++){const f=c[d];if(!h){const C=/^(\s*)(```|~~~)\s*mermaid\b/i.exec(f);C&&(h=!0,u=C[2]);continue}if(f.trim().startsWith(u)){h=!1,u="";continue}if(/^\s*(classDef|class|style|linkStyle|click|subgraph|end)\b/.test(f)||Cnt.test(f))continue;const g=o.exec(f);if(!g)continue;const[,x,y,v]=g;c[d]=`${x}${y}${v??""}:::${n}`}return c.join(`
|
|
469
|
-
`)}const knt=[1,2,3,4,5,6,7,8,9,10],wnt=[1,2,3,4,5],Snt=[25,50,75,100],Tnt=[.5,1,1.5,2,3,4,5,6,8];function Ent(i){return i==null?"":i<5?"rice-score--low":i<=15?"rice-score--mid":"rice-score--high"}function Nnt({task:i,expanded:e,onToggle:r,onUpdate:n}){const{t:a}=qi(),o=i.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=Ent(c),d=g=>o?o[g]:null,f=(g,x)=>{const y=x===""?null:Number(x);y!==null&&!Number.isFinite(y)||y!==d(g)&&n({[g]:y})};return m.jsxs("div",{className:`rice-block ${e?"rice-block--open":""}`,children:[m.jsxs("button",{type:"button",className:"rice-header",onClick:r,"aria-expanded":e,children:[m.jsx("span",{className:"rice-header-label",children:a("rice.title")}),m.jsx("span",{className:`rice-score-badge ${u}`,title:a("rice.score"),children:h}),m.jsx("svg",{className:`rice-chevron ${e?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:m.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e&&m.jsxs("div",{className:"rice-grid",children:[m.jsxs("label",{className:"rice-field",children:[m.jsx("span",{className:"rice-field-label",children:a("rice.reach")}),m.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.reach)??"",title:a("rice.tooltip.reach"),onChange:g=>f("reach",g.target.value),children:[m.jsx("option",{value:"",children:"—"}),knt.map(g=>m.jsx("option",{value:g,children:g},g))]})]}),m.jsxs("label",{className:"rice-field",children:[m.jsx("span",{className:"rice-field-label",children:a("rice.impact")}),m.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.impact)??"",title:a("rice.tooltip.impact"),onChange:g=>f("impact",g.target.value),children:[m.jsx("option",{value:"",children:"—"}),wnt.map(g=>m.jsx("option",{value:g,children:g},g))]})]}),m.jsxs("label",{className:"rice-field",children:[m.jsx("span",{className:"rice-field-label",children:a("rice.confidence")}),m.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.confidence)??"",title:a("rice.tooltip.confidence"),onChange:g=>f("confidence",g.target.value),children:[m.jsx("option",{value:"",children:"—"}),Snt.map(g=>m.jsxs("option",{value:g,children:[g,"%"]},g))]})]}),m.jsxs("label",{className:"rice-field",children:[m.jsx("span",{className:"rice-field-label",children:a("rice.effort")}),m.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.effort)??"",title:a("rice.tooltip.effort"),onChange:g=>f("effort",g.target.value),children:[m.jsx("option",{value:"",children:"—"}),Tnt.map(g=>m.jsxs("option",{value:g,children:[g,"w"]},g))]})]}),o&&m.jsx("button",{type:"button",className:"rice-clear-btn",onClick:()=>n(null),children:a("rice.clear")})]})]})}function zr({label:i,children:e}){return m.jsxs("div",{className:"prop-row",children:[m.jsx("span",{className:"prop-label",children:i}),m.jsx("div",{className:"prop-value",children:e})]})}function Ant({text:i}){const[e,r]=P.useState(!1),[n,a]=P.useState(!1),o=P.useRef(null);return P.useEffect(()=>{requestAnimationFrame(()=>{const c=o.current;c&&a(c.scrollHeight>c.clientHeight+1)})},[i]),m.jsxs("span",{className:"prop-expandable",onClick:()=>r(c=>!c),children:[m.jsx("span",{ref:o,className:`prop-text ${e?"":"prop-text--clamped"}`,children:i}),n&&!e&&m.jsx("span",{className:"prop-expand-hint",children:"show more"}),e&&n&&m.jsx("span",{className:"prop-expand-hint",children:"show less"})]})}function Mnt({task:i,onClose:e,initialRiceExpanded:r}){const{t:n}=qi(),{resolved:a}=Gd(),o=tD(),c=wrt(),h=eD(),{data:u}=vrt(),{data:d}=krt(),{data:f}=rD(),[g,x]=P.useState(""),[y,v]=P.useState(""),[C,_]=P.useState(null),[k,T]=P.useState(r??!!i.rice),[N,E]=P.useState(!1),B=V=>{_(V.message),setTimeout(()=>_(null),5e3)},O=V=>{o.mutate({slug:i.slug,updates:{status:V}},{onError:B})},A=V=>{o.mutate({slug:i.slug,updates:{priority:V}},{onError:B})},M=V=>{o.mutate({slug:i.slug,updates:{urgency:V}},{onError:B})},I=V=>{o.mutate({slug:i.slug,updates:{version:V||null}},{onError:B})},D=V=>{o.mutate({slug:i.slug,updates:{rice:V}},{onError:B})},F=(V,at)=>{const Ct=V==="related_feature"?at.trim()||null:at.trim();V!=="related_feature"&&!Ct||o.mutate({slug:i.slug,updates:{[V]:Ct}},{onError:B})},U=V=>V.filter(at=>at.startsWith("person:")).map(at=>at.slice(7)),K=(V,at)=>[...V.filter(Bt=>!Bt.startsWith("person:")),...at.map(Bt=>`person:${Bt}`)],z=(()=>{const V=new Set(U(i.tags));return i.assignee&&V.add(i.assignee),[...V]})(),W=V=>{const at={tags:K(i.tags,V)};i.assignee&&(at.assignee=null),o.mutate({slug:i.slug,updates:at},{onError:B})},j=V=>{const at=V.trim();at&&!z.includes(at)&&W([...z,at])},H=V=>{W(z.filter(at=>at!==V))},Y=()=>{window.confirm(`Delete task "${i.name}"? This propagates to the remote backend on sync.`)&&h.mutate(i.slug,{onError:B,onSuccess:()=>e==null?void 0:e()})},Z=V=>{o.mutate({slug:i.slug,updates:{due_date:V||null}},{onError:B})},rt=V=>{const at={tags:V};if(i.assignee){const Ct=`person:${i.assignee}`;i.tags.includes(Ct)&&!V.includes(Ct)&&(at.assignee=null)}o.mutate({slug:i.slug,updates:at},{onError:B})},G=()=>{const V=y.trim();V&&(i.tags.some(at=>at.toLowerCase()===V.toLowerCase())||rt([...i.tags,V]),v(""))},tt=V=>{V.preventDefault(),g.trim()&&c.mutate({slug:i.slug,content:g.trim()},{onSuccess:()=>x(""),onError:B})},ft=P.useMemo(()=>i.body?Re.parse(i.body):"",[i.body]),ct=P.useRef(null),vt=P.useRef(i.body??""),ot=P.useRef(i.body??"");P.useEffect(()=>{vt.current=i.body??"",ot.current=i.body??""},[i.body]);const wt=P.useRef(o),it=P.useRef(B);return P.useEffect(()=>{wt.current=o,it.current=B}),P.useEffect(()=>{const V=ct.current;if(!V||!ft)return;V.querySelectorAll('input[type="checkbox"]').forEach((Bt,Ht)=>{Bt.removeAttribute("disabled"),Bt.dataset.criterionIndex=String(Ht)});const Ct=Bt=>{const Ht=Bt.target;if(!(Ht instanceof HTMLInputElement)||Ht.type!=="checkbox")return;const re=Ht.dataset.criterionIndex;if(re===void 0)return;const Dt=Number(re),xt=Ht.checked,Ut=ot.current,Yt=vnt(Ut,Dt,xt);if(!Yt)return;let ht=Yt.body;Yt.nodeId&&(ht=_nt(ht,Yt.nodeId,xt)),ht!==Ut&&(ot.current=ht,wt.current.mutate({slug:i.slug,updates:{body:ht}},{onError:st=>{Ht.checked=!xt,ot.current=vt.current,it.current(st)}}))};return V.addEventListener("change",Ct),()=>V.removeEventListener("change",Ct)},[ft,i.slug]),P.useEffect(()=>{const V=ct.current;if(!V||!ft)return;K5(a);let at=!1;const Ct=[];let Bt=!1;const Ht=async()=>{if(at||Bt)return;V.querySelectorAll(".mermaid-rendered").forEach(xt=>{const Ut=xt.dataset.mermaidSource;if(!Ut)return;const Yt=document.createElement("pre"),ht=document.createElement("code");ht.className="language-mermaid",ht.textContent=Ut,Yt.appendChild(ht),xt.replaceWith(Yt)});const Dt=V.querySelectorAll("pre > code.language-mermaid");if(Dt.length!==0){for(Bt=!0;Ct.length;){const xt=Ct.pop();try{xt==null||xt()}catch{}}for(let xt=0;xt<Dt.length&&!at;xt++){const Ut=Dt[xt],Yt=Ut.parentElement;if(!Yt)continue;const ht=bnt(Ut.textContent??""),st=`mmd-${i.slug}-${xt}-${Date.now().toString(36)}`,Ot=document.createElement("div");Ot.className="mermaid-rendered",Ot.dataset.mermaidSource=ht;const $t=document.createElement("div");$t.className="mermaid-stage",Ot.appendChild($t);const Gt=document.createElement("div");Gt.className="mermaid-controls",Gt.innerHTML=`
|
|
470
|
-
<button type="button" data-act="out" title="Zoom out">−</button>
|
|
471
|
-
<button type="button" data-act="reset" title="Fit">⤢</button>
|
|
472
|
-
<button type="button" data-act="in" title="Zoom in">+</button>
|
|
473
|
-
`,Ot.appendChild(Gt),Yt.replaceWith(Ot);try{const{svg:jt,bindFunctions:ae}=await s_.render(st,ht);if(at)break;$t.innerHTML=jt,ae==null||ae($t),Ot.dataset.mermaidRendered="1";const It=$t.querySelector("svg");if(!It)continue;V5(It);const je=It.viewBox.baseVal,ve=je&&je.width>0?je.width:It.getBoundingClientRect().width,He=je&&je.height>0?je.height:It.getBoundingClientRect().height;It.removeAttribute("width"),It.removeAttribute("height"),It.style.width=`${ve}px`,It.style.height=`${He}px`,It.style.maxWidth="none",It.style.transformOrigin="0 0";const Be=gnt(It,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),ki=()=>{try{const ye=$t.getBoundingClientRect();if(ye.width===0||ye.height===0)return;const si=32,$e=Math.min((ye.width-si)/ve,(ye.height-si)/He,1);Be.zoomAbs(0,0,1),Be.moveTo(0,0),Be.zoomAbs(0,0,$e);const Ei=(ye.width-ve*$e)/2,Ce=(ye.height-He*$e)/2;Be.moveTo(Ei,Ce)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(ki));const Li=new ResizeObserver(()=>ki());Li.observe($t);let Ge=null;const Ze=ye=>{try{const si=ye.getBoundingClientRect(),$e=$t.getBoundingClientRect();if(si.width===0)return;const Ei=si.left+si.width/2-$e.left,Ce=si.top+si.height/2-$e.top,Oi=Math.min($e.width*.6/si.width,$e.height*.6/si.height,6),Xi=Be.getTransform(),Ni=Oi/Xi.scale;if(Math.abs(Ni-1)<.01)return;Be.smoothZoom(Ei,Ce,Ni)}catch{}},li=ye=>{const si=ye.target,$e=(si==null?void 0:si.closest("g.node, g.cluster"))??null;if(!$e){Ge&&(Ge=null,ki());return}Ge===$e?(Ge=null,ki()):(Ge=$e,Ze($e))};$t.addEventListener("click",li),It.querySelectorAll("g.node, g.cluster").forEach(ye=>{ye.style.cursor="zoom-in"}),Gt.addEventListener("click",ye=>{ye.stopPropagation();const si=ye.target.closest("button");if(!si)return;const $e=$t.getBoundingClientRect(),Ei=$e.width/2,Ce=$e.height/2,Oi=si.getAttribute("data-act");Oi==="in"?Be.smoothZoom(Ei,Ce,1.4):Oi==="out"?Be.smoothZoom(Ei,Ce,1/1.4):Oi==="reset"&&(Ge=null,ki())}),Ct.push(()=>{Li.disconnect(),$t.removeEventListener("click",li),Be.dispose()})}catch(jt){if(at)break;const ae=jt instanceof Error?jt.message:String(jt);$t.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${ae.replace(/[<>&]/g,It=>({"<":"<",">":">","&":"&"})[It]??It)}</pre>`}}Bt=!1}};Ht();const re=new MutationObserver(()=>{if(at||Bt)return;const Dt=V.querySelector("pre > code.language-mermaid"),xt=V.querySelector(".mermaid-rendered .mermaid-stage svg");Dt&&(!xt||Dt)&&Dt&&Ht()});return re.observe(V,{childList:!0,subtree:!0}),()=>{for(at=!0,re.disconnect();Ct.length;){const Dt=Ct.pop();try{Dt==null||Dt()}catch{}}}},[ft,i.slug,a]),m.jsx("div",{className:`detail-overlay ${N?"detail-overlay--fullscreen":""}`,onClick:e,children:m.jsxs("div",{className:`detail-panel ${N?"detail-panel--fullscreen":""}`,onClick:V=>V.stopPropagation(),children:[m.jsxs("div",{className:"detail-header",children:[m.jsx("h2",{className:"detail-title",children:i.name}),m.jsxs("div",{className:"detail-header-actions",children:[m.jsx("button",{type:"button",className:"detail-icon-btn",onClick:()=>E(V=>!V),title:N?"Exit full-page view":"Open in full page","aria-label":N?"Exit full-page view":"Open in full page",children:N?m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("path",{d:"M6 3v3H3M10 3v3h3M6 13v-3H3M10 13v-3h3"})}):m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("path",{d:"M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3"})})}),m.jsx("button",{className:"modal-close",onClick:e,"aria-label":"Close",children:"×"})]})]}),m.jsxs("div",{className:"detail-body",children:[C&&m.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:C}),m.jsxs("div",{className:"props-block",children:[m.jsx(zr,{label:"Status",children:m.jsxs("select",{className:"field-select prop-select",value:i.status,onChange:V=>O(V.target.value),children:[m.jsx("option",{value:"todo",children:n("tasks.todo")}),m.jsx("option",{value:"in_progress",children:n("tasks.in_progress")}),m.jsx("option",{value:"in_review",children:n("tasks.in_review")}),m.jsx("option",{value:"completed",children:n("tasks.completed")})]})}),m.jsx(zr,{label:n("tasks.priority"),children:m.jsxs("select",{className:"field-select prop-select",value:i.priority,onChange:V=>A(V.target.value),children:[m.jsx("option",{value:"low",children:n("priority.low")}),m.jsx("option",{value:"medium",children:n("priority.medium")}),m.jsx("option",{value:"high",children:n("priority.high")}),m.jsx("option",{value:"critical",children:n("priority.critical")})]})}),m.jsx(zr,{label:"Urgency",children:m.jsxs("select",{className:"field-select prop-select",value:i.urgency,onChange:V=>M(V.target.value),children:[m.jsx("option",{value:"low",children:n("priority.low")}),m.jsx("option",{value:"medium",children:n("priority.medium")}),m.jsx("option",{value:"high",children:n("priority.high")}),m.jsx("option",{value:"critical",children:n("priority.critical")})]})}),m.jsx(zr,{label:n("rice.title"),children:m.jsx(Nnt,{task:i,expanded:k,onToggle:()=>T(V=>!V),onUpdate:D})}),m.jsx(zr,{label:"Name",children:m.jsx("input",{className:"settings-like-input prop-text-input",defaultValue:i.name,onBlur:V=>{V.target.value.trim()&&V.target.value.trim()!==i.name&&F("name",V.target.value)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur()}},`name-${i.slug}-${i.name}`)}),m.jsx(zr,{label:"Summary",children:m.jsx("input",{className:"prop-text-input",defaultValue:i.description,placeholder:"One-line summary",onBlur:V=>{V.target.value.trim()&&V.target.value.trim()!==i.description&&F("description",V.target.value)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur()}},`desc-${i.slug}-${i.description}`)}),m.jsx(zr,{label:"Assignees",children:m.jsxs("div",{className:"assignee-multi",children:[z.length>0&&m.jsx("div",{className:"assignee-chips",children:z.map(V=>{const at=(u??[]).find(Ct=>Ct.slug===V);return m.jsxs("span",{className:"assignee-chip",children:[(at==null?void 0:at.name)??V,m.jsx("button",{type:"button",className:"assignee-chip__remove","aria-label":`Remove ${(at==null?void 0:at.name)??V}`,onClick:()=>H(V),children:"×"})]},V)})}),m.jsx(em,{value:null,options:(u??[]).filter(V=>!z.includes(V.slug)).map(V=>({value:V.slug,label:V.name,hint:V.slug})),placeholder:z.length>0?"Add assignee…":"Unassigned",searchPlaceholder:"Search people…",clearLabel:"Unassigned",allowCustom:!0,onChange:V=>{V&&j(V)}})]})}),m.jsx(zr,{label:"Feature",children:m.jsx(em,{value:i.related_feature??null,options:(d??[]).map(V=>({value:V.slug,label:V.name??V.slug,hint:V.name?V.slug:void 0})),placeholder:"No feature",searchPlaceholder:"Search features…",clearLabel:"No feature",allowCustom:!0,onChange:V=>F("related_feature",V??"")})}),m.jsx(zr,{label:"Due",children:i.tags.some(V=>V.toLowerCase()==="backlog")?m.jsx("span",{className:"prop-text",title:"Backlog tasks are undated by rule — remove the backlog tag to schedule.",children:"— backlog tasks are undated"}):m.jsx("input",{type:"date",className:"field-select prop-select",value:i.due_date??"",onChange:V=>Z(V.target.value)})}),m.jsx(zr,{label:"Tags",children:m.jsxs("div",{className:"prop-tags prop-tags--editable",children:[i.tags.map(V=>m.jsxs("span",{className:"task-tag","data-hue":Va(V),children:[V,m.jsx("button",{type:"button",className:"task-tag-remove","aria-label":`Remove tag ${V}`,onClick:()=>rt(i.tags.filter(at=>at!==V)),children:"×"})]},V)),m.jsx("input",{className:"task-tag-input",value:y,placeholder:"+ tag","aria-label":"Add tag",onChange:V=>v(V.target.value),onKeyDown:V=>{V.key==="Enter"&&(V.preventDefault(),G())},onBlur:G})]})}),m.jsx(zr,{label:"Version",children:m.jsxs("select",{className:"field-select prop-select",value:i.version??"",onChange:V=>I(V.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(f??[]).map(V=>m.jsx("option",{value:V.version,children:V.version},V.version)),i.version&&!(f??[]).some(V=>V.version===i.version)&&m.jsx("option",{value:i.version,children:i.version})]})}),i.description&&m.jsx(zr,{label:"Description",children:m.jsx(Ant,{text:i.description})}),m.jsx(zr,{label:"Created",children:m.jsx("span",{className:"prop-date",children:i.created_at})}),m.jsx(zr,{label:"Updated",children:m.jsx("span",{className:"prop-date",children:i.updated_at})}),i.parent_task&&m.jsx(zr,{label:"Parent",children:m.jsx("span",{className:"prop-text",children:i.parent_task})}),m.jsx(zr,{label:"ID",children:m.jsx("code",{className:"prop-id",children:i.id})})]}),m.jsx("hr",{className:"detail-divider"}),ft?m.jsx("div",{ref:ct,className:"markdown-body",dangerouslySetInnerHTML:{__html:ft}}):m.jsx("p",{className:"detail-empty",children:"No content."}),m.jsx("hr",{className:"detail-divider"}),m.jsxs("div",{className:"changelog-section",children:[m.jsx("h3",{className:"changelog-title",children:n("tasks.changelog")}),m.jsxs("form",{onSubmit:tt,className:"changelog-add",children:[m.jsx("input",{className:"field-input",value:g,onChange:V=>x(V.target.value),placeholder:"Add a changelog entry..."}),m.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!g.trim()||c.isPending,children:c.isPending?"...":n("tasks.add_entry")})]})]}),m.jsx("hr",{className:"detail-divider"}),m.jsxs("div",{className:"detail-danger-zone",children:[m.jsx("button",{type:"button",className:"btn btn--danger-ghost",onClick:Y,disabled:h.isPending,children:h.isPending?"Deleting…":"Delete task"}),m.jsx("span",{className:"detail-danger-hint",children:"Removes the task locally and on the remote backend (next sync)."})]})]})]})})}const Bnt=["critical","high"];function im(i){return Bnt.includes(i)}const b1=[{key:"do",label:"Do First",subtitle:"Important & Urgent",colorVar:"--color-quadrant-do",priorityHigh:!0,urgencyHigh:!0},{key:"schedule",label:"Schedule",subtitle:"Important & Not Urgent",colorVar:"--color-quadrant-schedule",priorityHigh:!0,urgencyHigh:!1},{key:"delegate",label:"Delegate",subtitle:"Less Important & Urgent",colorVar:"--color-quadrant-delegate",priorityHigh:!1,urgencyHigh:!0},{key:"eliminate",label:"Don't Do",subtitle:"Less Important & Not Urgent",colorVar:"--color-quadrant-eliminate",priorityHigh:!1,urgencyHigh:!1}];function gA(i){const e=im(i.priority),r=im(i.urgency);return e&&r?"do":e&&!r?"schedule":!e&&r?"delegate":"eliminate"}function mA(i,e){return i&&!im(e)?"high":!i&&im(e)?"medium":null}function yA(i,e){const r=b1.find(c=>c.key===e);if(!r)return{};const n={},a=mA(r.priorityHigh,i.priority),o=mA(r.urgencyHigh,i.urgency);return a&&(n.priority=a),o&&(n.urgency=o),n}function vx(i){return!i.priority&&!i.urgency}function Lnt(i){const e=[];return i.priority&&e.push(`priority → ${i.priority}`),i.urgency&&e.push(`urgency → ${i.urgency}`),e.join(" · ")}function Ont({tasks:i,onTaskClick:e,onTaskMove:r}){const n=i.filter(T=>T.status!=="completed"),[a,o]=P.useState(null),[c,h]=P.useState(null),[u,d]=P.useState(null),f=!!r,g=c?n.find(T=>T.slug===c)??null:null,x=g?gA(g):null,y=(T,N)=>{T.dataTransfer.setData("text/plain",N.slug),T.dataTransfer.effectAllowed="move",h(N.slug)},v=()=>{h(null),o(null)},C=(T,N)=>{f&&(T.preventDefault(),T.dataTransfer.dropEffect="move",a!==N&&o(N))},_=(T,N)=>{if(!r)return;T.preventDefault();const E=T.dataTransfer.getData("text/plain");if(v(),!E)return;const B=n.find(M=>M.slug===E);if(!B)return;const O=yA(B,N);if(vx(O))return;r(E,O);const A=b1.find(M=>M.key===N);d({slug:E,name:B.name,toLabel:(A==null?void 0:A.label)??N,prev:{priority:B.priority,urgency:B.urgency}})},k=()=>{!u||!r||(r(u.slug,{priority:u.prev.priority,urgency:u.prev.urgency}),d(null))};return m.jsxs("div",{className:`eisenhower${g?" eisenhower--dragging":""}`,children:[f&&u&&m.jsxs("div",{className:"eisenhower-undo",role:"status",children:[m.jsxs("span",{className:"eisenhower-undo-text",children:["Moved ",m.jsx("strong",{children:u.name})," → ",u.toLabel]}),m.jsx("button",{type:"button",className:"eisenhower-undo-btn",onClick:k,children:"Undo"}),m.jsx("button",{type:"button",className:"eisenhower-undo-dismiss","aria-label":"Dismiss",onClick:()=>d(null),children:"×"})]}),m.jsx("div",{className:"eisenhower-grid",onDragEnd:v,children:b1.map(T=>{const N=n.filter(I=>gA(I)===T.key),E=a===T.key,B=x===T.key,O=E&&g?yA(g,T.key):null,A=O?vx(O)?"Already here":Lnt(O):null,M=["eisenhower-quadrant",`eisenhower-quadrant--${T.key}`,E?"eisenhower-quadrant--dragover":"",B?"eisenhower-quadrant--source":"",E&&O&&vx(O)?"eisenhower-quadrant--noop":""].filter(Boolean).join(" ");return m.jsxs("div",{className:M,onDragOver:I=>C(I,T.key),onDragLeave:()=>o(I=>I===T.key?null:I),onDrop:I=>_(I,T.key),children:[m.jsxs("div",{className:"eisenhower-quadrant-header",children:[m.jsx("span",{className:"eisenhower-quadrant-dot",style:{background:`var(${T.colorVar})`}}),m.jsx("span",{className:"eisenhower-quadrant-label",children:T.label}),m.jsx("span",{className:"eisenhower-quadrant-count",children:N.length})]}),A?m.jsx("span",{className:"eisenhower-quadrant-preview",children:A}):m.jsx("span",{className:"eisenhower-quadrant-subtitle",children:T.subtitle}),m.jsxs("div",{className:"eisenhower-quadrant-cards",children:[N.map(I=>m.jsx(ef,{task:I,onClick:()=>e(I),onDragStart:D=>y(D,I),dragging:c===I.slug},I.slug)),f&&N.length===0&&m.jsx("div",{className:"eisenhower-quadrant-empty",children:"Drop tasks here"})]})]},T.key)})}),m.jsxs("div",{className:"eisenhower-x-label",children:[m.jsx("span",{className:"eisenhower-axis-hi",children:"Urgent"}),m.jsx("span",{className:"eisenhower-axis-lo",children:"Not Urgent"})]})]})}const Me={top:32,right:24,bottom:56,left:64},bA=.5,xA=8,Cx=1,vA=5,Rnt=2,jnt=3,Dnt={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function _x(i){return Math.log2(Math.max(i,.01)+1)}function kx(i,e,r){return Math.max(e,Math.min(r,i))}function CA(i){const e=i.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function Fnt({tasks:i,onTaskClick:e}){const r=P.useRef(null),[n,a]=P.useState({width:800,height:480}),[o,c]=P.useState(!1),[h,u]=P.useState(null);P.useEffect(()=>{const D=r.current;if(!D)return;const F=new ResizeObserver(U=>{for(const K of U){const z=K.contentRect.width,W=Math.max(360,Math.min(620,z*.6));a({width:z,height:W})}});return F.observe(D),()=>F.disconnect()},[]);const d=P.useMemo(()=>i.filter(D=>D.status!=="completed"),[i]),f=P.useMemo(()=>d.filter(CA),[d]),g=P.useMemo(()=>d.filter(D=>!CA(D)),[d]),x=P.useMemo(()=>[...f].sort((D,F)=>(F.rice.score??0)-(D.rice.score??0)),[f]),y=Math.max(120,n.width-Me.left-Me.right),v=Math.max(120,n.height-Me.top-Me.bottom),C=_x(bA),k=_x(xA)-C,T=D=>{const F=(_x(kx(D,bA,xA))-C)/k;return Me.left+(1-F)*y},N=D=>{const F=(kx(D,Cx,vA)-Cx)/(vA-Cx);return Me.top+(1-F)*v},E=D=>6+(kx(D,1,10)-1)/9*18,B=D=>Math.max(.4,D/100),O=T(Rnt),A=N(jnt),M=[.5,1,2,4,8],I=[1,2,3,4,5];return m.jsxs("div",{className:"rice-scatter",ref:r,children:[m.jsxs("svg",{className:"rice-scatter-svg",width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,role:"img","aria-label":`RICE scatter: ${f.length} rated tasks plotted by impact and effort`,children:[m.jsx("rect",{x:Me.left,y:Me.top,width:O-Me.left,height:A-Me.top,className:"rice-quad rice-quad--big-bets"}),m.jsx("rect",{x:O,y:Me.top,width:Me.left+y-O,height:A-Me.top,className:"rice-quad rice-quad--quick-wins"}),m.jsx("rect",{x:Me.left,y:A,width:O-Me.left,height:Me.top+v-A,className:"rice-quad rice-quad--time-sinks"}),m.jsx("rect",{x:O,y:A,width:Me.left+y-O,height:Me.top+v-A,className:"rice-quad rice-quad--fill-ins"}),m.jsx("text",{x:Me.left+8,y:Me.top+18,className:"rice-quad-label",children:"Big Bets"}),m.jsx("text",{x:Me.left+y-8,y:Me.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),m.jsx("text",{x:Me.left+8,y:Me.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),m.jsx("text",{x:Me.left+y-8,y:Me.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),m.jsx("line",{x1:O,y1:Me.top,x2:O,y2:Me.top+v,className:"rice-quad-divider"}),m.jsx("line",{x1:Me.left,y1:A,x2:Me.left+y,y2:A,className:"rice-quad-divider"}),m.jsx("line",{x1:Me.left,y1:Me.top+v,x2:Me.left+y,y2:Me.top+v,className:"rice-axis"}),m.jsx("line",{x1:Me.left,y1:Me.top,x2:Me.left,y2:Me.top+v,className:"rice-axis"}),M.map(D=>m.jsxs("g",{children:[m.jsx("line",{x1:T(D),y1:Me.top+v,x2:T(D),y2:Me.top+v+4,className:"rice-axis"}),m.jsxs("text",{x:T(D),y:Me.top+v+18,textAnchor:"middle",className:"rice-tick",children:[D,"w"]})]},`xt-${D}`)),m.jsx("text",{x:Me.left+y/2,y:Me.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),I.map(D=>m.jsxs("g",{children:[m.jsx("line",{x1:Me.left-4,y1:N(D),x2:Me.left,y2:N(D),className:"rice-axis"}),m.jsx("text",{x:Me.left-8,y:N(D)+4,textAnchor:"end",className:"rice-tick",children:D})]},`yt-${D}`)),m.jsx("text",{transform:`translate(${Me.left-44}, ${Me.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),f.map(D=>{const F=D.rice,U=T(F.effort),K=N(F.impact),z=E(F.reach),W=B(F.confidence),j=Dnt[D.status],H=h===D.slug;return m.jsx("circle",{cx:U,cy:K,r:z,fill:`var(${j})`,fillOpacity:W,stroke:"var(--color-bg)",strokeWidth:H?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${D.name}: reach ${F.reach}, impact ${F.impact}, confidence ${F.confidence}, effort ${F.effort} weeks, score ${F.score}`,onClick:()=>e(D),onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),e(D))},onMouseEnter:()=>u(D.slug),onMouseLeave:()=>u(null),onFocus:()=>u(D.slug),onBlur:()=>u(null),children:m.jsx("title",{children:`${D.name}
|
|
474
|
-
R ${F.reach} · I ${F.impact} · C ${F.confidence}% · E ${F.effort}w
|
|
475
|
-
Score: ${F.score}`})},D.slug)})]}),m.jsx("ol",{className:"rice-scatter-sr-list",children:x.map(D=>m.jsx("li",{children:`${D.name} — score ${D.rice.score}`},D.slug))}),g.length>0&&m.jsxs("div",{className:`rice-unscored ${o?"rice-unscored--open":""}`,children:[m.jsxs("button",{type:"button",className:"rice-unscored-toggle",onClick:()=>c(D=>!D),"aria-expanded":o,children:[m.jsxs("span",{children:["Unscored (",g.length,")"]}),m.jsx("svg",{className:`rice-chevron ${o?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:m.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),o&&m.jsx("div",{className:"rice-unscored-cards",children:g.map(D=>m.jsx(ef,{task:D,onClick:()=>e(D),onDragStart:()=>{}},D.slug))})]})]})}function Int({onClose:i,tasks:e}){const{data:r,isLoading:n}=iD(),a=Srt(),o=Trt(),[c,h]=P.useState(""),[u,d]=P.useState(""),f=v=>{v.preventDefault(),c.trim()&&a.mutate({version:c.trim(),summary:u.trim()||void 0},{onSuccess:()=>{h(""),d("")}})},g=v=>e.filter(C=>C.version===v).length,x=(r??[]).filter(v=>v.status==="planning"),y=(r??[]).filter(v=>v.status==="released");return m.jsx("div",{className:"modal-overlay",onClick:i,children:m.jsxs("div",{className:"modal version-manager-modal",onClick:v=>v.stopPropagation(),children:[m.jsxs("div",{className:"modal-header",children:[m.jsx("h2",{className:"modal-title",children:"Versions & Releases"}),m.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),m.jsxs("div",{className:"modal-body version-manager-body",children:[m.jsxs("div",{className:"version-stats",children:[m.jsxs("div",{className:"version-stat",children:[m.jsx("span",{className:"version-stat-count",children:x.length}),m.jsx("span",{className:"version-stat-label",children:"Planning"})]}),m.jsxs("div",{className:"version-stat",children:[m.jsx("span",{className:"version-stat-count",children:y.length}),m.jsx("span",{className:"version-stat-label",children:"Released"})]})]}),n&&m.jsx("p",{className:"version-manager-loading",children:"Loading..."}),x.length>0&&m.jsxs("div",{className:"version-section",children:[m.jsx("h3",{className:"version-section-title",children:"Planning"}),x.map(v=>{const C=g(v.version);return m.jsxs("div",{className:"version-item",children:[m.jsxs("div",{className:"version-item-info",children:[m.jsx("span",{className:"version-status-badge version-status-badge--planning",children:"planning"}),m.jsx("span",{className:"version-item-name",children:v.version}),m.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]})]}),v.summary&&m.jsx("p",{className:"version-item-desc",children:v.summary}),m.jsx("div",{className:"version-item-actions",children:m.jsx("button",{className:"btn btn--primary version-release-btn",onClick:()=>o.mutate({version:v.version,updates:{status:"released"}}),children:"Release"})})]},v.version)})]}),y.length>0&&m.jsxs("div",{className:"version-section",children:[m.jsx("h3",{className:"version-section-title",children:"Released"}),y.map(v=>{const C=g(v.version);return m.jsxs("div",{className:"version-item version-item--released",children:[m.jsxs("div",{className:"version-item-info",children:[m.jsx("span",{className:"version-status-badge version-status-badge--released",children:"released"}),m.jsx("span",{className:"version-item-name",children:v.version}),m.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]}),v.date&&m.jsx("span",{className:"version-item-date",children:v.date})]}),v.summary&&m.jsx("p",{className:"version-item-desc",children:v.summary})]},v.version)})]}),(r??[]).length===0&&!n&&m.jsx("p",{className:"version-manager-empty",children:"No versions yet. Create one below."}),m.jsxs("form",{onSubmit:f,className:"version-create-form",children:[m.jsx("h3",{className:"version-section-title",children:"New Version"}),m.jsx("input",{className:"field-input",value:c,onChange:v=>h(v.target.value),placeholder:"Version name (e.g. v0.2.0)",required:!0}),m.jsx("input",{className:"field-input",value:u,onChange:v=>d(v.target.value),placeholder:"Summary (optional)"}),m.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!c.trim()||a.isPending,children:a.isPending?"...":"Create Planning Version"})]})]})]})})}const _A={critical:0,high:1,medium:2,low:3},kA={critical:0,high:1,medium:2,low:3},hD=[{key:"todo",labelKey:"tasks.todo",colorVar:"--color-status-todo"},{key:"in_progress",labelKey:"tasks.in_progress",colorVar:"--color-status-in-progress"},{key:"in_review",labelKey:"tasks.in_review",colorVar:"--color-status-in-review"},{key:"completed",labelKey:"tasks.completed",colorVar:"--color-status-completed"}],uD=[{key:"critical",label:"Critical",colorVar:"--color-priority-critical"},{key:"high",label:"High",colorVar:"--color-priority-high"},{key:"medium",label:"Medium",colorVar:"--color-priority-medium"},{key:"low",label:"Low",colorVar:"--color-priority-low"}],dD=[{key:"critical",label:"Critical",colorVar:"--color-urgency-critical"},{key:"high",label:"High",colorVar:"--color-urgency-high"},{key:"medium",label:"Medium",colorVar:"--color-urgency-medium"},{key:"low",label:"Low",colorVar:"--color-urgency-low"}];function $nt(i,e){return[...i].sort((r,n)=>{var a,o;switch(e){case"updated_at":case"created_at":return n[e].localeCompare(r[e]);case"priority":return(_A[r.priority]??9)-(_A[n.priority]??9);case"urgency":return(kA[r.urgency]??9)-(kA[n.urgency]??9);case"name":return r.name.localeCompare(n.name);case"rice":{const c=((a=r.rice)==null?void 0:a.score)??-1/0;return(((o=n.rice)==null?void 0:o.score)??-1/0)-c}}})}function znt(i,e){let r=i;if(e.searchQuery.trim()){const n=e.searchQuery.trim().toLowerCase();r=r.filter(a=>a.name.toLowerCase().includes(n)||a.description.toLowerCase().includes(n))}if(e.statusFilter.length>0&&(r=r.filter(n=>e.statusFilter.includes(n.status))),e.priorityFilter.length>0&&(r=r.filter(n=>e.priorityFilter.includes(n.priority))),e.urgencyFilter.length>0&&(r=r.filter(n=>e.urgencyFilter.includes(n.urgency))),e.tagFilter.length>0&&(r=r.filter(n=>n.tags.some(a=>e.tagFilter.includes(a)))),e.versionFilter.length>0&&(r=r.filter(n=>n.version!==null&&e.versionFilter.includes(n.version))),e.dateFrom||e.dateTo){const n=e.dateField;e.dateFrom&&(r=r.filter(a=>a[n].slice(0,10)>=e.dateFrom)),e.dateTo&&(r=r.filter(a=>a[n].slice(0,10)<=e.dateTo))}if(e.minRice!==null&&e.minRice!==void 0){const n=e.minRice;r=r.filter(a=>{var o,c;return((o=a.rice)==null?void 0:o.score)!==null&&((c=a.rice)==null?void 0:c.score)!==void 0&&a.rice.score>=n})}return $nt(r,e.sortField)}function wA(i){const e=i,r={...tm};for(const a of Object.keys(tm))e[a]!==void 0&&(r[a]=e[a]);const n=["statusFilter","priorityFilter","urgencyFilter","tagFilter","versionFilter"];for(const a of n){const o=e[a];typeof o=="string"?r[a]=o.trim()?[o.trim()]:[]:Array.isArray(o)||(r[a]=[])}return r.viewMode===void 0&&(r.viewMode="kanban"),r.subGroupBy===void 0&&(r.subGroupBy="none"),r.minRice===void 0&&(r.minRice=null),r}function SA(i,e){if(e==="none")return[];switch(e){case"status":return hD.map(r=>({key:r.key,label:r.labelKey,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.status===r.key)})).filter(r=>r.tasks.length>0);case"priority":return uD.map(r=>({key:r.key,label:r.label,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.priority===r.key)})).filter(r=>r.tasks.length>0);case"urgency":return dD.map(r=>({key:r.key,label:r.label,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.urgency===r.key)})).filter(r=>r.tasks.length>0);case"tags":{const r=new Map;for(const n of i)if(n.tags.length===0){const a=r.get("(untagged)")??[];a.push(n),r.set("(untagged)",a)}else for(const a of n.tags){const o=r.get(a)??[];o.push(n),r.set(a,o)}return Array.from(r.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}case"version":{const r=new Map;for(const n of i){const a=n.version??"(no version)",o=r.get(a)??[];o.push(n),r.set(a,o)}return Array.from(r.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}}return[]}function Pnt(i,e){return i?`dreamcontext:${i}:${e}`:`dreamcontext:${e}`}function qnt(i,e){try{const r=localStorage.getItem(i);return r===null?e:JSON.parse(r)}catch{return e}}function Unt(i,e){try{localStorage.setItem(i,JSON.stringify(e))}catch{}}function Hnt(){const{t:i}=qi(),{projectId:e}=cL(),{data:r,isLoading:n,isError:a,error:o}=brt(),{data:c}=iD(),h=tD(),{data:u}=Crt(),d=_rt(),f=eD(),[g,x]=P.useState(null),y=(ot,wt)=>{wt.preventDefault(),x({x:wt.clientX,y:wt.clientY,task:ot})},v=()=>{if(!g)return;const ot=g.task;x(null),window.confirm(`Delete task "${ot.name}"? This propagates to the remote backend on sync.`)&&f.mutate(ot.slug,{onSuccess:()=>{M===ot.slug&&I(null)}})},[C,_]=P.useState(null),k=()=>{_(null),d.mutate(void 0,{onSuccess:({report:ot})=>{const wt=ot.pushed+ot.created+ot.pulled+ot.deleted+ot.mirrorDeleted;_(ot.skipped==="locked"?"⏳ another sync is already running":ot.errors.length>0?`⚠ ${ot.errors[0]}`:ot.conflicts.length>0?`↕ ${wt} synced · ${ot.conflicts.length} conflict(s) preserved`:wt>0?`↕ ${ot.pushed+ot.created} up · ${ot.pulled} down`:"✓ up to date"),setTimeout(()=>_(null),6e3)},onError:ot=>{_(`⚠ ${ot.message}`),setTimeout(()=>_(null),6e3)}})},T=((u==null?void 0:u.pendingPush)??0)+((u==null?void 0:u.queuedOps)??0),N=u&&u.backend!=="local"?m.jsxs("div",{className:"filter-sync-wrap",children:[C&&m.jsx("span",{className:"filter-sync-note",children:C}),m.jsxs("button",{className:"filter-sync-btn",onClick:k,disabled:d.isPending,title:`Sync with ${u.backend}`,children:[m.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",className:d.isPending?"filter-sync-spin":void 0,children:[m.jsx("path",{d:"M12 7a5 5 0 0 1-9.17 2.75M2 7a5 5 0 0 1 9.17-2.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),m.jsx("path",{d:"M11.5 1.5v3h-3M2.5 12.5v-3h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),d.isPending?"Syncing…":"Sync",T>0&&!d.isPending&&m.jsx("span",{className:"filter-sync-badge",children:T})]})]}):void 0,[E,B]=P.useState(!1),[O,A]=P.useState(!1),[M,I]=P.useState(null),D=P.useMemo(()=>Pnt(e,"kanban-filters"),[e]),[F,U]=P.useState(()=>{const ot=qnt(D,tm);return wA(ot)}),K=P.useCallback(ot=>{U(wt=>{const it=typeof ot=="function"?ot(wt):ot;return Unt(D,it),it})},[D]),z=Mrt(e),W=P.useCallback((ot,wt)=>{K(it=>({...it,[ot]:wt}))},[K]),j=P.useCallback(()=>{K(ot=>({...tm,sortField:ot.sortField,groupBy:ot.groupBy,subGroupBy:ot.subGroupBy,viewMode:ot.viewMode}))},[K]),H=P.useCallback(ot=>{Brt(e,ot,{...F})},[F,e]),Y=P.useCallback(ot=>{K(wA(ot.filters))},[K]),Z=P.useCallback(ot=>{Lrt(e,ot)},[e]),rt=P.useMemo(()=>znt(r??[],F),[r,F]),G=P.useMemo(()=>!M||!r?null:r.find(ot=>ot.slug===M)??null,[M,r]),tt=P.useMemo(()=>{const ot=new Set;for(const wt of r??[])for(const it of wt.tags)ot.add(it);return Array.from(ot).sort()},[r]),ft=P.useMemo(()=>{const ot=new Set;for(const wt of r??[])wt.version&&ot.add(wt.version);for(const wt of c??[])ot.add(wt.version);return Array.from(ot).sort()},[r,c]),ct=(ot,wt,it)=>{switch(it){case"status":h.mutate({slug:ot,updates:{status:wt}});break;case"priority":h.mutate({slug:ot,updates:{priority:wt}});break;case"urgency":h.mutate({slug:ot,updates:{urgency:wt}});break;case"tags":{const V=(r??[]).find(at=>at.slug===ot);V&&!V.tags.includes(wt)&&wt!=="(untagged)"&&h.mutate({slug:ot,updates:{tags:[...V.tags,wt]}})}break;case"version":h.mutate({slug:ot,updates:{version:wt==="(no version)"?null:wt}});break}};if(n)return m.jsx("div",{className:"loading",children:i("common.loading")});if(a)return m.jsxs("div",{className:"error-state",children:["Failed to load tasks. ",o==null?void 0:o.message]});const vt=()=>{const{groupBy:ot,subGroupBy:wt}=F,it=(V,at,Ct,Bt,Ht)=>m.jsx(tA,{title:typeof at=="string"&&at.includes(".")?i(at):at,status:V,tasks:Bt,count:Bt.length,colorVar:Ct,onTaskClick:re=>I(re.slug),onTaskContextMenu:y,onDrop:(re,Dt)=>ct(re,Dt,ot),staggerIndex:Ht+1,subGroups:wt!=="none"?SA(Bt,wt):void 0},V);switch(ot){case"status":return hD.map((V,at)=>it(V.key,V.labelKey,V.colorVar,rt.filter(Ct=>Ct.status===V.key),at));case"priority":return uD.map((V,at)=>it(V.key,V.label,V.colorVar,rt.filter(Ct=>Ct.priority===V.key),at));case"urgency":return dD.map((V,at)=>it(V.key,V.label,V.colorVar,rt.filter(Ct=>Ct.urgency===V.key),at));case"tags":{const V=new Map;for(const at of rt)if(at.tags.length===0){const Ct=V.get("(untagged)")??[];Ct.push(at),V.set("(untagged)",Ct)}else for(const Ct of at.tags){const Bt=V.get(Ct)??[];Bt.push(at),V.set(Ct,Bt)}return Array.from(V.entries()).map(([at,Ct],Bt)=>it(at,at,"--color-brand-vivid",Ct,Bt))}case"version":{const V=(c??[]).filter(Bt=>Bt.status==="planning").map(Bt=>Bt.version),at=(c??[]).filter(Bt=>Bt.status==="released").map(Bt=>Bt.version),Ct=["(no version)",...V,...at];for(const Bt of rt)Bt.version&&!Ct.includes(Bt.version)&&Ct.push(Bt.version);return Ct.map((Bt,Ht)=>{const re=rt.filter(Dt=>(Dt.version??"(no version)")===Bt);return re.length===0&&Bt!=="(no version)"?null:it(Bt,Bt,"--color-brand-mid",re,Ht)}).filter(Boolean)}case"none":return[m.jsx(tA,{title:"All Tasks",status:"all",tasks:rt,count:rt.length,colorVar:"--color-brand-vivid",onTaskClick:V=>I(V.slug),onTaskContextMenu:y,onDrop:()=>{},subGroups:wt!=="none"?SA(rt,wt):void 0},"all")]}};return m.jsxs("div",{className:"kanban-board",children:[m.jsx(int,{filters:F,onFilterChange:W,onClearFilters:j,onCreateClick:()=>B(!0),presets:z,onSavePreset:H,onLoadPreset:Y,onDeletePreset:Z,allTags:tt,allVersions:ft,onVersionManagerClick:()=>A(!0),syncSlot:N}),F.viewMode==="eisenhower"?m.jsx(Ont,{tasks:rt,onTaskClick:ot=>I(ot.slug),onTaskMove:(ot,wt)=>h.mutate({slug:ot,updates:wt})}):F.viewMode==="scatter"?m.jsx(Fnt,{tasks:rt,onTaskClick:ot=>I(ot.slug)}):F.viewMode==="list"?m.jsx("div",{className:"task-list",children:rt.map(ot=>m.jsx(ef,{task:ot,onClick:()=>I(ot.slug),onContextMenu:wt=>y(ot,wt),onDragStart:()=>{}},ot.slug))}):m.jsx("div",{className:"kanban-columns",children:vt()}),E&&m.jsx(rnt,{onClose:()=>B(!1)}),O&&m.jsx(Int,{onClose:()=>A(!1),tasks:r??[]}),G&&m.jsx(Mnt,{task:G,onClose:()=>I(null)}),g&&m.jsx("div",{className:"task-ctx-overlay",onClick:()=>x(null),onContextMenu:ot=>{ot.preventDefault(),x(null)},children:m.jsxs("div",{className:"task-ctx-menu",style:{top:Math.min(g.y,window.innerHeight-100),left:Math.min(g.x,window.innerWidth-190)},onClick:ot=>ot.stopPropagation(),children:[m.jsx("div",{className:"task-ctx-name",children:g.task.name}),m.jsx("button",{type:"button",className:"task-ctx-item",onClick:()=>{I(g.task.slug),x(null)},children:"Open"}),m.jsx("button",{type:"button",className:"task-ctx-item task-ctx-item--danger",onClick:v,children:"Delete task"})]})})]})}function Wnt(){return m.jsx("div",{children:m.jsx(Hnt,{})})}function Gnt(){return oi({queryKey:["changelog"],queryFn:()=>ie.get("/changelog")})}const Ynt=25;function TA({entry:i}){const{t:e}=qi();return m.jsxs("div",{className:"changelog-item",children:[m.jsxs("div",{className:"changelog-meta",children:[m.jsx("span",{className:"task-tag","data-hue":Va(i.type),children:i.type}),i.scope&&m.jsx("span",{className:"changelog-scope",children:i.scope}),i.breaking&&m.jsx("span",{className:"changelog-breaking",children:e("sleep.changelog.breaking")})]}),m.jsx("p",{className:"changelog-summary",children:i.summary}),i.description&&m.jsx("p",{className:"changelog-desc",children:i.description})]})}function Knt(i){const e=[];for(const r of i){const n=e[e.length-1];n&&n.date===r.date?n.items.push(r):e.push({date:r.date,items:[r]})}return e}function Vnt(){const{t:i}=qi(),{data:e,isLoading:r,isError:n,error:a}=dL(),{data:o}=Gnt();if(r||!e)return m.jsx("div",{className:"loading",children:i("common.loading")});if(n)return m.jsxs("div",{className:"error-state",children:["Failed to load sleep state. ",a==null?void 0:a.message]});const c=hL(e.debt),h=uL(e.debt),u=e.last_sleep,d=(o==null?void 0:o.entries)??[],f=u?d.filter(C=>C.date>u):[],g=u?d.filter(C=>C.date<=u):d,x=g.slice(0,Ynt),y=Knt(x),v=g.length-x.length;return m.jsxs("div",{className:"sleep-page",children:[m.jsx("h1",{className:"page-title",children:i("sleep.title")}),m.jsxs("div",{className:"sleep-overview",children:[m.jsxs("div",{className:`sleep-gauge sleep-gauge--${h}`,children:[m.jsx("span",{className:"sleep-gauge-number",children:e.debt}),m.jsx("span",{className:"sleep-gauge-label",children:c})]}),m.jsxs("div",{className:"sleep-details",children:[m.jsxs("div",{className:"sleep-detail",children:[m.jsx("span",{className:"sleep-detail-label",children:i("sleep.last_sleep")}),m.jsx("span",{className:"sleep-detail-value",children:e.last_sleep??"Never"})]}),e.last_sleep_summary&&m.jsxs("div",{className:"sleep-detail",children:[m.jsx("span",{className:"sleep-detail-label",children:"Summary"}),m.jsx("span",{className:"sleep-detail-value sleep-detail-value--summary",children:e.last_sleep_summary.slice(0,200)})]})]})]}),d.length>0&&m.jsxs("div",{className:"sleep-section",children:[m.jsxs("h2",{className:"sleep-section-title",children:[i("sleep.changelog")," (",d.length,")"]}),f.length>0&&m.jsxs("div",{className:"changelog-group changelog-group--pending",children:[m.jsxs("h3",{className:"changelog-group-title",children:[i("sleep.changelog.pending")," (",f.length,")"]}),m.jsx("div",{className:"changelog-list",children:f.map((C,_)=>m.jsx(TA,{entry:C},`p-${_}`))})]}),y.map(C=>m.jsxs("div",{className:"changelog-group",children:[m.jsx("h3",{className:"changelog-group-title changelog-group-title--day",children:C.date}),m.jsx("div",{className:"changelog-list",children:C.items.map((_,k)=>m.jsx(TA,{entry:_},`${C.date}-${k}`))})]},C.date)),v>0&&m.jsxs("p",{className:"changelog-more",children:[v," ",i("sleep.changelog.earlier")]})]}),e.sessions.length>0&&m.jsxs("div",{className:"sleep-section",children:[m.jsxs("h2",{className:"sleep-section-title",children:[i("sleep.sessions")," (",e.sessions.length,")"]}),m.jsx("div",{className:"session-list",children:e.sessions.map((C,_)=>m.jsxs("div",{className:"session-item",children:[m.jsxs("div",{className:"session-header",children:[m.jsx("span",{className:"session-time",children:C.stopped_at??"Active"}),C.score!==null&&m.jsxs("span",{className:"session-score",children:["+",C.score]}),C.change_count!==null&&m.jsxs("span",{className:"session-changes",children:[C.change_count," changes"]}),C.tool_count!=null&&m.jsxs("span",{className:"session-changes",children:[C.tool_count," tools"]})]}),C.last_assistant_message&&m.jsxs("p",{className:"session-message",children:[C.last_assistant_message.slice(0,150),C.last_assistant_message.length>150?"...":""]})]},_))})]}),e.dashboard_changes.length>0&&m.jsxs("div",{className:"sleep-section",children:[m.jsxs("h2",{className:"sleep-section-title",children:["Dashboard Changes (",e.dashboard_changes.length,")"]}),m.jsx("div",{className:"session-list",children:e.dashboard_changes.map((C,_)=>m.jsxs("div",{className:"session-item",children:[m.jsxs("div",{className:"session-header",children:[m.jsx("span",{className:"session-time",children:C.timestamp}),m.jsxs("span",{className:"session-changes",children:[C.entity," / ",C.action]})]}),m.jsx("p",{className:"session-message",children:C.summary})]},_))})]})]})}const Xnt=new Set(["text","int","integer","numeric","boolean","timestamp","jsonb","json","serial","bigint","smallint","real","double","float","date","time","uuid","bytea","blob","varchar","char","array"]);function wx(i){const e=i.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return Xnt.has(e)}function Znt(i){const{entities:e,relations:r}=Qnt(i),n=Jnt(i),a=new Set(e.map(f=>f.name.toLowerCase())),o=[...e,...n.filter(f=>!a.has(f.name.toLowerCase()))],c=tat(o),h=f=>`${f.from}.${f.fromField}->${f.to}.${f.toField}`,u=new Set(r.map(h)),d=[...r,...c.filter(f=>!u.has(h(f)))];return{entities:o,relations:d}}function Qnt(i){const e=[],r=[],n=i.split(`
|
|
476
|
-
`);let a=null,o=[],c,h=!1,u=null;function d(){a&&o.length>0&&e.push({name:a,path:c,fields:o,storageType:"table",notes:[]}),a=null,c=void 0,o=[],h=!1,u=null}for(let f=0;f<n.length;f++){const g=n[f],x=g.trim();if(/^\s*--\s*\d+\.\s+\w+/.test(g)){const I=g.match(/\/\w+\/\{[^}]+\}/);I&&(c=I[0]);continue}const y=x.match(/^CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"']?(\w+)[`"']?\s*\(/i);if(y){d(),a=y[1],o=[],h=!0;continue}if(!h||!a)continue;if(/^\s*\)\s*;/.test(g)){d();continue}if(/^\s*--/.test(g)){const D=g.replace(/^\s*--\s?/,"").trim();if(!D||/^[═─=\-*]{3,}/.test(D))continue;if(D.startsWith(".")){const U=D.match(/^\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(U&&wx(U[2])&&u){const K=U[1],z=U[2].toLowerCase(),j=(U[3]||"").match(/--\s*(.+)$/),H=j?j[1].trim():void 0;o.push({name:`${u}.${K}`,type:z,description:H,isNested:!0,parentField:u})}continue}const F=D.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(F&&wx(F[3])){const U=F[1].replace(/\[\]$/,""),K=F[2],z=F[3].toLowerCase(),j=(F[4]||"").match(/--\s*(.+)$/),H=j?j[1].trim():void 0;u=U,o.push({name:`${U}.${K}`,type:z,description:H,isNested:!0,parentField:U});continue}continue}if(!x)continue;const C=x.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(C))continue;const _=C.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!_)continue;const k=_[1],T=_[2],N=_[3]||"";if(!wx(T))continue;const E=T.toLowerCase(),B=/PRIMARY\s+KEY/i.test(N),O=N.match(/REFERENCES\s+[`"']?(\w+)[`"']?\s*\(\s*[`"']?(\w+)[`"']?\s*\)/i);O&&r.push({from:a,fromField:k,to:O[1],toField:O[2],cardinality:"1:1"});const A=g.match(/--\s*(.+)$/),M=A?A[1].trim():void 0;(E==="jsonb"||E==="json")&&(u=k),o.push({name:k,type:E,isPrimary:B,description:M})}return d(),{entities:e,relations:r}}function Jnt(i){var o,c,h,u,d;const e=[];let r=null,n=!1;const a=i.split(`
|
|
477
|
-
`);for(let f=0;f<a.length;f++){const x=a[f].match(/^--\s?(.*)/);if(!x)continue;const y=x[1].trim();if(/^={4,}$/.test(y)){r&&r.fields.length>0&&e.push(r),r=null,n=!1;continue}if(/^[A-Z ]+\(/.test(y)&&!y.match(/^[a-z_]/))continue;const v=y.match(/^([A-Z][A-Z _]+?):\s+(\S.+)$/);if(v&&!n){const C=v[1].trim();if(C===C.toUpperCase()&&C.length>1){r&&r.fields.length>0&&e.push(r);const _=v[2].trim();r={name:C,path:_,storageType:_.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(r){const C=y.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(C){r.managedBy=C[1].trim();continue}}if(y.includes("Fields in YAML frontmatter")||y.startsWith("Schema ")){n=!0;continue}if(y==="["||y==="{"){n=!0;continue}if(!(y==="]"||y==="}"||y==="..."||y==="},")){if(r&&n){const C=y.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(C){const{type:k,enumValues:T}=EA(C[2].trim(),(o=C[3])==null?void 0:o.trim());r.fields.push({name:C[1],type:k,enumValues:T,description:(c=C[3])==null?void 0:c.trim(),isPrimary:C[1]==="id"});continue}const _=y.match(/^"([a-z_]\w*)":\s+(.+?)(?:,)?(?:\s{2,}--\s+(.+))?$/);if(_){const{type:k,enumValues:T}=EA(_[2].trim(),(h=_[3])==null?void 0:h.trim());r.fields.push({name:_[1],type:k,enumValues:T,description:(u=_[3])==null?void 0:u.trim()});continue}}if(r&&y.startsWith("Body ")&&(r.notes.push(y),y.includes("sections")&&f+1<a.length)){const C=(d=a[f+1])==null?void 0:d.match(/^--\s?(.*)/);C&&/^\s*(Why|[A-Z])/.test(C[1])&&(r.notes.push(C[1].trim()),f++)}}}return r&&r.fields.length>0&&e.push(r),e}function EA(i,e){return i.includes("|")?{type:"enum",enumValues:i.split("|").map(n=>n.trim().replace(/^"|"$/g,""))}:i==="[]"?{type:e!=null&&e.includes("string")?"string[]":"array"}:i.startsWith("[")?{type:"array"}:i==="true"||i==="false"?{type:"boolean"}:i==="null"?{type:"nullable"}:/^\d+$/.test(i)?{type:"number"}:/\d{4}-\d{2}-\d{2}/.test(i.replace(/"/g,""))?{type:"date"}:{type:"string"}}function tat(i){const e=[];for(const r of i)for(const n of r.fields)if(!n.isNested){if(n.description){const a=n.description.match(/(task|feature|knowledge)\s+IDs?/i);if(a){const o=a[1].toLowerCase(),c=i.find(h=>h.name.toLowerCase().includes(o));if(c&&c.name!==r.name){const h=c.fields.find(u=>u.isPrimary);e.push({from:r.name,fromField:n.name,to:c.name,toField:h?h.name:"_id",cardinality:n.type.includes("array")||n.type==="array"?"1:N":"1:1"})}}}if(n.name==="parent_task"||n.name==="parent_id"){const a=r.fields.find(o=>o.isPrimary);e.push({from:r.name,fromField:n.name,to:r.name,toField:a?a.name:"_id",cardinality:"1:1"})}}return e}function x1(i){return i.toLowerCase().replace(/\s+/g,"-")}function NA(i){return i==="enum"?"enum":i==="array"||i.endsWith("[]")||i.startsWith("array")?"array":i==="boolean"?"boolean":i==="nullable"?"nullable":i==="date"||i==="timestamp"?"date":i==="int"||i==="integer"||i==="numeric"||i==="serial"||i==="bigint"||i==="smallint"||i==="real"||i==="float"||i==="double"?"number":i==="jsonb"||i==="json"?"json":"string"}function eat(i,e,r){return i.isPrimary?{icon:"PK",cls:"entity-field-icon--key"}:e.some(a=>a.from===r&&a.fromField===i.name)?{icon:"FK",cls:"entity-field-icon--ref"}:null}function iat(i,e,r,n){if(n){const C=i.right-r.left,_=i.top+i.height*.35-r.top,k=36,T=28;return{d:`M ${C},${_} C ${C+k},${_-T*.3} ${C+k},${_-T*1.3} ${C},${_-T}`,labelX:C+k+4,labelY:_-T*.5}}const a=i.left+i.width/2-r.left,o=e.left+e.width/2-r.left,c=i.top+i.height/2-r.top,h=e.top+e.height/2-r.top,u=Math.abs(a-o),d=Math.abs(c-h);let f,g,x,y;if(u>d){a<o?(f=i.right-r.left,x=e.left-r.left):(f=i.left-r.left,x=e.right-r.left),g=c,y=h;const C=(x-f)*.4;return{d:`M ${f},${g} C ${f+C},${g} ${x-C},${y} ${x},${y}`,labelX:(f+x)/2,labelY:(g+y)/2-10}}f=a,x=o,c<h?(g=i.bottom-r.top,y=e.top-r.top):(g=i.top-r.top,y=e.bottom-r.top);const v=(y-g)*.4;return{d:`M ${f},${g} C ${f},${g+v} ${x},${y-v} ${x},${y}`,labelX:(f+x)/2,labelY:(g+y)/2-10}}function rat({entity:i,relations:e}){const[r,n]=P.useState(new Set),a=i.storageType==="json"?"{ }":i.storageType==="table"?"SQL":"☰",o=i.fields.filter(u=>!u.isNested),c=P.useMemo(()=>{const u=new Map;for(const d of i.fields)if(d.isNested&&d.parentField){const f=u.get(d.parentField)||[];f.push(d),u.set(d.parentField,f)}return u},[i.fields]),h=u=>{n(d=>{const f=new Set(d);return f.has(u)?f.delete(u):f.add(u),f})};return m.jsxs("div",{className:"entity-card","data-entity":x1(i.name),children:[m.jsxs("div",{className:"entity-card-header",children:[m.jsxs("div",{className:"entity-card-title-group",children:[m.jsx("span",{className:"entity-card-category-icon",children:a}),m.jsx("span",{className:"entity-card-name",children:i.name})]}),m.jsx("span",{className:"entity-card-badge","data-storage":i.storageType,children:i.storageType})]}),i.path&&m.jsx("div",{className:"entity-card-path",title:i.path,children:i.path}),i.managedBy&&m.jsx("div",{className:"entity-card-managed",children:i.managedBy}),m.jsx("div",{className:"entity-fields",children:o.map(u=>{const d=eat(u,e,i.name),f=NA(u.type),g=c.get(u.name),x=r.has(u.name);return m.jsxs(P.Fragment,{children:[m.jsxs("div",{className:`entity-field${g?" entity-field--expandable":""}`,onClick:g?()=>h(u.name):void 0,children:[m.jsx("span",{className:`entity-field-icon ${(d==null?void 0:d.cls)??""}`,children:(d==null?void 0:d.icon)??""}),m.jsx("span",{className:"entity-field-name",children:u.name}),u.type==="enum"&&u.enumValues?m.jsx("span",{className:"entity-field-enum-group",children:u.enumValues.map(y=>m.jsx("span",{className:"entity-field-enum-pill",children:y},y))}):m.jsx("span",{className:"entity-field-type","data-type":f,children:u.type}),g&&m.jsxs("span",{className:"entity-field-toggle",children:[m.jsx("span",{className:`entity-field-toggle-arrow${x?" entity-field-toggle-arrow--open":""}`,children:"▶"}),m.jsx("span",{className:"entity-field-toggle-count",children:g.length})]}),!g&&u.description&&m.jsx("span",{className:"entity-field-desc",title:u.description,children:u.description})]}),g&&x&&g.map(y=>{var _;const v=NA(y.type),C=y.name.slice((((_=y.parentField)==null?void 0:_.length)??0)+1);return m.jsxs("div",{className:"entity-field entity-field--nested",children:[m.jsx("span",{className:"entity-field-icon"}),m.jsxs("span",{className:"entity-field-name entity-field-name--nested",children:[".",C]}),m.jsx("span",{className:"entity-field-type","data-type":v,children:y.type}),y.description&&m.jsx("span",{className:"entity-field-desc",title:y.description,children:y.description})]},y.name)})]},u.name)})}),i.notes.length>0&&m.jsx("div",{className:"entity-card-notes",children:i.notes.map((u,d)=>m.jsx("div",{className:"entity-card-note",children:u},d))})]})}function nat({relations:i,entities:e}){return i.length===0?null:m.jsxs("div",{className:"sql-preview-legend",children:[m.jsx("div",{className:"sql-preview-legend-title",children:"Relationships"}),m.jsx("div",{className:"sql-preview-legend-items",children:i.map((r,n)=>{var h,u;const a=((h=e.find(d=>d.name===r.from))==null?void 0:h.name)??r.from,o=((u=e.find(d=>d.name===r.to))==null?void 0:u.name)??r.to,c=r.from===r.to;return m.jsxs("div",{className:"sql-preview-legend-item",children:[m.jsx("span",{className:"sql-preview-legend-line"}),m.jsx("span",{children:c?`${a}.${r.fromField} ↻ self`:`${a}.${r.fromField} → ${o}.${r.toField}`}),m.jsx("span",{className:"sql-preview-legend-cardinality",children:r.cardinality})]},n)})})]})}function fD({content:i}){const e=P.useRef(null),[r,n]=P.useState([]),[a,o]=P.useState({width:0,height:0}),c=P.useMemo(()=>Znt(i),[i]),h=P.useCallback(()=>{const u=e.current;if(!u||c.relations.length===0){n([]);return}const d=u.getBoundingClientRect();o({width:u.scrollWidth,height:u.scrollHeight});const f=[];for(const g of c.relations){const x=u.querySelector(`[data-entity="${x1(g.from)}"]`),y=u.querySelector(`[data-entity="${x1(g.to)}"]`);if(!x||!y)continue;const v=x.getBoundingClientRect(),C=y.getBoundingClientRect(),{d:_,labelX:k,labelY:T}=iat(v,C,d,g.from===g.to);f.push({d:_,labelX:k,labelY:T,label:g.cardinality})}n(f)},[c]);if(P.useEffect(()=>{const u=requestAnimationFrame(h),d=new ResizeObserver(h);return e.current&&d.observe(e.current),()=>{cancelAnimationFrame(u),d.disconnect()}},[h]),c.entities.length===0){const u=i.trim().length>0;return m.jsx("div",{className:"sql-preview",children:u?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"sql-preview-empty sql-preview-empty--hint",children:"No table definitions to diagram — showing the raw SQL."}),m.jsx("pre",{className:"sql-preview-raw",children:m.jsx("code",{children:i.trim()})})]}):m.jsx("div",{className:"sql-preview-empty",children:"No schema entities found in this file."})})}return m.jsxs("div",{className:"sql-preview",ref:e,children:[m.jsxs("svg",{className:"sql-preview-svg",width:a.width||"100%",height:a.height||"100%",viewBox:a.width?`0 0 ${a.width} ${a.height}`:void 0,children:[m.jsx("defs",{children:m.jsx("marker",{id:"rel-arrowhead",viewBox:"0 0 10 7",refX:"9",refY:"3.5",markerWidth:"8",markerHeight:"6",orient:"auto",children:m.jsx("polygon",{points:"0 0, 10 3.5, 0 7",className:"sql-preview-arrowhead"})})}),r.map((u,d)=>m.jsxs("g",{children:[m.jsx("path",{d:u.d,className:"sql-preview-line",markerEnd:"url(#rel-arrowhead)"}),m.jsx("rect",{className:"sql-preview-line-label-bg",x:u.labelX-12,y:u.labelY-7,width:24,height:14}),m.jsx("text",{className:"sql-preview-line-label",x:u.labelX,y:u.labelY+4,textAnchor:"middle",children:u.label})]},d))]}),m.jsx("div",{className:"sql-preview-grid",children:c.entities.map(u=>m.jsx(rat,{entity:u,relations:c.relations},u.name))}),m.jsx(nat,{relations:c.relations,entities:c.entities})]})}const aat={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function v1({type:i}){return m.jsx("span",{className:`json-type-badge ${aat[i]??""}`,children:i})}function C1(){return m.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function sat({data:i}){const[e,r]=P.useState("all"),[n,a]=P.useState(new Set),o=P.useMemo(()=>{const u=e==="all"?i:i.filter(f=>f.type===e),d=new Map;for(let f=0;f<u.length;f++){const g=u[f],x=d.get(g.date)||[];x.push({entry:g,index:f}),d.set(g.date,x)}return d},[i,e]),c=u=>{a(d=>{const f=new Set(d);return f.has(u)?f.delete(u):f.add(u),f})},h=P.useMemo(()=>{const u={};for(const d of i)u[d.type]=(u[d.type]||0)+1;return u},[i]);return m.jsxs("div",{className:"json-preview",children:[m.jsx("div",{className:"json-preview-header",children:m.jsxs("div",{className:"json-preview-stats",children:[m.jsxs("span",{className:"json-preview-total",children:[i.length," entries"]}),Object.entries(h).sort((u,d)=>d[1]-u[1]).map(([u,d])=>m.jsxs("button",{className:`json-stat-chip ${e===u?"json-stat-chip--active":""}`,onClick:()=>r(f=>f===u?"all":u),children:[m.jsx(v1,{type:u})," ",d]},u))]})}),m.jsx("div",{className:"json-timeline",children:Array.from(o.entries()).map(([u,d])=>m.jsxs("div",{className:"json-date-group",children:[m.jsxs("div",{className:"json-date-marker",children:[m.jsx("span",{className:"json-date-dot"}),m.jsx("span",{className:"json-date-label",children:u}),m.jsx("span",{className:"json-date-count",children:d.length})]}),m.jsx("div",{className:"json-date-entries",children:d.map(({entry:f,index:g})=>{const x=n.has(g),y=f.scope.length>50?f.scope.slice(0,47)+"...":f.scope;return m.jsxs("div",{className:`json-entry ${x?"json-entry--expanded":""}`,onClick:()=>c(g),children:[m.jsxs("div",{className:"json-entry-header",children:[m.jsx(v1,{type:f.type}),f.breaking&&m.jsx(C1,{}),m.jsx("span",{className:"json-entry-scope",title:f.scope,children:y})]}),m.jsx("div",{className:`json-entry-desc ${x?"":"json-entry-desc--clamped"}`,children:f.description})]},g)})})]},u))})]})}function oat({data:i}){const[e,r]=P.useState(new Set([0])),n=a=>{r(o=>{const c=new Set(o);return c.has(a)?c.delete(a):c.add(a),c})};return m.jsxs("div",{className:"json-preview",children:[m.jsx("div",{className:"json-preview-header",children:m.jsxs("span",{className:"json-preview-total",children:[i.length," release",i.length!==1?"s":""]})}),m.jsx("div",{className:"json-releases",children:i.map((a,o)=>{var h,u,d,f;const c=e.has(o);return m.jsxs("div",{className:`json-release ${c?"json-release--expanded":""}`,children:[m.jsxs("div",{className:"json-release-header",onClick:()=>n(o),children:[m.jsx("span",{className:"json-release-version",children:a.version}),m.jsx("span",{className:"json-release-date",children:a.date}),a.breaking&&m.jsx(C1,{}),m.jsxs("span",{className:"json-release-meta",children:[(h=a.features)!=null&&h.length?`${a.features.length} features`:"",(u=a.features)!=null&&u.length&&((d=a.tasks)!=null&&d.length)?" / ":"",(f=a.tasks)!=null&&f.length?`${a.tasks.length} task${a.tasks.length!==1?"s":""}`:""]}),m.jsx("span",{className:`json-release-chevron ${c?"json-release-chevron--open":""}`,children:"▶"})]}),c&&m.jsxs("div",{className:"json-release-body",children:[m.jsx("div",{className:"json-release-summary",children:a.summary}),a.features&&a.features.length>0&&m.jsxs("div",{className:"json-release-section",children:[m.jsx("div",{className:"json-release-section-title",children:"Features"}),m.jsx("div",{className:"json-release-ids",children:a.features.map(g=>m.jsx("span",{className:"json-id-chip json-id-chip--feature",children:g},g))})]}),a.tasks&&a.tasks.length>0&&m.jsxs("div",{className:"json-release-section",children:[m.jsx("div",{className:"json-release-section-title",children:"Tasks"}),m.jsx("div",{className:"json-release-ids",children:a.tasks.map(g=>m.jsx("span",{className:"json-id-chip json-id-chip--task",children:g},g))})]}),a.changelog&&a.changelog.length>0&&m.jsxs("div",{className:"json-release-section",children:[m.jsxs("div",{className:"json-release-section-title",children:["Changelog (",a.changelog.length,")"]}),m.jsx("div",{className:"json-release-changelog",children:a.changelog.map((g,x)=>m.jsxs("div",{className:"json-release-cl-entry",children:[m.jsx(v1,{type:g.type}),g.breaking&&m.jsx(C1,{}),m.jsx("span",{className:"json-release-cl-scope",children:g.scope}),m.jsx("span",{className:"json-release-cl-desc",children:g.description})]},x))})]})]})]},a.version)})})]})}function lat({data:i,filename:e}){var a,o,c;if(!Array.isArray(i)||i.length===0)return m.jsx("div",{className:"json-preview",children:m.jsx("div",{className:"json-preview-empty",children:"No data found in this file."})});const r=e.toLowerCase().includes("changelog"),n=e.toLowerCase().includes("release");return r&&((a=i[0])!=null&&a.type)&&((o=i[0])!=null&&o.description)?m.jsx(sat,{data:i}):n&&((c=i[0])!=null&&c.version)?m.jsx(oat,{data:i}):m.jsxs("div",{className:"json-preview",children:[m.jsx("div",{className:"json-preview-header",children:m.jsxs("span",{className:"json-preview-total",children:[i.length," items"]})}),m.jsx("div",{className:"json-generic-list",children:i.map((h,u)=>m.jsx("pre",{className:"json-generic-item",children:JSON.stringify(h,null,2)},u))})]})}function cat(i){return i.endsWith(".sql")||i.endsWith(".json")||i.endsWith(".md")}function hat({onNavigateTaxonomy:i}={}){const{t:e}=qi(),r=Pi(),[n,a]=P.useState(null),[o,c]=P.useState(null),[h,u]=P.useState(!1),[d,f]=P.useState("preview"),{data:g,isLoading:x,isError:y,error:v}=oi({queryKey:["core"],queryFn:()=>ie.get("/core")}),{data:C}=oi({queryKey:["core",n],queryFn:()=>ie.get(`/core/${n}`),enabled:!!n}),_=nr({mutationFn:({filename:B,content:O})=>ie.put(`/core/${B}`,{content:O}),onSuccess:()=>{r.invalidateQueries({queryKey:["core"]}),u(!1)}}),k=()=>{(C==null?void 0:C.content)!==void 0&&(c(C.content),u(!0))},T=()=>{n&&o!==null&&_.mutate({filename:n,content:o})};if(x)return m.jsx("div",{className:"loading",children:e("common.loading")});if(y)return m.jsxs("div",{className:"error-state",children:["Failed to load core files. ",v==null?void 0:v.message]});const N=(g==null?void 0:g.files)??[],E=()=>{if(!n||!C)return null;if(n==="taxonomy.json"&&i)return m.jsxs("div",{className:"core-taxonomy-link",children:[m.jsx("p",{className:"core-taxonomy-link-hint",children:"This file is managed by the Taxonomy system."}),m.jsx("button",{className:"btn btn--primary",onClick:i,children:"Open Taxonomy page"})]});if(d==="preview"){if(n.endsWith(".sql")&&C.content)return m.jsx(fD,{content:C.content});if(n.endsWith(".json")&&C.data)return m.jsx(lat,{data:C.data,filename:n});if(n.endsWith(".md")&&C.content)return m.jsx(tf,{content:C.content,frontmatter:C.frontmatter})}return m.jsx("pre",{className:"core-viewer-content",children:C.content??JSON.stringify(C.data,null,2)})};return m.jsxs("div",{className:"core-page",children:[m.jsx("h1",{className:"page-title",children:e("core.title")}),m.jsxs("div",{className:"core-layout",children:[m.jsx("div",{className:"core-list",children:N.map((B,O)=>m.jsxs("button",{className:`core-list-item ${n===B.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(O+1,8)}`,onClick:()=>{a(B.filename),u(!1),f("preview")},children:[m.jsx("span",{className:"core-list-name",children:B.name}),m.jsx("span",{className:"core-list-type",children:B.type})]},B.filename))}),m.jsxs("div",{className:"core-detail",children:[!n&&m.jsx("div",{className:"core-empty",children:"Select a file to view."}),n&&C&&!h&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:C.filename}),m.jsxs("div",{className:"core-viewer-actions",children:[cat(n)&&m.jsxs("div",{className:"core-tabs",children:[m.jsx("button",{className:`core-tab ${d==="file"?"core-tab--active":""}`,onClick:()=>f("file"),children:"File"}),m.jsx("button",{className:`core-tab ${d==="preview"?"core-tab--active":""}`,onClick:()=>f("preview"),children:"Preview"})]}),C.type==="markdown"&&m.jsx("button",{className:"btn btn--ghost",onClick:k,children:"Edit"})]})]}),E()]}),n&&h&&m.jsxs("div",{className:"core-editor",children:[m.jsxs("div",{className:"core-editor-header",children:[m.jsxs("h2",{className:"core-viewer-title",children:["Editing: ",n]}),m.jsxs("div",{className:"core-editor-actions",children:[m.jsx("button",{className:"btn btn--ghost",onClick:()=>u(!1),children:"Cancel"}),m.jsx("button",{className:"btn btn--primary",onClick:T,disabled:_.isPending,children:_.isPending?"Saving...":"Save"})]})]}),m.jsxs("div",{className:"core-editor-split",children:[m.jsx("textarea",{className:"core-editor-textarea",value:o??"",onChange:B=>c(B.target.value)}),m.jsx("pre",{className:"core-editor-preview",children:o})]})]})]})]})]})}function uat(){return oi({queryKey:["knowledge"],queryFn:()=>ie.get("/knowledge"),select:i=>i.entries})}function dat(i){return oi({queryKey:["knowledge",i],queryFn:()=>ie.get(`/knowledge/${i}`),select:e=>e.entry,enabled:!!i,staleTime:1/0,refetchInterval:!1})}function fat(i,e){return oi({queryKey:["knowledge-assets",i],queryFn:()=>ie.get(`/knowledge-assets/${i}`),select:r=>r.files,enabled:e&&!!i,staleTime:1/0,refetchInterval:!1,refetchOnWindowFocus:!1})}function pat(){const i=Pi();return nr({mutationFn:({slug:e,pinned:r})=>ie.patch(`/knowledge/${e}`,{pinned:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["knowledge"]})}})}const gat='button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])';function mat({label:i,actions:e,onClose:r,children:n}){const{t:a}=qi(),o=P.useRef(null),c=P.useRef(r);return P.useEffect(()=>{c.current=r}),P.useEffect(()=>{const h=o.current;if(!h)return;const u=document.activeElement,d=document.body,f=d.style.overflow,g=d.style.paddingRight,x=window.innerWidth-document.documentElement.clientWidth;d.style.overflow="hidden",x>0&&(d.style.paddingRight=`${x}px`),h.focus();const y=v=>{if(v.key==="Escape"){v.stopPropagation(),c.current();return}if(v.key!=="Tab")return;const C=h.querySelectorAll(gat);if(C.length===0){v.preventDefault();return}const _=C[0],k=C[C.length-1],T=document.activeElement;!T||!h.contains(T)?(v.preventDefault(),(v.shiftKey?k:_).focus()):v.shiftKey&&(T===_||T===h)?(v.preventDefault(),k.focus()):!v.shiftKey&&T===k&&(v.preventDefault(),_.focus())};return document.addEventListener("keydown",y,!0),()=>{var v;document.removeEventListener("keydown",y,!0),d.style.overflow=f,d.style.paddingRight=g,(v=u==null?void 0:u.focus)==null||v.call(u)}},[]),m.jsxs("div",{ref:o,className:"fullscreen-overlay",role:"dialog","aria-modal":"true","aria-label":i,tabIndex:-1,children:[m.jsxs("div",{className:"fullscreen-overlay-header",children:[m.jsx("h2",{className:"fullscreen-overlay-title",children:i}),m.jsxs("div",{className:"fullscreen-overlay-actions",children:[e,m.jsx("button",{className:"fullscreen-overlay-close",onClick:r,title:a("common.close"),"aria-label":a("common.close"),children:"✕"})]})]}),m.jsx("div",{className:"fullscreen-overlay-body",children:n})]})}var Sx={exports:{}},AA;function yat(){return AA||(AA=1,(function(i){var e=(function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function c(u,d){if(!o[u]){o[u]={};for(var f=0;f<u.length;f++)o[u][u.charAt(f)]=f}return o[u][d]}var h={compressToBase64:function(u){if(u==null)return"";var d=h._compress(u,6,function(f){return n.charAt(f)});switch(d.length%4){default:case 0:return d;case 1:return d+"===";case 2:return d+"==";case 3:return d+"="}},decompressFromBase64:function(u){return u==null?"":u==""?null:h._decompress(u.length,32,function(d){return c(n,u.charAt(d))})},compressToUTF16:function(u){return u==null?"":h._compress(u,15,function(d){return r(d+32)})+" "},decompressFromUTF16:function(u){return u==null?"":u==""?null:h._decompress(u.length,16384,function(d){return u.charCodeAt(d)-32})},compressToUint8Array:function(u){for(var d=h.compress(u),f=new Uint8Array(d.length*2),g=0,x=d.length;g<x;g++){var y=d.charCodeAt(g);f[g*2]=y>>>8,f[g*2+1]=y%256}return f},decompressFromUint8Array:function(u){if(u==null)return h.decompress(u);for(var d=new Array(u.length/2),f=0,g=d.length;f<g;f++)d[f]=u[f*2]*256+u[f*2+1];var x=[];return d.forEach(function(y){x.push(r(y))}),h.decompress(x.join(""))},compressToEncodedURIComponent:function(u){return u==null?"":h._compress(u,6,function(d){return a.charAt(d)})},decompressFromEncodedURIComponent:function(u){return u==null?"":u==""?null:(u=u.replace(/ /g,"+"),h._decompress(u.length,32,function(d){return c(a,u.charAt(d))}))},compress:function(u){return h._compress(u,16,function(d){return r(d)})},_compress:function(u,d,f){if(u==null)return"";var g,x,y={},v={},C="",_="",k="",T=2,N=3,E=2,B=[],O=0,A=0,M;for(M=0;M<u.length;M+=1)if(C=u.charAt(M),Object.prototype.hasOwnProperty.call(y,C)||(y[C]=N++,v[C]=!0),_=k+C,Object.prototype.hasOwnProperty.call(y,_))k=_;else{if(Object.prototype.hasOwnProperty.call(v,k)){if(k.charCodeAt(0)<256){for(g=0;g<E;g++)O=O<<1,A==d-1?(A=0,B.push(f(O)),O=0):A++;for(x=k.charCodeAt(0),g=0;g<8;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<E;g++)O=O<<1|x,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,E),E++),delete v[k]}else for(x=y[k],g=0;g<E;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1;T--,T==0&&(T=Math.pow(2,E),E++),y[_]=N++,k=String(C)}if(k!==""){if(Object.prototype.hasOwnProperty.call(v,k)){if(k.charCodeAt(0)<256){for(g=0;g<E;g++)O=O<<1,A==d-1?(A=0,B.push(f(O)),O=0):A++;for(x=k.charCodeAt(0),g=0;g<8;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<E;g++)O=O<<1|x,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,E),E++),delete v[k]}else for(x=y[k],g=0;g<E;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1;T--,T==0&&(T=Math.pow(2,E),E++)}for(x=2,g=0;g<E;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1;for(;;)if(O=O<<1,A==d-1){B.push(f(O));break}else A++;return B.join("")},decompress:function(u){return u==null?"":u==""?null:h._decompress(u.length,32768,function(d){return u.charCodeAt(d)})},_decompress:function(u,d,f){var g=[],x=4,y=4,v=3,C="",_=[],k,T,N,E,B,O,A,M={val:f(0),position:d,index:1};for(k=0;k<3;k+=1)g[k]=k;for(N=0,B=Math.pow(2,2),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;switch(N){case 0:for(N=0,B=Math.pow(2,8),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;A=r(N);break;case 1:for(N=0,B=Math.pow(2,16),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;A=r(N);break;case 2:return""}for(g[3]=A,T=A,_.push(A);;){if(M.index>u)return"";for(N=0,B=Math.pow(2,v),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;switch(A=N){case 0:for(N=0,B=Math.pow(2,8),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;g[y++]=r(N),A=y-1,x--;break;case 1:for(N=0,B=Math.pow(2,16),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;g[y++]=r(N),A=y-1,x--;break;case 2:return _.join("")}if(x==0&&(x=Math.pow(2,v),v++),g[A])C=g[A];else if(A===y)C=T+T.charAt(0);else return null;_.push(C),g[y++]=T+C.charAt(0),x--,T=C,x==0&&(x=Math.pow(2,v),v++)}}};return h})();i!=null?i.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})})(Sx)),Sx.exports}var bat=yat();const xat=/##\s*Drawing\s*```(compressed-json|json)\s*([\s\S]*?)```/;function vat(i){const e=i.match(xat);if(!e)return null;const[,r,n]=e;let a;if(r==="compressed-json"){const o=bat.decompressFromBase64(n.replace(/\s+/g,""));if(!o)return null;a=o}else a=n;try{const o=JSON.parse(a);return Array.isArray(o.elements)?o:null}catch{return null}}function rm(i){return i.endsWith(".excalidraw")}const Cat=P.lazy(()=>Fe(()=>import("./percentages-BXMCSKIN-DP6uG13u.js").then(i=>i.E),__vite__mapDeps([52,53,54]))),MA=()=>m.jsxs("div",{className:"excalidraw-loading","aria-live":"polite",children:[m.jsx("span",{className:"excalidraw-spinner","aria-hidden":"true"}),m.jsx("span",{className:"excalidraw-loading-label",children:"Loading diagram…"})]});function _at({content:i,slug:e}){const{resolved:r}=Gd(),n=P.useMemo(()=>vat(i),[i]),a=P.useMemo(()=>i.includes("## Embedded Files"),[i]),o=fat(e??"",!!e&&a),c=o.data,h=!!e&&a&&o.isLoading,u=P.useMemo(()=>{const d={...(n==null?void 0:n.files)??{}};if(c)for(const[f,g]of Object.entries(c))d[f]={id:f,mimeType:g.mimeType,dataURL:g.dataURL,created:0};return d},[n,c]);return n?m.jsx("div",{className:"excalidraw-preview","data-theme":r,children:h?m.jsx(MA,{}):m.jsx(P.Suspense,{fallback:m.jsx(MA,{}),children:m.jsx(Cat,{elements:n.elements,files:u,appState:n.appState,theme:r==="dark"?"dark":"light"},e??"board")})}):m.jsx("div",{className:"excalidraw-error",children:"Could not read the Excalidraw drawing in this file."})}const kat=/```sql\s*\n([\s\S]*?)```/gi;function wat(i,e){if(!i.startsWith("data-structures/"))return null;const r=[...e.matchAll(kat)].map(n=>n[1]);return r.length>0?r.join(`
|
|
478
|
-
|
|
479
|
-
`):null}function Sat(i){return i.split(/[-_]/).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(" ")}function _1(i,e){if(!e)return i.name;if(rm(i.slug)){const r=i.slug.lastIndexOf("/");return r>=0?i.slug.slice(r+1):i.slug}return i.name.startsWith(`${e}/`)?i.name.slice(e.length+1):i.name}function pD(i){return i.cards.length+i.folders.reduce((e,r)=>e+pD(r),0)}function Tat(i){const e=[],r={path:"",folders:[],cards:[]},n=(o,c)=>{let h=o.folders.find(u=>u.name===c);if(!h){const u=o.path?`${o.path}/${c}`:c;h={name:c,path:u,label:Sat(c),folders:[],cards:[]},o.folders.push(h)}return h};for(const o of i){const c=o.slug.split("/"),h=c[c.length-1];let u=c.slice(0,-1);if(rm(o.slug)&&u.length>0){const f=h.replace(/\.excalidraw$/,"");u[u.length-1]===f&&(u=u.slice(0,-1))}if(u.length===0){e.push(o);continue}let d=r;for(const f of u)d=n(d,f);d.cards.push(o)}const a=o=>{o.folders.sort((c,h)=>c.label.localeCompare(h.label)),o.cards.sort((c,h)=>_1(c,o.path).localeCompare(_1(h,o.path))),o.folders.forEach(a)};return a(r),{roots:e,folders:r.folders}}function Eat(){const{t:i}=qi(),{data:e,isLoading:r,isError:n,error:a}=uat(),o=pat(),[c,h]=P.useState(""),[u,d]=P.useState(null),[f,g]=P.useState("preview"),[x,y]=P.useState(new Set),[v,C]=P.useState(!1),{data:_}=dat(u??""),k=P.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const F=c.toLowerCase();return e.filter(U=>U.name.toLowerCase().includes(F)||U.description.toLowerCase().includes(F)||U.tags.some(K=>K.toLowerCase().includes(F)))},[e,c]),{roots:T,folders:N}=P.useMemo(()=>Tat(k),[k]),E=c.trim().length>0,B=F=>E||x.has(F),O=F=>{y(U=>{const K=new Set(U);return K.has(F)?K.delete(F):K.add(F),K})},A=(F,U=null)=>m.jsxs("button",{className:`knowledge-card ${u===F.slug?"knowledge-card--active":""}`,onClick:()=>{d(F.slug),g("preview")},children:[m.jsxs("div",{className:"knowledge-card-header",children:[m.jsxs("span",{className:"knowledge-card-title",children:[rm(F.slug)&&m.jsx("span",{className:"knowledge-card-icon",title:"Diagram / sketch","aria-label":"Diagram",children:m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M12 20h9"}),m.jsx("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}),m.jsx("span",{className:"knowledge-card-name",children:_1(F,U)})]}),m.jsx("button",{className:`pin-btn ${F.pinned?"pin-btn--active":""}`,onClick:K=>{K.stopPropagation(),o.mutate({slug:F.slug,pinned:!F.pinned})},title:F.pinned?i("knowledge.unpin"):i("knowledge.pin"),children:F.pinned?"◆":"◇"})]}),F.description&&m.jsx("p",{className:"knowledge-card-desc",children:F.description}),m.jsx("div",{className:"knowledge-card-tags",children:F.tags.map(K=>m.jsx("span",{className:"task-tag","data-hue":Va(K),children:K},K))})]},F.slug),M=F=>m.jsxs("div",{className:"knowledge-folder",children:[m.jsxs("button",{className:"knowledge-folder-header",onClick:()=>O(F.path),"aria-expanded":B(F.path),children:[m.jsx("span",{className:"knowledge-folder-chevron",children:B(F.path)?"▾":"▸"}),m.jsx("span",{className:"knowledge-folder-name",children:F.label}),m.jsx("span",{className:"knowledge-folder-count",children:pD(F)})]}),B(F.path)&&m.jsxs("div",{className:"knowledge-folder-items",children:[F.folders.map(M),F.cards.map(U=>A(U,F.path))]})]},F.path),I=()=>m.jsxs("div",{className:"core-tabs",children:[m.jsx("button",{className:`core-tab ${f==="file"?"core-tab--active":""}`,onClick:()=>g("file"),children:"File"}),m.jsx("button",{className:`core-tab ${f==="preview"?"core-tab--active":""}`,onClick:()=>g("preview"),children:"Preview"})]}),D=F=>{if(f==="preview"&&F.content){if(rm(F.slug))return m.jsx(_at,{content:F.content,slug:F.slug});const U=wat(F.slug,F.content);return U?m.jsx(fD,{content:U}):m.jsx(tf,{content:F.content})}return m.jsx("pre",{className:"core-viewer-content",children:F.content})};return r?m.jsx("div",{className:"loading",children:i("common.loading")}):n?m.jsxs("div",{className:"error-state",children:["Failed to load knowledge. ",a==null?void 0:a.message]}):m.jsxs("div",{className:"knowledge-page",children:[m.jsx("input",{className:"knowledge-search",placeholder:i("knowledge.search"),value:c,onChange:F=>h(F.target.value)}),m.jsxs("div",{className:"knowledge-layout",children:[m.jsxs("div",{className:"knowledge-list",children:[k.length===0&&m.jsx("div",{className:"core-empty",children:i("common.empty")}),N.map(M),T.map(F=>A(F))]}),m.jsxs("div",{className:"knowledge-detail",children:[!u&&m.jsx("div",{className:"core-empty",children:"Select a knowledge file to view."}),u&&_&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:_.name}),m.jsxs("div",{className:"core-viewer-actions",children:[I(),m.jsx("button",{className:"core-expand-btn",onClick:()=>C(!0),title:i("knowledge.fullscreen"),"aria-label":i("knowledge.fullscreen"),children:"⛶"})]})]}),v?m.jsx(mat,{label:_.name,actions:I(),onClose:()=>C(!1),children:D(_)}):D(_)]})]})]})]})}function Nat(){const{t:i}=qi(),[e,r]=P.useState(null),[n,a]=P.useState("preview"),[o,c]=P.useState(""),{data:h,isLoading:u,isError:d,error:f}=oi({queryKey:["features"],queryFn:()=>ie.get("/features")}),g=(h==null?void 0:h.features)??[],x=P.useMemo(()=>{if(!o.trim())return g;const v=o.toLowerCase();return g.filter(C=>C.slug.toLowerCase().includes(v)||C.status.toLowerCase().includes(v)||C.tags.some(_=>_.toLowerCase().includes(v)))},[g,o]),{data:y}=oi({queryKey:["features",e],queryFn:()=>ie.get(`/features/${e}`),enabled:!!e,select:v=>v.feature});return u?m.jsx("div",{className:"loading",children:i("common.loading")}):d?m.jsxs("div",{className:"error-state",children:["Failed to load features. ",f==null?void 0:f.message]}):m.jsxs("div",{className:"features-page",children:[m.jsx("input",{className:"features-search",placeholder:i("features.search"),value:o,onChange:v=>c(v.target.value)}),m.jsxs("div",{className:"features-layout",children:[m.jsxs("div",{className:"features-list",children:[x.length===0&&m.jsx("div",{className:"core-empty",children:i("common.empty")}),x.map((v,C)=>{var _;return m.jsxs("button",{className:`feature-card ${e===v.slug?"feature-card--active":""} animate-stagger animate-stagger-${Math.min(C+1,8)}`,onClick:()=>{r(v.slug),a("preview")},children:[m.jsxs("div",{className:"feature-card-header",children:[m.jsx("span",{className:"feature-card-name",children:v.slug}),m.jsxs("div",{className:"feature-card-badges",children:[((_=v.freshness)==null?void 0:_.level)==="stale"&&m.jsx("span",{className:"feature-freshness feature-freshness--stale",children:"stale"}),m.jsx("span",{className:`feature-status feature-status--${v.status}`,children:v.status})]})]}),m.jsx("div",{className:"knowledge-card-tags",children:v.tags.map(k=>m.jsx("span",{className:"task-tag","data-hue":Va(k),children:k},k))})]},v.slug)})]}),m.jsxs("div",{className:"features-detail",children:[!e&&m.jsx("div",{className:"core-empty",children:"Select a feature to view."}),e&&y&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:y.slug}),m.jsx("div",{className:"core-viewer-actions",children:m.jsxs("div",{className:"core-tabs",children:[m.jsx("button",{className:`core-tab ${n==="file"?"core-tab--active":""}`,onClick:()=>a("file"),children:"File"}),m.jsx("button",{className:`core-tab ${n==="preview"?"core-tab--active":""}`,onClick:()=>a("preview"),children:"Preview"})]})})]}),m.jsxs("div",{className:"feature-meta",children:[m.jsxs("span",{children:["Status: ",y.status]}),m.jsxs("span",{children:["Created: ",y.created]}),m.jsxs("span",{children:["Updated: ",y.updated]})]}),y.related_tasks.length>0&&m.jsxs("div",{className:"feature-tasks",children:["Related tasks: ",y.related_tasks.join(", ")]}),n==="preview"&&y.content?m.jsx(tf,{content:y.content}):m.jsx("div",{className:"feature-viewer",children:y.sections.map(v=>m.jsxs("div",{className:"feature-section",children:[m.jsx("h3",{className:"feature-section-title",children:v}),m.jsx("pre",{className:"feature-section-content",children:y.sectionContents[v]||"(empty)"})]},v))})]})]})]})]})}function Aat(){return oi({queryKey:["graph"],queryFn:()=>ie.get("/graph"),staleTime:3e4})}const Tx="dreamcontext:";function Mat(i,e){const{projectId:r}=cL(),n=r?`${Tx}${r}:${i}`:`${Tx}${i}`,[a,o]=P.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(r){const u=`${Tx}${i}`,d=localStorage.getItem(u);if(d!==null)return localStorage.setItem(n,d),localStorage.removeItem(u),JSON.parse(d)}}catch{}return e}),c=P.useCallback(h=>{o(u=>{const d=typeof h=="function"?h(u):h;try{localStorage.setItem(n,JSON.stringify(d))}catch{}return d})},[n]);return[a,c]}const Pc={filters:{search:"",showTags:!0,showOrphans:!0,showAttachments:!1,existingFilesOnly:!1},groups:[],display:{view:"2d",arrows:!1,textFadeThreshold:.85,nodeSize:.5,linkThickness:.5},forces:{centerStrength:.7,repelStrength:.35,linkStrength:.9,linkDistance:.35}};function Bat(i){return{centerStrength:.05+i.centerStrength*.45,repelStrength:-(30+i.repelStrength*240),linkStrength:.1+i.linkStrength*1.2,linkDistance:20+i.linkDistance*180}}function Lat(i){return{filters:{...Pc.filters,...i.filters},groups:Array.isArray(i.groups)?i.groups:Pc.groups,display:{...Pc.display,...i.display},forces:{...Pc.forces,...i.forces}}}function Oat(){const[i,e]=Mat("brain:settings:v1",Pc),r=P.useRef(!1);P.useEffect(()=>{if(r.current)return;let d=!1;return ie.get("/brain-settings").then(f=>{if(d)return;r.current=!0;const g=f.settings;g&&typeof g=="object"&&Object.keys(g).length>0&&e(Lat(g))}).catch(()=>{r.current=!0}),()=>{d=!0}},[e]);const n=P.useRef(null),a=P.useCallback(d=>{r.current&&(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{ie.put("/brain-settings",{settings:d}).catch(()=>{})},600))},[]),o=P.useCallback(d=>{e(f=>{const g=d(f);return a(g),g})},[e,a]),c=P.useCallback((d,f)=>{o(g=>({...g,[d]:{...g[d],...f}}))},[o]),h=P.useCallback(d=>{o(f=>({...f,groups:d}))},[o]),u=P.useCallback(()=>{o(()=>Pc)},[o]);return{settings:i,patch:c,setGroups:h,reset:u}}function Rat(i){const e=[];let r=0;for(;r<i.length;){const n=i[r];if(/\s/.test(n)){r++;continue}if(n==="("){e.push({type:"LPAREN"}),r++;continue}if(n===")"){e.push({type:"RPAREN"}),r++;continue}if(n==="-"&&r+1<i.length&&!/\s/.test(i[r+1])){e.push({type:"NOT"}),r++;continue}if(n==='"'){let h=r+1,u="";for(;h<i.length&&i[h]!=='"';)i[h]==="\\"&&h+1<i.length?(u+=i[h+1],h+=2):(u+=i[h],h++);e.push({type:"PHRASE",value:u}),r=h+1;continue}if(n==="/"){let h=r+1,u="";for(;h<i.length&&i[h]!=="/";)i[h]==="\\"&&h+1<i.length?(u+=i[h]+i[h+1],h+=2):(u+=i[h],h++);if(h<i.length){e.push({type:"REGEX",value:u}),r=h+1;continue}}let a=r;for(;a<i.length&&!/[\s()]/.test(i[a])&&i[a]!=='"';)a++;const o=i.slice(r,a),c=o.match(/^(tag|path|file|content):(.*)$/i);c?e.push({type:"OP",value:c[1].toLowerCase(),arg:c[2]}):o.toUpperCase()==="OR"?e.push({type:"OR"}):o.toUpperCase()==="AND"||o.length>0&&e.push({type:"WORD",value:o}),r=a}return e}class jat{constructor(e){ge(this,"pos",0);this.tokens=e}parse(){return this.parseOr()}parseOr(){var r;let e=this.parseAnd();for(;((r=this.peek())==null?void 0:r.type)==="OR";){this.pos++;const n=this.parseAnd();e.type==="or"?e.children.push(n):e={type:"or",children:[e,n]}}return e}parseAnd(){var r,n;const e=[];for(;this.pos<this.tokens.length&&((r=this.peek())==null?void 0:r.type)!=="RPAREN"&&((n=this.peek())==null?void 0:n.type)!=="OR";){const a=this.parseTerm();a&&e.push(a)}return e.length===0?{type:"and",children:[]}:e.length===1?e[0]:{type:"and",children:e}}parseTerm(){var a;const e=this.peek();if(!e)return null;let r=!1;e.type==="NOT"&&(r=!0,this.pos++);const n=this.peek();if(!n)return null;if(n.type==="LPAREN"){this.pos++;const o=this.parseOr();return((a=this.peek())==null?void 0:a.type)==="RPAREN"&&this.pos++,r?gD(o):o}if(n.type==="WORD")return this.pos++,{type:"word",value:n.value.toLowerCase(),negated:r};if(n.type==="PHRASE")return this.pos++,{type:"phrase",value:n.value.toLowerCase(),negated:r};if(n.type==="REGEX"){this.pos++;try{return{type:"regex",value:new RegExp(n.value,"i"),negated:r}}catch{return null}}return n.type==="OP"?(this.pos++,{type:"op",op:n.value,arg:n.arg.toLowerCase(),negated:r}):(this.pos++,null)}peek(){return this.tokens[this.pos]}}function gD(i){return i.type==="and"||i.type==="or"?{...i,children:i.children.map(gD)}:{...i,negated:!i.negated}}function BA(i){const e=i.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const r=Rat(e),n=new jat(r).parse();return{match:a=>k1(n,a),raw:e,isEmpty:!1}}function k1(i,e){switch(i.type){case"and":return i.children.every(r=>k1(r,e));case"or":return i.children.some(r=>k1(r,e));case"word":return $p(LA(e,i.value),i.negated);case"phrase":return $p(LA(e,i.value),i.negated);case"regex":return $p(Dat(e,i.value),i.negated);case"op":return $p(Fat(e,i.op,i.arg),i.negated)}}function $p(i,e){return e?!i:i}function mD(i){return[i.label,i.path,i.id,i.meta.description??"",...i.meta.tags??[]].join(" ").toLowerCase()}function LA(i,e){return mD(i).includes(e)}function Dat(i,e){return e.test(mD(i))}function Fat(i,e,r){var a;const n=r.toLowerCase();switch(e){case"path":return i.path.toLowerCase().includes(n);case"file":return(((a=i.path.split("/").pop())==null?void 0:a.toLowerCase())??i.label.toLowerCase()).includes(n);case"tag":{const o=n.replace(/^#/,"");return(i.meta.tags??[]).some(c=>c.toLowerCase()===o)||i.group==="tag"&&i.label.toLowerCase().replace(/^#/,"")===o}case"content":return(i.meta.description??"").toLowerCase().includes(n);default:return!1}}const zp={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},Ex=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function Iat({settings:i,patch:e,setGroups:r,reset:n,onClose:a}){const[o,c]=P.useState({filters:!0,groups:!0,display:!0,forces:!0}),h=u=>c(d=>({...d,[u]:!d[u]}));return m.jsxs("aside",{className:"brain-settings",children:[m.jsxs("div",{className:"brain-settings-header",children:[m.jsx("span",{className:"brain-settings-title",children:"Graph settings"}),m.jsxs("div",{className:"brain-settings-header-actions",children:[m.jsx("button",{className:"brain-settings-mini-btn",onClick:n,title:"Restore default settings",children:"↻"}),m.jsx("button",{className:"brain-settings-mini-btn",onClick:a,title:"Close",children:"×"})]})]}),m.jsxs("div",{className:"brain-settings-body",children:[m.jsxs(Pp,{label:zp.filters,open:o.filters,onToggle:()=>h("filters"),children:[m.jsx("label",{className:"brain-settings-label",children:"Search files"}),m.jsx("input",{type:"search",className:"brain-settings-input",placeholder:"Search…",value:i.filters.search,onChange:u=>e("filters",{search:u.target.value})}),m.jsxs("p",{className:"brain-settings-hint",children:["Operators: ",m.jsx("code",{children:"tag:"})," ",m.jsx("code",{children:"path:"})," ",m.jsx("code",{children:"file:"})," ",m.jsx("code",{children:"-not"})," ",m.jsx("code",{children:"OR"})," ",m.jsx("code",{children:'"phrase"'})," ",m.jsx("code",{children:"/regex/"})]}),m.jsx(Uu,{label:"Tags",checked:i.filters.showTags,onChange:u=>e("filters",{showTags:u})}),m.jsx(Uu,{label:"Attachments",checked:i.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),m.jsx(Uu,{label:"Existing files only",checked:i.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),m.jsx(Uu,{label:"Orphans",checked:i.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),m.jsx(Pp,{label:zp.groups,open:o.groups,onToggle:()=>h("groups"),children:m.jsx(zat,{groups:i.groups,onChange:r})}),m.jsxs(Pp,{label:zp.display,open:o.display,onToggle:()=>h("display"),children:[m.jsx($at,{label:"View",value:i.display.view==="3d"?"3d":"2d",options:[{value:"2d",label:"2D"},{value:"3d",label:"3D"}],onChange:u=>e("display",{view:u})}),m.jsx(Uu,{label:"Arrows",checked:i.display.arrows,onChange:u=>e("display",{arrows:u})}),m.jsx(ul,{label:"Text fade threshold",value:i.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),m.jsx(ul,{label:"Node size",value:i.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),m.jsx(ul,{label:"Link thickness",value:i.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),m.jsxs(Pp,{label:zp.forces,open:o.forces,onToggle:()=>h("forces"),children:[m.jsx(ul,{label:"Center force",value:i.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),m.jsx(ul,{label:"Repel force",value:i.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),m.jsx(ul,{label:"Link force",value:i.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),m.jsx(ul,{label:"Link distance",value:i.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Pp({label:i,open:e,onToggle:r,children:n}){return m.jsxs("div",{className:`brain-section ${e?"brain-section--open":""}`,children:[m.jsxs("button",{className:"brain-section-header",onClick:r,type:"button",children:[m.jsx("span",{className:"brain-section-caret",children:e?"▾":"▸"}),m.jsx("span",{children:i})]}),e&&m.jsx("div",{className:"brain-section-body",children:n})]})}function Uu({label:i,checked:e,onChange:r}){return m.jsxs("label",{className:"brain-toggle-row",children:[m.jsx("span",{children:i}),m.jsx("span",{className:`brain-toggle ${e?"brain-toggle--on":""}`,onClick:()=>r(!e),children:m.jsx("span",{className:"brain-toggle-knob"})})]})}function $at({label:i,value:e,options:r,onChange:n}){return m.jsxs("div",{className:"brain-segmented-row",children:[m.jsx("span",{className:"brain-segmented-label",children:i}),m.jsx("div",{className:"brain-segmented",role:"tablist",children:r.map(a=>m.jsx("button",{type:"button",role:"tab","aria-selected":e===a.value,className:`brain-segmented-btn ${e===a.value?"brain-segmented-btn--active":""}`,onClick:()=>n(a.value),children:a.label},a.value))})]})}function ul({label:i,value:e,onChange:r}){return m.jsxs("label",{className:"brain-slider-row",children:[m.jsx("span",{className:"brain-slider-label-text",children:i}),m.jsx("input",{type:"range",min:0,max:1,step:.01,value:e,onChange:n=>r(parseFloat(n.target.value))})]})}function zat({groups:i,onChange:e}){const[r,n]=P.useState(""),[a,o]=P.useState(null),c=()=>{const d=r.trim();if(!d)return;const f=`grp_${Math.random().toString(36).slice(2,8)}`;e([...i,{id:f,query:d,color:Ex[i.length%Ex.length]}]),n("")},h=(d,f)=>{e(i.map(g=>g.id===d?{...g,...f}:g))},u=d=>e(i.filter(f=>f.id!==d));return m.jsxs(m.Fragment,{children:[i.length===0&&m.jsxs("p",{className:"brain-settings-hint",children:["Color nodes that match a query. First matching group wins. Example:"," ",m.jsx("code",{children:"tag:#architecture"})]}),m.jsx("div",{className:"brain-groups-list",children:i.map(d=>m.jsxs("div",{className:"brain-group-row",children:[m.jsx("button",{className:"brain-group-color",style:{background:d.color},onClick:()=>o(a===d.id?null:d.id),title:"Pick color"}),m.jsx("input",{className:"brain-settings-input brain-group-input",value:d.query,onChange:f=>h(d.id,{query:f.target.value})}),m.jsx("button",{className:"brain-settings-mini-btn",onClick:()=>u(d.id),title:"Remove group",children:"×"}),a===d.id&&m.jsx("div",{className:"brain-swatch-picker",children:Ex.map(f=>m.jsx("button",{className:"brain-swatch",style:{background:f},onClick:()=>{h(d.id,{color:f}),o(null)}},f))})]},d.id))}),m.jsxs("div",{className:"brain-group-add",children:[m.jsx("input",{className:"brain-settings-input",placeholder:"New group query…",value:r,onChange:d=>n(d.target.value),onKeyDown:d=>{d.key==="Enter"&&c()}}),m.jsx("button",{className:"brain-settings-btn",onClick:c,disabled:!r.trim(),children:"New group"})]})]})}function Pat(i){return oi({queryKey:["graph","content",(i==null?void 0:i.path)??null],queryFn:()=>{if(!i||!i.path)throw new Error("No path for node");return ie.get(`/graph/content?path=${encodeURIComponent(i.path)}`)},enabled:!!(i&&i.path),staleTime:3e4})}const OA={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},qat={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},Uat={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function Hat(i){return i==="task"?"tasks":i==="feature"?"features":i==="knowledge"?"knowledge":i==="soul"||i==="user"||i==="memory"||i==="core"?"core":null}function Wat({node:i,onClose:e,onSelectRelated:r,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(i!=null&&i.path),u=Pat(h?i:null);if(!i)return m.jsx("aside",{className:"brain-drawer"});const d=Hat(i.group),f=u.data;return m.jsxs("aside",{className:"brain-drawer brain-drawer--open",children:[m.jsx("button",{className:"brain-drawer-close",onClick:e,"aria-label":"Close",children:"×"}),m.jsxs("div",{className:"brain-drawer-header",children:[m.jsxs("span",{className:"brain-drawer-group-badge",children:[m.jsx("span",{className:"brain-related-dot",style:{background:OA[i.group]}}),qat[i.group]]}),m.jsx("h2",{className:"brain-drawer-title",children:i.label}),i.path&&m.jsx("span",{className:"brain-drawer-id",children:i.path})]}),m.jsxs("div",{className:"brain-drawer-body",children:[h&&u.isLoading&&m.jsx("p",{className:"brain-description",children:"Loading…"}),h&&u.error&&m.jsxs("p",{className:"brain-description",children:["Failed to load file: ",String(u.error)]}),(f==null?void 0:f.type)==="markdown"&&m.jsx(tf,{content:f.content,frontmatter:f.frontmatter}),(f==null?void 0:f.type)==="json"&&m.jsx("pre",{className:"brain-codeblock",children:f.data!==void 0?JSON.stringify(f.data,null,2):f.raw??"(empty)"}),(f==null?void 0:f.type)==="text"&&m.jsx("pre",{className:"brain-codeblock",children:f.content}),!h&&i.group==="tag"&&m.jsxs("p",{className:"brain-description",children:["Tag ",m.jsxs("code",{children:["#",i.label.replace(/^#/,"")]})," — ",n.length," ",n.length===1?"file":"files"," reference this tag."]}),!h&&i.group!=="tag"&&m.jsx("p",{className:"brain-description",children:i.meta.description??"No file content."}),n.length>0&&m.jsxs("section",{className:"brain-drawer-section",children:[m.jsxs("h3",{className:"brain-drawer-section-title",children:["Connections (",n.length,") · in ",a," · total ",o]}),m.jsx("div",{className:"brain-related-list",children:n.map(({node:g,kind:x})=>m.jsxs("button",{className:"brain-related-item",onClick:()=>r(g.id),children:[m.jsx("span",{className:"brain-related-dot",style:{background:OA[g.group]}}),m.jsx("span",{children:g.label}),m.jsx("span",{className:"brain-related-kind",children:Uat[x]??x})]},`${g.id}-${x}`))})]})]}),d&&c&&m.jsx("div",{className:"brain-drawer-footer",children:m.jsxs("button",{className:"brain-btn",onClick:()=>c(d,i.id),children:["Open in ",d.charAt(0).toUpperCase()+d.slice(1)," to edit →"]})})]})}const Gat=P.lazy(()=>Fe(()=>import("./BrainCanvas3D-hy-bJKIJ.js"),__vite__mapDeps([55,53])).then(i=>({default:i.BrainCanvas3D}))),Yat={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Kat={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function RA(i){return typeof i=="string"?i:i.id}function yD(i){const e=i.group==="soul"?8:i.group==="user"||i.group==="memory"?6:i.group==="tag"?3:4,r=i.__inDegree??0;return e+Math.min(14,r*1.2)}function jA(i,e){return Math.sqrt(yD(i)*e)*3}function Vat(i,e,r){for(const{group:n,parsed:a}of e)if(a.match(i))return n.color;return r[i.group]}function Xat({onNavigate:i}){const{data:e,isLoading:r,error:n}=Aat(),a=Pi(),{settings:o,patch:c,setGroups:h,reset:u}=Oat(),{resolved:d}=Gd(),f=d==="dark",g=f?Yat:Kat,x=P.useRef(null),y=P.useRef(void 0),[v,C]=P.useState({w:0,h:0}),[_,k]=P.useState(null),[T,N]=P.useState(null),[E,B]=P.useState(!0),O=P.useRef(!1);P.useEffect(()=>{if(!x.current)return;const it=x.current,V=()=>C({w:it.clientWidth,h:it.clientHeight});V();const at=new ResizeObserver(V);return at.observe(it),()=>at.disconnect()},[]);const A=P.useMemo(()=>BA(o.filters.search),[o.filters.search]),M=P.useMemo(()=>o.groups.map(it=>({group:it,parsed:BA(it.query)})).filter(({parsed:it})=>!it.isEmpty),[o.groups]),{filteredData:I,neighborsById:D,totalDegreeById:F,inDegreeById:U}=P.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const it=new Map,V=new Map;for(const Dt of e.nodes)it.set(Dt.id,0),V.set(Dt.id,0);for(const Dt of e.links){const xt=typeof Dt.source=="string"?Dt.source:Dt.source.id,Ut=typeof Dt.target=="string"?Dt.target:Dt.target.id;it.set(Ut,(it.get(Ut)??0)+1),V.set(xt,(V.get(xt)??0)+1),V.set(Ut,(V.get(Ut)??0)+1)}const at=Dt=>(V.get(Dt)??0)===0,Ct=[],Bt=new Set;for(const Dt of e.nodes){if(!o.filters.showTags&&Dt.group==="tag"||!o.filters.showOrphans&&at(Dt.id)||!A.isEmpty&&!A.match(Dt))continue;const xt={...Dt};xt.__inDegree=it.get(Dt.id)??0,xt.__totalDegree=V.get(Dt.id)??0,xt.__color=Vat(Dt,M,g),Ct.push(xt),Bt.add(Dt.id)}const Ht=[],re=new Map;for(const Dt of Ct)re.set(Dt.id,new Set);for(const Dt of e.links){const xt=typeof Dt.source=="string"?Dt.source:Dt.source.id,Ut=typeof Dt.target=="string"?Dt.target:Dt.target.id;!Bt.has(xt)||!Bt.has(Ut)||(Ht.push({source:xt,target:Ut,kind:Dt.kind}),re.get(xt).add(Ut),re.get(Ut).add(xt))}return{filteredData:{nodes:Ct,links:Ht},neighborsById:re,totalDegreeById:V,inDegreeById:it}},[e,o.filters,A,M]),K=P.useMemo(()=>Bat(o.forces),[o.forces]),z=.4+o.display.nodeSize*2.2;P.useEffect(()=>{var Bt,Ht,re,Dt,xt,Ut,Yt,ht,st;const it=y.current;if(!it)return;const V=(Bt=it.d3Force)==null?void 0:Bt.call(it,"charge");V!=null&&V.strength&&V.strength(K.repelStrength),V!=null&&V.distanceMax&&V.distanceMax(420);const at=(Ht=it.d3Force)==null?void 0:Ht.call(it,"link");at&&((re=at.strength)==null||re.call(at,K.linkStrength),(Dt=at.distance)==null||Dt.call(at,K.linkDistance));const Ct=(xt=it.d3Force)==null?void 0:xt.call(it,"center");Ct!=null&&Ct.strength&&Ct.strength(K.centerStrength),(Ut=it.d3Force)==null||Ut.call(it,"collide",bH().radius(Ot=>jA(Ot,z)+4).strength(.9).iterations(2)),(Yt=it.d3Force)==null||Yt.call(it,"x",BH(0).strength(K.centerStrength*.4)),(ht=it.d3Force)==null||ht.call(it,"y",LH(0).strength(K.centerStrength*.4)),(st=it.d3ReheatSimulation)==null||st.call(it)},[K,z,I]),P.useEffect(()=>{O.current=!1},[e==null?void 0:e.nodes.length]),P.useEffect(()=>{if(!e||!I.nodes.length)return;const it=[];return[800,1600,2600].forEach(V=>{it.push(setTimeout(()=>{var Ct;if(O.current)return;const at=y.current;at&&((Ct=at.zoomToFit)==null||Ct.call(at,500,80),V>=2600&&(O.current=!0))},V))}),()=>it.forEach(clearTimeout)},[e,I.nodes.length]);const W=P.useMemo(()=>I.nodes.find(it=>it.id===_)??null,[I,_]),j=P.useMemo(()=>{if(!W||!e)return[];const it=[],V=new Map(e.nodes.map(at=>[at.id,at]));for(const at of e.links){const Ct=typeof at.source=="string"?at.source:at.source.id,Bt=typeof at.target=="string"?at.target:at.target.id;if(Ct===W.id){const Ht=V.get(Bt);Ht&&it.push({node:Ht,kind:at.kind})}else if(Bt===W.id){const Ht=V.get(Ct);Ht&&it.push({node:Ht,kind:at.kind})}}return it},[e,W]),H=it=>{k(it.id);const V=y.current;V&&typeof it.x=="number"&&typeof it.y=="number"&&(V.centerAt(it.x,it.y,400),V.zoom(Math.max(V.zoom(),2.2),400))},Y=()=>a.invalidateQueries({queryKey:["graph"]});P.useEffect(()=>{const it=V=>{var Bt;if((Bt=V.target)!=null&&Bt.matches("input,textarea"))return;const at=y.current;if(!at)return;const Ct=at.zoom();if(V.key==="+"||V.key==="=")at.zoom(Ct*1.2,200);else if(V.key==="-"||V.key==="_")at.zoom(Ct/1.2,200);else if(V.key.startsWith("Arrow")){const Ht=V.shiftKey?120:40,re=at.centerAt();let Dt=0,xt=0;V.key==="ArrowUp"?xt=-Ht:V.key==="ArrowDown"?xt=Ht:V.key==="ArrowLeft"?Dt=-Ht:V.key==="ArrowRight"&&(Dt=Ht),at.centerAt(((re==null?void 0:re.x)??0)+Dt/Ct,((re==null?void 0:re.y)??0)+xt/Ct,150)}};return window.addEventListener("keydown",it),()=>window.removeEventListener("keydown",it)},[]);const Z=T??_,rt=Z?D.get(Z)??new Set:null,G=it=>!Z||it===Z?!1:!(rt!=null&&rt.has(it)),tt=it=>{const V=it.__color??g[it.group];return G(it.id)?Zat(V,f?.18:.3):V},ft=it=>{const V=RA(it.source),at=RA(it.target);return Z?V===Z||at===Z?f?"rgba(220, 225, 240, 0.85)":"rgba(30, 35, 50, 0.85)":f?"rgba(140, 150, 170, 0.07)":"rgba(60, 65, 80, 0.06)":f?"rgba(140, 150, 170, 0.35)":"rgba(60, 65, 80, 0.28)"},ct=.5+o.display.linkThickness*2.5,vt=it=>it.kind==="sibling_core"||it.kind==="release_includes"?ct*1.3:ct,ot=it=>yD(it)*z,wt=(1-o.display.textFadeThreshold)*.8;return m.jsxs("div",{className:"brain-page",children:[m.jsxs("header",{className:"brain-header",children:[m.jsxs("h1",{className:"brain-title",children:[m.jsx("span",{className:"brain-title-mark",children:"◉"}),"Brain"]}),e&&m.jsxs("span",{className:"brain-stats",children:[I.nodes.length,"/",e.nodes.length," nodes · ",I.links.length," links"]}),m.jsxs("div",{className:"brain-header-actions",children:[m.jsx("button",{className:"brain-btn",onClick:Y,title:"Refresh",children:"↻"}),m.jsx("button",{className:`brain-btn ${E?"brain-btn--active":""}`,onClick:()=>B(it=>!it),title:"Graph settings",children:"⚙"})]})]}),m.jsxs("div",{className:"brain-canvas-wrap",ref:x,onPointerLeave:()=>N(null),onPointerDown:()=>N(null),children:[E&&m.jsx(Iat,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>B(!1)}),r&&m.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&m.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&I.nodes.length===0&&!r&&m.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&I.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&m.jsx(mm,{ref:y,graphData:I,width:v.w,height:v.h,backgroundColor:f?"#151518":"#ffffff",nodeId:"id",nodeLabel:it=>it.label,nodeColor:it=>tt(it),nodeVal:it=>ot(it),nodeRelSize:3,linkColor:it=>ft(it),linkWidth:it=>vt(it),linkDirectionalArrowLength:it=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>f?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:it=>H(it),onNodeHover:it=>N(it?it.id:null),onNodeDrag:()=>N(null),onZoom:()=>N(null),onBackgroundClick:()=>{k(null),N(null)},onEngineStop:()=>{var V;if(O.current)return;const it=y.current;it&&((V=it.zoomToFit)==null||V.call(it,600,80),O.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(it,V,at)=>{if(!(it.id===T||it.id===_||Z&&(rt==null?void 0:rt.has(it.id)))&&at<wt)return;const Bt=it.label,Ht=Math.max(10,13/Math.max(at,.7));V.font=`${Ht}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,V.textAlign="center",V.textBaseline="top";const re=jA(it,z),Dt=(it.y??0)+re+3,xt=G(it.id);f?V.fillStyle=xt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":V.fillStyle=xt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",V.fillText(Bt,it.x??0,Dt)}}),e&&I.nodes.length>0&&v.w>0&&o.display.view==="3d"&&m.jsx(P.Suspense,{fallback:m.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:m.jsx(Gat,{graphData:I,width:v.w,height:v.h,isDark:f,nodeColor:tt,nodeVal:ot,linkColor:ft,linkWidth:vt,showArrows:o.display.arrows,forces:K,nodeSizeScale:z,isDimmed:G,neighborsById:D,onNodeClick:H,onNodeHover:it=>N(it?it.id:null),onBackgroundClick:()=>{k(null),N(null)}})}),m.jsx(Wat,{node:W,onClose:()=>k(null),onSelectRelated:it=>k(it),relatedNodes:j,inDegree:W?U.get(W.id)??0:0,totalDegree:W?F.get(W.id)??0:0,onNavigate:i})]})]})}function Zat(i,e){const r=i.replace("#",""),n=parseInt(r,16),a=n>>16&255,o=n>>8&255,c=n&255;return`rgba(${a}, ${o}, ${c}, ${e})`}function Qat(){return oi({queryKey:["council"],queryFn:()=>ie.get("/council"),select:i=>i.debates})}function Jat(i){return oi({queryKey:["council",i],queryFn:()=>ie.get(`/council/${i}`),select:e=>e.debate,enabled:!!i})}function bD(i){if(!i)return null;const e=i.split(`
|
|
480
|
-
`)[0].trim();if(!e)return null;const n=e.replace(/^(recommend(?:ed|ing)?|i\s+(?:would\s+)?recommend|proposal|my\s+position|conclusion|verdict)\s*[:\-—]?\s*/i,"").replace(/\.$/,"").split(/\s+/).slice(0,3).join(" ");return(n.length>18?n.slice(0,17).trimEnd()+"…":n).toUpperCase()}function tst(i){if(!i)return"other";const e=i.toLowerCase();return/\b(go\b|ship|launch|proceed|approve|yes|adopt|migrate\b)/.test(e)?"go":/\b(defer|postpone|delay|wait|later|q[2-9]|next\s+(?:quarter|year))/.test(e)?"defer":/\b(no-go|no\b|reject|abandon|stop|cancel|block)/.test(e)?"hold":/\b(pivot|phased|poc|proof.?of.?concept|pilot|partial|subset|scope\s+down)/.test(e)?"pivot":"other"}function xD(i,e){return i.rounds.find(r=>r.round===e)??null}function vD(i){if(!i.reactions)return 0;const e=(i.reactions.match(/\*\*[a-z][a-z0-9-]+\*\*/g)??[]).length;return e>0?e:(i.reactions.match(/^####\s+/gm)??[]).length}function est(i,e){if(!i.reactions)return[];const r=new Set(e),n=[],a=/\*\*([a-z][a-z0-9-]+)\*\*/g;let o;for(;(o=a.exec(i.reactions))!==null;)r.has(o[1])&&!n.includes(o[1])&&n.push(o[1]);return n}function ist(i){return i.openQuestions?(i.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function rst(i){const e=i.frontmatter.rounds_planned||i.personas.reduce((c,h)=>Math.max(c,...h.rounds.map(u=>u.round),0),0),r=i.personas.length,n=i.personas.reduce((c,h)=>c+h.rounds.reduce((u,d)=>u+vD(d),0),0);let a=0,o=0;if(i.finalReport){const c=i.finalReport.content,h=c.match(/##\s+Open\s+risks\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);h&&(a=(h[1].match(/^\s*[-*]/gm)??[]).length);const u=c.match(/##\s+Minority\s+views\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);if(u){const d=u[1].trim();d.length>0&&!/\(none\)|n\/?a/i.test(d)&&(o=Math.max(1,(d.match(/^\s*[-*]/gm)??[]).length))}}return{rounds:e,personas:r,pushbacks:n,openRisks:a,minorityViews:o}}function nst(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return e%360}const DA=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function ast(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return DA[e%DA.length]}function sst(i){const e=(i||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function ost(i){const e={verdict:"",appendix:null,sections:[]},r=/^##\s+(.+?)\s*\n([\s\S]*?)(?=^##\s+|\Z)/gim;let n;for(;(n=r.exec(i))!==null;){const a=n[1].trim(),o=n[2].trim();if(!e.verdict&&/^verdict\b/i.test(a)){e.verdict=o;continue}if(/^appendix\b/i.test(a)){e.appendix||(e.appendix={heading:a,body:o});continue}e.sections.push({heading:a,body:o})}return e}function rf({slug:i,size:e=36,title:r,onClick:n}){const a=nst(i),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=ast(i);return m.jsx("span",{className:"council-avatar",onClick:n,title:r??i,style:{width:e,height:e,fontSize:e*.45,background:o,cursor:n?"pointer":"default"},"aria-label":i,children:c})}const lst=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function cst(i,e,r){var a;if(r!=="all"&&(r==="in_progress"&&!i.status.endsWith("_running")||r==="synthesizing"&&i.status!=="synthesizing"||r==="complete"&&i.status!=="complete"||r==="promoted"&&!i.promoted_to_knowledge))return!1;if(!e.trim())return!0;const n=e.trim().toLowerCase();return!!((i.topic||"").toLowerCase().includes(n)||i.id.toLowerCase().includes(n)||(a=i.personaSlugs)!=null&&a.some(o=>o.toLowerCase().includes(n)))}function hst(i){return i==="complete"?"council-hall-status--complete":i==="synthesizing"?"council-hall-status--synth":i.endsWith("_running")?"council-hall-status--running":"council-hall-status--pending"}function ust(i){return i==="complete"?"Complete":i==="synthesizing"?"Synthesizing":i.endsWith("_running")?"In progress":"Pending"}function dst({debates:i,onOpen:e}){const{t:r}=qi(),[n,a]=P.useState(""),[o,c]=P.useState("all"),h=P.useMemo(()=>i.filter(u=>cst(u,n,o)),[i,n,o]);return m.jsxs("div",{className:"council-hall",children:[m.jsxs("div",{className:"council-hall-bar",children:[m.jsxs("label",{className:"council-hall-search",children:[m.jsx("span",{"aria-hidden":!0,children:"🔍"}),m.jsx("input",{type:"search",value:n,onChange:u=>a(u.target.value),placeholder:r("council.search.placeholder")})]}),m.jsx("select",{className:"council-hall-filter",value:o,onChange:u=>c(u.target.value),"aria-label":r("council.filter.status"),children:lst.map(u=>m.jsx("option",{value:u.value,children:u.label},u.value))}),m.jsxs("span",{className:"council-hall-count",children:[h.length," / ",i.length]})]}),h.length===0?m.jsx("div",{className:"council-empty",children:r("council.empty.list")}):m.jsx("div",{className:"council-hall-grid",children:h.map(u=>m.jsxs("button",{type:"button",className:"council-hall-card",onClick:()=>e(u.id),children:[m.jsxs("div",{className:"council-hall-card-head",children:[m.jsxs("span",{className:`council-hall-status ${hst(u.status)}`,children:[m.jsx("span",{className:"council-hall-status-dot"}),ust(u.status)]}),m.jsxs("span",{className:"council-hall-rounds",children:["R",u.current_round,"/",u.rounds_planned]})]}),m.jsx("h3",{className:"council-hall-topic",children:u.topic||u.id}),m.jsxs("div",{className:"council-hall-foot",children:[u.personaSlugs&&u.personaSlugs.length>0&&m.jsxs("div",{className:"council-hall-avatars","aria-label":`${u.personaSlugs.length} personas`,children:[u.personaSlugs.slice(0,6).map((d,f)=>m.jsx("span",{className:"council-hall-avatar-wrap",style:{zIndex:10-f},children:m.jsx(rf,{slug:d,size:20})},d)),u.personaSlugs.length>6&&m.jsxs("span",{className:"council-hall-avatar-more",children:["+",u.personaSlugs.length-6]})]}),m.jsx("span",{className:"council-hall-date",children:u.updated_at||u.created_at}),u.promoted_to_knowledge&&m.jsx("span",{className:"council-hall-promoted",title:"Promoted to knowledge",children:"📜"})]})]},u.id))})]})}function fst(i){var e,r;if(i==="complete")return{label:"Complete",tone:"complete"};if(i==="synthesizing")return{label:"Synthesizing",tone:"synth"};if(/_running$/.test(i)){const n=(e=i.match(/^round_(\d+)_running$/))==null?void 0:e[1];return{label:n?`Round ${n} running`:"Running",tone:"running"}}if(/_complete$/.test(i)){const n=(r=i.match(/^round_(\d+)_complete$/))==null?void 0:r[1];return{label:n?`Round ${n} done`:"Round done",tone:"pending"}}return i==="created"?{label:"Created",tone:"pending"}:{label:i,tone:"pending"}}function pst({status:i,size:e="md"}){const{label:r,tone:n}=fst(i);return m.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[m.jsx("span",{className:"council-status-dot"}),r]})}function Hu({value:i,label:e,tone:r="default"}){return m.jsxs("div",{className:`council-stat-tile council-stat-tile--${r}`,children:[m.jsx("div",{className:"council-stat-value",children:i}),m.jsx("div",{className:"council-stat-label",children:e})]})}function gst({debate:i,onCiteJump:e,onAgentJump:r}){const{t:n}=qi(),a=P.useMemo(()=>rst(i),[i]),o=i.finalReport?ost(i.finalReport.content):null,c=i.personas.map(u=>u.slug),h=u=>{const d=u.toLowerCase();return/\b(risk|danger|warning|caveat)/.test(d)?"council-ov-card--risks":/\b(minority|dissent|objection)/.test(d)?"council-ov-card--minority":/^why\b/.test(d)?"council-ov-card--why":""};return m.jsxs("div",{className:"council-ov",children:[m.jsxs("section",{className:"council-ov-problem",children:[m.jsx("div",{className:"council-ov-label",children:"Problem"}),m.jsx("h2",{className:"council-ov-topic",children:i.frontmatter.topic||i.frontmatter.id}),i.frontmatter.promoted_to_knowledge&&m.jsxs("div",{className:"council-ov-promoted",children:[m.jsx("span",{children:"📜"}),m.jsxs("span",{children:["Promoted to knowledge: ",m.jsx("code",{children:i.frontmatter.promoted_to_knowledge})]})]})]}),!o&&m.jsxs("section",{className:"council-ov-pending",children:[m.jsx("div",{className:"council-ov-label",children:n("council.verdict.awaitingSynthesis")}),m.jsx("p",{children:n("council.verdict.synthPending")}),i.roundLog&&m.jsxs("div",{className:"council-roundlog",children:[m.jsx("h4",{children:"Round log"}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Re.parse(i.roundLog)}})]})]}),o&&m.jsxs(m.Fragment,{children:[m.jsxs("section",{className:"council-ov-verdict",children:[m.jsx("div",{className:"council-ov-label",children:"Verdict"}),m.jsx("div",{className:"council-ov-verdict-text",dangerouslySetInnerHTML:{__html:Re.parse(o.verdict||"*No verdict section found.*")}})]}),m.jsxs("div",{className:"council-ov-stats",children:[m.jsx(Hu,{value:a.rounds,label:"rounds"}),m.jsx(Hu,{value:a.personas,label:"personas"}),m.jsx(Hu,{value:a.pushbacks,label:"pushbacks"}),m.jsx(Hu,{value:a.openRisks,label:"open risks",tone:"warning"}),m.jsx(Hu,{value:a.minorityViews,label:"dissent",tone:"dissent"})]}),o.sections.length>0&&m.jsx("div",{className:"council-ov-sections",children:o.sections.map(u=>m.jsxs("section",{className:`council-ov-card ${h(u.heading)}`,children:[m.jsx("h3",{children:u.heading}),m.jsx(mst,{text:u.body,knownSlugs:c,onCiteJump:e,onAgentJump:r})]},u.heading))}),o.appendix&&m.jsxs("details",{className:"council-ov-appendix",children:[m.jsx("summary",{children:o.appendix.heading}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Re.parse(o.appendix.body)}})]})]})]})}function mst({text:i,knownSlugs:e,onCiteJump:r,onAgentJump:n}){const a=[],o=new Set(e);let c=i.replace(/([a-z][a-z0-9-]+)\s+in\s+R(\d+)/g,(x,y,v)=>{if(!o.has(y))return x;const C=a.length;return a.push({slug:y,round:Number(v)}),`\0CITE${C}\0`});const h=[];c=c.replace(/\*\*([a-z][a-z0-9-]+)\*\*/g,(x,y)=>{if(!o.has(y))return x;const v=h.length;return h.push(y),`\0AGENT${v}\0`});const d=Re.parse(c).split(/\u0000(CITE|AGENT)(\d+)\u0000/),f=[];let g=0;for(;g<d.length;){const x=d[g];if(g+2<d.length&&(d[g+1]==="CITE"||d[g+1]==="AGENT")){f.push(m.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`));const y=d[g+1],v=Number(d[g+2]);if(y==="CITE"){const C=a[v];f.push(m.jsxs("button",{type:"button",className:"council-cite-chip",onClick:()=>r(C.slug,C.round),children:[m.jsx(rf,{slug:C.slug,size:14}),m.jsx("span",{children:C.slug}),m.jsxs("span",{className:"council-cite-round",children:["R",C.round]})]},`c-${g}`))}else{const C=h[v];f.push(m.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(C),children:C},`a-${g}`))}g+=3}else f.push(m.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`)),g+=1}return m.jsx("div",{className:"council-sheet-prose council-citation-prose",children:f})}function CD({model:i}){const e=sst(i),r=i?i.charAt(0).toUpperCase()+i.slice(1):"unknown";return m.jsx("span",{className:"council-model-badge",style:{background:`hsl(${e} 85% 55% / 0.14)`,color:`hsl(${e} 85% 40%)`,borderColor:`hsl(${e} 85% 55% / 0.35)`},title:`Model: ${r}`,children:r})}function yst(i,e){if(!e.trim())return!0;const r=e.trim().toLowerCase();if(i.slug.toLowerCase().includes(r))return!0;for(const n of i.rounds)if([n.executiveSummary,n.position,n.reasoning,n.reactions,n.openQuestions].filter(Boolean).join(`
|
|
481
|
-
`).toLowerCase().includes(r))return!0;return!1}function l_(i,e){if(!e.trim())return i;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return i.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function bst({debate:i,focusSlug:e}){const{t:r}=qi(),[n,a]=P.useState(""),[o,c]=P.useState(()=>new Set),h=P.useRef(null),u=P.useMemo(()=>i.personas.filter(f=>yst(f,n)),[i.personas,n]);P.useEffect(()=>{if(!e)return;c(g=>{const x=new Set(g);return x.delete(e),x});const f=setTimeout(()=>{var x;const g=(x=h.current)==null?void 0:x.querySelector(`[data-agent="${e}"]`);g==null||g.scrollIntoView({behavior:"smooth",block:"start"})},30);return()=>clearTimeout(f)},[e]);const d=f=>{c(g=>{const x=new Set(g);return x.has(f)?x.delete(f):x.add(f),x})};return m.jsxs("div",{className:"council-transcript",ref:h,children:[m.jsxs("div",{className:"council-transcript-searchbar",children:[m.jsxs("label",{className:"council-transcript-search",children:[m.jsx("span",{"aria-hidden":!0,children:"🔍"}),m.jsx("input",{type:"search",value:n,onChange:f=>a(f.target.value),placeholder:r("council.search.transcript")})]}),m.jsxs("span",{className:"council-transcript-count",children:[u.length," of ",i.personas.length," persona",i.personas.length===1?"":"s"]})]}),m.jsxs("div",{className:"council-transcript-body",children:[u.length===0&&m.jsx("div",{className:"council-empty",children:"No personas match this search."}),u.map(f=>m.jsx(xst,{persona:f,query:n,collapsed:o.has(f.slug),highlighted:e===f.slug,onToggle:()=>d(f.slug)},f.slug))]})]})}function xst({persona:i,query:e,collapsed:r,highlighted:n,onToggle:a}){return m.jsxs("article",{className:`council-transcript-block ${n?"is-highlighted":""}`,"data-agent":i.slug,children:[m.jsxs("header",{className:"council-transcript-block-head",onClick:a,children:[m.jsxs("div",{className:"council-transcript-block-title",children:[m.jsx(rf,{slug:i.slug,size:24}),m.jsxs("div",{children:[m.jsx("h3",{className:"council-transcript-block-name",children:i.slug}),m.jsxs("div",{className:"council-transcript-block-meta",children:[m.jsx(CD,{model:i.frontmatter.model}),i.frontmatter.aspects.slice(0,4).map(o=>m.jsx("span",{className:"council-aspect",children:o},o))]})]})]}),m.jsx("span",{className:`council-transcript-chev ${r?"":"is-open"}`,"aria-hidden":!0,children:"▸"})]}),!r&&m.jsxs("div",{className:"council-transcript-block-body",children:[i.persona&&m.jsxs("section",{className:"council-sheet-section",children:[m.jsx("h4",{children:"Persona prompt"}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:l_(Re.parse(i.persona),e)}})]}),i.rounds.length===0&&m.jsx("div",{className:"council-sheet-empty",children:"No rounds submitted."}),i.rounds.slice().sort((o,c)=>c.round-o.round).map(o=>m.jsx(vst,{round:o,crossContext:i.crossContext[o.round]??null,query:e},o.round)),i.researches.length>0&&m.jsxs("section",{className:"council-sheet-section",children:[m.jsx("h4",{children:"Research notes"}),m.jsx("ul",{className:"council-research-list",children:i.researches.map(o=>m.jsxs("li",{children:[m.jsx("span",{className:"council-research-topic",children:o.topic}),m.jsx("span",{className:"council-research-date",children:o.added_at})]},o.slug))})]})]})]})}function vst({round:i,crossContext:e,query:r}){const n=bD(i.position);return m.jsxs("section",{className:"council-round-panel",children:[m.jsxs("header",{className:"council-round-panel-head",children:[m.jsxs("h4",{className:"council-round-panel-title",children:["Round ",i.round]}),n&&m.jsx("span",{className:"council-chip-pos",children:n})]}),e&&m.jsxs("blockquote",{className:"council-crosscontext",children:[m.jsx("strong",{children:"Cross-context loaded"}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:l_(Re.parse(e),r)}})]}),i.executiveSummary&&m.jsx(Wu,{title:"Executive summary",body:i.executiveSummary,query:r}),i.position&&m.jsx(Wu,{title:"Position",body:i.position,query:r}),i.reasoning&&m.jsx(Wu,{title:"Reasoning",body:i.reasoning,query:r}),i.reactions&&m.jsx(Wu,{title:"Reactions to peers",body:i.reactions,query:r}),i.openQuestions&&m.jsx(Wu,{title:"Open questions",body:i.openQuestions,query:r})]})}function Wu({title:i,body:e,query:r}){const n=l_(Re.parse(e),r);return m.jsxs("div",{className:"council-round-sub",children:[m.jsx("h5",{className:"council-round-sub-title",children:i}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:n}})]})}function _D(i,e){return e.trim()?i?[i.executiveSummary,i.position,i.reasoning].filter(Boolean).join(`
|
|
482
|
-
`).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function Cst({debate:i,query:e,onQueryChange:r,selected:n,onSelectCell:a,onClearSelection:o}){const c=P.useRef(null),h=P.useMemo(()=>Array.from({length:Math.max(1,i.frontmatter.rounds_planned)},(f,g)=>g+1),[i.frontmatter.rounds_planned]),u=P.useMemo(()=>i.personas.map(f=>f.slug),[i.personas]),d=P.useMemo(()=>{if(!e.trim())return null;let f=0;for(const g of i.personas)for(const x of h)_D(xD(g,x),e)&&f++;return f},[e,i,h]);return P.useEffect(()=>{if(!n)return;const f=g=>{const x=g.target;if(x&&["INPUT","TEXTAREA"].includes(x.tagName))return;if(g.key==="Escape"){o();return}const y=i.personas.findIndex(C=>C.slug===n.slug);if(y===-1)return;const v=i.frontmatter.rounds_planned;g.key==="ArrowRight"&&n.round<v?(g.preventDefault(),a(n.slug,n.round+1)):g.key==="ArrowLeft"&&n.round>1?(g.preventDefault(),a(n.slug,n.round-1)):g.key==="ArrowDown"&&y<i.personas.length-1?(g.preventDefault(),a(i.personas[y+1].slug,n.round)):g.key==="ArrowUp"&&y>0&&(g.preventDefault(),a(i.personas[y-1].slug,n.round))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[n,i,o,a]),P.useEffect(()=>{if(!n||!c.current)return;const f=c.current.querySelector(`[data-persona="${n.slug}"][data-round="${n.round}"]`);f==null||f.scrollIntoView({behavior:"smooth",block:"center"})},[n]),m.jsxs("div",{className:"council-matrix",children:[m.jsxs("div",{className:"council-matrix-bar",children:[m.jsxs("label",{className:"council-matrix-search-input",children:[m.jsx("span",{className:"council-matrix-search-icon","aria-hidden":!0,children:"🔍"}),m.jsx("input",{type:"search",value:e,onChange:f=>r(f.target.value),placeholder:"Filter cells by text…"}),e&&m.jsx("button",{type:"button",className:"council-matrix-search-clear",onClick:()=>r(""),children:"×"})]}),d!=null&&m.jsxs("span",{className:"council-matrix-count",children:[d," match",d===1?"":"es"]})]}),m.jsx("div",{className:"council-matrix-scroll",ref:c,children:m.jsxs("div",{className:"council-matrix-grid",style:{gridTemplateColumns:`180px repeat(${h.length}, minmax(220px, 1fr))`},children:[m.jsx("div",{className:"council-matrix-corner","aria-hidden":!0}),h.map(f=>{const g=i.frontmatter.status===`round_${f}_running`,x=i.frontmatter.current_round>=f&&!g;return m.jsxs("div",{className:`council-round-head ${g?"is-running":""} ${x?"is-done":""}`,children:["Round ",f]},`h-${f}`)}),i.personas.map(f=>m.jsx(_st,{persona:f,rounds:h,debate:i,query:e,selected:n,knownSlugs:u,onSelectCell:a},f.slug))]})})]})}function _st({persona:i,rounds:e,debate:r,query:n,selected:a,knownSlugs:o,onSelectCell:c}){return m.jsxs(m.Fragment,{children:[m.jsxs("aside",{className:"council-matrix-row-head",children:[m.jsx(rf,{slug:i.slug,size:22}),m.jsxs("div",{className:"council-matrix-row-id",children:[m.jsx("div",{className:"council-matrix-row-name",children:i.slug}),m.jsx(CD,{model:i.frontmatter.model})]})]}),e.map(h=>{const u=xD(i,h),d=r.frontmatter.status===`round_${h}_running`,f=!!a&&a.slug===i.slug&&a.round===h,g=_D(u,n),x=!!n.trim()&&!g;return m.jsx(kst,{personaSlug:i.slug,round:h,data:u,isRunning:d,active:f,dimmed:x,knownSlugs:o,onSelect:c},h)})]})}function kst({personaSlug:i,round:e,data:r,isRunning:n,active:a,dimmed:o,knownSlugs:c,onSelect:h}){if(!r)return m.jsx("div",{className:`council-cell council-cell--empty ${n?"council-cell--pending":""} ${o?"is-dimmed":""}`,"data-persona":i,"data-round":e,children:m.jsx("span",{className:"council-cell-empty-label",children:n?"awaiting…":"— silent —"})});const u=bD(r.position),d=tst(r.position),f=vD(r),g=ist(r),x=est(r,c);return m.jsxs("button",{type:"button",className:`council-cell council-cell--${d} ${a?"is-active":""} ${o?"is-dimmed":""}`,"data-persona":i,"data-round":e,onClick:()=>h(i,e),children:[m.jsxs("div",{className:"council-cell-top",children:[u&&m.jsx("span",{className:`council-chip-pos council-chip-pos--${d}`,children:u}),(f>0||g>0)&&m.jsxs("span",{className:"council-cell-meta",children:[f>0&&m.jsxs(m.Fragment,{children:["↯ ",f]}),f>0&&g>0&&m.jsx("span",{children:" · "}),g>0&&m.jsxs(m.Fragment,{children:["? ",g]})]})]}),!a&&r.executiveSummary&&m.jsx("p",{className:"council-cell-exec",children:r.executiveSummary}),a&&m.jsxs("div",{className:"council-cell-full",children:[r.executiveSummary&&m.jsx(Gu,{title:"Executive summary",children:m.jsx("p",{children:r.executiveSummary})}),r.position&&m.jsx(Gu,{title:"Position",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:Re.parse(r.position)}})}),r.reasoning&&m.jsx(Gu,{title:"Reasoning",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:Re.parse(r.reasoning)}})}),r.reactions&&m.jsxs(Gu,{title:"Reactions to peers",children:[m.jsx("div",{dangerouslySetInnerHTML:{__html:Re.parse(r.reactions)}}),x.length>0&&m.jsx("div",{className:"council-cell-react-chips",children:x.map(y=>m.jsxs("span",{className:"council-cell-react-chip",children:[m.jsx(rf,{slug:y,size:14}),m.jsx("span",{children:y})]},y))})]}),r.openQuestions&&m.jsx(Gu,{title:"Open questions",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:Re.parse(r.openQuestions)}})})]})]})}function Gu({title:i,children:e}){return m.jsxs("section",{className:"council-cell-sub",children:[m.jsx("h5",{children:i}),m.jsx("div",{className:"council-cell-sub-body",children:e})]})}function FA(i){return i==="complete"||i==="synthesizing"?"overview":"matrix"}function wst({debate:i,onBack:e}){const{t:r}=qi(),[n,a]=P.useState(()=>FA(i.frontmatter.status)),[o,c]=P.useState(""),[h,u]=P.useState(null),[d,f]=P.useState(null);P.useEffect(()=>{a(FA(i.frontmatter.status)),c(""),u(null),f(null)},[i.frontmatter.id]);const g=(v,C)=>{a("matrix"),u({slug:v,round:C})},x=v=>{a("agents"),f(v)},y=()=>{var v;return(v=navigator.clipboard)==null?void 0:v.writeText(i.frontmatter.id).catch(()=>{})};return m.jsxs("div",{className:"council-detail",children:[m.jsxs("header",{className:"council-detail-head",children:[m.jsxs("button",{type:"button",className:"council-detail-back",onClick:e,children:["← ",r("council.title")]}),m.jsxs("div",{className:"council-detail-meta",children:[m.jsx(pst,{status:i.frontmatter.status}),m.jsxs("span",{className:"council-detail-rounds",children:["R",i.frontmatter.current_round,"/",i.frontmatter.rounds_planned]}),m.jsx("span",{className:"council-session-dot",children:"·"}),m.jsx("span",{className:"council-detail-date",children:i.frontmatter.created_at}),m.jsx("span",{className:"council-session-dot",children:"·"}),m.jsx("button",{type:"button",className:"council-session-id",onClick:y,title:"Copy debate id",children:i.frontmatter.id})]})]}),m.jsxs("nav",{className:"council-tabs",role:"tablist",children:[m.jsx(Nx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),m.jsx(Nx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),m.jsx(Nx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),m.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&m.jsx(gst,{debate:i,onCiteJump:g,onAgentJump:x}),n==="agents"&&m.jsx(bst,{debate:i,focusSlug:d}),n==="matrix"&&m.jsx(Cst,{debate:i,query:o,onQueryChange:c,selected:h,onSelectCell:(v,C)=>u({slug:v,round:C}),onClearSelection:()=>u(null)})]})]})}function Nx({active:i,onClick:e,label:r}){return m.jsx("button",{type:"button",role:"tab","aria-selected":i,className:`council-tab ${i?"is-active":""}`,onClick:e,children:r})}function Sst(){const{t:i}=qi(),{data:e,isLoading:r,isError:n,error:a}=Qat(),[o,c]=P.useState(null),{data:h,isLoading:u}=Jat(o);return r?m.jsx("div",{className:"loading",children:i("common.loading")}):n?m.jsxs("div",{className:"error-state",children:["Failed to load council sessions. ",a==null?void 0:a.message]}):o?m.jsxs("div",{className:"council-page council-page--detail",children:[u&&m.jsx("div",{className:"loading",children:"Loading session…"}),h&&m.jsx(wst,{debate:h,onBack:()=>c(null)})]}):m.jsxs("div",{className:"council-page",children:[m.jsx("h1",{className:"page-title",children:i("council.title")}),m.jsx(dst,{debates:e??[],onOpen:c})]})}function Tst(){return oi({queryKey:["config"],queryFn:()=>ie.get("/config"),select:i=>i.config})}function Est(){const i=Pi();return nr({mutationFn:e=>ie.patch("/config",e),onSuccess:()=>{i.invalidateQueries({queryKey:["config"]})}})}function Nst(){return oi({queryKey:["vaults"],queryFn:()=>ie.get("/vaults")})}function Ast(){return oi({queryKey:["connections"],queryFn:()=>ie.get("/connections"),select:i=>i.connections})}function Mst(){const i=Pi();return nr({mutationFn:e=>ie.post("/connections",e),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]}),i.invalidateQueries({queryKey:["vaults"]}),i.invalidateQueries({queryKey:["launcher-status"]}),i.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function Bst(){const i=Pi();return nr({mutationFn:e=>ie.del(`/connections/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]}),i.invalidateQueries({queryKey:["vaults"]}),i.invalidateQueries({queryKey:["launcher-status"]}),i.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function Lst(){return oi({queryKey:["federation","inbox"],queryFn:()=>ie.get("/federation/inbox")})}function Ost(){return nr({mutationFn:()=>ie.post("/federation/sync",{})})}const IA=["out","in","both"];function Rst({shareable:i,onToggleShareable:e,shareablePending:r}){const{t:n}=qi(),{data:a}=Nst(),{data:o}=Ast(),c=Mst(),h=Bst(),{data:u}=Lst(),d=Ost(),[f,g]=P.useState(""),[x,y]=P.useState("both"),[v,C]=P.useState(null),_=(a==null?void 0:a.vaults)??[],k=(a==null?void 0:a.current)??null,T=o??[],N=new Set(T.map(M=>M.vault)),E=_.filter(M=>M.name!==k&&!N.has(M.name)),B=()=>{if(C(null),!f){C(n("federation.error.pick_vault"));return}c.mutate({vault:f,direction:x},{onSuccess:()=>{g(""),y("both")},onError:M=>C(M instanceof Error?M.message:String(M))})},O=(M,I)=>{c.mutate({vault:M.vault,direction:I,topics:M.topics})},A=(M,I)=>{const D=I.split(",").map(F=>F.trim()).filter(Boolean);c.mutate({vault:M.vault,direction:M.direction,topics:D.length>0?D:null})};return m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:n("settings.federation")}),m.jsxs("div",{className:"fed-intro",children:[m.jsx("h3",{className:"fed-intro-title",children:n("federation.intro.title")}),m.jsx("p",{className:"fed-intro-body",children:n("federation.intro.body")}),m.jsxs("ol",{className:"fed-intro-steps",children:[m.jsx("li",{children:n("federation.intro.step1")}),m.jsx("li",{children:n("federation.intro.step2")}),m.jsx("li",{children:n("federation.intro.step3")})]})]}),m.jsxs("div",{className:"fed-card",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.sharing")}),m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:i,disabled:r,onChange:M=>e(M.target.checked)}),m.jsx("span",{children:n("federation.shareable.label")})]}),m.jsx("p",{className:"settings-field-hint",children:n("federation.shareable.hint")})]}),m.jsxs("div",{className:"fed-vaults",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.vaults")}),_.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.vaults.empty")}):m.jsx("ul",{className:"fed-vault-list",children:_.map(M=>m.jsxs("li",{className:`fed-vault-item${M.name===k?" fed-vault-item--current":""}`,children:[m.jsx("span",{className:"fed-vault-name",children:M.name}),M.name===k&&m.jsx("span",{className:"fed-badge",children:n("federation.current")}),m.jsx("span",{className:"fed-vault-path",children:M.path})]},M.name))})]}),m.jsxs("div",{className:"fed-connections",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.connections")}),T.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.connections.empty")}):m.jsx("ul",{className:"fed-conn-list",children:T.map(M=>{var I;return m.jsxs("li",{className:"fed-conn-item",children:[m.jsxs("div",{className:"fed-conn-head",children:[m.jsx("span",{className:"fed-conn-name",children:M.vault}),M.status==="stale"&&m.jsx("span",{className:"fed-badge fed-badge--stale",children:n("federation.stale")}),m.jsx("button",{className:"btn fed-conn-remove",onClick:()=>h.mutate(M.vault),disabled:h.isPending,children:n("federation.remove")})]}),m.jsxs("div",{className:"fed-conn-controls",children:[m.jsx("div",{className:"fed-direction",role:"group","aria-label":n("federation.direction"),children:IA.map(D=>m.jsx("button",{className:`fed-dir-btn${M.direction===D?" fed-dir-btn--active":""}`,onClick:()=>O(M,D),disabled:c.isPending,children:n(`federation.direction.${D}`)},D))}),m.jsx("input",{className:"settings-text-input fed-topics-input",defaultValue:((I=M.topics)==null?void 0:I.join(", "))??"",placeholder:n("federation.topics.placeholder"),onBlur:D=>{const F=D.target.value.split(",").map(K=>K.trim()).filter(Boolean).join(", "),U=(M.topics??[]).join(", ");F!==U&&A(M,D.target.value)}})]}),m.jsx("p",{className:"settings-field-hint fed-dir-hint",children:n(`federation.direction.${M.direction}.hint`)})]},M.vault)})})]}),m.jsxs("div",{className:"fed-add",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.add")}),E.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.add.none")}):m.jsxs("div",{className:"fed-add-row",children:[m.jsxs("select",{className:"settings-text-input",value:f,onChange:M=>g(M.target.value),children:[m.jsx("option",{value:"",children:n("federation.add.pick")}),E.map(M=>m.jsx("option",{value:M.name,children:M.name},M.name))]}),m.jsx("div",{className:"fed-direction",role:"group","aria-label":n("federation.direction"),children:IA.map(M=>m.jsx("button",{className:`fed-dir-btn${x===M?" fed-dir-btn--active":""}`,onClick:()=>y(M),children:n(`federation.direction.${M}`)},M))}),m.jsx("button",{className:"btn btn--primary",onClick:B,disabled:c.isPending||!f,children:n("federation.connect")})]}),E.length>0&&m.jsx("p",{className:"settings-field-hint fed-dir-hint",children:n(`federation.direction.${x}.hint`)}),v&&m.jsx("p",{className:"settings-test-err",children:v})]}),m.jsxs("div",{className:"fed-inbox",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.inbox")}),(()=>{const M=(u==null?void 0:u.pending)??[],I=(u==null?void 0:u.consumed)??[],D=(u==null?void 0:u.quarantined)??[];return M.length===0&&I.length===0&&D.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.inbox.empty")}):m.jsxs(m.Fragment,{children:[M.length>0&&m.jsxs("div",{className:"fed-inbox-group",children:[m.jsxs("h4",{className:"fed-inbox-group-title",children:[n("federation.inbox.pending")," (",M.length,")"]}),m.jsx("ul",{className:"fed-entry-list",children:M.map(F=>m.jsx($A,{entry:F,fromLabel:n("federation.inbox.from")},`p-${F.id}`))})]}),I.length>0&&m.jsxs("div",{className:"fed-inbox-group",children:[m.jsxs("h4",{className:"fed-inbox-group-title",children:[n("federation.inbox.consumed")," (",I.length,")"]}),m.jsx("ul",{className:"fed-entry-list fed-entry-list--consumed",children:I.map(F=>m.jsx($A,{entry:F,fromLabel:n("federation.inbox.from")},`c-${F.id}`))})]}),D.length>0&&m.jsxs("div",{className:"fed-inbox-group",children:[m.jsxs("h4",{className:"fed-inbox-group-title fed-inbox-group-title--warn",children:[n("federation.inbox.quarantined")," (",D.length,")"]}),m.jsx("ul",{className:"fed-entry-list",children:D.map(F=>m.jsxs("li",{className:"fed-entry fed-entry--quarantined",children:[m.jsx("code",{className:"fed-entry-file",children:F.file}),m.jsxs("span",{className:"fed-entry-meta",children:["v",F.version]})]},`q-${F.file}`))})]})]})})()]}),m.jsxs("div",{className:"fed-preview",children:[m.jsxs("div",{className:"fed-preview-head",children:[m.jsx("button",{className:"btn",onClick:()=>d.mutate(),disabled:d.isPending,children:d.isPending?n("federation.preview.running"):n("federation.preview")}),m.jsx("p",{className:"settings-field-hint",children:n("federation.preview.hint")})]}),d.isError&&m.jsx("p",{className:"settings-test-err",children:d.error instanceof Error?d.error.message:String(d.error)}),d.data&&m.jsx(jst,{deltas:d.data.deltas,t:n})]})]})}function $A({entry:i,fromLabel:e}){return m.jsxs("li",{className:"fed-entry",children:[m.jsxs("div",{className:"fed-entry-head",children:[m.jsx("span",{className:"fed-entry-title",children:i.title}),m.jsx("span",{className:`fed-entry-kind fed-entry-kind--${i.kind}`,children:i.kind})]}),m.jsxs("span",{className:"fed-entry-meta",children:[e," ",m.jsx("strong",{children:i.origin.vault}),i.origin.sourceTimestamp?` · ${i.origin.sourceTimestamp}`:""]})]})}function jst({deltas:i,t:e}){return i.length===0?m.jsx("p",{className:"settings-field-hint",children:e("federation.preview.none")}):m.jsx("ul",{className:"fed-delta-list",children:i.map(r=>{let n;return r.stale?n=e("federation.preview.stale"):r.consented?r.entries.length===0?n=e("federation.preview.nodelta"):n=`${r.entries.length} ${e("federation.preview.entries")}`:n=e("federation.preview.noconsent"),m.jsxs("li",{className:"fed-delta",children:[m.jsxs("div",{className:"fed-delta-head",children:[m.jsx("span",{className:"fed-delta-vault",children:r.vault}),m.jsx("span",{className:"fed-delta-status",children:n})]}),r.entries.length>0&&m.jsx("ul",{className:"fed-entry-list",children:r.entries.map((a,o)=>m.jsx("li",{className:"fed-entry",children:m.jsxs("div",{className:"fed-entry-head",children:[m.jsx("span",{className:"fed-entry-title",children:a.title}),m.jsx("span",{className:`fed-entry-kind fed-entry-kind--${a.kind}`,children:a.kind})]})},`${r.vault}-${o}`))})]},r.vault)})})}function Dst(i){const e=[];i.metaKey&&e.push("Cmd"),i.ctrlKey&&e.push("Ctrl"),i.altKey&&e.push("Alt"),i.shiftKey&&e.push("Shift");let r=i.key;return["Meta","Control","Alt","Shift"].includes(r)||(r===" "?r="Space":r.length===1?r=r.toUpperCase():r=r.charAt(0).toUpperCase()+r.slice(1),e.length===0)?null:[...e,r].join("+")}const Fst=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],Ax={platforms:[],disableNativeMemory:!0};function Ist(){var Dt;const{t:i}=qi(),{data:e,isLoading:r,isError:n}=Tst(),a=Est(),[o,c]=P.useState(Ax.platforms),[h,u]=P.useState(Ax.disableNativeMemory),[d,f]=P.useState(!1),[g,x]=P.useState("clickup"),[y,v]=P.useState(""),[C,_]=P.useState(""),[k,T]=P.useState(""),[N,E]=P.useState(""),[B,O]=P.useState(""),[A,M]=P.useState(null),[I,D]=P.useState(!1),[F,U]=P.useState(null),[K,z]=P.useState(!1),[W,j]=P.useState(!1),[H,Y]=P.useState(!1),[Z,rt]=P.useState(()=>gC()),[G,tt]=P.useState(!1),ft=xt=>{rt(xt),YG(xt),Nv(xt)},{data:ct}=oi({queryKey:["tasks-sync-status"],queryFn:()=>ie.get("/tasks/sync-status"),select:xt=>xt.status}),{data:vt}=oi({queryKey:["tasks-containers"],queryFn:()=>ie.get("/tasks/containers"),select:xt=>xt.containers,enabled:d,staleTime:300*1e3}),ot=xt=>{const Ut=(vt??[]).find(Yt=>Yt.path===xt);Ut&&(g==="github"?(E(Ut.ids.owner??""),O(Ut.ids.repo??"")):(v(Ut.ids.teamId??""),_(Ut.ids.spaceId??""),T(Ut.ids.listId??"")),Ct())},wt=async()=>{z(!0),U(null);try{const{result:xt}=await ie.post("/tasks/provision",{});U(xt.errors.length>0?`⚠ ${xt.errors[0]}`:xt.created.length>0?`✓ Created: ${xt.created.join(", ")}${xt.backfilled>0?` · backfilled ${xt.backfilled} value(s)`:""}`:"✓ All recommended fields already exist.")}catch(xt){U(`⚠ ${xt instanceof Error?xt.message:String(xt)}`)}finally{z(!1)}};if(P.useEffect(()=>{var Yt,ht,st,Ot,$t;const xt=e??Ax;c(xt.platforms),u(xt.disableNativeMemory??!0);const Ut=e;f((Ut==null?void 0:Ut.taskBackend)==="clickup"||(Ut==null?void 0:Ut.taskBackend)==="github"),x((Ut==null?void 0:Ut.taskBackend)==="github"?"github":"clickup"),v(((Yt=Ut==null?void 0:Ut.clickup)==null?void 0:Yt.teamId)??""),_(((ht=Ut==null?void 0:Ut.clickup)==null?void 0:ht.spaceId)??""),T(((st=Ut==null?void 0:Ut.clickup)==null?void 0:st.listId)??""),E(((Ot=Ut==null?void 0:Ut.github)==null?void 0:Ot.owner)??""),O((($t=Ut==null?void 0:Ut.github)==null?void 0:$t.repo)??""),j(!1),Y(!1)},[e]),r)return m.jsx("div",{className:"loading",children:i("common.loading")});if(n)return m.jsx("div",{className:"error-state",children:i("common.error")});const it=xt=>{c(Ut=>{const Yt=Ut.includes(xt)?Ut.filter(ht=>ht!==xt):[...Ut,xt];return j(!0),Y(!1),Yt})},V=()=>{u(xt=>!xt),j(!0),Y(!1)},at=()=>{const xt=d?g:"local";a.mutate({platforms:o,disableNativeMemory:h,taskBackend:xt,...d&&g==="clickup"?{clickup:{teamId:y||void 0,spaceId:C||void 0,listId:k||void 0}}:{},...d&&g==="github"?{github:{owner:N||void 0,repo:B||void 0}}:{}},{onSuccess:()=>{j(!1),Y(!0)}})},Ct=()=>{j(!0),Y(!1)},Bt=(e==null?void 0:e.shareable)===!0,Ht=xt=>{a.mutate({shareable:xt})},re=async()=>{D(!0),M(null);try{M(await ie.post("/tasks/sync-test",{}))}catch(xt){M({ok:!1,backend:g,error:xt instanceof Error?xt.message:String(xt)})}finally{D(!1)}};return m.jsxs("div",{className:"settings-page",children:[m.jsxs("div",{className:"settings-header",children:[m.jsx("h1",{className:"page-title",children:i("settings.title")}),m.jsxs("div",{className:"settings-save-row",children:[H&&!W&&m.jsx("span",{className:"settings-saved",children:i("settings.saved")}),a.isError&&m.jsx("span",{className:"settings-error",children:i("common.error")}),m.jsx("button",{className:"btn btn--primary",onClick:at,disabled:!W||a.isPending,children:a.isPending?i("settings.saving"):i("settings.save")})]})]}),e===null&&m.jsx("div",{className:"settings-empty-notice",children:i("settings.no_config")}),m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:i("settings.platforms")}),m.jsx("div",{className:"settings-checkboxes",children:Fst.map(({id:xt,labelKey:Ut})=>m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(xt),onChange:()=>it(xt)}),m.jsx("span",{children:i(Ut)})]},xt))})]}),m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:i("settings.tasks")}),m.jsxs("div",{className:"settings-checkboxes",children:[m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:d,onChange:()=>{f(xt=>!xt),Ct()}}),m.jsx("span",{children:i("settings.cloud_tasks.label")})]}),m.jsx("p",{className:"settings-field-hint",children:i(g==="github"?"settings.cloud_tasks.github.hint":"settings.cloud_tasks.hint")}),d&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.provider")}),m.jsxs("select",{className:"settings-text-input",value:g,onChange:xt=>{const Ut=xt.target.value;x(Ut),M(null),Ct()},children:[m.jsx("option",{value:"clickup",children:i("settings.cloud_tasks.provider.clickup")}),m.jsx("option",{value:"github",children:i("settings.cloud_tasks.provider.github")})]})]}),g==="clickup"&&m.jsxs(m.Fragment,{children:[(vt??[]).length>0&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.list_label")}),m.jsx(em,{value:k?((Dt=(vt??[]).find(xt=>xt.ids.listId===k))==null?void 0:Dt.path)??null:null,options:(vt??[]).map(xt=>({value:xt.path,label:xt.path})),placeholder:i("settings.cloud_tasks.list_pick"),searchPlaceholder:i("settings.cloud_tasks.list_search"),clearLabel:i("settings.cloud_tasks.keep_current"),onChange:ot})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.team")}),m.jsx("input",{className:"settings-text-input",value:y,onChange:xt=>{v(xt.target.value),Ct()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.space")}),m.jsx("input",{className:"settings-text-input",value:C,onChange:xt=>{_(xt.target.value),Ct()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.list")}),m.jsx("input",{className:"settings-text-input",value:k,onChange:xt=>{T(xt.target.value),Ct()}})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.cloud_tasks.token_hint")})]}),g==="github"&&m.jsxs(m.Fragment,{children:[(vt??[]).length>0&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.github.repo")}),m.jsx(em,{value:N&&B?`${N}/${B}`:null,options:(vt??[]).map(xt=>({value:xt.path,label:xt.path})),placeholder:i("settings.cloud_tasks.github.pick"),searchPlaceholder:i("settings.cloud_tasks.github.search"),clearLabel:i("settings.cloud_tasks.keep_current"),onChange:ot})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.github.owner")}),m.jsx("input",{className:"settings-text-input",value:N,onChange:xt=>{E(xt.target.value),Ct()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.github.repo")}),m.jsx("input",{className:"settings-text-input",value:B,onChange:xt=>{O(xt.target.value),Ct()}})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.cloud_tasks.github.token_hint")})]}),m.jsxs("div",{className:"settings-test-row",children:[m.jsx("button",{className:"btn",onClick:re,disabled:I,children:i(I?"settings.cloud_tasks.testing":"settings.cloud_tasks.test")}),m.jsx("button",{className:"btn",onClick:wt,disabled:K,children:i(K?g==="github"?"settings.cloud_tasks.github.provisioning":"settings.cloud_tasks.provisioning":g==="github"?"settings.cloud_tasks.github.provision":"settings.cloud_tasks.provision")}),F&&m.jsx("span",{className:"settings-field-hint",children:F}),A&&A.ok&&m.jsxs("span",{className:"settings-test-ok",children:["✓ ",A.note??`${i("settings.cloud_tasks.test_ok")} ${A.user}`]}),A&&!A.ok&&m.jsxs("span",{className:"settings-test-err",children:["✗ ",A.error]})]}),ct&&ct.backend!=="local"&&m.jsxs("p",{className:"settings-sync-badge",children:[i("settings.cloud_tasks.status"),": ",ct.pendingPush," ",i("settings.cloud_tasks.pending"),ct.conflicts>0&&` · ${ct.conflicts} ${i("settings.cloud_tasks.conflicts")}`]})]})]})]}),m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:i("settings.memory")}),m.jsxs("div",{className:"settings-checkboxes",children:[m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:h,onChange:V}),m.jsx("span",{children:i("settings.native_memory.label")})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.native_memory.hint")})]})]}),m.jsx(Rst,{shareable:Bt,onToggleShareable:Ht,shareablePending:a.isPending}),Po()&&m.jsxs("section",{className:"settings-section",children:[m.jsxs("h2",{className:"settings-section-title",children:["Sleepy — notch quick-capture",m.jsx("span",{className:"settings-beta-badge",children:"BETA"})]}),m.jsxs("div",{className:"settings-checkboxes",children:[m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:Z.enabled,onChange:()=>ft({...Z,enabled:!Z.enabled})}),m.jsx("span",{children:"Enable Sleepy"})]}),m.jsx("p",{className:"settings-field-hint",children:"Press the hotkey anywhere to drop a capture bar under the notch: pick a project, type a thought, hit return — it's saved to that project's memory and learned."}),Z.enabled&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:"Hotkey"}),m.jsx("input",{className:"settings-text-input",readOnly:!0,value:G?"Press a key combo…":Z.hotkey,onFocus:()=>tt(!0),onBlur:()=>tt(!1),onKeyDown:xt=>{xt.preventDefault();const Ut=Dst(xt);Ut&&(ft({...Z,hotkey:Ut}),tt(!1),xt.currentTarget.blur())}})]})]})]})]})}function kD(){return oi({queryKey:["packs"],queryFn:()=>ie.get("/packs")})}function $st(){const i=Pi();return nr({mutationFn:e=>ie.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function zst(){const i=Pi();return nr({mutationFn:e=>ie.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function Pst(i){return"base"in i}function wD({item:i,onActionDone:e}){const{t:r}=qi(),n=$st(),a=zst(),o=i.installed,c=o?a:n,h=c.isPending,u=c.isError,d=r(o?"packs.action.remove":"packs.action.install"),f=r(o?"packs.action.removing":"packs.action.installing"),g=h?f:d,x=y=>{y.stopPropagation(),y.preventDefault(),!h&&c.mutate(i.name,{onSuccess:()=>e==null?void 0:e()})};return m.jsxs("div",{className:"packs-card-actions",children:[m.jsx("button",{type:"button",className:`packs-action-btn btn btn--ghost${o?" packs-action-btn--danger":""}`,onClick:x,disabled:h,"aria-invalid":u||void 0,"aria-busy":h||void 0,children:g}),u&&m.jsx("span",{className:"packs-action-error",role:"alert",children:r("packs.action.error")})]})}function qst({item:i,onClose:e}){const{t:r}=qi(),n=P.useCallback(a=>{a.target===a.currentTarget&&e()},[e]);return P.useEffect(()=>{const a=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),m.jsx("div",{className:"packs-modal-overlay",onClick:n,"aria-modal":"true",role:"dialog","aria-label":i.name,children:m.jsxs("div",{className:"packs-modal-panel",children:[m.jsxs("div",{className:"packs-modal-header",children:[m.jsxs("div",{className:"packs-modal-title-row",children:[m.jsx("h2",{className:"packs-modal-name",children:i.name}),i.installed&&m.jsx("span",{className:"packs-installed-pill",children:r("settings.packs.installed")})]}),m.jsxs("div",{className:"packs-modal-header-actions",children:[m.jsx(wD,{item:i,onActionDone:e}),m.jsx("button",{className:"packs-modal-close btn btn--ghost",type:"button",onClick:e,"aria-label":r("packs.detail.close"),children:r("packs.detail.close")})]})]}),i.description&&m.jsx("p",{className:"packs-modal-desc",children:i.description}),i.tags.length>0&&m.jsx("div",{className:"packs-modal-tags",children:i.tags.map(a=>m.jsx("span",{className:"task-tag","data-hue":Va(a),children:a},a))}),Pst(i)&&m.jsxs(m.Fragment,{children:[i.base&&m.jsxs("div",{className:"packs-modal-section",children:[m.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.base")}),m.jsx("p",{className:"packs-modal-mono",children:i.base})]}),i.subSkills.length>0&&m.jsxs("div",{className:"packs-modal-section",children:[m.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.subskills")}),m.jsx("ul",{className:"packs-modal-subskills",children:i.subSkills.map(a=>m.jsxs("li",{className:"packs-modal-subskill",children:[m.jsx("span",{className:"packs-modal-subskill-name",children:a.name}),a.description&&m.jsx("span",{className:"packs-modal-subskill-desc",children:a.description})]},a.name))})]}),i.relatedAgents&&i.relatedAgents.length>0&&m.jsxs("div",{className:"packs-modal-section",children:[m.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.agents")}),m.jsx("ul",{className:"packs-modal-agents",children:i.relatedAgents.map(a=>m.jsx("li",{className:"packs-modal-agent",children:a},a))})]})]})]})})}function zA({item:i,onClick:e}){const{t:r}=qi(),n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e(i))};return m.jsxs("div",{className:"packs-card packs-card--clickable",role:"button",tabIndex:0,onClick:()=>e(i),onKeyDown:n,"aria-label":i.name,children:[m.jsxs("div",{className:"packs-card-header",children:[m.jsx("span",{className:"packs-card-name",children:i.name}),i.installed&&m.jsx("span",{className:"packs-installed-pill",children:r("settings.packs.installed")})]}),i.description&&m.jsx("p",{className:"packs-card-desc",children:i.description}),i.tags.length>0&&m.jsx("div",{className:"packs-card-tags",children:i.tags.map(a=>m.jsx("span",{className:"task-tag","data-hue":Va(a),children:a},a))}),m.jsx(wD,{item:i})]})}function Ust(){const{t:i}=qi(),{data:e,isLoading:r,isError:n,error:a}=kD(),[o,c]=P.useState(null);if(r)return m.jsx("div",{className:"loading",children:i("common.loading")});if(n)return m.jsxs("div",{className:"error-state",children:[i("common.error")," ",a==null?void 0:a.message]});const h=(e==null?void 0:e.packs)??[],u=(e==null?void 0:e.standalone)??[];return m.jsxs("div",{className:"packs-page",children:[m.jsx("h1",{className:"page-title",children:i("packs.title")}),h.length===0&&u.length===0&&m.jsx("div",{className:"packs-empty",children:i("common.empty")}),h.length>0&&m.jsxs("section",{className:"packs-section",children:[m.jsx("h2",{className:"packs-section-title",children:i("packs.section.packs")}),m.jsx("div",{className:"packs-grid",children:h.map(d=>m.jsx(zA,{item:d,onClick:c},d.name))})]}),u.length>0&&m.jsxs("section",{className:"packs-section",children:[m.jsx("h2",{className:"packs-section-title",children:i("packs.section.standalone")}),m.jsx("div",{className:"packs-grid",children:u.map(d=>m.jsx(zA,{item:d,onClick:c},d.name))})]}),o!==null&&m.jsx(qst,{item:o,onClose:()=>c(null)})]})}function Hst(){return m.jsxs("header",{className:"about-hero",children:[m.jsxs("div",{className:"about-hero-copy",children:[m.jsxs("a",{className:"about-lockup",href:"#top","aria-label":"dreamcontext",children:[m.jsxs("svg",{className:"about-lockup-mark",width:"34",height:"34",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[m.jsx("path",{d:"M16 2L28 16L16 30L4 16L16 2Z",fill:"url(#hero-mark-outer)"}),m.jsx("path",{d:"M16 9L22 16L16 23L10 16L16 9Z",fill:"url(#hero-mark-inner)",opacity:"0.75"}),m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:"hero-mark-outer",x1:"4",y1:"2",x2:"28",y2:"30",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"var(--color-vivid-purple)"}),m.jsx("stop",{offset:"1",stopColor:"var(--color-electric-blue)"})]}),m.jsxs("linearGradient",{id:"hero-mark-inner",x1:"10",y1:"9",x2:"22",y2:"23",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"var(--color-electric-blue)"}),m.jsx("stop",{offset:"1",stopColor:"var(--color-vivid-purple)"})]})]})]}),m.jsx("span",{className:"about-lockup-word",children:"dreamcontext"})]}),m.jsxs("h1",{className:"about-title",children:["The persistent brain for",m.jsx("span",{className:"about-title-accent",children:" AI natives."})]}),m.jsxs("p",{className:"about-lead",children:["It remembers every decision you made, knows how your project is structured, and is learning to act on that knowledge — so every session starts ",m.jsx("em",{children:"ready"})," instead of blind. Built for founders and builders, technical or not."]}),m.jsxs("div",{className:"about-compat",children:[m.jsx("span",{className:"about-compat-mark","aria-hidden":"true",children:"✓"}),"Works with ",m.jsx("strong",{children:"Claude Code"})]}),m.jsxs("div",{className:"about-cta-row",children:[m.jsx("code",{className:"about-command",children:"npm i -g dreamcontext"}),m.jsx("a",{className:"about-link-btn",href:"https://www.npmjs.com/package/dreamcontext",target:"_blank",rel:"noreferrer",children:"npm ↗"}),m.jsx("a",{className:"about-link-btn about-link-btn--ghost",href:"https://github.com/meanllbrl/dreamcontext",target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),m.jsxs("div",{className:"about-hero-media",children:[m.jsx("div",{className:"about-hero-aura","aria-hidden":"true"}),m.jsxs("video",{className:"about-hero-video",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,poster:"/media/brain-hero.png",children:[m.jsx("source",{src:"/media/brain.webm",type:"video/webm"}),m.jsx("source",{src:"/media/brain.mp4",type:"video/mp4"})]})]})]})}function Wst(){return m.jsxs("section",{className:"about-section",children:[m.jsx("p",{className:"about-kicker",children:"The problem"}),m.jsx("h2",{className:"about-h2",children:"Your project is bigger than anyone can hold."}),m.jsxs("p",{className:"about-section-lead",children:["dreamcontext isn't a memory file. It builds a deep understanding of your whole project — the company, the codebase, even how you work — then ",m.jsx("em",{children:"surfaces what's hiding"}),": the scattered decisions, the forgotten reasons, the connections no one wrote down. Because it never forgets and sees the whole graph, the agent sometimes understands your project better than you do."]}),m.jsxs("div",{className:"about-contrast",children:[m.jsxs("div",{className:"about-contrast-card about-contrast-card--bad",children:[m.jsx("span",{className:"about-contrast-tag",children:"Without dreamcontext"}),m.jsxs("ul",{children:[m.jsx("li",{children:"Decisions scatter across chats, commits, and your head"}),m.jsx("li",{children:`The "why" behind last month's choice is already gone`}),m.jsx("li",{children:"You re-explain the project from scratch every session"}),m.jsx("li",{children:"Blind to the connections between what you've decided"})]})]}),m.jsxs("div",{className:"about-contrast-card about-contrast-card--good",children:[m.jsx("span",{className:"about-contrast-tag",children:"With dreamcontext"}),m.jsxs("ul",{children:[m.jsx("li",{children:"Deep understanding of the whole project, across every session"}),m.jsx("li",{children:"Surfaces the hidden links between scattered decisions"}),m.jsx("li",{children:"Holds the whole picture — company, code, and work-life context"}),m.jsx("li",{children:"Gets sharper every time it consolidates what changed"})]})]})]})]})}function Gst(i,e,r){const n=r*.6,o=Math.max(6,Math.floor((e-r*2)/n));if(i.length<=o)return[i];const c=[];let h="";const u=(d,f)=>{const g=h?h+f+d:d;h&&g.length>o?(c.push(h),h=d):h=g};return i.split(" · ").forEach((d,f)=>{const g=f===0?"":" · ";d.length<=o?u(d,g):d.split(" ").forEach((x,y)=>u(x,y===0?g:" "))}),h&&c.push(h),c}function jm({spec:i,className:e,size:r="full"}){const a=P.useId().replace(/[^a-zA-Z0-9_-]/g,""),o=`fd-node-${a}`,c=`fd-dot-${a}`,h=r==="mini"?5:7;return m.jsx("div",{className:`fd fd--${r} ${e??""}`,role:"img","aria-label":i.ariaLabel,children:m.jsxs("svg",{viewBox:i.viewBox,preserveAspectRatio:"xMidYMid meet",className:"fd-svg",children:[m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:o,x1:"0",y1:"0",x2:"0",y2:"1",children:[m.jsx("stop",{offset:"0",className:"fd-node-grad-a"}),m.jsx("stop",{offset:"1",className:"fd-node-grad-b"})]}),m.jsxs("radialGradient",{id:c,children:[m.jsx("stop",{offset:"0",className:"fd-dot-core"}),m.jsx("stop",{offset:"0.45",className:"fd-dot-mid"}),m.jsx("stop",{offset:"1",className:"fd-dot-edge"})]})]}),m.jsx("g",{className:"fd-wires",fill:"none",children:i.edges.map(u=>m.jsxs("g",{children:[m.jsx("path",{d:u.d,className:`fd-wire${u.dashed?" fd-wire--dashed":""}`}),u.comet!==!1&&m.jsx("circle",{cx:"0",cy:"0",r:h,className:"fd-comet-dot",fill:`url(#${c})`,style:{offsetPath:`path('${u.d}')`,animationDelay:`${u.delay??0}s`,animationDuration:`${u.dur??2.6}s`}}),u.label&&m.jsx("text",{x:u.label.x,y:u.label.y,className:"fd-label",transform:u.label.rotate!==void 0?`rotate(${u.label.rotate} ${u.label.x} ${u.label.y})`:void 0,children:u.label.text})]},u.id))}),i.nodes.map(u=>{const d=u.x+u.w/2,f=u.y+u.h/2,g=u.sub==null?[]:Array.isArray(u.sub)?u.sub:u.glyph?[u.sub]:Gst(u.sub,u.w,r==="mini"?10:12),x=15,y=u.glyph?f+6:g.length?f-8-(g.length-1)*(x/2):f,v=u.glyph?u.y+u.h-16:y+22;return m.jsxs("g",{className:`fd-node fd-node--${u.variant??"plain"}${u.breathe?" fd-node--breathe":""}`,children:[m.jsx("rect",{x:u.x,y:u.y,width:u.w,height:u.h,rx:"14",fill:`url(#${o})`,style:u.breathe&&u.breatheDelay!==void 0?{animationDelay:`${u.breatheDelay}s`}:void 0}),u.glyph&&m.jsx("text",{x:d,y:u.y+26,className:"fd-region-glyph",children:u.glyph}),m.jsx("text",{x:d,y,className:"fd-node-title",children:u.title}),g.length>0&&m.jsx("text",{x:d,y:v,className:"fd-node-sub",children:g.map((C,_)=>m.jsx("tspan",{x:d,dy:_===0?0:x,children:C},_))})]},u.id)})]})})}function sn(i,e,r,n){const a=(e+n)/2;return`M ${i} ${e} C ${i} ${a}, ${r} ${a}, ${r} ${n}`}const c_=[{file:"soul",region:"Identity",glyph:"◆"},{file:"user",region:"Episodic",glyph:"◉"},{file:"memory",region:"Semantic",glyph:"✦"},{file:"knowledge",region:"Procedural",glyph:"⚙"},{file:"state",region:"Working",glyph:"▦"},{file:"data-structures",region:"Schema",glyph:"▤"},{file:"skills",region:"Capabilities",glyph:"✧"},{file:"sub-agents",region:"Workers",glyph:"⬡"}],gl=600,Dm=250,SD=92,Hl=4,PA=(1200-Hl*Dm)/(Hl+1),h_=196,Yst=320,Kst=Yst-h_,Vst=120,TD=470,Xst=548,qA=632;function ED(i){return PA+i*(Dm+PA)}function ND(i){return ED(i)+Dm/2}function AD(i){return h_+i*Kst}const Zst=c_.map((i,e)=>{const r=e%Hl,n=Math.floor(e/Hl);return{id:`cat-${i.file}`,x:ED(r),y:AD(n),w:Dm,h:SD,title:i.file,sub:i.region,glyph:i.glyph,variant:"region",breathe:!0,breatheDelay:e*.18}}),Qst=c_.slice(0,Hl).map((i,e)=>({id:`fan-${e}`,d:sn(gl,Vst,ND(e),h_),travel:220,delay:e*.18,dur:2.6})),Jst=c_.map((i,e)=>{const r=e%Hl,n=Math.floor(e/Hl);return{id:`conv-${i.file}`,d:sn(ND(r),AD(n)+SD,gl,TD),travel:300,delay:.5+e*.12,dur:2.8}}),tot={viewBox:"0 0 1200 780",ariaLabel:"How dreamcontext works: a SessionStart hook preloads eight context categories — identity, episodic, semantic, procedural, working, schema, capabilities and workers — with zero tool calls. The agent then works with the whole picture, and RemSleep parallel specialists consolidate the session and feed the distilled knowledge back into the context categories. The loop is the product.",nodes:[{id:"hook",x:gl-215,y:40,w:430,h:80,title:"SessionStart hook fires",sub:"preloads context · 0 tool calls",variant:"hook"},...Zst,{id:"agent",x:gl-250,y:TD,w:500,h:78,title:"Your agent works with the whole picture",sub:"no re-exploring · no blind search spiral",variant:"agent"},{id:"rem",x:gl-200,y:qA,w:400,h:78,title:"RemSleep — parallel specialists",sub:"multi-agent consolidation",variant:"rem"}],edges:[...Qst,...Jst,{id:"agent-rem",d:`M ${gl} ${Xst} L ${gl} ${qA}`,travel:90,delay:1.6,dur:1.8},{id:"feedback",d:"M 800 671 C 1140 671, 1170 470, 1170 300 C 1170 170, 1110 170, 1010 170",dashed:!0,travel:520,delay:0,dur:4.2,label:{text:"consolidates & feeds back",x:1180,y:420,rotate:90}}]},Ia=550,Fm=300,MD=116,UA=3,HA=(1100-UA*Fm)/(UA+1),u_=280,eot=196,BD=470,iot=540,WA=596;function LD(i){return HA+i*(Fm+HA)}function OD(i){return LD(i)+Fm/2}const d_=[{id:"sleep-tasks",title:"sleep-tasks",sub:"state/*.md tasks"},{id:"sleep-state",title:"sleep-state",sub:"soul · user · memory · core 3-6 · data-structures · changelog · releases"},{id:"sleep-product",title:"sleep-product",sub:"knowledge/ + features/ · conditional"}],rot=d_.map((i,e)=>({id:i.id,x:LD(e),y:u_,w:Fm,h:MD,title:i.title,sub:i.sub,variant:"region",breathe:!0,breatheDelay:e*.25})),not=d_.map((i,e)=>({id:`fan-${i.id}`,d:sn(Ia,eot,OD(e),u_),travel:200,delay:e*.3,dur:2.4})),aot=d_.map((i,e)=>({id:`conv-${i.id}`,d:sn(OD(e),u_+MD,Ia,BD),travel:200,delay:.9+e*.2,dur:2.4})),sot={viewBox:"0 0 1100 680",ariaLabel:"Sleep consolidation: sessions accumulate sleep debt; running sleep start fans out to three parallel specialists — sleep-tasks updates task files, sleep-state updates core files, changelog and releases, and sleep-product conditionally updates knowledge and feature docs. Their reports converge into updated system knowledge, then sleep done resets the debt.",nodes:[{id:"debt",x:Ia-230,y:36,w:460,h:76,title:"Sessions accumulate → sleep debt",sub:"Alert · Drowsy · Sleepy · Must Sleep",variant:"accent"},{id:"sleep-start",x:Ia-130,y:132,w:260,h:64,title:"sleep start",sub:"pins the epoch",variant:"hook"},...rot,{id:"converge",x:Ia-220,y:BD,w:440,h:70,title:"system knowledge updated",sub:"reports stitched into one summary",variant:"agent"},{id:"sleep-done",x:Ia-130,y:WA,w:260,h:64,title:"sleep done",sub:"debt reset",variant:"rem"}],edges:[{id:"debt-start",d:`M ${Ia} 112 L ${Ia} 132`,travel:26,delay:0,dur:1.4},...not,...aot,{id:"converge-done",d:`M ${Ia} ${iot} L ${Ia} ${WA}`,travel:64,delay:1.8,dur:1.8}]},w1=230,RD=230,GA=132,S1=[{id:"prompt",x:40,title:"Your prompt",sub:"any language",variant:"hook"},{id:"bm25",x:320,title:"BM25F keyword match",sub:"field-weighted · stemming · synonyms",variant:"region"},{id:"haiku",x:600,title:"Haiku recall",sub:"smallest cloud agent · 0-3 docs · BM25 fallback",variant:"region"},{id:"snapshot",x:880,title:"SessionStart snapshot",sub:"warm + cold knowledge · features · index · pinned",variant:"rem"}],oot=S1.map(i=>({id:i.id,x:i.x,y:w1-GA/2,w:RD,h:GA,title:i.title,sub:i.sub,variant:i.variant})),lot=S1.slice(0,-1).map((i,e)=>{const r=S1[e+1],n=i.x+RD,a=r.x;return{id:`pipe-${i.id}`,d:`M ${n} ${w1} L ${a} ${w1}`,travel:a-n,delay:e*.4,dur:2.2}}),cot={viewBox:"0 0 1150 460",ariaLabel:"Memory recall pipeline: your prompt is matched by field-weighted BM25F keyword search with stemming and synonyms; a small Haiku cloud agent picks zero to three directly relevant docs (falling back to BM25 when unavailable); and the SessionStart snapshot assembles warm and cold knowledge, features, the index and pinned docs.",nodes:oot,edges:lot},hot=[{n:"01",title:"It loads",body:"A SessionStart hook preloads the whole project picture — soul, user, memory, knowledge and state, plus data-structures, skills and sub-agents — before the agent makes a single tool call."},{n:"02",title:"It works",body:"With identity, history, procedures, schema and capabilities already in context, your agent works against the real project — no re-exploring, no blind search spiral, no re-teaching what it learned last time."},{n:"03",title:"It sleeps",body:"RemSleep is multi-agent: parallel specialists consolidate the session in their own domains and feed the distilled knowledge back into those context files — so the next session starts even sharper."}];function uot(){return m.jsxs("section",{className:"about-section",children:[m.jsx("p",{className:"about-kicker",children:"How it works"}),m.jsx("h2",{className:"about-h2",children:"A brain that loads, works, and sleeps — across your whole system."}),m.jsxs("p",{className:"about-section-lead",children:["Three moves, repeated every session. A hook preloads the entire context set with"," ",m.jsx("em",{children:"zero tool calls"}),", your agent works with the whole picture, and a multi-agent RemSleep cycle consolidates what changed. The loop is the product."]}),m.jsx(jm,{spec:tot}),m.jsx("div",{className:"hiw2-steps",children:hot.map(i=>m.jsxs("div",{className:"hiw2-step",children:[m.jsx("span",{className:"hiw2-step-n",children:i.n}),m.jsx("h3",{className:"hiw2-step-title",children:i.title}),m.jsx("p",{className:"hiw2-step-body",children:i.body})]},i.n))})]})}const dot=[{level:"Alert",range:"0–3",note:"fresh — nothing to consolidate yet"},{level:"Drowsy",range:"4–6",note:"consolidation offered"},{level:"Sleepy",range:"7–9",note:"advisory note prepended"},{level:"Must Sleep",range:"10+",note:"critical directive prepended"}],fot=[{name:"sleep-tasks",domain:"state/*.md — logs progress, bumps statuses, reconciles task bodies and workflow nodes.",always:!0},{name:"sleep-state",domain:"soul · user · memory · data-structures · CHANGELOG · RELEASES — surgical core-file updates with an anti-bloat sweep.",always:!0},{name:"sleep-product",domain:"knowledge/ + core/features/ — writes and refreshes knowledge files and feature PRDs.",always:!1}];function pot(){return m.jsxs("section",{className:"about-section",children:[m.jsx("p",{className:"about-kicker",children:"How sleep works"}),m.jsx("h2",{className:"about-h2",children:"It sleeps to remember — like REM, but for your project."}),m.jsxs("p",{className:"about-section-lead",children:["Every session adds ",m.jsx("em",{children:"sleep debt"}),". When it builds up, one command fans out to parallel specialists that fold what changed back into the brain — then resets the meter."]}),m.jsx(jm,{spec:sot}),m.jsxs("div",{className:"sleepf-cards",children:[m.jsxs("article",{className:"sleepf-card sleepf-card--debt",children:[m.jsx("h3",{className:"sleepf-card-title",children:"Debt accumulates across sessions"}),m.jsx("p",{className:"sleepf-card-body",children:"Each session scores by how much changed; the score adds to a running debt total that crosses graduated thresholds, so consolidation urgency is never ambiguous."}),m.jsx("ul",{className:"sleepf-debt",children:dot.map(i=>m.jsxs("li",{className:"sleepf-debt-row",children:[m.jsx("span",{className:"sleepf-debt-level",children:i.level}),m.jsx("span",{className:"sleepf-debt-range",children:i.range}),m.jsx("span",{className:"sleepf-debt-note",children:i.note})]},i.level))})]}),m.jsxs("article",{className:"sleepf-card",children:[m.jsx("h3",{className:"sleepf-card-title",children:"Specialists run in parallel"}),m.jsxs("p",{className:"sleepf-card-body",children:[m.jsx("code",{className:"sleepf-cmd",children:"sleep start"})," pins the epoch, then the main agent dispatches the specialists together in a single message — each updating a distinct knowledge domain, never editing outside it."]}),m.jsx("ul",{className:"sleepf-specialists",children:fot.map(i=>m.jsxs("li",{className:"sleepf-spec-row",children:[m.jsx("code",{className:"sleepf-spec-name",children:i.name}),m.jsx("span",{className:`sleepf-spec-badge${i.always?" sleepf-spec-badge--always":""}`,children:i.always?"always fires":"conditional"}),m.jsx("span",{className:"sleepf-spec-domain",children:i.domain})]},i.name))})]}),m.jsxs("article",{className:"sleepf-card sleepf-card--done",children:[m.jsxs("h3",{className:"sleepf-card-title",children:[m.jsx("code",{className:"sleepf-cmd",children:"sleep done"})," resets the debt"]}),m.jsxs("p",{className:"sleepf-card-body",children:["Their reports converge into one stitched summary of updated system knowledge. The main agent calls ",m.jsx("code",{className:"sleepf-cmd",children:"sleep done"}),", which records the consolidation and resets the debt to zero — ready for the next cycle."]})]})]})]})}const got=[{n:"01",tag:"Keyword match",title:"Field-weighted BM25F",body:"Your prompt is matched against the corpus — knowledge, features, tasks, memory and changelog — with field weighting, stemming and synonym expansion. It runs locally in under 100ms, with zero token overhead."},{n:"02",tag:"Intent recall",title:"The Haiku agent",body:"The smallest cloud agent reads your full prompt and a relevance-ranked corpus index, then returns only the 0–3 documents that are directly relevant — resolving intent across languages. If it is unavailable, the pipeline falls back to raw BM25."},{n:"03",tag:"Session start",title:"The snapshot assembles",body:"At SessionStart a hook composes the knowledge distribution — warm and cold knowledge, the features summary, the knowledge index, and pinned docs — and hands it to the agent so it begins each session already oriented."}];function mot(){return m.jsxs("section",{className:"about-section",children:[m.jsx("p",{className:"about-kicker",children:"How the system remembers"}),m.jsx("h2",{className:"about-h2",children:"The right memory, surfaced before you ask."}),m.jsxs("p",{className:"about-section-lead",children:["Remembering is a read pipeline. Three stages take a prompt — or a fresh session — and put exactly the relevant context in front of the agent, so it works on what you actually meant. It ",m.jsx("em",{children:"augments"})," the agent's reach; you stay in the driver's seat."]}),m.jsx(jm,{spec:cot}),m.jsx("div",{className:"recallf-stages",children:got.map(i=>m.jsxs("article",{className:"recallf-stage",children:[m.jsxs("div",{className:"recallf-stage-head",children:[m.jsx("span",{className:"recallf-stage-n",children:i.n}),m.jsx("span",{className:"recallf-stage-tag",children:i.tag})]}),m.jsx("h3",{className:"recallf-stage-title",children:i.title}),m.jsx("p",{className:"recallf-stage-body",children:i.body})]},i.n))})]})}const YA=[{file:"0.soul",glyph:"◆",region:"Identity",brain:"sense of self",desc:"Who it is — purpose, principles, and the rules it must never break."},{file:"1.user",glyph:"◉",region:"Episodic",brain:"lived history",desc:"What you did and decided, session over session."},{file:"2.memory",glyph:"✦",region:"Semantic",brain:"durable facts",desc:"What's true about the project — facts that hold across every session."},{file:"data-structures/",glyph:"▤",region:"Schema",brain:"mental models",desc:"The shapes of your data — the structures everything else is built on."},{file:"knowledge/",glyph:"⚙",region:"Procedural",brain:"learned skill",desc:"How to do things here — patterns, recipes, and hard-won know-how.",rides:{label:"skills",desc:"capabilities it can pick up and apply"}},{file:"state/",glyph:"▦",region:"Working",brain:"in attention",desc:"What's in flight right now — tasks, features, and the sleep cycle.",rides:{label:"sub-agents",desc:"workers it directs under your steer"}}];function yot(){return m.jsxs("section",{className:"about-section arch","aria-labelledby":"arch-heading",children:[m.jsx("p",{className:"about-kicker",children:"The architecture"}),m.jsx("h2",{className:"about-h2",id:"arch-heading",children:"Memory, organized like a mind."}),m.jsx("p",{className:"about-section-lead",children:"Knowledge isn't one flat file. It's laid down in strata — each a purpose-built region that mirrors a part of the brain — so the agent reaches for the right kind of memory at the right moment."}),m.jsxs("div",{className:"arch-stage",role:"img","aria-label":"A cross-section of the project's memory, stacked as layered brain regions.",children:[m.jsx("div",{className:"arch-glow","aria-hidden":"true"}),m.jsx("ol",{className:"arch-stack",children:YA.map((i,e)=>m.jsxs("li",{className:"arch-stratum",style:{"--i":e,"--n":YA.length},children:[m.jsx("div",{className:"arch-edge","aria-hidden":"true"}),m.jsxs("div",{className:"arch-face",children:[m.jsx("span",{className:"arch-glyph","aria-hidden":"true",children:i.glyph}),m.jsxs("div",{className:"arch-meta",children:[m.jsxs("div",{className:"arch-meta-top",children:[m.jsx("code",{className:"arch-file",children:i.file}),m.jsx("span",{className:"arch-region",children:i.region}),m.jsx("span",{className:"arch-brain",children:i.brain})]}),m.jsx("p",{className:"arch-desc",children:i.desc})]}),i.rides?m.jsxs("div",{className:"arch-rides",children:[m.jsx("span",{className:"arch-rides-plus","aria-hidden":"true",children:"+"}),m.jsx("span",{className:"arch-rides-label",children:i.rides.label}),m.jsx("span",{className:"arch-rides-desc",children:i.rides.desc})]}):null]})]},i.file))})]}),m.jsxs("p",{className:"arch-foot",children:["Six strata, one mind — read top-down, the agent goes from"," ",m.jsx("em",{children:"who it is"})," to ",m.jsx("em",{children:"what it's doing right now"}),"."]})]})}function bot(i){return"base"in i}function KA({item:i}){const e=bot(i)?"pack":"standalone",r=e==="pack"?"pack":i.tags[0]??"standalone";return m.jsxs("li",{className:"marquee-card",children:[m.jsx("span",{className:`marquee-chip marquee-chip--${e}`,children:r}),m.jsx("span",{className:"marquee-card-name",children:i.name}),i.description&&m.jsx("p",{className:"marquee-card-desc",children:i.description})]})}function xot(){const{data:i,isLoading:e,isError:r}=kD(),n=P.useMemo(()=>i?[...i.packs,...i.standalone]:[],[i]),a=Math.min(60,Math.max(40,n.length*2.2)),o=m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"about-kicker",children:"Skill packs"}),m.jsx("h2",{className:"about-h2",children:"A growing library of expertise."}),m.jsx("p",{className:"about-section-lead",children:"The agent loads the right pack for the task — and more are added all the time."})]});return e?m.jsxs("section",{className:"about-section",children:[o,m.jsx("div",{className:"marquee-viewport marquee-viewport--static","aria-hidden":"true",children:m.jsx("ul",{className:"marquee-track marquee-track--skeleton",children:Array.from({length:6}).map((c,h)=>m.jsx("li",{className:"marquee-card marquee-card--skeleton"},h))})}),m.jsx("p",{className:"marquee-status",children:"Loading packs…"})]}):r||n.length===0?m.jsx("section",{className:"about-section",children:o}):m.jsxs("section",{className:"about-section",children:[o,m.jsxs("div",{className:"marquee-viewport",style:{"--marquee-duration":`${a}s`},children:[m.jsx("ul",{className:"marquee-track",children:n.map(c=>m.jsx(KA,{item:c},`a-${c.name}`))}),m.jsx("ul",{className:"marquee-track marquee-track--dup","aria-hidden":"true",children:n.map(c=>m.jsx(KA,{item:c},`b-${c.name}`))})]})]})}const Ho="0 0 360 170";function jD(i,e,r){return{viewBox:Ho,ariaLabel:i,nodes:[{id:"a",x:20,y:50,w:140,h:70,title:e.title,sub:e.sub,variant:e.variant??"hook"},{id:"b",x:200,y:50,w:140,h:70,title:r.title,sub:r.sub,variant:r.variant??"rem"}],edges:[{id:"a-b",d:"M 160 85 L 200 85",travel:40,dur:2}]}}const vot={viewBox:Ho,ariaLabel:"Context snapshot: a SessionStart hook injects the soul, memory, active tasks and knowledge index straight into the agent with zero tool calls.",nodes:[{id:"hook",x:110,y:12,w:140,h:50,title:"SessionStart",sub:"0 tool calls",variant:"hook"},{id:"brain",x:16,y:100,w:150,h:56,title:"project brain",sub:"soul · memory · tasks",variant:"region",breathe:!0},{id:"agent",x:194,y:100,w:150,h:56,title:"your agent",sub:"oriented",variant:"agent"}],edges:[{id:"h-b",d:sn(180,62,91,100),travel:80,dur:2.2},{id:"b-a",d:"M 166 128 L 194 128",travel:28,dur:1.6,delay:.5}]},Cot={viewBox:Ho,ariaLabel:"Memory recall: a question is scored by BM25 keyword match, optionally refined by a small Haiku agent, returning the most relevant docs in under 100 milliseconds.",nodes:[{id:"q",x:14,y:52,w:96,h:66,title:"question",sub:"any language",variant:"hook"},{id:"bm25",x:132,y:52,w:96,h:66,title:"BM25",sub:"+ Haiku",variant:"region",breathe:!0},{id:"docs",x:250,y:52,w:96,h:66,title:"top docs",sub:"<100ms",variant:"rem"}],edges:[{id:"q-b",d:"M 110 85 L 132 85",travel:22,dur:1.6},{id:"b-d",d:"M 228 85 L 250 85",travel:22,dur:1.6,delay:.4}]},_ot={viewBox:Ho,ariaLabel:"RemSleep: accumulated sleep debt triggers a fan-out to three parallel specialists that consolidate the session and reset the meter.",nodes:[{id:"debt",x:108,y:10,w:144,h:46,title:"sleep debt",sub:"crosses threshold",variant:"accent"},{id:"s1",x:14,y:92,w:100,h:50,title:"sleep-tasks",variant:"region",breathe:!0},{id:"s2",x:130,y:92,w:100,h:50,title:"sleep-state",variant:"region",breathe:!0,breatheDelay:.2},{id:"s3",x:246,y:92,w:100,h:50,title:"sleep-product",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"d-1",d:sn(180,56,64,92),travel:90,dur:2.2},{id:"d-2",d:"M 180 56 L 180 92",travel:36,dur:1.8,delay:.2},{id:"d-3",d:sn(180,56,296,92),travel:90,dur:2.2,delay:.4}]},kot={viewBox:Ho,ariaLabel:"Brain-region core files: soul, user, memory and the knowledge index sit in a numbered band the snapshot always loads.",nodes:[{id:"soul",x:14,y:24,w:158,h:54,title:"0.soul",sub:"identity · rules",variant:"region",breathe:!0},{id:"mem",x:188,y:24,w:158,h:54,title:"2.memory",sub:"decisions · issues",variant:"region",breathe:!0,breatheDelay:.2},{id:"user",x:14,y:96,w:158,h:54,title:"1.user",sub:"preferences",variant:"region",breathe:!0,breatheDelay:.4},{id:"know",x:188,y:96,w:158,h:54,title:"knowledge",sub:"index · pinned",variant:"region",breathe:!0,breatheDelay:.6}],edges:[]},wot={viewBox:Ho,ariaLabel:"Tag-based relation graph: knowledge, features and tasks link through shared tags into a navigable brain view.",nodes:[{id:"tag",x:110,y:58,w:140,h:54,title:"shared tag",sub:"the edge",variant:"accent",breathe:!0},{id:"k",x:14,y:10,w:110,h:44,title:"knowledge",variant:"region"},{id:"f",x:236,y:10,w:110,h:44,title:"features",variant:"region"},{id:"t",x:125,y:122,w:110,h:40,title:"tasks",variant:"region"}],edges:[{id:"k-tag",d:sn(69,54,150,58),travel:90,dur:2.4},{id:"f-tag",d:sn(291,54,210,58),travel:90,dur:2.4,delay:.4},{id:"t-tag",d:"M 180 122 L 180 112",travel:12,dur:1.6,delay:.8}]},Sot={viewBox:Ho,ariaLabel:"Task management: each task carries a LIFO changelog viewable as a Kanban board, an Eisenhower matrix, or RICE-scored.",nodes:[{id:"task",x:16,y:50,w:130,h:70,title:"task .md",sub:"LIFO changelog",variant:"hook"},{id:"views",x:200,y:24,w:144,h:44,title:"Kanban",variant:"region",breathe:!0},{id:"eis",x:200,y:74,w:144,h:40,title:"Eisenhower",variant:"region",breathe:!0,breatheDelay:.2},{id:"rice",x:200,y:120,w:144,h:40,title:"RICE score",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"t-k",d:sn(146,85,272,46),travel:90,dur:2.2},{id:"t-e",d:"M 146 85 L 200 94",travel:56,dur:2,delay:.3},{id:"t-r",d:sn(146,85,272,140),travel:90,dur:2.2,delay:.6}]},Tot={viewBox:Ho,ariaLabel:"Sub-agents: the main agent fans work out to briefed specialist sub-agents that report back, keeping the main context small.",nodes:[{id:"main",x:110,y:12,w:140,h:46,title:"main agent",variant:"agent"},{id:"a",x:16,y:96,w:96,h:50,title:"reviewer",variant:"region",breathe:!0},{id:"b",x:132,y:96,w:96,h:50,title:"planner",variant:"region",breathe:!0,breatheDelay:.2},{id:"c",x:248,y:96,w:96,h:50,title:"researcher",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"m-a",d:sn(180,58,64,96),travel:90,dur:2.2},{id:"m-b",d:"M 180 58 L 180 96",travel:38,dur:1.8,delay:.2},{id:"m-c",d:sn(180,58,296,96),travel:90,dur:2.2,delay:.4}]},Eot={viewBox:"0 0 400 232",ariaLabel:"Council: three persona sub-agents debate each other in a cycle — each sees the others’ reasoning, round after round — then the debate converges into a synthesizer that writes one decision report.",nodes:[{id:"p1",x:70,y:14,w:96,h:46,title:"persona",sub:"lens A",variant:"region",breathe:!0},{id:"p2",x:18,y:118,w:96,h:46,title:"persona",sub:"lens B",variant:"region",breathe:!0,breatheDelay:.25},{id:"p3",x:130,y:118,w:96,h:46,title:"persona",sub:"lens C",variant:"region",breathe:!0,breatheDelay:.5},{id:"syn",x:286,y:70,w:104,h:72,title:"synthesizer",sub:"decision report",variant:"rem"}],edges:[{id:"p1-p2",d:"M 96 60 L 80 118",travel:60,dur:1.8},{id:"p2-p3",d:"M 114 141 L 130 141",travel:16,dur:1.1,delay:.3,label:{text:"↻ rounds",x:118,y:95}},{id:"p3-p1",d:"M 178 118 L 152 60",travel:60,dur:1.8,delay:.6},{id:"p1-syn",d:sn(166,40,286,96),travel:130,dur:2.4,delay:.4},{id:"p3-syn",d:sn(226,136,286,116),travel:76,dur:2.2,delay:.9}]},Not={viewBox:"0 0 1000 330",ariaLabel:"Goal-skill orchestration: a goal-planner drafts a file-by-file plan; parallel reviewers vote SOLID or NEEDS_WORK and loop back to the planner until solid; the plan is persisted as a task; a goal-implementer builds to the acceptance criteria; a code reviewer and then a goal-validator each gate the result, looping back to the implementer on FAIL; every gate is capped at three retries before escalating to the user, after which the work ships as a task in review.",nodes:[{id:"plan",x:20,y:40,w:140,h:86,title:"planner",sub:"file-by-file plan",variant:"agent"},{id:"plan-review",x:184,y:40,w:140,h:86,title:"plan review",sub:"SOLID · NEEDS_WORK",variant:"region",breathe:!0},{id:"impl",x:348,y:40,w:140,h:86,title:"implementer",sub:"builds to criteria",variant:"agent"},{id:"code-review",x:512,y:40,w:140,h:86,title:"code review",sub:"PASS · FAIL",variant:"region",breathe:!0,breatheDelay:.2},{id:"validate",x:676,y:40,w:140,h:86,title:"validator",sub:"tests · PASS · FAIL",variant:"region",breathe:!0,breatheDelay:.4},{id:"done",x:840,y:40,w:140,h:86,title:"shipped",sub:"task → in_review",variant:"rem"}],edges:[{id:"f1",d:"M 160 83 L 184 83",dur:2},{id:"f2",d:"M 324 83 L 348 83",dur:2,delay:.2},{id:"f3",d:"M 488 83 L 512 83",dur:2,delay:.1},{id:"f4",d:"M 652 83 L 676 83",dur:2,delay:.2},{id:"f5",d:"M 816 83 L 840 83",dur:2,delay:.3},{id:"l1",d:"M 254 126 C 254 196, 90 196, 90 126",dashed:!0,dur:3.2,delay:.5,label:{text:"↻ ≤3",x:172,y:186}},{id:"l2",d:"M 582 126 C 582 196, 418 196, 418 126",dashed:!0,dur:3.2,delay:.7,label:{text:"↻ ≤3",x:500,y:186}},{id:"l3",d:"M 746 126 C 746 262, 418 262, 418 126",dashed:!0,dur:3.6,delay:.9,label:{text:"↻ ≤3",x:582,y:252}}]},Aot=jD("Skill packs: curated domain packs install a base skill plus on-demand sub-skills into the agent.",{title:"skill pack",sub:"engineering · design · growth",variant:"hook"},{title:"agent gains",sub:"base + sub-skills",variant:"rem"}),Mot=jD("Knowledge base: tagged knowledge files are indexed every session; pinned files load warm, the rest load cold on demand.",{title:"knowledge/*.md",sub:"tagged · indexed",variant:"region"},{title:"snapshot",sub:"warm + cold",variant:"rem"}),DD=[{id:"context-snapshot",title:"Context snapshot",tagline:"Every session starts with the whole brain, zero tool calls.",body:"A SessionStart hook injects your project identity, user preferences, memory, active tasks and the knowledge index straight into the agent — so it orients instantly instead of grepping around blind.",defaultOpen:!0,tag:"Memory",flow:vot},{id:"memory-recall",title:"Memory recall",tagline:'Ask "where did we decide X?" and get an answer in under 100ms.',body:"A deterministic BM25 search ranks every knowledge file, PRD, task, memory entry and changelog line — optionally sharpened by a small Haiku agent — so the right context surfaces without scrolling or grepping. Handles English, Turkish and mixed queries.",defaultOpen:!0,tag:"Memory",flow:Cot},{id:"rem-sleep",title:"RemSleep consolidation",tagline:"It sleeps to remember — multi-agent consolidation, like REM.",body:"Sessions accumulate sleep debt; when it builds up, one command fans out to three parallel specialists that fold what changed back into the brain, then resets the meter. Knowledge compounds instead of decaying.",defaultOpen:!0,tag:"Sleep",flow:_ot},{id:"brain-regions",title:"Brain-region core files",tagline:"A numbered band of core files — soul, user, memory, knowledge.",body:"The brain is a handful of small, always-loaded files: identity and rules, user preferences, durable memory, and the knowledge index. Kept lightweight on purpose so the snapshot stays under budget every session.",defaultOpen:!0,tag:"Memory",flow:kot},{id:"knowledge-base",title:"Knowledge base",tagline:"Tagged research that loads warm when pinned, cold on demand.",body:"Deep research and domain context live in tagged knowledge files the snapshot indexes every session. Pin the critical ones to load them in full; the rest stay one read away when an agent needs them.",defaultOpen:!0,tag:"Knowledge",flow:Mot},{id:"brain-graph",title:"Relation graph (Brain view)",tagline:"Knowledge, features and tasks linked through shared tags.",body:"A tag-based graph connects every knowledge file, feature and task into one navigable Brain view — so you can see how the parts of a project relate instead of reading them one file at a time.",defaultOpen:!0,tag:"Knowledge",flow:wot},{id:"task-management",title:"Task management",tagline:"LIFO changelogs, viewable as Kanban, Eisenhower or RICE.",body:"Each task is a Markdown file with a LIFO changelog, so any session reads where the last one left off. View the backlog as a Kanban board, triage it on an Eisenhower matrix, or rank it numerically with RICE — Reach × Impact × Confidence ÷ Effort.",defaultOpen:!0,tag:"Tasks",flow:Sot},{id:"skill-packs",title:"Skill packs",tagline:"Curated, installable skills by domain — one command.",body:"Extend an agent with domain packs — engineering, design, growth, brand-voice and more — each a base skill plus on-demand sub-skills. Install interactively or name a pack directly; prerequisites resolve automatically.",defaultOpen:!0,tag:"Skills",flow:Aot},{id:"sub-agents",title:"Sub-agents",tagline:"Fan work out to briefed specialists; keep the main context lean.",body:"The main agent dispatches focused sub-agents — reviewers, planners, researchers — each launched with a lightweight context briefing so it knows the project structure without any tool calls. They report back; the main thread stays small.",defaultOpen:!0,tag:"Agents",flow:Tot},{id:"council",title:"Council",tagline:"Persona sub-agents debate a hard call, a synthesizer decides.",body:"For a non-trivial decision, Council spins up 3–10 persona sub-agents that debate across rounds, see each other's reasoning, then hand off to a dedicated synthesizer that writes one decision report — promotable straight into knowledge.",defaultOpen:!0,tag:"Agents",flow:Eot},{id:"goal-skill",title:"Goal-skill orchestration",tagline:"Plan it, review it, build it, review it, validate it — on a leash.",body:"Turn the main agent into an orchestrator. A goal-planner drafts a file-by-file plan; parallel reviewers vote SOLID or NEEDS_WORK and bounce it back until it holds; the plan is persisted as a task; a goal-implementer builds to the acceptance criteria; then a code reviewer and a goal-validator each gate the result, looping back to the implementer on a fail. Every gate is capped at three retries and escalates to you instead of spinning.",defaultOpen:!0,tag:"Agents",flow:Not},{id:"bookmarking",title:"Bookmarking (salience)",tagline:"High-signal moments tagged so sleep can find them later.",body:"Corrections, error-to-fix turns and decisions are auto-bookmarked during a session, marking the moments worth keeping — so consolidation folds the right learnings into the brain without manual flagging.",defaultOpen:!1,tag:"Memory",glyph:"◈"},{id:"warm-cold-knowledge",title:"Warm vs cold knowledge",tagline:"Pinned files load in full; the rest stay one read away.",body:"Pinned (warm) knowledge is inlined into every snapshot; unpinned (cold) knowledge appears only in the index and loads on demand. The split keeps the always-on context small while nothing gets lost.",defaultOpen:!1,tag:"Knowledge",glyph:"❄"},{id:"feature-prds",title:"Feature PRDs",tagline:"Living docs that capture not just what was built, but why.",body:"Each feature has a PRD with user stories, acceptance criteria and design decisions that update as work progresses — so an agent understands the product surface without reconstructing it from conversation history.",defaultOpen:!1,tag:"Knowledge",glyph:"▤"},{id:"versions-releases",title:"Versions & releases",tagline:"Changelog and release readiness tracked in the brain.",body:"A structured changelog and release notes live alongside the context, so version history and release readiness are part of the brain the agent reads — not an afterthought scattered across commits.",defaultOpen:!1,tag:"Knowledge",glyph:"⎇"},{id:"multi-vault",title:"Multi-vault registry",tagline:"Switch between project brains from one global registry.",body:"A global vault registry tracks every project brain on your machine. List, add and remove vaults, then point the dashboard at any one — so multiple projects each keep their own clean context.",defaultOpen:!1,tag:"Setup",glyph:"▦"},{id:"multi-product",title:"Multi-product support",tagline:"Per-product knowledge auto-injected from the active task.",body:"Monorepos and portfolios get a product namespace: per-product knowledge and data structures, plus automatic injection of the right product's knowledge at session start when the active task carries a product tag.",defaultOpen:!1,tag:"Knowledge",glyph:"◫"},{id:"manifest-install",title:"Manifest install & update",tagline:"Clean upgrades — stale files tracked and removed, not layered.",body:"A manifest tracks every file dreamcontext owns, so updates remove what a new version drops instead of leaving stale agents and configs behind. Includes a one-line install script and an in-session update nudge.",defaultOpen:!1,tag:"Setup",glyph:"⟳"},{id:"project-init",title:"Project initialization",tagline:"Blank repo to agent-aware workspace in under a minute.",body:"One init command scaffolds the whole context directory, detects your tech stack, runs token substitution on the templates, and wires up the Claude Code hooks — no manual setup.",defaultOpen:!1,tag:"Setup",glyph:"⊕"},{id:"control-panel",title:"Control panel",tagline:"Configure platforms, packs and vaults in the browser.",body:"The dashboard control panel closes the loop on configuration — edit platforms and skill packs, see which packs are actually installed on disk, manage vaults, and get notified in-app when a newer version ships.",defaultOpen:!1,tag:"Setup",glyph:"⚙"},{id:"multi-review",title:"Multi-review",tagline:"Route a diff to niche reviewers, get one merged report.",body:"A router classifies a diff by domain and dispatches specialist reviewers — security, frontend, cloud functions, edge cases — in parallel; a coordinator dedupes their findings into a single report. Each specialist reviews against your live project rules.",defaultOpen:!1,tag:"Agents",glyph:"⊜"},{id:"continuous-capture",title:"Continuous capture",tagline:"Session digests and auto-bookmarks, searchable next session.",body:"Transcripts are digested and indexed as you work, so a decision from one session is searchable in the next — before any sleep consolidation runs. Capture is down-weighted so it never crowds out curated knowledge.",defaultOpen:!1,tag:"Memory",glyph:"◌"},{id:"context-gate",title:"Context gate",tagline:"Nudges the agent to load relevant skills before it acts.",body:"A prompt-time hook detects when an installed skill is plausibly relevant and injects a directive to review the full skill list and invoke what fits — deliberately not a pre-selected top-N, so the right skill is never anchored out.",defaultOpen:!1,tag:"Skills",glyph:"⊳"},{id:"auto-dashboard",title:"Auto-open dashboard hook",tagline:"The dashboard surfaces itself when it is worth a look.",body:"A hook can open the dashboard at the right moment so the visual view of tasks, knowledge and the brain is one glance away — without you remembering to launch it.",defaultOpen:!1,tag:"Setup",glyph:"◰"},{id:"post-edit-hook",title:"Post-edit format & typecheck",tagline:"Format and typecheck fire automatically after an edit.",body:"A post-edit hook runs your formatter and type checker right after the agent changes a file, so problems surface immediately instead of piling up — keeping the working tree clean as work proceeds.",defaultOpen:!1,tag:"Setup",glyph:"✓"},{id:"marketing-pack",title:"Marketing pack",tagline:"Brand-voice and growth skills for going to market.",body:"A bundled set of go-to-market skills — brand voice, growth, performance marketing — so the same agent that builds a feature can help position and launch it, on-brand.",defaultOpen:!1,tag:"Skills",glyph:"✦"}],T1=DD.filter(i=>i.defaultOpen),VA=DD.filter(i=>!i.defaultOpen),ta=T1.length,Mx=16,Bot=62,Lot=.72,Oot=40,Rot=140,jot=8;function Dot(){const[i,e]=P.useState(0),r=P.useId(),n=P.useRef([]),a=P.useRef([]),o=P.useRef([]),c=P.useRef(null),h=P.useRef(null),u=P.useRef(null),d=P.useRef(!1),f=P.useRef(0),g=_=>`${r}-tab-${_}`,x=_=>`${r}-panel-${_}`,y=P.useCallback(_=>{const k=Math.max(0,Math.min(ta-1,_));k!==f.current&&(f.current=k,e(k))},[]);P.useLayoutEffect(()=>{const _=c.current,k=h.current;if(!_||!k)return;d.current=window.matchMedia("(prefers-reduced-motion: reduce)").matches;const T=_.closest(".shell-main")??null,N=T??window;let E=0;const B=()=>{E=0;const I=_.getBoundingClientRect(),D=T?T.getBoundingClientRect().top:0,F=I.height-k.offsetHeight;if(F<=0)return;const U=Math.max(0,Math.min(1,(D+Mx-I.top)/F));u.current&&(u.current.style.transform=`scaleX(${U})`);const K=U*(ta-1);for(let z=0;z<ta;z++){const W=a.current[z];if(!W)continue;const j=z-K,H=Math.abs(j);W.style.opacity=String(Math.max(0,1-H/Lot)),W.style.transform=d.current?"none":`translate3d(0, ${j*Oot}px, 0)`;const Y=H<.5;W.style.zIndex=Y?"2":"1",W.style.pointerEvents=Y?"auto":"none";const Z=H<1.05;o.current[z]!==Z&&(o.current[z]=Z,W.classList.toggle("feat-panel--near",Z))}y(Math.round(K))};let O=0;const A=()=>{if(!T)return;const I=_.getBoundingClientRect(),D=I.height-k.offsetHeight;if(D<=0)return;const F=(T.getBoundingClientRect().top+Mx-I.top)/D;if(F<=.012||F>=.988)return;const K=(Math.round(F*(ta-1))/(ta-1)-F)*D;Math.abs(K)<jot||T.scrollTo({top:T.scrollTop+K,behavior:d.current?"auto":"smooth"})},M=()=>{E||(E=requestAnimationFrame(B)),O&&clearTimeout(O),O=window.setTimeout(A,Rot)};return N.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M),B(),()=>{N.removeEventListener("scroll",M),window.removeEventListener("resize",M),E&&cancelAnimationFrame(E),O&&clearTimeout(O)}},[y]);const v=P.useCallback(_=>{const k=c.current,T=h.current,N=k==null?void 0:k.closest(".shell-main");if(!k||!T||!N){y(_);return}const E=k.getBoundingClientRect(),B=E.height-T.offsetHeight;if(B<=0){y(_);return}const A=_/(ta-1)*B-(N.getBoundingClientRect().top+Mx-E.top);N.scrollTo({top:N.scrollTop+A,behavior:d.current?"auto":"smooth"})},[y]);function C(_){var T;let k=f.current;if(_.key==="ArrowDown"||_.key==="ArrowRight")k=(f.current+1)%ta;else if(_.key==="ArrowUp"||_.key==="ArrowLeft")k=(f.current-1+ta)%ta;else if(_.key==="Home")k=0;else if(_.key==="End")k=ta-1;else return;_.preventDefault(),y(k),(T=n.current[k])==null||T.focus(),v(k)}return m.jsxs("section",{className:"about-section feat-section",children:[m.jsx("div",{className:"feat-scroller",ref:c,style:{"--feat-track-h":`${ta*Bot}vh`},children:m.jsxs("div",{className:"feat-sticky",ref:h,children:[m.jsx("p",{className:"about-kicker",children:"Everything inside"}),m.jsx("h2",{className:"about-h2",children:"One brain, many faculties."}),m.jsxs("p",{className:"about-section-lead",children:["Every capability dreamcontext gives your agents — ",m.jsx("em",{children:"scroll to move through them, or pick one."})]}),m.jsxs("div",{className:"feat-spotlight",children:[m.jsxs("div",{className:"feat-rail-wrap",children:[m.jsxs("div",{className:"feat-rail-head","aria-hidden":"true",children:[m.jsxs("span",{className:"feat-rail-step",children:[String(i+1).padStart(2,"0")," ",m.jsxs("i",{children:["/ ",String(ta).padStart(2,"0")]})]}),m.jsx("div",{className:"feat-rail-track",children:m.jsx("span",{className:"feat-rail-fill",ref:u})})]}),m.jsx("div",{className:"feat-rail",role:"tablist","aria-orientation":"vertical","aria-label":"Core faculties",onKeyDown:C,children:T1.map((_,k)=>{const T=k===i;return m.jsxs("button",{ref:N=>{n.current[k]=N},id:g(k),role:"tab",type:"button","aria-selected":T,"aria-controls":x(k),tabIndex:T?0:-1,className:`feat-rail-item${T?" feat-rail-item--active":""}`,onClick:()=>{y(k),v(k)},children:[m.jsx("span",{className:"feat-rail-title",children:_.title}),_.tag&&m.jsx("span",{className:"feat-rail-tag",children:_.tag})]},_.id)})})]}),m.jsx("div",{className:"feat-stage",children:T1.map((_,k)=>m.jsxs("div",{ref:T=>{a.current[k]=T},className:"feat-panel",role:"tabpanel",id:x(k),"aria-labelledby":g(k),"aria-hidden":k!==i,tabIndex:k===i?0:-1,children:[m.jsxs("div",{className:"feat-stage-head",children:[_.tag&&m.jsx("span",{className:"feat-stage-chip",children:_.tag}),m.jsx("h3",{className:"feat-stage-title",children:_.title})]}),m.jsx("p",{className:"feat-stage-body",children:_.body}),_.flow&&m.jsx(jm,{spec:_.flow,className:"feat-stage-flow"})]},_.id))})]})]})}),m.jsxs("div",{className:"feat-more",children:[m.jsxs("div",{className:"feat-more-head",children:[m.jsx("span",{className:"feat-more-label",children:"Everything else"}),m.jsx("span",{className:"feat-more-count",children:VA.length})]}),m.jsx("div",{className:"feat-more-grid",children:VA.map(_=>m.jsxs("div",{className:"feat-more-card",children:[m.jsx("span",{className:"feat-more-glyph","aria-hidden":"true",children:_.glyph??"✦"}),m.jsxs("div",{className:"feat-more-meta",children:[m.jsx("span",{className:"feat-more-title",children:_.title}),m.jsx("span",{className:"feat-more-tagline",children:_.tagline})]})]},_.id))})]})]})}const Fot=[{cmd:"dreamcontext init",hint:"# set up the brain"},{cmd:"dreamcontext dashboard",hint:"# open this dashboard"},{cmd:"dreamcontext sleep",hint:"# consolidate the session"}];function Iot(){return m.jsxs("section",{className:"closing","aria-labelledby":"closing-heading",children:[m.jsx("h2",{className:"closing-title",id:"closing-heading",children:"So — what is this?"}),m.jsxs("p",{className:"closing-body",children:[m.jsx("strong",{children:"dreamcontext"})," is a small CLI that gives your AI coding agents a structured, persistent brain across sessions. It pre-loads what matters, keeps a living map of your project, and consolidates new knowledge as you go — so you stop paying, every single session, to re-teach the agent what it already learned."]}),m.jsx("div",{className:"closing-cmds",role:"list",children:Fot.map(i=>m.jsxs("div",{className:"closing-cmd",role:"listitem",children:[m.jsx("span",{className:"closing-cmd-c","aria-hidden":"true",children:"$"}),m.jsx("span",{className:"closing-cmd-text",children:i.cmd}),m.jsx("span",{className:"closing-cmd-hint",children:i.hint})]},i.cmd))}),m.jsx("p",{className:"closing-foot",children:"You're looking at the dashboard now. The brain graph, tasks, and sleep state in the sidebar are this project's actual memory — live."})]})}function $ot(){return m.jsxs("div",{className:"about","data-testid":"about-page",children:[m.jsx(Hst,{}),m.jsx(Wst,{}),m.jsx(uot,{}),m.jsx(pot,{}),m.jsx(mot,{}),m.jsx(yot,{}),m.jsx(xot,{}),m.jsx(Dot,{}),m.jsx(Iot,{})]})}function zot(){return oi({queryKey:["taxonomy"],queryFn:()=>ie.get("/taxonomy")})}const Pot={domain:"Domain",layer:"Layer",kind:"Kind",topic:"Topic"};function XA({tag:i,count:e,dimmed:r}){return m.jsxs("span",{className:`taxonomy-chip${r?" taxonomy-chip--dim":""}`,"data-hue":Va(i),title:e>0?`${e} use${e===1?"":"s"}`:"unused",children:[m.jsx("span",{className:"taxonomy-chip-label",children:i}),e>0&&m.jsx("span",{className:"taxonomy-chip-count",children:e})]})}function qp({label:i,count:e,children:r,defaultOpen:n=!1}){const[a,o]=P.useState(n);return e===0?null:m.jsxs("div",{className:"taxonomy-expandable",children:[m.jsxs("button",{className:"taxonomy-expandable-header",onClick:()=>o(c=>!c),"aria-expanded":a,children:[m.jsx("span",{className:"taxonomy-expandable-chevron",children:a?"▾":"▸"}),m.jsx("span",{className:"taxonomy-expandable-label",children:i}),m.jsx("span",{className:"taxonomy-expandable-badge",children:e})]}),a&&m.jsx("div",{className:"taxonomy-expandable-body",children:r})]})}function qot(){const{t:i}=qi(),{data:e,isLoading:r,isError:n,error:a}=zot();if(r)return m.jsx("div",{className:"loading",children:i("common.loading")});if(n)return m.jsxs("div",{className:"error-state",children:["Failed to load taxonomy. ",a==null?void 0:a.message]});if(!e)return null;const{vocabulary:o,usage:c,audit:h}=e,u=["domain","layer","kind","topic"],d=h.untagged.length===0&&h.nonCanonical.length===0&&h.orphan.length===0&&h.nearDups.length===0;return m.jsxs("div",{className:"taxonomy-page",children:[m.jsx("h1",{className:"page-title",children:i("taxonomy.title")}),m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Faceted Tags"}),m.jsx("div",{className:"taxonomy-facets",children:u.map(f=>{const g=o.facetTags[f]??[];return g.length===0?null:m.jsxs("div",{className:"taxonomy-facet-group",children:[m.jsx("span",{className:"taxonomy-facet-label",children:Pot[f]??f}),m.jsx("div",{className:"taxonomy-chip-cluster",children:g.map(x=>{const y=c[x]??0;return m.jsx(XA,{tag:x,count:y,dimmed:y===0},x)})})]},f)})})]}),o.bareTags.length>0&&m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Bare Tags"}),m.jsx("div",{className:"taxonomy-chip-cluster",children:o.bareTags.map(f=>{const g=c[f]??0;return m.jsx(XA,{tag:f,count:g,dimmed:g===0},f)})})]}),Object.keys(o.aliases).length>0&&m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Aliases"}),m.jsx("div",{className:"taxonomy-alias-list",children:Object.entries(o.aliases).map(([f,g])=>m.jsxs("div",{className:"taxonomy-alias-pair",children:[m.jsx("span",{className:"taxonomy-chip taxonomy-chip--alias","data-hue":Va(f),children:m.jsx("span",{className:"taxonomy-chip-label",children:f})}),m.jsx("span",{className:"taxonomy-alias-arrow","aria-hidden":"true",children:"→"}),m.jsx("span",{className:"taxonomy-chip","data-hue":Va(g),children:m.jsx("span",{className:"taxonomy-chip-label",children:g})})]},f))})]}),m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Drift Audit"}),d?m.jsxs("div",{className:"taxonomy-healthy",children:[m.jsx("span",{className:"taxonomy-healthy-icon",children:"✓"}),m.jsx("span",{children:"Taxonomy healthy — no drift detected."})]}):m.jsxs("div",{className:"taxonomy-audit-panel",children:[m.jsx(qp,{label:"Untagged docs",count:h.untagged.length,defaultOpen:h.untagged.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.untagged.map(f=>m.jsx("li",{className:"taxonomy-audit-item",children:m.jsx("code",{children:f})},f))})}),m.jsx(qp,{label:"Non-canonical tags",count:h.nonCanonical.length,defaultOpen:h.nonCanonical.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.nonCanonical.map((f,g)=>m.jsxs("li",{className:"taxonomy-audit-item taxonomy-audit-item--suggest",children:[m.jsx("code",{className:"taxonomy-audit-doc",children:f.doc}),m.jsx("span",{className:"taxonomy-audit-tag",children:f.tag}),f.suggestion!==f.tag&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"taxonomy-alias-arrow","aria-hidden":"true",children:"→"}),m.jsx("span",{className:"taxonomy-audit-suggestion",children:f.suggestion})]})]},g))})}),m.jsx(qp,{label:"Orphan tags",count:h.orphan.length,defaultOpen:h.orphan.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.orphan.map(f=>m.jsx("li",{className:"taxonomy-audit-item",children:m.jsx("span",{className:"taxonomy-audit-tag",children:f})},f))})}),m.jsx(qp,{label:"Near-duplicates",count:h.nearDups.length,defaultOpen:h.nearDups.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.nearDups.map(([f,g],x)=>m.jsxs("li",{className:"taxonomy-audit-item taxonomy-audit-item--pair",children:[m.jsx("span",{className:"taxonomy-audit-tag",children:f}),m.jsx("span",{className:"taxonomy-alias-arrow","aria-hidden":"true",children:"≈"}),m.jsx("span",{className:"taxonomy-audit-tag",children:g})]},x))})})]})]})]})}const Uot=["tasks.members","tasks.delete","tasks.sync"];function Hot(){const{data:i}=oi({queryKey:["health"],queryFn:()=>ie.get("/health"),staleTime:6e4,retry:1});if(!i)return null;const e=i.capabilities??[];return Uot.filter(n=>!e.includes(n)).length===0?null:m.jsxs("div",{className:"stale-server-banner",children:["⚠ The dashboard server is running an older build — some actions will fail. Restart it: ",m.jsx("code",{children:"dreamcontext dashboard"})]})}const ZA=new _I({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0,refetchInterval:15e3,refetchIntervalInBackground:!1},mutations:{retry:0}}});function Wot({nav:i}){const e=(r,n)=>{const a={tasks:"tasks",features:"features",knowledge:"knowledge",core:"core"};i.navigate(a[r],n)};switch(i.page){case"brain":return m.jsx(Xat,{onNavigate:e});case"tasks":return m.jsx(Wnt,{});case"sleep":return m.jsx(Vnt,{});case"core":return m.jsx(hat,{onNavigateTaxonomy:()=>i.navigate("taxonomy",null)});case"knowledge":return m.jsx(Eat,{});case"features":return m.jsx(Nat,{});case"council":return m.jsx(Sst,{});case"settings":return m.jsx(Ist,{});case"packs":return m.jsx(Ust,{});case"taxonomy":return m.jsx(qot,{});case"about":return m.jsx($ot,{})}}class Bx extends P.Component{constructor(){super(...arguments);ge(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?m.jsxs("div",{className:"error-boundary",children:[m.jsx("h1",{children:"Something went wrong."}),m.jsx("p",{children:this.state.error.message}),m.jsx("button",{onClick:()=>window.location.reload(),children:"Reload"})]}):this.props.children}}const FD=new URLSearchParams(window.location.search),E1=FD.get("vault"),Got=FD.get("capture")==="1";E1&&CM(E1);function Yot(){return P.useEffect(()=>{KG().then(e=>Nv(e));const i=e=>{(e.key===null||e.key===iL)&&Nv(gC())};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]),null}function Kot(){return Got?m.jsx(Bx,{children:m.jsx(iY,{})}):E1?m.jsx(Bx,{children:m.jsx(h2,{client:ZA,children:m.jsx(sY,{children:m.jsx(hE,{children:m.jsxs(nY,{children:[m.jsx(Hot,{}),m.jsx(yrt,{children:i=>m.jsx(Wot,{nav:i})})]})})})})}):m.jsx(Bx,{children:m.jsx(h2,{client:ZA,children:m.jsxs(hE,{children:[m.jsx(Yot,{}),m.jsx(OW,{})]})})})}Q4.createRoot(document.getElementById("root")).render(m.jsx(P.StrictMode,{children:m.jsx(Kot,{})}));export{LL as $,nlt as A,Oo as B,dY as C,Vi as D,kK as E,PC as F,CL as G,cX as H,qK as I,KV as J,EY as K,Td as L,ilt as M,Sm as N,rK as O,ML as P,pE as Q,OK as R,Dv as S,lX as T,Yd as U,Ta as V,St as W,_t as X,uK as Y,tX as Z,L as _,yK as a,q9 as a$,AK as a0,bE as a1,yE as a2,dlt as a3,olt as a4,hlt as a5,clt as a6,alt as a7,kC as a8,ult as a9,kQ as aA,_Q as aB,jB as aC,JH as aD,TZ as aE,gL as aF,MK as aG,$d as aH,elt as aI,lm as aJ,mg as aK,dP as aL,JM as aM,Zd as aN,wZ as aO,kZ as aP,tW as aQ,I1 as aR,xo as aS,Cd as aT,T2 as aU,Sz as aV,QP as aW,sB as aX,oB as aY,P9 as aZ,gg as a_,slt as aa,Bc as ab,plt as ac,flt as ad,llt as ae,ZZ as af,Yj as ag,wlt as ah,XV as ai,an as aj,$s as ak,Ru as al,qC as am,qR as an,Pl as ao,GR as ap,Oe as aq,Ya as ar,se as as,JQ as at,klt as au,Slt as av,Clt as aw,ue as ax,_lt as ay,NQ as az,mK as b,bg as b$,Eh as b0,dl as b1,Fq as b2,Y2 as b3,_a as b4,$P as b5,G1 as b6,R9 as b7,U9 as b8,Nh as b9,AH as bA,vU as bB,pe as bC,eW as bD,xU as bE,dB as bF,aT as bG,Bl as bH,v$ as bI,lt as bJ,P as bK,bH as bL,BH as bM,LH as bN,m as bO,z2 as bP,GP as bQ,JP as bR,iq as bS,om as bT,W9 as bU,W1 as bV,tB as bW,i7 as bX,Pq as bY,Wq as bZ,Ud as b_,ZP as ba,tq as bb,V9 as bc,HP as bd,H1 as be,nT as bf,le as bg,YR as bh,s_ as bi,Cn as bj,bz as bk,F1 as bl,$M as bm,qd as bn,qM as bo,tlt as bp,F2 as bq,D2 as br,uY as bs,kr as bt,ont as bu,xi as bv,K1 as bw,MH as bx,NH as by,vH as bz,di as c,qo as c0,rT as c1,Y1 as c2,eB as c3,ov as c4,Xot as c5,Fe as c6,cM as c7,V4 as c8,Qot as c9,A1 as ca,Zot as cb,ke as d,BL as e,Cr as f,xK as g,Ds as h,ka as i,JV as j,Kd as k,Lt as l,HR as m,rlt as n,Elt as o,vK as p,CK as q,Tlt as r,bK as s,VV as t,ba as u,yQ as v,dX as w,glt as x,Do as y,gK as z};
|