dreamcontext 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/agents/dreamcontext-initializer.md +165 -26
- package/agents/sleep-federation.md +94 -0
- package/agents/sleep-migration.md +103 -0
- package/agents/sleep-product.md +57 -4
- package/agents/sleep-state.md +1 -0
- package/agents/sleep-tasks.md +1 -0
- package/dist/agents/dreamcontext-initializer.md +165 -26
- package/dist/agents/sleep-federation.md +94 -0
- package/dist/agents/sleep-migration.md +103 -0
- package/dist/agents/sleep-product.md +57 -4
- package/dist/agents/sleep-state.md +1 -0
- package/dist/agents/sleep-tasks.md +1 -0
- package/dist/dashboard/assets/{BrainCanvas3D-Bb8WCKrn.js → BrainCanvas3D-BZyWrW3J.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-BatmaIH2.js → _baseUniq-C55dCpzj.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-D5ja_wjH.js → ar-SA-G6X2FPQ2-BTWWh58_.js} +1 -1
- package/dist/dashboard/assets/{arc-DqjLlF-x.js → arc-BhcvtD7_.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-u9hbL6uu.js → architectureDiagram-Q4EWVU46-BlVAz3vP.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-CCrmRwql.js → az-AZ-76LH7QW2-DEPuxlle.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-ByFwPOzm.js → bg-BG-XCXSNQG7-CdwdScdW.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-dX-e3JNh.js → blockDiagram-DXYQGD6D-CAzEduT-.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-CqnEIuTG.js → bn-BD-2XOGV67Q-Cx2p_HrL.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-DAT2Y4Ei.js → c4Diagram-AHTNJAMY-C_5GcHxG.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-DxUow-Oi.js → ca-ES-6MX7JW3Y-BLVJKLW3.js} +1 -1
- package/dist/dashboard/assets/channel-13cbKCMF.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-ng6_uP1b.js → chunk-4BX2VUAB-DYYyKwKp.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-JyQRd6F4.js → chunk-4TB4RGXK-B9ZDNs0v.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-WENWKOcW.js → chunk-55IACEB6-0chbuP2q.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-BupZpcZ0.js → chunk-EDXVE4YY-BM3tX5V3.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-6-Dp_BQr.js → chunk-FMBD7UC4-D7fWQyLU.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-CRMXMXMR.js → chunk-OYMX7WX6-DRSMwRfw.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-CdV3chea.js → chunk-QZHKN3VN-BkySqi6f.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-DGd7UTQr.js → chunk-YZCP3GAM-DWxX_bg1.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BX19A8jH.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BX19A8jH.js +1 -0
- package/dist/dashboard/assets/clone-CiHddu7Q.js +1 -0
- package/dist/dashboard/assets/core-RciSkj6z.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-86wk8_0k.js → cose-bilkent-S5V4N54A-CK3SaOdF.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-Vsx90G3k.js → cs-CZ-2BRQDIVT-2wFJFdY3.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-BqlSmIrC.js → da-DK-5WZEPLOC-PZ4S5fLH.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-BsnIu1de.js → dagre-KV5264BT-C_O4CkRN.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-D1X2JmBd.js → de-DE-XR44H4JA-COgQyNpE.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-BfKZpkO_.js → diagram-5BDNPKRD-CY7cwksh.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-BGEdOZis.js → diagram-G4DWMVQ6-BBaegF2E.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-4PK6U-9k.js → diagram-MMDJMWI5-Dtp-QpeD.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-Co4XFxnB.js → diagram-TYMM5635-h-YHhXz4.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-JfJ7Iw6d.js → el-GR-BZB4AONW-DzTJgcWa.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-tggQbGeM.js → erDiagram-SMLLAGMA-C8WadTdS.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-CrTG5SH1.js → es-ES-U4NZUMDT-BMzFbvDd.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-CLi-f2S4.js → eu-ES-A7QVB2H4-CnpRhfeI.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-B78t-ifl.js → fa-IR-HGAKTJCU-DJozguNj.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-BiYGo0tM.js → fi-FI-Z5N7JZ37-4vlr1zEE.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-DfOOuTHa.js → flowDiagram-DWJPFMVM-BDU_Bd0P.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-CHuvxlm9.js → fr-FR-RHASNOE6-BIMGBozN.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-CqRBfUlO.js → ganttDiagram-T4ZO3ILL-DI9axi76.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-DCooi0ou.js → gitGraphDiagram-UUTBAWPF-BuhQ28fO.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-DloFVgGH.js → gl-ES-HMX3MZ6V-C5wE26uu.js} +1 -1
- package/dist/dashboard/assets/{graph-CbTgvSod.js → graph-Djm-nnL-.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-sKyHtCj5.js → he-IL-6SHJWFNN-B0U2BY4u.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-BDBktoGz.js → hi-IN-IWLTKZ5I-Ddqmbdc3.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-CI0m6WdK.js → hu-HU-A5ZG7DT2-Bql7W1FB.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-o3oCWYJ1.js → id-ID-SAP4L64H-BgPUuH6X.js} +1 -1
- package/dist/dashboard/assets/index-BZEr0UdA.css +1 -0
- package/dist/dashboard/assets/index-CCBqToG8.js +480 -0
- package/dist/dashboard/assets/{index-BzUItYQF.js → index-DMgrVZGf.js} +1 -1
- package/dist/dashboard/assets/index-DpzkIBIK.js +1 -0
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-DvXAiIKM.js → infoDiagram-42DDH7IO-FlC8UXlC.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-B3k3F-SR.js → ishikawaDiagram-UXIWVN3A-CM7RkOdA.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-B69FvIBl.js → it-IT-JPQ66NNP-B8JStDkT.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-09Dz5R3w.js → ja-JP-DBVTYXUO-CjqVt-yD.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-3sYlQlzX.js → journeyDiagram-VCZTEJTY-CmXt_usI.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-SFvv5G_m.js → kaa-6HZHGXH3-qlfTF570.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-Cj4UcDfk.js → kab-KAB-ZGHBKWFO-B1jcf86v.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-cGLqpTJv.js → kanban-definition-6JOO6SKY-DfUTCwbu.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-BVT_-IeJ.js → kk-KZ-P5N5QNE5-CDGZZuGX.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-BpH_zneK.js → km-KH-HSX4SM5Z-VJhAICPS.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-BWtVfnIt.js → ko-KR-MTYHY66A-DTsCW-6Q.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-DKg1sGxW.js → ku-TR-6OUDTVRD-B7sBU8-V.js} +1 -1
- package/dist/dashboard/assets/{layout-gKZamora.js → layout-LL6b15MZ.js} +1 -1
- package/dist/dashboard/assets/{linear-DOSQ02II.js → linear-th65CRN7.js} +1 -1
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-DFICvEvq.js → lt-LT-XHIRWOB4-DLwGTeYc.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-CeIp3POy.js → lv-LV-5QDEKY6T-Df5ujP3N.js} +1 -1
- package/dist/dashboard/assets/{min-BD9nuOyV.js → min-C1cE6N2D.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-DNg9-qbI.js → mindmap-definition-QFDTVHPH-n-x0bf17.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-CMiofriy.js → mr-IN-CRQNXWMA-B0504Lxj.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-WhbW1bUQ.js → my-MM-5M5IBNSE-CTTz1o7j.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-kvj3GRtN.js → nb-NO-T6EIAALU-C423tdvs.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-BdYOVmBV.js → nl-NL-IS3SIHDZ-BGX4T5hB.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-BAI1MQoO.js → nn-NO-6E72VCQL-e7Z1mG0i.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-ChavJGTr.js → oc-FR-POXYY2M6-CPEhofz-.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-AWmvLRaa.js → pa-IN-N4M65BXN-Dmdt2Etw.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-QYboYPU4.js → percentages-BXMCSKIN-D36vqrao.js} +7 -7
- package/dist/dashboard/assets/{pica-DzAIGpll.js → pica-DyXfovKp.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-C4ZFpuC0.js → pieDiagram-DEJITSTG-DFDPs7b_.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-C06LuJit.js → pl-PL-T2D74RX3-G1JddCZF.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-DP-AXG39.js → pt-BR-5N22H2LF-pu4YiRox.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-T-2COPG-.js → pt-PT-UZXXM6DQ-BOYLmU0S.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-yvEQRUmq.js → quadrantDiagram-34T5L4WZ-D7Ov5Uju.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-BkjbZkw1.js → requirementDiagram-MS252O5E-Blqx-X0l.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-V8ShMmhj.js → ro-RO-JPDTUUEW-DlBiDeMi.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-Bk5QWjQg.js → ru-RU-B4JR7IUQ-D0J18l95.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-_6wZr0Q4.js → sankeyDiagram-XADWPNL6-BQbQa_T1.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-B03MUCIO.js → sequenceDiagram-FGHM5R23-DhJhyglC.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-DrLyNjX_.js → si-LK-N5RQ5JYF-4JT6EDIh.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-MG2XJDav.js → sk-SK-C5VTKIMK-Bx5AqQi7.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-DyF2jYcb.js → sl-SI-NN7IZMDC-Duy44AJo.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-DW9W8hRb.js → stateDiagram-FHFEXIEX-B3lrGt3B.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-oO_Mw_KF.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-DxnLkUkc.js → subset-shared.chunk-DWRxaQue.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-BCGTROg4.js → subset-worker.chunk-nm8TiAaC.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-BJOlh7Ta.js → sv-SE-XGPEYMSR-_WPtf9Fs.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-DbvdzD_M.js → ta-IN-2NMHFXQM-BZEYawlk.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-BZoStbWu.js → th-TH-HPSO5L25-C_ugiLaK.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-Cq3P6C9q.js → timeline-definition-GMOUNBTQ-D0RPX8Ye.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-D0q3dp6Y.js → tr-TR-DEFEU3FU-DkmWDwcW.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-KQC76_Jh.js → uk-UA-QMV73CPH-l2YUg_fY.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-BO3azTdL.js → vennDiagram-DHZGUBPP-BxCgJ4Ig.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-BsyXHyOP.js → vi-VN-M7AON7JQ-Chu_8vm0.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-BjaWFGf-.js → wardley-RL74JXVD-B74rcv6j.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-D0Ghwhzw.js → wardleyDiagram-NUSXRM2D-BZex7ruR.js} +1 -1
- package/dist/dashboard/assets/webviewWindow-BHsy7FSR.js +1 -0
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-D1QYeAFg.js → xychartDiagram-5P7HB3ND-BACIDW_J.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-Cg54ea9D.js → zh-CN-LNUGB5OW-cY5Hv8ht.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-N7JXSzdg.js → zh-HK-E62DVLB3-BdyhmSC7.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-CTX6fzNp.js → zh-TW-RAJ6MFWO-CTjI4bec.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +39142 -5771
- package/dist/skill-packs/excalidraw/SKILL.md +70 -0
- package/dist/templates/feature.md +1 -0
- package/dist/templates/task.md +1 -0
- package/package.json +1 -1
- package/skill/SKILL.md +68 -1
- package/skill-packs/excalidraw/SKILL.md +70 -0
- package/dist/dashboard/assets/channel-JlaJkLX7.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BBVZgLT7.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BBVZgLT7.js +0 -1
- package/dist/dashboard/assets/clone-DSjY5D8g.js +0 -1
- package/dist/dashboard/assets/index-BMwAG0PF.css +0 -1
- package/dist/dashboard/assets/index-CIMJcxbn.js +0 -480
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-DGLHFCvB.js +0 -1
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DpzkIBIK.js","assets/core-RciSkj6z.js","assets/webviewWindow-BHsy7FSR.js","assets/dagre-KV5264BT-C_O4CkRN.js","assets/graph-Djm-nnL-.js","assets/_baseUniq-C55dCpzj.js","assets/layout-LL6b15MZ.js","assets/min-C1cE6N2D.js","assets/clone-CiHddu7Q.js","assets/cose-bilkent-S5V4N54A-CK3SaOdF.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-C_5GcHxG.js","assets/chunk-YZCP3GAM-DWxX_bg1.js","assets/flowDiagram-DWJPFMVM-BDU_Bd0P.js","assets/chunk-FMBD7UC4-D7fWQyLU.js","assets/chunk-55IACEB6-0chbuP2q.js","assets/chunk-EDXVE4YY-BM3tX5V3.js","assets/channel-13cbKCMF.js","assets/erDiagram-SMLLAGMA-C8WadTdS.js","assets/gitGraphDiagram-UUTBAWPF-BuhQ28fO.js","assets/chunk-4BX2VUAB-DYYyKwKp.js","assets/chunk-QZHKN3VN-BkySqi6f.js","assets/wardley-RL74JXVD-B74rcv6j.js","assets/ganttDiagram-T4ZO3ILL-DI9axi76.js","assets/linear-th65CRN7.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-FlC8UXlC.js","assets/pieDiagram-DEJITSTG-DFDPs7b_.js","assets/arc-BhcvtD7_.js","assets/quadrantDiagram-34T5L4WZ-D7Ov5Uju.js","assets/xychartDiagram-5P7HB3ND-BACIDW_J.js","assets/requirementDiagram-MS252O5E-Blqx-X0l.js","assets/sequenceDiagram-FGHM5R23-DhJhyglC.js","assets/classDiagram-6PBFFD2Q-BX19A8jH.js","assets/chunk-4TB4RGXK-B9ZDNs0v.js","assets/classDiagram-v2-HSJHXN6E-BX19A8jH.js","assets/stateDiagram-FHFEXIEX-B3lrGt3B.js","assets/chunk-OYMX7WX6-DRSMwRfw.js","assets/stateDiagram-v2-QKLJ7IA2-oO_Mw_KF.js","assets/journeyDiagram-VCZTEJTY-CmXt_usI.js","assets/timeline-definition-GMOUNBTQ-D0RPX8Ye.js","assets/mindmap-definition-QFDTVHPH-n-x0bf17.js","assets/kanban-definition-6JOO6SKY-DfUTCwbu.js","assets/diagram-TYMM5635-h-YHhXz4.js","assets/diagram-MMDJMWI5-Dtp-QpeD.js","assets/blockDiagram-DXYQGD6D-CAzEduT-.js","assets/diagram-5BDNPKRD-CY7cwksh.js","assets/architectureDiagram-Q4EWVU46-BlVAz3vP.js","assets/diagram-G4DWMVQ6-BBaegF2E.js","assets/wardleyDiagram-NUSXRM2D-BZex7ruR.js","assets/percentages-BXMCSKIN-D36vqrao.js","assets/extends-CF3RwP-h.js","assets/BrainCanvas3D-BZyWrW3J.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var b4=Object.defineProperty;var ES=i=>{throw TypeError(i)};var x4=(i,e,r)=>e in i?b4(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var ne=(i,e,r)=>x4(i,typeof e!="symbol"?e+"":e,r),Nb=(i,e,r)=>e.has(i)||ES("Cannot "+r);var et=(i,e,r)=>(Nb(i,e,"read from private field"),r?r.call(i):e.get(i)),ae=(i,e,r)=>e.has(i)?ES("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),Ut=(i,e,r,n)=>(Nb(i,e,"write to private field"),n?n.call(i,r):e.set(i,r),r),Oe=(i,e,r)=>(Nb(i,e,"access private method"),r);var cp=(i,e,r,n)=>({set _(a){Ut(i,e,a,r)},get _(){return et(i,e,n)}});function v4(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 Kst=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Vst(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 Ab={exports:{}},mu={};/**
|
|
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 NS;function C4(){if(NS)return mu;NS=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 mu.Fragment=e,mu.jsx=r,mu.jsxs=r,mu}var AS;function _4(){return AS||(AS=1,Ab.exports=C4()),Ab.exports}var m=_4(),Mb={exports:{}},Ce={};/**
|
|
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 MS;function k4(){if(MS)return Ce;MS=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(H){return H===null||typeof H!="object"?null:(H=x&&H[x]||H["@@iterator"],typeof H=="function"?H:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function k(H,rt,ft){this.props=H,this.context=rt,this.refs=_,this.updater=ft||v}k.prototype.isReactComponent={},k.prototype.setState=function(H,rt){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,rt,"setState")},k.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function T(){}T.prototype=k.prototype;function E(H,rt,ft){this.props=H,this.context=rt,this.refs=_,this.updater=ft||v}var N=E.prototype=new T;N.constructor=E,C(N,k.prototype),N.isPureReactComponent=!0;var L=Array.isArray;function O(){}var A={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function z(H,rt,ft){var Q=ft.ref;return{$$typeof:i,type:H,key:rt,ref:Q!==void 0?Q:null,props:ft}}function D(H,rt){return z(H.type,rt,H.props)}function $(H){return typeof H=="object"&&H!==null&&H.$$typeof===i}function U(H){var rt={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(ft){return rt[ft]})}var Y=/\/+/g;function I(H,rt){return typeof H=="object"&&H!==null&&H.key!=null?U(""+H.key):rt.toString(36)}function W(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(O,O):(H.status="pending",H.then(function(rt){H.status==="pending"&&(H.status="fulfilled",H.value=rt)},function(rt){H.status==="pending"&&(H.status="rejected",H.reason=rt)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function j(H,rt,ft,Q,yt){var ot=typeof H;(ot==="undefined"||ot==="boolean")&&(H=null);var X=!1;if(H===null)X=!0;else switch(ot){case"bigint":case"string":case"number":X=!0;break;case"object":switch(H.$$typeof){case i:case e:X=!0;break;case f:return X=H._init,j(X(H._payload),rt,ft,Q,yt)}}if(X)return yt=yt(H),X=Q===""?"."+I(H,0):Q,L(yt)?(ft="",X!=null&&(ft=X.replace(Y,"$&/")+"/"),j(yt,rt,ft,"",function(ct){return ct})):yt!=null&&($(yt)&&(yt=D(yt,ft+(yt.key==null||H&&H.key===yt.key?"":(""+yt.key).replace(Y,"$&/")+"/")+X)),rt.push(yt)),1;X=0;var Z=Q===""?".":Q+":";if(L(H))for(var st=0;st<H.length;st++)Q=H[st],ot=Z+I(Q,st),X+=j(Q,rt,ft,ot,yt);else if(st=y(H),typeof st=="function")for(H=st.call(H),st=0;!(Q=H.next()).done;)Q=Q.value,ot=Z+I(Q,st++),X+=j(Q,rt,ft,ot,yt);else if(ot==="object"){if(typeof H.then=="function")return j(W(H),rt,ft,Q,yt);throw rt=String(H),Error("Objects are not valid as a React child (found: "+(rt==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":rt)+"). If you meant to render a collection of children, use an array instead.")}return X}function q(H,rt,ft){if(H==null)return H;var Q=[],yt=0;return j(H,Q,"","",function(ot){return rt.call(ft,ot,yt++)}),Q}function G(H){if(H._status===-1){var rt=H._result;rt=rt(),rt.then(function(ft){(H._status===0||H._status===-1)&&(H._status=1,H._result=ft)},function(ft){(H._status===0||H._status===-1)&&(H._status=2,H._result=ft)}),H._status===-1&&(H._status=0,H._result=rt)}if(H._status===1)return H._result.default;throw H._result}var it=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var rt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(rt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},nt={map:q,forEach:function(H,rt,ft){q(H,function(){rt.apply(this,arguments)},ft)},count:function(H){var rt=0;return q(H,function(){rt++}),rt},toArray:function(H){return q(H,function(rt){return rt})||[]},only:function(H){if(!$(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Ce.Activity=g,Ce.Children=nt,Ce.Component=k,Ce.Fragment=r,Ce.Profiler=a,Ce.PureComponent=E,Ce.StrictMode=n,Ce.Suspense=u,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(H){return A.H.useMemoCache(H)}},Ce.cache=function(H){return function(){return H.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(H,rt,ft){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var Q=C({},H.props),yt=H.key;if(rt!=null)for(ot in rt.key!==void 0&&(yt=""+rt.key),rt)!M.call(rt,ot)||ot==="key"||ot==="__self"||ot==="__source"||ot==="ref"&&rt.ref===void 0||(Q[ot]=rt[ot]);var ot=arguments.length-2;if(ot===1)Q.children=ft;else if(1<ot){for(var X=Array(ot),Z=0;Z<ot;Z++)X[Z]=arguments[Z+2];Q.children=X}return z(H.type,yt,Q)},Ce.createContext=function(H){return H={$$typeof:c,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:o,_context:H},H},Ce.createElement=function(H,rt,ft){var Q,yt={},ot=null;if(rt!=null)for(Q in rt.key!==void 0&&(ot=""+rt.key),rt)M.call(rt,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(yt[Q]=rt[Q]);var X=arguments.length-2;if(X===1)yt.children=ft;else if(1<X){for(var Z=Array(X),st=0;st<X;st++)Z[st]=arguments[st+2];yt.children=Z}if(H&&H.defaultProps)for(Q in X=H.defaultProps,X)yt[Q]===void 0&&(yt[Q]=X[Q]);return z(H,ot,yt)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(H){return{$$typeof:h,render:H}},Ce.isValidElement=$,Ce.lazy=function(H){return{$$typeof:f,_payload:{_status:-1,_result:H},_init:G}},Ce.memo=function(H,rt){return{$$typeof:d,type:H,compare:rt===void 0?null:rt}},Ce.startTransition=function(H){var rt=A.T,ft={};A.T=ft;try{var Q=H(),yt=A.S;yt!==null&&yt(ft,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(O,it)}catch(ot){it(ot)}finally{rt!==null&&ft.types!==null&&(rt.types=ft.types),A.T=rt}},Ce.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Ce.use=function(H){return A.H.use(H)},Ce.useActionState=function(H,rt,ft){return A.H.useActionState(H,rt,ft)},Ce.useCallback=function(H,rt){return A.H.useCallback(H,rt)},Ce.useContext=function(H){return A.H.useContext(H)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(H,rt){return A.H.useDeferredValue(H,rt)},Ce.useEffect=function(H,rt){return A.H.useEffect(H,rt)},Ce.useEffectEvent=function(H){return A.H.useEffectEvent(H)},Ce.useId=function(){return A.H.useId()},Ce.useImperativeHandle=function(H,rt,ft){return A.H.useImperativeHandle(H,rt,ft)},Ce.useInsertionEffect=function(H,rt){return A.H.useInsertionEffect(H,rt)},Ce.useLayoutEffect=function(H,rt){return A.H.useLayoutEffect(H,rt)},Ce.useMemo=function(H,rt){return A.H.useMemo(H,rt)},Ce.useOptimistic=function(H,rt){return A.H.useOptimistic(H,rt)},Ce.useReducer=function(H,rt,ft){return A.H.useReducer(H,rt,ft)},Ce.useRef=function(H){return A.H.useRef(H)},Ce.useState=function(H){return A.H.useState(H)},Ce.useSyncExternalStore=function(H,rt,ft){return A.H.useSyncExternalStore(H,rt,ft)},Ce.useTransition=function(){return A.H.useTransition()},Ce.version="19.2.4",Ce}var BS;function f1(){return BS||(BS=1,Mb.exports=k4()),Mb.exports}var K=f1();const HA=Dd(K),Xst=v4({__proto__:null,default:HA},[K]);var Bb={exports:{}},yu={},Lb={exports:{}},Ob={};/**
|
|
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 LS;function w4(){return LS||(LS=1,(function(i){function e(j,q){var G=j.length;j.push(q);t:for(;0<G;){var it=G-1>>>1,nt=j[it];if(0<a(nt,q))j[it]=q,j[G]=nt,G=it;else break t}}function r(j){return j.length===0?null:j[0]}function n(j){if(j.length===0)return null;var q=j[0],G=j.pop();if(G!==q){j[0]=G;t:for(var it=0,nt=j.length,H=nt>>>1;it<H;){var rt=2*(it+1)-1,ft=j[rt],Q=rt+1,yt=j[Q];if(0>a(ft,G))Q<nt&&0>a(yt,ft)?(j[it]=yt,j[Q]=G,it=Q):(j[it]=ft,j[rt]=G,it=rt);else if(Q<nt&&0>a(yt,G))j[it]=yt,j[Q]=G,it=Q;else break t}}return q}function a(j,q){var G=j.sortIndex-q.sortIndex;return G!==0?G:j.id-q.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,E=typeof setImmediate<"u"?setImmediate:null;function N(j){for(var q=r(d);q!==null;){if(q.callback===null)n(d);else if(q.startTime<=j)n(d),q.sortIndex=q.expirationTime,e(u,q);else break;q=r(d)}}function L(j){if(C=!1,N(j),!v)if(r(u)!==null)v=!0,O||(O=!0,U());else{var q=r(d);q!==null&&W(L,q.startTime-j)}}var O=!1,A=-1,M=5,z=-1;function D(){return _?!0:!(i.unstable_now()-z<M)}function $(){if(_=!1,O){var j=i.unstable_now();z=j;var q=!0;try{t:{v=!1,C&&(C=!1,T(A),A=-1),y=!0;var G=x;try{e:{for(N(j),g=r(u);g!==null&&!(g.expirationTime>j&&D());){var it=g.callback;if(typeof it=="function"){g.callback=null,x=g.priorityLevel;var nt=it(g.expirationTime<=j);if(j=i.unstable_now(),typeof nt=="function"){g.callback=nt,N(j),q=!0;break e}g===r(u)&&n(u),N(j)}else n(u);g=r(u)}if(g!==null)q=!0;else{var H=r(d);H!==null&&W(L,H.startTime-j),q=!1}}break t}finally{g=null,x=G,y=!1}q=void 0}}finally{q?U():O=!1}}}var U;if(typeof E=="function")U=function(){E($)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,I=Y.port2;Y.port1.onmessage=$,U=function(){I.postMessage(null)}}else U=function(){k($,0)};function W(j,q){A=k(function(){j(i.unstable_now())},q)}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 q=3;break;default:q=x}var G=x;x=q;try{return j()}finally{x=G}},i.unstable_requestPaint=function(){_=!0},i.unstable_runWithPriority=function(j,q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var G=x;x=j;try{return q()}finally{x=G}},i.unstable_scheduleCallback=function(j,q,G){var it=i.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?it+G:it):G=it,j){case 1:var nt=-1;break;case 2:nt=250;break;case 5:nt=1073741823;break;case 4:nt=1e4;break;default:nt=5e3}return nt=G+nt,j={id:f++,callback:q,priorityLevel:j,startTime:G,expirationTime:nt,sortIndex:-1},G>it?(j.sortIndex=G,e(d,j),r(u)===null&&j===r(d)&&(C?(T(A),A=-1):C=!0,W(L,G-it))):(j.sortIndex=nt,e(u,j),v||y||(v=!0,O||(O=!0,U()))),j},i.unstable_shouldYield=D,i.unstable_wrapCallback=function(j){var q=x;return function(){var G=x;x=q;try{return j.apply(this,arguments)}finally{x=G}}}})(Ob)),Ob}var OS;function S4(){return OS||(OS=1,Lb.exports=w4()),Lb.exports}var Rb={exports:{}},jr={};/**
|
|
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 RS;function T4(){if(RS)return jr;RS=1;var i=f1();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 jr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,jr.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)},jr.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()}},jr.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))},jr.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},jr.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})}},jr.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)},jr.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})}},jr.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)},jr.requestFormReset=function(u){n.d.r(u)},jr.unstable_batchedUpdates=function(u,d){return u(d)},jr.useFormState=function(u,d,f){return c.H.useFormState(u,d,f)},jr.useFormStatus=function(){return c.H.useHostTransitionStatus()},jr.version="19.2.4",jr}var DS;function E4(){if(DS)return Rb.exports;DS=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(),Rb.exports=T4(),Rb.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 jS;function N4(){if(jS)return yu;jS=1;var i=S4(),e=f1(),r=E4();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,P=w.child;P;){if(P===p){R=!0,p=w,b=S;break}if(P===b){R=!0,b=w,p=S;break}P=P.sibling}if(!R){for(P=S.child;P;){if(P===p){R=!0,p=S,b=w;break}if(P===b){R=!0,b=S,p=w;break}P=P.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"),E=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function U(s){return s===null||typeof s!="object"?null:(s=$&&s[$]||s["@@iterator"],typeof s=="function"?s:null)}var Y=Symbol.for("react.client.reference");function I(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===Y?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 L:return"Suspense";case O:return"SuspenseList";case z:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case v:return"Portal";case E:return s.displayName||"Context";case T:return(s._context.displayName||"Context")+".Consumer";case N: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:I(s.type)||"Memo";case M:l=s._payload,s=s._init;try{return I(s(l))}catch{}}return null}var W=Array.isArray,j=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},it=[],nt=-1;function H(s){return{current:s}}function rt(s){0>nt||(s.current=it[nt],it[nt]=null,nt--)}function ft(s,l){nt++,it[nt]=s.current,s.current=l}var Q=H(null),yt=H(null),ot=H(null),X=H(null);function Z(s,l){switch(ft(ot,l),ft(yt,s),ft(Q,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?Xw(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=Xw(l),s=Zw(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}rt(Q),ft(Q,s)}function st(){rt(Q),rt(yt),rt(ot)}function ct(s){s.memoizedState!==null&&ft(X,s);var l=Q.current,p=Zw(l,s.type);l!==p&&(ft(yt,s),ft(Q,p))}function vt(s){yt.current===s&&(rt(Q),rt(yt)),X.current===s&&(rt(X),du._currentValue=G)}var At,Ft;function zt(s){if(At===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);At=l&&l[1]||"",Ft=-1<p.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+At+s+Ft}var Rt=!1;function Yt(s,l){if(!s||Rt)return"";Rt=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var b={DetermineComponentFrameRoot:function(){try{if(l){var Et=function(){throw Error()};if(Object.defineProperty(Et.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Et,[])}catch(Ct){var bt=Ct}Reflect.construct(s,[],Et)}else{try{Et.call()}catch(Ct){bt=Ct}s.call(Et.prototype)}}else{try{throw Error()}catch(Ct){bt=Ct}(Et=s())&&typeof Et.catch=="function"&&Et.catch(function(){})}}catch(Ct){if(Ct&&bt&&typeof Ct.stack=="string")return[Ct.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],P=S[1];if(R&&P){var J=R.split(`
|
|
45
|
+
`),gt=P.split(`
|
|
46
|
+
`);for(w=b=0;b<J.length&&!J[b].includes("DetermineComponentFrameRoot");)b++;for(;w<gt.length&&!gt[w].includes("DetermineComponentFrameRoot");)w++;if(b===J.length||w===gt.length)for(b=J.length-1,w=gt.length-1;1<=b&&0<=w&&J[b]!==gt[w];)w--;for(;1<=b&&0<=w;b--,w--)if(J[b]!==gt[w]){if(b!==1||w!==1)do if(b--,w--,0>w||J[b]!==gt[w]){var St=`
|
|
47
|
+
`+J[b].replace(" at new "," at ");return s.displayName&&St.includes("<anonymous>")&&(St=St.replace("<anonymous>",s.displayName)),St}while(1<=b&&0<=w);break}}}finally{Rt=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?zt(p):""}function _e(s,l){switch(s.tag){case 26:case 27:case 5:return zt(s.type);case 16:return zt("Lazy");case 13:return s.child!==l&&l!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return Yt(s.type,!1);case 11:return Yt(s.type.render,!1);case 1:return Yt(s.type,!0);case 31:return zt("Activity");default:return""}}function ti(s){try{var l="",p=null;do l+=_e(s,p),p=s,s=s.return;while(s);return l}catch(b){return`
|
|
48
|
+
Error generating stack: `+b.message+`
|
|
49
|
+
`+b.stack}}var ki=Object.prototype.hasOwnProperty,Be=i.unstable_scheduleCallback,yi=i.unstable_cancelCallback,$i=i.unstable_shouldYield,zi=i.unstable_requestPaint,ye=i.unstable_now,Ai=i.unstable_getCurrentPriorityLevel,bi=i.unstable_ImmediatePriority,tr=i.unstable_UserBlockingPriority,fi=i.unstable_NormalPriority,Vi=i.unstable_LowPriority,Mi=i.unstable_IdlePriority,xr=i.log,_n=i.unstable_setDisableYieldValue,Di=null,Le=null;function Ue(s){if(typeof xr=="function"&&_n(s),Le&&typeof Le.setStrictMode=="function")try{Le.setStrictMode(Di,s)}catch{}}var Ee=Math.clz32?Math.clz32:Xi,hr=Math.log,xi=Math.LN2;function Xi(s){return s>>>=0,s===0?32:31-(hr(s)/xi|0)|0}var Se=256,er=262144,wr=4194304;function Pi(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 tt(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 P=b&134217727;return P!==0?(b=P&~S,b!==0?w=Pi(b):(R&=P,R!==0?w=Pi(R):p||(p=P&~s,p!==0&&(w=Pi(p))))):(P=b&~S,P!==0?w=Pi(P):R!==0?w=Pi(R):p||(p=b&~s,p!==0&&(w=Pi(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 wt(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Dt(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 le(){var s=wr;return wr<<=1,(wr&62914560)===0&&(wr=4194304),s}function ei(s){for(var l=[],p=0;31>p;p++)l.push(s);return l}function ue(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Ht(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 P=s.entanglements,J=s.expirationTimes,gt=s.hiddenUpdates;for(p=R&~p;0<p;){var St=31-Ee(p),Et=1<<St;P[St]=0,J[St]=-1;var bt=gt[St];if(bt!==null)for(gt[St]=null,St=0;St<bt.length;St++){var Ct=bt[St];Ct!==null&&(Ct.lane&=-536870913)}p&=~Et}b!==0&&Pt(s,b,0),S!==0&&w===0&&s.tag!==0&&(s.suspendedLanes|=S&~(R&~l))}function Pt(s,l,p){s.pendingLanes|=l,s.suspendedLanes&=~l;var b=31-Ee(l);s.entangledLanes|=l,s.entanglements[b]=s.entanglements[b]|1073741824|p&261930}function se(s,l){var p=s.entangledLanes|=l;for(s=s.entanglements;p;){var b=31-Ee(p),w=1<<b;w&l|s[b]&l&&(s[b]|=l),p&=~w}}function ii(s,l){var p=l&-l;return p=(p&42)!==0?1:ci(p),(p&(s.suspendedLanes|l))!==0?0:p}function ci(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 on(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Gr(){var s=q.p;return s!==0?s:(s=window.event,s===void 0?32:vS(s.type))}function ir(s,l){var p=q.p;try{return q.p=s,l()}finally{q.p=p}}var rr=Math.random().toString(36).slice(2),vi="__reactFiber$"+rr,qi="__reactProps$"+rr,kn="__reactContainer$"+rr,In="__reactEvents$"+rr,wn="__reactListeners$"+rr,Sn="__reactHandles$"+rr,Sr="__reactResources$"+rr,$n="__reactMarker$"+rr;function Ea(s){delete s[vi],delete s[qi],delete s[In],delete s[wn],delete s[Sn]}function ur(s){var l=s[vi];if(l)return l;for(var p=s.parentNode;p;){if(l=p[kn]||p[vi]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(s=nS(s);s!==null;){if(p=s[vi])return p;s=nS(s)}return l}s=p,p=s.parentNode}return null}function Yr(s){if(s=s[vi]||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 ln(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function dr(s){var l=s[Sr];return l||(l=s[Sr]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function ri(s){s[$n]=!0}var Gt=new Set,V={};function kt(s,l){dt(s,l),dt(s+"Capture",l)}function dt(s,l){for(V[s]=l,s=0;s<l.length;s++)Gt.add(l[s])}var Lt=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]*$"),It={},ee={};function je(s){return ki.call(ee,s)?!0:ki.call(It,s)?!1:Lt.test(s)?ee[s]=!0:(It[s]=!0,!1)}function ni(s,l,p){if(je(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 He(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 ji(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 xe(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ui(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=Ui(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=Ui(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 qo=/[\n"\\]/g;function Tr(s){return s.replace(qo,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Pn(s,l,p,b,w,S,R,P){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=""+xe(l)):s.value!==""+xe(l)&&(s.value=""+xe(l)):R!=="submit"&&R!=="reset"||s.removeAttribute("value"),l!=null?Bt(s,R,xe(l)):p!=null?Bt(s,R,xe(p)):b!=null&&s.removeAttribute("value"),w==null&&S!=null&&(s.defaultChecked=!!S),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?s.name=""+xe(P):s.removeAttribute("name")}function mt(s,l,p,b,w,S,R,P){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?""+xe(p):"",l=l!=null?""+xe(l):p,P||l===s.value||(s.value=l),s.defaultValue=l}b=b??w,b=typeof b!="function"&&typeof b!="symbol"&&!!b,s.checked=P?s.checked:!!b,s.defaultChecked=!!b,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(s.name=R),la(s)}function Bt(s,l,p){l==="number"&&Ja(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Mt(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=""+xe(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 qt(s,l,p){if(l!=null&&(l=""+xe(l),l!==s.value&&(s.value=l),p==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=p!=null?""+xe(p):""}function Ne(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=xe(l),s.defaultValue=p,b=s.textContent,b===p&&b!==""&&b!==null&&(s.value=b),la(s)}function $t(s,l){if(l){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=l;return}}s.textContent=l}var Ke=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 Re(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||Ke.has(l)?l==="float"?s.cssFloat=p:s[l]=(""+p).trim():s[l]=p+"px"}function $e(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&&Re(s,w,b)}else for(var S in l)l.hasOwnProperty(S)&&Re(s,S,l[S])}function Dr(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 jt(){}var Qt=null;function ke(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var ze=null,Fi=null;function Un(s){var l=Yr(s);if(l&&(s=l.stateNode)){var p=s[qi]||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="'+Tr(""+l)+'"][type="radio"]'),l=0;l<p.length;l++){var b=p[l];if(b!==s&&b.form===s.form){var w=b[qi]||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":qt(s,p.value,p.defaultValue);break t;case"select":l=p.value,l!=null&&Mt(s,!!p.multiple,l,!1)}}}var Nh=!1;function Jd(s,l,p){if(Nh)return s(l,p);Nh=!0;try{var b=s(l);return b}finally{if(Nh=!1,(ze!==null||Fi!==null)&&(Pf(),ze&&(l=ze,s=Fi,Fi=ze=null,Un(l),s)))for(l=0;l<s.length;l++)Un(s[l])}}function Ah(s,l){var p=s.stateNode;if(p===null)return null;var b=p[qi]||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"),Nm=!1;if(ts)try{var Mh={};Object.defineProperty(Mh,"passive",{get:function(){Nm=!0}}),window.addEventListener("test",Mh,Mh),window.removeEventListener("test",Mh,Mh)}catch{Nm=!1}var Hs=null,Am=null,tf=null;function ZC(){if(tf)return tf;var s,l=Am,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 tf=w.slice(s,1<b?1-b:void 0)}function ef(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 rf(){return!0}function QC(){return!1}function cn(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 P in s)s.hasOwnProperty(P)&&(p=s[P],this[P]=p?p(S):S[P]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?rf:QC,this.isPropagationStopped=QC,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=rf)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=rf)},persist:function(){},isPersistent:rf}),l}var Uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nf=cn(Uo),Bh=g({},Uo,{view:0,detail:0}),mj=cn(Bh),Mm,Bm,Lh,af=g({},Bh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Om,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!==Lh&&(Lh&&s.type==="mousemove"?(Mm=s.screenX-Lh.screenX,Bm=s.screenY-Lh.screenY):Bm=Mm=0,Lh=s),Mm)},movementY:function(s){return"movementY"in s?s.movementY:Bm}}),JC=cn(af),yj=g({},af,{dataTransfer:0}),bj=cn(yj),xj=g({},Bh,{relatedTarget:0}),Lm=cn(xj),vj=g({},Uo,{animationName:0,elapsedTime:0,pseudoElement:0}),Cj=cn(vj),_j=g({},Uo,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),kj=cn(_j),wj=g({},Uo,{data:0}),t_=cn(wj),Sj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tj={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"},Ej={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nj(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=Ej[s])?!!l[s]:!1}function Om(){return Nj}var Aj=g({},Bh,{key:function(s){if(s.key){var l=Sj[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=ef(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Tj[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Om,charCode:function(s){return s.type==="keypress"?ef(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ef(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Mj=cn(Aj),Bj=g({},af,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),e_=cn(Bj),Lj=g({},Bh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Om}),Oj=cn(Lj),Rj=g({},Uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dj=cn(Rj),jj=g({},af,{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}),Fj=cn(jj),Ij=g({},Uo,{newState:0,oldState:0}),$j=cn(Ij),zj=[9,13,27,32],Rm=ts&&"CompositionEvent"in window,Oh=null;ts&&"documentMode"in document&&(Oh=document.documentMode);var Pj=ts&&"TextEvent"in window&&!Oh,i_=ts&&(!Rm||Oh&&8<Oh&&11>=Oh),r_=" ",n_=!1;function a_(s,l){switch(s){case"keyup":return zj.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function s_(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Kl=!1;function qj(s,l){switch(s){case"compositionend":return s_(l);case"keypress":return l.which!==32?null:(n_=!0,r_);case"textInput":return s=l.data,s===r_&&n_?null:s;default:return null}}function Uj(s,l){if(Kl)return s==="compositionend"||!Rm&&a_(s,l)?(s=ZC(),tf=Am=Hs=null,Kl=!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 i_&&l.locale!=="ko"?null:l.data;default:return null}}var Hj={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 o_(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!Hj[s.type]:l==="textarea"}function l_(s,l,p,b){ze?Fi?Fi.push(b):Fi=[b]:ze=b,l=Kf(l,"onChange"),0<l.length&&(p=new nf("onChange","change",null,p,b),s.push({event:p,listeners:l}))}var Rh=null,Dh=null;function Wj(s){Hw(s,0)}function sf(s){var l=ln(s);if(Ps(l))return s}function c_(s,l){if(s==="change")return l}var h_=!1;if(ts){var Dm;if(ts){var jm="oninput"in document;if(!jm){var u_=document.createElement("div");u_.setAttribute("oninput","return;"),jm=typeof u_.oninput=="function"}Dm=jm}else Dm=!1;h_=Dm&&(!document.documentMode||9<document.documentMode)}function d_(){Rh&&(Rh.detachEvent("onpropertychange",f_),Dh=Rh=null)}function f_(s){if(s.propertyName==="value"&&sf(Dh)){var l=[];l_(l,Dh,s,ke(s)),Jd(Wj,l)}}function Gj(s,l,p){s==="focusin"?(d_(),Rh=l,Dh=p,Rh.attachEvent("onpropertychange",f_)):s==="focusout"&&d_()}function Yj(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return sf(Dh)}function Kj(s,l){if(s==="click")return sf(l)}function Vj(s,l){if(s==="input"||s==="change")return sf(l)}function Xj(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Tn=typeof Object.is=="function"?Object.is:Xj;function jh(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(!ki.call(l,w)||!Tn(s[w],l[w]))return!1}return!0}function p_(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function g_(s,l){var p=p_(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=p_(p)}}function m_(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?m_(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function y_(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 Fm(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 Zj=ts&&"documentMode"in document&&11>=document.documentMode,Vl=null,Im=null,Fh=null,$m=!1;function b_(s,l,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;$m||Vl==null||Vl!==Ja(b)||(b=Vl,"selectionStart"in b&&Fm(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}),Fh&&jh(Fh,b)||(Fh=b,b=Kf(Im,"onSelect"),0<b.length&&(l=new nf("onSelect","select",null,l,p),s.push({event:l,listeners:b}),l.target=Vl)))}function Ho(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Xl={animationend:Ho("Animation","AnimationEnd"),animationiteration:Ho("Animation","AnimationIteration"),animationstart:Ho("Animation","AnimationStart"),transitionrun:Ho("Transition","TransitionRun"),transitionstart:Ho("Transition","TransitionStart"),transitioncancel:Ho("Transition","TransitionCancel"),transitionend:Ho("Transition","TransitionEnd")},zm={},x_={};ts&&(x_=document.createElement("div").style,"AnimationEvent"in window||(delete Xl.animationend.animation,delete Xl.animationiteration.animation,delete Xl.animationstart.animation),"TransitionEvent"in window||delete Xl.transitionend.transition);function Wo(s){if(zm[s])return zm[s];if(!Xl[s])return s;var l=Xl[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in x_)return zm[s]=l[p];return s}var v_=Wo("animationend"),C_=Wo("animationiteration"),__=Wo("animationstart"),Qj=Wo("transitionrun"),Jj=Wo("transitionstart"),tF=Wo("transitioncancel"),k_=Wo("transitionend"),w_=new Map,Pm="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(" ");Pm.push("scrollEnd");function ca(s,l){w_.set(s,l),kt(l,[s])}var of=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=[],Zl=0,qm=0;function lf(){for(var s=Zl,l=qm=Zl=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&&S_(p,w,S)}}function cf(s,l,p,b){Hn[Zl++]=s,Hn[Zl++]=l,Hn[Zl++]=p,Hn[Zl++]=b,qm|=b,s.lanes|=b,s=s.alternate,s!==null&&(s.lanes|=b)}function Um(s,l,p,b){return cf(s,l,p,b),hf(s)}function Go(s,l){return cf(s,null,null,l),hf(s)}function S_(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-Ee(p),s=S.hiddenUpdates,b=s[w],b===null?s[w]=[l]:b.push(l),l.lane=p|536870912),S):null}function hf(s){if(50<au)throw au=0,Qy=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Ql={};function eF(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 eF(s,l,p,b)}function Hm(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 T_(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 uf(s,l,p,b,w,S){var R=0;if(b=s,typeof s=="function")Hm(s)&&(R=1);else if(typeof s=="string")R=s4(s,p,Q.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case z:return s=En(31,p,l,w),s.elementType=z,s.lanes=S,s;case C:return Yo(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 L:return s=En(13,p,l,w),s.elementType=L,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 E:R=10;break t;case T:R=9;break t;case N: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 Yo(s,l,p,b){return s=En(7,s,b,l),s.lanes=p,s}function Wm(s,l,p){return s=En(6,s,null,l),s.lanes=p,s}function E_(s){var l=En(18,null,null,0);return l.stateNode=s,l}function Gm(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 N_=new WeakMap;function Wn(s,l){if(typeof s=="object"&&s!==null){var p=N_.get(s);return p!==void 0?p:(l={value:s,source:l,stack:ti(l)},N_.set(s,l),l)}return{value:s,source:l,stack:ti(l)}}var Jl=[],tc=0,df=null,Ih=0,Gn=[],Yn=0,Ws=null,Na=1,Aa="";function is(s,l){Jl[tc++]=Ih,Jl[tc++]=df,df=s,Ih=l}function A_(s,l,p){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Ws=s;var b=Na;s=Aa;var w=32-Ee(b)-1;b&=~(1<<w),p+=1;var S=32-Ee(l)+w;if(30<S){var R=w-w%5;S=(b&(1<<R)-1).toString(32),b>>=R,w-=R,Na=1<<32-Ee(l)+w|p<<w|b,Aa=S+s}else Na=1<<S|p<<w|b,Aa=s}function Ym(s){s.return!==null&&(is(s,1),A_(s,1,0))}function Km(s){for(;s===df;)df=Jl[--tc],Jl[tc]=null,Ih=Jl[--tc],Jl[tc]=null;for(;s===Ws;)Ws=Gn[--Yn],Gn[Yn]=null,Aa=Gn[--Yn],Gn[Yn]=null,Na=Gn[--Yn],Gn[Yn]=null}function M_(s,l){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Na=l.id,Aa=l.overflow,Ws=s}var Er=null,wi=null,We=!1,Gs=null,Kn=!1,Vm=Error(n(519));function Ys(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $h(Wn(l,s)),Vm}function B_(s){var l=s.stateNode,p=s.type,b=s.memoizedProps;switch(l[vi]=s,l[qi]=b,p){case"dialog":Ie("cancel",l),Ie("close",l);break;case"iframe":case"object":case"embed":Ie("load",l);break;case"video":case"audio":for(p=0;p<ou.length;p++)Ie(ou[p],l);break;case"source":Ie("error",l);break;case"img":case"image":case"link":Ie("error",l),Ie("load",l);break;case"details":Ie("toggle",l);break;case"input":Ie("invalid",l),mt(l,b.value,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name,!0);break;case"select":Ie("invalid",l);break;case"textarea":Ie("invalid",l),Ne(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||Kw(l.textContent,p)?(b.popover!=null&&(Ie("beforetoggle",l),Ie("toggle",l)),b.onScroll!=null&&Ie("scroll",l),b.onScrollEnd!=null&&Ie("scrollend",l),b.onClick!=null&&(l.onclick=jt),l=!0):l=!1,l||Ys(s,!0)}function L_(s){for(Er=s.return;Er;)switch(Er.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Er=Er.return}}function ec(s){if(s!==Er)return!1;if(!We)return L_(s),We=!0,!1;var l=s.tag,p;if((p=l!==3&&l!==27)&&((p=l===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||fb(s.type,s.memoizedProps)),p=!p),p&&wi&&Ys(s),L_(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));wi=rS(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));wi=rS(s)}else l===27?(l=wi,oo(s.type)?(s=bb,bb=null,wi=s):wi=l):wi=Er?Xn(s.stateNode.nextSibling):null;return!0}function Ko(){wi=Er=null,We=!1}function Xm(){var s=Gs;return s!==null&&(fn===null?fn=s:fn.push.apply(fn,s),Gs=null),s}function $h(s){Gs===null?Gs=[s]:Gs.push(s)}var Zm=H(null),Vo=null,rs=null;function Ks(s,l,p){ft(Zm,l._currentValue),l._currentValue=p}function ns(s){s._currentValue=Zm.current,rt(Zm)}function Qm(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 Jm(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 P=S;S=w;for(var J=0;J<l.length;J++)if(P.context===l[J]){S.lanes|=p,P=S.alternate,P!==null&&(P.lanes|=p),Qm(S.return,p,s),b||(R=null);break t}S=P.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),Qm(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 ic(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 P=w.type;Tn(w.pendingProps.value,R.value)||(s!==null?s.push(P):s=[P])}}else if(w===X.current){if(R=w.alternate,R===null)throw Error(n(387));R.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(du):s=[du])}w=w.return}s!==null&&Jm(l,s,p,b),l.flags|=262144}function ff(s){for(s=s.firstContext;s!==null;){if(!Tn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Xo(s){Vo=s,rs=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Nr(s){return O_(Vo,s)}function pf(s,l){return Vo===null&&Xo(s),O_(s,l)}function O_(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 iF=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()})}},rF=i.unstable_scheduleCallback,nF=i.unstable_NormalPriority,nr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ty(){return{controller:new iF,data:new Map,refCount:0}}function zh(s){s.refCount--,s.refCount===0&&rF(nF,function(){s.controller.abort()})}var Ph=null,ey=0,rc=0,nc=null;function aF(s,l){if(Ph===null){var p=Ph=[];ey=0,rc=nb(),nc={status:"pending",value:void 0,then:function(b){p.push(b)}}}return ey++,l.then(R_,R_),l}function R_(){if(--ey===0&&Ph!==null){nc!==null&&(nc.status="fulfilled");var s=Ph;Ph=null,rc=0,nc=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function sF(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 D_=j.S;j.S=function(s,l){bw=ye(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&aF(s,l),D_!==null&&D_(s,l)};var Zo=H(null);function iy(){var s=Zo.current;return s!==null?s:Ci.pooledCache}function gf(s,l){l===null?ft(Zo,Zo.current):ft(Zo,l.pool)}function j_(){var s=iy();return s===null?null:{parent:nr._currentValue,pool:s}}var ac=Error(n(460)),ry=Error(n(474)),mf=Error(n(542)),yf={then:function(){}};function F_(s){return s=s.status,s==="fulfilled"||s==="rejected"}function I_(s,l,p){switch(p=s[p],p===void 0?s.push(l):p!==l&&(l.then(jt,jt),l=p),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,z_(s),s;default:if(typeof l.status=="string")l.then(jt,jt);else{if(s=Ci,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,z_(s),s}throw Jo=l,ac}}function Qo(s){try{var l=s._init;return l(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(Jo=p,ac):p}}var Jo=null;function $_(){if(Jo===null)throw Error(n(459));var s=Jo;return Jo=null,s}function z_(s){if(s===ac||s===mf)throw Error(n(483))}var sc=null,qh=0;function bf(s){var l=qh;return qh+=1,sc===null&&(sc=[]),I_(sc,s,l)}function Uh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function xf(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 P_(s){function l(ut,at){if(s){var pt=ut.deletions;pt===null?(ut.deletions=[at],ut.flags|=16):pt.push(at)}}function p(ut,at){if(!s)return null;for(;at!==null;)l(ut,at),at=at.sibling;return null}function b(ut){for(var at=new Map;ut!==null;)ut.key!==null?at.set(ut.key,ut):at.set(ut.index,ut),ut=ut.sibling;return at}function w(ut,at){return ut=es(ut,at),ut.index=0,ut.sibling=null,ut}function S(ut,at,pt){return ut.index=pt,s?(pt=ut.alternate,pt!==null?(pt=pt.index,pt<at?(ut.flags|=67108866,at):pt):(ut.flags|=67108866,at)):(ut.flags|=1048576,at)}function R(ut){return s&&ut.alternate===null&&(ut.flags|=67108866),ut}function P(ut,at,pt,Tt){return at===null||at.tag!==6?(at=Wm(pt,ut.mode,Tt),at.return=ut,at):(at=w(at,pt),at.return=ut,at)}function J(ut,at,pt,Tt){var oe=pt.type;return oe===C?St(ut,at,pt.props.children,Tt,pt.key):at!==null&&(at.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===M&&Qo(oe)===at.type)?(at=w(at,pt.props),Uh(at,pt),at.return=ut,at):(at=uf(pt.type,pt.key,pt.props,null,ut.mode,Tt),Uh(at,pt),at.return=ut,at)}function gt(ut,at,pt,Tt){return at===null||at.tag!==4||at.stateNode.containerInfo!==pt.containerInfo||at.stateNode.implementation!==pt.implementation?(at=Gm(pt,ut.mode,Tt),at.return=ut,at):(at=w(at,pt.children||[]),at.return=ut,at)}function St(ut,at,pt,Tt,oe){return at===null||at.tag!==7?(at=Yo(pt,ut.mode,Tt,oe),at.return=ut,at):(at=w(at,pt),at.return=ut,at)}function Et(ut,at,pt){if(typeof at=="string"&&at!==""||typeof at=="number"||typeof at=="bigint")return at=Wm(""+at,ut.mode,pt),at.return=ut,at;if(typeof at=="object"&&at!==null){switch(at.$$typeof){case y:return pt=uf(at.type,at.key,at.props,null,ut.mode,pt),Uh(pt,at),pt.return=ut,pt;case v:return at=Gm(at,ut.mode,pt),at.return=ut,at;case M:return at=Qo(at),Et(ut,at,pt)}if(W(at)||U(at))return at=Yo(at,ut.mode,pt,null),at.return=ut,at;if(typeof at.then=="function")return Et(ut,bf(at),pt);if(at.$$typeof===E)return Et(ut,pf(ut,at),pt);xf(ut,at)}return null}function bt(ut,at,pt,Tt){var oe=at!==null?at.key:null;if(typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint")return oe!==null?null:P(ut,at,""+pt,Tt);if(typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case y:return pt.key===oe?J(ut,at,pt,Tt):null;case v:return pt.key===oe?gt(ut,at,pt,Tt):null;case M:return pt=Qo(pt),bt(ut,at,pt,Tt)}if(W(pt)||U(pt))return oe!==null?null:St(ut,at,pt,Tt,null);if(typeof pt.then=="function")return bt(ut,at,bf(pt),Tt);if(pt.$$typeof===E)return bt(ut,at,pf(ut,pt),Tt);xf(ut,pt)}return null}function Ct(ut,at,pt,Tt,oe){if(typeof Tt=="string"&&Tt!==""||typeof Tt=="number"||typeof Tt=="bigint")return ut=ut.get(pt)||null,P(at,ut,""+Tt,oe);if(typeof Tt=="object"&&Tt!==null){switch(Tt.$$typeof){case y:return ut=ut.get(Tt.key===null?pt:Tt.key)||null,J(at,ut,Tt,oe);case v:return ut=ut.get(Tt.key===null?pt:Tt.key)||null,gt(at,ut,Tt,oe);case M:return Tt=Qo(Tt),Ct(ut,at,pt,Tt,oe)}if(W(Tt)||U(Tt))return ut=ut.get(pt)||null,St(at,ut,Tt,oe,null);if(typeof Tt.then=="function")return Ct(ut,at,pt,bf(Tt),oe);if(Tt.$$typeof===E)return Ct(ut,at,pt,pf(at,Tt),oe);xf(at,Tt)}return null}function Kt(ut,at,pt,Tt){for(var oe=null,Ve=null,Jt=at,Ae=at=0,qe=null;Jt!==null&&Ae<pt.length;Ae++){Jt.index>Ae?(qe=Jt,Jt=null):qe=Jt.sibling;var Xe=bt(ut,Jt,pt[Ae],Tt);if(Xe===null){Jt===null&&(Jt=qe);break}s&&Jt&&Xe.alternate===null&&l(ut,Jt),at=S(Xe,at,Ae),Ve===null?oe=Xe:Ve.sibling=Xe,Ve=Xe,Jt=qe}if(Ae===pt.length)return p(ut,Jt),We&&is(ut,Ae),oe;if(Jt===null){for(;Ae<pt.length;Ae++)Jt=Et(ut,pt[Ae],Tt),Jt!==null&&(at=S(Jt,at,Ae),Ve===null?oe=Jt:Ve.sibling=Jt,Ve=Jt);return We&&is(ut,Ae),oe}for(Jt=b(Jt);Ae<pt.length;Ae++)qe=Ct(Jt,ut,Ae,pt[Ae],Tt),qe!==null&&(s&&qe.alternate!==null&&Jt.delete(qe.key===null?Ae:qe.key),at=S(qe,at,Ae),Ve===null?oe=qe:Ve.sibling=qe,Ve=qe);return s&&Jt.forEach(function(fo){return l(ut,fo)}),We&&is(ut,Ae),oe}function de(ut,at,pt,Tt){if(pt==null)throw Error(n(151));for(var oe=null,Ve=null,Jt=at,Ae=at=0,qe=null,Xe=pt.next();Jt!==null&&!Xe.done;Ae++,Xe=pt.next()){Jt.index>Ae?(qe=Jt,Jt=null):qe=Jt.sibling;var fo=bt(ut,Jt,Xe.value,Tt);if(fo===null){Jt===null&&(Jt=qe);break}s&&Jt&&fo.alternate===null&&l(ut,Jt),at=S(fo,at,Ae),Ve===null?oe=fo:Ve.sibling=fo,Ve=fo,Jt=qe}if(Xe.done)return p(ut,Jt),We&&is(ut,Ae),oe;if(Jt===null){for(;!Xe.done;Ae++,Xe=pt.next())Xe=Et(ut,Xe.value,Tt),Xe!==null&&(at=S(Xe,at,Ae),Ve===null?oe=Xe:Ve.sibling=Xe,Ve=Xe);return We&&is(ut,Ae),oe}for(Jt=b(Jt);!Xe.done;Ae++,Xe=pt.next())Xe=Ct(Jt,ut,Ae,Xe.value,Tt),Xe!==null&&(s&&Xe.alternate!==null&&Jt.delete(Xe.key===null?Ae:Xe.key),at=S(Xe,at,Ae),Ve===null?oe=Xe:Ve.sibling=Xe,Ve=Xe);return s&&Jt.forEach(function(y4){return l(ut,y4)}),We&&is(ut,Ae),oe}function mi(ut,at,pt,Tt){if(typeof pt=="object"&&pt!==null&&pt.type===C&&pt.key===null&&(pt=pt.props.children),typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case y:t:{for(var oe=pt.key;at!==null;){if(at.key===oe){if(oe=pt.type,oe===C){if(at.tag===7){p(ut,at.sibling),Tt=w(at,pt.props.children),Tt.return=ut,ut=Tt;break t}}else if(at.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===M&&Qo(oe)===at.type){p(ut,at.sibling),Tt=w(at,pt.props),Uh(Tt,pt),Tt.return=ut,ut=Tt;break t}p(ut,at);break}else l(ut,at);at=at.sibling}pt.type===C?(Tt=Yo(pt.props.children,ut.mode,Tt,pt.key),Tt.return=ut,ut=Tt):(Tt=uf(pt.type,pt.key,pt.props,null,ut.mode,Tt),Uh(Tt,pt),Tt.return=ut,ut=Tt)}return R(ut);case v:t:{for(oe=pt.key;at!==null;){if(at.key===oe)if(at.tag===4&&at.stateNode.containerInfo===pt.containerInfo&&at.stateNode.implementation===pt.implementation){p(ut,at.sibling),Tt=w(at,pt.children||[]),Tt.return=ut,ut=Tt;break t}else{p(ut,at);break}else l(ut,at);at=at.sibling}Tt=Gm(pt,ut.mode,Tt),Tt.return=ut,ut=Tt}return R(ut);case M:return pt=Qo(pt),mi(ut,at,pt,Tt)}if(W(pt))return Kt(ut,at,pt,Tt);if(U(pt)){if(oe=U(pt),typeof oe!="function")throw Error(n(150));return pt=oe.call(pt),de(ut,at,pt,Tt)}if(typeof pt.then=="function")return mi(ut,at,bf(pt),Tt);if(pt.$$typeof===E)return mi(ut,at,pf(ut,pt),Tt);xf(ut,pt)}return typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint"?(pt=""+pt,at!==null&&at.tag===6?(p(ut,at.sibling),Tt=w(at,pt),Tt.return=ut,ut=Tt):(p(ut,at),Tt=Wm(pt,ut.mode,Tt),Tt.return=ut,ut=Tt),R(ut)):p(ut,at)}return function(ut,at,pt,Tt){try{qh=0;var oe=mi(ut,at,pt,Tt);return sc=null,oe}catch(Jt){if(Jt===ac||Jt===mf)throw Jt;var Ve=En(29,Jt,null,ut.mode);return Ve.lanes=Tt,Ve.return=ut,Ve}finally{}}}var tl=P_(!0),q_=P_(!1),Vs=!1;function ny(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ay(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,(Je&2)!==0){var w=b.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),b.pending=l,l=hf(s),S_(s,null,p),l}return cf(s,b,l,p),hf(s)}function Hh(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,se(s,p)}}function sy(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 oy=!1;function Wh(){if(oy){var s=nc;if(s!==null)throw s}}function Gh(s,l,p,b){oy=!1;var w=s.updateQueue;Vs=!1;var S=w.firstBaseUpdate,R=w.lastBaseUpdate,P=w.shared.pending;if(P!==null){w.shared.pending=null;var J=P,gt=J.next;J.next=null,R===null?S=gt:R.next=gt,R=J;var St=s.alternate;St!==null&&(St=St.updateQueue,P=St.lastBaseUpdate,P!==R&&(P===null?St.firstBaseUpdate=gt:P.next=gt,St.lastBaseUpdate=J))}if(S!==null){var Et=w.baseState;R=0,St=gt=J=null,P=S;do{var bt=P.lane&-536870913,Ct=bt!==P.lane;if(Ct?(Pe&bt)===bt:(b&bt)===bt){bt!==0&&bt===rc&&(oy=!0),St!==null&&(St=St.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});t:{var Kt=s,de=P;bt=l;var mi=p;switch(de.tag){case 1:if(Kt=de.payload,typeof Kt=="function"){Et=Kt.call(mi,Et,bt);break t}Et=Kt;break t;case 3:Kt.flags=Kt.flags&-65537|128;case 0:if(Kt=de.payload,bt=typeof Kt=="function"?Kt.call(mi,Et,bt):Kt,bt==null)break t;Et=g({},Et,bt);break t;case 2:Vs=!0}}bt=P.callback,bt!==null&&(s.flags|=64,Ct&&(s.flags|=8192),Ct=w.callbacks,Ct===null?w.callbacks=[bt]:Ct.push(bt))}else Ct={lane:bt,tag:P.tag,payload:P.payload,callback:P.callback,next:null},St===null?(gt=St=Ct,J=Et):St=St.next=Ct,R|=bt;if(P=P.next,P===null){if(P=w.shared.pending,P===null)break;Ct=P,P=Ct.next,Ct.next=null,w.lastBaseUpdate=Ct,w.shared.pending=null}}while(!0);St===null&&(J=Et),w.baseState=J,w.firstBaseUpdate=gt,w.lastBaseUpdate=St,S===null&&(w.shared.lanes=0),io|=R,s.lanes=R,s.memoizedState=Et}}function U_(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function H_(s,l){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)U_(p[s],l)}var oc=H(null),vf=H(0);function W_(s,l){s=fs,ft(vf,s),ft(oc,l),fs=s|l.baseLanes}function ly(){ft(vf,fs),ft(oc,oc.current)}function cy(){fs=vf.current,rt(oc),rt(vf)}var Nn=H(null),Vn=null;function Qs(s){var l=s.alternate;ft(Zi,Zi.current&1),ft(Nn,s),Vn===null&&(l===null||oc.current!==null||l.memoizedState!==null)&&(Vn=s)}function hy(s){ft(Zi,Zi.current),ft(Nn,s),Vn===null&&(Vn=s)}function G_(s){s.tag===22?(ft(Zi,Zi.current),ft(Nn,s),Vn===null&&(Vn=s)):Js()}function Js(){ft(Zi,Zi.current),ft(Nn,Nn.current)}function An(s){rt(Nn),Vn===s&&(Vn=null),rt(Zi)}var Zi=H(0);function Cf(s){for(var l=s;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||mb(p)||yb(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,Te=null,pi=null,ar=null,_f=!1,lc=!1,el=!1,kf=0,Yh=0,cc=null,oF=0;function Hi(){throw Error(n(321))}function uy(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 dy(s,l,p,b,w,S){return as=S,Te=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,j.H=s===null||s.memoizedState===null?Ak:Ey,el=!1,S=p(b,w),el=!1,lc&&(S=K_(l,p,b,w)),Y_(s),S}function Y_(s){j.H=Xh;var l=pi!==null&&pi.next!==null;if(as=0,ar=pi=Te=null,_f=!1,Yh=0,cc=null,l)throw Error(n(300));s===null||sr||(s=s.dependencies,s!==null&&ff(s)&&(sr=!0))}function K_(s,l,p,b){Te=s;var w=0;do{if(lc&&(cc=null),Yh=0,lc=!1,25<=w)throw Error(n(301));if(w+=1,ar=pi=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=Mk,S=l(p,b)}while(lc);return S}function lF(){var s=j.H,l=s.useState()[0];return l=typeof l.then=="function"?Kh(l):l,s=s.useState()[0],(pi!==null?pi.memoizedState:null)!==s&&(Te.flags|=1024),l}function fy(){var s=kf!==0;return kf=0,s}function py(s,l,p){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~p}function gy(s){if(_f){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}_f=!1}as=0,ar=pi=Te=null,lc=!1,Yh=kf=0,cc=null}function Kr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ar===null?Te.memoizedState=ar=s:ar=ar.next=s,ar}function Qi(){if(pi===null){var s=Te.alternate;s=s!==null?s.memoizedState:null}else s=pi.next;var l=ar===null?Te.memoizedState:ar.next;if(l!==null)ar=l,pi=s;else{if(s===null)throw Te.alternate===null?Error(n(467)):Error(n(310));pi=s,s={memoizedState:pi.memoizedState,baseState:pi.baseState,baseQueue:pi.baseQueue,queue:pi.queue,next:null},ar===null?Te.memoizedState=ar=s:ar=ar.next=s}return ar}function wf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kh(s){var l=Yh;return Yh+=1,cc===null&&(cc=[]),s=I_(cc,s,l),l=Te,(ar===null?l.memoizedState:ar.next)===null&&(l=l.alternate,j.H=l===null||l.memoizedState===null?Ak:Ey),s}function Sf(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Kh(s);if(s.$$typeof===E)return Nr(s)}throw Error(n(438,String(s)))}function my(s){var l=null,p=Te.updateQueue;if(p!==null&&(l=p.memoCache),l==null){var b=Te.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=wf(),Te.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 Tf(s){var l=Qi();return yy(l,pi,s)}function yy(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 P=R=null,J=null,gt=l,St=!1;do{var Et=gt.lane&-536870913;if(Et!==gt.lane?(Pe&Et)===Et:(as&Et)===Et){var bt=gt.revertLane;if(bt===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:gt.action,hasEagerState:gt.hasEagerState,eagerState:gt.eagerState,next:null}),Et===rc&&(St=!0);else if((as&bt)===bt){gt=gt.next,bt===rc&&(St=!0);continue}else Et={lane:0,revertLane:gt.revertLane,gesture:null,action:gt.action,hasEagerState:gt.hasEagerState,eagerState:gt.eagerState,next:null},J===null?(P=J=Et,R=S):J=J.next=Et,Te.lanes|=bt,io|=bt;Et=gt.action,el&&p(S,Et),S=gt.hasEagerState?gt.eagerState:p(S,Et)}else bt={lane:Et,revertLane:gt.revertLane,gesture:gt.gesture,action:gt.action,hasEagerState:gt.hasEagerState,eagerState:gt.eagerState,next:null},J===null?(P=J=bt,R=S):J=J.next=bt,Te.lanes|=Et,io|=Et;gt=gt.next}while(gt!==null&>!==l);if(J===null?R=S:J.next=P,!Tn(S,s.memoizedState)&&(sr=!0,St&&(p=nc,p!==null)))throw p;s.memoizedState=S,s.baseState=R,s.baseQueue=J,b.lastRenderedState=S}return w===null&&(b.lanes=0),[s.memoizedState,b.dispatch]}function by(s){var l=Qi(),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)||(sr=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),p.lastRenderedState=S}return[S,b]}function V_(s,l,p){var b=Te,w=Qi(),S=We;if(S){if(p===void 0)throw Error(n(407));p=p()}else p=l();var R=!Tn((pi||w).memoizedState,p);if(R&&(w.memoizedState=p,sr=!0),w=w.queue,Cy(Q_.bind(null,b,w,s),[s]),w.getSnapshot!==l||R||ar!==null&&ar.memoizedState.tag&1){if(b.flags|=2048,hc(9,{destroy:void 0},Z_.bind(null,b,w,p,l),null),Ci===null)throw Error(n(349));S||(as&127)!==0||X_(b,l,p)}return p}function X_(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=Te.updateQueue,l===null?(l=wf(),Te.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function Z_(s,l,p,b){l.value=p,l.getSnapshot=b,J_(l)&&tk(s)}function Q_(s,l,p){return p(function(){J_(l)&&tk(s)})}function J_(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!Tn(s,p)}catch{return!0}}function tk(s){var l=Go(s,2);l!==null&&pn(l,s,2)}function xy(s){var l=Kr();if(typeof s=="function"){var p=s;if(s=p(),el){Ue(!0);try{p()}finally{Ue(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:s},l}function ek(s,l,p,b){return s.baseState=p,yy(s,pi,typeof b=="function"?b:ss)}function cF(s,l,p,b,w){if(Af(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,ik(l,S)):(S.next=p.next,l.pending=p.next=S)}}function ik(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 P=p(w,b),J=j.S;J!==null&&J(R,P),rk(s,l,P)}catch(gt){vy(s,l,gt)}finally{S!==null&&R.types!==null&&(S.types=R.types),j.T=S}}else try{S=p(w,b),rk(s,l,S)}catch(gt){vy(s,l,gt)}}function rk(s,l,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(b){nk(s,l,b)},function(b){return vy(s,l,b)}):nk(s,l,p)}function nk(s,l,p){l.status="fulfilled",l.value=p,ak(l),s.state=p,l=s.pending,l!==null&&(p=l.next,p===l?s.pending=null:(p=p.next,l.next=p,ik(s,p)))}function vy(s,l,p){var b=s.pending;if(s.pending=null,b!==null){b=b.next;do l.status="rejected",l.reason=p,ak(l),l=l.next;while(l!==b)}s.action=null}function ak(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function sk(s,l){return l}function ok(s,l){if(We){var p=Ci.formState;if(p!==null){t:{var b=Te;if(We){if(wi){e:{for(var w=wi,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){wi=Xn(w.nextSibling),b=w.data==="F!";break t}}Ys(b)}b=!1}b&&(l=p[0])}}return p=Kr(),p.memoizedState=p.baseState=l,b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sk,lastRenderedState:l},p.queue=b,p=Tk.bind(null,Te,b),b.dispatch=p,b=xy(!1),S=Ty.bind(null,Te,!1,b.queue),b=Kr(),w={state:l,dispatch:null,action:s,pending:null},b.queue=w,p=cF.bind(null,Te,w,S,p),w.dispatch=p,b.memoizedState=s,[l,p,!1]}function lk(s){var l=Qi();return ck(l,pi,s)}function ck(s,l,p){if(l=yy(s,l,sk)[0],s=Tf(ss)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var b=Kh(l)}catch(R){throw R===ac?mf:R}else b=l;l=Qi();var w=l.queue,S=w.dispatch;return p!==l.memoizedState&&(Te.flags|=2048,hc(9,{destroy:void 0},hF.bind(null,w,p),null)),[b,S,s]}function hF(s,l){s.action=l}function hk(s){var l=Qi(),p=pi;if(p!==null)return ck(l,p,s);Qi(),l=l.memoizedState,p=Qi();var b=p.queue.dispatch;return p.memoizedState=s,[l,b,!1]}function hc(s,l,p,b){return s={tag:s,create:p,deps:b,inst:l,next:null},l=Te.updateQueue,l===null&&(l=wf(),Te.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 uk(){return Qi().memoizedState}function Ef(s,l,p,b){var w=Kr();Te.flags|=s,w.memoizedState=hc(1|l,{destroy:void 0},p,b===void 0?null:b)}function Nf(s,l,p,b){var w=Qi();b=b===void 0?null:b;var S=w.memoizedState.inst;pi!==null&&b!==null&&uy(b,pi.memoizedState.deps)?w.memoizedState=hc(l,S,p,b):(Te.flags|=s,w.memoizedState=hc(1|l,S,p,b))}function dk(s,l){Ef(8390656,8,s,l)}function Cy(s,l){Nf(2048,8,s,l)}function uF(s){Te.flags|=4;var l=Te.updateQueue;if(l===null)l=wf(),Te.updateQueue=l,l.events=[s];else{var p=l.events;p===null?l.events=[s]:p.push(s)}}function fk(s){var l=Qi().memoizedState;return uF({ref:l,nextImpl:s}),function(){if((Je&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function pk(s,l){return Nf(4,2,s,l)}function gk(s,l){return Nf(4,4,s,l)}function mk(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 yk(s,l,p){p=p!=null?p.concat([s]):null,Nf(4,4,mk.bind(null,l,s),p)}function _y(){}function bk(s,l){var p=Qi();l=l===void 0?null:l;var b=p.memoizedState;return l!==null&&uy(l,b[1])?b[0]:(p.memoizedState=[s,l],s)}function xk(s,l){var p=Qi();l=l===void 0?null:l;var b=p.memoizedState;if(l!==null&&uy(l,b[1]))return b[0];if(b=s(),el){Ue(!0);try{s()}finally{Ue(!1)}}return p.memoizedState=[b,l],b}function ky(s,l,p){return p===void 0||(as&1073741824)!==0&&(Pe&261930)===0?s.memoizedState=l:(s.memoizedState=p,s=vw(),Te.lanes|=s,io|=s,p)}function vk(s,l,p,b){return Tn(p,l)?p:oc.current!==null?(s=ky(s,p,b),Tn(s,l)||(sr=!0),s):(as&42)===0||(as&1073741824)!==0&&(Pe&261930)===0?(sr=!0,s.memoizedState=p):(s=vw(),Te.lanes|=s,io|=s,l)}function Ck(s,l,p,b,w){var S=q.p;q.p=S!==0&&8>S?S:8;var R=j.T,P={};j.T=P,Ty(s,!1,l,p);try{var J=w(),gt=j.S;if(gt!==null&>(P,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var St=sF(J,b);Vh(s,l,St,Ln(s))}else Vh(s,l,b,Ln(s))}catch(Et){Vh(s,l,{then:function(){},status:"rejected",reason:Et},Ln())}finally{q.p=S,R!==null&&P.types!==null&&(R.types=P.types),j.T=R}}function dF(){}function wy(s,l,p,b){if(s.tag!==5)throw Error(n(476));var w=_k(s).queue;Ck(s,w,l,G,p===null?dF:function(){return kk(s),p(b)})}function _k(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:G},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 kk(s){var l=_k(s);l.next===null&&(l=s.alternate.memoizedState),Vh(s,l.next.queue,{},Ln())}function Sy(){return Nr(du)}function wk(){return Qi().memoizedState}function Sk(){return Qi().memoizedState}function fF(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&&(pn(b,l,p),Hh(b,l,p)),l={cache:ty()},s.payload=l;return}l=l.return}}function pF(s,l,p){var b=Ln();p={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Af(s)?Ek(l,p):(p=Um(s,l,p,b),p!==null&&(pn(p,s,b),Nk(p,l,b)))}function Tk(s,l,p){var b=Ln();Vh(s,l,p,b)}function Vh(s,l,p,b){var w={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Af(s))Ek(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,P=S(R,p);if(w.hasEagerState=!0,w.eagerState=P,Tn(P,R))return cf(s,l,w,0),Ci===null&&lf(),!1}catch{}finally{}if(p=Um(s,l,w,b),p!==null)return pn(p,s,b),Nk(p,l,b),!0}return!1}function Ty(s,l,p,b){if(b={lane:2,revertLane:nb(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Af(s)){if(l)throw Error(n(479))}else l=Um(s,p,b,2),l!==null&&pn(l,s,2)}function Af(s){var l=s.alternate;return s===Te||l!==null&&l===Te}function Ek(s,l){lc=_f=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function Nk(s,l,p){if((p&4194048)!==0){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,se(s,p)}}var Xh={readContext:Nr,use:Sf,useCallback:Hi,useContext:Hi,useEffect:Hi,useImperativeHandle:Hi,useLayoutEffect:Hi,useInsertionEffect:Hi,useMemo:Hi,useReducer:Hi,useRef:Hi,useState:Hi,useDebugValue:Hi,useDeferredValue:Hi,useTransition:Hi,useSyncExternalStore:Hi,useId:Hi,useHostTransitionStatus:Hi,useFormState:Hi,useActionState:Hi,useOptimistic:Hi,useMemoCache:Hi,useCacheRefresh:Hi};Xh.useEffectEvent=Hi;var Ak={readContext:Nr,use:Sf,useCallback:function(s,l){return Kr().memoizedState=[s,l===void 0?null:l],s},useContext:Nr,useEffect:dk,useImperativeHandle:function(s,l,p){p=p!=null?p.concat([s]):null,Ef(4194308,4,mk.bind(null,l,s),p)},useLayoutEffect:function(s,l){return Ef(4194308,4,s,l)},useInsertionEffect:function(s,l){Ef(4,2,s,l)},useMemo:function(s,l){var p=Kr();l=l===void 0?null:l;var b=s();if(el){Ue(!0);try{s()}finally{Ue(!1)}}return p.memoizedState=[b,l],b},useReducer:function(s,l,p){var b=Kr();if(p!==void 0){var w=p(l);if(el){Ue(!0);try{p(l)}finally{Ue(!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=pF.bind(null,Te,s),[b.memoizedState,s]},useRef:function(s){var l=Kr();return s={current:s},l.memoizedState=s},useState:function(s){s=xy(s);var l=s.queue,p=Tk.bind(null,Te,l);return l.dispatch=p,[s.memoizedState,p]},useDebugValue:_y,useDeferredValue:function(s,l){var p=Kr();return ky(p,s,l)},useTransition:function(){var s=xy(!1);return s=Ck.bind(null,Te,s.queue,!0,!1),Kr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,p){var b=Te,w=Kr();if(We){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),Ci===null)throw Error(n(349));(Pe&127)!==0||X_(b,l,p)}w.memoizedState=p;var S={value:p,getSnapshot:l};return w.queue=S,dk(Q_.bind(null,b,S,s),[s]),b.flags|=2048,hc(9,{destroy:void 0},Z_.bind(null,b,S,p,l),null),p},useId:function(){var s=Kr(),l=Ci.identifierPrefix;if(We){var p=Aa,b=Na;p=(b&~(1<<32-Ee(b)-1)).toString(32)+p,l="_"+l+"R_"+p,p=kf++,0<p&&(l+="H"+p.toString(32)),l+="_"}else p=oF++,l="_"+l+"r_"+p.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Sy,useFormState:ok,useActionState:ok,useOptimistic:function(s){var l=Kr();l.memoizedState=l.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=p,l=Ty.bind(null,Te,!0,p),p.dispatch=l,[s,l]},useMemoCache:my,useCacheRefresh:function(){return Kr().memoizedState=fF.bind(null,Te)},useEffectEvent:function(s){var l=Kr(),p={impl:s};return l.memoizedState=p,function(){if((Je&2)!==0)throw Error(n(440));return p.impl.apply(void 0,arguments)}}},Ey={readContext:Nr,use:Sf,useCallback:bk,useContext:Nr,useEffect:Cy,useImperativeHandle:yk,useInsertionEffect:pk,useLayoutEffect:gk,useMemo:xk,useReducer:Tf,useRef:uk,useState:function(){return Tf(ss)},useDebugValue:_y,useDeferredValue:function(s,l){var p=Qi();return vk(p,pi.memoizedState,s,l)},useTransition:function(){var s=Tf(ss)[0],l=Qi().memoizedState;return[typeof s=="boolean"?s:Kh(s),l]},useSyncExternalStore:V_,useId:wk,useHostTransitionStatus:Sy,useFormState:lk,useActionState:lk,useOptimistic:function(s,l){var p=Qi();return ek(p,pi,s,l)},useMemoCache:my,useCacheRefresh:Sk};Ey.useEffectEvent=fk;var Mk={readContext:Nr,use:Sf,useCallback:bk,useContext:Nr,useEffect:Cy,useImperativeHandle:yk,useInsertionEffect:pk,useLayoutEffect:gk,useMemo:xk,useReducer:by,useRef:uk,useState:function(){return by(ss)},useDebugValue:_y,useDeferredValue:function(s,l){var p=Qi();return pi===null?ky(p,s,l):vk(p,pi.memoizedState,s,l)},useTransition:function(){var s=by(ss)[0],l=Qi().memoizedState;return[typeof s=="boolean"?s:Kh(s),l]},useSyncExternalStore:V_,useId:wk,useHostTransitionStatus:Sy,useFormState:hk,useActionState:hk,useOptimistic:function(s,l){var p=Qi();return pi!==null?ek(p,pi,s,l):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:my,useCacheRefresh:Sk};Mk.useEffectEvent=fk;function Ny(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 Ay={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&&(pn(l,s,b),Hh(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&&(pn(l,s,b),Hh(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&&(pn(l,s,p),Hh(l,s,p))}};function Bk(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?!jh(p,b)||!jh(w,S):!0}function Lk(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&&Ay.enqueueReplaceState(l,l.state,null)}function il(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 Ok(s){of(s)}function Rk(s){console.error(s)}function Dk(s){of(s)}function Mf(s,l){try{var p=s.onUncaughtError;p(l.value,{componentStack:l.stack})}catch(b){setTimeout(function(){throw b})}}function jk(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 My(s,l,p){return p=Xs(p),p.tag=3,p.payload={element:null},p.callback=function(){Mf(s,l)},p}function Fk(s){return s=Xs(s),s.tag=3,s}function Ik(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(){jk(l,p,b)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(s.callback=function(){jk(l,p,b),typeof w!="function"&&(ro===null?ro=new Set([this]):ro.add(this));var P=b.stack;this.componentDidCatch(b.value,{componentStack:P!==null?P:""})})}function gF(s,l,p,b,w){if(p.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){if(l=p.alternate,l!==null&&ic(l,p,w,!0),p=Nn.current,p!==null){switch(p.tag){case 31:case 13:return Vn===null?qf():p.alternate===null&&Wi===0&&(Wi=3),p.flags&=-257,p.flags|=65536,p.lanes=w,b===yf?p.flags|=16384:(l=p.updateQueue,l===null?p.updateQueue=new Set([b]):l.add(b),eb(s,b,w)),!1;case 22:return p.flags|=65536,b===yf?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)),eb(s,b,w)),!1}throw Error(n(435,p.tag))}return eb(s,b,w),qf(),!1}if(We)return l=Nn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,b!==Vm&&(s=Error(n(422),{cause:b}),$h(Wn(s,p)))):(b!==Vm&&(l=Error(n(423),{cause:b}),$h(Wn(l,p))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,b=Wn(b,p),w=My(s.stateNode,b,w),sy(s,w),Wi!==4&&(Wi=2)),!1;var S=Error(n(520),{cause:b});if(S=Wn(S,p),nu===null?nu=[S]:nu.push(S),Wi!==4&&(Wi=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=My(p.stateNode,b,s),sy(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=Fk(w),Ik(w,s,p,b),sy(p,w),!1}p=p.return}while(p!==null);return!1}var By=Error(n(461)),sr=!1;function Ar(s,l,p,b){l.child=s===null?q_(l,null,p,b):tl(l,s.child,p,b)}function $k(s,l,p,b,w){p=p.render;var S=l.ref;if("ref"in b){var R={};for(var P in b)P!=="ref"&&(R[P]=b[P])}else R=b;return Xo(l),b=dy(s,l,p,R,S,w),P=fy(),s!==null&&!sr?(py(s,l,w),os(s,l,w)):(We&&P&&Ym(l),l.flags|=1,Ar(s,l,b,w),l.child)}function zk(s,l,p,b,w){if(s===null){var S=p.type;return typeof S=="function"&&!Hm(S)&&S.defaultProps===void 0&&p.compare===null?(l.tag=15,l.type=S,Pk(s,l,S,b,w)):(s=uf(p.type,null,b,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!$y(s,w)){var R=S.memoizedProps;if(p=p.compare,p=p!==null?p:jh,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 Pk(s,l,p,b,w){if(s!==null){var S=s.memoizedProps;if(jh(S,b)&&s.ref===l.ref)if(sr=!1,l.pendingProps=b=S,$y(s,w))(s.flags&131072)!==0&&(sr=!0);else return l.lanes=s.lanes,os(s,l,w)}return Ly(s,l,p,b,w)}function qk(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 Uk(s,l,S,p,b)}if((p&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&gf(l,S!==null?S.cachePool:null),S!==null?W_(l,S):ly(),G_(l);else return b=l.lanes=536870912,Uk(s,l,S!==null?S.baseLanes|p:p,p,b)}else S!==null?(gf(l,S.cachePool),W_(l,S),Js(),l.memoizedState=null):(s!==null&&gf(l,null),ly(),Js());return Ar(s,l,w,p),l.child}function Zh(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Uk(s,l,p,b,w){var S=iy();return S=S===null?null:{parent:nr._currentValue,pool:S},l.memoizedState={baseLanes:p,cachePool:S},s!==null&&gf(l,null),ly(),G_(l),s!==null&&ic(s,l,b,!0),l.childLanes=w,null}function Bf(s,l){return l=Of({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function Hk(s,l,p){return tl(l,s.child,null,p),s=Bf(l,l.pendingProps),s.flags|=2,An(l),l.memoizedState=null,s}function mF(s,l,p){var b=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(We){if(b.mode==="hidden")return s=Bf(l,b),l.lanes=536870912,Zh(null,s);if(hy(l),(s=wi)?(s=iS(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=E_(s),p.return=l,l.child=p,Er=l,wi=null)):s=null,s===null)throw Ys(l);return l.lanes=536870912,null}return Bf(l,b)}var S=s.memoizedState;if(S!==null){var R=S.dehydrated;if(hy(l),w)if(l.flags&256)l.flags&=-257,l=Hk(s,l,p);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(sr||ic(s,l,p,!1),w=(p&s.childLanes)!==0,sr||w){if(b=Ci,b!==null&&(R=ii(b,p),R!==0&&R!==S.retryLane))throw S.retryLane=R,Go(s,R),pn(b,s,R),By;qf(),l=Hk(s,l,p)}else s=S.treeContext,wi=Xn(R.nextSibling),Er=l,We=!0,Gs=null,Kn=!1,s!==null&&M_(l,s),l=Bf(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 Lf(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 Ly(s,l,p,b,w){return Xo(l),p=dy(s,l,p,b,void 0,w),b=fy(),s!==null&&!sr?(py(s,l,w),os(s,l,w)):(We&&b&&Ym(l),l.flags|=1,Ar(s,l,p,w),l.child)}function Wk(s,l,p,b,w,S){return Xo(l),l.updateQueue=null,p=K_(l,b,p,w),Y_(s),b=fy(),s!==null&&!sr?(py(s,l,S),os(s,l,S)):(We&&b&&Ym(l),l.flags|=1,Ar(s,l,p,S),l.child)}function Gk(s,l,p,b,w){if(Xo(l),l.stateNode===null){var S=Ql,R=p.contextType;typeof R=="object"&&R!==null&&(S=Nr(R)),S=new p(b,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Ay,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=b,S.state=l.memoizedState,S.refs={},ny(l),R=p.contextType,S.context=typeof R=="object"&&R!==null?Nr(R):Ql,S.state=l.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Ny(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&&Ay.enqueueReplaceState(S,S.state,null),Gh(l,b,S,w),Wh(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!0}else if(s===null){S=l.stateNode;var P=l.memoizedProps,J=il(p,P);S.props=J;var gt=S.context,St=p.contextType;R=Ql,typeof St=="object"&&St!==null&&(R=Nr(St));var Et=p.getDerivedStateFromProps;St=typeof Et=="function"||typeof S.getSnapshotBeforeUpdate=="function",P=l.pendingProps!==P,St||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(P||gt!==R)&&Lk(l,S,b,R),Vs=!1;var bt=l.memoizedState;S.state=bt,Gh(l,b,S,w),Wh(),gt=l.memoizedState,P||bt!==gt||Vs?(typeof Et=="function"&&(Ny(l,p,Et,b),gt=l.memoizedState),(J=Vs||Bk(l,p,J,b,bt,gt,R))?(St||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=gt),S.props=b,S.state=gt,S.context=R,b=J):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{S=l.stateNode,ay(s,l),R=l.memoizedProps,St=il(p,R),S.props=St,Et=l.pendingProps,bt=S.context,gt=p.contextType,J=Ql,typeof gt=="object"&>!==null&&(J=Nr(gt)),P=p.getDerivedStateFromProps,(gt=typeof P=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==Et||bt!==J)&&Lk(l,S,b,J),Vs=!1,bt=l.memoizedState,S.state=bt,Gh(l,b,S,w),Wh();var Ct=l.memoizedState;R!==Et||bt!==Ct||Vs||s!==null&&s.dependencies!==null&&ff(s.dependencies)?(typeof P=="function"&&(Ny(l,p,P,b),Ct=l.memoizedState),(St=Vs||Bk(l,p,St,b,bt,Ct,J)||s!==null&&s.dependencies!==null&&ff(s.dependencies))?(gt||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(b,Ct,J),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(b,Ct,J)),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=Ct),S.props=b,S.state=Ct,S.context=J,b=St):(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,Lf(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=tl(l,s.child,null,w),l.child=tl(l,null,p,w)):Ar(s,l,p,w),l.memoizedState=S.state,s=l.child):s=os(s,l,w),s}function Yk(s,l,p,b){return Ko(),l.flags|=256,Ar(s,l,p,b),l.child}var Oy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ry(s){return{baseLanes:s,cachePool:j_()}}function Dy(s,l,p){return s=s!==null?s.childLanes&~p:0,l&&(s|=Bn),s}function Kk(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:(Zi.current&2)!==0),R&&(w=!0,l.flags&=-129),R=(l.flags&32)!==0,l.flags&=-33,s===null){if(We){if(w?Qs(l):Js(),(s=wi)?(s=iS(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=E_(s),p.return=l,l.child=p,Er=l,wi=null)):s=null,s===null)throw Ys(l);return yb(s)?l.lanes=32:l.lanes=536870912,null}var P=b.children;return b=b.fallback,w?(Js(),w=l.mode,P=Of({mode:"hidden",children:P},w),b=Yo(b,w,p,null),P.return=l,b.return=l,P.sibling=b,l.child=P,b=l.child,b.memoizedState=Ry(p),b.childLanes=Dy(s,R,p),l.memoizedState=Oy,Zh(null,b)):(Qs(l),jy(l,P))}var J=s.memoizedState;if(J!==null&&(P=J.dehydrated,P!==null)){if(S)l.flags&256?(Qs(l),l.flags&=-257,l=Fy(s,l,p)):l.memoizedState!==null?(Js(),l.child=s.child,l.flags|=128,l=null):(Js(),P=b.fallback,w=l.mode,b=Of({mode:"visible",children:b.children},w),P=Yo(P,w,p,null),P.flags|=2,b.return=l,P.return=l,b.sibling=P,l.child=b,tl(l,s.child,null,p),b=l.child,b.memoizedState=Ry(p),b.childLanes=Dy(s,R,p),l.memoizedState=Oy,l=Zh(null,b));else if(Qs(l),yb(P)){if(R=P.nextSibling&&P.nextSibling.dataset,R)var gt=R.dgst;R=gt,b=Error(n(419)),b.stack="",b.digest=R,$h({value:b,source:null,stack:null}),l=Fy(s,l,p)}else if(sr||ic(s,l,p,!1),R=(p&s.childLanes)!==0,sr||R){if(R=Ci,R!==null&&(b=ii(R,p),b!==0&&b!==J.retryLane))throw J.retryLane=b,Go(s,b),pn(R,s,b),By;mb(P)||qf(),l=Fy(s,l,p)}else mb(P)?(l.flags|=192,l.child=s.child,l=null):(s=J.treeContext,wi=Xn(P.nextSibling),Er=l,We=!0,Gs=null,Kn=!1,s!==null&&M_(l,s),l=jy(l,b.children),l.flags|=4096);return l}return w?(Js(),P=b.fallback,w=l.mode,J=s.child,gt=J.sibling,b=es(J,{mode:"hidden",children:b.children}),b.subtreeFlags=J.subtreeFlags&65011712,gt!==null?P=es(gt,P):(P=Yo(P,w,p,null),P.flags|=2),P.return=l,b.return=l,b.sibling=P,l.child=b,Zh(null,b),b=l.child,P=s.child.memoizedState,P===null?P=Ry(p):(w=P.cachePool,w!==null?(J=nr._currentValue,w=w.parent!==J?{parent:J,pool:J}:w):w=j_(),P={baseLanes:P.baseLanes|p,cachePool:w}),b.memoizedState=P,b.childLanes=Dy(s,R,p),l.memoizedState=Oy,Zh(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 jy(s,l){return l=Of({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Of(s,l){return s=En(22,s,null,l),s.lanes=0,s}function Fy(s,l,p){return tl(l,s.child,null,p),s=jy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Vk(s,l,p){s.lanes|=l;var b=s.alternate;b!==null&&(b.lanes|=l),Qm(s.return,l,p)}function Iy(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 Xk(s,l,p){var b=l.pendingProps,w=b.revealOrder,S=b.tail;b=b.children;var R=Zi.current,P=(R&2)!==0;if(P?(R=R&1|2,l.flags|=128):R&=1,ft(Zi,R),Ar(s,l,b,p),b=We?Ih:0,!P&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Vk(s,p,l);else if(s.tag===19)Vk(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&&Cf(s)===null&&(w=p),p=p.sibling;p=w,p===null?(w=l.child,l.child=null):(w=p.sibling,p.sibling=null),Iy(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&&Cf(s)===null){l.child=w;break}s=w.sibling,w.sibling=p,p=w,w=s}Iy(l,!0,p,null,S,b);break;case"together":Iy(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(ic(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 $y(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&ff(s)))}function yF(s,l,p){switch(l.tag){case 3:Z(l,l.stateNode.containerInfo),Ks(l,nr,s.memoizedState.cache),Ko();break;case 27:case 5:ct(l);break;case 4:Z(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,hy(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?Kk(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||(ic(s,l,p,!1),b=(p&l.childLanes)!==0),w){if(b)return Xk(s,l,p);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),ft(Zi,Zi.current),b)break;return null;case 22:return l.lanes=0,qk(s,l,p,l.pendingProps);case 24:Ks(l,nr,s.memoizedState.cache)}return os(s,l,p)}function Zk(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps)sr=!0;else{if(!$y(s,p)&&(l.flags&128)===0)return sr=!1,yF(s,l,p);sr=(s.flags&131072)!==0}else sr=!1,We&&(l.flags&1048576)!==0&&A_(l,Ih,l.index);switch(l.lanes=0,l.tag){case 16:t:{var b=l.pendingProps;if(s=Qo(l.elementType),l.type=s,typeof s=="function")Hm(s)?(b=il(s,b),l.tag=1,l=Gk(null,l,s,b,p)):(l.tag=0,l=Ly(null,l,s,b,p));else{if(s!=null){var w=s.$$typeof;if(w===N){l.tag=11,l=$k(null,l,s,b,p);break t}else if(w===A){l.tag=14,l=zk(null,l,s,b,p);break t}}throw l=I(s)||s,Error(n(306,l,""))}}return l;case 0:return Ly(s,l,l.type,l.pendingProps,p);case 1:return b=l.type,w=il(b,l.pendingProps),Gk(s,l,b,w,p);case 3:t:{if(Z(l,l.stateNode.containerInfo),s===null)throw Error(n(387));b=l.pendingProps;var S=l.memoizedState;w=S.element,ay(s,l),Gh(l,b,null,p);var R=l.memoizedState;if(b=R.cache,Ks(l,nr,b),b!==S.cache&&Jm(l,[nr],p,!0),Wh(),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=Yk(s,l,b,p);break t}else if(b!==w){w=Wn(Error(n(424)),l),$h(w),l=Yk(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(wi=Xn(s.firstChild),Er=l,We=!0,Gs=null,Kn=!0,p=q_(l,null,b,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Ko(),b===w){l=os(s,l,p);break t}Ar(s,l,b,p)}l=l.child}return l;case 26:return Lf(s,l),s===null?(p=lS(l.type,null,l.pendingProps,null))?l.memoizedState=p:We||(p=l.type,s=l.pendingProps,b=Vf(ot.current).createElement(p),b[vi]=l,b[qi]=s,Mr(b,p,s),ri(b),l.stateNode=b):l.memoizedState=lS(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return ct(l),s===null&&We&&(b=l.stateNode=aS(l.type,l.pendingProps,ot.current),Er=l,Kn=!0,w=wi,oo(l.type)?(bb=w,wi=Xn(b.firstChild)):wi=w),Ar(s,l,l.pendingProps.children,p),Lf(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&We&&((w=b=wi)&&(b=YF(b,l.type,l.pendingProps,Kn),b!==null?(l.stateNode=b,Er=l,wi=Xn(b.firstChild),Kn=!1,w=!0):w=!1),w||Ys(l)),ct(l),w=l.type,S=l.pendingProps,R=s!==null?s.memoizedProps:null,b=S.children,fb(w,S)?b=null:R!==null&&fb(w,R)&&(l.flags|=32),l.memoizedState!==null&&(w=dy(s,l,lF,null,null,p),du._currentValue=w),Lf(s,l),Ar(s,l,b,p),l.child;case 6:return s===null&&We&&((s=p=wi)&&(p=KF(p,l.pendingProps,Kn),p!==null?(l.stateNode=p,Er=l,wi=null,s=!0):s=!1),s||Ys(l)),null;case 13:return Kk(s,l,p);case 4:return Z(l,l.stateNode.containerInfo),b=l.pendingProps,s===null?l.child=tl(l,null,b,p):Ar(s,l,b,p),l.child;case 11:return $k(s,l,l.type,l.pendingProps,p);case 7:return Ar(s,l,l.pendingProps,p),l.child;case 8:return Ar(s,l,l.pendingProps.children,p),l.child;case 12:return Ar(s,l,l.pendingProps.children,p),l.child;case 10:return b=l.pendingProps,Ks(l,l.type,b.value),Ar(s,l,b.children,p),l.child;case 9:return w=l.type._context,b=l.pendingProps.children,Xo(l),w=Nr(w),b=b(w),l.flags|=1,Ar(s,l,b,p),l.child;case 14:return zk(s,l,l.type,l.pendingProps,p);case 15:return Pk(s,l,l.type,l.pendingProps,p);case 19:return Xk(s,l,p);case 31:return mF(s,l,p);case 22:return qk(s,l,p,l.pendingProps);case 24:return Xo(l),b=Nr(nr),s===null?(w=iy(),w===null&&(w=Ci,S=ty(),w.pooledCache=S,S.refCount++,S!==null&&(w.pooledCacheLanes|=p),w=S),l.memoizedState={parent:b,cache:w},ny(l),Ks(l,nr,w)):((s.lanes&p)!==0&&(ay(s,l),Gh(l,null,null,p),Wh()),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,nr,b)):(b=S.cache,Ks(l,nr,b),b!==w.cache&&Jm(l,[nr],p,!0))),Ar(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 zy(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(ww())s.flags|=8192;else throw Jo=yf,ry}else s.flags&=-16777217}function Qk(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!fS(l))if(ww())s.flags|=8192;else throw Jo=yf,ry}function Rf(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?le():536870912,s.lanes|=l,pc|=l)}function Qh(s,l){if(!We)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 Si(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 bF(s,l,p){var b=l.pendingProps;switch(Km(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Si(l),null;case 1:return Si(l),null;case 3:return p=l.stateNode,b=null,s!==null&&(b=s.memoizedState.cache),l.memoizedState.cache!==b&&(l.flags|=2048),ns(nr),st(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(ec(l)?ls(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Xm())),Si(l),null;case 26:var w=l.type,S=l.memoizedState;return s===null?(ls(l),S!==null?(Si(l),Qk(l,S)):(Si(l),zy(l,w,null,b,p))):S?S!==s.memoizedState?(ls(l),Si(l),Qk(l,S)):(Si(l),l.flags&=-16777217):(s=s.memoizedProps,s!==b&&ls(l),Si(l),zy(l,w,s,b,p)),null;case 27:if(vt(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 Si(l),null}s=Q.current,ec(l)?B_(l):(s=aS(w,b,p),l.stateNode=s,ls(l))}return Si(l),null;case 5:if(vt(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 Si(l),null}if(S=Q.current,ec(l))B_(l);else{var R=Vf(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[vi]=l,S[qi]=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(Mr(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 Si(l),zy(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,ec(l)){if(s=l.stateNode,p=l.memoizedProps,b=null,w=Er,w!==null)switch(w.tag){case 27:case 5:b=w.memoizedProps}s[vi]=l,s=!!(s.nodeValue===p||b!==null&&b.suppressHydrationWarning===!0||Kw(s.nodeValue,p)),s||Ys(l,!0)}else s=Vf(s).createTextNode(b),s[vi]=l,l.stateNode=s}return Si(l),null;case 31:if(p=l.memoizedState,s===null||s.memoizedState!==null){if(b=ec(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[vi]=l}else Ko(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Si(l),s=!1}else p=Xm(),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 Si(l),null;case 13:if(b=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=ec(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[vi]=l}else Ko(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Si(l),w=!1}else w=Xm(),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),Rf(l,l.updateQueue),Si(l),null);case 4:return st(),s===null&&lb(l.stateNode.containerInfo),Si(l),null;case 10:return ns(l.type),Si(l),null;case 19:if(rt(Zi),b=l.memoizedState,b===null)return Si(l),null;if(w=(l.flags&128)!==0,S=b.rendering,S===null)if(w)Qh(b,!1);else{if(Wi!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=Cf(s),S!==null){for(l.flags|=128,Qh(b,!1),s=S.updateQueue,l.updateQueue=s,Rf(l,s),l.subtreeFlags=0,s=p,p=l.child;p!==null;)T_(p,s),p=p.sibling;return ft(Zi,Zi.current&1|2),We&&is(l,b.treeForkCount),l.child}s=s.sibling}b.tail!==null&&ye()>$f&&(l.flags|=128,w=!0,Qh(b,!1),l.lanes=4194304)}else{if(!w)if(s=Cf(S),s!==null){if(l.flags|=128,w=!0,s=s.updateQueue,l.updateQueue=s,Rf(l,s),Qh(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!We)return Si(l),null}else 2*ye()-b.renderingStartTime>$f&&p!==536870912&&(l.flags|=128,w=!0,Qh(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=ye(),s.sibling=null,p=Zi.current,ft(Zi,w?p&1|2:p&1),We&&is(l,b.treeForkCount),s):(Si(l),null);case 22:case 23:return An(l),cy(),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&&(Si(l),l.subtreeFlags&6&&(l.flags|=8192)):Si(l),p=l.updateQueue,p!==null&&Rf(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&&rt(Zo),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ns(nr),Si(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function xF(s,l){switch(Km(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ns(nr),st(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return vt(l),null;case 31:if(l.memoizedState!==null){if(An(l),l.alternate===null)throw Error(n(340));Ko()}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));Ko()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return rt(Zi),null;case 4:return st(),null;case 10:return ns(l.type),null;case 22:case 23:return An(l),cy(),s!==null&&rt(Zo),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return ns(nr),null;case 25:return null;default:return null}}function Jk(s,l){switch(Km(l),l.tag){case 3:ns(nr),st();break;case 26:case 27:case 5:vt(l);break;case 4:st();break;case 31:l.memoizedState!==null&&An(l);break;case 13:An(l);break;case 19:rt(Zi);break;case 10:ns(l.type);break;case 22:case 23:An(l),cy(),s!==null&&rt(Zo);break;case 24:ns(nr)}}function Jh(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(P){ui(l,l.return,P)}}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,P=R.destroy;if(P!==void 0){R.destroy=void 0,w=l;var J=p,gt=P;try{gt()}catch(St){ui(w,J,St)}}}b=b.next}while(b!==S)}}catch(St){ui(l,l.return,St)}}function tw(s){var l=s.updateQueue;if(l!==null){var p=s.stateNode;try{H_(l,p)}catch(b){ui(s,s.return,b)}}}function ew(s,l,p){p.props=il(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(b){ui(s,l,b)}}function tu(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){ui(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){ui(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){ui(s,l,w)}else p.current=null}function iw(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){ui(s,s.return,w)}}function Py(s,l,p){try{var b=s.stateNode;PF(b,s.type,p,l),b[qi]=l}catch(w){ui(s,s.return,w)}}function rw(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||rw(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 Uy(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=jt));else if(b!==4&&(b===27&&oo(s.type)&&(p=s.stateNode,l=null),s=s.child,s!==null))for(Uy(s,l,p),s=s.sibling;s!==null;)Uy(s,l,p),s=s.sibling}function Df(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(Df(s,l,p),s=s.sibling;s!==null;)Df(s,l,p),s=s.sibling}function nw(s){var l=s.stateNode,p=s.memoizedProps;try{for(var b=s.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);Mr(l,b,p),l[vi]=s,l[qi]=p}catch(S){ui(s,s.return,S)}}var cs=!1,or=!1,Hy=!1,aw=typeof WeakSet=="function"?WeakSet:Set,vr=null;function vF(s,l){if(s=s.containerInfo,ub=ip,s=y_(s),Fm(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,P=-1,J=-1,gt=0,St=0,Et=s,bt=null;e:for(;;){for(var Ct;Et!==p||w!==0&&Et.nodeType!==3||(P=R+w),Et!==S||b!==0&&Et.nodeType!==3||(J=R+b),Et.nodeType===3&&(R+=Et.nodeValue.length),(Ct=Et.firstChild)!==null;)bt=Et,Et=Ct;for(;;){if(Et===s)break e;if(bt===p&&++gt===w&&(P=R),bt===S&&++St===b&&(J=R),(Ct=Et.nextSibling)!==null)break;Et=bt,bt=Et.parentNode}Et=Ct}p=P===-1||J===-1?null:{start:P,end:J}}else p=null}p=p||{start:0,end:0}}else p=null;for(db={focusedElem:s,selectionRange:p},ip=!1,vr=l;vr!==null;)if(l=vr,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,vr=s;else for(;vr!==null;){switch(l=vr,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 Kt=il(p.type,w);s=b.getSnapshotBeforeUpdate(Kt,S),b.__reactInternalSnapshotBeforeUpdate=s}catch(de){ui(p,p.return,de)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,p=s.nodeType,p===9)gb(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":gb(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,vr=s;break}vr=l.return}}function sw(s,l,p){var b=p.flags;switch(p.tag){case 0:case 11:case 15:us(s,p),b&4&&Jh(5,p);break;case 1:if(us(s,p),b&4)if(s=p.stateNode,l===null)try{s.componentDidMount()}catch(R){ui(p,p.return,R)}else{var w=il(p.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(R){ui(p,p.return,R)}}b&64&&tw(p),b&512&&tu(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{H_(s,l)}catch(R){ui(p,p.return,R)}}break;case 27:l===null&&b&4&&nw(p);case 26:case 5:us(s,p),l===null&&b&4&&iw(p),b&512&&tu(p,p.return);break;case 12:us(s,p);break;case 31:us(s,p),b&4&&cw(s,p);break;case 13:us(s,p),b&4&&hw(s,p),b&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=AF.bind(null,p),VF(s,p))));break;case 22:if(b=p.memoizedState!==null||cs,!b){l=l!==null&&l.memoizedState!==null||or,w=cs;var S=or;cs=b,(or=l)&&!S?ds(s,p,(p.subtreeFlags&8772)!==0):us(s,p),cs=w,or=S}break;case 30:break;default:us(s,p)}}function ow(s){var l=s.alternate;l!==null&&(s.alternate=null,ow(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 Bi=null,hn=!1;function hs(s,l,p){for(p=p.child;p!==null;)lw(s,l,p),p=p.sibling}function lw(s,l,p){if(Le&&typeof Le.onCommitFiberUnmount=="function")try{Le.onCommitFiberUnmount(Di,p)}catch{}switch(p.tag){case 26:or||Ma(p,l),hs(s,l,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:or||Ma(p,l);var b=Bi,w=hn;oo(p.type)&&(Bi=p.stateNode,hn=!1),hs(s,l,p),cu(p.stateNode),Bi=b,hn=w;break;case 5:or||Ma(p,l);case 6:if(b=Bi,w=hn,Bi=null,hs(s,l,p),Bi=b,hn=w,Bi!==null)if(hn)try{(Bi.nodeType===9?Bi.body:Bi.nodeName==="HTML"?Bi.ownerDocument.body:Bi).removeChild(p.stateNode)}catch(S){ui(p,l,S)}else try{Bi.removeChild(p.stateNode)}catch(S){ui(p,l,S)}break;case 18:Bi!==null&&(hn?(s=Bi,tS(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),_c(s)):tS(Bi,p.stateNode));break;case 4:b=Bi,w=hn,Bi=p.stateNode.containerInfo,hn=!0,hs(s,l,p),Bi=b,hn=w;break;case 0:case 11:case 14:case 15:to(2,p,l),or||to(4,p,l),hs(s,l,p);break;case 1:or||(Ma(p,l),b=p.stateNode,typeof b.componentWillUnmount=="function"&&ew(p,l,b)),hs(s,l,p);break;case 21:hs(s,l,p);break;case 22:or=(b=or)||p.memoizedState!==null,hs(s,l,p),or=b;break;default:hs(s,l,p)}}function cw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{_c(s)}catch(p){ui(l,l.return,p)}}}function hw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{_c(s)}catch(p){ui(l,l.return,p)}}function CF(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new aw),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new aw),l;default:throw Error(n(435,s.tag))}}function jf(s,l){var p=CF(s);l.forEach(function(b){if(!p.has(b)){p.add(b);var w=MF.bind(null,s,b);b.then(w,w)}})}function un(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,P=R;t:for(;P!==null;){switch(P.tag){case 27:if(oo(P.type)){Bi=P.stateNode,hn=!1;break t}break;case 5:Bi=P.stateNode,hn=!1;break t;case 3:case 4:Bi=P.stateNode.containerInfo,hn=!0;break t}P=P.return}if(Bi===null)throw Error(n(160));lw(S,R,w),Bi=null,hn=!1,S=w.alternate,S!==null&&(S.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)uw(l,s),l=l.sibling}var ha=null;function uw(s,l){var p=s.alternate,b=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:un(l,s),dn(s),b&4&&(to(3,s,s.return),Jh(3,s),to(5,s,s.return));break;case 1:un(l,s),dn(s),b&512&&(or||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(un(l,s),dn(s),b&512&&(or||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[vi]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=w.createElement(b),w.head.insertBefore(S,w.querySelector("head > title"))),Mr(S,b,p),S[vi]=s,ri(S),b=S;break t;case"link":var R=uS("link","href",w).get(b+(p.href||""));if(R){for(var P=0;P<R.length;P++)if(S=R[P],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(P,1);break e}}S=w.createElement(b),Mr(S,b,p),w.head.appendChild(S);break;case"meta":if(R=uS("meta","content",w).get(b+(p.content||""))){for(P=0;P<R.length;P++)if(S=R[P],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(P,1);break e}}S=w.createElement(b),Mr(S,b,p),w.head.appendChild(S);break;default:throw Error(n(468,b))}S[vi]=s,ri(S),b=S}s.stateNode=b}else dS(w,s.type,s.stateNode);else s.stateNode=hS(w,b,s.memoizedProps);else S!==b?(S===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):S.count--,b===null?dS(w,s.type,s.stateNode):hS(w,b,s.memoizedProps)):b===null&&s.stateNode!==null&&Py(s,s.memoizedProps,p.memoizedProps)}break;case 27:un(l,s),dn(s),b&512&&(or||p===null||Ma(p,p.return)),p!==null&&b&4&&Py(s,s.memoizedProps,p.memoizedProps);break;case 5:if(un(l,s),dn(s),b&512&&(or||p===null||Ma(p,p.return)),s.flags&32){w=s.stateNode;try{$t(w,"")}catch(Kt){ui(s,s.return,Kt)}}b&4&&s.stateNode!=null&&(w=s.memoizedProps,Py(s,w,p!==null?p.memoizedProps:w)),b&1024&&(Hy=!0);break;case 6:if(un(l,s),dn(s),b&4){if(s.stateNode===null)throw Error(n(162));b=s.memoizedProps,p=s.stateNode;try{p.nodeValue=b}catch(Kt){ui(s,s.return,Kt)}}break;case 3:if(Qf=null,w=ha,ha=Xf(l.containerInfo),un(l,s),ha=w,dn(s),b&4&&p!==null&&p.memoizedState.isDehydrated)try{_c(l.containerInfo)}catch(Kt){ui(s,s.return,Kt)}Hy&&(Hy=!1,dw(s));break;case 4:b=ha,ha=Xf(s.stateNode.containerInfo),un(l,s),dn(s),ha=b;break;case 12:un(l,s),dn(s);break;case 31:un(l,s),dn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,jf(s,b)));break;case 13:un(l,s),dn(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(If=ye()),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,jf(s,b)));break;case 22:w=s.memoizedState!==null;var J=p!==null&&p.memoizedState!==null,gt=cs,St=or;if(cs=gt||w,or=St||J,un(l,s),or=St,cs=gt,dn(s),b&8192)t:for(l=s.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(p===null||J||cs||or||rl(s)),p=null,l=s;;){if(l.tag===5||l.tag===26){if(p===null){J=p=l;try{if(S=J.stateNode,w)R=S.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{P=J.stateNode;var Et=J.memoizedProps.style,bt=Et!=null&&Et.hasOwnProperty("display")?Et.display:null;P.style.display=bt==null||typeof bt=="boolean"?"":(""+bt).trim()}}catch(Kt){ui(J,J.return,Kt)}}}else if(l.tag===6){if(p===null){J=l;try{J.stateNode.nodeValue=w?"":J.memoizedProps}catch(Kt){ui(J,J.return,Kt)}}}else if(l.tag===18){if(p===null){J=l;try{var Ct=J.stateNode;w?eS(Ct,!0):eS(J.stateNode,!1)}catch(Kt){ui(J,J.return,Kt)}}}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,jf(s,p))));break;case 19:un(l,s),dn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,jf(s,b)));break;case 30:break;case 21:break;default:un(l,s),dn(s)}}function dn(s){var l=s.flags;if(l&2){try{for(var p,b=s.return;b!==null;){if(rw(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);Df(s,S,w);break;case 5:var R=p.stateNode;p.flags&32&&($t(R,""),p.flags&=-33);var P=qy(s);Df(s,P,R);break;case 3:case 4:var J=p.stateNode.containerInfo,gt=qy(s);Uy(s,gt,J);break;default:throw Error(n(161))}}catch(St){ui(s,s.return,St)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function dw(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;dw(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;)sw(s,l.alternate,l),l=l.sibling}function rl(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),rl(l);break;case 1:Ma(l,l.return);var p=l.stateNode;typeof p.componentWillUnmount=="function"&&ew(l,l.return,p),rl(l);break;case 27:cu(l.stateNode);case 26:case 5:Ma(l,l.return),rl(l);break;case 22:l.memoizedState===null&&rl(l);break;case 30:rl(l);break;default:rl(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),Jh(4,S);break;case 1:if(ds(w,S,p),b=S,w=b.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(gt){ui(b,b.return,gt)}if(b=S,w=b.updateQueue,w!==null){var P=b.stateNode;try{var J=w.shared.hiddenCallbacks;if(J!==null)for(w.shared.hiddenCallbacks=null,w=0;w<J.length;w++)U_(J[w],P)}catch(gt){ui(b,b.return,gt)}}p&&R&64&&tw(S),tu(S,S.return);break;case 27:nw(S);case 26:case 5:ds(w,S,p),p&&b===null&&R&4&&iw(S),tu(S,S.return);break;case 12:ds(w,S,p);break;case 31:ds(w,S,p),p&&R&4&&cw(w,S);break;case 13:ds(w,S,p),p&&R&4&&hw(w,S);break;case 22:S.memoizedState===null&&ds(w,S,p),tu(S,S.return);break;case 30:break;default:ds(w,S,p)}l=l.sibling}}function Wy(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&&zh(p))}function Gy(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&zh(s))}function ua(s,l,p,b){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)fw(s,l,p,b),l=l.sibling}function fw(s,l,p,b){var w=l.flags;switch(l.tag){case 0:case 11:case 15:ua(s,l,p,b),w&2048&&Jh(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&&zh(s)));break;case 12:if(w&2048){ua(s,l,p,b),s=l.stateNode;try{var S=l.memoizedProps,R=S.id,P=S.onPostCommit;typeof P=="function"&&P(R,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(J){ui(l,l.return,J)}}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):eu(s,l):S._visibility&2?ua(s,l,p,b):(S._visibility|=2,uc(s,l,p,b,(l.subtreeFlags&10256)!==0||!1)),w&2048&&Wy(R,l);break;case 24:ua(s,l,p,b),w&2048&&Gy(l.alternate,l);break;default:ua(s,l,p,b)}}function uc(s,l,p,b,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,R=l,P=p,J=b,gt=R.flags;switch(R.tag){case 0:case 11:case 15:uc(S,R,P,J,w),Jh(8,R);break;case 23:break;case 22:var St=R.stateNode;R.memoizedState!==null?St._visibility&2?uc(S,R,P,J,w):eu(S,R):(St._visibility|=2,uc(S,R,P,J,w)),w&>&2048&&Wy(R.alternate,R);break;case 24:uc(S,R,P,J,w),w&>&2048&&Gy(R.alternate,R);break;default:uc(S,R,P,J,w)}l=l.sibling}}function eu(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:eu(p,b),w&2048&&Wy(b.alternate,b);break;case 24:eu(p,b),w&2048&&Gy(b.alternate,b);break;default:eu(p,b)}l=l.sibling}}var iu=8192;function dc(s,l,p){if(s.subtreeFlags&iu)for(s=s.child;s!==null;)pw(s,l,p),s=s.sibling}function pw(s,l,p){switch(s.tag){case 26:dc(s,l,p),s.flags&iu&&s.memoizedState!==null&&o4(p,ha,s.memoizedState,s.memoizedProps);break;case 5:dc(s,l,p);break;case 3:case 4:var b=ha;ha=Xf(s.stateNode.containerInfo),dc(s,l,p),ha=b;break;case 22:s.memoizedState===null&&(b=s.alternate,b!==null&&b.memoizedState!==null?(b=iu,iu=16777216,dc(s,l,p),iu=b):dc(s,l,p));break;default:dc(s,l,p)}}function gw(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 ru(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];vr=b,yw(b,s)}gw(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)mw(s),s=s.sibling}function mw(s){switch(s.tag){case 0:case 11:case 15:ru(s),s.flags&2048&&to(9,s,s.return);break;case 3:ru(s);break;case 12:ru(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Ff(s)):ru(s);break;default:ru(s)}}function Ff(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];vr=b,yw(b,s)}gw(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:to(8,l,l.return),Ff(l);break;case 22:p=l.stateNode,p._visibility&2&&(p._visibility&=-3,Ff(l));break;default:Ff(l)}s=s.sibling}}function yw(s,l){for(;vr!==null;){var p=vr;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:zh(p.memoizedState.cache)}if(b=p.child,b!==null)b.return=p,vr=b;else t:for(p=s;vr!==null;){b=vr;var w=b.sibling,S=b.return;if(ow(b),b===p){vr=null;break t}if(w!==null){w.return=S,vr=w;break t}vr=S}}}var _F={getCacheForType:function(s){var l=Nr(nr),p=l.data.get(s);return p===void 0&&(p=s(),l.data.set(s,p)),p},cacheSignal:function(){return Nr(nr).controller.signal}},kF=typeof WeakMap=="function"?WeakMap:Map,Je=0,Ci=null,Fe=null,Pe=0,hi=0,Mn=null,eo=!1,fc=!1,Yy=!1,fs=0,Wi=0,io=0,nl=0,Ky=0,Bn=0,pc=0,nu=null,fn=null,Vy=!1,If=0,bw=0,$f=1/0,zf=null,ro=null,fr=0,no=null,gc=null,ps=0,Xy=0,Zy=null,xw=null,au=0,Qy=null;function Ln(){return(Je&2)!==0&&Pe!==0?Pe&-Pe:j.T!==null?nb():Gr()}function vw(){if(Bn===0)if((Pe&536870912)===0||We){var s=er;er<<=1,(er&3932160)===0&&(er=262144),Bn=s}else Bn=536870912;return s=Nn.current,s!==null&&(s.flags|=32),Bn}function pn(s,l,p){(s===Ci&&(hi===2||hi===9)||s.cancelPendingCommit!==null)&&(mc(s,0),ao(s,Pe,Bn,!1)),ue(s,p),((Je&2)===0||s!==Ci)&&(s===Ci&&((Je&2)===0&&(nl|=p),Wi===4&&ao(s,Pe,Bn,!1)),Ba(s))}function Cw(s,l,p){if((Je&6)!==0)throw Error(n(327));var b=!p&&(l&127)===0&&(l&s.expiredLanes)===0||wt(s,l),w=b?TF(s,l):tb(s,l,!0),S=b;do{if(w===0){fc&&!b&&ao(s,l,0,!1);break}else{if(p=s.current.alternate,S&&!wF(p)){w=tb(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 P=s;w=nu;var J=P.current.memoizedState.isDehydrated;if(J&&(mc(P,R).flags|=256),R=tb(P,R,!1),R!==2){if(Yy&&!J){P.errorRecoveryDisabledLanes|=S,nl|=S,w=4;break t}S=fn,fn=w,S!==null&&(fn===null?fn=S:fn.push.apply(fn,S))}w=R}if(S=!1,w!==2)continue}}if(w===1){mc(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:fn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(w=If+300-ye(),10<w)){if(ao(b,l,Bn,!eo),tt(b,0,!0)!==0)break t;ps=l,b.timeoutHandle=Qw(_w.bind(null,b,p,fn,zf,Vy,l,Bn,nl,pc,eo,S,"Throttled",-0,0),w);break t}_w(b,p,fn,zf,Vy,l,Bn,nl,pc,eo,S,null,-0,0)}}break}while(!0);Ba(s)}function _w(s,l,p,b,w,S,R,P,J,gt,St,Et,bt,Ct){if(s.timeoutHandle=-1,Et=l.subtreeFlags,Et&8192||(Et&16785408)===16785408){Et={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jt},pw(l,S,Et);var Kt=(S&62914560)===S?If-ye():(S&4194048)===S?bw-ye():0;if(Kt=l4(Et,Kt),Kt!==null){ps=S,s.cancelPendingCommit=Kt(Mw.bind(null,s,l,S,p,b,w,R,P,J,St,Et,null,bt,Ct)),ao(s,S,R,!gt);return}}Mw(s,l,S,p,b,w,R,P,J)}function wF(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&=~Ky,l&=~nl,s.suspendedLanes|=l,s.pingedLanes&=~l,b&&(s.warmLanes|=l),b=s.expirationTimes;for(var w=l;0<w;){var S=31-Ee(w),R=1<<S;b[S]=-1,w&=~R}p!==0&&Pt(s,p,l)}function Pf(){return(Je&6)===0?(su(0),!1):!0}function Jy(){if(Fe!==null){if(hi===0)var s=Fe.return;else s=Fe,rs=Vo=null,gy(s),sc=null,qh=0,s=Fe;for(;s!==null;)Jk(s.alternate,s),s=s.return;Fe=null}}function mc(s,l){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,HF(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),ps=0,Jy(),Ci=s,Fe=p=es(s.current,null),Pe=l,hi=0,Mn=null,eo=!1,fc=wt(s,l),Yy=!1,pc=Bn=Ky=nl=io=Wi=0,fn=nu=null,Vy=!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-Ee(b),S=1<<w;l|=s[w],b&=~S}return fs=l,lf(),p}function kw(s,l){Te=null,j.H=Xh,l===ac||l===mf?(l=$_(),hi=3):l===ry?(l=$_(),hi=4):hi=l===By?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Mn=l,Fe===null&&(Wi=1,Mf(s,Wn(l,s.current)))}function ww(){var s=Nn.current;return s===null?!0:(Pe&4194048)===Pe?Vn===null:(Pe&62914560)===Pe||(Pe&536870912)!==0?s===Vn:!1}function Sw(){var s=j.H;return j.H=Xh,s===null?Xh:s}function Tw(){var s=j.A;return j.A=_F,s}function qf(){Wi=4,eo||(Pe&4194048)!==Pe&&Nn.current!==null||(fc=!0),(io&134217727)===0&&(nl&134217727)===0||Ci===null||ao(Ci,Pe,Bn,!1)}function tb(s,l,p){var b=Je;Je|=2;var w=Sw(),S=Tw();(Ci!==s||Pe!==l)&&(zf=null,mc(s,l)),l=!1;var R=Wi;t:do try{if(hi!==0&&Fe!==null){var P=Fe,J=Mn;switch(hi){case 8:Jy(),R=6;break t;case 3:case 2:case 9:case 6:Nn.current===null&&(l=!0);var gt=hi;if(hi=0,Mn=null,yc(s,P,J,gt),p&&fc){R=0;break t}break;default:gt=hi,hi=0,Mn=null,yc(s,P,J,gt)}}SF(),R=Wi;break}catch(St){kw(s,St)}while(!0);return l&&s.shellSuspendCounter++,rs=Vo=null,Je=b,j.H=w,j.A=S,Fe===null&&(Ci=null,Pe=0,lf()),R}function SF(){for(;Fe!==null;)Ew(Fe)}function TF(s,l){var p=Je;Je|=2;var b=Sw(),w=Tw();Ci!==s||Pe!==l?(zf=null,$f=ye()+500,mc(s,l)):fc=wt(s,l);t:do try{if(hi!==0&&Fe!==null){l=Fe;var S=Mn;e:switch(hi){case 1:hi=0,Mn=null,yc(s,l,S,1);break;case 2:case 9:if(F_(S)){hi=0,Mn=null,Nw(l);break}l=function(){hi!==2&&hi!==9||Ci!==s||(hi=7),Ba(s)},S.then(l,l);break t;case 3:hi=7;break t;case 4:hi=5;break t;case 7:F_(S)?(hi=0,Mn=null,Nw(l)):(hi=0,Mn=null,yc(s,l,S,7));break;case 5:var R=null;switch(Fe.tag){case 26:R=Fe.memoizedState;case 5:case 27:var P=Fe;if(R?fS(R):P.stateNode.complete){hi=0,Mn=null;var J=P.sibling;if(J!==null)Fe=J;else{var gt=P.return;gt!==null?(Fe=gt,Uf(gt)):Fe=null}break e}}hi=0,Mn=null,yc(s,l,S,5);break;case 6:hi=0,Mn=null,yc(s,l,S,6);break;case 8:Jy(),Wi=6;break t;default:throw Error(n(462))}}EF();break}catch(St){kw(s,St)}while(!0);return rs=Vo=null,j.H=b,j.A=w,Je=p,Fe!==null?0:(Ci=null,Pe=0,lf(),Wi)}function EF(){for(;Fe!==null&&!$i();)Ew(Fe)}function Ew(s){var l=Zk(s.alternate,s,fs);s.memoizedProps=s.pendingProps,l===null?Uf(s):Fe=l}function Nw(s){var l=s,p=l.alternate;switch(l.tag){case 15:case 0:l=Wk(p,l,l.pendingProps,l.type,void 0,Pe);break;case 11:l=Wk(p,l,l.pendingProps,l.type.render,l.ref,Pe);break;case 5:gy(l);default:Jk(p,l),l=Fe=T_(l,fs),l=Zk(p,l,fs)}s.memoizedProps=s.pendingProps,l===null?Uf(s):Fe=l}function yc(s,l,p,b){rs=Vo=null,gy(l),sc=null,qh=0;var w=l.return;try{if(gF(s,w,l,p,Pe)){Wi=1,Mf(s,Wn(p,s.current)),Fe=null;return}}catch(S){if(w!==null)throw Fe=w,S;Wi=1,Mf(s,Wn(p,s.current)),Fe=null;return}l.flags&32768?(We||b===1?s=!0:fc||(Pe&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))),Aw(l,s)):Uf(l)}function Uf(s){var l=s;do{if((l.flags&32768)!==0){Aw(l,eo);return}s=l.return;var p=bF(l.alternate,l,fs);if(p!==null){Fe=p;return}if(l=l.sibling,l!==null){Fe=l;return}Fe=l=s}while(l!==null);Wi===0&&(Wi=5)}function Aw(s,l){do{var p=xF(s.alternate,s);if(p!==null){p.flags&=32767,Fe=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!l&&(s=s.sibling,s!==null)){Fe=s;return}Fe=s=p}while(s!==null);Wi=6,Fe=null}function Mw(s,l,p,b,w,S,R,P,J){s.cancelPendingCommit=null;do Hf();while(fr!==0);if((Je&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,Ht(s,p,S,R,P,J),s===Ci&&(Fe=Ci=null,Pe=0),gc=l,no=s,ps=p,Xy=S,Zy=w,xw=b,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,BF(fi,function(){return Dw(),null})):(s.callbackNode=null,s.callbackPriority=0),b=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||b){b=j.T,j.T=null,w=q.p,q.p=2,R=Je,Je|=4;try{vF(s,l,p)}finally{Je=R,q.p=w,j.T=b}}fr=1,Bw(),Lw(),Ow()}}function Bw(){if(fr===1){fr=0;var s=no,l=gc,p=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||p){p=j.T,j.T=null;var b=q.p;q.p=2;var w=Je;Je|=4;try{uw(l,s);var S=db,R=y_(s.containerInfo),P=S.focusedElem,J=S.selectionRange;if(R!==P&&P&&P.ownerDocument&&m_(P.ownerDocument.documentElement,P)){if(J!==null&&Fm(P)){var gt=J.start,St=J.end;if(St===void 0&&(St=gt),"selectionStart"in P)P.selectionStart=gt,P.selectionEnd=Math.min(St,P.value.length);else{var Et=P.ownerDocument||document,bt=Et&&Et.defaultView||window;if(bt.getSelection){var Ct=bt.getSelection(),Kt=P.textContent.length,de=Math.min(J.start,Kt),mi=J.end===void 0?de:Math.min(J.end,Kt);!Ct.extend&&de>mi&&(R=mi,mi=de,de=R);var ut=g_(P,de),at=g_(P,mi);if(ut&&at&&(Ct.rangeCount!==1||Ct.anchorNode!==ut.node||Ct.anchorOffset!==ut.offset||Ct.focusNode!==at.node||Ct.focusOffset!==at.offset)){var pt=Et.createRange();pt.setStart(ut.node,ut.offset),Ct.removeAllRanges(),de>mi?(Ct.addRange(pt),Ct.extend(at.node,at.offset)):(pt.setEnd(at.node,at.offset),Ct.addRange(pt))}}}}for(Et=[],Ct=P;Ct=Ct.parentNode;)Ct.nodeType===1&&Et.push({element:Ct,left:Ct.scrollLeft,top:Ct.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Et.length;P++){var Tt=Et[P];Tt.element.scrollLeft=Tt.left,Tt.element.scrollTop=Tt.top}}ip=!!ub,db=ub=null}finally{Je=w,q.p=b,j.T=p}}s.current=l,fr=2}}function Lw(){if(fr===2){fr=0;var s=no,l=gc,p=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||p){p=j.T,j.T=null;var b=q.p;q.p=2;var w=Je;Je|=4;try{sw(s,l.alternate,l)}finally{Je=w,q.p=b,j.T=p}}fr=3}}function Ow(){if(fr===4||fr===3){fr=0,zi();var s=no,l=gc,p=ps,b=xw;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?fr=5:(fr=0,gc=no=null,Rw(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(ro=null),on(p),l=l.stateNode,Le&&typeof Le.onCommitFiberRoot=="function")try{Le.onCommitFiberRoot(Di,l,void 0,(l.current.flags&128)===128)}catch{}if(b!==null){l=j.T,w=q.p,q.p=2,j.T=null;try{for(var S=s.onRecoverableError,R=0;R<b.length;R++){var P=b[R];S(P.value,{componentStack:P.stack})}}finally{j.T=l,q.p=w}}(ps&3)!==0&&Hf(),Ba(s),w=s.pendingLanes,(p&261930)!==0&&(w&42)!==0?s===Qy?au++:(au=0,Qy=s):au=0,su(0)}}function Rw(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,zh(l)))}function Hf(){return Bw(),Lw(),Ow(),Dw()}function Dw(){if(fr!==5)return!1;var s=no,l=Xy;Xy=0;var p=on(ps),b=j.T,w=q.p;try{q.p=32>p?32:p,j.T=null,p=Zy,Zy=null;var S=no,R=ps;if(fr=0,gc=no=null,ps=0,(Je&6)!==0)throw Error(n(331));var P=Je;if(Je|=4,mw(S.current),fw(S,S.current,R,p),Je=P,su(0,!1),Le&&typeof Le.onPostCommitFiberRoot=="function")try{Le.onPostCommitFiberRoot(Di,S)}catch{}return!0}finally{q.p=w,j.T=b,Rw(s,l)}}function jw(s,l,p){l=Wn(p,l),l=My(s.stateNode,l,2),s=Zs(s,l,2),s!==null&&(ue(s,2),Ba(s))}function ui(s,l,p){if(s.tag===3)jw(s,s,p);else for(;l!==null;){if(l.tag===3){jw(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=Fk(2),b=Zs(l,p,2),b!==null&&(Ik(p,b,l,s),ue(b,2),Ba(b));break}}l=l.return}}function eb(s,l,p){var b=s.pingCache;if(b===null){b=s.pingCache=new kF;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)||(Yy=!0,w.add(p),s=NF.bind(null,s,l,p),l.then(s,s))}function NF(s,l,p){var b=s.pingCache;b!==null&&b.delete(l),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,Ci===s&&(Pe&p)===p&&(Wi===4||Wi===3&&(Pe&62914560)===Pe&&300>ye()-If?(Je&2)===0&&mc(s,0):Ky|=p,pc===Pe&&(pc=0)),Ba(s)}function Fw(s,l){l===0&&(l=le()),s=Go(s,l),s!==null&&(ue(s,l),Ba(s))}function AF(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),Fw(s,p)}function MF(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),Fw(s,p)}function BF(s,l){return Be(s,l)}var Wf=null,bc=null,ib=!1,Gf=!1,rb=!1,so=0;function Ba(s){s!==bc&&s.next===null&&(bc===null?Wf=bc=s:bc=bc.next=s),Gf=!0,ib||(ib=!0,OF())}function su(s,l){if(!rb&&Gf){rb=!0;do for(var p=!1,b=Wf;b!==null;){if(s!==0){var w=b.pendingLanes;if(w===0)var S=0;else{var R=b.suspendedLanes,P=b.pingedLanes;S=(1<<31-Ee(42|s)+1)-1,S&=w&~(R&~P),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(p=!0,Pw(b,S))}else S=Pe,S=tt(b,b===Ci?S:0,b.cancelPendingCommit!==null||b.timeoutHandle!==-1),(S&3)===0||wt(b,S)||(p=!0,Pw(b,S));b=b.next}while(p);rb=!1}}function LF(){Iw()}function Iw(){Gf=ib=!1;var s=0;so!==0&&UF()&&(s=so);for(var l=ye(),p=null,b=Wf;b!==null;){var w=b.next,S=$w(b,l);S===0?(b.next=null,p===null?Wf=w:p.next=w,w===null&&(bc=p)):(p=b,(s!==0||(S&3)!==0)&&(Gf=!0)),b=w}fr!==0&&fr!==5||su(s),so!==0&&(so=0)}function $w(s,l){for(var p=s.suspendedLanes,b=s.pingedLanes,w=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var R=31-Ee(S),P=1<<R,J=w[R];J===-1?((P&p)===0||(P&b)!==0)&&(w[R]=Dt(P,l)):J<=l&&(s.expiredLanes|=P),S&=~P}if(l=Ci,p=Pe,p=tt(s,s===l?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b=s.callbackNode,p===0||s===l&&(hi===2||hi===9)||s.cancelPendingCommit!==null)return b!==null&&b!==null&&yi(b),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||wt(s,p)){if(l=p&-p,l===s.callbackPriority)return l;switch(b!==null&&yi(b),on(p)){case 2:case 8:p=tr;break;case 32:p=fi;break;case 268435456:p=Mi;break;default:p=fi}return b=zw.bind(null,s),p=Be(p,b),s.callbackPriority=l,s.callbackNode=p,l}return b!==null&&b!==null&&yi(b),s.callbackPriority=2,s.callbackNode=null,2}function zw(s,l){if(fr!==0&&fr!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(Hf()&&s.callbackNode!==p)return null;var b=Pe;return b=tt(s,s===Ci?b:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b===0?null:(Cw(s,b,l),$w(s,ye()),s.callbackNode!=null&&s.callbackNode===p?zw.bind(null,s):null)}function Pw(s,l){if(Hf())return null;Cw(s,l,!0)}function OF(){WF(function(){(Je&6)!==0?Be(bi,LF):Iw()})}function nb(){if(so===0){var s=rc;s===0&&(s=Se,Se<<=1,(Se&261888)===0&&(Se=256)),so=s}return so}function qw(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Us(""+s)}function Uw(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 RF(s,l,p,b,w){if(l==="submit"&&p&&p.stateNode===w){var S=qw((w[qi]||null).action),R=b.submitter;R&&(l=(l=R[qi]||null)?qw(l.formAction):R.getAttribute("formAction"),l!==null&&(S=l,R=null));var P=new nf("action","action",null,b,w);s.push({event:P,listeners:[{instance:null,listener:function(){if(b.defaultPrevented){if(so!==0){var J=R?Uw(w,R):new FormData(w);wy(p,{pending:!0,data:J,method:w.method,action:S},null,J)}}else typeof S=="function"&&(P.preventDefault(),J=R?Uw(w,R):new FormData(w),wy(p,{pending:!0,data:J,method:w.method,action:S},S,J))},currentTarget:w}]})}}for(var ab=0;ab<Pm.length;ab++){var sb=Pm[ab],DF=sb.toLowerCase(),jF=sb[0].toUpperCase()+sb.slice(1);ca(DF,"on"+jF)}ca(v_,"onAnimationEnd"),ca(C_,"onAnimationIteration"),ca(__,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(Qj,"onTransitionRun"),ca(Jj,"onTransitionStart"),ca(tF,"onTransitionCancel"),ca(k_,"onTransitionEnd"),dt("onMouseEnter",["mouseout","mouseover"]),dt("onMouseLeave",["mouseout","mouseover"]),dt("onPointerEnter",["pointerout","pointerover"]),dt("onPointerLeave",["pointerout","pointerover"]),kt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kt("onBeforeInput",["compositionend","keypress","textInput","paste"]),kt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="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(" "),FF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function Hw(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 P=b[R],J=P.instance,gt=P.currentTarget;if(P=P.listener,J!==S&&w.isPropagationStopped())break t;S=P,w.currentTarget=gt;try{S(w)}catch(St){of(St)}w.currentTarget=null,S=J}else for(R=0;R<b.length;R++){if(P=b[R],J=P.instance,gt=P.currentTarget,P=P.listener,J!==S&&w.isPropagationStopped())break t;S=P,w.currentTarget=gt;try{S(w)}catch(St){of(St)}w.currentTarget=null,S=J}}}}function Ie(s,l){var p=l[In];p===void 0&&(p=l[In]=new Set);var b=s+"__bubble";p.has(b)||(Ww(l,s,2,!1),p.add(b))}function ob(s,l,p){var b=0;l&&(b|=4),Ww(p,s,b,l)}var Yf="_reactListening"+Math.random().toString(36).slice(2);function lb(s){if(!s[Yf]){s[Yf]=!0,Gt.forEach(function(p){p!=="selectionchange"&&(FF.has(p)||ob(p,!1,s),ob(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Yf]||(l[Yf]=!0,ob("selectionchange",!1,l))}}function Ww(s,l,p,b){switch(vS(l)){case 2:var w=u4;break;case 8:w=d4;break;default:w=kb}p=w.bind(null,l,p,s),w=void 0,!Nm||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 cb(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 P=b.stateNode.containerInfo;if(P===w)break;if(R===4)for(R=b.return;R!==null;){var J=R.tag;if((J===3||J===4)&&R.stateNode.containerInfo===w)return;R=R.return}for(;P!==null;){if(R=ur(P),R===null)return;if(J=R.tag,J===5||J===6||J===26||J===27){b=S=R;continue t}P=P.parentNode}}b=b.return}Jd(function(){var gt=S,St=ke(p),Et=[];t:{var bt=w_.get(s);if(bt!==void 0){var Ct=nf,Kt=s;switch(s){case"keypress":if(ef(p)===0)break t;case"keydown":case"keyup":Ct=Mj;break;case"focusin":Kt="focus",Ct=Lm;break;case"focusout":Kt="blur",Ct=Lm;break;case"beforeblur":case"afterblur":Ct=Lm;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":Ct=JC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ct=bj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ct=Oj;break;case v_:case C_:case __:Ct=Cj;break;case k_:Ct=Dj;break;case"scroll":case"scrollend":Ct=mj;break;case"wheel":Ct=Fj;break;case"copy":case"cut":case"paste":Ct=kj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ct=e_;break;case"toggle":case"beforetoggle":Ct=$j}var de=(l&4)!==0,mi=!de&&(s==="scroll"||s==="scrollend"),ut=de?bt!==null?bt+"Capture":null:bt;de=[];for(var at=gt,pt;at!==null;){var Tt=at;if(pt=Tt.stateNode,Tt=Tt.tag,Tt!==5&&Tt!==26&&Tt!==27||pt===null||ut===null||(Tt=Ah(at,ut),Tt!=null&&de.push(lu(at,Tt,pt))),mi)break;at=at.return}0<de.length&&(bt=new Ct(bt,Kt,null,p,St),Et.push({event:bt,listeners:de}))}}if((l&7)===0){t:{if(bt=s==="mouseover"||s==="pointerover",Ct=s==="mouseout"||s==="pointerout",bt&&p!==Qt&&(Kt=p.relatedTarget||p.fromElement)&&(ur(Kt)||Kt[kn]))break t;if((Ct||bt)&&(bt=St.window===St?St:(bt=St.ownerDocument)?bt.defaultView||bt.parentWindow:window,Ct?(Kt=p.relatedTarget||p.toElement,Ct=gt,Kt=Kt?ur(Kt):null,Kt!==null&&(mi=o(Kt),de=Kt.tag,Kt!==mi||de!==5&&de!==27&&de!==6)&&(Kt=null)):(Ct=null,Kt=gt),Ct!==Kt)){if(de=JC,Tt="onMouseLeave",ut="onMouseEnter",at="mouse",(s==="pointerout"||s==="pointerover")&&(de=e_,Tt="onPointerLeave",ut="onPointerEnter",at="pointer"),mi=Ct==null?bt:ln(Ct),pt=Kt==null?bt:ln(Kt),bt=new de(Tt,at+"leave",Ct,p,St),bt.target=mi,bt.relatedTarget=pt,Tt=null,ur(St)===gt&&(de=new de(ut,at+"enter",Kt,p,St),de.target=pt,de.relatedTarget=mi,Tt=de),mi=Tt,Ct&&Kt)e:{for(de=IF,ut=Ct,at=Kt,pt=0,Tt=ut;Tt;Tt=de(Tt))pt++;Tt=0;for(var oe=at;oe;oe=de(oe))Tt++;for(;0<pt-Tt;)ut=de(ut),pt--;for(;0<Tt-pt;)at=de(at),Tt--;for(;pt--;){if(ut===at||at!==null&&ut===at.alternate){de=ut;break e}ut=de(ut),at=de(at)}de=null}else de=null;Ct!==null&&Gw(Et,bt,Ct,de,!1),Kt!==null&&mi!==null&&Gw(Et,mi,Kt,de,!0)}}t:{if(bt=gt?ln(gt):window,Ct=bt.nodeName&&bt.nodeName.toLowerCase(),Ct==="select"||Ct==="input"&&bt.type==="file")var Ve=c_;else if(o_(bt))if(h_)Ve=Vj;else{Ve=Yj;var Jt=Gj}else Ct=bt.nodeName,!Ct||Ct.toLowerCase()!=="input"||bt.type!=="checkbox"&&bt.type!=="radio"?gt&&Dr(gt.elementType)&&(Ve=c_):Ve=Kj;if(Ve&&(Ve=Ve(s,gt))){l_(Et,Ve,p,St);break t}Jt&&Jt(s,bt,gt),s==="focusout"&>&&bt.type==="number"&>.memoizedProps.value!=null&&Bt(bt,"number",bt.value)}switch(Jt=gt?ln(gt):window,s){case"focusin":(o_(Jt)||Jt.contentEditable==="true")&&(Vl=Jt,Im=gt,Fh=null);break;case"focusout":Fh=Im=Vl=null;break;case"mousedown":$m=!0;break;case"contextmenu":case"mouseup":case"dragend":$m=!1,b_(Et,p,St);break;case"selectionchange":if(Zj)break;case"keydown":case"keyup":b_(Et,p,St)}var Ae;if(Rm)t:{switch(s){case"compositionstart":var qe="onCompositionStart";break t;case"compositionend":qe="onCompositionEnd";break t;case"compositionupdate":qe="onCompositionUpdate";break t}qe=void 0}else Kl?a_(s,p)&&(qe="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(qe="onCompositionStart");qe&&(i_&&p.locale!=="ko"&&(Kl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Kl&&(Ae=ZC()):(Hs=St,Am="value"in Hs?Hs.value:Hs.textContent,Kl=!0)),Jt=Kf(gt,qe),0<Jt.length&&(qe=new t_(qe,s,null,p,St),Et.push({event:qe,listeners:Jt}),Ae?qe.data=Ae:(Ae=s_(p),Ae!==null&&(qe.data=Ae)))),(Ae=Pj?qj(s,p):Uj(s,p))&&(qe=Kf(gt,"onBeforeInput"),0<qe.length&&(Jt=new t_("onBeforeInput","beforeinput",null,p,St),Et.push({event:Jt,listeners:qe}),Jt.data=Ae)),RF(Et,s,gt,p,St)}Hw(Et,l)})}function lu(s,l,p){return{instance:s,listener:l,currentTarget:p}}function Kf(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=Ah(s,p),w!=null&&b.unshift(lu(s,w,S)),w=Ah(s,l),w!=null&&b.push(lu(s,w,S))),s.tag===3)return b;s=s.return}return[]}function IF(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function Gw(s,l,p,b,w){for(var S=l._reactName,R=[];p!==null&&p!==b;){var P=p,J=P.alternate,gt=P.stateNode;if(P=P.tag,J!==null&&J===b)break;P!==5&&P!==26&&P!==27||gt===null||(J=gt,w?(gt=Ah(p,S),gt!=null&&R.unshift(lu(p,gt,J))):w||(gt=Ah(p,S),gt!=null&&R.push(lu(p,gt,J)))),p=p.return}R.length!==0&&s.push({event:l,listeners:R})}var $F=/\r\n?/g,zF=/\u0000|\uFFFD/g;function Yw(s){return(typeof s=="string"?s:""+s).replace($F,`
|
|
50
|
+
`).replace(zF,"")}function Kw(s,l){return l=Yw(l),Yw(s)===l}function gi(s,l,p,b,w,S){switch(p){case"children":typeof b=="string"?l==="body"||l==="textarea"&&b===""||$t(s,b):(typeof b=="number"||typeof b=="bigint")&&l!=="body"&&$t(s,""+b);break;case"className":He(s,"class",b);break;case"tabIndex":He(s,"tabindex",b);break;case"dir":case"role":case"viewBox":case"width":case"height":He(s,p,b);break;case"style":$e(s,b,S);break;case"data":if(l!=="object"){He(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"&&gi(s,l,"name",w.name,w,null),gi(s,l,"formEncType",w.formEncType,w,null),gi(s,l,"formMethod",w.formMethod,w,null),gi(s,l,"formTarget",w.formTarget,w,null)):(gi(s,l,"encType",w.encType,w,null),gi(s,l,"method",w.method,w,null),gi(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=jt);break;case"onScroll":b!=null&&Ie("scroll",s);break;case"onScrollEnd":b!=null&&Ie("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":Ie("beforetoggle",s),Ie("toggle",s),ni(s,"popover",b);break;case"xlinkActuate":ji(s,"http://www.w3.org/1999/xlink","xlink:actuate",b);break;case"xlinkArcrole":ji(s,"http://www.w3.org/1999/xlink","xlink:arcrole",b);break;case"xlinkRole":ji(s,"http://www.w3.org/1999/xlink","xlink:role",b);break;case"xlinkShow":ji(s,"http://www.w3.org/1999/xlink","xlink:show",b);break;case"xlinkTitle":ji(s,"http://www.w3.org/1999/xlink","xlink:title",b);break;case"xlinkType":ji(s,"http://www.w3.org/1999/xlink","xlink:type",b);break;case"xmlBase":ji(s,"http://www.w3.org/XML/1998/namespace","xml:base",b);break;case"xmlLang":ji(s,"http://www.w3.org/XML/1998/namespace","xml:lang",b);break;case"xmlSpace":ji(s,"http://www.w3.org/XML/1998/namespace","xml:space",b);break;case"is":ni(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,ni(s,p,b))}}function hb(s,l,p,b,w,S){switch(p){case"style":$e(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"?$t(s,b):(typeof b=="number"||typeof b=="bigint")&&$t(s,""+b);break;case"onScroll":b!=null&&Ie("scroll",s);break;case"onScrollEnd":b!=null&&Ie("scrollend",s);break;case"onClick":b!=null&&(s.onclick=jt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!V.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[qi]||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,""):ni(s,p,b)}}}function Mr(s,l,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",s),Ie("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:gi(s,l,S,R,p,null)}}w&&gi(s,l,"srcSet",p.srcSet,p,null),b&&gi(s,l,"src",p.src,p,null);return;case"input":Ie("invalid",s);var P=S=R=w=null,J=null,gt=null;for(b in p)if(p.hasOwnProperty(b)){var St=p[b];if(St!=null)switch(b){case"name":w=St;break;case"type":R=St;break;case"checked":J=St;break;case"defaultChecked":gt=St;break;case"value":S=St;break;case"defaultValue":P=St;break;case"children":case"dangerouslySetInnerHTML":if(St!=null)throw Error(n(137,l));break;default:gi(s,l,b,St,p,null)}}mt(s,S,P,J,gt,R,w,!1);return;case"select":Ie("invalid",s),b=R=S=null;for(w in p)if(p.hasOwnProperty(w)&&(P=p[w],P!=null))switch(w){case"value":S=P;break;case"defaultValue":R=P;break;case"multiple":b=P;default:gi(s,l,w,P,p,null)}l=S,p=R,s.multiple=!!b,l!=null?Mt(s,!!b,l,!1):p!=null&&Mt(s,!!b,p,!0);return;case"textarea":Ie("invalid",s),S=w=b=null;for(R in p)if(p.hasOwnProperty(R)&&(P=p[R],P!=null))switch(R){case"value":b=P;break;case"defaultValue":w=P;break;case"children":S=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:gi(s,l,R,P,p,null)}Ne(s,b,w,S);return;case"option":for(J in p)if(p.hasOwnProperty(J)&&(b=p[J],b!=null))switch(J){case"selected":s.selected=b&&typeof b!="function"&&typeof b!="symbol";break;default:gi(s,l,J,b,p,null)}return;case"dialog":Ie("beforetoggle",s),Ie("toggle",s),Ie("cancel",s),Ie("close",s);break;case"iframe":case"object":Ie("load",s);break;case"video":case"audio":for(b=0;b<ou.length;b++)Ie(ou[b],s);break;case"image":Ie("error",s),Ie("load",s);break;case"details":Ie("toggle",s);break;case"embed":case"source":case"link":Ie("error",s),Ie("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(gt in p)if(p.hasOwnProperty(gt)&&(b=p[gt],b!=null))switch(gt){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:gi(s,l,gt,b,p,null)}return;default:if(Dr(l)){for(St in p)p.hasOwnProperty(St)&&(b=p[St],b!==void 0&&hb(s,l,St,b,p,void 0));return}}for(P in p)p.hasOwnProperty(P)&&(b=p[P],b!=null&&gi(s,l,P,b,p,null))}function PF(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,P=null,J=null,gt=null,St=null;for(Ct in p){var Et=p[Ct];if(p.hasOwnProperty(Ct)&&Et!=null)switch(Ct){case"checked":break;case"value":break;case"defaultValue":J=Et;default:b.hasOwnProperty(Ct)||gi(s,l,Ct,null,b,Et)}}for(var bt in b){var Ct=b[bt];if(Et=p[bt],b.hasOwnProperty(bt)&&(Ct!=null||Et!=null))switch(bt){case"type":S=Ct;break;case"name":w=Ct;break;case"checked":gt=Ct;break;case"defaultChecked":St=Ct;break;case"value":R=Ct;break;case"defaultValue":P=Ct;break;case"children":case"dangerouslySetInnerHTML":if(Ct!=null)throw Error(n(137,l));break;default:Ct!==Et&&gi(s,l,bt,Ct,b,Et)}}Pn(s,R,P,J,gt,St,S,w);return;case"select":Ct=R=P=bt=null;for(S in p)if(J=p[S],p.hasOwnProperty(S)&&J!=null)switch(S){case"value":break;case"multiple":Ct=J;default:b.hasOwnProperty(S)||gi(s,l,S,null,b,J)}for(w in b)if(S=b[w],J=p[w],b.hasOwnProperty(w)&&(S!=null||J!=null))switch(w){case"value":bt=S;break;case"defaultValue":P=S;break;case"multiple":R=S;default:S!==J&&gi(s,l,w,S,b,J)}l=P,p=R,b=Ct,bt!=null?Mt(s,!!p,bt,!1):!!b!=!!p&&(l!=null?Mt(s,!!p,l,!0):Mt(s,!!p,p?[]:"",!1));return;case"textarea":Ct=bt=null;for(P in p)if(w=p[P],p.hasOwnProperty(P)&&w!=null&&!b.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:gi(s,l,P,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":Ct=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(n(91));break;default:w!==S&&gi(s,l,R,w,b,S)}qt(s,bt,Ct);return;case"option":for(var Kt in p)if(bt=p[Kt],p.hasOwnProperty(Kt)&&bt!=null&&!b.hasOwnProperty(Kt))switch(Kt){case"selected":s.selected=!1;break;default:gi(s,l,Kt,null,b,bt)}for(J in b)if(bt=b[J],Ct=p[J],b.hasOwnProperty(J)&&bt!==Ct&&(bt!=null||Ct!=null))switch(J){case"selected":s.selected=bt&&typeof bt!="function"&&typeof bt!="symbol";break;default:gi(s,l,J,bt,b,Ct)}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 de in p)bt=p[de],p.hasOwnProperty(de)&&bt!=null&&!b.hasOwnProperty(de)&&gi(s,l,de,null,b,bt);for(gt in b)if(bt=b[gt],Ct=p[gt],b.hasOwnProperty(gt)&&bt!==Ct&&(bt!=null||Ct!=null))switch(gt){case"children":case"dangerouslySetInnerHTML":if(bt!=null)throw Error(n(137,l));break;default:gi(s,l,gt,bt,b,Ct)}return;default:if(Dr(l)){for(var mi in p)bt=p[mi],p.hasOwnProperty(mi)&&bt!==void 0&&!b.hasOwnProperty(mi)&&hb(s,l,mi,void 0,b,bt);for(St in b)bt=b[St],Ct=p[St],!b.hasOwnProperty(St)||bt===Ct||bt===void 0&&Ct===void 0||hb(s,l,St,bt,b,Ct);return}}for(var ut in p)bt=p[ut],p.hasOwnProperty(ut)&&bt!=null&&!b.hasOwnProperty(ut)&&gi(s,l,ut,null,b,bt);for(Et in b)bt=b[Et],Ct=p[Et],!b.hasOwnProperty(Et)||bt===Ct||bt==null&&Ct==null||gi(s,l,Et,bt,b,Ct)}function Vw(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qF(){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,P=w.duration;if(S&&P&&Vw(R)){for(R=0,P=w.responseEnd,b+=1;b<p.length;b++){var J=p[b],gt=J.startTime;if(gt>P)break;var St=J.transferSize,Et=J.initiatorType;St&&Vw(Et)&&(J=J.responseEnd,R+=St*(J<P?1:(P-gt)/(J-gt)))}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 ub=null,db=null;function Vf(s){return s.nodeType===9?s:s.ownerDocument}function Xw(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 Zw(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 fb(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 pb=null;function UF(){var s=window.event;return s&&s.type==="popstate"?s===pb?!1:(pb=s,!0):(pb=null,!1)}var Qw=typeof setTimeout=="function"?setTimeout:void 0,HF=typeof clearTimeout=="function"?clearTimeout:void 0,Jw=typeof Promise=="function"?Promise:void 0,WF=typeof queueMicrotask=="function"?queueMicrotask:typeof Jw<"u"?function(s){return Jw.resolve(null).then(s).catch(GF)}:Qw;function GF(s){setTimeout(function(){throw s})}function oo(s){return s==="head"}function tS(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),_c(l);return}b--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")b++;else if(p==="html")cu(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,cu(p);for(var S=p.firstChild;S;){var R=S.nextSibling,P=S.nodeName;S[$n]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&S.rel.toLowerCase()==="stylesheet"||p.removeChild(S),S=R}}else p==="body"&&cu(s.ownerDocument.body);p=w}while(p);_c(l)}function eS(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 gb(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":gb(p),Ea(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function YF(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 KF(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 iS(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 mb(s){return s.data==="$?"||s.data==="$~"}function yb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function VF(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 bb=null;function rS(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 nS(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 aS(s,l,p){switch(l=Vf(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 cu(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Ea(s)}var Zn=new Map,sS=new Set;function Xf(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var gs=q.d;q.d={f:XF,r:ZF,D:QF,C:JF,L:t4,m:e4,X:r4,S:i4,M:n4};function XF(){var s=gs.f(),l=Pf();return s||l}function ZF(s){var l=Yr(s);l!==null&&l.tag===5&&l.type==="form"?kk(l):gs.r(s)}var xc=typeof document>"u"?null:document;function oS(s,l,p){var b=xc;if(b&&typeof l=="string"&&l){var w=Tr(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof p=="string"&&(w+='[crossorigin="'+p+'"]'),sS.has(w)||(sS.add(w),s={rel:s,crossOrigin:p,href:l},b.querySelector(w)===null&&(l=b.createElement("link"),Mr(l,"link",s),ri(l),b.head.appendChild(l)))}}function QF(s){gs.D(s),oS("dns-prefetch",s,null)}function JF(s,l){gs.C(s,l),oS("preconnect",s,l)}function t4(s,l,p){gs.L(s,l,p);var b=xc;if(b&&s&&l){var w='link[rel="preload"][as="'+Tr(l)+'"]';l==="image"&&p&&p.imageSrcSet?(w+='[imagesrcset="'+Tr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(w+='[imagesizes="'+Tr(p.imageSizes)+'"]')):w+='[href="'+Tr(s)+'"]';var S=w;switch(l){case"style":S=vc(s);break;case"script":S=Cc(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(hu(S))||l==="script"&&b.querySelector(uu(S))||(l=b.createElement("link"),Mr(l,"link",s),ri(l),b.head.appendChild(l)))}}function e4(s,l){gs.m(s,l);var p=xc;if(p&&s){var b=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+Tr(b)+'"][href="'+Tr(s)+'"]',S=w;switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Cc(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(uu(S)))return}b=p.createElement("link"),Mr(b,"link",s),ri(b),p.head.appendChild(b)}}}function i4(s,l,p){gs.S(s,l,p);var b=xc;if(b&&s){var w=dr(b).hoistableStyles,S=vc(s);l=l||"default";var R=w.get(S);if(!R){var P={loading:0,preload:null};if(R=b.querySelector(hu(S)))P.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},p),(p=Zn.get(S))&&xb(s,p);var J=R=b.createElement("link");ri(J),Mr(J,"link",s),J._p=new Promise(function(gt,St){J.onload=gt,J.onerror=St}),J.addEventListener("load",function(){P.loading|=1}),J.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Zf(R,l,b)}R={type:"stylesheet",instance:R,count:1,state:P},w.set(S,R)}}}function r4(s,l){gs.X(s,l);var p=xc;if(p&&s){var b=dr(p).hoistableScripts,w=Cc(s),S=b.get(w);S||(S=p.querySelector(uu(w)),S||(s=g({src:s,async:!0},l),(l=Zn.get(w))&&vb(s,l),S=p.createElement("script"),ri(S),Mr(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function n4(s,l){gs.M(s,l);var p=xc;if(p&&s){var b=dr(p).hoistableScripts,w=Cc(s),S=b.get(w);S||(S=p.querySelector(uu(w)),S||(s=g({src:s,async:!0,type:"module"},l),(l=Zn.get(w))&&vb(s,l),S=p.createElement("script"),ri(S),Mr(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function lS(s,l,p,b){var w=(w=ot.current)?Xf(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=vc(p.href),p=dr(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=vc(p.href);var S=dr(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(hu(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||a4(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=Cc(p),p=dr(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 vc(s){return'href="'+Tr(s)+'"'}function hu(s){return'link[rel="stylesheet"]['+s+"]"}function cS(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function a4(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}),Mr(l,"link",p),ri(l),s.head.appendChild(l))}function Cc(s){return'[src="'+Tr(s)+'"]'}function uu(s){return"script[async]"+s}function hS(s,l,p){if(l.count++,l.instance===null)switch(l.type){case"style":var b=s.querySelector('style[data-href~="'+Tr(p.href)+'"]');if(b)return l.instance=b,ri(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"),ri(b),Mr(b,"style",w),Zf(b,p.precedence,s),l.instance=b;case"stylesheet":w=vc(p.href);var S=s.querySelector(hu(w));if(S)return l.state.loading|=4,l.instance=S,ri(S),S;b=cS(p),(w=Zn.get(w))&&xb(b,w),S=(s.ownerDocument||s).createElement("link"),ri(S);var R=S;return R._p=new Promise(function(P,J){R.onload=P,R.onerror=J}),Mr(S,"link",b),l.state.loading|=4,Zf(S,p.precedence,s),l.instance=S;case"script":return S=Cc(p.src),(w=s.querySelector(uu(S)))?(l.instance=w,ri(w),w):(b=p,(w=Zn.get(S))&&(b=g({},p),vb(b,w)),s=s.ownerDocument||s,w=s.createElement("script"),ri(w),Mr(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,Zf(b,p.precedence,s));return l.instance}function Zf(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 P=b[R];if(P.dataset.precedence===l)S=P;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 xb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function vb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Qf=null;function uS(s,l,p){if(Qf===null){var b=new Map,w=Qf=new Map;w.set(p,b)}else w=Qf,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[vi]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var R=S.getAttribute(l)||"";R=s+R;var P=b.get(R);P?P.push(S):b.set(R,[S])}}return b}function dS(s,l,p){s=s.ownerDocument||s,s.head.insertBefore(p,l==="title"?s.querySelector("head > title"):null)}function s4(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 fS(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function o4(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=vc(b.href),S=l.querySelector(hu(w));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Jf.bind(s),l.then(s,s)),p.state.loading|=4,p.instance=S,ri(S);return}S=l.ownerDocument||l,b=cS(b),(w=Zn.get(w))&&xb(b,w),S=S.createElement("link"),ri(S);var R=S;R._p=new Promise(function(P,J){R.onload=P,R.onerror=J}),Mr(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=Jf.bind(s),l.addEventListener("load",p),l.addEventListener("error",p))}}var Cb=0;function l4(s,l){return s.stylesheets&&s.count===0&&ep(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var b=setTimeout(function(){if(s.stylesheets&&ep(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&Cb===0&&(Cb=62500*qF());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&ep(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>Cb?50:800)+l);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(b),clearTimeout(w)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var tp=null;function ep(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,tp=new Map,l.forEach(c4,s),tp=null,Jf.call(s))}function c4(s,l){if(!(l.state.loading&4)){var p=tp.get(s);if(p)var b=p.get(null);else{p=new Map,tp.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=Jf.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 du={$$typeof:E,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function h4(s,l,p,b,w,S,R,P,J){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=ei(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ei(0),this.hiddenUpdates=ei(null),this.identifierPrefix=b,this.onUncaughtError=w,this.onCaughtError=S,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function pS(s,l,p,b,w,S,R,P,J,gt,St,Et){return s=new h4(s,l,p,R,J,gt,St,Et,P),l=1,S===!0&&(l|=24),S=En(3,null,null,l),s.current=S,S.stateNode=s,l=ty(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:b,isDehydrated:p,cache:l},ny(S),s}function gS(s){return s?(s=Ql,s):Ql}function mS(s,l,p,b,w,S){w=gS(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&&(pn(p,s,l),Hh(p,s,l))}function yS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function _b(s,l){yS(s,l),(s=s.alternate)&&yS(s,l)}function bS(s){if(s.tag===13||s.tag===31){var l=Go(s,67108864);l!==null&&pn(l,s,67108864),_b(s,67108864)}}function xS(s){if(s.tag===13||s.tag===31){var l=Ln();l=ci(l);var p=Go(s,l);p!==null&&pn(p,s,l),_b(s,l)}}var ip=!0;function u4(s,l,p,b){var w=j.T;j.T=null;var S=q.p;try{q.p=2,kb(s,l,p,b)}finally{q.p=S,j.T=w}}function d4(s,l,p,b){var w=j.T;j.T=null;var S=q.p;try{q.p=8,kb(s,l,p,b)}finally{q.p=S,j.T=w}}function kb(s,l,p,b){if(ip){var w=wb(b);if(w===null)cb(s,l,b,rp,p),CS(s,b);else if(p4(w,s,l,p,b))b.stopPropagation();else if(CS(s,b),l&4&&-1<f4.indexOf(s)){for(;w!==null;){var S=Yr(w);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var R=Pi(S.pendingLanes);if(R!==0){var P=S;for(P.pendingLanes|=2,P.entangledLanes|=2;R;){var J=1<<31-Ee(R);P.entanglements[1]|=J,R&=~J}Ba(S),(Je&6)===0&&($f=ye()+500,su(0))}}break;case 31:case 13:P=Go(S,2),P!==null&&pn(P,S,2),Pf(),_b(S,2)}if(S=wb(b),S===null&&cb(s,l,b,rp,p),S===w)break;w=S}w!==null&&b.stopPropagation()}else cb(s,l,b,null,p)}}function wb(s){return s=ke(s),Sb(s)}var rp=null;function Sb(s){if(rp=null,s=ur(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 rp=s,null}function vS(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(Ai()){case bi:return 2;case tr:return 8;case fi:case Vi:return 32;case Mi:return 268435456;default:return 32}default:return 32}}var Tb=!1,lo=null,co=null,ho=null,fu=new Map,pu=new Map,uo=[],f4="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 CS(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":fu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(l.pointerId)}}function gu(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=Yr(l),l!==null&&bS(l)),s):(s.eventSystemFlags|=b,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function p4(s,l,p,b,w){switch(l){case"focusin":return lo=gu(lo,s,l,p,b,w),!0;case"dragenter":return co=gu(co,s,l,p,b,w),!0;case"mouseover":return ho=gu(ho,s,l,p,b,w),!0;case"pointerover":var S=w.pointerId;return fu.set(S,gu(fu.get(S)||null,s,l,p,b,w)),!0;case"gotpointercapture":return S=w.pointerId,pu.set(S,gu(pu.get(S)||null,s,l,p,b,w)),!0}return!1}function _S(s){var l=ur(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,ir(s.priority,function(){xS(p)});return}}else if(l===31){if(l=h(p),l!==null){s.blockedOn=l,ir(s.priority,function(){xS(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 np(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=wb(s.nativeEvent);if(p===null){p=s.nativeEvent;var b=new p.constructor(p.type,p);Qt=b,p.target.dispatchEvent(b),Qt=null}else return l=Yr(p),l!==null&&bS(l),s.blockedOn=p,!1;l.shift()}return!0}function kS(s,l,p){np(s)&&p.delete(l)}function g4(){Tb=!1,lo!==null&&np(lo)&&(lo=null),co!==null&&np(co)&&(co=null),ho!==null&&np(ho)&&(ho=null),fu.forEach(kS),pu.forEach(kS)}function ap(s,l){s.blockedOn===l&&(s.blockedOn=null,Tb||(Tb=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,g4)))}var sp=null;function wS(s){sp!==s&&(sp=s,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){sp===s&&(sp=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(Sb(b||p)===null)continue;break}var S=Yr(p);S!==null&&(s.splice(l,3),l-=3,wy(S,{pending:!0,data:w,method:p.method,action:b},b,w))}}))}function _c(s){function l(J){return ap(J,s)}lo!==null&&ap(lo,s),co!==null&&ap(co,s),ho!==null&&ap(ho,s),fu.forEach(l),pu.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);)_S(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[qi]||null;if(typeof S=="function")R||wS(p);else if(R){var P=null;if(S&&S.hasAttribute("formAction")){if(w=S,R=S[qi]||null)P=R.formAction;else if(Sb(w)!==null)continue}else P=R.action;typeof P=="function"?p[b+1]=P:(p.splice(b,3),b-=3),wS(p)}}}function SS(){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 Eb(s){this._internalRoot=s}op.prototype.render=Eb.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var p=l.current,b=Ln();mS(p,b,s,l,null,null)},op.prototype.unmount=Eb.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;mS(s.current,2,null,s,null,null),Pf(),l[kn]=null}};function op(s){this._internalRoot=s}op.prototype.unstable_scheduleHydration=function(s){if(s){var l=Gr();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&&_S(s)}};var TS=e.version;if(TS!=="19.2.4")throw Error(n(527,TS,"19.2.4"));q.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 m4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lp.isDisabled&&lp.supportsFiber)try{Di=lp.inject(m4),Le=lp}catch{}}return yu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var p=!1,b="",w=Ok,S=Rk,R=Dk;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=pS(s,1,!1,null,null,p,b,null,w,S,R,SS),s[kn]=l.current,lb(s),new Eb(l)},yu.hydrateRoot=function(s,l,p){if(!a(s))throw Error(n(299));var b=!1,w="",S=Ok,R=Rk,P=Dk,J=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&&(P=p.onRecoverableError),p.formState!==void 0&&(J=p.formState)),l=pS(s,1,!0,l,p??null,b,w,J,S,R,P,SS),l.context=gS(null),p=l.current,b=Ln(),b=ci(b),w=Xs(b),w.callback=null,Zs(p,w,b),p=b,l.current.lanes=p,ue(l,p),Ba(l),s[kn]=l.current,lb(s),new op(l)},yu.version="19.2.4",yu}var FS;function A4(){if(FS)return Bb.exports;FS=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(),Bb.exports=N4(),Bb.exports}var M4=A4(),_h=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(){}},B4={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},vo,d1,OA,L4=(OA=class{constructor(){ae(this,vo,B4);ae(this,d1,!1)}setTimeoutProvider(i){Ut(this,vo,i)}setTimeout(i,e){return et(this,vo).setTimeout(i,e)}clearTimeout(i){et(this,vo).clearTimeout(i)}setInterval(i,e){return et(this,vo).setInterval(i,e)}clearInterval(i){et(this,vo).clearInterval(i)}},vo=new WeakMap,d1=new WeakMap,OA),fl=new L4;function O4(i){setTimeout(i,0)}var Ml=typeof window>"u"||"Deno"in globalThis;function Zr(){}function R4(i,e){return typeof i=="function"?i(e):i}function vx(i){return typeof i=="number"&&i>=0&&i!==1/0}function WA(i,e){return Math.max(i+(e||0)-Date.now(),0)}function Bo(i,e){return typeof i=="function"?i(e):i}function ra(i,e){return typeof i=="function"?i(e):i}function IS(i,e){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=i;if(c){if(n){if(e.queryHash!==p1(c,e.options))return!1}else if(!fd(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 $S(i,e){const{exact:r,status:n,predicate:a,mutationKey:o}=i;if(o){if(!e.options.mutationKey)return!1;if(r){if(Bl(e.options.mutationKey)!==Bl(o))return!1}else if(!fd(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function p1(i,e){return((e==null?void 0:e.queryKeyHashFn)||Bl)(i)}function Bl(i){return JSON.stringify(i,(e,r)=>Cx(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function fd(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(r=>fd(i[r],e[r])):!1}var D4=Object.prototype.hasOwnProperty;function GA(i,e,r=0){if(i===e)return i;if(r>500)return e;const n=zS(i)&&zS(e);if(!n&&!(Cx(i)&&Cx(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:D4.call(i,g))&&d++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[g]=y;continue}const v=GA(x,y,r+1);u[g]=v,v===x&&d++}return o===h&&d===o?i:u}function tg(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 zS(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function Cx(i){if(!PS(i))return!1;const e=i.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!PS(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function PS(i){return Object.prototype.toString.call(i)==="[object Object]"}function j4(i){return new Promise(e=>{fl.setTimeout(e,i)})}function _x(i,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(i,e):r.structuralSharing!==!1?GA(i,e):e}function F4(i,e,r=0){const n=[...i,e];return r&&n.length>r?n.slice(1):n}function I4(i,e,r=0){const n=[e,...i];return r&&n.length>r?n.slice(0,-1):n}var g1=Symbol();function YA(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===g1?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function m1(i,e){return typeof i=="function"?i(...e):!!i}function $4(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 bl,Co,qc,RA,z4=(RA=class extends _h{constructor(){super();ae(this,bl);ae(this,Co);ae(this,qc);Ut(this,qc,e=>{if(!Ml&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){et(this,Co)||this.setEventListener(et(this,qc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,Co))==null||e.call(this),Ut(this,Co,void 0))}setEventListener(e){var r;Ut(this,qc,e),(r=et(this,Co))==null||r.call(this),Ut(this,Co,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){et(this,bl)!==e&&(Ut(this,bl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof et(this,bl)=="boolean"?et(this,bl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},bl=new WeakMap,Co=new WeakMap,qc=new WeakMap,RA),y1=new z4;function kx(){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 P4=O4;function q4(){let i=[],e=0,r=h=>{h()},n=h=>{h()},a=P4;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 gr=q4(),Uc,_o,Hc,DA,U4=(DA=class extends _h{constructor(){super();ae(this,Uc,!0);ae(this,_o);ae(this,Hc);Ut(this,Hc,e=>{if(!Ml&&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,_o)||this.setEventListener(et(this,Hc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,_o))==null||e.call(this),Ut(this,_o,void 0))}setEventListener(e){var r;Ut(this,Hc,e),(r=et(this,_o))==null||r.call(this),Ut(this,_o,e(this.setOnline.bind(this)))}setOnline(e){et(this,Uc)!==e&&(Ut(this,Uc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return et(this,Uc)}},Uc=new WeakMap,_o=new WeakMap,Hc=new WeakMap,DA),eg=new U4;function H4(i){return Math.min(1e3*2**i,3e4)}function KA(i){return(i??"online")==="online"?eg.isOnline():!0}var wx=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function VA(i){let e=!1,r=0,n;const a=kx(),o=()=>a.status!=="pending",c=C=>{var _;if(!o()){const k=new wx(C);x(k),(_=i.onCancel)==null||_.call(i,k)}},h=()=>{e=!0},u=()=>{e=!1},d=()=>y1.isFocused()&&(i.networkMode==="always"||eg.isOnline())&&i.canRun(),f=()=>KA(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??(Ml?0:3),E=i.retryDelay??H4,N=typeof E=="function"?E(r,k):E,L=T===!0||typeof T=="number"&&r<T||typeof T=="function"&&T(r,k);if(e||!L){x(k);return}r++,(O=i.onFail)==null||O.call(i,r,k),j4(N).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 xl,jA,XA=(jA=class{constructor(){ae(this,xl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vx(this.gcTime)&&Ut(this,xl,fl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(Ml?1/0:300*1e3))}clearGcTimeout(){et(this,xl)&&(fl.clearTimeout(et(this,xl)),Ut(this,xl,void 0))}},xl=new WeakMap,jA),vl,Wc,ia,Cl,Cr,Md,_l,fa,Cs,FA,W4=(FA=class extends XA{constructor(e){super();ae(this,fa);ae(this,vl);ae(this,Wc);ae(this,ia);ae(this,Cl);ae(this,Cr);ae(this,Md);ae(this,_l);Ut(this,_l,!1),Ut(this,Md,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ut(this,Cl,e.client),Ut(this,ia,et(this,Cl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ut(this,vl,US(this.options)),this.state=e.state??et(this,vl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=et(this,Cr))==null?void 0:e.promise}setOptions(e){if(this.options={...et(this,Md),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=US(this.options);r.data!==void 0&&(this.setState(qS(r.data,r.dataUpdatedAt)),Ut(this,vl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&et(this,ia).remove(this)}setData(e,r){const n=_x(this.state.data,e,this.options);return Oe(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){Oe(this,fa,Cs).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,a;const r=(n=et(this,Cr))==null?void 0:n.promise;return(a=et(this,Cr))==null||a.cancel(e),r?r.then(Zr).catch(Zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(et(this,vl))}isActive(){return this.observers.some(e=>ra(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===g1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Bo(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:!WA(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=et(this,Cr))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=et(this,Cr))==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,Cr)&&(et(this,_l)?et(this,Cr).cancel({revert:!0}):et(this,Cr).cancelRetry()),this.scheduleGc()),et(this,ia).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,fa,Cs).call(this,{type:"invalidate"})}async fetch(e,r){var u,d,f,g,x,y,v,C,_,k,T,E;if(this.state.fetchStatus!=="idle"&&((u=et(this,Cr))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(et(this,Cr))return et(this,Cr).continueRetry(),et(this,Cr).promise}if(e&&this.setOptions(e),!this.options.queryFn){const N=this.observers.find(L=>L.options.queryFn);N&&this.setOptions(N.options)}const n=new AbortController,a=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ut(this,_l,!0),n.signal)})},o=()=>{const N=YA(this.options,r),O=(()=>{const A={client:et(this,Cl),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return Ut(this,_l,!1),this.options.persister?this.options.persister(N,O,this):N(O)},h=(()=>{const N={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:et(this,Cl),state:this.state,fetchFn:o};return a(N),N})();(d=this.options.behavior)==null||d.onFetch(h,this),Ut(this,Wc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=h.fetchOptions)==null?void 0:f.meta))&&Oe(this,fa,Cs).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Ut(this,Cr,VA({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,onCancel:N=>{N instanceof wx&&N.revert&&this.setState({...et(this,Wc),fetchStatus:"idle"}),n.abort()},onFail:(N,L)=>{Oe(this,fa,Cs).call(this,{type:"failed",failureCount:N,error:L})},onPause:()=>{Oe(this,fa,Cs).call(this,{type:"pause"})},onContinue:()=>{Oe(this,fa,Cs).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const N=await et(this,Cr).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(y=(x=et(this,ia).config).onSuccess)==null||y.call(x,N,this),(C=(v=et(this,ia).config).onSettled)==null||C.call(v,N,this.state.error,this),N}catch(N){if(N instanceof wx){if(N.silent)return et(this,Cr).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Oe(this,fa,Cs).call(this,{type:"error",error:N}),(k=(_=et(this,ia).config).onError)==null||k.call(_,N,this),(E=(T=et(this,ia).config).onSettled)==null||E.call(T,this.state.data,N,this),N}finally{this.scheduleGc()}}},vl=new WeakMap,Wc=new WeakMap,ia=new WeakMap,Cl=new WeakMap,Cr=new WeakMap,Md=new WeakMap,_l=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,...ZA(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...qS(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ut(this,Wc,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),gr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),et(this,ia).notify({query:this,type:"updated",action:e})})},FA);function ZA(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KA(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function qS(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function US(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 mn,Ge,Bd,Xr,kl,Gc,ws,ko,Ld,Yc,Kc,wl,Sl,wo,Vc,oi,Uu,Sx,Tx,Ex,Nx,Ax,Mx,Bx,QA,IA,G4=(IA=class extends _h{constructor(e,r){super();ae(this,oi);ae(this,mn);ae(this,Ge);ae(this,Bd);ae(this,Xr);ae(this,kl);ae(this,Gc);ae(this,ws);ae(this,ko);ae(this,Ld);ae(this,Yc);ae(this,Kc);ae(this,wl);ae(this,Sl);ae(this,wo);ae(this,Vc,new Set);this.options=r,Ut(this,mn,e),Ut(this,ko,null),Ut(this,ws,kx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(et(this,Ge).addObserver(this),HS(et(this,Ge),this.options)?Oe(this,oi,Uu).call(this):this.updateResult(),Oe(this,oi,Nx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lx(et(this,Ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lx(et(this,Ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,oi,Ax).call(this),Oe(this,oi,Mx).call(this),et(this,Ge).removeObserver(this)}setOptions(e){const r=this.options,n=et(this,Ge);if(this.options=et(this,mn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ra(this.options.enabled,et(this,Ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,oi,Bx).call(this),et(this,Ge).setOptions(this.options),r._defaulted&&!tg(this.options,r)&&et(this,mn).getQueryCache().notify({type:"observerOptionsUpdated",query:et(this,Ge),observer:this});const a=this.hasListeners();a&&WS(et(this,Ge),n,this.options,r)&&Oe(this,oi,Uu).call(this),this.updateResult(),a&&(et(this,Ge)!==n||ra(this.options.enabled,et(this,Ge))!==ra(r.enabled,et(this,Ge))||Bo(this.options.staleTime,et(this,Ge))!==Bo(r.staleTime,et(this,Ge)))&&Oe(this,oi,Sx).call(this);const o=Oe(this,oi,Tx).call(this);a&&(et(this,Ge)!==n||ra(this.options.enabled,et(this,Ge))!==ra(r.enabled,et(this,Ge))||o!==et(this,wo))&&Oe(this,oi,Ex).call(this,o)}getOptimisticResult(e){const r=et(this,mn).getQueryCache().build(et(this,mn),e),n=this.createResult(r,e);return K4(this,n)&&(Ut(this,Xr,n),Ut(this,Gc,this.options),Ut(this,kl,et(this,Ge).state)),n}getCurrentResult(){return et(this,Xr)}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,Vc).add(e)}getCurrentQuery(){return et(this,Ge)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=et(this,mn).defaultQueryOptions(e),n=et(this,mn).getQueryCache().build(et(this,mn),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return Oe(this,oi,Uu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),et(this,Xr)))}createResult(e,r){var z;const n=et(this,Ge),a=this.options,o=et(this,Xr),c=et(this,kl),h=et(this,Gc),d=e!==n?e.state:et(this,Bd),{state:f}=e;let g={...f},x=!1,y;if(r._optimisticResults){const D=this.hasListeners(),$=!D&&HS(e,r),U=D&&WS(e,n,r,a);($||U)&&(g={...g,...ZA(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((z=et(this,Kc))==null?void 0:z.state.data,et(this,Kc)):r.placeholderData,D!==void 0&&(_="success",y=_x(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,Ld))y=et(this,Yc);else try{Ut(this,Ld,r.select),y=r.select(y),y=_x(o==null?void 0:o.data,y,r),Ut(this,Yc,y),Ut(this,ko,null)}catch(D){Ut(this,ko,D)}et(this,ko)&&(v=et(this,ko),y=et(this,Yc),C=Date.now(),_="error");const T=g.fetchStatus==="fetching",E=_==="pending",N=_==="error",L=E&&T,O=y!==void 0,M={status:_,fetchStatus:g.fetchStatus,isPending:E,isSuccess:_==="success",isError:N,isInitialLoading:L,isLoading:L,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&&!E,isLoadingError:N&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:N&&O,isStale:b1(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,$=M.status==="error"&&!D,U=W=>{$?W.reject(M.error):D&&W.resolve(M.data)},Y=()=>{const W=Ut(this,ws,M.promise=kx());U(W)},I=et(this,ws);switch(I.status){case"pending":e.queryHash===n.queryHash&&U(I);break;case"fulfilled":($||M.data!==I.value)&&Y();break;case"rejected":(!$||M.error!==I.reason)&&Y();break}}return M}updateResult(){const e=et(this,Xr),r=this.createResult(et(this,Ge),this.options);if(Ut(this,kl,et(this,Ge).state),Ut(this,Gc,this.options),et(this,kl).data!==void 0&&Ut(this,Kc,et(this,Ge)),tg(r,e))return;Ut(this,Xr,r);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!et(this,Vc).size)return!0;const c=new Set(o??et(this,Vc));return this.options.throwOnError&&c.add("error"),Object.keys(et(this,Xr)).some(h=>{const u=h;return et(this,Xr)[u]!==e[u]&&c.has(u)})};Oe(this,oi,QA).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,oi,Nx).call(this)}},mn=new WeakMap,Ge=new WeakMap,Bd=new WeakMap,Xr=new WeakMap,kl=new WeakMap,Gc=new WeakMap,ws=new WeakMap,ko=new WeakMap,Ld=new WeakMap,Yc=new WeakMap,Kc=new WeakMap,wl=new WeakMap,Sl=new WeakMap,wo=new WeakMap,Vc=new WeakMap,oi=new WeakSet,Uu=function(e){Oe(this,oi,Bx).call(this);let r=et(this,Ge).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Zr)),r},Sx=function(){Oe(this,oi,Ax).call(this);const e=Bo(this.options.staleTime,et(this,Ge));if(Ml||et(this,Xr).isStale||!vx(e))return;const n=WA(et(this,Xr).dataUpdatedAt,e)+1;Ut(this,wl,fl.setTimeout(()=>{et(this,Xr).isStale||this.updateResult()},n))},Tx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(et(this,Ge)):this.options.refetchInterval)??!1},Ex=function(e){Oe(this,oi,Mx).call(this),Ut(this,wo,e),!(Ml||ra(this.options.enabled,et(this,Ge))===!1||!vx(et(this,wo))||et(this,wo)===0)&&Ut(this,Sl,fl.setInterval(()=>{(this.options.refetchIntervalInBackground||y1.isFocused())&&Oe(this,oi,Uu).call(this)},et(this,wo)))},Nx=function(){Oe(this,oi,Sx).call(this),Oe(this,oi,Ex).call(this,Oe(this,oi,Tx).call(this))},Ax=function(){et(this,wl)&&(fl.clearTimeout(et(this,wl)),Ut(this,wl,void 0))},Mx=function(){et(this,Sl)&&(fl.clearInterval(et(this,Sl)),Ut(this,Sl,void 0))},Bx=function(){const e=et(this,mn).getQueryCache().build(et(this,mn),this.options);if(e===et(this,Ge))return;const r=et(this,Ge);Ut(this,Ge,e),Ut(this,Bd,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},QA=function(e){gr.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(et(this,Xr))}),et(this,mn).getQueryCache().notify({query:et(this,Ge),type:"observerResultsUpdated"})})},IA);function Y4(i,e){return ra(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function HS(i,e){return Y4(i,e)||i.state.data!==void 0&&Lx(i,e,e.refetchOnMount)}function Lx(i,e,r){if(ra(e.enabled,i)!==!1&&Bo(e.staleTime,i)!=="static"){const n=typeof r=="function"?r(i):r;return n==="always"||n!==!1&&b1(i,e)}return!1}function WS(i,e,r,n){return(i!==e||ra(n.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&b1(i,r)}function b1(i,e){return ra(e.enabled,i)!==!1&&i.isStaleByTime(Bo(e.staleTime,i))}function K4(i,e){return!tg(i.getCurrentResult(),e)}function GS(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 _=E=>{$4(E,()=>e.signal,()=>C=!0)},k=YA(e.options,e.fetchOptions),T=async(E,N,L)=>{if(C)return Promise.reject();if(N==null&&E.pages.length)return Promise.resolve(E);const A=(()=>{const $={client:e.client,queryKey:e.queryKey,pageParam:N,direction:L?"backward":"forward",meta:e.options.meta};return _($),$})(),M=await k(A),{maxPages:z}=e.options,D=L?I4:F4;return{pages:D(E.pages,M,z),pageParams:D(E.pageParams,N,z)}};if(a&&o.length){const E=a==="backward",N=E?V4:YS,L={pages:o,pageParams:c},O=N(n,L);h=await T(L,O,E)}else{const E=i??o.length;do{const N=u===0?c[0]??n.initialPageParam:YS(n,h);if(u>0&&N==null)break;h=await T(h,N),u++}while(u<E)}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 YS(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 V4(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 Od,Pa,Pr,Tl,qa,mo,$A,X4=($A=class extends XA{constructor(e){super();ae(this,qa);ae(this,Od);ae(this,Pa);ae(this,Pr);ae(this,Tl);Ut(this,Od,e.client),this.mutationId=e.mutationId,Ut(this,Pr,e.mutationCache),Ut(this,Pa,[]),this.state=e.state||JA(),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,Pr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ut(this,Pa,et(this,Pa).filter(r=>r!==e)),this.scheduleGc(),et(this,Pr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){et(this,Pa).length||(this.state.status==="pending"?this.scheduleGc():et(this,Pr).remove(this))}continue(){var e;return((e=et(this,Tl))==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,E,N,L,O,A;const r=()=>{Oe(this,qa,mo).call(this,{type:"continue"})},n={client:et(this,Od),meta:this.options.meta,mutationKey:this.options.mutationKey};Ut(this,Tl,VA({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,z)=>{Oe(this,qa,mo).call(this,{type:"failed",failureCount:M,error:z})},onPause:()=>{Oe(this,qa,mo).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>et(this,Pr).canRun(this)}));const a=this.state.status==="pending",o=!et(this,Tl).canStart();try{if(a)r();else{Oe(this,qa,mo).call(this,{type:"pending",variables:e,isPaused:o}),et(this,Pr).config.onMutate&&await et(this,Pr).config.onMutate(e,this,n);const z=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));z!==this.state.context&&Oe(this,qa,mo).call(this,{type:"pending",context:z,variables:e,isPaused:o})}const M=await et(this,Tl).start();return await((d=(u=et(this,Pr).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,Pr).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)),Oe(this,qa,mo).call(this,{type:"success",data:M}),M}catch(M){try{await((k=(_=et(this,Pr).config).onError)==null?void 0:k.call(_,M,e,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((E=(T=this.options).onError)==null?void 0:E.call(T,M,e,this.state.context,n))}catch(z){Promise.reject(z)}try{await((L=(N=et(this,Pr).config).onSettled)==null?void 0:L.call(N,void 0,M,this.state.variables,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((A=(O=this.options).onSettled)==null?void 0:A.call(O,void 0,M,e,this.state.context,n))}catch(z){Promise.reject(z)}throw Oe(this,qa,mo).call(this,{type:"error",error:M}),M}finally{et(this,Pr).runNext(this)}}},Od=new WeakMap,Pa=new WeakMap,Pr=new WeakMap,Tl=new WeakMap,qa=new WeakSet,mo=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),gr.batch(()=>{et(this,Pa).forEach(n=>{n.onMutationUpdate(e)}),et(this,Pr).notify({mutation:this,type:"updated",action:e})})},$A);function JA(){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,Rd,zA,Z4=(zA=class extends _h{constructor(e={}){super();ae(this,Ss);ae(this,pa);ae(this,Rd);this.config=e,Ut(this,Ss,new Set),Ut(this,pa,new Map),Ut(this,Rd,0)}build(e,r,n){const a=new X4({client:e,mutationCache:this,mutationId:++cp(this,Rd)._,options:e.defaultMutationOptions(r),state:n});return this.add(a),a}add(e){et(this,Ss).add(e);const r=hp(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=hp(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=hp(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=hp(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(){gr.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=>$S(r,n))}findAll(e={}){return this.getAll().filter(r=>$S(e,r))}notify(e){gr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return gr.batch(()=>Promise.all(e.map(r=>r.continue().catch(Zr))))}},Ss=new WeakMap,pa=new WeakMap,Rd=new WeakMap,zA);function hp(i){var e;return(e=i.options.scope)==null?void 0:e.id}var Ts,So,yn,Es,Rs,Fp,Ox,PA,Q4=(PA=class extends _h{constructor(r,n){super();ae(this,Rs);ae(this,Ts);ae(this,So);ae(this,yn);ae(this,Es);Ut(this,Ts,r),this.setOptions(n),this.bindMethods(),Oe(this,Rs,Fp).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),tg(this.options,n)||et(this,Ts).getMutationCache().notify({type:"observerOptionsUpdated",mutation:et(this,yn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Bl(n.mutationKey)!==Bl(this.options.mutationKey)?this.reset():((a=et(this,yn))==null?void 0:a.state.status)==="pending"&&et(this,yn).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=et(this,yn))==null||r.removeObserver(this)}onMutationUpdate(r){Oe(this,Rs,Fp).call(this),Oe(this,Rs,Ox).call(this,r)}getCurrentResult(){return et(this,So)}reset(){var r;(r=et(this,yn))==null||r.removeObserver(this),Ut(this,yn,void 0),Oe(this,Rs,Fp).call(this),Oe(this,Rs,Ox).call(this)}mutate(r,n){var a;return Ut(this,Es,n),(a=et(this,yn))==null||a.removeObserver(this),Ut(this,yn,et(this,Ts).getMutationCache().build(et(this,Ts),this.options)),et(this,yn).addObserver(this),et(this,yn).execute(r)}},Ts=new WeakMap,So=new WeakMap,yn=new WeakMap,Es=new WeakMap,Rs=new WeakSet,Fp=function(){var n;const r=((n=et(this,yn))==null?void 0:n.state)??JA();Ut(this,So,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Ox=function(r){gr.batch(()=>{var n,a,o,c,h,u,d,f;if(et(this,Es)&&this.hasListeners()){const g=et(this,So).variables,x=et(this,So).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,So))})})},PA),Ua,qA,J4=(qA=class extends _h{constructor(e={}){super();ae(this,Ua);this.config=e,Ut(this,Ua,new Map)}build(e,r,n){const a=r.queryKey,o=r.queryHash??p1(a,r);let c=this.get(o);return c||(c=new W4({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(){gr.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=>IS(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>IS(e,n)):r}notify(e){gr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){gr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){gr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ua=new WeakMap,qA),Ki,To,Eo,Xc,Zc,No,Qc,Jc,UA,tI=(UA=class{constructor(i={}){ae(this,Ki);ae(this,To);ae(this,Eo);ae(this,Xc);ae(this,Zc);ae(this,No);ae(this,Qc);ae(this,Jc);Ut(this,Ki,i.queryCache||new J4),Ut(this,To,i.mutationCache||new Z4),Ut(this,Eo,i.defaultOptions||{}),Ut(this,Xc,new Map),Ut(this,Zc,new Map),Ut(this,No,0)}mount(){cp(this,No)._++,et(this,No)===1&&(Ut(this,Qc,y1.subscribe(async i=>{i&&(await this.resumePausedMutations(),et(this,Ki).onFocus())})),Ut(this,Jc,eg.subscribe(async i=>{i&&(await this.resumePausedMutations(),et(this,Ki).onOnline())})))}unmount(){var i,e;cp(this,No)._--,et(this,No)===0&&((i=et(this,Qc))==null||i.call(this),Ut(this,Qc,void 0),(e=et(this,Jc))==null||e.call(this),Ut(this,Jc,void 0))}isFetching(i){return et(this,Ki).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return et(this,To).findAll({...i,status:"pending"}).length}getQueryData(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=et(this,Ki).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),r=et(this,Ki).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(i):(i.revalidateIfStale&&r.isStaleByTime(Bo(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(i){return et(this,Ki).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,Ki).get(n.queryHash),o=a==null?void 0:a.state.data,c=R4(e,o);if(c!==void 0)return et(this,Ki).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(i,e,r){return gr.batch(()=>et(this,Ki).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,Ki).get(e.queryHash))==null?void 0:r.state}removeQueries(i){const e=et(this,Ki);gr.batch(()=>{e.findAll(i).forEach(r=>{e.remove(r)})})}resetQueries(i,e){const r=et(this,Ki);return gr.batch(()=>(r.findAll(i).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...i},e)))}cancelQueries(i,e={}){const r={revert:!0,...e},n=gr.batch(()=>et(this,Ki).findAll(i).map(a=>a.cancel(r)));return Promise.all(n).then(Zr).catch(Zr)}invalidateQueries(i,e={}){return gr.batch(()=>(et(this,Ki).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=gr.batch(()=>et(this,Ki).findAll(i).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(Zr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Zr)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const r=et(this,Ki).build(this,e);return r.isStaleByTime(Bo(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(Zr).catch(Zr)}fetchInfiniteQuery(i){return i.behavior=GS(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(Zr).catch(Zr)}ensureInfiniteQueryData(i){return i.behavior=GS(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return eg.isOnline()?et(this,To).resumePausedMutations():Promise.resolve()}getQueryCache(){return et(this,Ki)}getMutationCache(){return et(this,To)}getDefaultOptions(){return et(this,Eo)}setDefaultOptions(i){Ut(this,Eo,i)}setQueryDefaults(i,e){et(this,Xc).set(Bl(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...et(this,Xc).values()],r={};return e.forEach(n=>{fd(i,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(i,e){et(this,Zc).set(Bl(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...et(this,Zc).values()],r={};return e.forEach(n=>{fd(i,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(i){if(i._defaulted)return i;const e={...et(this,Eo).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=p1(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===g1&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...et(this,Eo).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){et(this,Ki).clear(),et(this,To).clear()}},Ki=new WeakMap,To=new WeakMap,Eo=new WeakMap,Xc=new WeakMap,Zc=new WeakMap,No=new WeakMap,Qc=new WeakMap,Jc=new WeakMap,UA),tM=K.createContext(void 0),kr=i=>{const e=K.useContext(tM);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},KS=({client:i,children:e})=>(K.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),m.jsx(tM.Provider,{value:i,children:e})),eM=K.createContext(!1),eI=()=>K.useContext(eM);eM.Provider;function iI(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var rI=K.createContext(iI()),nI=()=>K.useContext(rI),aI=(i,e,r)=>{const n=r!=null&&r.state.error&&typeof i.throwOnError=="function"?m1(i.throwOnError,[r.state.error,r]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},sI=i=>{K.useEffect(()=>{i.clearReset()},[i])},oI=({result:i,errorResetBoundary:e,throwOnError:r,query:n,suspense:a})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(a&&i.data===void 0||m1(r,[i.error,n])),lI=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))}},cI=(i,e)=>i.isLoading&&i.isFetching&&!e,hI=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,VS=(i,e,r)=>e.fetchOptimistic(i).catch(()=>{r.clearReset()});function uI(i,e,r){var x,y,v,C;const n=eI(),a=nI(),o=kr(),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",lI(c),aI(c,a,h),sI(a);const u=!o.getQueryCache().get(c.queryHash),[d]=K.useState(()=>new e(o,c)),f=d.getOptimisticResult(c),g=!n&&i.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(_=>{const k=g?d.subscribe(gr.batchCalls(_)):Zr;return d.updateResult(),k},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),K.useEffect(()=>{d.setOptions(c)},[c,d]),hI(c,f))throw VS(c,d,a);if(oI({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&&!Ml&&cI(f,n)){const _=u?VS(c,d,a):h==null?void 0:h.promise;_==null||_.catch(Zr).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?f:d.trackResult(f)}function di(i,e){return uI(i,G4)}function Hr(i,e){const r=kr(),[n]=K.useState(()=>new Q4(r,i));K.useEffect(()=>{n.setOptions(i)},[n,i]);const a=K.useSyncExternalStore(K.useCallback(c=>n.subscribe(gr.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=K.useCallback((c,h)=>{n.mutate(c,h).catch(Zr)},[n]);if(a.error&&m1(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const dI="/api";let Rx=null;function fI(i){Rx=i}class pI{async request(e,r){const n={"Content-Type":"application/json",...r==null?void 0:r.headers};Rx&&(n["X-Dreamcontext-Vault"]=Rx);const a=await fetch(`${dI}${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 me=new pI;function iM(){return di({queryKey:["vaults"],queryFn:()=>me.get("/vaults")})}function gI(){return di({queryKey:["connections"],queryFn:()=>me.get("/connections"),select:i=>i.connections})}function mI(){const i=kr();return Hr({mutationFn:e=>me.post("/connections",e),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]})}})}function yI(){const i=kr();return Hr({mutationFn:e=>me.del(`/connections/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]})}})}const bI="modulepreload",xI=function(i){return"/"+i},XS={},De=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=xI(d),d in XS)return;XS[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":bI,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 rM(){return!!window.__TAURI_INTERNALS__}async function vI(){if(rM()){const{open:e}=await De(async()=>{const{open:n}=await import("./index-DpzkIBIK.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 CI(i){if(rM()){const{WebviewWindow:e}=await De(async()=>{const{WebviewWindow:o}=await import("./webviewWindow-BHsy7FSR.js");return{WebviewWindow:o}},__vite__mapDeps([2,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});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")}function _I(){return di({queryKey:["launcher-defaults"],queryFn:()=>me.get("/launcher/defaults"),staleTime:1/0})}function kI(){const i=kr();return Hr({mutationFn:e=>me.post("/launcher/scaffold",e),onSuccess:()=>{i.invalidateQueries({queryKey:["vaults"]})}})}async function wI(i){return me.get(`/launcher/detect?path=${encodeURIComponent(i)}`)}const SI=["name","description","targetUser","stack","priority","review"],TI=["path","description","targetUser","stack","priority","review"],Db={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 EI({onClose:i,onReady:e}){const r=_I(),n=kI(),[a,o]=K.useState(null),[c,h]=K.useState(0),[u,d]=K.useState(null),[f,g]=K.useState(null),[x,y]=K.useState(null),[v,C]=K.useState(!1),[_,k]=K.useState(""),[T,E]=K.useState(""),[N,L]=K.useState(""),[O,A]=K.useState(""),[M,z]=K.useState(""),[D,$]=K.useState(""),[U,Y]=K.useState(""),I=K.useRef(null);K.useEffect(()=>{var st;a==="new"&&!T&&((st=r.data)!=null&&st.defaultParent)&&E(r.data.defaultParent)},[a,T,r.data]);const W=a==="existing"?TI:SI,j=W[c];K.useEffect(()=>{var st;(st=I.current)==null||st.focus()},[j,a]);function q(st){o(st),h(0),d(null)}async function G(st){d(null);const ct=await vI();if(ct){if(st==="parent"){E(ct);return}L(ct);try{const vt=await wI(ct);if(_||k(vt.name),!D&&vt.stack&&$(vt.stack),vt.hasContext){const At=await n.mutateAsync({mode:"existing",name:vt.name,projectPath:ct});e(At.vault.name);return}h(1)}catch(vt){d(vt instanceof Error?vt.message:String(vt))}}}const it=K.useMemo(()=>j==="name"?_.trim().length>0&&T.trim().length>0:j==="path"?N.trim().length>0:!0,[j,_,T,N]);function nt(){d(null),c<W.length-1&&h(st=>st+1)}function H(){d(null),c>0?h(st=>st-1):o(null)}async function rt(){d(null);const st=a==="existing"?{mode:"existing",name:_.trim(),projectPath:N.trim()}:{mode:"new",name:_.trim(),parentDir:T.trim()};st.description=O.trim()||void 0,st.targetUser=M.trim()||void 0,st.stack=D.trim()||void 0,st.priority=U.trim()||void 0;try{const ct=await n.mutateAsync(st);g(ct.vault),y(ct.cli??null)}catch(ct){d(ct instanceof Error?ct.message:String(ct))}}const ft="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 Q(){try{await navigator.clipboard.writeText(ft),C(!0),setTimeout(()=>C(!1),1500)}catch{d("Could not copy to clipboard.")}}function yt(st,ct,vt){return m.jsx("input",{ref:I,type:"text",className:"wiz-input",value:st,placeholder:vt,onChange:At=>ct(At.target.value),onKeyDown:At=>{At.key==="Enter"&&it&&nt()}})}function ot(){var zt;if(f)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:["“",f.name,"” is ready"]}),m.jsx("p",{className:"wiz-hint",children:f.path}),(x==null?void 0:x.status)==="installed"&&m.jsx("p",{className:"wiz-hint",children:"Installed the dreamcontext CLI from npm so your hooks work."}),(x==null?void 0:x.status)==="failed"&&m.jsx("div",{className:"wiz-error",children:x.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:ft}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:Q,children:v?"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(f.name),children:"Open project →"})]})]});if(a===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:()=>q("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:()=>q("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(j==="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:N,readOnly:!0,placeholder:"No folder chosen"}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>G("project"),children:n.isPending?"Working…":"Browse…"})]})]});if(j==="name")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:Db.name.label}),m.jsx("p",{className:"wiz-hint",children:Db.name.hint}),yt(_,k,"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:T,placeholder:((zt=r.data)==null?void 0:zt.defaultParent)??"~/projects",onChange:Rt=>E(Rt.target.value)}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>G("parent"),children:"Browse…"})]}),_.trim()&&T.trim()&&m.jsxs("p",{className:"wiz-hint wiz-preview",children:["Creates: ",T.replace(/\/+$/,""),"/",_.trim()]})]});if(j==="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:_.trim()}),m.jsx("dt",{children:"Location"}),m.jsx("dd",{children:a==="new"?`${T.replace(/\/+$/,"")}/${_.trim()}`:N}),O.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Description"}),m.jsx("dd",{children:O.trim()})]}),M.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"For"}),m.jsx("dd",{children:M.trim()})]}),D.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Stack"}),m.jsx("dd",{children:D.trim()})]}),U.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Focus"}),m.jsx("dd",{children:U.trim()})]})]})]});const st=Db[j],ct={description:[O,A,"A persistent brain for AI agents…"],targetUser:[M,z,"Developers"],stack:[D,$,"TypeScript, React, Node…"],priority:[U,Y,"Initial setup"]},[vt,At,Ft]=ct[j];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:st.label}),m.jsx("p",{className:"wiz-hint",children:st.hint}),yt(vt,At,Ft)]})}const X=j==="review",Z=a!==null&&j!=="path"&&!f;return m.jsx("div",{className:"wiz-overlay",role:"dialog","aria-modal":"true",onClick:i,children:m.jsxs("div",{className:"wiz-modal",onClick:st=>st.stopPropagation(),children:[m.jsx("button",{type:"button",className:"wiz-close",onClick:i,"aria-label":"Close",children:"×"}),ot(),u&&m.jsx("div",{className:"wiz-error",children:u}),Z&&m.jsxs("div",{className:"wiz-actions",children:[m.jsx("button",{type:"button",className:"wiz-btn",onClick:H,children:"Back"}),X?m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:rt,disabled:n.isPending||!_.trim(),children:n.isPending?"Setting up…":"Set up project"}):m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:nt,disabled:!it,children:"Next"})]})]})})}function NI(){const{data:i,isLoading:e,isError:r,error:n}=iM(),[a,o]=K.useState(""),[c,h]=K.useState(null),[u,d]=K.useState(!1),f=(i==null?void 0:i.vaults)??[],g=K.useMemo(()=>{const y=a.trim().toLowerCase();return y?f.filter(v=>v.name.toLowerCase().includes(y)||v.path.toLowerCase().includes(y)):f},[f,a]);async function x(y){h(null);try{await CI(y)}catch(v){h(v instanceof Error?v.message:String(v))}}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:[m.jsx("input",{type:"search",className:"launcher-search",placeholder:"Search projects…",value:a,onChange:y=>o(y.target.value),"aria-label":"Search projects"}),m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-primary",onClick:()=>d(!0),children:"+ Add Project"})]})]}),c&&m.jsx("div",{className:"launcher-error",children:c}),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&&g.length===0&&m.jsx("div",{className:"launcher-empty",children:f.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:g.map(y=>m.jsxs("button",{type:"button",className:"launcher-card",onClick:()=>x(y.name),children:[m.jsxs("div",{className:"launcher-card-head",children:[m.jsx("span",{className:"launcher-card-dot","aria-hidden":!0}),m.jsx("span",{className:"launcher-card-name",children:y.name})]}),m.jsx("div",{className:"launcher-card-path",children:y.path}),m.jsx("div",{className:"launcher-card-open",children:"Open →"})]},y.name))}),u&&m.jsx(EI,{onClose:()=>d(!1),onReady:async y=>{d(!1),await x(y)}})]})}const nM=K.createContext(null);function aM(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ZS(i){return i==="system"?aM():i}function QS({children:i}){const[e,r]=K.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=K.useState(()=>ZS(e)),o=c=>{r(c),localStorage.setItem("dreamcontext-theme",c)};return K.useEffect(()=>{const c=ZS(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),K.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=aM();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),m.jsx(nM.Provider,{value:{theme:e,resolved:n,setTheme:o},children:i})}function jd(){const i=K.useContext(nM);if(!i)throw new Error("useTheme must be used within ThemeProvider");return i}const AI={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 (ClickUp)","settings.cloud_tasks.hint":"Tasks live in a ClickUp list; a gitignored local mirror keeps recall, snapshots, and the dashboard working unchanged.","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.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.shareable.label":"Shareable","federation.shareable.hint":"When on, connected peer vaults may pull this project’s corpus into a cross-vault recall. Default off — private by default.","federation.vaults":"Registered vaults","federation.vaults.empty":"No vaults registered. Run `dreamcontext vaults discover --register` to add sibling projects.","federation.current":"Current","federation.connections":"Connections","federation.connections.empty":"No connections yet. Add a peer below to span recall and federation across projects.","federation.stale":"Stale","federation.remove":"Remove","federation.direction":"Direction","federation.direction.out":"Out","federation.direction.in":"In","federation.direction.both":"Both","federation.topics.placeholder":"topics (comma-separated, blank = all)","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"}},sM=K.createContext(null);function MI({children:i}){const[e,r]=K.useState("en"),n=a=>{var o;return((o=AI[e])==null?void 0:o[a])??a};return m.jsx(sM.Provider,{value:{locale:e,setLocale:r,t:n},children:i})}function Ni(){const i=K.useContext(sM);if(!i)throw new Error("useI18n must be used within I18nProvider");return i}const oM=K.createContext({projectId:"",contextRoot:""});function BI(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 LI({children:i}){const[e,r]=K.useState({kind:"loading"});return K.useEffect(()=>{me.get("/health").then(n=>{r({kind:"ready",value:{contextRoot:n.contextRoot,projectId:BI(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(oM.Provider,{value:e.value,children:i})}function lM(){return K.useContext(oM)}function cM(i){return i<=3?"Alert":i<=6?"Drowsy":i<=9?"Sleepy":"Must Sleep"}function hM(i){return i<=3?"alert":i<=6?"drowsy":i<=9?"sleepy":"must_sleep"}function uM(){return di({queryKey:["sleep"],queryFn:()=>me.get("/sleep")})}function OI(){return di({queryKey:["version-check"],queryFn:()=>me.get("/version-check")})}function x1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ul=x1();function dM(i){Ul=i}var ed={exec:()=>null};function li(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(Jr.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var Jr={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")},RI=/^(?:[ \t]*(?:\n|$))+/,DI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,FI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,v1=/(?:[*+-]|\d{1,9}[.)])/,fM=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pM=li(fM).replace(/bull/g,v1).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(),II=li(fM).replace(/bull/g,v1).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(),C1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$I=/^[^\n]+/,_1=/(?!\s*\])(?:\\.|[^\[\]\\])+/,zI=li(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),PI=li(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,v1).getRegex(),Vg="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",k1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qI=li("^ {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",k1).replace("tag",Vg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gM=li(C1).replace("hr",Fd).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",Vg).getRegex(),UI=li(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gM).getRegex(),w1={blockquote:UI,code:DI,def:zI,fences:jI,heading:FI,hr:Fd,html:qI,lheading:pM,list:PI,newline:RI,paragraph:gM,table:ed,text:$I},JS=li("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fd).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",Vg).getRegex(),HI={...w1,lheading:II,table:JS,paragraph:li(C1).replace("hr",Fd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",JS).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",Vg).getRegex()},WI={...w1,html:li(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",k1).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:ed,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:li(C1).replace("hr",Fd).replace("heading",` *#{1,6} *[^
|
|
51
|
+
]`).replace("lheading",pM).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},GI=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,YI=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mM=/^( {2,}|\\)\n(?!\s*$)/,KI=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xg=/[\p{P}\p{S}]/u,S1=/[\s\p{P}\p{S}]/u,yM=/[^\s\p{P}\p{S}]/u,VI=li(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,S1).getRegex(),bM=/(?!~)[\p{P}\p{S}]/u,XI=/(?!~)[\s\p{P}\p{S}]/u,ZI=/(?:[^\s\p{P}\p{S}]|~)/u,QI=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,xM=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,JI=li(xM,"u").replace(/punct/g,Xg).getRegex(),t6=li(xM,"u").replace(/punct/g,bM).getRegex(),vM="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",e6=li(vM,"gu").replace(/notPunctSpace/g,yM).replace(/punctSpace/g,S1).replace(/punct/g,Xg).getRegex(),i6=li(vM,"gu").replace(/notPunctSpace/g,ZI).replace(/punctSpace/g,XI).replace(/punct/g,bM).getRegex(),r6=li("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,yM).replace(/punctSpace/g,S1).replace(/punct/g,Xg).getRegex(),n6=li(/\\(punct)/,"gu").replace(/punct/g,Xg).getRegex(),a6=li(/^<(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(),s6=li(k1).replace("(?:-->|$)","-->").getRegex(),o6=li("^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",s6).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ig=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,l6=li(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ig).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),CM=li(/^!?\[(label)\]\[(ref)\]/).replace("label",ig).replace("ref",_1).getRegex(),_M=li(/^!?\[(ref)\](?:\[\])?/).replace("ref",_1).getRegex(),c6=li("reflink|nolink(?!\\()","g").replace("reflink",CM).replace("nolink",_M).getRegex(),T1={_backpedal:ed,anyPunctuation:n6,autolink:a6,blockSkip:QI,br:mM,code:YI,del:ed,emStrongLDelim:JI,emStrongRDelimAst:e6,emStrongRDelimUnd:r6,escape:GI,link:l6,nolink:_M,punctuation:VI,reflink:CM,reflinkSearch:c6,tag:o6,text:KI,url:ed},h6={...T1,link:li(/^!?\[(label)\]\((.*?)\)/).replace("label",ig).getRegex(),reflink:li(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ig).getRegex()},Dx={...T1,emStrongRDelimAst:i6,emStrongLDelim:t6,url:li(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},u6={...Dx,br:li(mM).replace("{2,}","*").getRegex(),text:li(Dx.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},up={normal:w1,gfm:HI,pedantic:WI},bu={normal:T1,gfm:Dx,breaks:u6,pedantic:h6},d6={"&":"&","<":"<",">":">",'"':""","'":"'"},t2=i=>d6[i];function Oa(i,e){if(e){if(Jr.escapeTest.test(i))return i.replace(Jr.escapeReplace,t2)}else if(Jr.escapeTestNoEncode.test(i))return i.replace(Jr.escapeReplaceNoEncode,t2);return i}function e2(i){try{i=encodeURI(i).replace(Jr.percentDecode,"%")}catch{return null}return i}function i2(i,e){var o;const r=i.replace(Jr.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=r.split(Jr.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(Jr.slashPipe,"|");return n}function xu(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 f6(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 r2(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 p6(i,e,r){const n=i.match(r.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
|
|
52
|
+
`).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(`
|
|
53
|
+
`)}var rg=class{constructor(i){ne(this,"options");ne(this,"rules");ne(this,"lexer");this.options=i||Ul}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:xu(r,`
|
|
54
|
+
`)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const r=e[0],n=p6(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=xu(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:xu(e[0],`
|
|
55
|
+
`)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let r=xu(e[0],`
|
|
56
|
+
`).split(`
|
|
57
|
+
`),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(`
|
|
58
|
+
`),f=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
59
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
60
|
+
${d}`:d,a=a?`${a}
|
|
61
|
+
${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+`
|
|
62
|
+
`+r.join(`
|
|
63
|
+
`),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+`
|
|
64
|
+
`+r.join(`
|
|
65
|
+
`),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(`
|
|
66
|
+
`);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(`
|
|
67
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),x=i.split(`
|
|
68
|
+
`,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+`
|
|
69
|
+
`,i=i.substring(x.length+1),u=!0),!u){const k=this.rules.other.nextBulletRegex(v),T=this.rules.other.hrRegex(v),E=this.rules.other.fencesBeginRegex(v),N=this.rules.other.headingBeginRegex(v),L=this.rules.other.htmlBeginRegex(v);for(;i;){const O=i.split(`
|
|
70
|
+
`,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," "),E.test(x)||N.test(x)||L.test(x)||k.test(x)||T.test(x))break;if(A.search(this.rules.other.nonSpaceChar)>=v||!x.trim())f+=`
|
|
71
|
+
`+A.slice(v);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(g)||N.test(g)||T.test(g))break;f+=`
|
|
72
|
+
`+x}!y&&!x.trim()&&(y=!0),d+=O+`
|
|
73
|
+
`,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=i2(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(`
|
|
74
|
+
`):[],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(i2(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)===`
|
|
75
|
+
`?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=xu(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=f6(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)),r2(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 r2(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}}}},Ns=class jx{constructor(e){ne(this,"tokens");ne(this,"options");ne(this,"state");ne(this,"tokenizer");ne(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ul,this.options.tokenizer=this.options.tokenizer||new rg,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:Jr,block:up.normal,inline:bu.normal};this.options.pedantic?(r.block=up.pedantic,r.inline=bu.pedantic):this.options.gfm&&(r.block=up.gfm,this.options.breaks?r.inline=bu.breaks:r.inline=bu.gfm),this.tokenizer.rules=r}static get rules(){return{block:up,inline:bu}}static lex(e,r){return new jx(r).lex(e)}static lexInline(e,r){return new jx(r).inlineTokens(e)}lex(e){e=e.replace(Jr.carriageReturn,`
|
|
76
|
+
`),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(Jr.tabCharGlobal," ").replace(Jr.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+=`
|
|
77
|
+
`: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+=`
|
|
78
|
+
`+h.raw,d.text+=`
|
|
79
|
+
`+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+=`
|
|
80
|
+
`+h.raw,d.text+=`
|
|
81
|
+
`+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+=`
|
|
82
|
+
`+h.raw,d.text+=`
|
|
83
|
+
`+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+=`
|
|
84
|
+
`+h.raw,d.text+=`
|
|
85
|
+
`+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}},ng=class{constructor(i){ne(this,"options");ne(this,"parser");this.options=i||Ul}space(i){return""}code({text:i,lang:e,escaped:r}){var o;const n=(o=(e||"").match(Jr.notSpaceStart))==null?void 0:o[0],a=i.replace(Jr.endingNewline,"")+`
|
|
86
|
+
`;return n?'<pre><code class="language-'+Oa(n)+'">'+(r?a:Oa(a,!0))+`</code></pre>
|
|
87
|
+
`:"<pre><code>"+(r?a:Oa(a,!0))+`</code></pre>
|
|
88
|
+
`}blockquote({tokens:i}){return`<blockquote>
|
|
89
|
+
${this.parser.parse(i)}</blockquote>
|
|
90
|
+
`}html({text:i}){return i}heading({tokens:i,depth:e}){return`<h${e}>${this.parser.parseInline(i)}</h${e}>
|
|
91
|
+
`}hr(i){return`<hr>
|
|
92
|
+
`}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+`>
|
|
93
|
+
`+n+"</"+a+`>
|
|
94
|
+
`}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>
|
|
95
|
+
`}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
|
|
96
|
+
`}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>
|
|
97
|
+
<thead>
|
|
98
|
+
`+e+`</thead>
|
|
99
|
+
`+n+`</table>
|
|
100
|
+
`}tablerow({text:i}){return`<tr>
|
|
101
|
+
${i}</tr>
|
|
102
|
+
`}tablecell(i){const e=this.parser.parseInline(i.tokens),r=i.header?"th":"td";return(i.align?`<${r} align="${i.align}">`:`<${r}>`)+e+`</${r}>
|
|
103
|
+
`}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=e2(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=e2(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)}},E1=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""}},As=class Fx{constructor(e){ne(this,"options");ne(this,"renderer");ne(this,"textRenderer");this.options=e||Ul,this.options.renderer=this.options.renderer||new ng,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new E1}static parse(e,r){return new Fx(r).parse(e)}static parseInline(e,r){return new Fx(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+=`
|
|
104
|
+
`+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}},xx,Ip=(xx=class{constructor(i){ne(this,"options");ne(this,"block");this.options=i||Ul}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?Ns.lex:Ns.lexInline}provideParser(){return this.block?As.parse:As.parseInline}},ne(xx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),xx),g6=class{constructor(...i){ne(this,"defaults",x1());ne(this,"options",this.setOptions);ne(this,"parse",this.parseMarkdown(!0));ne(this,"parseInline",this.parseMarkdown(!1));ne(this,"Parser",As);ne(this,"Renderer",ng);ne(this,"TextRenderer",E1);ne(this,"Lexer",Ns);ne(this,"Tokenizer",rg);ne(this,"Hooks",Ip);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 ng(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 rg(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 Ip;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];Ip.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 Ns.lex(i,e??this.defaults)}parser(i,e){return As.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?Ns.lex:Ns.lexInline,u=o.hooks?o.hooks.provideParser():i?As.parse:As.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+=`
|
|
105
|
+
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}}},Ll=new g6;function we(i,e){return Ll.parse(i,e)}we.options=we.setOptions=function(i){return Ll.setOptions(i),we.defaults=Ll.defaults,dM(we.defaults),we};we.getDefaults=x1;we.defaults=Ul;we.use=function(...i){return Ll.use(...i),we.defaults=Ll.defaults,dM(we.defaults),we};we.walkTokens=function(i,e){return Ll.walkTokens(i,e)};we.parseInline=Ll.parseInline;we.Parser=As;we.parser=As.parse;we.Renderer=ng;we.TextRenderer=E1;we.Lexer=Ns;we.lexer=Ns.lex;we.Tokenizer=rg;we.Hooks=Ip;we.parse=we;we.options;we.setOptions;we.use;we.walkTokens;we.parseInline;As.parse;Ns.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 n2(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 m6(i){if(Array.isArray(i))return i}function y6(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 b6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
106
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x6(i,e){return m6(i)||y6(i,e)||v6(i,e)||b6()}function v6(i,e){if(i){if(typeof i=="string")return n2(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)?n2(i,e):void 0}}const kM=Object.entries,a2=Object.setPrototypeOf,C6=Object.isFrozen,_6=Object.getPrototypeOf,k6=Object.getOwnPropertyDescriptor;let rn=Object.freeze,sa=Object.seal,Lc=Object.create,wM=typeof Reflect<"u"&&Reflect,Ix=wM.apply,$x=wM.construct;rn||(rn=function(e){return e});sa||(sa=function(e){return e});Ix||(Ix=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)});$x||($x=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 kc=cr(Array.prototype.forEach),w6=cr(Array.prototype.lastIndexOf),s2=cr(Array.prototype.pop),wc=cr(Array.prototype.push),S6=cr(Array.prototype.splice),Vr=Array.isArray,Hu=cr(String.prototype.toLowerCase),jb=cr(String.prototype.toString),o2=cr(String.prototype.match),Sc=cr(String.prototype.replace),l2=cr(String.prototype.indexOf),T6=cr(String.prototype.trim),E6=cr(Number.prototype.toString),N6=cr(Boolean.prototype.toString),c2=typeof BigInt>"u"?null:cr(BigInt.prototype.toString),h2=typeof Symbol>"u"?null:cr(Symbol.prototype.toString),Yi=cr(Object.prototype.hasOwnProperty),vu=cr(Object.prototype.toString),Br=cr(RegExp.prototype.test),Cu=A6(TypeError);function cr(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 Ix(i,e,n)}}function A6(i){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $x(i,r)}}function Me(i,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hu;if(a2&&a2(i,null),!Vr(e))return i;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const o=r(a);o!==a&&(C6(e)||(e[n]=o),a=o)}i[a]=!0}return i}function M6(i){for(let e=0;e<i.length;e++)Yi(i,e)||(i[e]=null);return i}function $r(i){const e=Lc(null);for(const n of kM(i)){var r=x6(n,2);const a=r[0],o=r[1];Yi(i,a)&&(Vr(o)?e[a]=M6(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=$r(o):e[a]=o)}return e}function B6(i){switch(typeof i){case"string":return i;case"number":return E6(i);case"boolean":return N6(i);case"bigint":return c2?c2(i):"0";case"symbol":return h2?h2(i):"Symbol()";case"undefined":return vu(i);case"function":case"object":{if(i===null)return vu(i);const e=i,r=Ra(e,"toString");if(typeof r=="function"){const n=r(e);return typeof n=="string"?n:vu(n)}return vu(i)}default:return vu(i)}}function Ra(i,e){for(;i!==null;){const n=k6(i,e);if(n){if(n.get)return cr(n.get);if(typeof n.value=="function")return cr(n.value)}i=_6(i)}function r(){return null}return r}function L6(i){try{return Br(i,""),!0}catch{return!1}}const u2=rn(["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"]),Fb=rn(["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"]),Ib=rn(["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"]),O6=rn(["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"]),$b=rn(["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"]),R6=rn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),d2=rn(["#text"]),f2=rn(["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"]),zb=rn(["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"]),p2=rn(["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"]),dp=rn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D6=sa(/{{[\w\W]*|^[\w\W]*}}/g),j6=sa(/<%[\w\W]*|^[\w\W]*%>/g),F6=sa(/\${[\w\W]*/g),I6=sa(/^data-[\-\w.\u00B7-\uFFFF]+$/),$6=sa(/^aria-[\-\w]+$/),g2=sa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z6=sa(/^(?:\w+script|data):/i),P6=sa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q6=sa(/^html$/i),U6=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},H6=function(){return typeof window>"u"?null:window},W6=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}},m2=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function SM(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H6();const e=Gt=>SM(Gt);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"),E=Ra(x,"attributes"),N=c&&c.prototype?Ra(c.prototype,"nodeType"):null,L=c&&c.prototype?Ra(c.prototype,"nodeName"):null;if(typeof o=="function"){const Gt=r.createElement("template");Gt.content&&Gt.content.ownerDocument&&(r=Gt.content.ownerDocument)}let O,A="";const M=r,z=M.implementation,D=M.createNodeIterator,$=M.createDocumentFragment,U=M.getElementsByTagName,Y=n.importNode;let I=m2();e.isSupported=typeof kM=="function"&&typeof k=="function"&&z&&z.createHTMLDocument!==void 0;const W=D6,j=j6,q=F6,G=I6,it=$6,nt=z6,H=P6,rt=U6;let ft=g2,Q=null;const yt=Me({},[...u2,...Fb,...Ib,...$b,...d2]);let ot=null;const X=Me({},[...f2,...zb,...p2,...dp]);let Z=Object.seal(Lc(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}})),st=null,ct=null;const vt=Object.seal(Lc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let At=!0,Ft=!0,zt=!1,Rt=!0,Yt=!1,_e=!0,ti=!1,ki=!1,Be=!1,yi=!1,$i=!1,zi=!1,ye=!0,Ai=!1;const bi="user-content-";let tr=!0,fi=!1,Vi={},Mi=null;const xr=Me({},["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 _n=null;const Di=Me({},["audio","video","img","source","image","track"]);let Le=null;const Ue=Me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ee="http://www.w3.org/1998/Math/MathML",hr="http://www.w3.org/2000/svg",xi="http://www.w3.org/1999/xhtml";let Xi=xi,Se=!1,er=null;const wr=Me({},[Ee,hr,xi],jb);let Pi=Me({},["mi","mo","mn","ms","mtext"]),tt=Me({},["annotation-xml"]);const wt=Me({},["title","style","font","a","script"]);let Dt=null;const le=["application/xhtml+xml","text/html"],ei="text/html";let ue=null,Ht=null;const Pt=r.createElement("form"),se=function(V){return V instanceof RegExp||V instanceof Function},ii=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ht&&Ht===V)return;(!V||typeof V!="object")&&(V={}),V=$r(V),Dt=le.indexOf(V.PARSER_MEDIA_TYPE)===-1?ei:V.PARSER_MEDIA_TYPE,ue=Dt==="application/xhtml+xml"?jb:Hu,Q=Yi(V,"ALLOWED_TAGS")&&Vr(V.ALLOWED_TAGS)?Me({},V.ALLOWED_TAGS,ue):yt,ot=Yi(V,"ALLOWED_ATTR")&&Vr(V.ALLOWED_ATTR)?Me({},V.ALLOWED_ATTR,ue):X,er=Yi(V,"ALLOWED_NAMESPACES")&&Vr(V.ALLOWED_NAMESPACES)?Me({},V.ALLOWED_NAMESPACES,jb):wr,Le=Yi(V,"ADD_URI_SAFE_ATTR")&&Vr(V.ADD_URI_SAFE_ATTR)?Me($r(Ue),V.ADD_URI_SAFE_ATTR,ue):Ue,_n=Yi(V,"ADD_DATA_URI_TAGS")&&Vr(V.ADD_DATA_URI_TAGS)?Me($r(Di),V.ADD_DATA_URI_TAGS,ue):Di,Mi=Yi(V,"FORBID_CONTENTS")&&Vr(V.FORBID_CONTENTS)?Me({},V.FORBID_CONTENTS,ue):xr,st=Yi(V,"FORBID_TAGS")&&Vr(V.FORBID_TAGS)?Me({},V.FORBID_TAGS,ue):$r({}),ct=Yi(V,"FORBID_ATTR")&&Vr(V.FORBID_ATTR)?Me({},V.FORBID_ATTR,ue):$r({}),Vi=Yi(V,"USE_PROFILES")?V.USE_PROFILES&&typeof V.USE_PROFILES=="object"?$r(V.USE_PROFILES):V.USE_PROFILES:!1,At=V.ALLOW_ARIA_ATTR!==!1,Ft=V.ALLOW_DATA_ATTR!==!1,zt=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Rt=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Yt=V.SAFE_FOR_TEMPLATES||!1,_e=V.SAFE_FOR_XML!==!1,ti=V.WHOLE_DOCUMENT||!1,yi=V.RETURN_DOM||!1,$i=V.RETURN_DOM_FRAGMENT||!1,zi=V.RETURN_TRUSTED_TYPE||!1,Be=V.FORCE_BODY||!1,ye=V.SANITIZE_DOM!==!1,Ai=V.SANITIZE_NAMED_PROPS||!1,tr=V.KEEP_CONTENT!==!1,fi=V.IN_PLACE||!1,ft=L6(V.ALLOWED_URI_REGEXP)?V.ALLOWED_URI_REGEXP:g2,Xi=typeof V.NAMESPACE=="string"?V.NAMESPACE:xi,Pi=Yi(V,"MATHML_TEXT_INTEGRATION_POINTS")&&V.MATHML_TEXT_INTEGRATION_POINTS&&typeof V.MATHML_TEXT_INTEGRATION_POINTS=="object"?$r(V.MATHML_TEXT_INTEGRATION_POINTS):Me({},["mi","mo","mn","ms","mtext"]),tt=Yi(V,"HTML_INTEGRATION_POINTS")&&V.HTML_INTEGRATION_POINTS&&typeof V.HTML_INTEGRATION_POINTS=="object"?$r(V.HTML_INTEGRATION_POINTS):Me({},["annotation-xml"]);const kt=Yi(V,"CUSTOM_ELEMENT_HANDLING")&&V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING=="object"?$r(V.CUSTOM_ELEMENT_HANDLING):Lc(null);if(Z=Lc(null),Yi(kt,"tagNameCheck")&&se(kt.tagNameCheck)&&(Z.tagNameCheck=kt.tagNameCheck),Yi(kt,"attributeNameCheck")&&se(kt.attributeNameCheck)&&(Z.attributeNameCheck=kt.attributeNameCheck),Yi(kt,"allowCustomizedBuiltInElements")&&typeof kt.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=kt.allowCustomizedBuiltInElements),Yt&&(Ft=!1),$i&&(yi=!0),Vi&&(Q=Me({},d2),ot=Lc(null),Vi.html===!0&&(Me(Q,u2),Me(ot,f2)),Vi.svg===!0&&(Me(Q,Fb),Me(ot,zb),Me(ot,dp)),Vi.svgFilters===!0&&(Me(Q,Ib),Me(ot,zb),Me(ot,dp)),Vi.mathMl===!0&&(Me(Q,$b),Me(ot,p2),Me(ot,dp))),vt.tagCheck=null,vt.attributeCheck=null,Yi(V,"ADD_TAGS")&&(typeof V.ADD_TAGS=="function"?vt.tagCheck=V.ADD_TAGS:Vr(V.ADD_TAGS)&&(Q===yt&&(Q=$r(Q)),Me(Q,V.ADD_TAGS,ue))),Yi(V,"ADD_ATTR")&&(typeof V.ADD_ATTR=="function"?vt.attributeCheck=V.ADD_ATTR:Vr(V.ADD_ATTR)&&(ot===X&&(ot=$r(ot)),Me(ot,V.ADD_ATTR,ue))),Yi(V,"ADD_URI_SAFE_ATTR")&&Vr(V.ADD_URI_SAFE_ATTR)&&Me(Le,V.ADD_URI_SAFE_ATTR,ue),Yi(V,"FORBID_CONTENTS")&&Vr(V.FORBID_CONTENTS)&&(Mi===xr&&(Mi=$r(Mi)),Me(Mi,V.FORBID_CONTENTS,ue)),Yi(V,"ADD_FORBID_CONTENTS")&&Vr(V.ADD_FORBID_CONTENTS)&&(Mi===xr&&(Mi=$r(Mi)),Me(Mi,V.ADD_FORBID_CONTENTS,ue)),tr&&(Q["#text"]=!0),ti&&Me(Q,["html","head","body"]),Q.table&&(Me(Q,["tbody"]),delete st.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw Cu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Cu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=V.TRUSTED_TYPES_POLICY,A=O.createHTML("")}else O===void 0&&(O=W6(g,a)),O!==null&&typeof A=="string"&&(A=O.createHTML(""));(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&Q===yt&&(Q=$r(Q)),I.uponSanitizeAttribute.length>0&&ot===X&&(ot=$r(ot)),rn&&rn(V),Ht=V},ci=Me({},[...Fb,...Ib,...O6]),on=Me({},[...$b,...R6]),Gr=function(V){let kt=k(V);(!kt||!kt.tagName)&&(kt={namespaceURI:Xi,tagName:"template"});const dt=Hu(V.tagName),Lt=Hu(kt.tagName);return er[V.namespaceURI]?V.namespaceURI===hr?kt.namespaceURI===xi?dt==="svg":kt.namespaceURI===Ee?dt==="svg"&&(Lt==="annotation-xml"||Pi[Lt]):!!ci[dt]:V.namespaceURI===Ee?kt.namespaceURI===xi?dt==="math":kt.namespaceURI===hr?dt==="math"&&tt[Lt]:!!on[dt]:V.namespaceURI===xi?kt.namespaceURI===hr&&!tt[Lt]||kt.namespaceURI===Ee&&!Pi[Lt]?!1:!on[dt]&&(wt[dt]||!ci[dt]):!!(Dt==="application/xhtml+xml"&&er[V.namespaceURI]):!1},ir=function(V){wc(e.removed,{element:V});try{k(V).removeChild(V)}catch{v(V)}},rr=function(V,kt){try{wc(e.removed,{attribute:kt.getAttributeNode(V),from:kt})}catch{wc(e.removed,{attribute:null,from:kt})}if(kt.removeAttribute(V),V==="is")if(yi||$i)try{ir(kt)}catch{}else try{kt.setAttribute(V,"")}catch{}},vi=function(V){let kt=null,dt=null;if(Be)V="<remove></remove>"+V;else{const ee=o2(V,/^[\r\n\t ]+/);dt=ee&&ee[0]}Dt==="application/xhtml+xml"&&Xi===xi&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const Lt=O?O.createHTML(V):V;if(Xi===xi)try{kt=new f().parseFromString(Lt,Dt)}catch{}if(!kt||!kt.documentElement){kt=z.createDocument(Xi,"template",null);try{kt.documentElement.innerHTML=Se?A:Lt}catch{}}const It=kt.body||kt.documentElement;return V&&dt&&It.insertBefore(r.createTextNode(dt),It.childNodes[0]||null),Xi===xi?U.call(kt,ti?"html":"body")[0]:ti?kt.documentElement:It},qi=function(V){return D.call(V.ownerDocument||V,V,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},kn=function(V){V.normalize();const kt=D.call(V.ownerDocument||V,V,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let dt=kt.nextNode();for(;dt;){let Lt=dt.data;kc([W,j,q],It=>{Lt=Sc(Lt,It," ")}),dt.data=Lt,dt=kt.nextNode()}},In=function(V){const kt=L?L(V):null;return typeof kt!="string"||ue(kt)!=="form"?!1:typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||V.attributes!==E(V)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function"||V.nodeType!==N(V)||V.childNodes!==_(V)},wn=function(V){if(!N||typeof V!="object"||V===null)return!1;try{return N(V)===La.documentFragment}catch{return!1}},Sn=function(V){if(!N||typeof V!="object"||V===null)return!1;try{return typeof N(V)=="number"}catch{return!1}};function Sr(Gt,V,kt){kc(Gt,dt=>{dt.call(e,V,kt,Ht)})}const $n=function(V){let kt=null;if(Sr(I.beforeSanitizeElements,V,null),In(V))return ir(V),!0;const dt=ue(V.nodeName);if(Sr(I.uponSanitizeElement,V,{tagName:dt,allowedTags:Q}),_e&&V.hasChildNodes()&&!Sn(V.firstElementChild)&&Br(/<[/\w!]/g,V.innerHTML)&&Br(/<[/\w!]/g,V.textContent)||_e&&V.namespaceURI===xi&&dt==="style"&&Sn(V.firstElementChild)||V.nodeType===La.progressingInstruction||_e&&V.nodeType===La.comment&&Br(/<[/\w]/g,V.data))return ir(V),!0;if(st[dt]||!(vt.tagCheck instanceof Function&&vt.tagCheck(dt))&&!Q[dt]){if(!st[dt]&&Yr(dt)&&(Z.tagNameCheck instanceof RegExp&&Br(Z.tagNameCheck,dt)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(dt)))return!1;if(tr&&!Mi[dt]){const It=k(V),ee=_(V);if(ee&&It){const je=ee.length;for(let ni=je-1;ni>=0;--ni){const He=y(ee[ni],!0);It.insertBefore(He,C(V))}}}return ir(V),!0}return(N?N(V):V.nodeType)===La.element&&!Gr(V)||(dt==="noscript"||dt==="noembed"||dt==="noframes")&&Br(/<\/no(script|embed|frames)/i,V.innerHTML)?(ir(V),!0):(Yt&&V.nodeType===La.text&&(kt=V.textContent,kc([W,j,q],It=>{kt=Sc(kt,It," ")}),V.textContent!==kt&&(wc(e.removed,{element:V.cloneNode()}),V.textContent=kt)),Sr(I.afterSanitizeElements,V,null),!1)},Ea=function(V,kt,dt){if(ct[kt]||ye&&(kt==="id"||kt==="name")&&(dt in r||dt in Pt))return!1;const Lt=ot[kt]||vt.attributeCheck instanceof Function&&vt.attributeCheck(kt,V);if(!(Ft&&!ct[kt]&&Br(G,kt))){if(!(At&&Br(it,kt))){if(!Lt||ct[kt]){if(!(Yr(V)&&(Z.tagNameCheck instanceof RegExp&&Br(Z.tagNameCheck,V)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(V))&&(Z.attributeNameCheck instanceof RegExp&&Br(Z.attributeNameCheck,kt)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(kt,V))||kt==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&Br(Z.tagNameCheck,dt)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(dt))))return!1}else if(!Le[kt]){if(!Br(ft,Sc(dt,H,""))){if(!((kt==="src"||kt==="xlink:href"||kt==="href")&&V!=="script"&&l2(dt,"data:")===0&&_n[V])){if(!(zt&&!Br(nt,Sc(dt,H,"")))){if(dt)return!1}}}}}}return!0},ur=Me({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Yr=function(V){return!ur[Hu(V)]&&Br(rt,V)},ln=function(V){Sr(I.beforeSanitizeAttributes,V,null);const kt=V.attributes;if(!kt||In(V))return;const dt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ot,forceKeepAttr:void 0};let Lt=kt.length;for(;Lt--;){const It=kt[Lt],ee=It.name,je=It.namespaceURI,ni=It.value,He=ue(ee),ji=ni;let xe=ee==="value"?ji:T6(ji);if(dt.attrName=He,dt.attrValue=xe,dt.keepAttr=!0,dt.forceKeepAttr=void 0,Sr(I.uponSanitizeAttribute,V,dt),xe=dt.attrValue,Ai&&(He==="id"||He==="name")&&l2(xe,bi)!==0&&(rr(ee,V),xe=bi+xe),_e&&Br(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xe)){rr(ee,V);continue}if(He==="attributename"&&o2(xe,"href")){rr(ee,V);continue}if(dt.forceKeepAttr)continue;if(!dt.keepAttr){rr(ee,V);continue}if(!Rt&&Br(/\/>/i,xe)){rr(ee,V);continue}Yt&&kc([W,j,q],zn=>{xe=Sc(xe,zn," ")});const Ui=ue(V.nodeName);if(!Ea(Ui,He,xe)){rr(ee,V);continue}if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!je)switch(g.getAttributeType(Ui,He)){case"TrustedHTML":{xe=O.createHTML(xe);break}case"TrustedScriptURL":{xe=O.createScriptURL(xe);break}}if(xe!==ji)try{je?V.setAttributeNS(je,ee,xe):V.setAttribute(ee,xe),In(V)?ir(V):s2(e.removed)}catch{rr(ee,V)}}Sr(I.afterSanitizeAttributes,V,null)},dr=function(V){let kt=null;const dt=qi(V);for(Sr(I.beforeSanitizeShadowDOM,V,null);kt=dt.nextNode();)if(Sr(I.uponSanitizeShadowNode,kt,null),$n(kt),ln(kt),wn(kt.content)&&dr(kt.content),(N?N(kt):kt.nodeType)===La.element){const It=T?T(kt):kt.shadowRoot;wn(It)&&(ri(It),dr(It))}Sr(I.afterSanitizeShadowDOM,V,null)},ri=function(V){const kt=N?N(V):V.nodeType;if(kt===La.element){const It=T?T(V):V.shadowRoot;wn(It)&&(ri(It),dr(It))}const dt=_?_(V):V.childNodes;if(!dt)return;const Lt=[];kc(dt,It=>{wc(Lt,It)});for(const It of Lt)ri(It);if(kt===La.element){const It=L?L(V):null;if(typeof It=="string"&&ue(It)==="template"){const ee=V.content;wn(ee)&&ri(ee)}}};return e.sanitize=function(Gt){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=null,dt=null,Lt=null,It=null;if(Se=!Gt,Se&&(Gt="<!-->"),typeof Gt!="string"&&!Sn(Gt)&&(Gt=B6(Gt),typeof Gt!="string"))throw Cu("dirty is not a string, aborting");if(!e.isSupported)return Gt;if(ki||ii(V),e.removed=[],typeof Gt=="string"&&(fi=!1),fi){const ni=L?L(Gt):Gt.nodeName;if(typeof ni=="string"){const He=ue(ni);if(!Q[He]||st[He])throw Cu("root node is forbidden and cannot be sanitized in-place")}if(In(Gt))throw Cu("root node is clobbered and cannot be sanitized in-place");ri(Gt)}else if(Sn(Gt))kt=vi("<!---->"),dt=kt.ownerDocument.importNode(Gt,!0),dt.nodeType===La.element&&dt.nodeName==="BODY"||dt.nodeName==="HTML"?kt=dt:kt.appendChild(dt),ri(dt);else{if(!yi&&!Yt&&!ti&&Gt.indexOf("<")===-1)return O&&zi?O.createHTML(Gt):Gt;if(kt=vi(Gt),!kt)return yi?null:zi?A:""}kt&&Be&&ir(kt.firstChild);const ee=qi(fi?Gt:kt);for(;Lt=ee.nextNode();)$n(Lt),ln(Lt),wn(Lt.content)&&dr(Lt.content);if(fi)return Yt&&kn(Gt),Gt;if(yi){if(Yt&&kn(kt),$i)for(It=$.call(kt.ownerDocument);kt.firstChild;)It.appendChild(kt.firstChild);else It=kt;return(ot.shadowroot||ot.shadowrootmode)&&(It=Y.call(n,It,!0)),It}let je=ti?kt.outerHTML:kt.innerHTML;return ti&&Q["!doctype"]&&kt.ownerDocument&&kt.ownerDocument.doctype&&kt.ownerDocument.doctype.name&&Br(q6,kt.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+kt.ownerDocument.doctype.name+`>
|
|
107
|
+
`+je),Yt&&kc([W,j,q],ni=>{je=Sc(je,ni," ")}),O&&zi?O.createHTML(je):je},e.setConfig=function(){let Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ii(Gt),ki=!0},e.clearConfig=function(){Ht=null,ki=!1},e.isValidAttribute=function(Gt,V,kt){Ht||ii({});const dt=ue(Gt),Lt=ue(V);return Ea(dt,Lt,kt)},e.addHook=function(Gt,V){typeof V=="function"&&wc(I[Gt],V)},e.removeHook=function(Gt,V){if(V!==void 0){const kt=w6(I[Gt],V);return kt===-1?void 0:S6(I[Gt],kt,1)[0]}return s2(I[Gt])},e.removeHooks=function(Gt){I[Gt]=[]},e.removeAllHooks=function(){I=m2()},e}var Ol=SM(),$p={exports:{}},G6=$p.exports,y2;function Y6(){return y2||(y2=1,(function(i,e){(function(r,n){i.exports=n()})(G6,(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(I){var W=["th","st","nd","rd"],j=I%100;return"["+I+(W[(j-20)%10]||W[j]||W[0])+"]"}},E=function(I,W,j){var q=String(I);return!q||q.length>=W?I:""+Array(W+1-q.length).join(j)+I},N={s:E,z:function(I){var W=-I.utcOffset(),j=Math.abs(W),q=Math.floor(j/60),G=j%60;return(W<=0?"+":"-")+E(q,2,"0")+":"+E(G,2,"0")},m:function I(W,j){if(W.date()<j.date())return-I(j,W);var q=12*(j.year()-W.year())+(j.month()-W.month()),G=W.clone().add(q,g),it=j-G<0,nt=W.clone().add(q+(it?-1:1),g);return+(-(q+(j-G)/(it?G-nt:nt-G))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:g,y,w:f,d,D:v,h:u,m:h,s:c,ms:o,Q:x}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},L="en",O={};O[L]=T;var A="$isDayjsObject",M=function(I){return I instanceof U||!(!I||!I[A])},z=function I(W,j,q){var G;if(!W)return L;if(typeof W=="string"){var it=W.toLowerCase();O[it]&&(G=it),j&&(O[it]=j,G=it);var nt=W.split("-");if(!G&&nt.length>1)return I(nt[0])}else{var H=W.name;O[H]=W,G=H}return!q&&G&&(L=G),G||!q&&L},D=function(I,W){if(M(I))return I.clone();var j=typeof W=="object"?W:{};return j.date=I,j.args=arguments,new U(j)},$=N;$.l=z,$.i=M,$.w=function(I,W){return D(I,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var U=(function(){function I(j){this.$L=z(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[A]=!0}var W=I.prototype;return W.parse=function(j){this.$d=(function(q){var G=q.date,it=q.utc;if(G===null)return new Date(NaN);if($.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var nt=G.match(_);if(nt){var H=nt[2]-1||0,rt=(nt[7]||"0").substring(0,3);return it?new Date(Date.UTC(nt[1],H,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,rt)):new Date(nt[1],H,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,rt)}}return new Date(G)})(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 $},W.isValid=function(){return this.$d.toString()!==C},W.isSame=function(j,q){var G=D(j);return this.startOf(q)<=G&&G<=this.endOf(q)},W.isAfter=function(j,q){return D(j)<this.startOf(q)},W.isBefore=function(j,q){return this.endOf(q)<D(j)},W.$g=function(j,q,G){return $.u(j)?this[q]:this.set(G,j)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(j,q){var G=this,it=!!$.u(q)||q,nt=$.p(j),H=function(st,ct){var vt=$.w(G.$u?Date.UTC(G.$y,ct,st):new Date(G.$y,ct,st),G);return it?vt:vt.endOf(d)},rt=function(st,ct){return $.w(G.toDate()[st].apply(G.toDate("s"),(it?[0,0,0,0]:[23,59,59,999]).slice(ct)),G)},ft=this.$W,Q=this.$M,yt=this.$D,ot="set"+(this.$u?"UTC":"");switch(nt){case y:return it?H(1,0):H(31,11);case g:return it?H(1,Q):H(0,Q+1);case f:var X=this.$locale().weekStart||0,Z=(ft<X?ft+7:ft)-X;return H(it?yt-Z:yt+(6-Z),Q);case d:case v:return rt(ot+"Hours",0);case u:return rt(ot+"Minutes",1);case h:return rt(ot+"Seconds",2);case c:return rt(ot+"Milliseconds",3);default:return this.clone()}},W.endOf=function(j){return this.startOf(j,!1)},W.$set=function(j,q){var G,it=$.p(j),nt="set"+(this.$u?"UTC":""),H=(G={},G[d]=nt+"Date",G[v]=nt+"Date",G[g]=nt+"Month",G[y]=nt+"FullYear",G[u]=nt+"Hours",G[h]=nt+"Minutes",G[c]=nt+"Seconds",G[o]=nt+"Milliseconds",G)[it],rt=it===d?this.$D+(q-this.$W):q;if(it===g||it===y){var ft=this.clone().set(v,1);ft.$d[H](rt),ft.init(),this.$d=ft.set(v,Math.min(this.$D,ft.daysInMonth())).$d}else H&&this.$d[H](rt);return this.init(),this},W.set=function(j,q){return this.clone().$set(j,q)},W.get=function(j){return this[$.p(j)]()},W.add=function(j,q){var G,it=this;j=Number(j);var nt=$.p(q),H=function(Q){var yt=D(it);return $.w(yt.date(yt.date()+Math.round(Q*j)),it)};if(nt===g)return this.set(g,this.$M+j);if(nt===y)return this.set(y,this.$y+j);if(nt===d)return H(1);if(nt===f)return H(7);var rt=(G={},G[h]=n,G[u]=a,G[c]=r,G)[nt]||1,ft=this.$d.getTime()+j*rt;return $.w(ft,this)},W.subtract=function(j,q){return this.add(-1*j,q)},W.format=function(j){var q=this,G=this.$locale();if(!this.isValid())return G.invalidDate||C;var it=j||"YYYY-MM-DDTHH:mm:ssZ",nt=$.z(this),H=this.$H,rt=this.$m,ft=this.$M,Q=G.weekdays,yt=G.months,ot=G.meridiem,X=function(ct,vt,At,Ft){return ct&&(ct[vt]||ct(q,it))||At[vt].slice(0,Ft)},Z=function(ct){return $.s(H%12||12,ct,"0")},st=ot||function(ct,vt,At){var Ft=ct<12?"AM":"PM";return At?Ft.toLowerCase():Ft};return it.replace(k,(function(ct,vt){return vt||(function(At){switch(At){case"YY":return String(q.$y).slice(-2);case"YYYY":return $.s(q.$y,4,"0");case"M":return ft+1;case"MM":return $.s(ft+1,2,"0");case"MMM":return X(G.monthsShort,ft,yt,3);case"MMMM":return X(yt,ft);case"D":return q.$D;case"DD":return $.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return X(G.weekdaysMin,q.$W,Q,2);case"ddd":return X(G.weekdaysShort,q.$W,Q,3);case"dddd":return Q[q.$W];case"H":return String(H);case"HH":return $.s(H,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return st(H,rt,!0);case"A":return st(H,rt,!1);case"m":return String(rt);case"mm":return $.s(rt,2,"0");case"s":return String(q.$s);case"ss":return $.s(q.$s,2,"0");case"SSS":return $.s(q.$ms,3,"0");case"Z":return nt}return null})(ct)||nt.replace(":","")}))},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(j,q,G){var it,nt=this,H=$.p(q),rt=D(j),ft=(rt.utcOffset()-this.utcOffset())*n,Q=this-rt,yt=function(){return $.m(nt,rt)};switch(H){case y:it=yt()/12;break;case g:it=yt();break;case x:it=yt()/3;break;case f:it=(Q-ft)/6048e5;break;case d:it=(Q-ft)/864e5;break;case u:it=Q/a;break;case h:it=Q/n;break;case c:it=Q/r;break;default:it=Q}return G?it:$.a(it)},W.daysInMonth=function(){return this.endOf(g).$D},W.$locale=function(){return O[this.$L]},W.locale=function(j,q){if(!j)return this.$L;var G=this.clone(),it=z(j,q,!0);return it&&(G.$L=it),G},W.clone=function(){return $.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()},I})(),Y=U.prototype;return D.prototype=Y,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",g],["$y",y],["$D",v]].forEach((function(I){Y[I[1]]=function(W){return this.$g(W,I[0],I[1])}})),D.extend=function(I,W){return I.$i||(I(W,U,D),I.$i=!0),D},D.locale=z,D.isDayjs=M,D.unix=function(I){return D(1e3*I)},D.en=O[L],D.Ls=O,D.p={},D}))})($p)),$p.exports}var K6=Y6();const V6=Dd(K6);var TM=Object.defineProperty,B=(i,e)=>TM(i,"name",{value:e,configurable:!0}),X6=(i,e)=>{for(var r in e)TM(i,r,{get:e[r],enumerable:!0})},ms={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Nt={trace:B((...i)=>{},"trace"),debug:B((...i)=>{},"debug"),info:B((...i)=>{},"info"),warn:B((...i)=>{},"warn"),error:B((...i)=>{},"error"),fatal:B((...i)=>{},"fatal")},N1=B(function(i="fatal"){let e=ms.fatal;typeof i=="string"?i.toLowerCase()in ms&&(e=ms[i]):typeof i=="number"&&(e=i),Nt.trace=()=>{},Nt.debug=()=>{},Nt.info=()=>{},Nt.warn=()=>{},Nt.error=()=>{},Nt.fatal=()=>{},e<=ms.fatal&&(Nt.fatal=console.error?console.error.bind(console,Qn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Qn("FATAL"))),e<=ms.error&&(Nt.error=console.error?console.error.bind(console,Qn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Qn("ERROR"))),e<=ms.warn&&(Nt.warn=console.warn?console.warn.bind(console,Qn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Qn("WARN"))),e<=ms.info&&(Nt.info=console.info?console.info.bind(console,Qn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Qn("INFO"))),e<=ms.debug&&(Nt.debug=console.debug?console.debug.bind(console,Qn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qn("DEBUG"))),e<=ms.trace&&(Nt.trace=console.debug?console.debug.bind(console,Qn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qn("TRACE")))},"setLogLevel"),Qn=B(i=>`%c${V6().format("ss.SSS")} : ${i} : `,"format");const zp={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 zp.hue2rgb(o,a,i+1/3)*255;case"g":return zp.hue2rgb(o,a,i)*255;case"b":return zp.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}}},Z6={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},Q6={dec2hex:i=>{const e=Math.round(i).toString(16);return e.length>1?e:`0${e}`}},ve={channel:zp,lang:Z6,unit:Q6},yo={};for(let i=0;i<=255;i++)yo[i]=ve.unit.dec2hex(i);const zr={ALL:0,RGB:1,HSL:2};class J6{constructor(){this.type=zr.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=zr.ALL}is(e){return this.type===e}}class t${constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new J6}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=zr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:a}=e;r===void 0&&(e.h=ve.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=ve.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=ve.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:a}=e;r===void 0&&(e.r=ve.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=ve.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=ve.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(zr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(zr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(zr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(zr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(zr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(zr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(zr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(zr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(zr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Zg=new t$({r:0,g:0,b:0,a:0},"transparent"),Ic={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const e=i.match(Ic.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 Zg.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?`#${yo[Math.round(e)]}${yo[Math.round(r)]}${yo[Math.round(n)]}${yo[Math.round(a*255)]}`:`#${yo[Math.round(e)]}${yo[Math.round(r)]}${yo[Math.round(n)]}`}},pl={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(pl.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return ve.channel.clamp.h(parseFloat(r)*.9);case"rad":return ve.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ve.channel.clamp.h(parseFloat(r)*360)}}return ve.channel.clamp.h(parseFloat(i))},parse:i=>{const e=i.charCodeAt(0);if(e!==104&&e!==72)return;const r=i.match(pl.re);if(!r)return;const[,n,a,o,c,h]=r;return Zg.set({h:pl._hue2deg(n),s:ve.channel.clamp.s(parseFloat(a)),l:ve.channel.clamp.l(parseFloat(o)),a:c?ve.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(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(n)}%, ${a})`:`hsl(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(n)}%)`}},id={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=id.colors[i];if(e)return Ic.parse(e)},stringify:i=>{const e=Ic.stringify(i);for(const r in id.colors)if(id.colors[r]===e)return r}},Wu={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(Wu.re);if(!r)return;const[,n,a,o,c,h,u,d,f]=r;return Zg.set({r:ve.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:ve.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:ve.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:d?ve.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(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(n)}, ${ve.lang.round(a)})`:`rgb(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(n)})`}},Ga={format:{keyword:id,hex:Ic,rgb:Wu,rgba:Wu,hsl:pl,hsla:pl},parse:i=>{if(typeof i!="string")return i;const e=Ic.parse(i)||Wu.parse(i)||pl.parse(i)||id.parse(i);if(e)return e;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(zr.HSL)||i.data.r===void 0?pl.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?Wu.stringify(i):Ic.stringify(i)},EM=(i,e)=>{const r=Ga.parse(i);for(const n in e)r[n]=ve.channel.clamp[n](e[n]);return Ga.stringify(r)},Lo=(i,e,r=0,n=1)=>{if(typeof i!="number")return EM(i,{a:e});const a=Zg.set({r:ve.channel.clamp.r(i),g:ve.channel.clamp.g(e),b:ve.channel.clamp.b(r),a:ve.channel.clamp.a(n)});return Ga.stringify(a)},e$=i=>{const{r:e,g:r,b:n}=Ga.parse(i),a=.2126*ve.channel.toLinear(e)+.7152*ve.channel.toLinear(r)+.0722*ve.channel.toLinear(n);return ve.lang.round(a)},i$=i=>e$(i)>=.5,wa=i=>!i$(i),NM=(i,e,r)=>{const n=Ga.parse(i),a=n[e],o=ve.channel.clamp[e](a+r);return a!==o&&(n[e]=o),Ga.stringify(n)},_t=(i,e)=>NM(i,"l",e),xt=(i,e)=>NM(i,"l",-e),F=(i,e)=>{const r=Ga.parse(i),n={};for(const a in e)e[a]&&(n[a]=r[a]+e[a]);return EM(i,n)},r$=(i,e,r=50)=>{const{r:n,g:a,b:o,a:c}=Ga.parse(i),{r:h,g:u,b:d,a:f}=Ga.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*_,E=o*C+d*_,N=c*g+f*(1-g);return Lo(k,T,E,N)},ht=(i,e=100)=>{const r=Ga.parse(i);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,r$(r,i,e)};var AM=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,rd=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,n$=/\s*%%.*\n/gm,th,MM=(th=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},B(th,"UnknownDiagramError"),th),Rl={},A1=B(function(i,e){i=i.replace(AM,"").replace(rd,"").replace(n$,`
|
|
108
|
+
`);for(const[r,{detector:n}]of Object.entries(Rl))if(n(i,e))return r;throw new MM(`No diagram type detected matching given configuration for text: ${i}`)},"detectType"),zx=B((...i)=>{for(const{id:e,detector:r,loader:n}of i)BM(e,r,n)},"registerLazyLoadedDiagrams"),BM=B((i,e,r)=>{Rl[i]&&Nt.warn(`Detector with key ${i} already exists. Overwriting.`),Rl[i]={detector:e,loader:r},Nt.debug(`Detector with key ${i} added${r?" with loader":""}`)},"addDetector"),a$=B(i=>Rl[i].loader,"getDiagramLoader"),Px=B((i,e,{depth:r=2,clobber:n=!1}={})=>{const a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(i)?(e.forEach(o=>Px(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]=Px(i[o],e[o],{depth:r-1,clobber:n})):(n||typeof i[o]!="object"&&typeof e[o]!="object")&&(i[o]=e[o])}),i)},"assignWithDepth"),mr=Px,Xa="#ffffff",Za="#f2f2f2",ge=B((i,e)=>e?F(i,{s:-40,l:10}):F(i,{s:-40,l:-10}),"mkBorder"),eh,s$=(eh=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,E,N,L,O,A;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ht(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ht(this.tertiaryColor),this.lineColor=this.lineColor||ht(this.background),this.arrowheadColor=this.arrowheadColor||ht(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?xt(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||xt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(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||_t(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||xt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||xt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||_t(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||_t(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=xt(this["cScale"+M],75);else for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=xt(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||ht(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||_t(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||xt(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]||F(this.mainBkg,{h:180,s:-15,l:e*(5+M*3)}),this["surfacePeer"+M]=this["surfacePeer"+M]||F(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||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((N=this.xyChart)==null?void 0:N.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.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?xt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za,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]})}},B(eh,"Theme"),eh),o$=B(i=>{const e=new s$;return e.calculate(i),e},"getThemeVariables"),ih,l$=(ih=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=ht(this.primaryColor),this.secondaryTextColor=ht(this.secondaryColor),this.tertiaryTextColor=ht(this.tertiaryColor),this.lineColor=ht(this.background),this.textColor=ht(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ht("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Lo(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=xt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=xt(this.sectionBkgColor,10),this.taskBorderColor=Lo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Lo(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||_t(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||xt(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,E,N,L,O;this.secondBkg=_t(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=_t(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=_t(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=ht(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330});for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||ht(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScalePeer"+A]=this["cScalePeer"+A]||_t(this["cScale"+A],10);for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||F(this.mainBkg,{h:30,s:-30,l:-(-10+A*4)}),this["surfacePeer"+A]=this["surfacePeer"+A]||F(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)]??_t(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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.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?xt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=_t(this.secondaryColor,20),this.git1=_t(this.pie2||this.secondaryColor,20),this.git2=_t(this.pie3||this.tertiaryColor,20),this.git3=_t(this.pie4||F(this.primaryColor,{h:-30}),20),this.git4=_t(this.pie5||F(this.primaryColor,{h:-60}),20),this.git5=_t(this.pie6||F(this.primaryColor,{h:-90}),10),this.git6=_t(this.pie7||F(this.primaryColor,{h:60}),10),this.git7=_t(this.pie8||F(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ht(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ht(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||_t(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_t(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]})}},B(ih,"Theme"),ih),c$=B(i=>{const e=new l$;return e.calculate(i),e},"getThemeVariables"),rh,h$=(rh=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=F(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=ht(this.primaryColor),this.secondaryTextColor=ht(this.secondaryColor),this.tertiaryTextColor=ht(this.tertiaryColor),this.lineColor=ht(this.background),this.textColor=ht(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Lo(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,E,N,L,O;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||xt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||xt(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=xt(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||xt(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||F(this["cScale"+A],{h:180});for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||F(this.mainBkg,{h:30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||F(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||ht(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ht(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||_t(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||_t(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||F(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-30}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||F(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.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||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||xt(ht(this.git0),25),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ht(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(rh,"Theme"),rh),u$=B(i=>{const e=new h$;return e.calculate(i),e},"getThemeVariables"),nh,d$=(nh=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=_t("#cde498",10),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=ht(this.primaryColor),this.secondaryTextColor=ht(this.secondaryColor),this.tertiaryTextColor=ht(this.primaryColor),this.lineColor=ht(this.background),this.textColor=ht(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,E,N,L,O;this.actorBorder=xt(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||xt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||xt(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=xt(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||xt(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||F(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]||F(this.mainBkg,{h:30,s:-30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||F(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||_t(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||_t(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-30}),this.pie5=this.pie5||F(this.secondaryColor,{l:-30}),this.pie6=this.pie6||F(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.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||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ht(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(nh,"Theme"),nh),f$=B(i=>{const e=new d$;return e.calculate(i),e},"getThemeVariables"),ah,p$=(ah=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=_t(this.contrast,55),this.background="#ffffff",this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=ht(this.primaryColor),this.secondaryTextColor=ht(this.secondaryColor),this.tertiaryTextColor=ht(this.tertiaryColor),this.lineColor=ht(this.background),this.textColor=ht(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||_t(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,E,N,L,O;this.secondBkg=_t(this.contrast,55),this.border2=this.contrast,this.actorBorder=_t(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]||ht(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this.darkMode?this["cScalePeer"+A]=this["cScalePeer"+A]||_t(this["cScale"+A],10):this["cScalePeer"+A]=this["cScalePeer"+A]||xt(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]||F(this.mainBkg,{l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||F(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=_t(this.contrast,30),this.sectionBkgColor2=_t(this.contrast,30),this.taskBorderColor=xt(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=_t(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=xt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128});for(let 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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.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=xt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||F(this.primaryColor,{h:-30}),this.git4=this.pie5||F(this.primaryColor,{h:-60}),this.git5=this.pie6||F(this.primaryColor,{h:-90}),this.git6=this.pie7||F(this.primaryColor,{h:60}),this.git7=this.pie8||F(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(ah,"Theme"),ah),g$=B(i=>{const e=new p$;return e.calculate(i),e},"getThemeVariables"),sh,m$=(sh=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=ge(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,c,h,u,d,f,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ht(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ht(this.tertiaryColor),this.lineColor=this.lineColor||ht(this.background),this.arrowheadColor=this.arrowheadColor||ht(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?xt(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||xt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=F(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||_t(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||F(e,{h:30}),this.cScale4=this.cScale4||F(e,{h:60}),this.cScale5=this.cScale5||F(e,{h:90}),this.cScale6=this.cScale6||F(e,{h:120}),this.cScale7=this.cScale7||F(e,{h:150}),this.cScale8=this.cScale8||F(e,{h:210,l:150}),this.cScale9=this.cScale9||F(e,{h:270}),this.cScale10=this.cScale10||F(e,{h:300}),this.cScale11=this.cScale11||F(e,{h:330}),this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=xt(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=xt(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ht(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||xt(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"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||F(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||F(e,{h:64}),this.fillType3=this.fillType3||F(r,{h:64}),this.fillType4=this.fillType4||F(e,{h:-64}),this.fillType5=this.fillType5||F(r,{h:-64}),this.fillType6=this.fillType6||F(e,{h:128}),this.fillType7=this.fillType7||F(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||F(e,{l:-10}),this.pie5=this.pie5||F(r,{l:-10}),this.pie6=this.pie6||F(n,{l:-10}),this.pie7=this.pie7||F(e,{h:60,l:-10}),this.pie8=this.pie8||F(e,{h:-60,l:-10}),this.pie9=this.pie9||F(e,{h:120,l:0}),this.pie10=this.pie10||F(e,{h:60,l:-20}),this.pie11=this.pie11||F(e,{h:-60,l:-20}),this.pie12=this.pie12||F(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||F(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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?xt(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||F(e,{h:-30}),this.git4=this.git4||F(e,{h:-60}),this.git5=this.git5||F(e,{h:-90}),this.git6=this.git6||F(e,{h:60}),this.git7=this.git7||F(e,{h:120}),this.darkMode?(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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(sh,"Theme"),sh),y$=B(i=>{const e=new m$;return e.calculate(i),e},"getThemeVariables"),oh,b$=(oh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=ht(this.primaryColor),this.secondaryTextColor=ht(this.secondaryColor),this.tertiaryTextColor=ht(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ht("#323D47"),10),this.border1="#ccc",this.border2=Lo(255,255,255,.25),this.arrowheadColor=ht(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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ht(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ht(this.tertiaryColor),this.lineColor=this.lineColor||ht(this.background),this.arrowheadColor=this.arrowheadColor||ht(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?xt(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||xt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(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||_t(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=xt(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=xt(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||ht(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||_t(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||xt(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]||F(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||F(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||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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?xt(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=_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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(oh,"Theme"),oh),x$=B(i=>{const e=new b$;return e.calculate(i),e},"getThemeVariables"),lh,v$=(lh=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=ge("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,c,h,u,d,f,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ht(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ht(this.tertiaryColor),this.lineColor=this.lineColor||ht(this.background),this.arrowheadColor=this.arrowheadColor||ht(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?xt(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||xt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=F(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||_t(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"+_]=xt(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=xt(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ht(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||xt(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"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||F(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||F(e,{h:64}),this.fillType3=this.fillType3||F(r,{h:64}),this.fillType4=this.fillType4||F(e,{h:-64}),this.fillType5=this.fillType5||F(r,{h:-64}),this.fillType6=this.fillType6||F(e,{h:128}),this.fillType7=this.fillType7||F(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||F(e,{l:-10}),this.pie5=this.pie5||F(r,{l:-10}),this.pie6=this.pie6||F(n,{l:-10}),this.pie7=this.pie7||F(e,{h:60,l:-10}),this.pie8=this.pie8||F(e,{h:-60,l:-10}),this.pie9=this.pie9||F(e,{h:120,l:0}),this.pie10=this.pie10||F(e,{h:60,l:-20}),this.pie11=this.pie11||F(e,{h:-60,l:-20}),this.pie12=this.pie12||F(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||F(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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?xt(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||F(e,{h:-30}),this.git4=this.git4||F(e,{h:-60}),this.git5=this.git5||F(e,{h:-90}),this.git6=this.git6||F(e,{h:60}),this.git7=this.git7||F(e,{h:120}),this.darkMode?(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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(lh,"Theme"),lh),C$=B(i=>{const e=new v$;return e.calculate(i),e},"getThemeVariables"),ch,_$=(ch=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=ht(this.primaryColor),this.secondaryTextColor=ht(this.secondaryColor),this.tertiaryTextColor=ht(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ht("#323D47"),10),this.border1="#ccc",this.border2=Lo(255,255,255,.25),this.arrowheadColor=ht(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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ht(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ht(this.tertiaryColor),this.lineColor=this.lineColor||ht(this.background),this.arrowheadColor=this.arrowheadColor||ht(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?xt(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||xt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(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||_t(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=xt(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=xt(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||ht(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||_t(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||xt(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]||F(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||F(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||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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?xt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(ch,"Theme"),ch),k$=B(i=>{const e=new _$;return e.calculate(i),e},"getThemeVariables"),hh,w$=(hh=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=ge(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,c,h,u,d,f,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ht(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ht(this.tertiaryColor),this.lineColor=this.lineColor||ht(this.background),this.arrowheadColor=this.arrowheadColor||ht(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?xt(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||xt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=F(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||_t(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"+_]||ht(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||xt(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"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||F(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||F(e,{h:64}),this.fillType3=this.fillType3||F(r,{h:64}),this.fillType4=this.fillType4||F(e,{h:-64}),this.fillType5=this.fillType5||F(r,{h:-64}),this.fillType6=this.fillType6||F(e,{h:128}),this.fillType7=this.fillType7||F(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||F(e,{l:-10}),this.pie5=this.pie5||F(r,{l:-10}),this.pie6=this.pie6||F(n,{l:-10}),this.pie7=this.pie7||F(e,{h:60,l:-10}),this.pie8=this.pie8||F(e,{h:-60,l:-10}),this.pie9=this.pie9||F(e,{h:120,l:0}),this.pie10=this.pie10||F(e,{h:60,l:-20}),this.pie11=this.pie11||F(e,{h:-60,l:-20}),this.pie12=this.pie12||F(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||F(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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?xt(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||F(e,{h:-30}),this.git4=this.git4||F(e,{h:-60}),this.git5=this.git5||F(e,{h:-90}),this.git6=this.git6||F(e,{h:60}),this.git7=this.git7||F(e,{h:120}),this.darkMode?(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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(hh,"Theme"),hh),S$=B(i=>{const e=new w$;return e.calculate(i),e},"getThemeVariables"),uh,T$=(uh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=ht(this.primaryColor),this.secondaryTextColor=ht(this.secondaryColor),this.tertiaryTextColor=ht(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ht("#323D47"),10),this.border1="#ccc",this.border2=Lo(255,255,255,.25),this.arrowheadColor=ht(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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ht(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ht(this.tertiaryColor),this.lineColor=this.lineColor||ht(this.background),this.arrowheadColor=this.arrowheadColor||ht(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?xt(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||xt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(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||_t(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]||ht(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||_t(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||xt(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=xt(this["cScale"+y],75);const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||F(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||F(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||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):xt(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?xt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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.git0=xt(this.git0,25),this.git1=xt(this.git1,25),this.git2=xt(this.git2,25),this.git3=xt(this.git3,25),this.git4=xt(this.git4,25),this.git5=xt(this.git5,25),this.git6=xt(this.git6,25),this.git7=xt(this.git7,25)),this.gitInv0=this.gitInv0||ht(this.git0),this.gitInv1=this.gitInv1||ht(this.git1),this.gitInv2=this.gitInv2||ht(this.git2),this.gitInv3=this.gitInv3||ht(this.git3),this.gitInv4=this.gitInv4||ht(this.git4),this.gitInv5=this.gitInv5||ht(this.git5),this.gitInv6=this.gitInv6||ht(this.git6),this.gitInv7=this.gitInv7||ht(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||Xa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Za}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]})}},B(uh,"Theme"),uh),E$=B(i=>{const e=new T$;return e.calculate(i),e},"getThemeVariables"),Bs={base:{getThemeVariables:o$},dark:{getThemeVariables:c$},default:{getThemeVariables:u$},forest:{getThemeVariables:f$},neutral:{getThemeVariables:g$},neo:{getThemeVariables:y$},"neo-dark":{getThemeVariables:x$},redux:{getThemeVariables:C$},"redux-dark":{getThemeVariables:k$},"redux-color":{getThemeVariables:S$},"redux-dark-color":{getThemeVariables:E$}},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},LM={...On,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Bs.default.getThemeVariables(),sequence:{...On.sequence,messageFont:B(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:B(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:B(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:B(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...On.flowchart,inheritDir:!1},external_personFont:B(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:B(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:B(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:B(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:B(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:B(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:B(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:B(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:B(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:B(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:B(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:B(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:B(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:B(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:B(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:B(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:B(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:B(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:B(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:B(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:B(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}},OM=B((i,e="")=>Object.keys(i).reduce((r,n)=>Array.isArray(i[n])?r:typeof i[n]=="object"&&i[n]!==null?[...r,e+n,...OM(i[n],"")]:[...r,e+n],[]),"keyify"),N$=new Set(OM(LM,"")),RM=LM,ag=B(i=>{if(Nt.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(e=>ag(e));return}for(const e of Object.keys(i)){if(Nt.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!N$.has(e)||i[e]==null){Nt.debug("sanitize deleting key: ",e),delete i[e];continue}if(typeof i[e]=="object"){Nt.debug("sanitizing object",e),ag(i[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(Nt.debug("sanitizing css option",e),i[e]=A$(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]="")}Nt.debug("After sanitization",i)}},"sanitizeDirective"),A$=B(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"),ph=Object.freeze(RM),Fs=B(i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),"evaluate"),bn=mr({},ph),sg,Dl=[],nd=mr({},ph),Qg=B((i,e)=>{let r=mr({},i),n={};for(const a of e)FM(a),n=mr(n,a);if(r=mr(r,n),n.theme&&n.theme in Bs){const a=mr({},sg),o=mr(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in Bs&&(r.themeVariables=Bs[r.theme].getThemeVariables(o))}return nd=r,$M(nd),nd},"updateCurrentConfig"),M$=B(i=>(bn=mr({},ph),bn=mr(bn,i),i.theme&&Bs[i.theme]&&(bn.themeVariables=Bs[i.theme].getThemeVariables(i.themeVariables)),Qg(bn,Dl),bn),"setSiteConfig"),B$=B(i=>{sg=mr({},i)},"saveConfigFromInitialize"),L$=B(i=>(bn=mr(bn,i),Qg(bn,Dl),bn),"updateSiteConfig"),DM=B(()=>mr({},bn),"getSiteConfig"),jM=B(i=>($M(i),mr(nd,i),Ii()),"setConfig"),Ii=B(()=>mr({},nd),"getConfig"),FM=B(i=>{i&&(["secure",...bn.secure??[]].forEach(e=>{Object.hasOwn(i,e)&&(Nt.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"&&FM(i[e])}))},"sanitize"),O$=B(i=>{var e;ag(i),i.fontFamily&&!((e=i.themeVariables)!=null&&e.fontFamily)&&(i.themeVariables={...i.themeVariables,fontFamily:i.fontFamily}),Dl.push(i),Qg(bn,Dl)},"addDirective"),og=B((i=bn)=>{Dl=[],Qg(i,Dl)},"reset"),R$={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."},b2={},IM=B(i=>{b2[i]||(Nt.warn(R$[i]),b2[i]=!0)},"issueWarning"),$M=B(i=>{i&&(i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&IM("LAZY_LOAD_DEPRECATED")},"checkConfig"),Qst=B(()=>{let i={};sg&&(i=mr(i,sg));for(const e of Dl)i=mr(i,e);return i},"getUserDefinedConfig"),nn=B(i=>{var e,r;return((e=i.flowchart)==null?void 0:e.htmlLabels)!=null&&IM("FLOWCHART_HTML_LABELS_DEPRECATED"),Fs(i.htmlLabels??((r=i.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Id=/<br\s*\/?>/gi,D$=B(i=>i?qM(i).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),j$=(()=>{let i=!1;return()=>{i||(zM(),i=!0)}})();function zM(){const i="data-temp-href-target";Ol.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(i,e.getAttribute("target")??"")}),Ol.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"))})}B(zM,"setupDompurifyHooks");var PM=B(i=>(j$(),Ol.sanitize(i)),"removeScript"),x2=B((i,e)=>{if(nn(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?i=PM(i):r!=="loose"&&(i=qM(i),i=i.replace(/</g,"<").replace(/>/g,">"),i=i.replace(/=/g,"="),i=z$(i))}return i},"sanitizeMore"),_a=B((i,e)=>i&&(e.dompurifyConfig?i=Ol.sanitize(x2(i,e),e.dompurifyConfig).toString():i=Ol.sanitize(x2(i,e),{FORBID_TAGS:["style"]}).toString(),i),"sanitizeText"),F$=B((i,e)=>typeof i=="string"?_a(i,e):i.flat().map(r=>_a(r,e)),"sanitizeTextOrArray"),I$=B(i=>Id.test(i),"hasBreaks"),$$=B(i=>i.split(Id),"splitBreaks"),z$=B(i=>i.replace(/#br#/g,"<br/>"),"placeholderToBreak"),qM=B(i=>i.replace(Id,"#br#"),"breakToPlaceholder"),P$=B(i=>{let e="";return i&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),q$=B(function(...i){const e=i.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),U$=B(function(...i){const e=i.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),v2=B(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];H$(o,c)&&(a=o+","+c,n++,r.pop())}r.push(W$(a))}return r.join("")},"parseGenericTypes"),qx=B((i,e)=>Math.max(0,i.split(e).length-1),"countOccurrence"),H$=B((i,e)=>{const r=qx(i,"~"),n=qx(e,"~");return r===1&&n===1},"shouldCombineSets"),W$=B(i=>{const e=qx(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"),C2=B(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ux=/\$\$(.*)\$\$/g,pd=B(i=>{var e;return(((e=i.match(Ux))==null?void 0:e.length)??0)>0},"hasKatex"),Jst=B(async(i,e)=>{const r=document.createElement("div");r.innerHTML=await UM(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"),G$=B(async(i,e)=>{if(!pd(i))return i;if(!(C2()||e.legacyMathML||e.forceLegacyMathML))return i.replace(Ux,"MathML is unsupported in this environment.");{const{default:r}=await De(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!C2()&&e.legacyMathML?"htmlAndMathml":"mathml";return i.split(Id).map(a=>pd(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Ux,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),UM=B(async(i,e)=>_a(await G$(i,e),e),"renderKatexSanitized"),$d={getRows:D$,sanitizeText:_a,sanitizeTextOrArray:F$,hasBreaks:I$,splitBreaks:$$,lineBreakRegex:Id,removeScript:PM,getUrl:P$,evaluate:Fs,getMax:q$,getMin:U$},Y$=B(function(i,e){for(let r of e)i.attr(r[0],r[1])},"d3Attrs"),K$=B(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"),HM=B(function(i,e,r,n){const a=K$(e,r,n);Y$(i,a)},"configureSvgSize"),V$=B(function(i,e,r,n){const a=e.node().getBBox(),o=a.width,c=a.height;Nt.info(`SVG bounds: ${o}x${c}`,a);let h=0,u=0;Nt.info(`Graph bounds: ${h}x${u}`,i),h=o+r*2,u=c+r*2,Nt.info(`Calculated bounds: ${h}x${u}`),HM(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"),Pp={},X$=B((i,e,r,n)=>{let a="";return i in Pp&&Pp[i]?a=Pp[i]({...r,svgId:n}):Nt.warn(`No theme found for ${i}`),` & {
|
|
109
|
+
font-family: ${r.fontFamily};
|
|
110
|
+
font-size: ${r.fontSize};
|
|
111
|
+
fill: ${r.textColor}
|
|
112
|
+
}
|
|
113
|
+
@keyframes edge-animation-frame {
|
|
114
|
+
from {
|
|
115
|
+
stroke-dashoffset: 0;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
@keyframes dash {
|
|
119
|
+
to {
|
|
120
|
+
stroke-dashoffset: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
& .edge-animation-slow {
|
|
124
|
+
stroke-dasharray: 9,5 !important;
|
|
125
|
+
stroke-dashoffset: 900;
|
|
126
|
+
animation: dash 50s linear infinite;
|
|
127
|
+
stroke-linecap: round;
|
|
128
|
+
}
|
|
129
|
+
& .edge-animation-fast {
|
|
130
|
+
stroke-dasharray: 9,5 !important;
|
|
131
|
+
stroke-dashoffset: 900;
|
|
132
|
+
animation: dash 20s linear infinite;
|
|
133
|
+
stroke-linecap: round;
|
|
134
|
+
}
|
|
135
|
+
/* Classes common for multiple diagrams */
|
|
136
|
+
|
|
137
|
+
& .error-icon {
|
|
138
|
+
fill: ${r.errorBkgColor};
|
|
139
|
+
}
|
|
140
|
+
& .error-text {
|
|
141
|
+
fill: ${r.errorTextColor};
|
|
142
|
+
stroke: ${r.errorTextColor};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
& .edge-thickness-normal {
|
|
146
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
147
|
+
}
|
|
148
|
+
& .edge-thickness-thick {
|
|
149
|
+
stroke-width: 3.5px
|
|
150
|
+
}
|
|
151
|
+
& .edge-pattern-solid {
|
|
152
|
+
stroke-dasharray: 0;
|
|
153
|
+
}
|
|
154
|
+
& .edge-thickness-invisible {
|
|
155
|
+
stroke-width: 0;
|
|
156
|
+
fill: none;
|
|
157
|
+
}
|
|
158
|
+
& .edge-pattern-dashed{
|
|
159
|
+
stroke-dasharray: 3;
|
|
160
|
+
}
|
|
161
|
+
.edge-pattern-dotted {
|
|
162
|
+
stroke-dasharray: 2;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
& .marker {
|
|
166
|
+
fill: ${r.lineColor};
|
|
167
|
+
stroke: ${r.lineColor};
|
|
168
|
+
}
|
|
169
|
+
& .marker.cross {
|
|
170
|
+
stroke: ${r.lineColor};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
& svg {
|
|
174
|
+
font-family: ${r.fontFamily};
|
|
175
|
+
font-size: ${r.fontSize};
|
|
176
|
+
}
|
|
177
|
+
& p {
|
|
178
|
+
margin: 0
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
${a}
|
|
182
|
+
.node .neo-node {
|
|
183
|
+
stroke: ${r.nodeBorder};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
187
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
188
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
[data-look="neo"].node path {
|
|
193
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
194
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
[data-look="neo"].node .outer-path {
|
|
198
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[data-look="neo"].node .neo-line path {
|
|
202
|
+
stroke: ${r.nodeBorder};
|
|
203
|
+
filter: none;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[data-look="neo"].node circle{
|
|
207
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
208
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[data-look="neo"].node circle .state-start{
|
|
212
|
+
fill: #000000;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
[data-look="neo"].icon-shape .icon {
|
|
216
|
+
fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
217
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
221
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
222
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
${e}
|
|
226
|
+
`},"getStyles"),Z$=B((i,e)=>{e!==void 0&&(Pp[i]=e)},"addStylesForDiagram"),Q$=X$,WM={};X6(WM,{clear:()=>J$,getAccDescription:()=>rz,getAccTitle:()=>ez,getDiagramTitle:()=>az,setAccDescription:()=>iz,setAccTitle:()=>tz,setDiagramTitle:()=>nz});var M1="",B1="",L1="",O1=B(i=>_a(i,Ii()),"sanitizeText"),J$=B(()=>{M1="",L1="",B1=""},"clear"),tz=B(i=>{M1=O1(i).replace(/^\s+/g,"")},"setAccTitle"),ez=B(()=>M1,"getAccTitle"),iz=B(i=>{L1=O1(i).replace(/\n\s+/g,`
|
|
227
|
+
`)},"setAccDescription"),rz=B(()=>L1,"getAccDescription"),nz=B(i=>{B1=O1(i)},"setDiagramTitle"),az=B(()=>B1,"getDiagramTitle"),_2=Nt,sz=N1,Ze=Ii,tot=jM,eot=ph,R1=B(i=>_a(i,Ze()),"sanitizeText"),oz=V$,lz=B(()=>WM,"getCommonDb"),lg={},cg=B((i,e,r)=>{var n;lg[i]&&_2.warn(`Diagram with id ${i} already registered. Overwriting.`),lg[i]=e,r&&BM(i,r),Z$(i,e.styles),(n=e.injectUtils)==null||n.call(e,_2,sz,Ze,R1,oz,lz(),()=>{})},"registerDiagram"),Hx=B(i=>{if(i in lg)return lg[i];throw new cz(i)},"getDiagram"),dh,cz=(dh=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},B(dh,"DiagramNotFoundError"),dh);class k2 extends Map{constructor(e,r=dz){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(w2(this,e))}has(e){return super.has(w2(this,e))}set(e,r){return super.set(hz(this,e),r)}delete(e){return super.delete(uz(this,e))}}function w2({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):r}function hz({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):(i.set(n,r),r)}function uz({_intern:i,_key:e},r){const n=e(r);return i.has(n)&&(r=i.get(n),i.delete(n)),r}function dz(i){return i!==null&&typeof i=="object"?i.valueOf():i}function S2(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 T2(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 fz(i,e){let r=0;for(let n of i)(n=+n)&&(r+=n);return r}var pz={value:()=>{}};function zd(){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 qp(r)}function qp(i){this._=i}function gz(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}})}qp.prototype=zd.prototype={constructor:qp,on:function(i,e){var r=this._,n=gz(i+"",r),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(i=n[o]).type)&&(a=mz(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]=E2(r[a],i.name,e);else if(e==null)for(a in r)r[a]=E2(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 qp(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 mz(i,e){for(var r=0,n=i.length,a;r<n;++r)if((a=i[r]).name===e)return a.value}function E2(i,e,r){for(var n=0,a=i.length;n<a;++n)if(i[n].name===e){i[n]=pz,i=i.slice(0,n).concat(i.slice(n+1));break}return r!=null&&i.push({name:e,value:r}),i}var Wx="http://www.w3.org/1999/xhtml";const N2={svg:"http://www.w3.org/2000/svg",xhtml:Wx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jg(i){var e=i+="",r=e.indexOf(":");return r>=0&&(e=i.slice(0,r))!=="xmlns"&&(i=i.slice(r+1)),N2.hasOwnProperty(e)?{space:N2[e],local:i}:i}function yz(i){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Wx&&e.documentElement.namespaceURI===Wx?e.createElement(i):e.createElementNS(r,i)}}function bz(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function GM(i){var e=Jg(i);return(e.local?bz:yz)(e)}function xz(){}function D1(i){return i==null?xz:function(){return this.querySelector(i)}}function vz(i){typeof i!="function"&&(i=D1(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 Cz(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function _z(){return[]}function YM(i){return i==null?_z:function(){return this.querySelectorAll(i)}}function kz(i){return function(){return Cz(i.apply(this,arguments))}}function wz(i){typeof i=="function"?i=kz(i):i=YM(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 KM(i){return function(){return this.matches(i)}}function VM(i){return function(e){return e.matches(i)}}var Sz=Array.prototype.find;function Tz(i){return function(){return Sz.call(this.children,i)}}function Ez(){return this.firstElementChild}function Nz(i){return this.select(i==null?Ez:Tz(typeof i=="function"?i:VM(i)))}var Az=Array.prototype.filter;function Mz(){return Array.from(this.children)}function Bz(i){return function(){return Az.call(this.children,i)}}function Lz(i){return this.selectAll(i==null?Mz:Bz(typeof i=="function"?i:VM(i)))}function Oz(i){typeof i!="function"&&(i=KM(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 XM(i){return new Array(i.length)}function Rz(){return new Fn(this._enter||this._groups.map(XM),this._parents)}function hg(i,e){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=e}hg.prototype={constructor:hg,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 Dz(i){return function(){return i}}function jz(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 hg(i,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function Fz(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 hg(i,o[h]);for(h=0;h<f;++h)(u=e[h])&&d.get(x[h])===u&&(a[h]=u)}function Iz(i){return i.__data__}function $z(i,e){if(!arguments.length)return Array.from(this,Iz);var r=e?Fz:jz,n=this._parents,a=this._groups;typeof i!="function"&&(i=Dz(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=zz(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,E=0,N,L;T<v;++T)if(N=C[T]){for(T>=E&&(E=T+1);!(L=_[E])&&++E<v;);N._next=L||null}}return c=new Fn(c,n),c._enter=h,c._exit=u,c}function zz(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function Pz(){return new Fn(this._exit||this._groups.map(XM),this._parents)}function qz(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 Uz(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 Hz(){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 Wz(i){i||(i=Gz);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 Gz(i,e){return i<e?-1:i>e?1:i>=e?0:NaN}function Yz(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function Kz(){return Array.from(this)}function Vz(){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 Xz(){let i=0;for(const e of this)++i;return i}function Zz(){return!this.node()}function Qz(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 Jz(i){return function(){this.removeAttribute(i)}}function t8(i){return function(){this.removeAttributeNS(i.space,i.local)}}function e8(i,e){return function(){this.setAttribute(i,e)}}function i8(i,e){return function(){this.setAttributeNS(i.space,i.local,e)}}function r8(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(i):this.setAttribute(i,r)}}function n8(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 a8(i,e){var r=Jg(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?t8:Jz:typeof e=="function"?r.local?n8:r8:r.local?i8:e8)(r,e))}function ZM(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function s8(i){return function(){this.style.removeProperty(i)}}function o8(i,e,r){return function(){this.style.setProperty(i,e,r)}}function l8(i,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(i):this.style.setProperty(i,n,r)}}function c8(i,e,r){return arguments.length>1?this.each((e==null?s8:typeof e=="function"?l8:o8)(i,e,r??"")):gh(this.node(),i)}function gh(i,e){return i.style.getPropertyValue(e)||ZM(i).getComputedStyle(i,null).getPropertyValue(e)}function h8(i){return function(){delete this[i]}}function u8(i,e){return function(){this[i]=e}}function d8(i,e){return function(){var r=e.apply(this,arguments);r==null?delete this[i]:this[i]=r}}function f8(i,e){return arguments.length>1?this.each((e==null?h8:typeof e=="function"?d8:u8)(i,e)):this.node()[i]}function QM(i){return i.trim().split(/^|\s+/)}function j1(i){return i.classList||new JM(i)}function JM(i){this._node=i,this._names=QM(i.getAttribute("class")||"")}JM.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 tB(i,e){for(var r=j1(i),n=-1,a=e.length;++n<a;)r.add(e[n])}function eB(i,e){for(var r=j1(i),n=-1,a=e.length;++n<a;)r.remove(e[n])}function p8(i){return function(){tB(this,i)}}function g8(i){return function(){eB(this,i)}}function m8(i,e){return function(){(e.apply(this,arguments)?tB:eB)(this,i)}}function y8(i,e){var r=QM(i+"");if(arguments.length<2){for(var n=j1(this.node()),a=-1,o=r.length;++a<o;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?m8:e?p8:g8)(r,e))}function b8(){this.textContent=""}function x8(i){return function(){this.textContent=i}}function v8(i){return function(){var e=i.apply(this,arguments);this.textContent=e??""}}function C8(i){return arguments.length?this.each(i==null?b8:(typeof i=="function"?v8:x8)(i)):this.node().textContent}function _8(){this.innerHTML=""}function k8(i){return function(){this.innerHTML=i}}function w8(i){return function(){var e=i.apply(this,arguments);this.innerHTML=e??""}}function S8(i){return arguments.length?this.each(i==null?_8:(typeof i=="function"?w8:k8)(i)):this.node().innerHTML}function T8(){this.nextSibling&&this.parentNode.appendChild(this)}function E8(){return this.each(T8)}function N8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function A8(){return this.each(N8)}function M8(i){var e=typeof i=="function"?i:GM(i);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function B8(){return null}function L8(i,e){var r=typeof i=="function"?i:GM(i),n=e==null?B8:typeof e=="function"?e:D1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function O8(){var i=this.parentNode;i&&i.removeChild(this)}function R8(){return this.each(O8)}function D8(){var i=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function j8(){var i=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function F8(i){return this.select(i?j8:D8)}function I8(i){return arguments.length?this.property("__data__",i):this.node().__data__}function $8(i){return function(e){i.call(this,e,this.__data__)}}function z8(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 P8(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 q8(i,e,r){return function(){var n=this.__on,a,o=$8(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 U8(i,e,r){var n=z8(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?q8:P8,a=0;a<o;++a)this.each(h(n[a],e,r));return this}function iB(i,e,r){var n=ZM(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 H8(i,e){return function(){return iB(this,i,e)}}function W8(i,e){return function(){return iB(this,i,e.apply(this,arguments))}}function G8(i,e){return this.each((typeof e=="function"?W8:H8)(i,e))}function*Y8(){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 rB=[null];function Fn(i,e){this._groups=i,this._parents=e}function Pd(){return new Fn([[document.documentElement]],rB)}function K8(){return this}Fn.prototype=Pd.prototype={constructor:Fn,select:vz,selectAll:wz,selectChild:Nz,selectChildren:Lz,filter:Oz,data:$z,enter:Rz,exit:Pz,join:qz,merge:Uz,selection:K8,order:Hz,sort:Wz,call:Yz,nodes:Kz,node:Vz,size:Xz,empty:Zz,each:Qz,attr:a8,style:c8,property:f8,classed:y8,text:C8,html:S8,raise:E8,lower:A8,append:M8,insert:L8,remove:R8,clone:F8,datum:I8,on:U8,dispatch:G8,[Symbol.iterator]:Y8};function ce(i){return typeof i=="string"?new Fn([[document.querySelector(i)]],[document.documentElement]):new Fn([[i]],rB)}function V8(i){let e;for(;e=i.sourceEvent;)i=e;return i}function $a(i,e){if(i=V8(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]}const X8={passive:!1},gd={capture:!0,passive:!1};function Pb(i){i.stopImmediatePropagation()}function $c(i){i.preventDefault(),i.stopImmediatePropagation()}function nB(i){var e=i.document.documentElement,r=ce(i).on("dragstart.drag",$c,gd);"onselectstart"in e?r.on("selectstart.drag",$c,gd):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function aB(i,e){var r=i.document.documentElement,n=ce(i).on("dragstart.drag",null);e&&(n.on("click.drag",$c,gd),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 fp=i=>()=>i;function Gx(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}})}Gx.prototype.on=function(){var i=this._.on.apply(this._,arguments);return i===this._?this:i};function Z8(i){return!i.ctrlKey&&!i.button}function Q8(){return this.parentNode}function J8(i,e){return e??{x:i.x,y:i.y}}function tP(){return navigator.maxTouchPoints||"ontouchstart"in this}function eP(){var i=Z8,e=Q8,r=J8,n=tP,a={},o=zd("start","drag","end"),c=0,h,u,d,f,g=0;function x(N){N.on("mousedown.drag",y).filter(n).on("touchstart.drag",_).on("touchmove.drag",k,X8).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(N,L){if(!(f||!i.call(this,N,L))){var O=E(this,e.call(this,N,L),N,L,"mouse");O&&(ce(N.view).on("mousemove.drag",v,gd).on("mouseup.drag",C,gd),nB(N.view),Pb(N),d=!1,h=N.clientX,u=N.clientY,O("start",N))}}function v(N){if($c(N),!d){var L=N.clientX-h,O=N.clientY-u;d=L*L+O*O>g}a.mouse("drag",N)}function C(N){ce(N.view).on("mousemove.drag mouseup.drag",null),aB(N.view,d),$c(N),a.mouse("end",N)}function _(N,L){if(i.call(this,N,L)){var O=N.changedTouches,A=e.call(this,N,L),M=O.length,z,D;for(z=0;z<M;++z)(D=E(this,A,N,L,O[z].identifier,O[z]))&&(Pb(N),D("start",N,O[z]))}}function k(N){var L=N.changedTouches,O=L.length,A,M;for(A=0;A<O;++A)(M=a[L[A].identifier])&&($c(N),M("drag",N,L[A]))}function T(N){var L=N.changedTouches,O=L.length,A,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<O;++A)(M=a[L[A].identifier])&&(Pb(N),M("end",N,L[A]))}function E(N,L,O,A,M,z){var D=o.copy(),$=$a(z||O,L),U,Y,I;if((I=r.call(N,new Gx("beforestart",{sourceEvent:O,target:x,identifier:M,active:c,x:$[0],y:$[1],dx:0,dy:0,dispatch:D}),A))!=null)return U=I.x-$[0]||0,Y=I.y-$[1]||0,function W(j,q,G){var it=$,nt;switch(j){case"start":a[M]=W,nt=c++;break;case"end":delete a[M],--c;case"drag":$=$a(G||q,L),nt=c;break}D.call(j,N,new Gx(j,{sourceEvent:q,subject:I,target:x,identifier:M,active:nt,x:$[0]+U,y:$[1]+Y,dx:$[0]-it[0],dy:$[1]-it[1],dispatch:D}),A)}}return x.filter=function(N){return arguments.length?(i=typeof N=="function"?N:fp(!!N),x):i},x.container=function(N){return arguments.length?(e=typeof N=="function"?N:fp(N),x):e},x.subject=function(N){return arguments.length?(r=typeof N=="function"?N:fp(N),x):r},x.touchable=function(N){return arguments.length?(n=typeof N=="function"?N:fp(!!N),x):n},x.on=function(){var N=o.on.apply(o,arguments);return N===o?x:N},x.clickDistance=function(N){return arguments.length?(g=(N=+N)*N,x):Math.sqrt(g)},x}function F1(i,e,r){i.prototype=e.prototype=r,r.constructor=i}function sB(i,e){var r=Object.create(i.prototype);for(var n in e)r[n]=e[n];return r}function qd(){}var md=.7,ug=1/md,zc="\\s*([+-]?\\d+)\\s*",yd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iP=/^#([0-9a-f]{3,8})$/,rP=new RegExp(`^rgb\\(${zc},${zc},${zc}\\)$`),nP=new RegExp(`^rgb\\(${Wa},${Wa},${Wa}\\)$`),aP=new RegExp(`^rgba\\(${zc},${zc},${zc},${yd}\\)$`),sP=new RegExp(`^rgba\\(${Wa},${Wa},${Wa},${yd}\\)$`),oP=new RegExp(`^hsl\\(${yd},${Wa},${Wa}\\)$`),lP=new RegExp(`^hsla\\(${yd},${Wa},${Wa},${yd}\\)$`),A2={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,bd,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:M2,formatHex:M2,formatHex8:cP,formatHsl:hP,formatRgb:B2,toString:B2});function M2(){return this.rgb().formatHex()}function cP(){return this.rgb().formatHex8()}function hP(){return oB(this).formatHsl()}function B2(){return this.rgb().formatRgb()}function bd(i){var e,r;return i=(i+"").trim().toLowerCase(),(e=iP.exec(i))?(r=e[1].length,e=parseInt(e[1],16),r===6?L2(e):r===3?new vn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?pp(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?pp(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=rP.exec(i))?new vn(e[1],e[2],e[3],1):(e=nP.exec(i))?new vn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=aP.exec(i))?pp(e[1],e[2],e[3],e[4]):(e=sP.exec(i))?pp(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=oP.exec(i))?D2(e[1],e[2]/100,e[3]/100,1):(e=lP.exec(i))?D2(e[1],e[2]/100,e[3]/100,e[4]):A2.hasOwnProperty(i)?L2(A2[i]):i==="transparent"?new vn(NaN,NaN,NaN,0):null}function L2(i){return new vn(i>>16&255,i>>8&255,i&255,1)}function pp(i,e,r,n){return n<=0&&(i=e=r=NaN),new vn(i,e,r,n)}function uP(i){return i instanceof qd||(i=bd(i)),i?(i=i.rgb(),new vn(i.r,i.g,i.b,i.opacity)):new vn}function Yx(i,e,r,n){return arguments.length===1?uP(i):new vn(i,e,r,n??1)}function vn(i,e,r,n){this.r=+i,this.g=+e,this.b=+r,this.opacity=+n}F1(vn,Yx,sB(qd,{brighter(i){return i=i==null?ug:Math.pow(ug,i),new vn(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?md:Math.pow(md,i),new vn(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new vn(El(this.r),El(this.g),El(this.b),dg(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:O2,formatHex:O2,formatHex8:dP,formatRgb:R2,toString:R2}));function O2(){return`#${gl(this.r)}${gl(this.g)}${gl(this.b)}`}function dP(){return`#${gl(this.r)}${gl(this.g)}${gl(this.b)}${gl((isNaN(this.opacity)?1:this.opacity)*255)}`}function R2(){const i=dg(this.opacity);return`${i===1?"rgb(":"rgba("}${El(this.r)}, ${El(this.g)}, ${El(this.b)}${i===1?")":`, ${i})`}`}function dg(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function El(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function gl(i){return i=El(i),(i<16?"0":"")+i.toString(16)}function D2(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 oB(i){if(i instanceof ya)return new ya(i.h,i.s,i.l,i.opacity);if(i instanceof qd||(i=bd(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 fP(i,e,r,n){return arguments.length===1?oB(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,fP,sB(qd,{brighter(i){return i=i==null?ug:Math.pow(ug,i),new ya(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?md:Math.pow(md,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 vn(qb(i>=240?i-240:i+120,a,n),qb(i,a,n),qb(i<120?i+240:i-120,a,n),this.opacity)},clamp(){return new ya(j2(this.h),gp(this.s),gp(this.l),dg(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=dg(this.opacity);return`${i===1?"hsl(":"hsla("}${j2(this.h)}, ${gp(this.s)*100}%, ${gp(this.l)*100}%${i===1?")":`, ${i})`}`}}));function j2(i){return i=(i||0)%360,i<0?i+360:i}function gp(i){return Math.max(0,Math.min(1,i||0))}function qb(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 lB(i,e){return function(r){return i+r*e}}function pP(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 iot(i,e){var r=e-i;return r?lB(i,r>180||r<-180?r-360*Math.round(r/360):r):I1(isNaN(i)?e:i)}function gP(i){return(i=+i)==1?cB:function(e,r){return r-e?pP(e,r,i):I1(isNaN(e)?r:e)}}function cB(i,e){var r=e-i;return r?lB(i,r):I1(isNaN(i)?e:i)}const F2=(function i(e){var r=gP(e);function n(a,o){var c=r((a=Yx(a)).r,(o=Yx(o)).r),h=r(a.g,o.g),u=r(a.b,o.b),d=cB(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 bo(i,e){return i=+i,e=+e,function(r){return i*(1-r)+e*r}}var Kx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ub=new RegExp(Kx.source,"g");function mP(i){return function(){return i}}function yP(i){return function(e){return i(e)+""}}function bP(i,e){var r=Kx.lastIndex=Ub.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(i=i+"",e=e+"";(n=Kx.exec(i))&&(a=Ub.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:bo(n,a)})),r=Ub.lastIndex;return r<e.length&&(o=e.slice(r),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?yP(u[0].x):mP(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 I2=180/Math.PI,Vx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hB(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)*I2,skewX:Math.atan(u)*I2,scaleX:c,scaleY:h}}var mp;function xP(i){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return e.isIdentity?Vx:hB(e.a,e.b,e.c,e.d,e.e,e.f)}function vP(i){return i==null||(mp||(mp=document.createElementNS("http://www.w3.org/2000/svg","g")),mp.setAttribute("transform",i),!(i=mp.transform.baseVal.consolidate()))?Vx:(i=i.matrix,hB(i.a,i.b,i.c,i.d,i.e,i.f))}function uB(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:bo(d,g)},{i:C-2,x:bo(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:bo(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:bo(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:bo(d,g)},{i:C-2,x:bo(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 CP=uB(xP,"px, ","px)","deg)"),_P=uB(vP,", ",")",")"),kP=1e-12;function $2(i){return((i=Math.exp(i))+1/i)/2}function wP(i){return((i=Math.exp(i))-1/i)/2}function SP(i){return((i=Math.exp(2*i))-1)/(i+1)}const TP=(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<kP)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),E=(x*x-d*d+n*C)/(2*d*r*T),N=(x*x-d*d-n*C)/(2*x*r*T),L=Math.log(Math.sqrt(E*E+1)-E),O=Math.log(Math.sqrt(N*N+1)-N);k=(O-L)/e,_=function(A){var M=A*k,z=$2(L),D=d/(r*T)*(z*SP(e*M+L)-wP(L));return[h+D*y,u+D*v,d*z/$2(e*M+L)]}}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 mh=0,Gu=0,_u=0,dB=1e3,fg,Yu,pg=0,jl=0,tm=0,xd=typeof performance=="object"&&performance.now?performance:Date,fB=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function $1(){return jl||(fB(EP),jl=xd.now()+tm)}function EP(){jl=0}function gg(){this._call=this._time=this._next=null}gg.prototype=z1.prototype={constructor:gg,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&&Yu!==this&&(Yu?Yu._next=this:fg=this,Yu=this),this._call=i,this._time=r,Xx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xx())}};function z1(i,e,r){var n=new gg;return n.restart(i,e,r),n}function NP(){$1(),++mh;for(var i=fg,e;i;)(e=jl-i._time)>=0&&i._call.call(void 0,e),i=i._next;--mh}function z2(){jl=(pg=xd.now())+tm,mh=Gu=0;try{NP()}finally{mh=0,MP(),jl=0}}function AP(){var i=xd.now(),e=i-pg;e>dB&&(tm-=e,pg=i)}function MP(){for(var i,e=fg,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:fg=r);Yu=i,Xx(n)}function Xx(i){if(!mh){Gu&&(Gu=clearTimeout(Gu));var e=i-jl;e>24?(i<1/0&&(Gu=setTimeout(z2,i-xd.now()-tm)),_u&&(_u=clearInterval(_u))):(_u||(pg=xd.now(),_u=setInterval(AP,dB)),mh=1,fB(z2))}}function P2(i,e,r){var n=new gg;return e=e==null?0:+e,n.restart(a=>{n.stop(),i(a+e)},e,r),n}var BP=zd("start","end","cancel","interrupt"),LP=[],pB=0,q2=1,Zx=2,Up=3,U2=4,Qx=5,Hp=6;function em(i,e,r,n,a,o){var c=i.__transition;if(!c)i.__transition={};else if(r in c)return;OP(i,r,{name:e,index:n,group:a,on:BP,tween:LP,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:pB})}function P1(i,e){var r=Sa(i,e);if(r.state>pB)throw new Error("too late; already scheduled");return r}function Qa(i,e){var r=Sa(i,e);if(r.state>Up)throw new Error("too late; already running");return r}function Sa(i,e){var r=i.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function OP(i,e,r){var n=i.__transition,a;n[e]=r,r.timer=z1(o,0,r.time);function o(d){r.state=q2,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!==q2)return u();for(f in n)if(y=n[f],y.name===r.name){if(y.state===Up)return P2(c);y.state===U2?(y.state=Hp,y.timer.stop(),y.on.call("interrupt",i,i.__data__,y.index,y.group),delete n[f]):+f<e&&(y.state=Hp,y.timer.stop(),y.on.call("cancel",i,i.__data__,y.index,y.group),delete n[f])}if(P2(function(){r.state===Up&&(r.state=U2,r.timer.restart(h,r.delay,r.time),h(d))}),r.state=Zx,r.on.call("start",i,i.__data__,r.index,r.group),r.state===Zx){for(r.state=Up,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=Qx,1),g=-1,x=a.length;++g<x;)a[g].call(i,f);r.state===Qx&&(r.on.call("end",i,i.__data__,r.index,r.group),u())}function u(){r.state=Hp,r.timer.stop(),delete n[e];for(var d in n)return;delete i.__transition}}function Wp(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>Zx&&n.state<Qx,n.state=Hp,n.timer.stop(),n.on.call(a?"interrupt":"cancel",i,i.__data__,n.index,n.group),delete r[c]}o&&delete i.__transition}}function RP(i){return this.each(function(){Wp(this,i)})}function DP(i,e){var r,n;return function(){var a=Qa(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 jP(i,e,r){var n,a;if(typeof r!="function")throw new Error;return function(){var o=Qa(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 FP(i,e){var r=this._id;if(i+="",arguments.length<2){for(var n=Sa(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?DP:jP)(r,i,e))}function q1(i,e,r){var n=i._id;return i.each(function(){var a=Qa(this,n);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return Sa(a,n).value[e]}}function gB(i,e){var r;return(typeof e=="number"?bo:e instanceof bd?F2:(r=bd(e))?(e=r,F2):bP)(i,e)}function IP(i){return function(){this.removeAttribute(i)}}function $P(i){return function(){this.removeAttributeNS(i.space,i.local)}}function zP(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 PP(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 qP(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 UP(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 HP(i,e){var r=Jg(i),n=r==="transform"?_P:gB;return this.attrTween(i,typeof e=="function"?(r.local?UP:qP)(r,n,q1(this,"attr."+i,e)):e==null?(r.local?$P:IP)(r):(r.local?PP:zP)(r,n,e))}function WP(i,e){return function(r){this.setAttribute(i,e.call(this,r))}}function GP(i,e){return function(r){this.setAttributeNS(i.space,i.local,e.call(this,r))}}function YP(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&GP(i,o)),r}return a._value=e,a}function KP(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&WP(i,o)),r}return a._value=e,a}function VP(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=Jg(i);return this.tween(r,(n.local?YP:KP)(n,e))}function XP(i,e){return function(){P1(this,i).delay=+e.apply(this,arguments)}}function ZP(i,e){return e=+e,function(){P1(this,i).delay=e}}function QP(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?XP:ZP)(e,i)):Sa(this.node(),e).delay}function JP(i,e){return function(){Qa(this,i).duration=+e.apply(this,arguments)}}function tq(i,e){return e=+e,function(){Qa(this,i).duration=e}}function eq(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?JP:tq)(e,i)):Sa(this.node(),e).duration}function iq(i,e){if(typeof e!="function")throw new Error;return function(){Qa(this,i).ease=e}}function rq(i){var e=this._id;return arguments.length?this.each(iq(e,i)):Sa(this.node(),e).ease}function nq(i,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Qa(this,i).ease=r}}function aq(i){if(typeof i!="function")throw new Error;return this.each(nq(this._id,i))}function sq(i){typeof i!="function"&&(i=KM(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 Ds(n,this._parents,this._name,this._id)}function oq(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 Ds(c,this._parents,this._name,this._id)}function lq(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 cq(i,e,r){var n,a,o=lq(e)?P1:Qa;return function(){var c=o(this,i),h=c.on;h!==n&&(a=(n=h).copy()).on(e,r),c.on=a}}function hq(i,e){var r=this._id;return arguments.length<2?Sa(this.node(),r).on.on(i):this.each(cq(r,i,e))}function uq(i){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==i)return;e&&e.removeChild(this)}}function dq(){return this.on("end.remove",uq(this._id))}function fq(i){var e=this._name,r=this._id;typeof i!="function"&&(i=D1(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,em(d[x],e,r,x,d,Sa(f,r)));return new Ds(o,this._parents,e,r)}function pq(i){var e=this._name,r=this._id;typeof i!="function"&&(i=YM(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=Sa(f,r),C=0,_=x.length;C<_;++C)(y=x[C])&&em(y,e,r,C,x,v);o.push(x),c.push(f)}return new Ds(o,c,e,r)}var gq=Pd.prototype.constructor;function mq(){return new gq(this._groups,this._parents)}function yq(i,e){var r,n,a;return function(){var o=gh(this,i),c=(this.style.removeProperty(i),gh(this,i));return o===c?null:o===r&&c===n?a:a=e(r=o,n=c)}}function mB(i){return function(){this.style.removeProperty(i)}}function bq(i,e,r){var n,a=r+"",o;return function(){var c=gh(this,i);return c===a?null:c===n?o:o=e(n=c,r)}}function xq(i,e,r){var n,a,o;return function(){var c=gh(this,i),h=r(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(i),gh(this,i))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function vq(i,e){var r,n,a,o="style."+e,c="end."+o,h;return function(){var u=Qa(this,i),d=u.on,f=u.value[o]==null?h||(h=mB(e)):void 0;(d!==r||a!==f)&&(n=(r=d).copy()).on(c,a=f),u.on=n}}function Cq(i,e,r){var n=(i+="")=="transform"?CP:gB;return e==null?this.styleTween(i,yq(i,n)).on("end.style."+i,mB(i)):typeof e=="function"?this.styleTween(i,xq(i,n,q1(this,"style."+i,e))).each(vq(this._id,i)):this.styleTween(i,bq(i,n,e),r).on("end.style."+i,null)}function _q(i,e,r){return function(n){this.style.setProperty(i,e.call(this,n),r)}}function kq(i,e,r){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&_q(i,c,r)),n}return o._value=e,o}function wq(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,kq(i,e,r??""))}function Sq(i){return function(){this.textContent=i}}function Tq(i){return function(){var e=i(this);this.textContent=e??""}}function Eq(i){return this.tween("text",typeof i=="function"?Tq(q1(this,"text",i)):Sq(i==null?"":i+""))}function Nq(i){return function(e){this.textContent=i.call(this,e)}}function Aq(i){var e,r;function n(){var a=i.apply(this,arguments);return a!==r&&(e=(r=a)&&Nq(a)),e}return n._value=i,n}function Mq(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,Aq(i))}function Bq(){for(var i=this._name,e=this._id,r=yB(),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=Sa(u,e);em(u,i,r,d,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ds(n,this._parents,i,r)}function Lq(){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=Qa(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 Oq=0;function Ds(i,e,r,n){this._groups=i,this._parents=e,this._name=r,this._id=n}function yB(){return++Oq}var ys=Pd.prototype;Ds.prototype={constructor:Ds,select:fq,selectAll:pq,selectChild:ys.selectChild,selectChildren:ys.selectChildren,filter:sq,merge:oq,selection:mq,transition:Bq,call:ys.call,nodes:ys.nodes,node:ys.node,size:ys.size,empty:ys.empty,each:ys.each,on:hq,attr:HP,attrTween:VP,style:Cq,styleTween:wq,text:Eq,textTween:Mq,remove:dq,tween:FP,delay:QP,duration:eq,ease:rq,easeVarying:aq,end:Lq,[Symbol.iterator]:ys[Symbol.iterator]};function Rq(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var Dq={time:null,delay:0,duration:250,ease:Rq};function jq(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 Fq(i){var e,r;i instanceof Ds?(e=i._id,i=i._name):(e=yB(),(r=Dq).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])&&em(u,i,e,d,c,r||jq(u,e));return new Ds(n,this._parents,i,e)}Pd.prototype.interrupt=RP;Pd.prototype.transition=Fq;const Jx=Math.PI,tv=2*Jx,cl=1e-6,Iq=tv-cl;function bB(i){this._+=i[0];for(let e=1,r=i.length;e<r;++e)this._+=arguments[e]+i[e]}function $q(i){let e=Math.floor(i);if(!(e>=0))throw new Error(`invalid digits: ${i}`);if(e>15)return bB;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 zq{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?bB:$q(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>cl)if(!(Math.abs(g*u-d*f)>cl)||!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),E=o*Math.tan((Jx-Math.acos((C+x-_)/(2*k*T)))/2),N=E/T,L=E/k;Math.abs(N-1)>cl&&this._append`L${e+N*f},${r+N*g}`,this._append`A${o},${o},0,0,${+(g*y>f*v)},${this._x1=e+L*u},${this._y1=r+L*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)>cl||Math.abs(this._y1-f)>cl)&&this._append`L${d},${f}`,n&&(x<0&&(x=x%tv+tv),x>Iq?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>cl&&this._append`A${n},${n},0,${+(x>=Jx)},${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 Pq(i){const e=+this._x.call(null,i),r=+this._y.call(null,i);return xB(this.cover(e,r),e,r,i)}function xB(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 qq(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)xB(this,c[r],h[r],i[r]);return this}function Uq(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 Hq(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function Wq(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 Qr(i,e,r,n,a){this.node=i,this.x0=e,this.y0=r,this.x1=n,this.y1=a}function Gq(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 Qr(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 Qr(y[3],_,k,u,d),new Qr(y[2],c,k,_,d),new Qr(y[1],_,h,u,k),new Qr(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),E=e-+this._y.call(null,y.data),N=T*T+E*E;if(N<r){var L=Math.sqrt(r=N);a=i-L,o=e-L,f=i+L,g=e+L,n=y.data}}return n}function Yq(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 Kq(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function Vq(){return this._root}function Xq(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function Zq(i){var e=[],r,n=this._root,a,o,c,h,u;for(n&&e.push(new Qr(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 Qr(a,d,f,h,u)),(a=n[2])&&e.push(new Qr(a,o,f,d,u)),(a=n[1])&&e.push(new Qr(a,d,c,h,f)),(a=n[0])&&e.push(new Qr(a,o,c,d,f))}return this}function Qq(i){var e=[],r=[],n;for(this._root&&e.push(new Qr(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 Qr(o,c,h,f,g)),(o=a[1])&&e.push(new Qr(o,f,h,u,g)),(o=a[2])&&e.push(new Qr(o,c,g,f,d)),(o=a[3])&&e.push(new Qr(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 Jq(i){return i[0]}function t9(i){return arguments.length?(this._x=i,this):this._x}function e9(i){return i[1]}function i9(i){return arguments.length?(this._y=i,this):this._y}function U1(i,e,r){var n=new H1(e??Jq,r??e9,NaN,NaN,NaN,NaN);return i==null?n:n.addAll(i)}function H1(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 H2(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var sn=U1.prototype=H1.prototype;sn.copy=function(){var i=new H1(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=H2(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]=H2(n));return i};sn.add=Pq;sn.addAll=qq;sn.cover=Uq;sn.data=Hq;sn.extent=Wq;sn.find=Gq;sn.remove=Yq;sn.removeAll=Kq;sn.root=Vq;sn.size=Xq;sn.visit=Zq;sn.visitAfter=Qq;sn.x=t9;sn.y=i9;function r9(i,e){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(e).domain(i);break}return this}const W2=Symbol("implicit");function vB(){var i=new k2,e=[],r=[],n=W2;function a(o){let c=i.get(o);if(c===void 0){if(n!==W2)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 k2;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 vB(e,r).unknown(n)},r9.apply(a,arguments),a}function n9(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 a9=n9("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Tc(i){return function(){return i}}const rot=Math.abs,not=Math.atan2,aot=Math.cos,sot=Math.max,oot=Math.min,lot=Math.sin,cot=Math.sqrt,G2=1e-12,W1=Math.PI,Y2=W1/2,hot=2*W1;function uot(i){return i>1?0:i<-1?W1:Math.acos(i)}function dot(i){return i>=1?Y2:i<=-1?-Y2:Math.asin(i)}function s9(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 zq(e)}function o9(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function CB(i){this._context=i}CB.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 ad(i){return new CB(i)}function l9(i){return i[0]}function c9(i){return i[1]}function h9(i,e){var r=Tc(!0),n=null,a=ad,o=null,c=s9(h);i=typeof i=="function"?i:i===void 0?l9:Tc(i),e=typeof e=="function"?e:e===void 0?c9:Tc(e);function h(u){var d,f=(u=o9(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:Tc(+u),h):i},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:Tc(+u),h):e},h.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Tc(!!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 _B{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 kB(i){return new _B(i,!0)}function wB(i){return new _B(i,!1)}function Do(){}function mg(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 im(i){this._context=i}im.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:mg(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:mg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function ev(i){return new im(i)}function SB(i){this._context=i}SB.prototype={areaStart:Do,areaEnd:Do,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:mg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function u9(i){return new SB(i)}function TB(i){this._context=i}TB.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:mg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function d9(i){return new TB(i)}function EB(i,e){this._basis=new im(i),this._beta=e}EB.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 f9=(function i(e){function r(n){return e===1?new im(n):new EB(n,e)}return r.beta=function(n){return i(+n)},r})(.85);function yg(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 G1(i,e){this._context=i,this._k=(1-e)/6}G1.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:yg(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:yg(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 NB=(function i(e){function r(n){return new G1(n,e)}return r.tension=function(n){return i(+n)},r})(0);function Y1(i,e){this._context=i,this._k=(1-e)/6}Y1.prototype={areaStart:Do,areaEnd:Do,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:yg(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 p9=(function i(e){function r(n){return new Y1(n,e)}return r.tension=function(n){return i(+n)},r})(0);function K1(i,e){this._context=i,this._k=(1-e)/6}K1.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:yg(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 g9=(function i(e){function r(n){return new K1(n,e)}return r.tension=function(n){return i(+n)},r})(0);function V1(i,e,r){var n=i._x1,a=i._y1,o=i._x2,c=i._y2;if(i._l01_a>G2){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>G2){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 AB(i,e){this._context=i,this._alpha=e}AB.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:V1(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 MB=(function i(e){function r(n){return e?new AB(n,e):new G1(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function BB(i,e){this._context=i,this._alpha=e}BB.prototype={areaStart:Do,areaEnd:Do,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:V1(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 m9=(function i(e){function r(n){return e?new BB(n,e):new Y1(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function LB(i,e){this._context=i,this._alpha=e}LB.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:V1(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 y9=(function i(e){function r(n){return e?new LB(n,e):new K1(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function OB(i){this._context=i}OB.prototype={areaStart:Do,areaEnd:Do,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 b9(i){return new OB(i)}function K2(i){return i<0?-1:1}function V2(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(K2(o)+K2(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function X2(i,e){var r=i._x1-i._x0;return r?(3*(i._y1-i._y0)/r-e)/2:e}function Hb(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 bg(i){this._context=i}bg.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:Hb(this,this._t0,X2(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,Hb(this,X2(this,r=V2(this,i,e)),r);break;default:Hb(this,this._t0,r=V2(this,i,e));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e,this._t0=r}}};function RB(i){this._context=new DB(i)}(RB.prototype=Object.create(bg.prototype)).point=function(i,e){bg.prototype.point.call(this,e,i)};function DB(i){this._context=i}DB.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 jB(i){return new bg(i)}function FB(i){return new RB(i)}function IB(i){this._context=i}IB.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=Z2(i),a=Z2(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 Z2(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 $B(i){return new IB(i)}function rm(i,e){this._context=i,this._t=e}rm.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 zB(i){return new rm(i,.5)}function PB(i){return new rm(i,0)}function qB(i){return new rm(i,1)}const yp=i=>()=>i;function x9(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 Ms(i,e,r){this.k=i,this.x=e,this.y=r}Ms.prototype={constructor:Ms,scale:function(i){return i===1?this:new Ms(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new Ms(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 X1=new Ms(1,0,0);Fa.prototype=Ms.prototype;function Fa(i){for(;!i.__zoom;)if(!(i=i.parentNode))return X1;return i.__zoom}function Wb(i){i.stopImmediatePropagation()}function ku(i){i.preventDefault(),i.stopImmediatePropagation()}function v9(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function C9(){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 Q2(){return this.__zoom||X1}function _9(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function k9(){return navigator.maxTouchPoints||"ontouchstart"in this}function w9(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 S9(){var i=v9,e=C9,r=w9,n=_9,a=k9,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=TP,d=zd("start","zoom","end"),f,g,x,y=500,v=150,C=0,_=10;function k(I){I.property("__zoom",Q2).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",z).on("dblclick.zoom",D).filter(a).on("touchstart.zoom",$).on("touchmove.zoom",U).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(I,W,j,q){var G=I.selection?I.selection():I;G.property("__zoom",Q2),I!==G?L(I,W,j,q):G.interrupt().each(function(){O(this,arguments).event(q).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},k.scaleBy=function(I,W,j,q){k.scaleTo(I,function(){var G=this.__zoom.k,it=typeof W=="function"?W.apply(this,arguments):W;return G*it},j,q)},k.scaleTo=function(I,W,j,q){k.transform(I,function(){var G=e.apply(this,arguments),it=this.__zoom,nt=j==null?N(G):typeof j=="function"?j.apply(this,arguments):j,H=it.invert(nt),rt=typeof W=="function"?W.apply(this,arguments):W;return r(E(T(it,rt),nt,H),G,c)},j,q)},k.translateBy=function(I,W,j,q){k.transform(I,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,q)},k.translateTo=function(I,W,j,q,G){k.transform(I,function(){var it=e.apply(this,arguments),nt=this.__zoom,H=q==null?N(it):typeof q=="function"?q.apply(this,arguments):q;return r(X1.translate(H[0],H[1]).scale(nt.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof j=="function"?-j.apply(this,arguments):-j),it,c)},q,G)};function T(I,W){return W=Math.max(o[0],Math.min(o[1],W)),W===I.k?I:new Ms(W,I.x,I.y)}function E(I,W,j){var q=W[0]-j[0]*I.k,G=W[1]-j[1]*I.k;return q===I.x&&G===I.y?I:new Ms(I.k,q,G)}function N(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function L(I,W,j,q){I.on("start.zoom",function(){O(this,arguments).event(q).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(q).end()}).tween("zoom",function(){var G=this,it=arguments,nt=O(G,it).event(q),H=e.apply(G,it),rt=j==null?N(H):typeof j=="function"?j.apply(G,it):j,ft=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),Q=G.__zoom,yt=typeof W=="function"?W.apply(G,it):W,ot=u(Q.invert(rt).concat(ft/Q.k),yt.invert(rt).concat(ft/yt.k));return function(X){if(X===1)X=yt;else{var Z=ot(X),st=ft/Z[2];X=new Ms(st,rt[0]-Z[0]*st,rt[1]-Z[1]*st)}nt.zoom(null,X)}})}function O(I,W,j){return!j&&I.__zooming||new A(I,W)}function A(I,W){this.that=I,this.args=W,this.active=0,this.sourceEvent=null,this.extent=e.apply(I,W),this.taps=0}A.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,W){return this.mouse&&I!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&I!=="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(I){var W=ce(this.that).datum();d.call(I,this.that,new x9(I,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),W)}};function M(I,...W){if(!i.apply(this,arguments))return;var j=O(this,W).event(I),q=this.__zoom,G=Math.max(o[0],Math.min(o[1],q.k*Math.pow(2,n.apply(this,arguments)))),it=$a(I);if(j.wheel)(j.mouse[0][0]!==it[0]||j.mouse[0][1]!==it[1])&&(j.mouse[1]=q.invert(j.mouse[0]=it)),clearTimeout(j.wheel);else{if(q.k===G)return;j.mouse=[it,q.invert(it)],Wp(this),j.start()}ku(I),j.wheel=setTimeout(nt,v),j.zoom("mouse",r(E(T(q,G),j.mouse[0],j.mouse[1]),j.extent,c));function nt(){j.wheel=null,j.end()}}function z(I,...W){if(x||!i.apply(this,arguments))return;var j=I.currentTarget,q=O(this,W,!0).event(I),G=ce(I.view).on("mousemove.zoom",rt,!0).on("mouseup.zoom",ft,!0),it=$a(I,j),nt=I.clientX,H=I.clientY;nB(I.view),Wb(I),q.mouse=[it,this.__zoom.invert(it)],Wp(this),q.start();function rt(Q){if(ku(Q),!q.moved){var yt=Q.clientX-nt,ot=Q.clientY-H;q.moved=yt*yt+ot*ot>C}q.event(Q).zoom("mouse",r(E(q.that.__zoom,q.mouse[0]=$a(Q,j),q.mouse[1]),q.extent,c))}function ft(Q){G.on("mousemove.zoom mouseup.zoom",null),aB(Q.view,q.moved),ku(Q),q.event(Q).end()}}function D(I,...W){if(i.apply(this,arguments)){var j=this.__zoom,q=$a(I.changedTouches?I.changedTouches[0]:I,this),G=j.invert(q),it=j.k*(I.shiftKey?.5:2),nt=r(E(T(j,it),q,G),e.apply(this,W),c);ku(I),h>0?ce(this).transition().duration(h).call(L,nt,q,I):ce(this).call(k.transform,nt,q,I)}}function $(I,...W){if(i.apply(this,arguments)){var j=I.touches,q=j.length,G=O(this,W,I.changedTouches.length===q).event(I),it,nt,H,rt;for(Wb(I),nt=0;nt<q;++nt)H=j[nt],rt=$a(H,this),rt=[rt,this.__zoom.invert(rt),H.identifier],G.touch0?!G.touch1&&G.touch0[2]!==rt[2]&&(G.touch1=rt,G.taps=0):(G.touch0=rt,it=!0,G.taps=1+!!f);f&&(f=clearTimeout(f)),it&&(G.taps<2&&(g=rt[0],f=setTimeout(function(){f=null},y)),Wp(this),G.start())}}function U(I,...W){if(this.__zooming){var j=O(this,W).event(I),q=I.changedTouches,G=q.length,it,nt,H,rt;for(ku(I),it=0;it<G;++it)nt=q[it],H=$a(nt,this),j.touch0&&j.touch0[2]===nt.identifier?j.touch0[0]=H:j.touch1&&j.touch1[2]===nt.identifier&&(j.touch1[0]=H);if(nt=j.that.__zoom,j.touch1){var ft=j.touch0[0],Q=j.touch0[1],yt=j.touch1[0],ot=j.touch1[1],X=(X=yt[0]-ft[0])*X+(X=yt[1]-ft[1])*X,Z=(Z=ot[0]-Q[0])*Z+(Z=ot[1]-Q[1])*Z;nt=T(nt,Math.sqrt(X/Z)),H=[(ft[0]+yt[0])/2,(ft[1]+yt[1])/2],rt=[(Q[0]+ot[0])/2,(Q[1]+ot[1])/2]}else if(j.touch0)H=j.touch0[0],rt=j.touch0[1];else return;j.zoom("touch",r(E(nt,H,rt),j.extent,c))}}function Y(I,...W){if(this.__zooming){var j=O(this,W).event(I),q=I.changedTouches,G=q.length,it,nt;for(Wb(I),x&&clearTimeout(x),x=setTimeout(function(){x=null},y),it=0;it<G;++it)nt=q[it],j.touch0&&j.touch0[2]===nt.identifier?delete j.touch0:j.touch1&&j.touch1[2]===nt.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&&(nt=$a(nt,this),Math.hypot(g[0]-nt[0],g[1]-nt[1])<_)){var H=ce(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return k.wheelDelta=function(I){return arguments.length?(n=typeof I=="function"?I:yp(+I),k):n},k.filter=function(I){return arguments.length?(i=typeof I=="function"?I:yp(!!I),k):i},k.touchable=function(I){return arguments.length?(a=typeof I=="function"?I:yp(!!I),k):a},k.extent=function(I){return arguments.length?(e=typeof I=="function"?I:yp([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),k):e},k.scaleExtent=function(I){return arguments.length?(o[0]=+I[0],o[1]=+I[1],k):[o[0],o[1]]},k.translateExtent=function(I){return arguments.length?(c[0][0]=+I[0][0],c[1][0]=+I[1][0],c[0][1]=+I[0][1],c[1][1]=+I[1][1],k):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},k.constrain=function(I){return arguments.length?(r=I,k):r},k.duration=function(I){return arguments.length?(h=+I,k):h},k.interpolate=function(I){return arguments.length?(u=I,k):u},k.on=function(){var I=d.on.apply(d,arguments);return I===d?k:I},k.clickDistance=function(I){return arguments.length?(C=(I=+I)*I,k):Math.sqrt(C)},k.tapDistance=function(I){return arguments.length?(_=+I,k):_},k}var T9=B(i=>{var a;const{securityLevel:e}=Ze();let r=ce("body");if(e==="sandbox"){const c=((a=ce(`#i${i}`).node())==null?void 0:a.contentDocument)??document;r=ce(c.body)}return r.select(`#${i}`)},"selectSvgElement");function Z1(i){return typeof i>"u"||i===null}B(Z1,"isNothing");function UB(i){return typeof i=="object"&&i!==null}B(UB,"isObject");function HB(i){return Array.isArray(i)?i:Z1(i)?[]:[i]}B(HB,"toArray");function WB(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}B(WB,"extend");function GB(i,e){var r="",n;for(n=0;n<e;n+=1)r+=i;return r}B(GB,"repeat");function YB(i){return i===0&&Number.NEGATIVE_INFINITY===1/i}B(YB,"isNegativeZero");var E9=Z1,N9=UB,A9=HB,M9=GB,B9=YB,L9=WB,yr={isNothing:E9,isObject:N9,toArray:A9,repeat:M9,isNegativeZero:B9,extend:L9};function Q1(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+=`
|
|
228
|
+
|
|
229
|
+
`+i.mark.snippet),n+" "+r):n}B(Q1,"formatError");function yh(i,e){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=e,this.message=Q1(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}B(yh,"YAMLException$1");yh.prototype=Object.create(Error.prototype);yh.prototype.constructor=yh;yh.prototype.toString=B(function(e){return this.name+": "+Q1(this,e)},"toString");var xn=yh;function Gp(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}}B(Gp,"getLine");function Yp(i,e){return yr.repeat(" ",e-i.length)+i}B(Yp,"padStart");function KB(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=Gp(i.buffer,n[c-u],a[c-u],i.position-(n[c]-n[c-u]),g),h=yr.repeat(" ",e.indent)+Yp((i.line-u+1).toString(),f)+" | "+d.str+`
|
|
230
|
+
`+h;for(d=Gp(i.buffer,n[c],a[c],i.position,g),h+=yr.repeat(" ",e.indent)+Yp((i.line+1).toString(),f)+" | "+d.str+`
|
|
231
|
+
`,h+=yr.repeat("-",e.indent+f+3+d.pos)+`^
|
|
232
|
+
`,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)d=Gp(i.buffer,n[c+u],a[c+u],i.position-(n[c]-n[c+u]),g),h+=yr.repeat(" ",e.indent)+Yp((i.line+u+1).toString(),f)+" | "+d.str+`
|
|
233
|
+
`;return h.replace(/\n$/,"")}B(KB,"makeSnippet");var O9=KB,R9=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],D9=["scalar","sequence","mapping"];function VB(i){var e={};return i!==null&&Object.keys(i).forEach(function(r){i[r].forEach(function(n){e[String(n)]=r})}),e}B(VB,"compileStyleAliases");function XB(i,e){if(e=e||{},Object.keys(e).forEach(function(r){if(R9.indexOf(r)===-1)throw new xn('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=VB(e.styleAliases||null),D9.indexOf(this.kind)===-1)throw new xn('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}B(XB,"Type$1");var Ur=XB;function iv(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}B(iv,"compileList");function ZB(){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(B(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return i}B(ZB,"compileMap");function xg(i){return this.extend(i)}B(xg,"Schema$1");xg.prototype.extend=B(function(e){var r=[],n=[];if(e instanceof Ur)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 xn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Ur))throw new xn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new xn("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 xn("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 Ur))throw new xn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(xg.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=iv(a,"implicit"),a.compiledExplicit=iv(a,"explicit"),a.compiledTypeMap=ZB(a.compiledImplicit,a.compiledExplicit),a},"extend");var j9=xg,F9=new Ur("tag:yaml.org,2002:str",{kind:"scalar",construct:B(function(i){return i!==null?i:""},"construct")}),I9=new Ur("tag:yaml.org,2002:seq",{kind:"sequence",construct:B(function(i){return i!==null?i:[]},"construct")}),$9=new Ur("tag:yaml.org,2002:map",{kind:"mapping",construct:B(function(i){return i!==null?i:{}},"construct")}),z9=new j9({explicit:[F9,I9,$9]});function QB(i){if(i===null)return!0;var e=i.length;return e===1&&i==="~"||e===4&&(i==="null"||i==="Null"||i==="NULL")}B(QB,"resolveYamlNull");function JB(){return null}B(JB,"constructYamlNull");function tL(i){return i===null}B(tL,"isNull");var P9=new Ur("tag:yaml.org,2002:null",{kind:"scalar",resolve:QB,construct:JB,predicate:tL,represent:{canonical:B(function(){return"~"},"canonical"),lowercase:B(function(){return"null"},"lowercase"),uppercase:B(function(){return"NULL"},"uppercase"),camelcase:B(function(){return"Null"},"camelcase"),empty:B(function(){return""},"empty")},defaultStyle:"lowercase"});function eL(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")}B(eL,"resolveYamlBoolean");function iL(i){return i==="true"||i==="True"||i==="TRUE"}B(iL,"constructYamlBoolean");function rL(i){return Object.prototype.toString.call(i)==="[object Boolean]"}B(rL,"isBoolean");var q9=new Ur("tag:yaml.org,2002:bool",{kind:"scalar",resolve:eL,construct:iL,predicate:rL,represent:{lowercase:B(function(i){return i?"true":"false"},"lowercase"),uppercase:B(function(i){return i?"TRUE":"FALSE"},"uppercase"),camelcase:B(function(i){return i?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function nL(i){return 48<=i&&i<=57||65<=i&&i<=70||97<=i&&i<=102}B(nL,"isHexCode");function aL(i){return 48<=i&&i<=55}B(aL,"isOctCode");function sL(i){return 48<=i&&i<=57}B(sL,"isDecCode");function oL(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(!nL(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!aL(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=i[r],a!=="_"){if(!sL(i.charCodeAt(r)))return!1;n=!0}return!(!n||a==="_")}B(oL,"resolveYamlInteger");function lL(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)}B(lL,"constructYamlInteger");function cL(i){return Object.prototype.toString.call(i)==="[object Number]"&&i%1===0&&!yr.isNegativeZero(i)}B(cL,"isInteger");var U9=new Ur("tag:yaml.org,2002:int",{kind:"scalar",resolve:oL,construct:lL,predicate:cL,represent:{binary:B(function(i){return i>=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},"binary"),octal:B(function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},"octal"),decimal:B(function(i){return i.toString(10)},"decimal"),hexadecimal:B(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"]}}),H9=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function hL(i){return!(i===null||!H9.test(i)||i[i.length-1]==="_")}B(hL,"resolveYamlFloat");function uL(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)}B(uL,"constructYamlFloat");var W9=/^[-+]?[0-9]+e/;function dL(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(yr.isNegativeZero(i))return"-0.0";return r=i.toString(10),W9.test(r)?r.replace("e",".e"):r}B(dL,"representYamlFloat");function fL(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||yr.isNegativeZero(i))}B(fL,"isFloat");var G9=new Ur("tag:yaml.org,2002:float",{kind:"scalar",resolve:hL,construct:uL,predicate:fL,represent:dL,defaultStyle:"lowercase"}),pL=z9.extend({implicit:[P9,q9,U9,G9]}),Y9=pL,gL=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),mL=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 yL(i){return i===null?!1:gL.exec(i)!==null||mL.exec(i)!==null}B(yL,"resolveYamlTimestamp");function bL(i){var e,r,n,a,o,c,h,u=0,d=null,f,g,x;if(e=gL.exec(i),e===null&&(e=mL.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}B(bL,"constructYamlTimestamp");function xL(i){return i.toISOString()}B(xL,"representYamlTimestamp");var K9=new Ur("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:yL,construct:bL,instanceOf:Date,represent:xL});function vL(i){return i==="<<"||i===null}B(vL,"resolveYamlMerge");var V9=new Ur("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vL}),J1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
234
|
+
\r`;function CL(i){if(i===null)return!1;var e,r,n=0,a=i.length,o=J1;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}B(CL,"resolveYamlBinary");function _L(i){var e,r,n=i.replace(/[\r\n=]/g,""),a=n.length,o=J1,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)}B(_L,"constructYamlBinary");function kL(i){var e="",r=0,n,a,o=i.length,c=J1;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}B(kL,"representYamlBinary");function wL(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}B(wL,"isBinary");var X9=new Ur("tag:yaml.org,2002:binary",{kind:"scalar",resolve:CL,construct:_L,predicate:wL,represent:kL}),Z9=Object.prototype.hasOwnProperty,Q9=Object.prototype.toString;function SL(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,Q9.call(a)!=="[object Object]")return!1;for(o in a)if(Z9.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}B(SL,"resolveYamlOmap");function TL(i){return i!==null?i:[]}B(TL,"constructYamlOmap");var J9=new Ur("tag:yaml.org,2002:omap",{kind:"sequence",resolve:SL,construct:TL}),t7=Object.prototype.toString;function EL(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],t7.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}B(EL,"resolveYamlPairs");function NL(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}B(NL,"constructYamlPairs");var e7=new Ur("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:EL,construct:NL}),i7=Object.prototype.hasOwnProperty;function AL(i){if(i===null)return!0;var e,r=i;for(e in r)if(i7.call(r,e)&&r[e]!==null)return!1;return!0}B(AL,"resolveYamlSet");function ML(i){return i!==null?i:{}}B(ML,"constructYamlSet");var r7=new Ur("tag:yaml.org,2002:set",{kind:"mapping",resolve:AL,construct:ML}),BL=Y9.extend({implicit:[K9,V9],explicit:[X9,J9,e7,r7]}),jo=Object.prototype.hasOwnProperty,vg=1,LL=2,OL=3,Cg=4,Gb=1,n7=2,J2=3,a7=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s7=/[\x85\u2028\u2029]/,o7=/[,\[\]\{\}]/,RL=/^(?:!|!!|![a-z\-]+!)$/i,DL=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function rv(i){return Object.prototype.toString.call(i)}B(rv,"_class");function va(i){return i===10||i===13}B(va,"is_EOL");function Oo(i){return i===9||i===32}B(Oo,"is_WHITE_SPACE");function tn(i){return i===9||i===32||i===10||i===13}B(tn,"is_WS_OR_EOL");function ml(i){return i===44||i===91||i===93||i===123||i===125}B(ml,"is_FLOW_INDICATOR");function jL(i){var e;return 48<=i&&i<=57?i-48:(e=i|32,97<=e&&e<=102?e-97+10:-1)}B(jL,"fromHexCode");function FL(i){return i===120?2:i===117?4:i===85?8:0}B(FL,"escapedHexLen");function IL(i){return 48<=i&&i<=57?i-48:-1}B(IL,"fromDecimalCode");function nv(i){return i===48?"\0":i===97?"\x07":i===98?"\b":i===116||i===9?" ":i===110?`
|
|
235
|
+
`: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":""}B(nv,"simpleEscapeSequence");function $L(i){return i<=65535?String.fromCharCode(i):String.fromCharCode((i-65536>>10)+55296,(i-65536&1023)+56320)}B($L,"charFromCodepoint");function tC(i,e,r){e==="__proto__"?Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):i[e]=r}B(tC,"setProperty");var zL=new Array(256),PL=new Array(256);for(al=0;al<256;al++)zL[al]=nv(al)?1:0,PL[al]=nv(al);var al;function qL(i,e){this.input=i,this.filename=e.filename||null,this.schema=e.schema||BL,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=[]}B(qL,"State$1");function eC(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=O9(r),new xn(e,r)}B(eC,"generateError");function ie(i,e){throw eC(i,e)}B(ie,"throwError");function vd(i,e){i.onWarning&&i.onWarning.call(null,eC(i,e))}B(vd,"throwWarning");var tT={YAML:B(function(e,r,n){var a,o,c;e.version!==null&&ie(e,"duplication of %YAML directive"),n.length!==1&&ie(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&ie(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&ie(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&vd(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:B(function(e,r,n){var a,o;n.length!==2&&ie(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],RL.test(a)||ie(e,"ill-formed tag handle (first argument) of the TAG directive"),jo.call(e.tagMap,a)&&ie(e,'there is a previously declared suffix for "'+a+'" tag handle'),DL.test(o)||ie(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ie(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function Ls(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||ie(i,"expected valid JSON character");else a7.test(h)&&ie(i,"the stream contains non-printable characters");i.result+=h}}B(Ls,"captureSegment");function av(i,e,r,n){var a,o,c,h;for(yr.isObject(r)||ie(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],jo.call(e,o)||(tC(e,o,r[o]),n[o]=!0)}B(av,"mergeMappings");function yl(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])&&ie(i,"nested arrays are not supported inside keys"),typeof a=="object"&&rv(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&rv(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)av(i,e,o[d],r);else av(i,e,o,r);else!i.json&&!jo.call(r,a)&&jo.call(e,a)&&(i.line=c||i.line,i.lineStart=h||i.lineStart,i.position=u||i.position,ie(i,"duplicated mapping key")),tC(e,a,o),delete r[a];return e}B(yl,"storeMappingPair");function nm(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++):ie(i,"a line break is expected"),i.line+=1,i.lineStart=i.position,i.firstTabInLine=-1}B(nm,"readLineBreak");function Ji(i,e,r){for(var n=0,a=i.input.charCodeAt(i.position);a!==0;){for(;Oo(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(nm(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&&vd(i,"deficient indentation"),n}B(Ji,"skipSeparationSpace");function Ud(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||tn(r)))}B(Ud,"testDocumentSeparator");function am(i,e){e===1?i.result+=" ":e>1&&(i.result+=yr.repeat(`
|
|
236
|
+
`,e-1))}B(am,"writeFoldedLines");function UL(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),tn(y)||ml(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),tn(a)||r&&ml(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),tn(a)||r&&ml(a))break}else if(y===35){if(n=i.input.charCodeAt(i.position-1),tn(n))break}else{if(i.position===i.lineStart&&Ud(i)||r&&ml(y))break;if(va(y))if(u=i.line,d=i.lineStart,f=i.lineIndent,Ji(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&&(Ls(i,o,c,!1),am(i,i.line-u),o=c=i.position,h=!1),Oo(y)||(c=i.position+1),y=i.input.charCodeAt(++i.position)}return Ls(i,o,c,!1),i.result?!0:(i.kind=g,i.result=x,!1)}B(UL,"readPlainScalar");function HL(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(Ls(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)?(Ls(i,n,a,!0),am(i,Ji(i,!1,e)),n=a=i.position):i.position===i.lineStart&&Ud(i)?ie(i,"unexpected end of the document within a single quoted scalar"):(i.position++,a=i.position);ie(i,"unexpected end of the stream within a single quoted scalar")}B(HL,"readSingleQuotedScalar");function WL(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 Ls(i,r,i.position,!0),i.position++,!0;if(h===92){if(Ls(i,r,i.position,!0),h=i.input.charCodeAt(++i.position),va(h))Ji(i,!1,e);else if(h<256&&zL[h])i.result+=PL[h],i.position++;else if((c=FL(h))>0){for(a=c,o=0;a>0;a--)h=i.input.charCodeAt(++i.position),(c=jL(h))>=0?o=(o<<4)+c:ie(i,"expected hexadecimal character");i.result+=$L(o),i.position++}else ie(i,"unknown escape sequence");r=n=i.position}else va(h)?(Ls(i,r,n,!0),am(i,Ji(i,!1,e)),r=n=i.position):i.position===i.lineStart&&Ud(i)?ie(i,"unexpected end of the document within a double quoted scalar"):(i.position++,n=i.position)}ie(i,"unexpected end of the stream within a double quoted scalar")}B(WL,"readDoubleQuotedScalar");function GL(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(Ji(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&&ie(i,"expected the node content, but found ','"):ie(i,"missed comma between flow collection entries"),_=C=k=null,g=x=!1,T===63&&(d=i.input.charCodeAt(i.position+1),tn(d)&&(g=x=!0,i.position++,Ji(i,!0,e))),n=i.line,a=i.lineStart,o=i.position,Fl(i,e,vg,!1,!0),_=i.tag,C=i.result,Ji(i,!0,e),T=i.input.charCodeAt(i.position),(x||i.line===n)&&T===58&&(g=!0,T=i.input.charCodeAt(++i.position),Ji(i,!0,e),Fl(i,e,vg,!1,!0),k=i.result),y?yl(i,h,v,_,C,k,n,a,o):g?h.push(yl(i,null,v,_,C,k,n,a,o)):h.push(C),Ji(i,!0,e),T=i.input.charCodeAt(i.position),T===44?(r=!0,T=i.input.charCodeAt(++i.position)):r=!1}ie(i,"unexpected end of the stream within a flow collection")}B(GL,"readFlowCollection");function YL(i,e){var r,n,a=Gb,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)Gb===a?a=g===43?J2:n7:ie(i,"repeat of a chomping mode identifier");else if((f=IL(g))>=0)f===0?ie(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?ie(i,"repeat of an indentation width identifier"):(h=e+f-1,c=!0);else break;if(Oo(g)){do g=i.input.charCodeAt(++i.position);while(Oo(g));if(g===35)do g=i.input.charCodeAt(++i.position);while(!va(g)&&g!==0)}for(;g!==0;){for(nm(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===J2?i.result+=yr.repeat(`
|
|
237
|
+
`,o?1+u:u):a===Gb&&o&&(i.result+=`
|
|
238
|
+
`);break}for(n?Oo(g)?(d=!0,i.result+=yr.repeat(`
|
|
239
|
+
`,o?1+u:u)):d?(d=!1,i.result+=yr.repeat(`
|
|
240
|
+
`,u+1)):u===0?o&&(i.result+=" "):i.result+=yr.repeat(`
|
|
241
|
+
`,u):i.result+=yr.repeat(`
|
|
242
|
+
`,o?1+u:u),o=!0,c=!0,u=0,r=i.position;!va(g)&&g!==0;)g=i.input.charCodeAt(++i.position);Ls(i,r,i.position,!1)}return!0}B(YL,"readBlockScalar");function sv(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,ie(i,"tab characters must not be used in indentation")),!(u!==45||(c=i.input.charCodeAt(i.position+1),!tn(c))));){if(h=!0,i.position++,Ji(i,!0,-1)&&i.lineIndent<=e){o.push(null),u=i.input.charCodeAt(i.position);continue}if(r=i.line,Fl(i,e,OL,!1,!0),o.push(i.result),Ji(i,!0,-1),u=i.input.charCodeAt(i.position),(i.line===r||i.lineIndent>e)&&u!==0)ie(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}B(sv,"readBlockSequence");function KL(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,ie(i,"tab characters must not be used in indentation")),n=i.input.charCodeAt(i.position+1),o=i.line,(T===63||T===58)&&tn(n))T===63?(_&&(yl(i,g,x,y,v,null,c,h,u),y=v=C=null),k=!0,_=!0,a=!0):_?(_=!1,a=!0):ie(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,!Fl(i,r,LL,!1,!0))break;if(i.line===o){for(T=i.input.charCodeAt(i.position);Oo(T);)T=i.input.charCodeAt(++i.position);if(T===58)T=i.input.charCodeAt(++i.position),tn(T)||ie(i,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(yl(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)ie(i,"can not read an implicit mapping pair; a colon is missed");else return i.tag=d,i.anchor=f,!0}else if(k)ie(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),Fl(i,e,Cg,!0,a)&&(_?v=i.result:C=i.result),_||(yl(i,g,x,y,v,C,c,h,u),y=v=C=null),Ji(i,!0,-1),T=i.input.charCodeAt(i.position)),(i.line===o||i.lineIndent>e)&&T!==0)ie(i,"bad indentation of a mapping entry");else if(i.lineIndent<e)break}return _&&yl(i,g,x,y,v,null,c,h,u),k&&(i.tag=d,i.anchor=f,i.kind="mapping",i.result=g),k}B(KL,"readBlockMapping");function VL(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&&ie(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)):ie(i,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!tn(c);)c===33&&(n?ie(i,"tag suffix cannot contain exclamation marks"):(a=i.input.slice(e-1,i.position+1),RL.test(a)||ie(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),o7.test(o)&&ie(i,"tag suffix cannot contain flow indicator characters")}o&&!DL.test(o)&&ie(i,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ie(i,"tag name is malformed: "+o)}return r?i.tag=o:jo.call(i.tagMap,a)?i.tag=i.tagMap[a]+o:a==="!"?i.tag="!"+o:a==="!!"?i.tag="tag:yaml.org,2002:"+o:ie(i,'undeclared tag handle "'+a+'"'),!0}B(VL,"readTagProperty");function XL(i){var e,r;if(r=i.input.charCodeAt(i.position),r!==38)return!1;for(i.anchor!==null&&ie(i,"duplication of an anchor property"),r=i.input.charCodeAt(++i.position),e=i.position;r!==0&&!tn(r)&&!ml(r);)r=i.input.charCodeAt(++i.position);return i.position===e&&ie(i,"name of an anchor node must contain at least one character"),i.anchor=i.input.slice(e,i.position),!0}B(XL,"readAnchorProperty");function ZL(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&&!tn(n)&&!ml(n);)n=i.input.charCodeAt(++i.position);return i.position===e&&ie(i,"name of an alias node must contain at least one character"),r=i.input.slice(e,i.position),jo.call(i.anchorMap,r)||ie(i,'unidentified alias "'+r+'"'),i.result=i.anchorMap[r],Ji(i,!0,-1),!0}B(ZL,"readAlias");function Fl(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=Cg===r||OL===r,n&&Ji(i,!0,-1)&&(d=!0,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)),u===1)for(;VL(i)||XL(i);)Ji(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||Cg===r)&&(vg===r||LL===r?C=e:C=e+1,_=i.position-i.lineStart,u===1?h&&(sv(i,_)||KL(i,_,C))||GL(i,C)?f=!0:(c&&YL(i,C)||HL(i,C)||WL(i,C)?f=!0:ZL(i)?(f=!0,(i.tag!==null||i.anchor!==null)&&ie(i,"alias node should not have any properties")):UL(i,C,vg===r)&&(f=!0,i.tag===null&&(i.tag="?")),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):u===0&&(f=h&&sv(i,_))),i.tag===null)i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);else if(i.tag==="?"){for(i.result!==null&&i.kind!=="scalar"&&ie(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(jo.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||ie(i,"unknown tag !<"+i.tag+">"),i.result!==null&&v.kind!==i.kind&&ie(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)):ie(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}B(Fl,"composeNode");function QL(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&&(Ji(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&&!tn(c);)c=i.input.charCodeAt(++i.position);for(n=i.input.slice(r,i.position),a=[],n.length<1&&ie(i,"directive name must not be less than one character in length");c!==0;){for(;Oo(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&&!tn(c);)c=i.input.charCodeAt(++i.position);a.push(i.input.slice(r,i.position))}c!==0&&nm(i),jo.call(tT,n)?tT[n](i,n,a):vd(i,'unknown document directive "'+n+'"')}if(Ji(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,Ji(i,!0,-1)):o&&ie(i,"directives end mark is expected"),Fl(i,i.lineIndent-1,Cg,!1,!0),Ji(i,!0,-1),i.checkLineBreaks&&s7.test(i.input.slice(e,i.position))&&vd(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&Ud(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,Ji(i,!0,-1));return}if(i.position<i.length-1)ie(i,"end of the stream or a document separator is expected");else return}B(QL,"readDocument");function iC(i,e){i=String(i),e=e||{},i.length!==0&&(i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
243
|
+
`),i.charCodeAt(0)===65279&&(i=i.slice(1)));var r=new qL(i,e),n=i.indexOf("\0");for(n!==-1&&(r.position=n,ie(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;)QL(r);return r.documents}B(iC,"loadDocuments");function l7(i,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=iC(i,r);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}B(l7,"loadAll$1");function JL(i,e){var r=iC(i,e);if(r.length!==0){if(r.length===1)return r[0];throw new xn("expected a single document in the stream, but found more")}}B(JL,"load$1");var c7=JL,h7={load:c7},tO=Object.prototype.toString,eO=Object.prototype.hasOwnProperty,rC=65279,u7=9,Cd=10,d7=13,f7=32,p7=33,g7=34,ov=35,m7=37,y7=38,b7=39,x7=42,iO=44,v7=45,_g=58,C7=61,_7=62,k7=63,w7=64,rO=91,nO=93,S7=96,aO=123,T7=124,sO=125,Wr={};Wr[0]="\\0";Wr[7]="\\a";Wr[8]="\\b";Wr[9]="\\t";Wr[10]="\\n";Wr[11]="\\v";Wr[12]="\\f";Wr[13]="\\r";Wr[27]="\\e";Wr[34]='\\"';Wr[92]="\\\\";Wr[133]="\\N";Wr[160]="\\_";Wr[8232]="\\L";Wr[8233]="\\P";var E7=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N7=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function oO(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&&eO.call(u.styleAliases,h)&&(h=u.styleAliases[h]),r[c]=h;return r}B(oO,"compileStyleMap");function lO(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 xn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+yr.repeat("0",n-e.length)+e}B(lO,"encodeHex");var A7=1,_d=2;function cO(i){this.schema=i.schema||BL,this.indent=Math.max(1,i.indent||2),this.noArrayIndent=i.noArrayIndent||!1,this.skipInvalid=i.skipInvalid||!1,this.flowLevel=yr.isNothing(i.flowLevel)?-1:i.flowLevel,this.styleMap=oO(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==='"'?_d:A7,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}B(cO,"State");function lv(i,e){for(var r=yr.repeat(" ",e),n=0,a=-1,o="",c,h=i.length;n<h;)a=i.indexOf(`
|
|
244
|
+
`,n),a===-1?(c=i.slice(n),n=h):(c=i.slice(n,a+1),n=a+1),c.length&&c!==`
|
|
245
|
+
`&&(o+=r),o+=c;return o}B(lv,"indentString");function kg(i,e){return`
|
|
246
|
+
`+yr.repeat(" ",i.indent*e)}B(kg,"generateNextLine");function hO(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}B(hO,"testImplicitResolving");function kd(i){return i===f7||i===u7}B(kd,"isWhitespace");function bh(i){return 32<=i&&i<=126||161<=i&&i<=55295&&i!==8232&&i!==8233||57344<=i&&i<=65533&&i!==rC||65536<=i&&i<=1114111}B(bh,"isPrintable");function cv(i){return bh(i)&&i!==rC&&i!==d7&&i!==Cd}B(cv,"isNsCharOrWhitespace");function hv(i,e,r){var n=cv(i),a=n&&!kd(i);return(r?n:n&&i!==iO&&i!==rO&&i!==nO&&i!==aO&&i!==sO)&&i!==ov&&!(e===_g&&!a)||cv(e)&&!kd(e)&&i===ov||e===_g&&a}B(hv,"isPlainSafe");function uO(i){return bh(i)&&i!==rC&&!kd(i)&&i!==v7&&i!==k7&&i!==_g&&i!==iO&&i!==rO&&i!==nO&&i!==aO&&i!==sO&&i!==ov&&i!==y7&&i!==x7&&i!==p7&&i!==T7&&i!==C7&&i!==_7&&i!==b7&&i!==g7&&i!==m7&&i!==w7&&i!==S7}B(uO,"isPlainSafeFirst");function dO(i){return!kd(i)&&i!==_g}B(dO,"isPlainSafeLast");function Fc(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}B(Fc,"codePointAt");function nC(i){var e=/^\n* /;return e.test(i)}B(nC,"needIndentIndicator");var fO=1,uv=2,pO=3,gO=4,Oc=5;function mO(i,e,r,n,a,o,c,h){var u,d=0,f=null,g=!1,x=!1,y=n!==-1,v=-1,C=uO(Fc(i,0))&&dO(Fc(i,i.length-1));if(e||c)for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=Fc(i,u),!bh(d))return Oc;C=C&&hv(d,f,h),f=d}else{for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=Fc(i,u),d===Cd)g=!0,y&&(x=x||u-v-1>n&&i[v+1]!==" ",v=u);else if(!bh(d))return Oc;C=C&&hv(d,f,h),f=d}x=x||y&&u-v-1>n&&i[v+1]!==" "}return!g&&!x?C&&!c&&!a(i)?fO:o===_d?Oc:uv:r>9&&nC(i)?Oc:c?o===_d?Oc:uv:x?gO:pO}B(mO,"chooseScalarStyle");function yO(i,e,r,n,a){i.dump=(function(){if(e.length===0)return i.quotingType===_d?'""':"''";if(!i.noCompatMode&&(E7.indexOf(e)!==-1||N7.test(e)))return i.quotingType===_d?'"'+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 hO(i,d)}switch(B(u,"testAmbiguity"),mO(e,h,i.indent,c,u,i.quotingType,i.forceQuotes&&!n,a)){case fO:return e;case uv:return"'"+e.replace(/'/g,"''")+"'";case pO:return"|"+dv(e,i.indent)+fv(lv(e,o));case gO:return">"+dv(e,i.indent)+fv(lv(bO(e,c),o));case Oc:return'"'+xO(e)+'"';default:throw new xn("impossible error: invalid scalar style")}})()}B(yO,"writeScalar");function dv(i,e){var r=nC(i)?String(e):"",n=i[i.length-1]===`
|
|
247
|
+
`,a=n&&(i[i.length-2]===`
|
|
248
|
+
`||i===`
|
|
249
|
+
`),o=a?"+":n?"":"-";return r+o+`
|
|
250
|
+
`}B(dv,"blockHeader");function fv(i){return i[i.length-1]===`
|
|
251
|
+
`?i.slice(0,-1):i}B(fv,"dropEndingNewline");function bO(i,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var d=i.indexOf(`
|
|
252
|
+
`);return d=d!==-1?d:i.length,r.lastIndex=d,pv(i.slice(0,d),e)})(),a=i[0]===`
|
|
253
|
+
`||i[0]===" ",o,c;c=r.exec(i);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
|
|
254
|
+
`:"")+pv(u,e),a=o}return n}B(bO,"foldString");function pv(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+=`
|
|
255
|
+
`+i.slice(a,o),a=o+1),c=h;return u+=`
|
|
256
|
+
`,i.length-a>e&&c>a?u+=i.slice(a,c)+`
|
|
257
|
+
`+i.slice(c+1):u+=i.slice(a),u.slice(1)}B(pv,"foldLine");function xO(i){for(var e="",r=0,n,a=0;a<i.length;r>=65536?a+=2:a++)r=Fc(i,a),n=Wr[r],!n&&bh(r)?(e+=i[a],r>=65536&&(e+=i[a+1])):e+=n||lO(r);return e}B(xO,"escapeString");function vO(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)),(Ya(i,e,h,!1,!1)||typeof h>"u"&&Ya(i,e,null,!1,!1))&&(n!==""&&(n+=","+(i.condenseFlow?"":" ")),n+=i.dump);i.tag=a,i.dump="["+n+"]"}B(vO,"writeFlowSequence");function gv(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)),(Ya(i,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Ya(i,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=kg(i,e)),i.dump&&Cd===i.dump.charCodeAt(0)?a+="-":a+="- ",a+=i.dump);i.tag=o,i.dump=a||"[]"}B(gv,"writeBlockSequence");function CO(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)),Ya(i,e,u,!1,!1)&&(i.dump.length>1024&&(f+="? "),f+=i.dump+(i.condenseFlow?'"':"")+":"+(i.condenseFlow?"":" "),Ya(i,e,d,!1,!1)&&(f+=i.dump,n+=f));i.tag=a,i.dump="{"+n+"}"}B(CO,"writeFlowMapping");function _O(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 xn("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)x="",(!n||a!=="")&&(x+=kg(i,e)),d=c[h],f=r[d],i.replacer&&(f=i.replacer.call(r,d,f)),Ya(i,e+1,d,!0,!0,!0)&&(g=i.tag!==null&&i.tag!=="?"||i.dump&&i.dump.length>1024,g&&(i.dump&&Cd===i.dump.charCodeAt(0)?x+="?":x+="? "),x+=i.dump,g&&(x+=kg(i,e)),Ya(i,e+1,f,!0,g)&&(i.dump&&Cd===i.dump.charCodeAt(0)?x+=":":x+=": ",x+=i.dump,a+=x));i.tag=o,i.dump=a||"{}"}B(_O,"writeBlockMapping");function mv(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,tO.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(eO.call(h.represent,u))n=h.represent[u](e,u);else throw new xn("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');i.dump=n}return!0}return!1}B(mv,"detectType");function Ya(i,e,r,n,a,o,c){i.tag=null,i.dump=r,mv(i,r,!1)||mv(i,r,!0);var h=tO.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?(_O(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(CO(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?gv(i,e-1,i.dump,a):gv(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(vO(i,e,i.dump),x&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object String]")i.tag!=="?"&&yO(i,i.dump,e,o,u);else{if(h==="[object Undefined]")return!1;if(i.skipInvalid)return!1;throw new xn("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}B(Ya,"writeNode");function kO(i,e){var r=[],n=[],a,o;for(wg(i,r,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(o)}B(kO,"getDuplicateReferences");function wg(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)wg(i[a],e,r);else for(n=Object.keys(i),a=0,o=n.length;a<o;a+=1)wg(i[n[a]],e,r)}B(wg,"inspectNode");function M7(i,e){e=e||{};var r=new cO(e);r.noRefs||kO(i,r);var n=i;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ya(r,0,n,!0,!0)?r.dump+`
|
|
258
|
+
`:""}B(M7,"dump$1");function B7(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.")}}B(B7,"renamed");var L7=pL,O7=h7.load;/*! Bundled license information:
|
|
259
|
+
|
|
260
|
+
js-yaml/dist/js-yaml.mjs:
|
|
261
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
262
|
+
*/var wu=B((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"),qr={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},eT={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ku(i,e){if(i===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};i=Li(i),e=Li(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}}B(Ku,"calculateDeltaAndAngle");var Li=B(i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,"pointTransformer"),R7=B(i=>({x:B(function(e,r,n){let a=0;const o=Li(n[0]).x<Li(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(qr,i.arrowTypeStart)){const{angle:y,deltaX:v}=Ku(n[0],n[1]);a=qr[i.arrowTypeStart]*Math.cos(y)*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(qr,i.arrowTypeEnd)){const{angle:y,deltaX:v}=Ku(n[n.length-1],n[n.length-2]);a=qr[i.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(Li(e).x-Li(n[n.length-1]).x),h=Math.abs(Li(e).y-Li(n[n.length-1]).y),u=Math.abs(Li(e).x-Li(n[0]).x),d=Math.abs(Li(e).y-Li(n[0]).y),f=qr[i.arrowTypeStart],g=qr[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 Li(e).x+a},"x"),y:B(function(e,r,n){let a=0;const o=Li(n[0]).y<Li(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(qr,i.arrowTypeStart)){const{angle:y,deltaY:v}=Ku(n[0],n[1]);a=qr[i.arrowTypeStart]*Math.abs(Math.sin(y))*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(qr,i.arrowTypeEnd)){const{angle:y,deltaY:v}=Ku(n[n.length-1],n[n.length-2]);a=qr[i.arrowTypeEnd]*Math.abs(Math.sin(y))*(v>=0?1:-1)}const c=Math.abs(Li(e).y-Li(n[n.length-1]).y),h=Math.abs(Li(e).x-Li(n[n.length-1]).x),u=Math.abs(Li(e).y-Li(n[0]).y),d=Math.abs(Li(e).x-Li(n[0]).x),f=qr[i.arrowTypeStart],g=qr[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 Li(e).y+a},"y")}),"getLineFunctionsWithOffset"),bp={},pr={},iT;function D7(){return iT||(iT=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.BLANK_URL=pr.relativeFirstCharacters=pr.whitespaceEscapeCharsRegex=pr.urlSchemeRegex=pr.ctrlCharactersRegex=pr.htmlCtrlEntityRegex=pr.htmlEntitiesRegex=pr.invalidProtocolRegex=void 0,pr.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,pr.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,pr.htmlCtrlEntityRegex=/&(newline|tab);/gi,pr.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,pr.urlSchemeRegex=/^.+(:|:)/gim,pr.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,pr.relativeFirstCharacters=[".","/"],pr.BLANK_URL="about:blank"),pr}var rT;function j7(){if(rT)return bp;rT=1,Object.defineProperty(bp,"__esModule",{value:!0}),bp.sanitizeUrl=o;var i=D7();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 bp}var F7=j7(),wO=typeof global=="object"&&global&&global.Object===Object&&global,I7=typeof self=="object"&&self&&self.Object===Object&&self,Ta=wO||I7||Function("return this")(),Sg=Ta.Symbol,SO=Object.prototype,$7=SO.hasOwnProperty,z7=SO.toString,Su=Sg?Sg.toStringTag:void 0;function P7(i){var e=$7.call(i,Su),r=i[Su];try{i[Su]=void 0;var n=!0}catch{}var a=z7.call(i);return n&&(e?i[Su]=r:delete i[Su]),a}var q7=Object.prototype,U7=q7.toString;function H7(i){return U7.call(i)}var W7="[object Null]",G7="[object Undefined]",nT=Sg?Sg.toStringTag:void 0;function Hl(i){return i==null?i===void 0?G7:W7:nT&&nT in Object(i)?P7(i):H7(i)}function ka(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var Y7="[object AsyncFunction]",K7="[object Function]",V7="[object GeneratorFunction]",X7="[object Proxy]";function aC(i){if(!ka(i))return!1;var e=Hl(i);return e==K7||e==V7||e==Y7||e==X7}var Yb=Ta["__core-js_shared__"],aT=(function(){var i=/[^.]+$/.exec(Yb&&Yb.keys&&Yb.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function Z7(i){return!!aT&&aT in i}var Q7=Function.prototype,J7=Q7.toString;function Wl(i){if(i!=null){try{return J7.call(i)}catch{}try{return i+""}catch{}}return""}var tU=/[\\^$.*+?()[\]{}|]/g,eU=/^\[object .+?Constructor\]$/,iU=Function.prototype,rU=Object.prototype,nU=iU.toString,aU=rU.hasOwnProperty,sU=RegExp("^"+nU.call(aU).replace(tU,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oU(i){if(!ka(i)||Z7(i))return!1;var e=aC(i)?sU:eU;return e.test(Wl(i))}function lU(i,e){return i==null?void 0:i[e]}function Gl(i,e){var r=lU(i,e);return oU(r)?r:void 0}var wd=Gl(Object,"create");function cU(){this.__data__=wd?wd(null):{},this.size=0}function hU(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var uU="__lodash_hash_undefined__",dU=Object.prototype,fU=dU.hasOwnProperty;function pU(i){var e=this.__data__;if(wd){var r=e[i];return r===uU?void 0:r}return fU.call(e,i)?e[i]:void 0}var gU=Object.prototype,mU=gU.hasOwnProperty;function yU(i){var e=this.__data__;return wd?e[i]!==void 0:mU.call(e,i)}var bU="__lodash_hash_undefined__";function xU(i,e){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=wd&&e===void 0?bU:e,this}function Il(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])}}Il.prototype.clear=cU;Il.prototype.delete=hU;Il.prototype.get=pU;Il.prototype.has=yU;Il.prototype.set=xU;function vU(){this.__data__=[],this.size=0}function sm(i,e){return i===e||i!==i&&e!==e}function om(i,e){for(var r=i.length;r--;)if(sm(i[r][0],e))return r;return-1}var CU=Array.prototype,_U=CU.splice;function kU(i){var e=this.__data__,r=om(e,i);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():_U.call(e,r,1),--this.size,!0}function wU(i){var e=this.__data__,r=om(e,i);return r<0?void 0:e[r][1]}function SU(i){return om(this.__data__,i)>-1}function TU(i,e){var r=this.__data__,n=om(r,i);return n<0?(++this.size,r.push([i,e])):r[n][1]=e,this}function Is(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])}}Is.prototype.clear=vU;Is.prototype.delete=kU;Is.prototype.get=wU;Is.prototype.has=SU;Is.prototype.set=TU;var Sd=Gl(Ta,"Map");function EU(){this.size=0,this.__data__={hash:new Il,map:new(Sd||Is),string:new Il}}function NU(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function lm(i,e){var r=i.__data__;return NU(e)?r[typeof e=="string"?"string":"hash"]:r.map}function AU(i){var e=lm(this,i).delete(i);return this.size-=e?1:0,e}function MU(i){return lm(this,i).get(i)}function BU(i){return lm(this,i).has(i)}function LU(i,e){var r=lm(this,i),n=r.size;return r.set(i,e),this.size+=r.size==n?0:1,this}function $o(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])}}$o.prototype.clear=EU;$o.prototype.delete=AU;$o.prototype.get=MU;$o.prototype.has=BU;$o.prototype.set=LU;var OU="Expected a function";function Hd(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(OU);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(Hd.Cache||$o),r}Hd.Cache=$o;function RU(){this.__data__=new Is,this.size=0}function DU(i){var e=this.__data__,r=e.delete(i);return this.size=e.size,r}function jU(i){return this.__data__.get(i)}function FU(i){return this.__data__.has(i)}var IU=200;function $U(i,e){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!Sd||n.length<IU-1)return n.push([i,e]),this.size=++r.size,this;r=this.__data__=new $o(n)}return r.set(i,e),this.size=r.size,this}function kh(i){var e=this.__data__=new Is(i);this.size=e.size}kh.prototype.clear=RU;kh.prototype.delete=DU;kh.prototype.get=jU;kh.prototype.has=FU;kh.prototype.set=$U;var Tg=(function(){try{var i=Gl(Object,"defineProperty");return i({},"",{}),i}catch{}})();function sC(i,e,r){e=="__proto__"&&Tg?Tg(i,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[e]=r}function yv(i,e,r){(r!==void 0&&!sm(i[e],r)||r===void 0&&!(e in i))&&sC(i,e,r)}function zU(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 PU=zU(),TO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sT=TO&&typeof module=="object"&&module&&!module.nodeType&&module,qU=sT&&sT.exports===TO,oT=qU?Ta.Buffer:void 0,lT=oT?oT.allocUnsafe:void 0;function UU(i,e){if(e)return i.slice();var r=i.length,n=lT?lT(r):new i.constructor(r);return i.copy(n),n}var cT=Ta.Uint8Array;function HU(i){var e=new i.constructor(i.byteLength);return new cT(e).set(new cT(i)),e}function WU(i,e){var r=e?HU(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}function GU(i,e){var r=-1,n=i.length;for(e||(e=Array(n));++r<n;)e[r]=i[r];return e}var hT=Object.create,YU=(function(){function i(){}return function(e){if(!ka(e))return{};if(hT)return hT(e);i.prototype=e;var r=new i;return i.prototype=void 0,r}})();function EO(i,e){return function(r){return i(e(r))}}var NO=EO(Object.getPrototypeOf,Object),KU=Object.prototype;function cm(i){var e=i&&i.constructor,r=typeof e=="function"&&e.prototype||KU;return i===r}function VU(i){return typeof i.constructor=="function"&&!cm(i)?YU(NO(i)):{}}function wh(i){return i!=null&&typeof i=="object"}var XU="[object Arguments]";function uT(i){return wh(i)&&Hl(i)==XU}var AO=Object.prototype,ZU=AO.hasOwnProperty,QU=AO.propertyIsEnumerable,Eg=uT((function(){return arguments})())?uT:function(i){return wh(i)&&ZU.call(i,"callee")&&!QU.call(i,"callee")},Ng=Array.isArray,JU=9007199254740991;function MO(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=JU}function hm(i){return i!=null&&MO(i.length)&&!aC(i)}function tH(i){return wh(i)&&hm(i)}function eH(){return!1}var BO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,dT=BO&&typeof module=="object"&&module&&!module.nodeType&&module,iH=dT&&dT.exports===BO,fT=iH?Ta.Buffer:void 0,rH=fT?fT.isBuffer:void 0,oC=rH||eH,nH="[object Object]",aH=Function.prototype,sH=Object.prototype,LO=aH.toString,oH=sH.hasOwnProperty,lH=LO.call(Object);function cH(i){if(!wh(i)||Hl(i)!=nH)return!1;var e=NO(i);if(e===null)return!0;var r=oH.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&LO.call(r)==lH}var hH="[object Arguments]",uH="[object Array]",dH="[object Boolean]",fH="[object Date]",pH="[object Error]",gH="[object Function]",mH="[object Map]",yH="[object Number]",bH="[object Object]",xH="[object RegExp]",vH="[object Set]",CH="[object String]",_H="[object WeakMap]",kH="[object ArrayBuffer]",wH="[object DataView]",SH="[object Float32Array]",TH="[object Float64Array]",EH="[object Int8Array]",NH="[object Int16Array]",AH="[object Int32Array]",MH="[object Uint8Array]",BH="[object Uint8ClampedArray]",LH="[object Uint16Array]",OH="[object Uint32Array]",Ei={};Ei[SH]=Ei[TH]=Ei[EH]=Ei[NH]=Ei[AH]=Ei[MH]=Ei[BH]=Ei[LH]=Ei[OH]=!0;Ei[hH]=Ei[uH]=Ei[kH]=Ei[dH]=Ei[wH]=Ei[fH]=Ei[pH]=Ei[gH]=Ei[mH]=Ei[yH]=Ei[bH]=Ei[xH]=Ei[vH]=Ei[CH]=Ei[_H]=!1;function RH(i){return wh(i)&&MO(i.length)&&!!Ei[Hl(i)]}function DH(i){return function(e){return i(e)}}var OO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sd=OO&&typeof module=="object"&&module&&!module.nodeType&&module,jH=sd&&sd.exports===OO,Kb=jH&&wO.process,pT=(function(){try{var i=sd&&sd.require&&sd.require("util").types;return i||Kb&&Kb.binding&&Kb.binding("util")}catch{}})(),gT=pT&&pT.isTypedArray,lC=gT?DH(gT):RH;function bv(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}var FH=Object.prototype,IH=FH.hasOwnProperty;function $H(i,e,r){var n=i[e];(!(IH.call(i,e)&&sm(n,r))||r===void 0&&!(e in i))&&sC(i,e,r)}function zH(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?sC(r,h,u):$H(r,h,u)}return r}function PH(i,e){for(var r=-1,n=Array(i);++r<i;)n[r]=e(r);return n}var qH=9007199254740991,UH=/^(?:0|[1-9]\d*)$/;function RO(i,e){var r=typeof i;return e=e??qH,!!e&&(r=="number"||r!="symbol"&&UH.test(i))&&i>-1&&i%1==0&&i<e}var HH=Object.prototype,WH=HH.hasOwnProperty;function GH(i,e){var r=Ng(i),n=!r&&Eg(i),a=!r&&!n&&oC(i),o=!r&&!n&&!a&&lC(i),c=r||n||a||o,h=c?PH(i.length,String):[],u=h.length;for(var d in i)(e||WH.call(i,d))&&!(c&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||RO(d,u)))&&h.push(d);return h}function YH(i){var e=[];if(i!=null)for(var r in Object(i))e.push(r);return e}var KH=Object.prototype,VH=KH.hasOwnProperty;function XH(i){if(!ka(i))return YH(i);var e=cm(i),r=[];for(var n in i)n=="constructor"&&(e||!VH.call(i,n))||r.push(n);return r}function DO(i){return hm(i)?GH(i,!0):XH(i)}function ZH(i){return zH(i,DO(i))}function QH(i,e,r,n,a,o,c){var h=bv(i,r),u=bv(e,r),d=c.get(u);if(d){yv(i,r,d);return}var f=o?o(h,u,r+"",i,e,c):void 0,g=f===void 0;if(g){var x=Ng(u),y=!x&&oC(u),v=!x&&!y&&lC(u);f=u,x||y||v?Ng(h)?f=h:tH(h)?f=GU(h):y?(g=!1,f=UU(u,!0)):v?(g=!1,f=WU(u,!0)):f=[]:cH(u)||Eg(u)?(f=h,Eg(h)?f=ZH(h):(!ka(h)||aC(h))&&(f=VU(u))):g=!1}g&&(c.set(u,f),a(f,u,n,o,c),c.delete(u)),yv(i,r,f)}function jO(i,e,r,n,a){i!==e&&PU(e,function(o,c){if(a||(a=new kh),ka(o))QH(i,e,c,r,jO,n,a);else{var h=n?n(bv(i,c),o,c+"",i,e,a):void 0;h===void 0&&(h=o),yv(i,c,h)}},DO)}function FO(i){return i}function JH(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)}var mT=Math.max;function tW(i,e,r){return e=mT(e===void 0?i.length-1:e,0),function(){for(var n=arguments,a=-1,o=mT(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),JH(i,this,h)}}function eW(i){return function(){return i}}var iW=Tg?function(i,e){return Tg(i,"toString",{configurable:!0,enumerable:!1,value:eW(e),writable:!0})}:FO,rW=800,nW=16,aW=Date.now;function sW(i){var e=0,r=0;return function(){var n=aW(),a=nW-(n-r);if(r=n,a>0){if(++e>=rW)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}var oW=sW(iW);function lW(i,e){return oW(tW(i,e,FO),i+"")}function cW(i,e,r){if(!ka(r))return!1;var n=typeof e;return(n=="number"?hm(r)&&RO(e,r.length):n=="string"&&e in r)?sm(r[e],i):!1}function hW(i){return lW(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&&cW(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 uW=hW(function(i,e,r){jO(i,e,r)}),dW="",fW={curveBasis:ev,curveBasisClosed:u9,curveBasisOpen:d9,curveBumpX:kB,curveBumpY:wB,curveBundle:f9,curveCardinalClosed:p9,curveCardinalOpen:g9,curveCardinal:NB,curveCatmullRomClosed:m9,curveCatmullRomOpen:y9,curveCatmullRom:MB,curveLinear:ad,curveLinearClosed:b9,curveMonotoneX:jB,curveMonotoneY:FB,curveNatural:$B,curveStep:zB,curveStepAfter:qB,curveStepBefore:PB},pW=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,gW=B(function(i,e){const r=IO(i,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const c=r.map(h=>h.args);ag(c),n=mr(n,[...c])}else n=r.args;if(!n)return;let a=A1(i,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),IO=B(function(i,e=null){var r,n;try{const a=new RegExp(`[%]{2}(?![{]${pW.source})(?=[}][%]{2}).*
|
|
263
|
+
`,"ig");i=i.trim().replace(a,"").replace(/'/gm,'"'),Nt.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${i}`);let o;const c=[];for(;(o=rd.exec(i))!==null;)if(o.index===rd.lastIndex&&rd.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 Nt.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${i}'`),{type:void 0,args:null}}},"detectDirective"),mW=B(function(i){return i.replace(rd,"")},"removeDirectives"),yW=B(function(i,e){for(const[r,n]of e.entries())if(n.match(i))return r;return-1},"isSubstringInArray");function cC(i,e){if(!i)return e;const r=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return fW[r]??e}B(cC,"interpolateToCurve");function $O(i,e){const r=i.trim();if(r)return e.securityLevel!=="loose"?F7.sanitizeUrl(r):r}B($O,"formatUrl");var bW=B((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){Nt.error(`Function name: ${i} not found in window`);return}o[a](...e)},"runFunc");function hC(i,e){return!i||!e?0:Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}B(hC,"distance");function zO(i){let e,r=0;i.forEach(a=>{r+=hC(a,e),e=a});const n=r/2;return uC(i,n)}B(zO,"traverseEdge");function PO(i){return i.length===1?i[0]:zO(i)}B(PO,"calcLabelPosition");var yT=B((i,e=2)=>{const r=Math.pow(10,e);return Math.round(i*r)/r},"roundNumber"),uC=B((i,e)=>{let r,n=e;for(const a of i){if(r){const o=hC(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:yT((1-c)*r.x+c*a.x,5),y:yT((1-c)*r.y+c*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),xW=B((i,e,r)=>{Nt.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const a=uC(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 qO(i,e,r){const n=structuredClone(r);Nt.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+i,o=uC(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}B(qO,"calcTerminalLabelPosition");function UO(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}}B(UO,"getStylesFromArray");var bT=0,vW=B(()=>(bT++,"id-"+Math.random().toString(36).substr(2,12)+"-"+bT),"generateId");function HO(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}B(HO,"makeRandomHex");var CW=B(i=>HO(i.length),"random"),_W=B(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"),kW=B(function(i,e){const r=e.text.replace($d.lineBreakRegex," "),[,n]=um(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"),wW=Hd((i,e,r)=>{if(!i||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),$d.lineBreakRegex.test(i)))return i;const n=i.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=js(`${c} `,r),d=js(o,r);if(u>e){const{hyphenatedStrings:x,remainingWord:y}=SW(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}`),SW=Hd((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(js(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 WO(i,e){return dC(i,e).height}B(WO,"calculateTextHeight");function js(i,e){return dC(i,e).width}B(js,"calculateTextWidth");var dC=Hd((i,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!i)return{width:0,height:0};const[,o]=um(r),c=["sans-serif",n],h=i.split($d.lineBreakRegex),u=[],d=ce("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 _=_W();_.text=C||dW;const k=kW(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}`),fh,TW=(fh=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},B(fh,"InitIDGenerator"),fh),xp,EW=B(function(i){return xp=xp||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xp.innerHTML=i,unescape(xp.textContent)},"entityDecode");function fC(i){return"str"in i}B(fC,"isDetailedError");var NW=B((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"),um=B(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 uW({},i,e)}B(pC,"cleanAndMerge");var ba={assignWithDepth:mr,wrapLabel:wW,calculateTextHeight:WO,calculateTextWidth:js,calculateTextDimensions:dC,cleanAndMerge:pC,detectInit:gW,detectDirective:IO,isSubstringInArray:yW,interpolateToCurve:cC,calcLabelPosition:PO,calcCardinalityPosition:xW,calcTerminalLabelPosition:qO,formatUrl:$O,getStylesFromArray:UO,generateId:vW,random:CW,runFunc:bW,entityDecode:EW,insertTitle:NW,isLabelCoordinateInPath:GO,parseFontSize:um,InitIDGenerator:TW},AW=B(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"),$l=B(function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),fot=B((i,e,{counter:r=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${i}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function _r(i){return i??null}B(_r,"handleUndefinedAttr");function GO(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())}B(GO,"isLabelCoordinateInPath");var gC=B(({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 YO(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=Ze().fontSize?Ze().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[d=RM.fontSize]=um(h),f=d*u+"px";a.style.minWidth=f,a.style.maxWidth=f}else a.style.width="100%";o(a)}B(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}B(YO,"configureLabelImages");var MW=B(i=>{const{handDrawnSeed:e}=Ze();return{fill:i,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:i,seed:e}},"solidStateFill"),Sh=B(i=>{const e=BW([...i.cssCompiledStyles||[],...i.cssStyles||[],...i.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),BW=B(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"),KO=B(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"),Zt=B(i=>{const{stylesArray:e}=Sh(i),r=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];KO(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"),Xt=B((i,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=Ze(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:c}=Sh(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:LW(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),LW=B(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 OW=Object.freeze({left:0,top:0,width:16,height:16}),Ag=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),VO=Object.freeze({...OW,...Ag}),RW=Object.freeze({...VO,body:"",hidden:!1}),DW=Object.freeze({width:null,height:null}),jW=Object.freeze({...DW,...Ag}),FW=(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 Vb(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 Vb(h)?h:null}if(r&&n===""){const h={provider:n,prefix:"",name:o};return Vb(h,r)?h:null}return null},Vb=(i,e)=>i?!!((e&&i.prefix===""||i.prefix)&&i.name):!1;function IW(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 xT(i,e){const r=IW(i,e);for(const n in RW)n in Ag?n in i&&!(n in r)&&(r[n]=Ag[n]):n in e?r[n]=e[n]:n in i&&(r[n]=i[n]);return r}function $W(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 vT(i,e,r){const n=i.icons,a=i.aliases||Object.create(null);let o={};function c(h){o=xT(n[h]||a[h],o)}return c(e),r.forEach(c),xT(i,o)}function zW(i,e){if(i.icons[e])return vT(i,e,[]);const r=$W(i,[e])[e];return r?vT(i,e,r):null}const PW=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qW=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function CT(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(PW);if(n===null||!n.length)return i;const a=[];let o=n.shift(),c=qW.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 UW(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 HW(i,e){return i?"<defs>"+i+"</defs>"+e:e}function WW(i,e,r){const n=UW(i);return HW(n.defs,e+n.content+r)}const GW=i=>i==="unset"||i==="undefined"||i==="none";function YW(i,e){const r={...VO,...i},n={...jW,...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 E=C.rotate;k?T?E+=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 N;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:N=a.height/2+a.top,_.unshift("rotate(90 "+N.toString()+" "+N.toString()+")");break;case 2:_.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:N=a.width/2+a.left,_.unshift("rotate(-90 "+N.toString()+" "+N.toString()+")");break}E%2===1&&(a.left!==a.top&&(N=a.left,a.left=a.top,a.top=N),a.width!==a.height&&(N=a.width,a.width=a.height,a.height=N)),_.length&&(o=WW(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=CT(g,u/d)):(f=c==="auto"?u:c,g=h===null?CT(f,d/u):h==="auto"?d:h);const x={},y=(C,_)=>{GW(_)||(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 KW=/\sid="(\S+)"/g,_T=new Map;function VW(i){i=i.replace(/[0-9]+$/,"")||"a";const e=_T.get(i)||0;return _T.set(i,e+1),e?`${i}${e}`:i}function XW(i){const e=[];let r;for(;r=KW.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=VW(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 ZW(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 mC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Yl=mC();function XO(i){Yl=i}var od={exec:()=>null};function Qe(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(en.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var QW=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),en={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")},JW=/^(?:[ \t]*(?:\n|$))+/,tG=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,eG=/^ {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+|$)/,iG=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yC=/(?:[*+-]|\d{1,9}[.)])/,ZO=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,QO=Qe(ZO).replace(/bull/g,yC).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(),rG=Qe(ZO).replace(/bull/g,yC).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(),bC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nG=/^[^\n]+/,xC=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,aG=Qe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sG=Qe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yC).getRegex(),dm="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",vC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,oG=Qe("^ {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",vC).replace("tag",dm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),JO=Qe(bC).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",dm).getRegex(),lG=Qe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",JO).getRegex(),CC={blockquote:lG,code:tG,def:aG,fences:eG,heading:iG,hr:Wd,html:oG,lheading:QO,list:sG,newline:JW,paragraph:JO,table:od,text:nG},kT=Qe("^ *([^\\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",dm).getRegex(),cG={...CC,lheading:rG,table:kT,paragraph:Qe(bC).replace("hr",Wd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kT).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",dm).getRegex()},hG={...CC,html:Qe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",vC).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:od,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Qe(bC).replace("hr",Wd).replace("heading",` *#{1,6} *[^
|
|
264
|
+
]`).replace("lheading",QO).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},uG=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,dG=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tR=/^( {2,}|\\)\n(?!\s*$)/,fG=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fm=/[\p{P}\p{S}]/u,_C=/[\s\p{P}\p{S}]/u,eR=/[^\s\p{P}\p{S}]/u,pG=Qe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_C).getRegex(),iR=/(?!~)[\p{P}\p{S}]/u,gG=/(?!~)[\s\p{P}\p{S}]/u,mG=/(?:[^\s\p{P}\p{S}]|~)/u,yG=Qe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",QW?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,bG=Qe(rR,"u").replace(/punct/g,fm).getRegex(),xG=Qe(rR,"u").replace(/punct/g,iR).getRegex(),nR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vG=Qe(nR,"gu").replace(/notPunctSpace/g,eR).replace(/punctSpace/g,_C).replace(/punct/g,fm).getRegex(),CG=Qe(nR,"gu").replace(/notPunctSpace/g,mG).replace(/punctSpace/g,gG).replace(/punct/g,iR).getRegex(),_G=Qe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,eR).replace(/punctSpace/g,_C).replace(/punct/g,fm).getRegex(),kG=Qe(/\\(punct)/,"gu").replace(/punct/g,fm).getRegex(),wG=Qe(/^<(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=Qe(vC).replace("(?:-->|$)","-->").getRegex(),TG=Qe("^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(),Mg=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,EG=Qe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Mg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),aR=Qe(/^!?\[(label)\]\[(ref)\]/).replace("label",Mg).replace("ref",xC).getRegex(),sR=Qe(/^!?\[(ref)\](?:\[\])?/).replace("ref",xC).getRegex(),NG=Qe("reflink|nolink(?!\\()","g").replace("reflink",aR).replace("nolink",sR).getRegex(),wT=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,kC={_backpedal:od,anyPunctuation:kG,autolink:wG,blockSkip:yG,br:tR,code:dG,del:od,emStrongLDelim:bG,emStrongRDelimAst:vG,emStrongRDelimUnd:_G,escape:uG,link:EG,nolink:sR,punctuation:pG,reflink:aR,reflinkSearch:NG,tag:TG,text:fG,url:od},AG={...kC,link:Qe(/^!?\[(label)\]\((.*?)\)/).replace("label",Mg).getRegex(),reflink:Qe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Mg).getRegex()},xv={...kC,emStrongRDelimAst:CG,emStrongLDelim:xG,url:Qe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wT).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:Qe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",wT).getRegex()},MG={...xv,br:Qe(tR).replace("{2,}","*").getRegex(),text:Qe(xv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vp={normal:CC,gfm:cG,pedantic:hG},Tu={normal:kC,gfm:xv,breaks:MG,pedantic:AG},BG={"&":"&","<":"<",">":">",'"':""","'":"'"},ST=i=>BG[i];function Da(i,e){if(e){if(en.escapeTest.test(i))return i.replace(en.escapeReplace,ST)}else if(en.escapeTestNoEncode.test(i))return i.replace(en.escapeReplaceNoEncode,ST);return i}function TT(i){try{i=encodeURI(i).replace(en.percentDecode,"%")}catch{return null}return i}function ET(i,e){var o;let r=i.replace(en.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=r.split(en.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(en.slashPipe,"|");return n}function Eu(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 LG(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 NT(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 OG(i,e,r){let n=i.match(r.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
|
|
265
|
+
`).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(`
|
|
266
|
+
`)}var Bg=class{constructor(e){ne(this,"options");ne(this,"rules");ne(this,"lexer");this.options=e||Yl}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:Eu(n,`
|
|
267
|
+
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],a=OG(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=Eu(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:Eu(r[0],`
|
|
268
|
+
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Eu(r[0],`
|
|
269
|
+
`).split(`
|
|
270
|
+
`),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(`
|
|
271
|
+
`),g=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
272
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
273
|
+
${f}`:f,o=o?`${o}
|
|
274
|
+
${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+`
|
|
275
|
+
`+n.join(`
|
|
276
|
+
`),_=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+`
|
|
277
|
+
`+n.join(`
|
|
278
|
+
`),_=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(`
|
|
279
|
+
`);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(`
|
|
280
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),y=e.split(`
|
|
281
|
+
`,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+`
|
|
282
|
+
`,e=e.substring(y.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(C),E=this.rules.other.hrRegex(C),N=this.rules.other.fencesBeginRegex(C),L=this.rules.other.headingBeginRegex(C),O=this.rules.other.htmlBeginRegex(C);for(;e;){let A=e.split(`
|
|
283
|
+
`,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," "),N.test(y)||L.test(y)||O.test(y)||T.test(y)||E.test(y))break;if(M.search(this.rules.other.nonSpaceChar)>=C||!y.trim())g+=`
|
|
284
|
+
`+M.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(x)||L.test(x)||E.test(x))break;g+=`
|
|
285
|
+
`+y}!v&&!y.trim()&&(v=!0),f+=A+`
|
|
286
|
+
`,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=ET(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(`
|
|
287
|
+
`):[],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(ET(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)===`
|
|
288
|
+
`?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=Eu(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=LG(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)),NT(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 NT(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 vv{constructor(e){ne(this,"tokens");ne(this,"options");ne(this,"state");ne(this,"tokenizer");ne(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Yl,this.options.tokenizer=this.options.tokenizer||new Bg,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:en,block:vp.normal,inline:Tu.normal};this.options.pedantic?(r.block=vp.pedantic,r.inline=Tu.pedantic):this.options.gfm&&(r.block=vp.gfm,this.options.breaks?r.inline=Tu.breaks:r.inline=Tu.gfm),this.tokenizer.rules=r}static get rules(){return{block:vp,inline:Tu}}static lex(e,r){return new vv(r).lex(e)}static lexInline(e,r){return new vv(r).inlineTokens(e)}lex(e){e=e.replace(en.carriageReturn,`
|
|
289
|
+
`),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(en.tabCharGlobal," ").replace(en.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+=`
|
|
290
|
+
`: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(`
|
|
291
|
+
`)?"":`
|
|
292
|
+
`)+h.raw,d.text+=`
|
|
293
|
+
`+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(`
|
|
294
|
+
`)?"":`
|
|
295
|
+
`)+h.raw,d.text+=`
|
|
296
|
+
`+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(`
|
|
297
|
+
`)?"":`
|
|
298
|
+
`)+h.raw,d.text+=`
|
|
299
|
+
`+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(`
|
|
300
|
+
`)?"":`
|
|
301
|
+
`)+h.raw,d.text+=`
|
|
302
|
+
`+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}},Lg=class{constructor(e){ne(this,"options");ne(this,"parser");this.options=e||Yl}space(e){return""}code({text:e,lang:r,escaped:n}){var c;let a=(c=(r||"").match(en.notSpaceStart))==null?void 0:c[0],o=e.replace(en.endingNewline,"")+`
|
|
303
|
+
`;return a?'<pre><code class="language-'+Da(a)+'">'+(n?o:Da(o,!0))+`</code></pre>
|
|
304
|
+
`:"<pre><code>"+(n?o:Da(o,!0))+`</code></pre>
|
|
305
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
306
|
+
${this.parser.parse(e)}</blockquote>
|
|
307
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
308
|
+
`}hr(e){return`<hr>
|
|
309
|
+
`}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+`>
|
|
310
|
+
`+a+"</"+o+`>
|
|
311
|
+
`}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+" "+Da(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>
|
|
312
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
313
|
+
`}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>
|
|
314
|
+
<thead>
|
|
315
|
+
`+r+`</thead>
|
|
316
|
+
`+a+`</table>
|
|
317
|
+
`}tablerow({text:e}){return`<tr>
|
|
318
|
+
${e}</tr>
|
|
319
|
+
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
320
|
+
`}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>${Da(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=TT(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return r&&(c+=' title="'+Da(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=TT(e);if(o===null)return Da(n);e=o;let c=`<img src="${e}" alt="${n}"`;return r&&(c+=` title="${Da(r)}"`),c+=">",c}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Da(e.text)}},wC=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 Cv{constructor(e){ne(this,"options");ne(this,"renderer");ne(this,"textRenderer");this.options=e||Yl,this.options.renderer=this.options.renderer||new Lg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wC}static parse(e,r){return new Cv(r).parse(e)}static parseInline(e,r){return new Cv(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+=`
|
|
321
|
+
`+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}},jp,Vu=(jp=class{constructor(e){ne(this,"options");ne(this,"block");this.options=e||Yl}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}},ne(jp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ne(jp,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),jp),RG=class{constructor(...e){ne(this,"defaults",mC());ne(this,"options",this.setOptions);ne(this,"parse",this.parseMarkdown(!0));ne(this,"parseInline",this.parseMarkdown(!1));ne(this,"Parser",ma);ne(this,"Renderer",Lg);ne(this,"TextRenderer",wC);ne(this,"Lexer",ga);ne(this,"Tokenizer",Bg);ne(this,"Hooks",Vu);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 Lg(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 Bg(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 Vu;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];Vu.passThroughHooks.has(c)?o[h]=f=>{if(this.defaults.async&&Vu.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+=`
|
|
322
|
+
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+Da(n.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(n);throw n}}},zl=new RG;function si(i,e){return zl.parse(i,e)}si.options=si.setOptions=function(i){return zl.setOptions(i),si.defaults=zl.defaults,XO(si.defaults),si};si.getDefaults=mC;si.defaults=Yl;si.use=function(...i){return zl.use(...i),si.defaults=zl.defaults,XO(si.defaults),si};si.walkTokens=function(i,e){return zl.walkTokens(i,e)};si.parseInline=zl.parseInline;si.Parser=ma;si.parser=ma.parse;si.Renderer=Lg;si.TextRenderer=wC;si.Lexer=ga;si.lexer=ga.lex;si.Tokenizer=Bg;si.Hooks=Vu;si.parse=si;si.options;si.setOptions;si.use;si.walkTokens;si.parseInline;ma.parse;ga.lex;function oR(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(`
|
|
323
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");n=n.map(function(h){return h.replace(o,`
|
|
324
|
+
`)})}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(`
|
|
325
|
+
`)&&(g=String(h).split(`
|
|
326
|
+
`).map(function(x,y){return y===0?x:""+f+x}).join(`
|
|
327
|
+
`)),c+=g+n[u+1]}),c}var DG={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},_v=new Map,lR=new Map,jG=B(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(Nt.debug("Registering icon pack:",e.name),"loader"in e)lR.set(e.name,e.loader);else if("icons"in e)_v.set(e.name,e.icons);else throw Nt.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),cR=B(async(i,e)=>{const r=FW(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=_v.get(n);if(!a){const c=lR.get(n);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await c(),prefix:n},_v.set(n,a)}catch(h){throw Nt.error(h),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=zW(a,r.name);if(!o)throw new Error(`Icon not found: ${i}`);return o},"getRegisteredIconData"),FG=B(async i=>{try{return await cR(i),!0}catch{return!1}},"isIconAvailable"),Gd=B(async(i,e,r)=>{let n;try{n=await cR(i,e==null?void 0:e.fallbackPrefix)}catch(c){Nt.error(c),n=DG}const a=YW(n,e),o=ZW(XW(a.body),{...a.attributes,...r});return _a(o,Ii())},"getIconSVG");function hR(i,{markdownAutoWrap:e}){const n=i.replace(/<br\/>/g,`
|
|
328
|
+
`).replace(/\n{2,}/g,`
|
|
329
|
+
`);return oR(n)}B(hR,"preprocessMarkdown");function uR(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"})))??[]})}B(uR,"nonMarkdownToLines");function dR(i,e={}){const r=hR(i,e),n=si.lexer(r),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
|
|
330
|
+
`).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 B(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}B(dR,"markdownToLines");function fR(i){return i?`<p>${i.replace(/\\n|\n/g,"<br />")}</p>`:""}B(fR,"nonMarkdownToHTML");function pR(i,{markdownAutoWrap:e}={}){const r=si.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:(Nt.warn(`Unsupported markdown: ${a.type}`),a.raw)}return B(n,"output"),r.map(n).join("")}B(pR,"markdownToHTML");function gR(i){return Intl.Segmenter?[...new Intl.Segmenter().segment(i)].map(e=>e.segment):[...i]}B(gR,"splitTextToChars");function mR(i,e){const r=gR(e.content);return SC(i,[],r,e.type)}B(mR,"splitWordToFitWidth");function SC(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}])?SC(i,c,o,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}B(SC,"splitWordToFitWidthRecursion");function yR(i,e){if(i.some(({content:r})=>r.includes(`
|
|
331
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Og(i,e)}B(yR,"splitLineToFitWidth");function Og(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 Og(i,e,r,c);if(n.length>0)r.push(n),i.unshift(o);else if(o.content){const[h,u]=mR(e,o);r.push([h]),u.content&&i.unshift(u)}return Og(i,e,r)}B(Og,"splitLineToFitWidthRecursion");function kv(i,e){e&&i.attr("style",e)}B(kv,"applyStyle");var AT=16384;async function bR(i,e,r,n,a=!1,o=Ii()){const c=i.append("foreignObject");c.attr("width",`${Math.min(10*r,AT)}px`),c.attr("height",`${Math.min(10*r,AT)}px`);const h=c.append("xhtml:div"),u=pd(e.label)?await UM(e.label.replace($d.lineBreakRegex,`
|
|
332
|
+
`),o):_a(e.label,o),d=e.isNode?"nodeLabel":"edgeLabel",f=h.append("span");f.html(u),kv(f,e.labelStyle),f.attr("class",`${d} ${n}`),kv(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()}B(bR,"addHtmlSpan");function pm(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}B(pm,"createTspan");function xR(i,e,r){const n=i.append("text"),a=pm(n,1,e);gm(a,r);const o=a.node().getComputedTextLength();return n.remove(),o}B(xR,"computeWidthOfText");function IG(i,e,r){var c;const n=i.append("text"),a=pm(n,1,e);gm(a,[{content:r,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}B(IG,"computeDimensionOfText");function vR(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=B(y=>xR(c,1.1,y)<=i,"checkWidth"),x=g(f)?[f]:yR(f,g);for(const y of x){const v=pm(u,d,1.1,a);gm(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()}B(vR,"createFormattedText");function wv(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}})}B(wv,"decodeHTMLEntities");function gm(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(wv(r.content)):a.text(" "+wv(r.content))})}B(gm,"updateTextContentAndStyles");async function CR(i,e={}){const r=[];i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(r.push((async()=>{const h=`${o}:${c}`;return await FG(h)?await Gd(h,void 0,{class:"label-icon"}):`<i class='${_a(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(r);return i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}B(CR,"replaceIconSubstring");var $s=B(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(Nt.debug("XYZ createText",e,r,n,a,o,h,"addSvgBackground: ",d),o){const g=c?pR(e,f):fR(e),x=await CR($l(g),f),y=e.replace(/\\\\/g,"\\"),v={isNode:h,label:pd(e)?y:x,labelStyle:r.replace("fill:","color:")};return await bR(i,v,u,a,d,f)}else{const g=$l(e.replace(/<br\s*\/?>/g,"<br/>")),x=c?dR(g.replace("<br>","<br/>"),f):uR(g),y=vR(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:");ce(y).attr("style",v)}else{const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ce(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:");ce(y).select("text").attr("style",C)}return n?ce(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ce(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function Xb(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 $G(i,e){return i[0]===e[0]&&i[1]===e[1]}function zG(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)Xb(d,h,a);const u=(function(d,f,g){const x=[];for(const T of d){const E=[...T];$G(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&x.push(E)}const y=[];f=Math.max(f,.1);const v=[];for(const T of x)for(let E=0;E<T.length-1;E++){const N=T[E],L=T[E+1];if(N[1]!==L[1]){const O=Math.min(N[1],L[1]);v.push({ymin:O,ymax:Math.max(N[1],L[1]),x:O===N[1]?N[0]:L[0],islope:(L[0]-N[0])/(L[1]-N[1])})}}if(v.sort(((T,E)=>T.ymin<E.ymin?-1:T.ymin>E.ymin?1:T.x<E.x?-1:T.x>E.x?1:T.ymax===E.ymax?0:(T.ymax-E.ymax)/Math.abs(T.ymax-E.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 E=0;E<v.length&&!(v[E].ymin>_);E++)T=E;v.splice(0,T+1).forEach((E=>{C.push({s:_,edge:E})}))}if(C=C.filter((T=>!(T.edge.ymax<=_))),C.sort(((T,E)=>T.edge.x===E.edge.x?0:(T.edge.x-E.edge.x)/Math.abs(T.edge.x-E.edge.x))),(g!==1||k%f==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const E=T+1;if(E>=C.length)break;const N=C[T].edge,L=C[E].edge;y.push([[Math.round(N.x),_],[Math.round(L.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)Xb(d,h,-a);(function(d,f,g){const x=[];d.forEach((y=>x.push(...y))),Xb(x,f,g)})(u,h,-a)}return u}function Yd(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),zG(i,a,n,o||1)}let TC=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Yd(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))}let PG=class extends TC{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const a=Yd(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)}}},qG=class extends TC{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}},UG=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=Yd(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}}},HG=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=Yd(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}},WG=class{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=Yd(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 gn={};let GG=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};const YG=0,Zb=1,MT=2,Cp={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 Qb(i,e){return i.type===e}function EC(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:YG,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:Zb,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:MT,text:""},h})(i);let n="BOD",a=0,o=r[a];for(;!Qb(o,MT);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return EC("M0,0"+i);a++,c=Cp[o.text],n=o.text}else Qb(o,Zb)?c=Cp[n]:(a++,c=Cp[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(!Qb(d,Zb))throw new Error("Param not a number: "+n+","+d.text);h[h.length]=+d.text}if(typeof Cp[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 _R(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 kR(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)&&(wR(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 Nu(i,e,r){return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function wR(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]=Nu(i,e,-f),[r,n]=Nu(r,n,-f);const Y=(i-r)/2,I=(e-n)/2;let W=Y*Y/(a*a)+I*I/(o*o);W>1&&(W=Math.sqrt(W),a*=W,o*=W);const j=a*a,q=o*o,G=j*q-j*I*I-q*Y*Y,it=j*I*I+q*Y*Y,nt=(h===u?-1:1)*Math.sqrt(Math.abs(G/it));C=nt*a*I/o+(i+r)/2,_=nt*-o*Y/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 Y=v,I=r,W=n;v=u&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=wR(r=C+a*Math.cos(v),n=_+o*Math.sin(v),I,W,a,o,c,0,u,[v,Y,C,_])}k=v-y;const T=Math.cos(y),E=Math.sin(y),N=Math.cos(v),L=Math.sin(v),O=Math.tan(k/4),A=4/3*a*O,M=4/3*o*O,z=[i,e],D=[i+A*E,e-M*T],$=[r+A*L,n-M*N],U=[r,n];if(D[0]=2*z[0]-D[0],D[1]=2*z[1]-D[1],d)return[D,$,U].concat(x);{x=[D,$,U].concat(x);const Y=[];for(let I=0;I<x.length;I+=3){const W=Nu(x[I][0],x[I][1],f),j=Nu(x[I+1][0],x[I+1][1],f),q=Nu(x[I+2][0],x[I+2][1],f);Y.push([W[0],W[1],j[0],j[1],q[0],q[1]])}return Y}}const KG={randOffset:function(i,e){return pe(i,e)},randOffsetWithRange:function(i,e,r){return Rg(i,e,r)},ellipse:function(i,e,r,n,a){const o=TR(r,n,a);return Sv(i,e,a,o).opset},doubleLineOps:function(i,e,r,n,a){return Fo(i,e,r,n,a,!0)}};function SR(i,e,r,n,a){return{type:"path",ops:Fo(i,e,r,n,a)}}function Kp(i,e,r){const n=(i||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...Fo(i[o][0],i[o][1],i[o+1][0],i[o+1][1],r));return e&&a.push(...Fo(i[n-1][0],i[n-1][1],i[0][0],i[0][1],r)),{type:"path",ops:a}}return n===2?SR(i[0][0],i[0][1],i[1][0],i[1][1],r):{type:"path",ops:[]}}function VG(i,e,r,n,a){return(function(o,c){return Kp(o,!0,c)})([[i,e],[i+r,e],[i+r,e+n],[i,e+n]],a)}function BT(i,e){if(i.length){const r=typeof i[0][0]=="number"?[i]:i,n=_p(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:_p(r[0],1.5*(1+.22*e.roughness),RT(e));for(let o=1;o<r.length;o++){const c=r[o];if(c.length){const h=_p(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:_p(c,1.5*(1+.22*e.roughness),RT(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 TR(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+=pe(c*u,r),h+=pe(h*u,r),{increment:o,rx:c,ry:h}}function Sv(i,e,r,n){const[a,o]=DT(n.increment,i,e,n.rx,n.ry,1,n.increment*Rg(.1,Rg(.4,1,r),r),r);let c=Dg(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[h]=DT(n.increment,i,e,n.rx,n.ry,1.5,0,r),u=Dg(h,null,r);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function LT(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+=pe(.01*g,u),x+=pe(.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=jT(_,d,f,g,x,y,v,1,u);if(!u.disableMultiStroke){const T=jT(_,d,f,g,x,y,v,1.5,u);k.push(...T)}return c&&(h?k.push(...Fo(d,f,d+g*Math.cos(y),f+x*Math.sin(y),u),...Fo(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 OT(i,e){const r=kR(_R(EC(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(...Fo(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(...XG(u,d,f,g,x,y,o,e)),o=[x,y];break}case"Z":n.push(...Fo(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function Jb(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]+pe(a,e),n[0][1]+pe(a,e)]});for(let c=1;c<o;c++)r.push({op:"lineTo",data:[n[c][0]+pe(a,e),n[c][1]+pe(a,e)]})}}return{type:"fillPath",ops:r}}function Ec(i,e){return(function(r,n){let a=r.fillStyle||"hachure";if(!gn[a])switch(a){case"zigzag":gn[a]||(gn[a]=new PG(n));break;case"cross-hatch":gn[a]||(gn[a]=new qG(n));break;case"dots":gn[a]||(gn[a]=new UG(n));break;case"dashed":gn[a]||(gn[a]=new HG(n));break;case"zigzag-line":gn[a]||(gn[a]=new WG(n));break;default:a="hachure",gn[a]||(gn[a]=new TC(n))}return gn[a]})(e,KG).fillPolygons(i,e)}function RT(i){const e=Object.assign({},i);return e.randomizer=void 0,i.seed&&(e.seed=i.seed+1),e}function ER(i){return i.randomizer||(i.randomizer=new GG(i.seed||0)),i.randomizer.next()}function Rg(i,e,r,n=1){return r.roughness*n*(ER(r)*(e-i)+i)}function pe(i,e,r=1){return Rg(-i,i,e,r)}function Fo(i,e,r,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=Tv(i,e,r,n,a,!0,!1);if(c)return h;const u=Tv(i,e,r,n,a,!0,!0);return h.concat(u)}function Tv(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*ER(a);let y=a.bowing*a.maxRandomnessOffset*(n-e)/200,v=a.bowing*a.maxRandomnessOffset*(i-r)/200;y=pe(y,a,d),v=pe(v,a,d);const C=[],_=()=>pe(g,a,d),k=()=>pe(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:pe(f,a,d)),e+(T?0:pe(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 _p(i,e,r){if(!i.length)return[];const n=[];n.push([i[0][0]+pe(e,r),i[0][1]+pe(e,r)]),n.push([i[0][0]+pe(e,r),i[0][1]+pe(e,r)]);for(let a=1;a<i.length;a++)n.push([i[a][0]+pe(e,r),i[a][1]+pe(e,r)]),a===i.length-1&&n.push([i[a][0]+pe(e,r),i[a][1]+pe(e,r)]);return Dg(n,null,r)}function Dg(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(...Tv(i[0][0],i[0][1],i[1][0],i[1][1],r,!0,!0));return a}function DT(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=pe(.5,h)-Math.PI/2;d.push([pe(o,h)+e+.9*n*Math.cos(f-i),pe(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=[pe(o,h)+e+n*Math.cos(x),pe(o,h)+r+a*Math.sin(x)];u.push(y),d.push(y)}d.push([pe(o,h)+e+n*Math.cos(f+2*Math.PI+.5*c),pe(o,h)+r+a*Math.sin(f+2*Math.PI+.5*c)]),d.push([pe(o,h)+e+.98*n*Math.cos(f+c),pe(o,h)+r+.98*a*Math.sin(f+c)]),d.push([pe(o,h)+e+.9*n*Math.cos(f+.5*c),pe(o,h)+r+.9*a*Math.sin(f+.5*c)])}return[d,u]}function jT(i,e,r,n,a,o,c,h,u){const d=o+pe(.1,u),f=[];f.push([pe(h,u)+e+.9*n*Math.cos(d-i),pe(h,u)+r+.9*a*Math.sin(d-i)]);for(let g=d;g<=c;g+=i)f.push([pe(h,u)+e+n*Math.cos(g),pe(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)]),Dg(f,null,u)}function XG(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:pe(d[0],h)),c[1]+(x?0:pe(d[0],h))]}),f=x?[a,o]:[a+pe(d[y],h),o+pe(d[y],h)],u.push({op:"bcurveTo",data:[i+pe(d[y],h),e+pe(d[y],h),r+pe(d[y],h),n+pe(d[y],h),f[0],f[1]]});return u}function Au(i){return[...i]}function FT(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(Au(i[0]),Au(i[1]),Au(i[2]),Au(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(Au(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 Vp(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)}function ZG(i,e,r){const n=Vp(e,r);if(n===0)return Vp(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)),Vp(i,hl(e,r,a))}function hl(i,e,r){return[i[0]+(e[0]-i[0])*r,i[1]+(e[1]-i[1])*r]}function Ev(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(Vp(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=hl(u,d,.5),y=hl(d,f,.5),v=hl(f,g,.5),C=hl(x,y,.5),_=hl(y,v,.5),k=hl(C,_,.5);Ev([u,x,C,k],0,r,a),Ev([k,_,v,g],0,r,a)}var o,c;return a}function QG(i,e){return jg(i,0,i.length,e)}function jg(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=ZG(i[f],c,h);g>u&&(u=g,d=f)}return Math.sqrt(u)>n?(jg(i,e,d+1,n,o),jg(i,d,r,n,o)):(o.length||o.push(c),o.push(h)),o}function t0(i,e=.15,r){const n=[],a=(i.length-1)/3;for(let o=0;o<a;o++)Ev(i,3*o,e,n);return r&&r>0?jg(n,0,n.length,r):n}const Rn="none";class Fg{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",[SR(e,r,n,a,c)],c)}rectangle(e,r,n,a,o){const c=this._o(o),h=[],u=VG(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(Jb([d],c)):h.push(Ec([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=TR(n,a,c),d=Sv(e,r,c,u);if(c.fill)if(c.fillStyle==="solid"){const f=Sv(e,r,c,u).opset;f.type="fillPath",h.push(f)}else h.push(Ec([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",[Kp(e,!1,n)],n)}arc(e,r,n,a,o,c,h=!1,u){const d=this._o(u),f=[],g=LT(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=LT(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 E=x,N=y;let L=Math.abs(v/2),O=Math.abs(C/2);L+=pe(.01*L,T),O+=pe(.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 z=(M-A)/T.curveStepCount,D=[];for(let $=A;$<=M;$+=z)D.push([E+L*Math.cos($),N+O*Math.sin($)]);return D.push([E+L*Math.cos(M),N+O*Math.sin(M)]),D.push([E,N]),Ec([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=BT(e,n);if(n.fill&&n.fill!==Rn)if(n.fillStyle==="solid"){const c=BT(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(...t0(FT([d[0],d[0],d[1],d[2]]),10,(1+n.roughness)/2)):c.push(...t0(FT(d),10,(1+n.roughness)/2))}c.length&&a.push(Ec([c],n))}return n.stroke!==Rn&&a.push(o),this._d("curve",a,n)}polygon(e,r){const n=this._o(r),a=[],o=Kp(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(Jb([e],n)):a.push(Ec([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=kR(_R(EC(f))),v=[];let C=[],_=[0,0],k=[];const T=()=>{k.length>=4&&C.push(...t0(k,g)),k=[]},E=()=>{T(),C.length&&(v.push(C),C=[])};for(const{key:L,data:O}of y)switch(L){case"M":E(),_=[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(E(),!x)return v;const N=[];for(const L of v){const O=QG(L,x);O.length&&N.push(O)}return N})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),d=OT(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const f=OT(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(Jb(u,n));else a.push(Ec(u,n));return c&&(h?u.forEach((f=>{a.push(Kp(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 JG{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Fg(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 kp="http://www.w3.org/2000/svg";class tY{constructor(e,r){this.svg=e,this.gen=new Fg(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(kp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of r){let u=null;switch(h.type){case"path":u=a.createElementNS(kp,"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(kp,"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(kp,"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 Vt={canvas:(i,e)=>new JG(i,e),svg:(i,e)=>new tY(i,e),generator:i=>new Fg(i),newSeed:()=>Fg.newSeed()},fe=B(async(i,e,r)=>{var y,v;let n;const a=e.useHtmlLabels||Fs((y=Ze())==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",_r(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,_a($l(h),Ze()),{useHtmlLabels:a,width:e.width||((v=Ze().flowchart)==null?void 0:v.wrappingWidth),classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},Ze());let g=f.getBBox();const x=((e==null?void 0:e.padding)??0)/2;if(a){const C=f.children[0],_=ce(f);await YO(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"),e0=B(async(i,e,r)=>{var u,d;const n=r.useHtmlLabels??nn(Ze()),a=i.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await $s(a,_a($l(e),Ze()),{useHtmlLabels:n,width:r.width||((d=(u=Ze())==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(nn(Ze())){const f=o.children[0],g=ce(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"),te=B((i,e)=>{const r=e.node().getBBox();i.width=r.width,i.height=r.height},"updateNodeBounds"),he=B((i,e)=>(i.look==="handDrawn"?"rough-node":"node")+" "+i.cssClasses+" "+(e||""),"getNodeClasses");function Ye(i){const e=i.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}B(Ye,"createPathFromPoints");function Io(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}B(Io,"generateFullSineWavePoints");function Td(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}B(Td,"generateCirclePoints");function Nv(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=B((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}B(Nv,"mergePaths");var eY=B((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"),Th=eY,iY=B(async(i,e,r,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=Ze(),h=nn(c);return await $s(i,o,{style:r,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ao=iY,zo=B((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"),NR=B(async(i,e)=>{Nt.info("Creating subgraph rect for ",e.id,e);const r=Ze(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=Zt(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=nn(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 Ao(y,e.label,e.labelStyle||"",!1,!0);let C=v.getBBox();if(nn(r)){const A=v.children[0],M=ce(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,E=e.y-k/2;Nt.trace("Data ",e,JSON.stringify(e));let N;if(e.look==="handDrawn"){const A=Vt.svg(g),M=Xt(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),z=A.path(zo(T,E,_,k,0),M);N=g.insert(()=>(Nt.debug("Rough node insert CXC",z),z),":first-child"),N.select("path:nth-child(2)").attr("style",d.join(";")),N.select("path").attr("style",f.join(";").replace("fill","stroke"))}else N=g.insert("rect",":first-child"),N.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",E).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:L}=gC(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+L})`),h){const A=y.select("span");A&&A.attr("style",h)}const O=N.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 Th(e,A)},{cluster:g,labelBBox:C}},"rect"),rY=B((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 Th(e,h)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),nY=B(async(i,e)=>{const r=Ze(),{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 Ao(g,e.label,e.labelStyle,void 0,!0);let v=y.getBBox();if(nn(r)){const z=y.children[0],D=ce(y);v=z.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,E=e.height+C-v.height-6,N=e.x-k/2,L=e.y-T/2;e.width=k;const O=e.y-e.height/2-_+v.height+2;let A;if(e.look==="handDrawn"){const z=e.cssClasses.includes("statediagram-cluster-alt"),D=Vt.svg(d),$=e.rx||e.ry?D.path(zo(N,L,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):D.rectangle(N,L,k,T,{seed:a});A=d.insert(()=>$,":first-child");const U=D.rectangle(N,O,k,E,{fill:z?o:c,fillStyle:z?"hachure":"solid",stroke:u,seed:a});A=d.insert(()=>$,":first-child"),x=d.insert(()=>U)}else A=f.insert("rect",":first-child"),A.attr("class","outer").attr("x",N).attr("y",L).attr("width",k).attr("height",T).attr("data-look",e.look),x.attr("class","inner").attr("x",N).attr("y",O).attr("width",k).attr("height",E);g.attr("transform",`translate(${e.x-v.width/2}, ${L+1-(nn(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(z){return Th(e,z)},{cluster:d,labelBBox:v}},"roundedWithTitle"),aY=B(async(i,e)=>{Nt.info("Creating subgraph rect for ",e.id,e);const r=Ze(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=Zt(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=nn(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(nn(r)){const A=v.children[0],M=ce(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,E=e.y-k/2;Nt.trace("Data ",e,JSON.stringify(e));let N;if(e.look==="handDrawn"){const A=Vt.svg(g),M=Xt(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),z=A.path(zo(T,E,_,k,e.rx),M);N=g.insert(()=>(Nt.debug("Rough node insert CXC",z),z),":first-child"),N.select("path:nth-child(2)").attr("style",d.join(";")),N.select("path").attr("style",f.join(";").replace("fill","stroke"))}else N=g.insert("rect",":first-child"),N.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",E).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:L}=gC(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+L})`),h){const A=y.select("span");A&&A.attr("style",h)}const O=N.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 Th(e,A)},{cluster:g,labelBBox:C}},"kanbanSection"),sY=B((i,e)=>{const r=Ze(),{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 _=Vt.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 Th(e,C)},{cluster:c,labelBBox:{}}},"divider"),oY=NR,lY={rect:NR,squareRect:oY,roundedWithTitle:nY,noteGroup:rY,divider:sY,kanbanSection:aY},AR=new Map,cY=B(async(i,e)=>{const r=e.shape||"rect",n=await lY[r](i,e);return AR.set(e.id,n),n},"insertCluster"),Tot=B(()=>{AR=new Map},"clear");function MR(i,e){return i.intersect(e)}B(MR,"intersectNode");var hY=MR;function BR(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}}B(BR,"intersectEllipse");var LR=BR;function OR(i,e,r){return LR(i,e,e,r)}B(OR,"intersectCircle");var uY=OR;function RR(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&&Av(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&&Av(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 E=k<0?(k-_)/C:(k+_)/C;return{x:T,y:E}}}B(RR,"intersectLine");function Av(i,e){return i*e>0}B(Av,"sameSign");var dY=RR;function DR(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=dY(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}B(DR,"intersectPolygon");var fY=DR,Wt={node:hY,circle:uY,ellipse:LR,polygon:fY,rect:Th};function jR(i,e){const{labelStyles:r}=Zt(e);e.labelStyle=r;const n=he(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=Vt.svg(o),d=Xt(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",_r(h)),te(e,g),e.intersect=function(x){return Nt.info("Circle intersect",e,c,x),Wt.circle(e,c,x)},o}B(jR,"anchor");function Mv(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),E=Math.atan2((e-T)/o,(i-k)/a);let L=Math.atan2((n-T)/o,(r-k)/a)-E;c&&L<0&&(L+=2*Math.PI),!c&&L>0&&(L-=2*Math.PI);const O=[];for(let A=0;A<20;A++){const M=A/19,z=E+M*L,D=k+a*Math.cos(z),$=T+o*Math.sin(z);O.push({x:D,y:$})}return O}B(Mv,"generateArcPoints");function FR(i,e,r){const[n,a]=[e,r].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(i/n/2)**2))}B(FR,"calculateArcSagitta");async function IR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=B(z=>z+c,"calcTotalHeight"),u=B(z=>{const D=z/2;return[D/(2.5+z/50),D]},"calcEllipseRadius"),{shapeSvg:d,bbox:f}=await fe(i,e,he(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:f.height),[x,y]=u(g),v=FR(g,x,y),_=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+v-v,k=g,{cssStyles:T}=e,E=[{x:_/2,y:-k/2},{x:-_/2,y:-k/2},...Mv(-_/2,-k/2,-_/2,k/2,x,y,!1),{x:_/2,y:k/2},...Mv(_/2,k/2,_/2,-k/2,x,y,!0)],N=Vt.svg(d),L=Xt(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const O=Ye(E),A=N.path(O,L),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)`),te(e,M),e.intersect=function(z){return Wt.polygon(e,E,z)},d}B(IR,"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+")")}B(zs,"insertPolygonShape");var wp=12;async function $R(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(e)),d=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+wp),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+wp,y},{x,y},{x,y:v},{x:g,y:v},{x:g,y:y+wp},{x:g+wp,y}];let _;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=Vt.svg(h),E=Xt(e,{}),N=Ye(C),L=T.path(N,E);_=h.insert(()=>L,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),k&&_.attr("style",k)}else _=zs(h,d,f,C);return n&&_.attr("style",n),te(e,_),e.intersect=function(T){return Wt.polygon(e,C,T)},h}B($R,"card");function zR(i,e){const{nodeStyles:r}=Zt(e);e.label="";const n=i.insert("g").attr("class",he(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=Vt.svg(n),u=Xt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Ye(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 Wt.polygon(e,c,x)},n}B(zR,"choice");async function NC(i,e,r){const{labelStyles:n,nodeStyles:a}=Zt(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await fe(i,e,he(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=Vt.svg(o),v=Xt(e,{}),C=y.circle(0,0,f*2,v);g=o.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",_r(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 te(e,g),e.calcIntersect=function(y,v){const C=y.width/2;return Wt.circle(y,C,v)},e.intersect=function(y){return Nt.info("Circle intersect",e,f,y),Wt.circle(e,f,y)},o}B(NC,"circle");function PR(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}
|
|
333
|
+
M ${a.x},${a.y} L ${c.x},${c.y}`}B(PR,"createLine");function qR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r,e.label="";const a=i.insert("g").attr("class",he(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=Vt.svg(a),u=Xt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,o*2,u),f=PR(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),te(e,x),e.intersect=function(y){return Nt.info("crossedCircle intersect",e,{radius:o,point:y}),Wt.circle(e,o,y)},a}B(qR,"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}B(_s,"generateCirclePoints");async function UR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await fe(i,e,he(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=Vt.svg(a),_=Xt(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=Ye(y).replace("Z",""),E=C.path(T,_),N=Ye(v),L=C.path(N,{..._}),O=a.insert("g",":first-child");return O.insert(()=>L,":first-child").attr("stroke-opacity",0),O.insert(()=>E,":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))})`),te(e,O),e.intersect=function(A){return Wt.polygon(e,v,A)},a}B(UR,"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}B(ks,"generateCirclePoints");async function HR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await fe(i,e,he(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=Vt.svg(a),_=Xt(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=Ye(y).replace("Z",""),E=C.path(T,_),N=Ye(v),L=C.path(N,{..._}),O=a.insert("g",":first-child");return O.insert(()=>L,":first-child").attr("stroke-opacity",0),O.insert(()=>E,":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))})`),te(e,O),e.intersect=function(A){return Wt.polygon(e,v,A)},a}B(HR,"curlyBraceRight");function Lr(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}B(Lr,"generateCirclePoints");async function WR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await fe(i,e,he(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=[...Lr(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},...Lr(d/2+g*2,-g,g,20,-180,-270),...Lr(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},...Lr(d/2,f/2,g,20,0,90)],v=[...Lr(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Lr(-d/2-g/2,-g,g,20,0,90),...Lr(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Lr(-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},...Lr(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},...Lr(d/2+g*2,-g,g,20,-180,-270),...Lr(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:f/2},...Lr(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},...Lr(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Lr(-d/2-g/2,-g,g,20,0,90),...Lr(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Lr(-d/2+g+g/2,f/2,g,30,-180,-270)],_=Vt.svg(a),k=Xt(e,{fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=Ye(y).replace("Z",""),N=_.path(E,k),O=Ye(v).replace("Z",""),A=_.path(O,k),M=Ye(C),z=_.path(M,{...k}),D=a.insert("g",":first-child");return D.insert(()=>z,":first-child").attr("stroke-opacity",0),D.insert(()=>N,":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))})`),te(e,D),e.intersect=function($){return Wt.polygon(e,C,$)},a}B(WR,"curlyBraces");async function GR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(d),_=Xt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=g,T=x,E=k-y,N=T/4,L=[{x:E,y:0},{x:N,y:0},{x:0,y:T/2},{x:N,y:T},{x:E,y:T},...Td(-E,-T/2,y,50,270,90)],O=Ye(L),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})`),te(e,M),e.intersect=function(z){return Wt.polygon(e,L,z)},d}B(GR,"curvedTrapezoid");var pY=B((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"),gY=B((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"),mY=B((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),IT=8,$T=8;async function YR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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<$T&&(e.width=$T);const T=_/2/(2.5+_/50);e.height=(e.height??0)-o-T*3,e.height<IT&&(e.height=IT)}const{shapeSvg:h,bbox:u,label:d}=await fe(i,e,he(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 _=Vt.svg(h),k=gY(0,0,f,y,g,x),T=mY(0,x,f,y,g,x),E=Xt(e,{}),N=_.path(k,E),L=_.path(T,Xt(e,{fill:"none"}));v=h.insert(()=>L,":first-child"),v=h.insert(()=>N,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const _=pY(0,0,f,y,g,x);v=h.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",_r(C)).attr("style",n)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),te(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=Wt.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 E=x*x*(1-T*T/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,_.y-(e.y??0)>0&&(E=-E),k.y+=E}return k},h}B(YR,"cylinder");async function KR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(e)),d=h.width+a,f=h.height+o,g=f*.2,x=-d/2,y=-f/2-g/2,{cssStyles:v}=e,C=Vt.svg(c),_=Xt(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(N=>[N.x,N.y]),_),E=c.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&E.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))})`),te(e,E),e.intersect=function(N){return Wt.rect(e,N)},c}B(KR,"dividedRectangle");async function VR(i,e){var y,v;const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(h),_=Xt(e,{roughness:.2,strokeWidth:2.5}),k=Xt(e,{roughness:.2,strokeWidth:1.5}),T=C.circle(0,0,d*2,_),E=C.circle(0,0,f*2,k);g=h.insert("g",":first-child"),g.attr("class",_r(e.cssClasses)).attr("style",_r(x)),(y=g.node())==null||y.appendChild(T),(v=g.node())==null||v.appendChild(E)}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 te(e,g),e.intersect=function(C){return Nt.info("DoubleCircle intersect",e,d,C),Wt.circle(e,d,C)},h}B(VR,"doublecircle");function XR(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=Zt(e);e.label="",e.labelStyle=n;const o=i.insert("g").attr("class",he(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=Vt.svg(o),{nodeBorder:d}=r,f=Xt(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),te(e,x),e.intersect=function(y){return Nt.info("filledCircle intersect",e,{radius:c,point:y}),Wt.circle(e,c,y)},o}B(XR,"filledCircle");var zT=10,PT=10;async function ZR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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<zT&&(e.height=zT),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<PT&&(e.width=PT));const{shapeSvg:c,bbox:h,label:u}=await fe(i,e,he(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=Vt.svg(c),C=Xt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=Ye(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,te(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(E){return Nt.info("Triangle intersect",e,x,E),Wt.polygon(e,x,E)},c}B(ZR,"flippedTriangle");function QR(i,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=Zt(e);e.label="";const c=i.insert("g").attr("class",he(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=Vt.svg(c),y=Xt(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),te(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 Wt.rect(e,k)},c}B(QR,"forkJoin");async function JR(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(u),C=Xt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-f/2,y:-g/2},{x:f/2-x,y:-g/2},...Td(-f/2+x,0,x,50,90,270),{x:f/2-x,y:g/2},{x:-f/2,y:g/2}],k=Ye(_),T=v.path(k,C),E=u.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),te(e,E),e.intersect=function(N){return Nt.info("Pill intersect",e,{radius:x,point:N}),Wt.polygon(e,_,N)},u}B(JR,"halfRoundedRectangle");var yY=B((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 t3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 E=(e.height??0)/a;e.width=((e==null?void 0:e.width)??0)-2*E-d,e.height=(e.height??0)-u}const{shapeSvg:f,bbox:g}=await fe(i,e,he(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=Vt.svg(f),E=Xt(e,{}),N=yY(0,0,v,x,y),L=T.path(N,E);_=f.insert(()=>L,":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,te(e,_),e.intersect=function(T){return Wt.polygon(e,C,T)},f}B(t3,"hexagon");async function e3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await fe(i,e,he(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=Vt.svg(a),d=Xt(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=Ye(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})`),te(e,y),e.intersect=function(v){return Nt.info("Pill intersect",e,{points:f}),Wt.polygon(e,f,v)},a}B(e3,"hourglass");async function i3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Zt(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 fe(i,e,"icon-shape default"),x=e.pos==="t",y=h,v=h,{nodeBorder:C}=r,{stylesMap:_}=Sh(e),k=-v/2,T=-y/2,E=e.label?8:0,N=Vt.svg(d),L=Xt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const O=N.rectangle(k,T,v,y,L),A=Math.max(v,f.width),M=y+f.height+E,z=N.rectangle(-A/2,-M/2,A,M,{...L,fill:"transparent",stroke:"none"}),D=d.insert(()=>O,":first-child"),$=d.insert(()=>z);if(e.icon){const U=d.append("g");U.html(`<g>${await Gd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const Y=U.node().getBBox(),I=Y.width,W=Y.height,j=Y.x,q=Y.y;U.attr("transform",`translate(${-I/2-j},${x?f.height/2+E/2-W/2-q:-f.height/2-E/2-W/2-q})`),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+E/2:-f.height/2-E/2})`),te(e,$),e.intersect=function(U){if(Nt.info("iconSquare intersect",e,U),!e.label)return Wt.rect(e,U);const Y=e.x??0,I=e.y??0,W=e.height??0;let j=[];return x?j=[{x:Y-f.width/2,y:I-W/2},{x:Y+f.width/2,y:I-W/2},{x:Y+f.width/2,y:I-W/2+f.height+E},{x:Y+v/2,y:I-W/2+f.height+E},{x:Y+v/2,y:I+W/2},{x:Y-v/2,y:I+W/2},{x:Y-v/2,y:I-W/2+f.height+E},{x:Y-f.width/2,y:I-W/2+f.height+E}]:j=[{x:Y-v/2,y:I-W/2},{x:Y+v/2,y:I-W/2},{x:Y+v/2,y:I-W/2+y},{x:Y+f.width/2,y:I-W/2+y},{x:Y+f.width/2/2,y:I+W/2},{x:Y-f.width/2,y:I+W/2},{x:Y-f.width/2,y:I-W/2+y},{x:Y-v/2,y:I-W/2+y}],Wt.polygon(e,j,U)},d}B(i3,"icon");async function r3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Zt(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 fe(i,e,"icon-shape default"),x=20,y=e.label?8:0,v=e.pos==="t",{nodeBorder:C,mainBkg:_}=r,{stylesMap:k}=Sh(e),T=Vt.svg(d),E=Xt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=k.get("fill");E.stroke=N??_;const L=d.append("g");e.icon&&L.html(`<g>${await Gd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const O=L.node().getBBox(),A=O.width,M=O.height,z=O.x,D=O.y,$=Math.max(A,M)*Math.SQRT2+x*2,U=T.circle(0,0,$,E),Y=Math.max($,f.width),I=$+f.height+y,W=T.rectangle(-Y/2,-I/2,Y,I,{...E,fill:"transparent",stroke:"none"}),j=d.insert(()=>U,":first-child"),q=d.insert(()=>W);return L.attr("transform",`translate(${-A/2-z},${v?f.height/2+y/2-M/2-D:-f.height/2-y/2-M/2-D})`),L.attr("style",`color: ${k.get("stroke")??C};`),g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-I/2:I/2-f.height})`),j.attr("transform",`translate(0,${v?f.height/2+y/2:-f.height/2-y/2})`),te(e,q),e.intersect=function(G){return Nt.info("iconSquare intersect",e,G),Wt.rect(e,G)},d}B(r3,"iconCircle");async function n3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Zt(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 fe(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:k}=r,{stylesMap:T}=Sh(e),E=-C/2,N=-v/2,L=e.label?8:0,O=Vt.svg(d),A=Xt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const z=O.path(zo(E,N,C,v,5),A),D=Math.max(C,f.width),$=v+f.height+L,U=O.rectangle(-D/2,-$/2,D,$,{...A,fill:"transparent",stroke:"none"}),Y=d.insert(()=>z,":first-child").attr("class","icon-shape2"),I=d.insert(()=>U);if(e.icon){const W=d.append("g");W.html(`<g>${await Gd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=W.node().getBBox(),q=j.width,G=j.height,it=j.x,nt=j.y;W.attr("transform",`translate(${-q/2-it},${y?f.height/2+L/2-G/2-nt:-f.height/2-L/2-G/2-nt})`),W.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-$/2:$/2-f.height})`),Y.attr("transform",`translate(0,${y?f.height/2+L/2:-f.height/2-L/2})`),te(e,I),e.intersect=function(W){if(Nt.info("iconSquare intersect",e,W),!e.label)return Wt.rect(e,W);const j=e.x??0,q=e.y??0,G=e.height??0;let it=[];return y?it=[{x:j-f.width/2,y:q-G/2},{x:j+f.width/2,y:q-G/2},{x:j+f.width/2,y:q-G/2+f.height+L},{x:j+C/2,y:q-G/2+f.height+L},{x:j+C/2,y:q+G/2},{x:j-C/2,y:q+G/2},{x:j-C/2,y:q-G/2+f.height+L},{x:j-f.width/2,y:q-G/2+f.height+L}]:it=[{x:j-C/2,y:q-G/2},{x:j+C/2,y:q-G/2},{x:j+C/2,y:q-G/2+v},{x:j+f.width/2,y:q-G/2+v},{x:j+f.width/2/2,y:q+G/2},{x:j-f.width/2,y:q+G/2},{x:j-f.width/2,y:q-G/2+v},{x:j-C/2,y:q-G/2+v}],Wt.polygon(e,it,W)},d}B(n3,"iconRounded");async function a3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Zt(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 fe(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:k}=r,{stylesMap:T}=Sh(e),E=-C/2,N=-v/2,L=e.label?8:0,O=Vt.svg(d),A=Xt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const z=O.path(zo(E,N,C,v,.1),A),D=Math.max(C,f.width),$=v+f.height+L,U=O.rectangle(-D/2,-$/2,D,$,{...A,fill:"transparent",stroke:"none"}),Y=d.insert(()=>z,":first-child"),I=d.insert(()=>U);if(e.icon){const W=d.append("g");W.html(`<g>${await Gd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=W.node().getBBox(),q=j.width,G=j.height,it=j.x,nt=j.y;W.attr("transform",`translate(${-q/2-it},${y?f.height/2+L/2-G/2-nt:-f.height/2-L/2-G/2-nt})`),W.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-$/2:$/2-f.height})`),Y.attr("transform",`translate(0,${y?f.height/2+L/2:-f.height/2-L/2})`),te(e,I),e.intersect=function(W){if(Nt.info("iconSquare intersect",e,W),!e.label)return Wt.rect(e,W);const j=e.x??0,q=e.y??0,G=e.height??0;let it=[];return y?it=[{x:j-f.width/2,y:q-G/2},{x:j+f.width/2,y:q-G/2},{x:j+f.width/2,y:q-G/2+f.height+L},{x:j+C/2,y:q-G/2+f.height+L},{x:j+C/2,y:q+G/2},{x:j-C/2,y:q+G/2},{x:j-C/2,y:q-G/2+f.height+L},{x:j-f.width/2,y:q-G/2+f.height+L}]:it=[{x:j-C/2,y:q-G/2},{x:j+C/2,y:q-G/2},{x:j+C/2,y:q-G/2+v},{x:j+f.width/2,y:q-G/2+v},{x:j+f.width/2/2,y:q+G/2},{x:j-f.width/2,y:q+G/2},{x:j-f.width/2,y:q-G/2+v},{x:j-C/2,y:q-G/2+v}],Wt.polygon(e,it,W)},d}B(a3,"iconSquare");async function s3(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}=Zt(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 fe(i,e,"image-shape default"),v=e.pos==="t",C=-d/2,_=-f/2,k=e.label?8:0,T=Vt.svg(g),E=Xt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=T.rectangle(C,_,d,f,E),L=Math.max(d,x.width),O=f+x.height+k,A=T.rectangle(-L/2,-O/2,L,O,{...E,fill:"none",stroke:"none"}),M=g.insert(()=>N,":first-child"),z=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})`),te(e,z),e.intersect=function(D){if(Nt.info("iconSquare intersect",e,D),!e.label)return Wt.rect(e,D);const $=e.x??0,U=e.y??0,Y=e.height??0;let I=[];return v?I=[{x:$-x.width/2,y:U-Y/2},{x:$+x.width/2,y:U-Y/2},{x:$+x.width/2,y:U-Y/2+x.height+k},{x:$+d/2,y:U-Y/2+x.height+k},{x:$+d/2,y:U+Y/2},{x:$-d/2,y:U+Y/2},{x:$-d/2,y:U-Y/2+x.height+k},{x:$-x.width/2,y:U-Y/2+x.height+k}]:I=[{x:$-d/2,y:U-Y/2},{x:$+d/2,y:U-Y/2},{x:$+d/2,y:U-Y/2+f},{x:$+x.width/2,y:U-Y/2+f},{x:$+x.width/2/2,y:U+Y/2},{x:$-x.width/2,y:U+Y/2},{x:$-x.width/2,y:U-Y/2+f},{x:$-d/2,y:U-Y/2+f}],Wt.polygon(e,I,D)},g}B(s3,"imageSquare");async function o3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await fe(i,e,he(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=Vt.svg(h),C=Xt(e,{}),_=Ye(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,te(e,x),e.intersect=function(v){return Wt.polygon(e,g,v)},h}B(o3,"inv_trapezoid");async function Kd(i,e,r){const{labelStyles:n,nodeStyles:a}=Zt(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await fe(i,e,he(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=Vt.svg(o),_=Xt(e,{}),k=x||y?C.path(zo(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",_r(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",_r(x)).attr("ry",_r(y)).attr("x",d).attr("y",f).attr("width",h).attr("height",u);return te(e,g),e.calcIntersect=function(C,_){return Wt.rect(C,_)},e.intersect=function(C){return Wt.rect(e,C)},o}B(Kd,"drawRect");async function l3(i,e){const{shapeSvg:r,bbox:n,label:a}=await fe(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))})`),te(e,o),e.intersect=function(u){return Wt.rect(e,u)},r}B(l3,"labelRect");async function c3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await fe(i,e,he(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=Vt.svg(h),C=Xt(e,{}),_=Ye(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,te(e,x),e.intersect=function(v){return Wt.polygon(e,g,v)},h}B(c3,"lean_left");async function h3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await fe(i,e,he(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=Vt.svg(h),C=Xt(e,{}),_=Ye(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,te(e,x),e.intersect=function(v){return Wt.polygon(e,g,v)},h}B(h3,"lean_right");function u3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.label="",e.labelStyle=r;const a=i.insert("g").attr("class",he(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=Vt.svg(a),g=Xt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=Ye(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})`),te(e,v),e.intersect=function(C){return Nt.info("lightningBolt intersect",e,C),Wt.polygon(e,d,C)},a}B(u3,"lightningBolt");var bY=B((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"),xY=B((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"),vY=B((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),qT=10,UT=10;async function d3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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<UT&&(e.width=UT);const E=k/2/(2.5+k/50);e.height=(e.height??0)-c-E*3,e.height<qT&&(e.height=qT)}const{shapeSvg:h,bbox:u,label:d}=await fe(i,e,he(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=Vt.svg(h),T=xY(0,0,f,y,g,x,v),E=vY(0,x,f,y,g,x),N=Xt(e,{}),L=k.path(T,N),O=k.path(E,N);h.insert(()=>O,":first-child").attr("class","line"),C=h.insert(()=>L,":first-child"),C.attr("class","basic label-container"),_&&C.attr("style",_)}else{const k=bY(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",_r(_)).attr("style",n)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),te(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=Wt.rect(e,k),E=T.x-(e.x??0);if(g!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-x)){let N=x*x*(1-E*E/(g*g));N>0&&(N=Math.sqrt(N)),N=x-N,k.y-(e.y??0)>0&&(N=-N),T.y+=N}return T},h}B(d3,"linedCylinder");async function f3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 N=e.width;e.width=(N??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 fe(i,e,he(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=Vt.svg(h),_=Xt(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},...Io(-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(N=>[N.x,N.y]),_),E=h.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.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))})`),te(e,E),e.intersect=function(N){return Wt.polygon(e,k,N)},h}B(f3,"linedWaveEdgedRect");async function p3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(u),E=Xt(e,{}),N=[{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}],L=[{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"&&(E.roughness=0,E.fillStyle="solid");const O=Ye(N);let A=T.path(O,E);const M=Ye(L);let z=T.path(M,E);e.look!=="handDrawn"&&(A=Nv(A),z=Nv(z));const D=u.insert("g",":first-child");return D.insert(()=>A),D.insert(()=>z),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))})`),te(e,D),e.intersect=function($){return Wt.polygon(e,N,$)},u}B(p3,"multiRect");async function g3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await fe(i,e,he(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,E=Io(C-k,_+v+k,C+g-k,_+v+k,y,.8),N=E==null?void 0:E[E.length-1],L=[{x:C-k,y:_+k},{x:C-k,y:_+v+k},...E,{x:C+g-k,y:N.y-k},{x:C+g,y:N.y-k},{x:C+g,y:N.y-2*k},{x:C+g+k,y:N.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:N.y-k},{x:C+g,y:N.y-k},{x:C+g,y:_},{x:C,y:_}],A=Vt.svg(a),M=Xt(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const z=Ye(L),D=A.path(z,M),$=Ye(O),U=A.path($,M),Y=a.insert(()=>D,":first-child");return Y.insert(()=>U),Y.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&Y.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&Y.selectAll("path").attr("style",n),Y.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))})`),te(e,Y),e.intersect=function(I){return Wt.polygon(e,L,I)},a}B(g3,"multiWaveEdgedRectangle");async function m3(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=Zt(e);e.labelStyle=n,e.useHtmlLabels||nn(Ii())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await fe(i,e,he(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=Vt.svg(c),C=Xt(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))})`),te(e,k),e.intersect=function(T){return Wt.rect(e,T)},c}B(m3,"note");var CY=B((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 y3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await fe(i,e,he(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=Vt.svg(a),v=Xt(e,{}),C=CY(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),te(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=Wt.polygon(y,_,v);return{x:k.x-.5,y:k.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}B(y3,"question");async function b3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(h),T=Xt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=Ye(C),N=k.path(E,T),L=h.insert(()=>N,":first-child");return L.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.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))})`),te(e,L),e.intersect=function(O){return Wt.polygon(e,C,O)},h}B(b3,"rect_left_inv_arrow");async function x3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 Ao(h,d,e.labelStyle,!0,!0);let g={width:0,height:0};if(nn(Ze())){const M=f.children[0],z=ce(f);g=M.getBoundingClientRect(),z.attr("width",g.width),z.attr("height",g.height)}Nt.info("Text 2",u);const x=u||[],y=f.getBBox(),v=await Ao(h,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),C=v.children[0],_=ce(v);g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height);const k=(e.padding||0)/2;ce(v).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+k+5)+")"),ce(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),E=g.height+(e.padding||0),N=-g.width/2-k,L=-g.height/2-k;let O,A;if(e.look==="handDrawn"){const M=Vt.svg(o),z=Xt(e,{}),D=M.path(zo(N,L,T,E,e.rx||0),z),$=M.line(-g.width/2-k,-g.height/2-k+y.height+k,g.width/2+k,-g.height/2-k+y.height+k,z);A=o.insert(()=>(Nt.debug("Rough node insert CXC",D),$),":first-child"),O=o.insert(()=>(Nt.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 te(e,O),e.intersect=function(M){return Wt.rect(e,M)},o}B(x3,"rectWithTitle");async function v3(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 Kd(i,e,a)}B(v3,"roundedRect");var sl=8;async function C3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(e)),d=((e==null?void 0:e.width)??h.width)+a*2+(e.look==="neo"?sl:sl*2),f=((e==null?void 0:e.height)??h.height)+o*2,g=d-sl,x=f,y=sl-d/2,v=-f/2,{cssStyles:C}=e,_=Vt.svg(c),k=Xt(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-sl,y:v+x},{x:y-sl,y:v},{x:y,y:v},{x:y,y:v+x}],E=_.polygon(T.map(L=>[L.x,L.y]),k),N=c.insert(()=>E,":first-child");return N.attr("class","basic label-container outer-path").attr("style",_r(C)),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),C&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),u.attr("transform",`translate(${sl/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),te(e,N),e.intersect=function(L){return Wt.rect(e,L)},c}B(C3,"shadedProcess");async function _3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(h),T=Xt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=[{x:v,y:C},{x:v,y:C+y},{x:v+x,y:C+y},{x:v+x,y:C-y/2}],N=Ye(E),L=k.path(N,T),O=h.insert(()=>L,":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))})`),te(e,O),e.intersect=function(A){return Wt.polygon(e,E,A)},h}B(_3,"slopedRect");async function k3(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 Kd(i,e,o)}B(k3,"squareRect");async function w3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(h),v=Xt(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},...Td(-f/2+g,0,g,50,90,270),{x:f/2-g,y:d/2},...Td(f/2-g,0,g,50,270,450)],_=Ye(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),te(e,T),e.intersect=function(E){return Wt.polygon(e,C,E)},h}B(w3,"stadium");async function S3(i,e){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Kd(i,e,r)}B(S3,"state");function T3(i,e,{config:{themeVariables:r}}){var T,E;const{labelStyles:n,nodeStyles:a}=Zt(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=Vt.svg(f),x=Xt(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 N=((E=(T=i.node())==null?void 0:T.ownerSVGElement)==null?void 0:E.id)??"",L=N?`${N}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${L})`)}return te(e,k),e.intersect=function(N){return Wt.circle(e,(e.width??0)/2,N)},f}B(T3,"stateEnd");function E3(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=Vt.svg(o).circle(0,0,e.width,MW(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 te(e,c),e.intersect=function(d){return Wt.circle(e,(e.width??7)/2,d)},o}B(E3,"stateStart");var Nc=8;async function N3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(e)),d=((e==null?void 0:e.width)??u.width)+2*Nc+o,f=((e==null?void 0:e.height)??u.height)+c,g=d-2*Nc,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 _=Vt.svg(h),k=Xt(e,{}),T=_.rectangle(y,v,g+16,x,k),E=_.line(y+Nc,v,y+Nc,v+x,k),N=_.line(y+Nc+g,v,y+Nc+g,v+x,k);h.insert(()=>E,":first-child"),h.insert(()=>N,":first-child");const L=h.insert(()=>T,":first-child"),{cssStyles:O}=e;L.attr("class","basic label-container").attr("style",_r(O)),te(e,L)}else{const _=zs(h,g,x,C);n&&_.attr("style",n),te(e,_)}return e.intersect=function(_){return Wt.polygon(e,C,_)},h}B(N3,"subroutine");var i0=.2;async function A3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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-i0*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await fe(i,e,he(e)),d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,f=i0*d,g=i0*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=Vt.svg(h),E=Xt(e,{}),N=[{x:C-f/2,y:_},{x:C+y+f/2,y:_},{x:C+y+f/2,y:_+v},{x:C-f/2,y:_+v}],L=[{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"&&(E.roughness=0,E.fillStyle="solid");const O=Ye(N),A=T.path(O,E),M=Ye(L),z=T.path(M,{...E,fillStyle:"solid"}),D=h.insert(()=>z,":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),te(e,D),e.intersect=function($){return Wt.polygon(e,N,$)},h}B(A3,"taggedRect");async function M3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await fe(i,e,he(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=Vt.svg(a),C=Xt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-h/2-h/2*.1,y:x/2},...Io(-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,E=[{x:k+h-f,y:(T+u)*1.3},{x:k+h,y:T+u-g},{x:k+h,y:(T+u)*.9},...Io(k+h,(T+u)*1.25,k+h-f,(T+u)*1.3,-u*.02,.5)],N=Ye(_),L=v.path(N,C),O=Ye(E),A=v.path(O,{...C,fillStyle:"solid"}),M=a.insert(()=>A,":first-child");return M.insert(()=>L,":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))})`),te(e,M),e.intersect=function(z){return Wt.polygon(e,_,z)},a}B(M3,"taggedWaveEdgedRectangle");async function B3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await fe(i,e,he(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),te(e,f),e.intersect=function(g){return Wt.rect(e,g)},a}B(B3,"text");var _Y=B((i,e,r,n,a,o)=>`M${i},${e}
|
|
334
|
+
a${a},${o} 0,0,1 0,${-n}
|
|
335
|
+
l${r},0
|
|
336
|
+
a${a},${o} 0,0,1 0,${n}
|
|
337
|
+
M${r},${-n}
|
|
338
|
+
a${a},${o} 0,0,0 0,${n}
|
|
339
|
+
l${-r},0`,"createCylinderPathD"),kY=B((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"),wY=B((i,e,r,n,a,o)=>[`M${i+r/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),HT=5,WT=10;async function L3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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<HT&&(e.height=HT);const k=C/2/(2.5+C/50);e.width=(e.width??0)-o-k*3,e.width<WT&&(e.width=WT)}const{shapeSvg:c,bbox:h,label:u}=await fe(i,e,he(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=Vt.svg(c),_=kY(0,0,x,d,g,f),k=wY(0,0,x,d,g,f),T=C.path(_,Xt(e,{})),E=C.path(k,Xt(e,{fill:"none"}));v=c.insert(()=>E,":first-child"),v=c.insert(()=>T,":first-child"),v.attr("class","basic label-container"),y&&v.attr("style",y)}else{const C=_Y(0,0,x,d,g,f);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",_r(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))})`),te(e,v),e.intersect=function(C){const _=Wt.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}B(L3,"tiltedCylinder");async function O3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(h),C=Xt(e,{}),_=Ye(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,te(e,x),e.intersect=function(v){return Wt.polygon(e,g,v)},h}B(O3,"trapezoid");async function R3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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=Vt.svg(d),C=Xt(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=Ye(_),T=v.path(k,C),E=d.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),te(e,E),e.intersect=function(N){return Wt.polygon(e,_,N)},d}B(R3,"trapezoidalPentagon");var GT=10,YT=10;async function D3(i,e){var N;const{labelStyles:r,nodeStyles:n}=Zt(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<YT&&(e.width=YT),e.height=(e==null?void 0:e.height)??0,e.height<GT&&(e.height=GT));const{shapeSvg:c,bbox:h,label:u}=await fe(i,e,he(e)),d=Fs((N=Ze().flowchart)==null?void 0:N.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=Vt.svg(c),_=Xt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=Ye(y),T=C.path(k,_),E=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),e.width=f,e.height=g,te(e,E),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(L){return Nt.info("Triangle intersect",e,y,L),Wt.polygon(e,y,L)},c}B(D3,"triangle");async function j3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 fe(i,e,he(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,E=Vt.svg(u),N=Xt(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const L=[{x:-g/2-T,y:v/2},...Io(-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=Ye(L),A=E.path(O,N),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))})`),te(e,M),e.intersect=function(z){return Wt.polygon(e,L,z)},u}B(j3,"waveEdgedRectangle");async function F3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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 N=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-N*(20/9)),e.width=e.width-o*2}const{shapeSvg:h,bbox:u}=await fe(i,e,he(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=Vt.svg(h),C=Xt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-d/2,y:x/2},...Io(-d/2,x/2,d/2,x/2,g,1),{x:d/2,y:-x/2},...Io(d/2,-x/2,-d/2,-x/2,g,-1)],k=Ye(_),T=v.path(k,C),E=h.insert(()=>T,":first-child");return E.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),te(e,E),e.intersect=function(N){return Wt.polygon(e,_,N)},h}B(F3,"waveRectangle");var Gi=10;async function I3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(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-Gi,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-Gi,10));const{shapeSvg:c,bbox:h,label:u}=await fe(i,e,he(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+Gi,f=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+Gi,g=d-Gi,x=f-Gi,y=-g/2,v=-x/2,{cssStyles:C}=e,_=Vt.svg(c),k=Xt(e,{}),T=[{x:y-Gi,y:v-Gi},{x:y-Gi,y:v+x},{x:y+g,y:v+x},{x:y+g,y:v-Gi}],E=`M${y-Gi},${v-Gi} L${y+g},${v-Gi} L${y+g},${v+x} L${y-Gi},${v+x} L${y-Gi},${v-Gi}
|
|
340
|
+
M${y-Gi},${v} L${y+g},${v}
|
|
341
|
+
M${y},${v-Gi} L${y},${v+x}`;e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const N=_.path(E,k),L=c.insert(()=>N,":first-child");return L.attr("transform",`translate(${Gi/2}, ${Gi/2})`),L.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+Gi/2-(h.x-(h.left??0))}, ${-(h.height/2)+Gi/2-(h.y-(h.top??0))})`),te(e,L),e.intersect=function(O){return Wt.polygon(e,T,O)},c}B(I3,"windowPane");var KT=new Set(["redux-color","redux-dark-color"]),SY=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function AC(i,e){var ot,X,Z,st;const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:a}=Ii(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:ct}=Ii(),{background:vt}=ct,At={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${vt}`]};await AC(i,At)}const d=Ii();e.useHtmlLabels=d.htmlLabels;let f=((ot=d.er)==null?void 0:ot.diagramPadding)??10,g=((X=d.er)==null?void 0:X.entityPadding)??6;const{cssStyles:x}=e,{labelStyles:y,nodeStyles:v}=Zt(e);if(r.attributes.length===0&&e.label){const ct={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5};js(e.label,d)+ct.labelPaddingX*2<d.er.minEntityWidth&&(e.width=d.er.minEntityWidth);const vt=await Kd(i,e,ct);if(n!=null&&KT.has(n)){const At=r.colorIndex??0;vt.attr("data-color-id",`color-${At%u.length}`)}if(!Fs(d.htmlLabels)){const At=vt.select("text"),Ft=(Z=At.node())==null?void 0:Z.getBBox();At.attr("transform",`translate(${-Ft.width/2}, 0)`)}return vt}d.htmlLabels||(f*=1.25,g*=1.25);let C=he(e);C||(C="node default");const _=i.insert("g").attr("class",C).attr("id",e.domId||e.id),k=await Rc(_,e.label??"",d,0,0,["name"],y);k.height+=g;let T=0;const E=[],N=[];let L=0,O=0,A=0,M=0,z=!0,D=!0;for(const ct of r.attributes){const vt=await Rc(_,ct.type,d,0,T,["attribute-type"],y);L=Math.max(L,vt.width+f);const At=await Rc(_,ct.name,d,0,T,["attribute-name"],y);O=Math.max(O,At.width+f);const Ft=await Rc(_,ct.keys.join(),d,0,T,["attribute-keys"],y);A=Math.max(A,Ft.width+f);const zt=await Rc(_,ct.comment,d,0,T,["attribute-comment"],y);M=Math.max(M,zt.width+f);const Rt=Math.max(vt.height,At.height,Ft.height,zt.height)+g;N.push({yOffset:T,rowHeight:Rt}),T+=Rt}let $=4;A<=f&&(z=!1,A=0,$--),M<=f&&(D=!1,M=0,$--);const U=_.node().getBBox();if(k.width+f*2-(L+O+A+M)>0){const ct=k.width+f*2-(L+O+A+M);L+=ct/$,O+=ct/$,A>0&&(A+=ct/$),M>0&&(M+=ct/$)}const Y=L+O+A+M,I=Vt.svg(_),W=Xt(e,{});e.look!=="handDrawn"&&(W.roughness=0,W.fillStyle="solid");let j=0;N.length>0&&(j=N.reduce((ct,vt)=>ct+((vt==null?void 0:vt.rowHeight)??0),0));const q=Math.max(U.width+f*2,(e==null?void 0:e.width)||0,Y),G=Math.max((j??0)+k.height,(e==null?void 0:e.height)||0),it=-q/2,nt=-G/2;if(_.selectAll("g:not(:first-child)").each((ct,vt,At)=>{const Ft=ce(At[vt]),zt=Ft.attr("transform");let Rt=0,Yt=0;if(zt){const ti=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(zt);ti&&(Rt=parseFloat(ti[1]),Yt=parseFloat(ti[2]),Ft.attr("class").includes("attribute-name")?Rt+=L:Ft.attr("class").includes("attribute-keys")?Rt+=L+O:Ft.attr("class").includes("attribute-comment")&&(Rt+=L+O+A))}Ft.attr("transform",`translate(${it+f/2+Rt}, ${Yt+nt+k.height+g/2})`)}),_.select(".name").attr("transform","translate("+-k.width/2+", "+(nt+g/2)+")"),n!=null&&KT.has(n)){const ct=r.colorIndex??0;_.attr("data-color-id",`color-${ct%u.length}`)}const H=I.rectangle(it,nt,q,G,W),rt=_.insert(()=>H,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(const[ct,vt]of N.entries()){const Ft=(ct+1)%2===0&&vt.yOffset!==0,zt=I.rectangle(it,k.height+nt+(vt==null?void 0:vt.yOffset),q,vt==null?void 0:vt.rowHeight,{...W,fill:Ft?o:c,stroke:h});_.insert(()=>zt,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Ft?"even":"odd"}`)}const ft=1e-4;let Q=Dc(it,k.height+nt,q+it,k.height+nt,ft),yt=I.polygon(Q.map(ct=>[ct.x,ct.y]),W);if(_.insert(()=>yt).attr("class","divider"),Q=Dc(L+it,k.height+nt,L+it,G+nt,ft),yt=I.polygon(Q.map(ct=>[ct.x,ct.y]),W),_.insert(()=>yt).attr("class","divider"),z){const ct=L+O+it;Q=Dc(ct,k.height+nt,ct,G+nt,ft),yt=I.polygon(Q.map(vt=>[vt.x,vt.y]),W),_.insert(()=>yt).attr("class","divider")}if(D){const ct=L+O+A+it;Q=Dc(ct,k.height+nt,ct,G+nt,ft),yt=I.polygon(Q.map(vt=>[vt.x,vt.y]),W),_.insert(()=>yt).attr("class","divider")}for(const ct of E){const vt=k.height+nt+ct;Q=Dc(it,vt,q+it,vt,ft),yt=I.polygon(Q.map(At=>[At.x,At.y]),W),_.insert(()=>yt).attr("class","divider")}if(te(e,rt),v&&e.look!=="handDrawn")if(n!=null&&SY.has(n))_.selectAll("path").attr("style",v);else{const ct=v.split(";"),vt=(st=ct==null?void 0:ct.filter(At=>At.includes("stroke")))==null?void 0:st.map(At=>`${At}`).join("; ");_.selectAll("path").attr("style",vt??""),_.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(ct){return Wt.rect(e,ct)},_}B(AC,"erBox");async function Rc(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!==v2(e)&&(e=v2(e),e=e.replaceAll("<","<").replaceAll(">",">"));const u=h.node().appendChild(await $s(h,e,{width:js(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(Fs(r.htmlLabels)){const f=u.children[0];f.style.textAlign="start";const g=ce(u);d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}B(Rc,"addText");function Dc(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}]}B(Dc,"lineToPolygon");async function $3(i,e,r,n,a=r.class.padding??12){const o=n?0:3,c=i.insert("g").attr("class",he(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 Xu(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await Xu(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 E=await Xu(d,T,C,[T.parseClassifier()]);C+=E+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 E=await Xu(f,T,_,[T.parseClassifier()]);_+=E+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}}B($3,"textHelper");async function Xu(i,e,r,n=[]){const a=i.insert("g").attr("class","label").attr("style",n.join("; ")),o=Ii();let c="useHtmlLabels"in e?e.useHtmlLabels:Fs(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),pd(h)&&(c=!0);const u=await $s(a,R1($l(h)),{width:js(h,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let d,f=1;if(c){const g=u.children[0],x=ce(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 E=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,L=parseInt(E,10)*5+"px";C.style.minWidth=L,C.style.maxWidth=L}else C.style.width="100%";_(C)}B(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")&&ce(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}B(Xu,"addText");async function z3(i,e){var I,W;const r=Ze(),{themeVariables:n}=r,{useGradient:a}=n,o=r.class.padding??12,c=o,h=e.useHtmlLabels??Fs(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:d,bbox:f}=await $3(i,e,r,h,c),{labelStyles:g,nodeStyles:x}=Zt(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=((I=u.styles)==null?void 0:I.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=Vt.svg(d),_=Xt(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 E=(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 N=-k/2,L=-T/2;let O=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;E&&(O=o*2);const A=C.rectangle(N-o,L-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 z=M.node().getBBox(),D=d.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,$=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,Y=(D+$+L+o-(L-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each((j,q,G)=>{var Q,yt;const it=ce(G[q]),nt=it.attr("transform");let H=0;if(nt){const X=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(nt);X&&(H=parseFloat(X[2]))}let rt=H+L+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(it.attr("class").includes("methods-group")){const ot=Math.max(U,c/2);E?rt=Math.max(Y,D+$+ot+L+c*2+o)+c*2:rt=D+$+ot+L+c*4+o}u.members.length===0&&u.methods.length===0&&((Q=r.class)!=null&&Q.hideEmptyMembersBox)&&(u.annotations.length>0?rt=H-c:rt=H),h||(rt-=4);let ft=N;(it.attr("class").includes("label-group")||it.attr("class").includes("annotation-group"))&&(ft=-((yt=it.node())==null?void 0:yt.getBBox().width)/2||0,d.selectAll("text").each(function(ot,X,Z){window.getComputedStyle(Z[X]).textAnchor==="middle"&&(ft=0)})),it.attr("transform",`translate(${ft}, ${rt})`)}),u.members.length>0||u.methods.length>0||v){const j=D+$+L+o,q=C.line(z.x,j,z.x+z.width,j+.001,_);d.insert(()=>q).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+$+U+L+c*2+o,q=C.line(z.x,E?Math.max(Y,j):j,z.x+z.width,(E?Math.max(Y,j):j)+.001,_);d.insert(()=>q).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*([^;]*)/),q=j.exec(y);if(q){const G=q[0].replace("color","fill");d.selectAll("tspan").attr("style",G)}else if(g){const G=j.exec(g);if(G){const it=G[0].replace("color","fill");d.selectAll("tspan").attr("style",it)}}}return te(e,M),e.intersect=function(j){return Wt.rect(e,j)},d}B(z3,"classBox");async function P3(i,e){var z,D;const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,d=he(e),{themeVariables:f}=Ze(),{borderColorArray:g,requirementEdgeLabelBackground:x}=f,y=i.insert("g").attr("class",d).attr("id",e.domId??e.id);let v;u?v=await ja(y,`<<${a.type}>>`,0,e.labelStyle):v=await ja(y,"<<Element>>",0,e.labelStyle);let C=v;const _=await ja(y,a.name,C,e.labelStyle+"; font-weight: bold;");if(C+=_+h,u){const $=await ja(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,C,e.labelStyle);C+=$;const U=await ja(y,`${a.text?`Text: ${a.text}`:""}`,C,e.labelStyle);C+=U;const Y=await ja(y,`${a.risk?`Risk: ${a.risk}`:""}`,C,e.labelStyle);C+=Y,await ja(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,C,e.labelStyle)}else{const $=await ja(y,`${o.type?`Type: ${o.type}`:""}`,C,e.labelStyle);C+=$,await ja(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,e.labelStyle)}const k=(((z=y.node())==null?void 0:z.getBBox().width)??200)+c,T=(((D=y.node())==null?void 0:D.getBBox().height)??200)+c,E=-k/2,N=-T/2,L=Vt.svg(y),O=Xt(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const A=L.rectangle(E,N,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 $=e.colorIndex??0;y.attr("data-color-id",`color-${$%g.length}`)}if(y.selectAll(".label").each(($,U,Y)=>{const I=ce(Y[U]),W=I.attr("transform");let j=0,q=0;if(W){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);H&&(j=parseFloat(H[1]),q=parseFloat(H[2]))}const G=q-T/2;let it=E+c/2;(U===0||U===1)&&(it=j),I.attr("transform",`translate(${it}, ${G+c})`)}),C>v+_+h){const $=N+v+_+h;let U;if(e.look==="neo"){const W=[[E,$],[E+k,$],[E+k,$+.001],[E,$+.001]];U=L.polygon(W,O)}else U=L.line(E,$,E+k,$,O);y.insert(()=>U).attr("class","divider")}return te(e,M),e.intersect=function($){return Wt.rect(e,$)},n&&e.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}B(P3,"requirementBox");async function ja(i,e,r,n=""){if(e==="")return 0;const a=i.insert("g").attr("class","label").attr("style",n),o=Ze(),c=o.htmlLabels??!0,h=await $s(a,R1($l(e)),{width:js(e,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},o);let u;if(c){const d=h.children[0],f=ce(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}B(ja,"addText");var TY=B(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 q3(i,e,{config:r}){var U,Y;const{labelStyles:n,nodeStyles:a}=Zt(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:d}=await fe(i,e,he(e)),f=e.padding||10;let g="",x;"ticket"in e&&e.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(g=(Y=r==null?void 0:r.kanban)==null?void 0:Y.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 e0(x,"ticket"in e&&e.ticket||"",y):{label:v,bbox:C}=await e0(h,"ticket"in e&&e.ticket||"",y);const{label:_,bbox:k}=await e0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,E=(e==null?void 0:e.width)||0,N=Math.max(C.height,k.height)/2,L=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+N,O=-E/2,A=-L/2;d.attr("transform","translate("+(f-E/2)+", "+(-N-u.height/2)+")"),v.attr("transform","translate("+(f-E/2)+", "+(-N+u.height/2)+")"),_.attr("transform","translate("+(f+E/2-k.width-2*o)+", "+(-N+u.height/2)+")");let M;const{rx:z,ry:D}=e,{cssStyles:$}=e;if(e.look==="handDrawn"){const I=Vt.svg(h),W=Xt(e,{}),j=z||D?I.path(zo(O,A,E,L,z||0),W):I.rectangle(O,A,E,L,W);M=h.insert(()=>j,":first-child"),M.attr("class","basic label-container").attr("style",$||null)}else{M=h.insert("rect",":first-child"),M.attr("class","basic label-container __APA__").attr("style",a).attr("rx",z??5).attr("ry",D??5).attr("x",O).attr("y",A).attr("width",E).attr("height",L);const I="priority"in e&&e.priority;if(I){const W=h.append("line"),j=O+2,q=A+Math.floor((z??0)/2),G=A+L-Math.floor((z??0)/2);W.attr("x1",j).attr("y1",q).attr("x2",j).attr("y2",G).attr("stroke-width","4").attr("stroke",TY(I))}}return te(e,M),e.height=L,e.intersect=function(I){return Wt.rect(e,I)},h}B(q3,"kanbanItem");async function U3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await fe(i,e,he(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
|
|
342
|
+
a${f},${f} 1 0,0 ${v*.25},${-1*C*.1}
|
|
343
|
+
a${f},${f} 1 0,0 ${v*.25},0
|
|
344
|
+
a${f},${f} 1 0,0 ${v*.25},0
|
|
345
|
+
a${f},${f} 1 0,0 ${v*.25},${C*.1}
|
|
346
|
+
|
|
347
|
+
a${f},${f} 1 0,0 ${v*.15},${C*.33}
|
|
348
|
+
a${f*.8},${f*.8} 1 0,0 0,${C*.34}
|
|
349
|
+
a${f},${f} 1 0,0 ${-1*v*.15},${C*.33}
|
|
350
|
+
|
|
351
|
+
a${f},${f} 1 0,0 ${-1*v*.25},${C*.15}
|
|
352
|
+
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
353
|
+
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
354
|
+
a${f},${f} 1 0,0 ${-1*v*.25},${-1*C*.15}
|
|
355
|
+
|
|
356
|
+
a${f},${f} 1 0,0 ${-1*v*.1},${-1*C*.33}
|
|
357
|
+
a${f*.8},${f*.8} 1 0,0 0,${-1*C*.34}
|
|
358
|
+
a${f},${f} 1 0,0 ${v*.1},${-1*C*.33}
|
|
359
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const T=Vt.svg(a),E=Xt(e,{}),N=T.path(k,E);_=a.insert(()=>N,":first-child"),_.attr("class","basic label-container").attr("style",_r(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})`),te(e,_),e.calcIntersect=function(T,E){return Wt.rect(T,E)},e.intersect=function(T){return Nt.info("Bang intersect",e,T),Wt.rect(e,T)},a}B(U3,"bang");async function H3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await fe(i,e,he(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
|
|
360
|
+
a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
|
|
361
|
+
a${x},${x} 1 0,1 ${u*.4},${-1*u*.1}
|
|
362
|
+
a${g},${g} 1 0,1 ${u*.35},${u*.2}
|
|
363
|
+
|
|
364
|
+
a${f},${f} 1 0,1 ${u*.15},${d*.35}
|
|
365
|
+
a${y},${y} 1 0,1 ${-1*u*.15},${d*.65}
|
|
366
|
+
|
|
367
|
+
a${g},${f} 1 0,1 ${-1*u*.25},${u*.15}
|
|
368
|
+
a${x},${x} 1 0,1 ${-1*u*.5},0
|
|
369
|
+
a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
370
|
+
|
|
371
|
+
a${f},${f} 1 0,1 ${-1*u*.1},${-1*d*.35}
|
|
372
|
+
a${y},${y} 1 0,1 ${u*.1},${-1*d*.65}
|
|
373
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const k=Vt.svg(a),T=Xt(e,{}),E=k.path(_,T);C=a.insert(()=>E,":first-child"),C.attr("class","basic label-container").attr("style",_r(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})`),te(e,C),e.calcIntersect=function(k,T){return Wt.rect(k,T)},e.intersect=function(k){return Nt.info("Cloud intersect",e,k),Wt.rect(e,k)},a}B(H3,"cloud");async function W3(i,e){const{labelStyles:r,nodeStyles:n}=Zt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await fe(i,e,he(e)),u=o.width+8*c,d=o.height+2*c,f=5,g=e.look==="neo"?`
|
|
374
|
+
M${-u/2} ${d/2-f}
|
|
375
|
+
v${-d+2*f}
|
|
376
|
+
q0,-${f} ${f},-${f}
|
|
377
|
+
h${u-2*f}
|
|
378
|
+
q${f},0 ${f},${f}
|
|
379
|
+
v${d-f}
|
|
380
|
+
H${-u/2}
|
|
381
|
+
Z
|
|
382
|
+
`:`
|
|
383
|
+
M${-u/2} ${d/2-f}
|
|
384
|
+
v${-d+2*f}
|
|
385
|
+
q0,-${f} ${f},-${f}
|
|
386
|
+
h${u-2*f}
|
|
387
|
+
q${f},0 ${f},${f}
|
|
388
|
+
v${d-2*f}
|
|
389
|
+
q0,${f} ${-f},${f}
|
|
390
|
+
h${-(u-2*f)}
|
|
391
|
+
q${-f},0 ${-f},${-f}
|
|
392
|
+
Z
|
|
393
|
+
`;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()),te(e,x),e.calcIntersect=function(y,v){return Wt.rect(y,v)},e.intersect=function(y){return Wt.rect(e,y)},a}B(W3,"defaultMindmapNode");async function G3(i,e){const r={padding:e.padding??0};return NC(i,e,r)}B(G3,"mindmapCircle");var EY=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:k3},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:v3},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:w3},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:N3},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:YR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:NC},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:U3},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:H3},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:y3},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:t3},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:h3},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:c3},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:O3},{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:o3},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:VR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:B3},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:$R},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:C3},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:E3},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:T3},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:QR},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:e3},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:UR},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:HR},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:WR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:u3},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:j3},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:JR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:L3},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:d3},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:GR},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:KR},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:D3},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:I3},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:XR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:R3},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ZR},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:_3},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:g3},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:p3},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:IR},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:qR},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:M3},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:A3},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:F3},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:b3},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:f3}],NY=B(()=>{const e=[...Object.entries({state:S3,choice:zR,note:m3,rectWithTitle:x3,labelRect:l3,iconSquare:a3,iconCircle:r3,icon:i3,iconRounded:n3,imageSquare:s3,anchor:jR,kanbanItem:q3,mindmapCircle:G3,defaultMindmapNode:W3,classBox:z3,erBox:AC,requirementBox:P3}),...EY.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Y3=NY();function AY(i){return i in Y3}B(AY,"isValidShape");var ym=new Map;async function K3(i,e,r){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?Y3[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",_r(e.look)),e.tooltip&&a.attr("title",e.tooltip),ym.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}B(K3,"insertNode");var Eot=B((i,e)=>{ym.set(e.id,i)},"setNodeElem"),Not=B(()=>{ym.clear()},"clear"),Aot=B(i=>{const e=ym.get(i.id);Nt.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"),MY=B((i,e,r,n,a,o=!1,c)=>{e.arrowTypeStart&&VT(i,"start",e.arrowTypeStart,r,n,a,o,c),e.arrowTypeEnd&&VT(i,"end",e.arrowTypeEnd,r,n,a,o,c)},"addEdgeMarkers"),BY={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}},LY=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],VT=B((i,e,r,n,a,o,c=!1,h)=>{var v;const u=BY[r],d=u&&LY.includes(u.type);if(!u){Nt.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(N=>{N.setAttribute("stroke",h),u.fill&&N.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"),OY=B(i=>{var e,r;return typeof i=="string"?i:(r=(e=Ze())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Ig=new Map,Or=new Map,Mot=B(()=>{Ig.clear(),Or.clear()},"clear"),Mu=B(i=>i?typeof i=="string"?i:i.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),RY=B(async(i,e)=>{const r=Ze();let n=nn(r);const{labelStyles:a}=Zt(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:Mu(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},r);c.node().appendChild(d),Nt.info("abc82",e,e.labelType);let f=d.getBBox(),g=f;if(n){const y=d.children[0],v=ce(d);f=y.getBoundingClientRect(),g=f,v.attr("width",f.width),v.attr("height",f.height)}else{const y=ce(d).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",wu(g,n)),Ig.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 Ao(v,e.startLabelLeft,Mu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ce(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",wu(_,n)),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).startLeft=y,Zu(x,e.startLabelLeft)}if(e.startLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Ao(v,e.startLabelRight,Mu(e.labelStyle)||"",!1,!1);x=C,v.node().appendChild(C);let _=C.getBBox();if(n){const k=C.children[0],T=ce(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",wu(_,n)),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).startRight=y,Zu(x,e.startLabelRight)}if(e.endLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Ao(v,e.endLabelLeft,Mu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ce(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",wu(_,n)),y.node().appendChild(C),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).endLeft=y,Zu(x,e.endLabelLeft)}if(e.endLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Ao(v,e.endLabelRight,Mu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ce(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",wu(_,n)),y.node().appendChild(C),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).endRight=y,Zu(x,e.endLabelRight)}return d},"insertEdgeLabel");function Zu(i,e){nn(Ze())&&i&&(i.style.width=e.length*9+"px",i.style.height="12px")}B(Zu,"setTerminalWidth");var DY=B((i,e)=>{Nt.debug("Moving label abc88 ",i.id,i.label,Ig.get(i.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=Ze(),{subGraphTitleTotalMargin:a}=gC(n);if(i.label){const o=Ig.get(i.id);let c=i.x,h=i.y;if(r){const u=ba.calcLabelPosition(r);Nt.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=Or.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=Or.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=Or.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=Or.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"),jY=B((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"),FY=B((i,e,r)=>{Nt.debug(`intersection calc abc89:
|
|
394
|
+
outsidePoint: ${JSON.stringify(e)}
|
|
395
|
+
insidePoint : ${JSON.stringify(r)}
|
|
396
|
+
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),Nt.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 Nt.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"),XT=B((i,e)=>{Nt.warn("abc88 cutPathAtIntersect",i,e);let r=[],n=i[0],a=!1;return i.forEach(o=>{if(Nt.info("abc88 checking point",o,e),!jY(e,o)&&!a){const c=FY(e,n,o);Nt.debug("abc88 inside",o,n,c),Nt.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)?Nt.warn("abc88 no intersect",c,r):r.push(c),a=!0}else Nt.warn("abc88 outside",o,n),n=o,a||r.push(o)}),Nt.debug("returning points",r),r},"cutPathAtIntersect");function V3(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}}B(V3,"extractCornerPoints");var ZT=B(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"),IY=B(function(i){const{cornerPointPositions:e}=V3(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=ZT(a,c,5),u=ZT(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){Nt.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 Nt.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"),$Y=B((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"),zY=B(function(i,e,r,n,a,o,c,h=!1){var q;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=Ze();let d=e.points,f=!1;const g=a;var x=o;const y=[];for(const G in e.cssCompiledStyles)KO(G)||y.push(e.cssCompiledStyles[G]);Nt.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])),Nt.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&&(Nt.info("to cluster abc88",r.get(e.toCluster)),d=XT(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(Nt.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(d,null,2)),d=XT(d.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let C=d.filter(G=>!Number.isNaN(G.y));const _=OY(e.curve);_!=="rounded"&&(C=IY(C));let k=ad;switch(_){case"linear":k=ad;break;case"basis":k=ev;break;case"cardinal":k=NB;break;case"bumpX":k=kB;break;case"bumpY":k=wB;break;case"catmullRom":k=MB;break;case"monotoneX":k=jB;break;case"monotoneY":k=FB;break;case"natural":k=$B;break;case"step":k=zB;break;case"stepAfter":k=qB;break;case"stepBefore":k=PB;break;case"rounded":k=ad;break;default:k=ev}const{x:T,y:E}=R7(e),N=h9().x(T).y(E).curve(k);let L;switch(e.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(e.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let O,A=_==="rounded"?X3(Z3(C,e),5):N(C);const M=Array.isArray(e.style)?e.style:[e.style];let z=M.find(G=>G==null?void 0:G.startsWith("stroke:")),D="";e.animate&&(D="edge-animation-fast"),e.animation&&(D="edge-animation-"+e.animation);let $=!1;if(e.look==="handDrawn"){const G=Vt.svg(i);Object.assign([],C);const it=G.path(A,{roughness:.3,seed:u});L+=" transition",O=ce(it).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+L+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",M?M.reduce((H,rt)=>H+";"+rt,""):"");let nt=O.attr("d");O.attr("d",nt),i.node().appendChild(O.node())}else{const G=y.join(";"),it=M?M.reduce((yt,ot)=>yt+ot+";",""):"",nt=(G?G+";"+it+";":it)+";"+(M?M.reduce((yt,ot)=>yt+";"+ot,""):"");O=i.append("path").attr("d",A).attr("id",`${c}-${e.id}`).attr("class"," "+L+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",nt),z=(q=nt.match(/stroke:([^;]+)/))==null?void 0:q[1],$=e.animate===!0||!!e.animation||G.includes("animation");const H=O.node(),rt=typeof H.getTotalLength=="function"?H.getTotalLength():0,ft=eT[e.arrowTypeStart]||0,Q=eT[e.arrowTypeEnd]||0;if(e.look==="neo"&&!$){const ot=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?$Y(rt,ft,Q):`0 ${ft} ${rt-ft-Q} ${Q}`}; 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",_r(e.look)),e.showPoints&&C.forEach(G=>{i.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",G.x).attr("cy",G.y)});let U="";(Ze().flowchart.arrowMarkerAbsolute||Ze().state.arrowMarkerAbsolute)&&(U=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,U=U.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Nt.info("arrowTypeStart",e.arrowTypeStart),Nt.info("arrowTypeEnd",e.arrowTypeEnd);const Y=!$&&(e==null?void 0:e.look)==="neo";MY(O,e,U,c,n,Y,z);const I=Math.floor(d.length/2),W=d[I];ba.isLabelCoordinateInPath(W,O.attr("d"))||(f=!0);let j={};return f&&(j.updatedPath=d),j.originalPath=e.points,j},"insertEdge");function X3(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,E=C*k+_*T,N=Math.max(-1,Math.min(1,E)),L=Math.acos(N);if(L<a||Math.abs(Math.PI-L)<a){r+=`L${c.x},${c.y}`;continue}const O=Math.min(e/Math.sin(L/2),y/2,v/2),A=c.x-C*O,M=c.y-_*O,z=c.x+k*O,D=c.y+T*O;r+=`L${A},${M}`,r+=`Q${c.x},${c.y} ${z},${D}`}}return r}B(X3,"generateRoundedPath");function Bv(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}}B(Bv,"calculateDeltaAndAngle");function Z3(i,e){const r=i.map(a=>({...a}));if(i.length>=2&&qr[e.arrowTypeStart]){const a=qr[e.arrowTypeStart],o=i[0],c=i[1],{angle:h}=Bv(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&&qr[e.arrowTypeEnd]){const a=qr[e.arrowTypeEnd],o=i[n-1],c=i[n-2],{angle:h}=Bv(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}B(Z3,"applyMarkerOffsetsToPoints");var PY=B((i,e,r,n)=>{e.forEach(a=>{hK[a](i,r,n)})},"insertMarkers"),qY=B((i,e,r)=>{Nt.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"),UY=B((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"),HY=B((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"),WY=B((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"),GY=B((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"),YY=B((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"),KY=B((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"),VY=B((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"),XY=B((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"),ZY=B((i,e,r)=>{const n=Ii(),{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"),QY=B((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"),JY=B((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"),tK=B((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"),eK=B((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"),iK=B((i,e,r)=>{const n=Ii(),{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"),rK=B((i,e,r)=>{const n=Ii(),{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"),nK=B((i,e,r)=>{const n=Ii(),{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"),aK=B((i,e,r)=>{const n=Ii(),{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"),sK=B((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
|
|
397
|
+
L20,10
|
|
398
|
+
M20,10
|
|
399
|
+
L0,20`)},"requirement_arrow"),oK=B((i,e,r)=>{const n=Ii(),{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
|
|
400
|
+
L20,10
|
|
401
|
+
M20,10
|
|
402
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),lK=B((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"),cK=B((i,e,r)=>{const n=Ii(),{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"),hK={extension:qY,composition:UY,aggregation:HY,dependency:WY,lollipop:GY,point:YY,circle:KY,cross:VY,barb:XY,barbNeo:ZY,only_one:QY,zero_or_one:JY,one_or_more:tK,zero_or_more:eK,only_one_neo:iK,zero_or_one_neo:rK,one_or_more_neo:nK,zero_or_more_neo:aK,requirement_arrow:sK,requirement_contains:lK,requirement_arrow_neo:oK,requirement_contains_neo:cK},uK=PY,dK={common:$d,getConfig:Ii,insertCluster:cY,insertEdge:zY,insertEdgeLabel:RY,insertMarkers:uK,insertNode:K3,interpolateToCurve:cC,labelHelper:fe,log:Nt,positionEdgeLabel:DY},Ed={},Q3=B(i=>{for(const e of i)Ed[e.name]=e},"registerLayoutLoaders"),fK=B(()=>{Q3([{name:"dagre",loader:B(async()=>await De(()=>import("./dagre-KV5264BT-C_O4CkRN.js"),__vite__mapDeps([3,4,5,6,7,8])),"loader")},{name:"cose-bilkent",loader:B(async()=>await De(()=>import("./cose-bilkent-S5V4N54A-CK3SaOdF.js"),__vite__mapDeps([9,10])),"loader")}])},"registerDefaultLayoutLoaders");fK();var Bot=B(async(i,e)=>{if(!(i.layoutAlgorithm in Ed))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=Ed[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,dK,{algorithm:r.algorithm})},"render"),Lot=B((i="",{fallback:e="dagre"}={})=>{if(i in Ed)return i;if(e in Ed)return Nt.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"),J3="comm",t5="rule",e5="decl",pK="@import",gK="@namespace",mK="@keyframes",yK="@layer",bK=Math.abs,ld=String.fromCharCode;function i5(i){return i.trim()}function Lv(i,e,r){return i.replace(e,r)}function Pc(i,e){return i.charCodeAt(e)|0}function xh(i,e,r){return i.slice(e,r)}function za(i){return i.length}function xK(i){return i.length}function Sp(i,e){return e.push(i),i}var bm=1,vh=1,r5=0,oa=0,lr=0,Eh="";function MC(i,e,r,n,a,o,c,h){return{value:i,root:e,parent:r,type:n,props:a,children:o,line:bm,column:vh,length:c,return:"",siblings:h}}function vK(){return lr}function CK(){return lr=oa>0?Pc(Eh,--oa):0,vh--,lr===10&&(vh=1,bm--),lr}function Ca(){return lr=oa<r5?Pc(Eh,oa++):0,vh++,lr===10&&(vh=1,bm++),lr}function Mo(){return Pc(Eh,oa)}function Xp(){return oa}function xm(i,e){return xh(Eh,i,e)}function Nd(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 _K(i){return bm=vh=1,r5=za(Eh=i),oa=0,[]}function kK(i){return Eh="",i}function r0(i){return i5(xm(oa-1,Ov(i===91?i+2:i===40?i+1:i)))}function wK(i){for(;(lr=Mo())&&lr<33;)Ca();return Nd(i)>2||Nd(lr)>3?"":" "}function SK(i,e){for(;--e&&Ca()&&!(lr<48||lr>102||lr>57&&lr<65||lr>70&&lr<97););return xm(i,Xp()+(e<6&&Mo()==32&&Ca()==32))}function Ov(i){for(;Ca();)switch(lr){case i:return oa;case 34:case 39:i!==34&&i!==39&&Ov(lr);break;case 40:i===41&&Ov(i);break;case 92:Ca();break}return oa}function TK(i,e){for(;Ca()&&i+lr!==57;)if(i+lr===84&&Mo()===47)break;return"/*"+xm(e,oa-1)+"*"+ld(i===47?i:Ca())}function EK(i){for(;!Nd(Mo());)Ca();return xm(i,oa)}function NK(i){return kK(Zp("",null,null,null,[""],i=_K(i),0,[0],i))}function Zp(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,E=0,N="",L=a,O=o,A=n,M=N;_;)switch(v=E,E=Ca()){case 40:v!=108&&Pc(M,g-1)==58?(T++,M+="("):M+=r0(E);break;case 41:T--,M+=")";break;case 34:case 39:case 91:M+=r0(E);break;case 9:case 10:case 13:case 32:if(T>0){M+=ld(E);break}M+=wK(v);break;case 92:M+=SK(Xp()-1,7);continue;case 47:switch(Mo()){case 42:case 47:Sp(AK(TK(Ca(),Xp()),e,r,u),u),(Nd(v||1)==5||Nd(Mo()||1)==5)&&za(M)&&xh(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&&E){M+=ld(E);break}switch(E){case 0:case 125:_=0;case 59+f:k==-1&&(M=Lv(M,/\f/g,"")),y>0&&(za(M)-g||C===0)&&Sp(y>32?JT(M+";",n,r,g-1,u):JT(Lv(M," ","")+";",n,r,g-2,u),u);break;case 59:M+=";";default:if(Sp(A=QT(M,e,r,d,f,a,h,N,L=[],O=[],g,o),o),E===123)if(f===0)Zp(M,e,A,A,L,o,g,h,O);else{switch(x){case 99:if(Pc(M,3)===110)break;case 108:if(Pc(M,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Zp(i,A,A,n&&Sp(QT(i,A,A,0,0,a,h,N,a,L=[],g,O),O),a,O,g,h,n?L:O):Zp(M,A,A,A,[""],O,0,h,O)}}d=f=y=0,C=k=1,N=M="",g=c;break;case 58:g=1+za(M),y=v;default:if(C<1){if(E==123)--C;else if(E==125&&C++==0&&CK()==125)continue}switch(M+=ld(E),E*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:Mo()===45&&(M+=r0(Ca())),x=Mo(),f=g=za(N=M+=EK(Xp())),E++;break;case 45:v===45&&za(M)==2&&(C=0)}}return o}function QT(i,e,r,n,a,o,c,h,u,d,f,g){for(var x=a-1,y=a===0?o:[""],v=xK(y),C=0,_=0,k=0;C<n;++C)for(var T=0,E=xh(i,x+1,x=bK(_=c[C])),N=i;T<v;++T)(N=i5(_>0?y[T]+" "+E:Lv(E,/&\f/g,y[T])))&&(u[k++]=N);return MC(i,e,r,a===0?t5:h,u,d,f,g)}function AK(i,e,r,n){return MC(i,e,r,J3,ld(vK()),xh(i,2,-2),0,n)}function JT(i,e,r,n,a){return MC(i,e,r,e5,xh(i,0,n),xh(i,n+1,-1),n,a)}function Rv(i,e){for(var r="",n=0;n<i.length;n++)r+=e(i[n],n,i,e)||"";return r}function MK(i,e,r,n){switch(i.type){case yK:if(i.children.length)break;case pK:case gK:case e5:return i.return=i.return||i.value;case J3:return"";case mK:return i.return=i.value+"{"+Rv(i.children,n)+"}";case t5:if(!za(i.value=i.props.join(",")))return""}return za(r=Rv(i.children,n))?i.return=i.value+"{"+r+"}":""}var BK=EO(Object.keys,Object),LK=Object.prototype,OK=LK.hasOwnProperty;function RK(i){if(!cm(i))return BK(i);var e=[];for(var r in Object(i))OK.call(i,r)&&r!="constructor"&&e.push(r);return e}var Dv=Gl(Ta,"DataView"),jv=Gl(Ta,"Promise"),Fv=Gl(Ta,"Set"),Iv=Gl(Ta,"WeakMap"),tE="[object Map]",DK="[object Object]",eE="[object Promise]",iE="[object Set]",rE="[object WeakMap]",nE="[object DataView]",jK=Wl(Dv),FK=Wl(Sd),IK=Wl(jv),$K=Wl(Fv),zK=Wl(Iv),ul=Hl;(Dv&&ul(new Dv(new ArrayBuffer(1)))!=nE||Sd&&ul(new Sd)!=tE||jv&&ul(jv.resolve())!=eE||Fv&&ul(new Fv)!=iE||Iv&&ul(new Iv)!=rE)&&(ul=function(i){var e=Hl(i),r=e==DK?i.constructor:void 0,n=r?Wl(r):"";if(n)switch(n){case jK:return nE;case FK:return tE;case IK:return eE;case $K:return iE;case zK:return rE}return e});var PK="[object Map]",qK="[object Set]",UK=Object.prototype,HK=UK.hasOwnProperty;function aE(i){if(i==null)return!0;if(hm(i)&&(Ng(i)||typeof i=="string"||typeof i.splice=="function"||oC(i)||lC(i)||Eg(i)))return!i.length;var e=ul(i);if(e==PK||e==qK)return!i.size;if(cm(i))return!RK(i).length;for(var r in i)if(HK.call(i,r))return!1;return!0}var n5="c4",WK=B(i=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),GK=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-C_5GcHxG.js");return{diagram:e}},__vite__mapDeps([11,12]));return{id:n5,diagram:i}},"loader"),YK={id:n5,detector:WK,loader:GK},KK=YK,a5="flowchart",VK=B((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"),XK=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-BDU_Bd0P.js");return{diagram:e}},__vite__mapDeps([13,14,12,15,16,17]));return{id:a5,diagram:i}},"loader"),ZK={id:a5,detector:VK,loader:XK},QK=ZK,s5="flowchart-v2",JK=B((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"),tV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-BDU_Bd0P.js");return{diagram:e}},__vite__mapDeps([13,14,12,15,16,17]));return{id:s5,diagram:i}},"loader"),eV={id:s5,detector:JK,loader:tV},iV=eV,o5="er",rV=B(i=>/^\s*erDiagram/.test(i),"detector"),nV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-C8WadTdS.js");return{diagram:e}},__vite__mapDeps([18,15,16,17]));return{id:o5,diagram:i}},"loader"),aV={id:o5,detector:rV,loader:nV},sV=aV,l5="gitGraph",oV=B(i=>/^\s*gitGraph/.test(i),"detector"),lV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-BuhQ28fO.js");return{diagram:e}},__vite__mapDeps([19,20,21,22,7,5]));return{id:l5,diagram:i}},"loader"),cV={id:l5,detector:oV,loader:lV},hV=cV,c5="gantt",uV=B(i=>/^\s*gantt/.test(i),"detector"),dV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-DI9axi76.js");return{diagram:e}},__vite__mapDeps([23,24,25]));return{id:c5,diagram:i}},"loader"),fV={id:c5,detector:uV,loader:dV},pV=fV,h5="info",gV=B(i=>/^\s*info/.test(i),"detector"),mV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-FlC8UXlC.js");return{diagram:e}},__vite__mapDeps([26,22,7,5]));return{id:h5,diagram:i}},"loader"),yV={id:h5,detector:gV,loader:mV},u5="pie",bV=B(i=>/^\s*pie/.test(i),"detector"),xV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-DFDPs7b_.js");return{diagram:e}},__vite__mapDeps([27,20,22,7,5,28]));return{id:u5,diagram:i}},"loader"),vV={id:u5,detector:bV,loader:xV},d5="quadrantChart",CV=B(i=>/^\s*quadrantChart/.test(i),"detector"),_V=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-D7Ov5Uju.js");return{diagram:e}},__vite__mapDeps([29,24,25]));return{id:d5,diagram:i}},"loader"),kV={id:d5,detector:CV,loader:_V},wV=kV,f5="xychart",SV=B(i=>/^\s*xychart(-beta)?/.test(i),"detector"),TV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-BACIDW_J.js");return{diagram:e}},__vite__mapDeps([30,24,25]));return{id:f5,diagram:i}},"loader"),EV={id:f5,detector:SV,loader:TV},NV=EV,p5="requirement",AV=B(i=>/^\s*requirement(Diagram)?/.test(i),"detector"),MV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-Blqx-X0l.js");return{diagram:e}},__vite__mapDeps([31,15,16]));return{id:p5,diagram:i}},"loader"),BV={id:p5,detector:AV,loader:MV},LV=BV,g5="sequence",OV=B(i=>/^\s*sequenceDiagram/.test(i),"detector"),RV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-DhJhyglC.js");return{diagram:e}},__vite__mapDeps([32,12,21]));return{id:g5,diagram:i}},"loader"),DV={id:g5,detector:OV,loader:RV},jV=DV,m5="class",FV=B((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"),IV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-BX19A8jH.js");return{diagram:e}},__vite__mapDeps([33,34,14,12,15,16]));return{id:m5,diagram:i}},"loader"),$V={id:m5,detector:FV,loader:IV},zV=$V,y5="classDiagram",PV=B((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"),qV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-BX19A8jH.js");return{diagram:e}},__vite__mapDeps([35,34,14,12,15,16]));return{id:y5,diagram:i}},"loader"),UV={id:y5,detector:PV,loader:qV},HV=UV,b5="state",WV=B((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"),GV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-B3lrGt3B.js");return{diagram:e}},__vite__mapDeps([36,37,15,16,4,5,6,7]));return{id:b5,diagram:i}},"loader"),YV={id:b5,detector:WV,loader:GV},KV=YV,x5="stateDiagram",VV=B((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"),XV=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-oO_Mw_KF.js");return{diagram:e}},__vite__mapDeps([38,37,15,16]));return{id:x5,diagram:i}},"loader"),ZV={id:x5,detector:VV,loader:XV},QV=ZV,v5="journey",JV=B(i=>/^\s*journey/.test(i),"detector"),tX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-CmXt_usI.js");return{diagram:e}},__vite__mapDeps([39,14,12,28]));return{id:v5,diagram:i}},"loader"),eX={id:v5,detector:JV,loader:tX},iX=eX,rX=B((i,e,r)=>{Nt.debug(`rendering svg for syntax error
|
|
403
|
+
`);const n=T9(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),HM(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"),C5={draw:rX},nX=C5,aX={db:{},renderer:C5,parser:{parse:B(()=>{},"parse")}},sX=aX,_5="flowchart-elk",oX=B((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"),lX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-BDU_Bd0P.js");return{diagram:e}},__vite__mapDeps([13,14,12,15,16,17]));return{id:_5,diagram:i}},"loader"),cX={id:_5,detector:oX,loader:lX},hX=cX,k5="timeline",uX=B(i=>/^\s*timeline/.test(i),"detector"),dX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-D0RPX8Ye.js");return{diagram:e}},__vite__mapDeps([40,28]));return{id:k5,diagram:i}},"loader"),fX={id:k5,detector:uX,loader:dX},pX=fX,w5="mindmap",gX=B(i=>/^\s*mindmap/.test(i),"detector"),mX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-n-x0bf17.js");return{diagram:e}},__vite__mapDeps([41,15,16]));return{id:w5,diagram:i}},"loader"),yX={id:w5,detector:gX,loader:mX},bX=yX,S5="kanban",xX=B(i=>/^\s*kanban/.test(i),"detector"),vX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-DfUTCwbu.js");return{diagram:e}},__vite__mapDeps([42,14]));return{id:S5,diagram:i}},"loader"),CX={id:S5,detector:xX,loader:vX},_X=CX,T5="sankey",kX=B(i=>/^\s*sankey(-beta)?/.test(i),"detector"),wX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-BQbQa_T1.js");return{diagram:e}},[]);return{id:T5,diagram:i}},"loader"),SX={id:T5,detector:kX,loader:wX},TX=SX,E5="packet",EX=B(i=>/^\s*packet(-beta)?/.test(i),"detector"),NX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-h-YHhXz4.js");return{diagram:e}},__vite__mapDeps([43,20,22,7,5]));return{id:E5,diagram:i}},"loader"),AX={id:E5,detector:EX,loader:NX},N5="radar",MX=B(i=>/^\s*radar-beta/.test(i),"detector"),BX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-Dtp-QpeD.js");return{diagram:e}},__vite__mapDeps([44,20,22,7,5]));return{id:N5,diagram:i}},"loader"),LX={id:N5,detector:MX,loader:BX},A5="block",OX=B(i=>/^\s*block(-beta)?/.test(i),"detector"),RX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-CAzEduT-.js");return{diagram:e}},__vite__mapDeps([45,14,8,4,5,17]));return{id:A5,diagram:i}},"loader"),DX={id:A5,detector:OX,loader:RX},jX=DX,M5="treeView",FX=B(i=>/^\s*treeView-beta/.test(i),"detector"),IX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-CY7cwksh.js");return{diagram:e}},__vite__mapDeps([46,20,21,22,7,5]));return{id:M5,diagram:i}},"loader"),$X={id:M5,detector:FX,loader:IX},zX=$X,B5="architecture",PX=B(i=>/^\s*architecture/.test(i),"detector"),qX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-BlVAz3vP.js");return{diagram:e}},__vite__mapDeps([47,20,22,7,5,10]));return{id:B5,diagram:i}},"loader"),UX={id:B5,detector:PX,loader:qX},HX=UX,L5="ishikawa",WX=B(i=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),GX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-CM7RkOdA.js");return{diagram:e}},[]);return{id:L5,diagram:i}},"loader"),YX={id:L5,detector:WX,loader:GX},O5="venn",KX=B(i=>/^\s*venn-beta/.test(i),"detector"),VX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-BxCgJ4Ig.js");return{diagram:e}},[]);return{id:O5,diagram:i}},"loader"),XX={id:O5,detector:KX,loader:VX},ZX=XX,R5="treemap",QX=B(i=>/^\s*treemap/.test(i),"detector"),JX=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-BBaegF2E.js");return{diagram:e}},__vite__mapDeps([48,16,20,22,7,5,25]));return{id:R5,diagram:i}},"loader"),tZ={id:R5,detector:QX,loader:JX},D5="wardley-beta",eZ=B(i=>/^\s*wardley-beta/i.test(i),"detector"),iZ=B(async()=>{const{diagram:i}=await De(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-BZex7ruR.js");return{diagram:e}},__vite__mapDeps([49,20,22,7,5]));return{id:D5,diagram:i}},"loader"),rZ={id:D5,detector:eZ,loader:iZ},nZ=rZ,sE=!1,vm=B(()=>{sE||(sE=!0,cg("error",sX,i=>i.toLowerCase().trim()==="error"),cg("---",{db:{clear:B(()=>{},"clear")},styles:{},renderer:{draw:B(()=>{},"draw")},parser:{parse:B(()=>{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:B(()=>null,"init")},i=>i.toLowerCase().trimStart().startsWith("---")),zx(hX,bX,HX),zx(KK,_X,HV,zV,sV,pV,yV,vV,LV,jV,iV,QK,pX,hV,QV,KV,iX,wV,TX,AX,NV,jX,zX,LX,YX,tZ,ZX,nZ))},"addDiagrams"),aZ=B(async()=>{Nt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Rl).map(async([r,{detector:n,loader:a}])=>{if(a)try{Hx(r)}catch{try{const{diagram:o,id:c}=await a();cg(c,o,n)}catch(o){throw Nt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Rl[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){Nt.error(`Failed to load ${e.length} external diagrams`);for(const r of e)Nt.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),sZ="graphics-document document";function j5(i,e){i.attr("role",sZ),e!==""&&i.attr("aria-roledescription",e)}B(j5,"setA11yDiagramInfo");function F5(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)}}}B(F5,"addSVGa11yTitleDescription");var Al,$v=(Al=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=Ii(),a=A1(e,n);e=AW(e)+`
|
|
404
|
+
`;try{Hx(a)}catch{const g=a$(a);if(!g)throw new MM(`Diagram ${a} not found.`);const{id:x,diagram:y}=await g();cg(x,y)}const{db:o,parser:c,renderer:h,init:u}=Hx(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 Al(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}},B(Al,"Diagram"),Al),oE=[],oZ=B(()=>{oE.forEach(i=>{i()}),oE=[]},"attachFunctions"),lZ=B(i=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function I5(i){const e=i.match(AM);if(!e)return{text:i,metadata:{}};let r=O7(e[1],{schema:L7})??{};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}}B(I5,"extractFrontMatter");var cZ=B(i=>i.replace(/\r\n?/g,`
|
|
405
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),hZ=B(i=>{const{text:e,metadata:r}=I5(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"),uZ=B(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:mW(i),directive:e}},"processDirectives");function BC(i){const e=cZ(i),r=hZ(e),n=uZ(r.text),a=pC(r.config,n.directive);return i=lZ(n.text),{code:i,title:r.title,config:a}}B(BC,"preprocessDiagram");function $5(i){const e=new TextEncoder().encode(i),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}B($5,"toBase64");var dZ=5e4,fZ="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",pZ="sandbox",gZ="loose",mZ="http://www.w3.org/2000/svg",yZ="http://www.w3.org/1999/xlink",bZ="http://www.w3.org/1999/xhtml",xZ="100%",vZ="100%",CZ="border:0;margin:0;",_Z="margin:0",kZ="allow-top-navigation-by-user-activation allow-popups",wZ='The "iframe" tag is not supported by your browser.',SZ=["foreignobject"],TZ=["dominant-baseline"];function LC(i){const e=BC(i);return og(),O$(e.config??{}),e}B(LC,"processAndSetConfigs");async function z5(i,e){vm();try{const{code:r,config:n}=LC(i);return{diagramType:(await q5(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}B(z5,"parse");var lE=B((i,e,r=[])=>`
|
|
406
|
+
.${i} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),EZ=B((i,e=new Map)=>{let r="";if(i.themeCSS!==void 0&&(r+=`
|
|
407
|
+
${i.themeCSS}`),i.fontFamily!==void 0&&(r+=`
|
|
408
|
+
:root { --mermaid-font-family: ${i.fontFamily}}`),i.altFontFamily!==void 0&&(r+=`
|
|
409
|
+
:root { --mermaid-alt-font-family: ${i.altFontFamily}}`),e instanceof Map){const c=nn(i)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{aE(h.styles)||c.forEach(u=>{r+=lE(h.id,u,h.styles)}),aE(h.textStyles)||(r+=lE(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),NZ=B((i,e,r,n)=>{const a=EZ(i,r),o=Q$(e,a,{...i.themeVariables,theme:i.theme,look:i.look},n);return Rv(NK(`${n}{${o}}`),MK)},"createUserStyles"),AZ=B((i="",e,r)=>{let n=i;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=$l(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),MZ=B((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":vZ,n=$5(`<body style="${_Z}">${i}</body>`);return`<iframe style="width:${xZ};height:${r};${CZ}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${kZ}">
|
|
410
|
+
${wZ}
|
|
411
|
+
</iframe>`},"putIntoIFrame"),cE=B((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",mZ);return a&&c.attr("xmlns:xlink",a),c.append("g"),i},"appendDivSvgG");function zv(i,e){return i.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}B(zv,"sandboxedIframe");var BZ=B((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"),LZ=B(async function(i,e,r){var U,Y,I,W,j,q;vm();const n=LC(e);e=n.code;const a=Ii();Nt.debug(a),e.length>((a==null?void 0:a.maxTextSize)??dZ)&&(e=fZ);const o="#"+i,c="i"+i,h="#"+c,u="d"+i,d="#"+u,f=B(()=>{const it=ce(x?h:d).node();it&&"remove"in it&&it.remove()},"removeTempElements");let g=ce("body");const x=a.securityLevel===pZ,y=a.securityLevel===gZ,v=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),x){const G=zv(ce(r),c);g=ce(G.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ce(r);cE(g,i,u,`font-family: ${v}`,yZ)}else{if(BZ(document,i,u,c),x){const G=zv(ce("body"),c);g=ce(G.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ce("body");cE(g,i,u)}let C,_;try{C=await $v.fromText(e,{title:n.title})}catch(G){if(a.suppressErrorRendering)throw f(),G;C=await $v.fromText("error"),_=G}const k=g.select(d).node(),T=C.type,E=k.firstChild,N=E.firstChild,L=(Y=(U=C.renderer).getClasses)==null?void 0:Y.call(U,e,C),O=NZ(a,T,L,o),A=document.createElement("style");A.innerHTML=O,E.insertBefore(A,N);try{await C.renderer.draw(e,i,"11.14.0",C)}catch(G){throw a.suppressErrorRendering?f():nX.draw(e,i,"11.14.0"),G}const M=g.select(`${d} svg`),z=(W=(I=C.db).getAccTitle)==null?void 0:W.call(I),D=(q=(j=C.db).getAccDescription)==null?void 0:q.call(j);U5(T,M,z,D),g.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",bZ);let $=g.select(d).node().innerHTML;if(Nt.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),$=AZ($,x,Fs(a.arrowMarkerAbsolute)),x){const G=g.select(d+" svg").node();$=MZ($,G)}else y||($=Ol.sanitize($,{ADD_TAGS:SZ,ADD_ATTR:TZ,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oZ(),_)throw _;return f(),{diagramType:T,svg:$,bindFunctions:C.db.bindFunctions}},"render");function P5(i={}){var n;const e=mr({},i);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),B$(e),e!=null&&e.theme&&e.theme in Bs?e.themeVariables=Bs[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Bs.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?M$(e):DM();N1(r.logLevel),vm()}B(P5,"initialize");var q5=B((i,e={})=>{const{code:r}=BC(i);return $v.fromText(r,e)},"getDiagramFromText");function U5(i,e,r,n){j5(e,i),F5(e,r,n,e.attr("id"))}B(U5,"addA11yInfo");var Pl=Object.freeze({render:LZ,parse:z5,getDiagramFromText:q5,initialize:P5,getConfig:Ii,setConfig:jM,getSiteConfig:DM,updateSiteConfig:L$,reset:B(()=>{og()},"reset"),globalReset:B(()=>{og(ph)},"globalReset"),defaultConfig:ph});N1(Ii().logLevel);og(Ii());var OZ=B((i,e,r)=>{Nt.warn(i),fC(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"),H5=B(async function(i={querySelector:".mermaid"}){try{await RZ(i)}catch(e){if(fC(e)&&Nt.error(e.str),jn.parseError&&jn.parseError(e),!i.suppressErrors)throw Nt.error("Use the suppressErrors option to suppress these errors"),e}},"run"),RZ=B(async function({postRenderCallback:i,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Pl.getConfig();Nt.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");Nt.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(Nt.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),Pl.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(Nt.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const d=`mermaid-${o.next()}`;c=u.innerHTML,c=oR(ba.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const f=ba.detectInit(c);f&&Nt.debug("Detected early reinit: ",f);try{const{svg:g,bindFunctions:x}=await K5(d,c,u);u.innerHTML=g,i&&await i(d),x&&x(u)}catch(g){OZ(g,h,jn.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),W5=B(function(i){Pl.initialize(i)},"initialize"),DZ=B(async function(i,e,r){Nt.warn("mermaid.init is deprecated. Please use run instead."),i&&W5(i);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await H5(n)},"init"),jZ=B(async(i,{lazyLoad:e=!0}={})=>{vm(),zx(...i),e===!1&&await aZ()},"registerExternalDiagrams"),G5=B(function(){if(jn.startOnLoad){const{startOnLoad:i}=Pl.getConfig();i&&jn.run().catch(e=>Nt.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",G5,!1);var FZ=B(function(i){jn.parseError=i},"setParseErrorHandler"),$g=[],n0=!1,Y5=B(async()=>{if(!n0){for(n0=!0;$g.length>0;){const i=$g.shift();if(i)try{await i()}catch(e){Nt.error("Error executing queue",e)}}n0=!1}},"executeQueue"),IZ=B(async(i,e)=>new Promise((r,n)=>{const a=B(()=>new Promise((o,c)=>{Pl.parse(i,e).then(h=>{o(h),r(h)},h=>{var u;Nt.error("Error parsing",h),(u=jn.parseError)==null||u.call(jn,h),c(h),n(h)})}),"performCall");$g.push(a),Y5().catch(n)}),"parse"),K5=B((i,e,r)=>new Promise((n,a)=>{const o=B(()=>new Promise((c,h)=>{Pl.render(i,e,r).then(u=>{c(u),n(u)},u=>{var d;Nt.error("Error parsing",u),(d=jn.parseError)==null||d.call(jn,u),h(u),a(u)})}),"performCall");$g.push(o),Y5().catch(a)}),"render"),$Z=B(()=>Object.keys(Rl).map(i=>({id:i})),"getRegisteredDiagramsMetadata"),jn={startOnLoad:!0,mermaidAPI:Pl,parse:IZ,render:K5,init:DZ,run:H5,registerExternalDiagrams:jZ,registerLayoutLoaders:Q3,initialize:W5,parseError:void 0,contentLoaded:G5,setParseErrorHandler:FZ,detectType:A1,registerIconPacks:jG,getRegisteredDiagramsMetadata:$Z},OC=jn;/*! Check if previously processed *//*!
|
|
412
|
+
* Wait for document loaded before starting the execution
|
|
413
|
+
*/let hE=null;function zZ(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 V5(i){hE!==i&&(OC.initialize(zZ(i)),hE=i)}function PZ(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 X5(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(PZ);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 qZ(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 OC.render(u,h);f.innerHTML=g;const x=f.querySelector("svg");x&&(x.removeAttribute("height"),x.style.maxWidth="100%",x.style.height="auto",X5(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 UZ(i,e,r,n="mmd"){K.useEffect(()=>{const a=i.current;if(!a||!e)return;V5(r);let o=!1;return queueMicrotask(()=>{o||qZ(a,n)}),()=>{o=!0}},[i,e,r,n])}var a0,uE;function HZ(){if(uE)return a0;uE=1;function i(tt){return tt instanceof Map?tt.clear=tt.delete=tt.set=function(){throw new Error("map is read-only")}:tt instanceof Set&&(tt.add=tt.clear=tt.delete=function(){throw new Error("set is read-only")}),Object.freeze(tt),Object.getOwnPropertyNames(tt).forEach(wt=>{const Dt=tt[wt],le=typeof Dt;(le==="object"||le==="function")&&!Object.isFrozen(Dt)&&i(Dt)}),tt}class e{constructor(wt){wt.data===void 0&&(wt.data={}),this.data=wt.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(tt){return tt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function n(tt,...wt){const Dt=Object.create(null);for(const le in tt)Dt[le]=tt[le];return wt.forEach(function(le){for(const ei in le)Dt[ei]=le[ei]}),Dt}const a="</span>",o=tt=>!!tt.scope,c=(tt,{prefix:wt})=>{if(tt.startsWith("language:"))return tt.replace("language:","language-");if(tt.includes(".")){const Dt=tt.split(".");return[`${wt}${Dt.shift()}`,...Dt.map((le,ei)=>`${le}${"_".repeat(ei+1)}`)].join(" ")}return`${wt}${tt}`};class h{constructor(wt,Dt){this.buffer="",this.classPrefix=Dt.classPrefix,wt.walk(this)}addText(wt){this.buffer+=r(wt)}openNode(wt){if(!o(wt))return;const Dt=c(wt.scope,{prefix:this.classPrefix});this.span(Dt)}closeNode(wt){o(wt)&&(this.buffer+=a)}value(){return this.buffer}span(wt){this.buffer+=`<span class="${wt}">`}}const u=(tt={})=>{const wt={children:[]};return Object.assign(wt,tt),wt};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(wt){this.top.children.push(wt)}openNode(wt){const Dt=u({scope:wt});this.add(Dt),this.stack.push(Dt)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(wt){return this.constructor._walk(wt,this.rootNode)}static _walk(wt,Dt){return typeof Dt=="string"?wt.addText(Dt):Dt.children&&(wt.openNode(Dt),Dt.children.forEach(le=>this._walk(wt,le)),wt.closeNode(Dt)),wt}static _collapse(wt){typeof wt!="string"&&wt.children&&(wt.children.every(Dt=>typeof Dt=="string")?wt.children=[wt.children.join("")]:wt.children.forEach(Dt=>{d._collapse(Dt)}))}}class f extends d{constructor(wt){super(),this.options=wt}addText(wt){wt!==""&&this.add(wt)}startScope(wt){this.openNode(wt)}endScope(){this.closeNode()}__addSublanguage(wt,Dt){const le=wt.root;Dt&&(le.scope=`language:${Dt}`),this.add(le)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(tt){return tt?typeof tt=="string"?tt:tt.source:null}function x(tt){return C("(?=",tt,")")}function y(tt){return C("(?:",tt,")*")}function v(tt){return C("(?:",tt,")?")}function C(...tt){return tt.map(Dt=>g(Dt)).join("")}function _(tt){const wt=tt[tt.length-1];return typeof wt=="object"&&wt.constructor===Object?(tt.splice(tt.length-1,1),wt):{}}function k(...tt){return"("+(_(tt).capture?"":"?:")+tt.map(le=>g(le)).join("|")+")"}function T(tt){return new RegExp(tt.toString()+"|").exec("").length-1}function E(tt,wt){const Dt=tt&&tt.exec(wt);return Dt&&Dt.index===0}const N=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function L(tt,{joinWith:wt}){let Dt=0;return tt.map(le=>{Dt+=1;const ei=Dt;let ue=g(le),Ht="";for(;ue.length>0;){const Pt=N.exec(ue);if(!Pt){Ht+=ue;break}Ht+=ue.substring(0,Pt.index),ue=ue.substring(Pt.index+Pt[0].length),Pt[0][0]==="\\"&&Pt[1]?Ht+="\\"+String(Number(Pt[1])+ei):(Ht+=Pt[0],Pt[0]==="("&&Dt++)}return Ht}).map(le=>`(${le})`).join(wt)}const O=/\b\B/,A="[a-zA-Z]\\w*",M="[a-zA-Z_]\\w*",z="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",$="\\b(0b[01]+)",U="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Y=(tt={})=>{const wt=/^#![ ]*\//;return tt.binary&&(tt.begin=C(wt,/.*\b/,tt.binary,/\b.*/)),n({scope:"meta",begin:wt,end:/$/,relevance:0,"on:begin":(Dt,le)=>{Dt.index!==0&&le.ignoreMatch()}},tt)},I={begin:"\\\\[\\s\\S]",relevance:0},W={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[I]},j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[I]},q={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/},G=function(tt,wt,Dt={}){const le=n({scope:"comment",begin:tt,end:wt,contains:[]},Dt);le.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 ei=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 le.contains.push({begin:C(/[ ]+/,"(",ei,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),le},it=G("//","$"),nt=G("/\\*","\\*/"),H=G("#","$"),rt={scope:"number",begin:z,relevance:0},ft={scope:"number",begin:D,relevance:0},Q={scope:"number",begin:$,relevance:0},yt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[I,{begin:/\[/,end:/\]/,relevance:0,contains:[I]}]},ot={scope:"title",begin:A,relevance:0},X={scope:"title",begin:M,relevance:0},Z={begin:"\\.\\s*"+M,relevance:0};var ct=Object.freeze({__proto__:null,APOS_STRING_MODE:W,BACKSLASH_ESCAPE:I,BINARY_NUMBER_MODE:Q,BINARY_NUMBER_RE:$,COMMENT:G,C_BLOCK_COMMENT_MODE:nt,C_LINE_COMMENT_MODE:it,C_NUMBER_MODE:ft,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(tt){return Object.assign(tt,{"on:begin":(wt,Dt)=>{Dt.data._beginMatch=wt[1]},"on:end":(wt,Dt)=>{Dt.data._beginMatch!==wt[1]&&Dt.ignoreMatch()}})},HASH_COMMENT_MODE:H,IDENT_RE:A,MATCH_NOTHING_RE:O,METHOD_GUARD:Z,NUMBER_MODE:rt,NUMBER_RE:z,PHRASAL_WORDS_MODE:q,QUOTE_STRING_MODE:j,REGEXP_MODE:yt,RE_STARTERS_RE:U,SHEBANG:Y,TITLE_MODE:ot,UNDERSCORE_IDENT_RE:M,UNDERSCORE_TITLE_MODE:X});function vt(tt,wt){tt.input[tt.index-1]==="."&&wt.ignoreMatch()}function At(tt,wt){tt.className!==void 0&&(tt.scope=tt.className,delete tt.className)}function Ft(tt,wt){wt&&tt.beginKeywords&&(tt.begin="\\b("+tt.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",tt.__beforeBegin=vt,tt.keywords=tt.keywords||tt.beginKeywords,delete tt.beginKeywords,tt.relevance===void 0&&(tt.relevance=0))}function zt(tt,wt){Array.isArray(tt.illegal)&&(tt.illegal=k(...tt.illegal))}function Rt(tt,wt){if(tt.match){if(tt.begin||tt.end)throw new Error("begin & end are not supported with match");tt.begin=tt.match,delete tt.match}}function Yt(tt,wt){tt.relevance===void 0&&(tt.relevance=1)}const _e=(tt,wt)=>{if(!tt.beforeMatch)return;if(tt.starts)throw new Error("beforeMatch cannot be used with starts");const Dt=Object.assign({},tt);Object.keys(tt).forEach(le=>{delete tt[le]}),tt.keywords=Dt.keywords,tt.begin=C(Dt.beforeMatch,x(Dt.begin)),tt.starts={relevance:0,contains:[Object.assign(Dt,{endsParent:!0})]},tt.relevance=0,delete Dt.beforeMatch},ti=["of","and","for","in","not","or","if","then","parent","list","value"],ki="keyword";function Be(tt,wt,Dt=ki){const le=Object.create(null);return typeof tt=="string"?ei(Dt,tt.split(" ")):Array.isArray(tt)?ei(Dt,tt):Object.keys(tt).forEach(function(ue){Object.assign(le,Be(tt[ue],wt,ue))}),le;function ei(ue,Ht){wt&&(Ht=Ht.map(Pt=>Pt.toLowerCase())),Ht.forEach(function(Pt){const se=Pt.split("|");le[se[0]]=[ue,yi(se[0],se[1])]})}}function yi(tt,wt){return wt?Number(wt):$i(tt)?0:1}function $i(tt){return ti.includes(tt.toLowerCase())}const zi={},ye=tt=>{console.error(tt)},Ai=(tt,...wt)=>{console.log(`WARN: ${tt}`,...wt)},bi=(tt,wt)=>{zi[`${tt}/${wt}`]||(console.log(`Deprecated as of ${tt}. ${wt}`),zi[`${tt}/${wt}`]=!0)},tr=new Error;function fi(tt,wt,{key:Dt}){let le=0;const ei=tt[Dt],ue={},Ht={};for(let Pt=1;Pt<=wt.length;Pt++)Ht[Pt+le]=ei[Pt],ue[Pt+le]=!0,le+=T(wt[Pt-1]);tt[Dt]=Ht,tt[Dt]._emit=ue,tt[Dt]._multi=!0}function Vi(tt){if(Array.isArray(tt.begin)){if(tt.skip||tt.excludeBegin||tt.returnBegin)throw ye("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),tr;if(typeof tt.beginScope!="object"||tt.beginScope===null)throw ye("beginScope must be object"),tr;fi(tt,tt.begin,{key:"beginScope"}),tt.begin=L(tt.begin,{joinWith:""})}}function Mi(tt){if(Array.isArray(tt.end)){if(tt.skip||tt.excludeEnd||tt.returnEnd)throw ye("skip, excludeEnd, returnEnd not compatible with endScope: {}"),tr;if(typeof tt.endScope!="object"||tt.endScope===null)throw ye("endScope must be object"),tr;fi(tt,tt.end,{key:"endScope"}),tt.end=L(tt.end,{joinWith:""})}}function xr(tt){tt.scope&&typeof tt.scope=="object"&&tt.scope!==null&&(tt.beginScope=tt.scope,delete tt.scope)}function _n(tt){xr(tt),typeof tt.beginScope=="string"&&(tt.beginScope={_wrap:tt.beginScope}),typeof tt.endScope=="string"&&(tt.endScope={_wrap:tt.endScope}),Vi(tt),Mi(tt)}function Di(tt){function wt(Ht,Pt){return new RegExp(g(Ht),"m"+(tt.case_insensitive?"i":"")+(tt.unicodeRegex?"u":"")+(Pt?"g":""))}class Dt{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Pt,se){se.position=this.position++,this.matchIndexes[this.matchAt]=se,this.regexes.push([se,Pt]),this.matchAt+=T(Pt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Pt=this.regexes.map(se=>se[1]);this.matcherRe=wt(L(Pt,{joinWith:"|"}),!0),this.lastIndex=0}exec(Pt){this.matcherRe.lastIndex=this.lastIndex;const se=this.matcherRe.exec(Pt);if(!se)return null;const ii=se.findIndex((on,Gr)=>Gr>0&&on!==void 0),ci=this.matchIndexes[ii];return se.splice(0,ii),Object.assign(se,ci)}}class le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Pt){if(this.multiRegexes[Pt])return this.multiRegexes[Pt];const se=new Dt;return this.rules.slice(Pt).forEach(([ii,ci])=>se.addRule(ii,ci)),se.compile(),this.multiRegexes[Pt]=se,se}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Pt,se){this.rules.push([Pt,se]),se.type==="begin"&&this.count++}exec(Pt){const se=this.getMatcher(this.regexIndex);se.lastIndex=this.lastIndex;let ii=se.exec(Pt);if(this.resumingScanAtSamePosition()&&!(ii&&ii.index===this.lastIndex)){const ci=this.getMatcher(0);ci.lastIndex=this.lastIndex+1,ii=ci.exec(Pt)}return ii&&(this.regexIndex+=ii.position+1,this.regexIndex===this.count&&this.considerAll()),ii}}function ei(Ht){const Pt=new le;return Ht.contains.forEach(se=>Pt.addRule(se.begin,{rule:se,type:"begin"})),Ht.terminatorEnd&&Pt.addRule(Ht.terminatorEnd,{type:"end"}),Ht.illegal&&Pt.addRule(Ht.illegal,{type:"illegal"}),Pt}function ue(Ht,Pt){const se=Ht;if(Ht.isCompiled)return se;[At,Rt,_n,_e].forEach(ci=>ci(Ht,Pt)),tt.compilerExtensions.forEach(ci=>ci(Ht,Pt)),Ht.__beforeBegin=null,[Ft,zt,Yt].forEach(ci=>ci(Ht,Pt)),Ht.isCompiled=!0;let ii=null;return typeof Ht.keywords=="object"&&Ht.keywords.$pattern&&(Ht.keywords=Object.assign({},Ht.keywords),ii=Ht.keywords.$pattern,delete Ht.keywords.$pattern),ii=ii||/\w+/,Ht.keywords&&(Ht.keywords=Be(Ht.keywords,tt.case_insensitive)),se.keywordPatternRe=wt(ii,!0),Pt&&(Ht.begin||(Ht.begin=/\B|\b/),se.beginRe=wt(se.begin),!Ht.end&&!Ht.endsWithParent&&(Ht.end=/\B|\b/),Ht.end&&(se.endRe=wt(se.end)),se.terminatorEnd=g(se.end)||"",Ht.endsWithParent&&Pt.terminatorEnd&&(se.terminatorEnd+=(Ht.end?"|":"")+Pt.terminatorEnd)),Ht.illegal&&(se.illegalRe=wt(Ht.illegal)),Ht.contains||(Ht.contains=[]),Ht.contains=[].concat(...Ht.contains.map(function(ci){return Ue(ci==="self"?Ht:ci)})),Ht.contains.forEach(function(ci){ue(ci,se)}),Ht.starts&&ue(Ht.starts,Pt),se.matcher=ei(se),se}if(tt.compilerExtensions||(tt.compilerExtensions=[]),tt.contains&&tt.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return tt.classNameAliases=n(tt.classNameAliases||{}),ue(tt)}function Le(tt){return tt?tt.endsWithParent||Le(tt.starts):!1}function Ue(tt){return tt.variants&&!tt.cachedVariants&&(tt.cachedVariants=tt.variants.map(function(wt){return n(tt,{variants:null},wt)})),tt.cachedVariants?tt.cachedVariants:Le(tt)?n(tt,{starts:tt.starts?n(tt.starts):null}):Object.isFrozen(tt)?n(tt):tt}var Ee="11.11.1";class hr extends Error{constructor(wt,Dt){super(wt),this.name="HTMLInjectionError",this.html=Dt}}const xi=r,Xi=n,Se=Symbol("nomatch"),er=7,wr=function(tt){const wt=Object.create(null),Dt=Object.create(null),le=[];let ei=!0;const ue="Could not find the language '{}', did you forget to load/include a language module?",Ht={disableAutodetect:!0,name:"Plain text",contains:[]};let Pt={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function se(dt){return Pt.noHighlightRe.test(dt)}function ii(dt){let Lt=dt.className+" ";Lt+=dt.parentNode?dt.parentNode.className:"";const It=Pt.languageDetectRe.exec(Lt);if(It){const ee=ur(It[1]);return ee||(Ai(ue.replace("{}",It[1])),Ai("Falling back to no-highlight mode for this block.",dt)),ee?It[1]:"no-highlight"}return Lt.split(/\s+/).find(ee=>se(ee)||ur(ee))}function ci(dt,Lt,It){let ee="",je="";typeof Lt=="object"?(ee=dt,It=Lt.ignoreIllegals,je=Lt.language):(bi("10.7.0","highlight(lang, code, ...args) has been deprecated."),bi("10.7.0",`Please use highlight(code, options) instead.
|
|
414
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),je=dt,ee=Lt),It===void 0&&(It=!0);const ni={code:ee,language:je};V("before:highlight",ni);const He=ni.result?ni.result:on(ni.language,ni.code,It);return He.code=ni.code,V("after:highlight",He),He}function on(dt,Lt,It,ee){const je=Object.create(null);function ni(jt,Qt){return jt.keywords[Qt]}function He(){if(!$t.keywords){Re.addText($e);return}let jt=0;$t.keywordPatternRe.lastIndex=0;let Qt=$t.keywordPatternRe.exec($e),ke="";for(;Qt;){ke+=$e.substring(jt,Qt.index);const ze=Mt.case_insensitive?Qt[0].toLowerCase():Qt[0],Fi=ni($t,ze);if(Fi){const[Un,Nh]=Fi;if(Re.addText(ke),ke="",je[ze]=(je[ze]||0)+1,je[ze]<=er&&(Dr+=Nh),Un.startsWith("_"))ke+=Qt[0];else{const Jd=Mt.classNameAliases[Un]||Un;Ui(Qt[0],Jd)}}else ke+=Qt[0];jt=$t.keywordPatternRe.lastIndex,Qt=$t.keywordPatternRe.exec($e)}ke+=$e.substring(jt),Re.addText(ke)}function ji(){if($e==="")return;let jt=null;if(typeof $t.subLanguage=="string"){if(!wt[$t.subLanguage]){Re.addText($e);return}jt=on($t.subLanguage,$e,!0,Ke[$t.subLanguage]),Ke[$t.subLanguage]=jt._top}else jt=ir($e,$t.subLanguage.length?$t.subLanguage:null);$t.relevance>0&&(Dr+=jt.relevance),Re.__addSublanguage(jt._emitter,jt.language)}function xe(){$t.subLanguage!=null?ji():He(),$e=""}function Ui(jt,Qt){jt!==""&&(Re.startScope(Qt),Re.addText(jt),Re.endScope())}function zn(jt,Qt){let ke=1;const ze=Qt.length-1;for(;ke<=ze;){if(!jt._emit[ke]){ke++;continue}const Fi=Mt.classNameAliases[jt[ke]]||jt[ke],Un=Qt[ke];Fi?Ui(Un,Fi):($e=Un,He(),$e=""),ke++}}function la(jt,Qt){return jt.scope&&typeof jt.scope=="string"&&Re.openNode(Mt.classNameAliases[jt.scope]||jt.scope),jt.beginScope&&(jt.beginScope._wrap?(Ui($e,Mt.classNameAliases[jt.beginScope._wrap]||jt.beginScope._wrap),$e=""):jt.beginScope._multi&&(zn(jt.beginScope,Qt),$e="")),$t=Object.create(jt,{parent:{value:$t}}),$t}function Ps(jt,Qt,ke){let ze=E(jt.endRe,ke);if(ze){if(jt["on:end"]){const Fi=new e(jt);jt["on:end"](Qt,Fi),Fi.isMatchIgnored&&(ze=!1)}if(ze){for(;jt.endsParent&&jt.parent;)jt=jt.parent;return jt}}if(jt.endsWithParent)return Ps(jt.parent,Qt,ke)}function Ja(jt){return $t.matcher.regexIndex===0?($e+=jt[0],1):(Us=!0,0)}function qo(jt){const Qt=jt[0],ke=jt.rule,ze=new e(ke),Fi=[ke.__beforeBegin,ke["on:begin"]];for(const Un of Fi)if(Un&&(Un(jt,ze),ze.isMatchIgnored))return Ja(Qt);return ke.skip?$e+=Qt:(ke.excludeBegin&&($e+=Qt),xe(),!ke.returnBegin&&!ke.excludeBegin&&($e=Qt)),la(ke,jt),ke.returnBegin?0:Qt.length}function Tr(jt){const Qt=jt[0],ke=Lt.substring(jt.index),ze=Ps($t,jt,ke);if(!ze)return Se;const Fi=$t;$t.endScope&&$t.endScope._wrap?(xe(),Ui(Qt,$t.endScope._wrap)):$t.endScope&&$t.endScope._multi?(xe(),zn($t.endScope,jt)):Fi.skip?$e+=Qt:(Fi.returnEnd||Fi.excludeEnd||($e+=Qt),xe(),Fi.excludeEnd&&($e=Qt));do $t.scope&&Re.closeNode(),!$t.skip&&!$t.subLanguage&&(Dr+=$t.relevance),$t=$t.parent;while($t!==ze.parent);return ze.starts&&la(ze.starts,jt),Fi.returnEnd?0:Qt.length}function Pn(){const jt=[];for(let Qt=$t;Qt!==Mt;Qt=Qt.parent)Qt.scope&&jt.unshift(Qt.scope);jt.forEach(Qt=>Re.openNode(Qt))}let mt={};function Bt(jt,Qt){const ke=Qt&&Qt[0];if($e+=jt,ke==null)return xe(),0;if(mt.type==="begin"&&Qt.type==="end"&&mt.index===Qt.index&&ke===""){if($e+=Lt.slice(Qt.index,Qt.index+1),!ei){const ze=new Error(`0 width match regex (${dt})`);throw ze.languageName=dt,ze.badRule=mt.rule,ze}return 1}if(mt=Qt,Qt.type==="begin")return qo(Qt);if(Qt.type==="illegal"&&!It){const ze=new Error('Illegal lexeme "'+ke+'" for mode "'+($t.scope||"<unnamed>")+'"');throw ze.mode=$t,ze}else if(Qt.type==="end"){const ze=Tr(Qt);if(ze!==Se)return ze}if(Qt.type==="illegal"&&ke==="")return $e+=`
|
|
415
|
+
`,1;if(qs>1e5&&qs>Qt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return $e+=ke,ke.length}const Mt=ur(dt);if(!Mt)throw ye(ue.replace("{}",dt)),new Error('Unknown language: "'+dt+'"');const qt=Di(Mt);let Ne="",$t=ee||qt;const Ke={},Re=new Pt.__emitter(Pt);Pn();let $e="",Dr=0,qn=0,qs=0,Us=!1;try{if(Mt.__emitTokens)Mt.__emitTokens(Lt,Re);else{for($t.matcher.considerAll();;){qs++,Us?Us=!1:$t.matcher.considerAll(),$t.matcher.lastIndex=qn;const jt=$t.matcher.exec(Lt);if(!jt)break;const Qt=Lt.substring(qn,jt.index),ke=Bt(Qt,jt);qn=jt.index+ke}Bt(Lt.substring(qn))}return Re.finalize(),Ne=Re.toHTML(),{language:dt,value:Ne,relevance:Dr,illegal:!1,_emitter:Re,_top:$t}}catch(jt){if(jt.message&&jt.message.includes("Illegal"))return{language:dt,value:xi(Lt),illegal:!0,relevance:0,_illegalBy:{message:jt.message,index:qn,context:Lt.slice(qn-100,qn+100),mode:jt.mode,resultSoFar:Ne},_emitter:Re};if(ei)return{language:dt,value:xi(Lt),illegal:!1,relevance:0,errorRaised:jt,_emitter:Re,_top:$t};throw jt}}function Gr(dt){const Lt={value:xi(dt),illegal:!1,relevance:0,_top:Ht,_emitter:new Pt.__emitter(Pt)};return Lt._emitter.addText(dt),Lt}function ir(dt,Lt){Lt=Lt||Pt.languages||Object.keys(wt);const It=Gr(dt),ee=Lt.filter(ur).filter(ln).map(xe=>on(xe,dt,!1));ee.unshift(It);const je=ee.sort((xe,Ui)=>{if(xe.relevance!==Ui.relevance)return Ui.relevance-xe.relevance;if(xe.language&&Ui.language){if(ur(xe.language).supersetOf===Ui.language)return 1;if(ur(Ui.language).supersetOf===xe.language)return-1}return 0}),[ni,He]=je,ji=ni;return ji.secondBest=He,ji}function rr(dt,Lt,It){const ee=Lt&&Dt[Lt]||It;dt.classList.add("hljs"),dt.classList.add(`language-${ee}`)}function vi(dt){let Lt=null;const It=ii(dt);if(se(It))return;if(V("before:highlightElement",{el:dt,language:It}),dt.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",dt);return}if(dt.children.length>0&&(Pt.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(dt)),Pt.throwUnescapedHTML))throw new hr("One of your code blocks includes unescaped HTML.",dt.innerHTML);Lt=dt;const ee=Lt.textContent,je=It?ci(ee,{language:It,ignoreIllegals:!0}):ir(ee);dt.innerHTML=je.value,dt.dataset.highlighted="yes",rr(dt,It,je.language),dt.result={language:je.language,re:je.relevance,relevance:je.relevance},je.secondBest&&(dt.secondBest={language:je.secondBest.language,relevance:je.secondBest.relevance}),V("after:highlightElement",{el:dt,result:je,text:ee})}function qi(dt){Pt=Xi(Pt,dt)}const kn=()=>{Sn(),bi("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function In(){Sn(),bi("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let wn=!1;function Sn(){function dt(){Sn()}if(document.readyState==="loading"){wn||window.addEventListener("DOMContentLoaded",dt,!1),wn=!0;return}document.querySelectorAll(Pt.cssSelector).forEach(vi)}function Sr(dt,Lt){let It=null;try{It=Lt(tt)}catch(ee){if(ye("Language definition for '{}' could not be registered.".replace("{}",dt)),ei)ye(ee);else throw ee;It=Ht}It.name||(It.name=dt),wt[dt]=It,It.rawDefinition=Lt.bind(null,tt),It.aliases&&Yr(It.aliases,{languageName:dt})}function $n(dt){delete wt[dt];for(const Lt of Object.keys(Dt))Dt[Lt]===dt&&delete Dt[Lt]}function Ea(){return Object.keys(wt)}function ur(dt){return dt=(dt||"").toLowerCase(),wt[dt]||wt[Dt[dt]]}function Yr(dt,{languageName:Lt}){typeof dt=="string"&&(dt=[dt]),dt.forEach(It=>{Dt[It.toLowerCase()]=Lt})}function ln(dt){const Lt=ur(dt);return Lt&&!Lt.disableAutodetect}function dr(dt){dt["before:highlightBlock"]&&!dt["before:highlightElement"]&&(dt["before:highlightElement"]=Lt=>{dt["before:highlightBlock"](Object.assign({block:Lt.el},Lt))}),dt["after:highlightBlock"]&&!dt["after:highlightElement"]&&(dt["after:highlightElement"]=Lt=>{dt["after:highlightBlock"](Object.assign({block:Lt.el},Lt))})}function ri(dt){dr(dt),le.push(dt)}function Gt(dt){const Lt=le.indexOf(dt);Lt!==-1&&le.splice(Lt,1)}function V(dt,Lt){const It=dt;le.forEach(function(ee){ee[It]&&ee[It](Lt)})}function kt(dt){return bi("10.7.0","highlightBlock will be removed entirely in v12.0"),bi("10.7.0","Please use highlightElement now."),vi(dt)}Object.assign(tt,{highlight:ci,highlightAuto:ir,highlightAll:Sn,highlightElement:vi,highlightBlock:kt,configure:qi,initHighlighting:kn,initHighlightingOnLoad:In,registerLanguage:Sr,unregisterLanguage:$n,listLanguages:Ea,getLanguage:ur,registerAliases:Yr,autoDetection:ln,inherit:Xi,addPlugin:ri,removePlugin:Gt}),tt.debugMode=function(){ei=!1},tt.safeMode=function(){ei=!0},tt.versionString=Ee,tt.regex={concat:C,lookahead:x,either:k,optional:v,anyNumberOfTimes:y};for(const dt in ct)typeof ct[dt]=="object"&&i(ct[dt]);return Object.assign(tt,ct),tt},Pi=wr({});return Pi.newInstance=()=>wr({}),a0=Pi,Pi.HighlightJS=Pi,Pi.default=Pi,a0}var s0,dE;function WZ(){if(dE)return s0;dE=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 s0=i,s0}var o0,fE;function GZ(){if(fE)return o0;fE=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._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],N=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],L=["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:[...E,...N,"set","shopt",...L,...O]},contains:[v,e.SHEBANG(),C,x,c,h,T,u,d,f,g,n]}}return o0=i,o0}var l0,pE;function YZ(){if(pE)return l0;pE=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],E={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},N={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(E,N,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 l0=i,l0}var c0,gE;function KZ(){if(gE)return c0;gE=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"],L={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:L,contains:A.concat([{begin:/\(/,end:/\)/,keywords:L,contains:A.concat(["self"]),relevance:0}]),relevance:0},z={className:"function",begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:L,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:L,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:L,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:L,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:L,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,z,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:L,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:L},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return c0=i,c0}var h0,mE;function VZ(){if(mE)return h0;mE=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]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},N=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",L={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,E,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,E,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:"("+N+"\\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,E],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]},L]}}return h0=i,h0}var u0,yE;function XZ(){if(yE)return u0;yE=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 u0=u,u0}var d0,bE;function ZZ(){if(bE)return d0;bE=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 d0=i,d0}var f0,xE;function QZ(){if(xE)return f0;xE=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 f0=i,f0}var p0,vE;function JZ(){if(vE)return p0;vE=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 $=[{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($).concat(f).concat(A)}}return p0=i,p0}var g0,CE;function tQ(){if(CE)return g0;CE=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 g0=i,g0}var m0,_E;function eQ(){if(_E)return m0;_E=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 m0=i,m0}var y0,kE;function iQ(){if(kE)return y0;kE=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 y0=i,y0}var b0,wE;function rQ(){if(wE)return b0;wE=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 b0=o,b0}var x0,SE;function nQ(){if(SE)return x0;SE=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=(X,{after:Z})=>{const st="</"+X[0].slice(1);return X.input.indexOf(st,Z)!==-1},x=i,y={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,C={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(X,Z)=>{const st=X[0].length+X.index,ct=X.input[st];if(ct==="<"||ct===","){Z.ignoreMatch();return}ct===">"&&(g(X,{after:st})||Z.ignoreMatch());let vt;const At=X.input.substring(st);if(vt=At.match(/^\s*=/)){Z.ignoreMatch();return}if((vt=At.match(/^\s+extends\s+/))&&vt.index===0){Z.ignoreMatch();return}}},_={$pattern:i,keyword:e,literal:r,built_in:h,"variable.language":c},k="[0-9](_?[0-9])*",T=`\\.(${k})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",N={className:"number",variants:[{begin:`(\\b(${E})((${T})|\\.)?|(${T}))[eE][+-]?(${k})\\b`},{begin:`\\b(${E})\\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},L={className:"subst",begin:"\\$\\{",end:"\\}",keywords:_,contains:[]},O={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,L],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,L],subLanguage:"css"}},M={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,L],subLanguage:"graphql"}},z={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,L]},$={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,z,{match:/\$\d+/},N];L.contains=U.concat({begin:/\{/,end:/\}/,keywords:_,contains:["self"].concat(U)});const Y=[].concat($,L.contains),I=Y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:_,contains:["self"].concat(Y)}]),W={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:I},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"}}]},q={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]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},it={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[W],illegal:/%/},nt={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function H(X){return f.concat("(?!",X.join("|"),")")}const rt={match:f.concat(/\b/,H([...o,"super","import"].map(X=>`${X}\\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},Q={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},W]},yt="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",ot={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(yt)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[W]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:_,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:q},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,O,A,M,z,$,{match:/\$\d+/},N,q,{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:[$,d.REGEXP_MODE,{className:"function",begin:yt,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:I}]}]},{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"]}]}]},it,{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]},rt,nt,j,Q,{match:/\$[(.]/}]}}return x0=u,x0}var v0,TE;function aQ(){if(TE)return v0;TE=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 v0=i,v0}var C0,EE;function sQ(){if(EE)return C0;EE=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:`
|
|
416
|
+
`},v]}}return C0=a,C0}var _0,NE;function oQ(){if(NE)return _0;NE=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(Y){return{className:"string",begin:"~?"+Y+".*?"+Y}},E=function(Y,I,W){return{className:Y,begin:I,relevance:W}},N={$pattern:/[a-z-]+/,keyword:y,attribute:a.join(" ")},L={begin:"\\(",end:"\\)",contains:k,keywords:N,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,L,E("variable","@@?"+v,10),E("variable","@\\{"+v+"\\}"),E("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}}]},z={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:N,returnEnd:!0,contains:k,relevance:0}},D={className:"variable",variants:[{begin:"@"+v+"\\s*:",relevance:15},{begin:"@"+v}],starts:{end:"[;}]",returnEnd:!0,contains:O}},$={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,E("keyword","all\\b"),E("variable","@\\{"+v+"\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},g.CSS_NUMBER_MODE,E("selector-tag",C,0),E("selector-id","#"+C),E("selector-class","\\."+C,0),E("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:[$]};return _.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,z,D,U,M,$,A,g.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:_}}return _0=d,_0}var k0,AE;function lQ(){if(AE)return k0;AE=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 k0=i,k0}var w0,ME;function cQ(){if(ME)return w0;ME=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 w0=i,w0}var S0,BE;function hQ(){if(BE)return S0;BE=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 E=T==="\\1"?T:r.concat(T,k);return r.concat(r.concat("(?:",_,")"),k,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,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 S0=i,S0}var T0,LE;function uQ(){if(LE)return T0;LE=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 T0=i,T0}var E0,OE;function dQ(){if(OE)return E0;OE=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=`[
|
|
417
|
+
]`,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"],E=["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"],L={keyword:T,literal:(W=>{const j=[];return W.forEach(q=>{j.push(q),q.toLowerCase()===q?j.push(q.toUpperCase()):j.push(q.toLowerCase())}),j})(k),built_in:E},O=W=>W.map(j=>j.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,r.concat(v,"+"),r.concat("(?!",O(E).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},M=r.concat(a,"\\b(?!\\()"),z={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(/(?!::)/))},$={relevance:0,begin:/\(/,end:/\)/,keywords:L,contains:[D,h,z,e.C_BLOCK_COMMENT_MODE,C,_,A]},U={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",O(T).join("\\b|"),"|",O(E).join("\\b|"),"\\b)"),a,r.concat(v,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[$]};$.contains.push(U);const Y=[D,z,e.C_BLOCK_COMMENT_MODE,C,_,A],I={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",...Y]},...Y,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:L,contains:[I,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,z,{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:L,contains:["self",I,h,z,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 E0=i,E0}var N0,RE;function fQ(){if(RE)return N0;RE=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 N0=i,N0}var A0,DE;function pQ(){if(DE)return A0;DE=1;function i(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return A0=i,A0}var M0,jE;function gQ(){if(jE)return M0;jE=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 M0=i,M0}var B0,FE;function mQ(){if(FE)return B0;FE=1;function i(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return B0=i,B0}var L0,IE;function yQ(){if(IE)return L0;IE=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 L0=i,L0}var O0,$E;function bQ(){if($E)return O0;$E=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 O0=i,O0}var R0,zE;function xQ(){if(zE)return R0;zE=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 R0=u,R0}var D0,PE;function vQ(){if(PE)return D0;PE=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 D0=i,D0}var j0,qE;function CQ(){if(qE)return j0;qE=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 E(O){return r.concat(/\b/,r.either(...O.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const N={scope:"keyword",match:E(y),relevance:0};function L(O,{exceptions:A,when:M}={}){const z=M;return A=A||[],O.map(D=>D.match(/\|\d+$/)||A.includes(D)?D:z(D)?`${D}|0`:D)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:L(C,{when:O=>O.length<3}),literal:c,type:u,built_in:x},contains:[{scope:"type",match:E(h)},N,T,_,a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}return j0=i,j0}var F0,UE;function _Q(){if(UE)return F0;UE=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 z=M[M.length-1];return typeof z=="object"&&z.constructor===Object?(M.splice(M.length-1,1),z):{}}function a(...M){return"("+(n(M).capture?"":"?:")+M.map($=>i($)).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]/),E=r(k,T,"*"),N=r(/[A-Z]/,T,"*"),L=["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\(/,E,/\)/),"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 z={match:/\s+/,relevance:0},D=M.COMMENT("/\\*","\\*/",{contains:["self"]}),$=[M.C_LINE_COMMENT_MODE,D],U={match:[/\./,a(...c,...h)],className:{2:"keyword"}},Y={match:r(/\./,a(...d)),relevance:0},I=d.filter(Se=>typeof Se=="string").concat(["_|0"]),W=d.filter(Se=>typeof Se!="string").concat(u).map(o),j={variants:[{className:"keyword",match:a(...W,...h)}]},q={$pattern:a(/\b\w+/,/#\w+/),keyword:I.concat(x),literal:f},G=[U,Y,j],it={match:r(/\./,a(...y)),relevance:0},nt={className:"built_in",match:r(/\b/,a(...y),/(?=\()/)},H=[it,nt],rt={match:/->/,relevance:0},ft={className:"operator",relevance:0,variants:[{match:_},{match:`\\.(\\.|${C})+`}]},Q=[rt,ft],yt="([0-9]_*)+",ot="([0-9a-fA-F]_*)+",X={className:"number",relevance:0,variants:[{match:`\\b(${yt})(\\.(${yt}))?([eE][+-]?(${yt}))?\\b`},{match:`\\b0x(${ot})(\\.(${ot}))?([pP][+-]?(${yt}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Z=(Se="")=>({className:"subst",variants:[{match:r(/\\/,Se,/[0\\tnr"']/)},{match:r(/\\/,Se,/u\{[0-9a-fA-F]{1,8}\}/)}]}),st=(Se="")=>({className:"subst",match:r(/\\/,Se,/[\t ]*(?:[\r\n]|\r\n)/)}),ct=(Se="")=>({className:"subst",label:"interpol",begin:r(/\\/,Se,/\(/),end:/\)/}),vt=(Se="")=>({begin:r(Se,/"""/),end:r(/"""/,Se),contains:[Z(Se),st(Se),ct(Se)]}),At=(Se="")=>({begin:r(Se,/"/),end:r(/"/,Se),contains:[Z(Se),ct(Se)]}),Ft={className:"string",variants:[vt(),vt("#"),vt("##"),vt("###"),At(),At("#"),At("##"),At("###")]},zt=[M.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[M.BACKSLASH_ESCAPE]}],Rt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:zt},Yt=Se=>{const er=r(Se,/\//),wr=r(/\//,Se);return{begin:er,end:wr,contains:[...zt,{scope:"comment",begin:`#(?!.*${wr})`,end:/$/}]}},_e={scope:"regexp",variants:[Yt("###"),Yt("##"),Yt("#"),Rt]},ti={match:r(/`/,E,/`/)},ki={className:"variable",match:/\$\d+/},Be={className:"variable",match:`\\$${T}+`},yi=[ti,ki,Be],$i={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:O,contains:[...Q,X,Ft]}]}},zi={scope:"keyword",match:r(/@/,a(...L),e(a(/\(/,/\s+/)))},ye={scope:"meta",match:r(/@/,E)},Ai=[$i,zi,ye],bi={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:N,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:r(/\s+&\s+/,e(N)),relevance:0}]},tr={begin:/</,end:/>/,keywords:q,contains:[...$,...G,...Ai,rt,bi]};bi.contains.push(tr);const fi={match:r(E,/\s*:/),keywords:"_|0",relevance:0},Vi={begin:/\(/,end:/\)/,relevance:0,keywords:q,contains:["self",fi,...$,_e,...G,...H,...Q,X,Ft,...yi,...Ai,bi]},Mi={begin:/</,end:/>/,keywords:"repeat each",contains:[...$,bi]},xr={begin:a(e(r(E,/\s*:/)),e(r(E,/\s+/,E,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:E}]},_n={begin:/\(/,end:/\)/,keywords:q,contains:[xr,...$,...G,...Q,X,Ft,...Ai,bi,Vi],endsParent:!0,illegal:/["']/},Di={match:[/(func|macro)/,/\s+/,a(ti.match,E,_)],className:{1:"keyword",3:"title.function"},contains:[Mi,_n,z],illegal:[/\[/,/%/]},Le={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Mi,_n,z],illegal:/\[|%/},Ue={match:[/operator/,/\s+/,_],className:{1:"keyword",3:"title"}},Ee={begin:[/precedencegroup/,/\s+/,N],className:{1:"keyword",3:"title"},contains:[bi],keywords:[...g,...f],end:/}/},hr={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},xi={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Xi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,E,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:q,contains:[Mi,...G,{begin:/:/,end:/\{/,keywords:q,contains:[{scope:"title.class.inherited",match:N},...G],relevance:0}]};for(const Se of Ft.variants){const er=Se.contains.find(Pi=>Pi.label==="interpol");er.keywords=q;const wr=[...G,...H,...Q,X,Ft,...yi];er.contains=[...wr,{begin:/\(/,end:/\)/,contains:["self",...wr]}]}return{name:"Swift",keywords:q,contains:[...$,Di,Le,hr,xi,Xi,Ue,Ee,{beginKeywords:"import",end:/$/,contains:[...$],relevance:0},_e,...G,...H,...Q,X,Ft,...yi,...Ai,bi,Vi]}}return F0=A,F0}var I0,HE;function kQ(){if(HE)return I0;HE=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 I0=i,I0}var $0,WE;function wQ(){if(WE)return $0;WE=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=(Z,{after:st})=>{const ct="</"+Z[0].slice(1);return Z.input.indexOf(ct,st)!==-1},y=i,v={begin:"<>",end:"</>"},C=/<[A-Za-z0-9\\._:-]+\s*\/>/,_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,st)=>{const ct=Z[0].length+Z.index,vt=Z.input[ct];if(vt==="<"||vt===","){st.ignoreMatch();return}vt===">"&&(x(Z,{after:ct})||st.ignoreMatch());let At;const Ft=Z.input.substring(ct);if(At=Ft.match(/^\s*=/)){st.ignoreMatch();return}if((At=Ft.match(/^\s+extends\s+/))&&At.index===0){st.ignoreMatch();return}}},k={$pattern:i,keyword:e,literal:r,built_in:h,"variable.language":c},T="[0-9](_?[0-9])*",E=`\\.(${T})`,N="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",L={className:"number",variants:[{begin:`(\\b(${N})((${E})|\\.)?|(${E}))[eE][+-]?(${T})\\b`},{begin:`\\b(${N})\\b((${E})\\b|\\.)?|(${E})\\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"}},z={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]},Y=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,z,D,{match:/\$\d+/},L];O.contains=Y.concat({begin:/\{/,end:/\}/,keywords:k,contains:["self"].concat(Y)});const I=[].concat(U,O.contains),W=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:k,contains:["self"].concat(I)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:k,contains:W},q={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"}}]},G={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]}},it={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},nt={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function rt(Z){return g.concat("(?!",Z.join("|"),")")}const ft={match:g.concat(/\b/,rt([...o,"super","import"].map(Z=>`${Z}\\s*\\(`)),y,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:g.concat(/\./,g.lookahead(g.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},yt={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},ot="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",X={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:G},illegal:/#(?![$_A-z])/,contains:[f.SHEBANG({label:"shebang",binary:"node",relevance:5}),it,f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,z,D,U,{match:/\$\d+/},L,G,{scope:"attr",match:y+g.lookahead(":"),relevance:0},X,{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"]}]}]},nt,{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},Q,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},ft,H,q,yt,{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"],E={$pattern:i,keyword:e.concat(T),literal:r,built_in:h.concat(v),"variable.language":c},N={className:"meta",begin:"@"+y},L=(z,D,$)=>{const U=z.contains.findIndex(Y=>Y.label===D);if(U===-1)throw new Error("can not find mode to replace");z.contains.splice(U,1,$)};Object.assign(x.keywords,E),x.exports.PARAMS_CONTAINS.push(N);const O=x.contains.find(z=>z.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([N,C,_,A]),L(x,"shebang",f.SHEBANG()),L(x,"use_strict",k);const M=x.contains.find(z=>z.label==="func.def");return M.relevance=0,Object.assign(x,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),x}return $0=d,$0}var z0,GE;function SQ(){if(GE)return z0;GE=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 z0=i,z0}var P0,YE;function TQ(){if(YE)return P0;YE=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 P0=i,P0}var q0,KE;function EQ(){if(KE)return q0;KE=1;var i=HZ();return i.registerLanguage("xml",WZ()),i.registerLanguage("bash",GZ()),i.registerLanguage("c",YZ()),i.registerLanguage("cpp",KZ()),i.registerLanguage("csharp",VZ()),i.registerLanguage("css",XZ()),i.registerLanguage("markdown",ZZ()),i.registerLanguage("diff",QZ()),i.registerLanguage("ruby",JZ()),i.registerLanguage("go",tQ()),i.registerLanguage("graphql",eQ()),i.registerLanguage("ini",iQ()),i.registerLanguage("java",rQ()),i.registerLanguage("javascript",nQ()),i.registerLanguage("json",aQ()),i.registerLanguage("kotlin",sQ()),i.registerLanguage("less",oQ()),i.registerLanguage("lua",lQ()),i.registerLanguage("makefile",cQ()),i.registerLanguage("perl",hQ()),i.registerLanguage("objectivec",uQ()),i.registerLanguage("php",dQ()),i.registerLanguage("php-template",fQ()),i.registerLanguage("plaintext",pQ()),i.registerLanguage("python",gQ()),i.registerLanguage("python-repl",mQ()),i.registerLanguage("r",yQ()),i.registerLanguage("rust",bQ()),i.registerLanguage("scss",xQ()),i.registerLanguage("shell",vQ()),i.registerLanguage("sql",CQ()),i.registerLanguage("swift",_Q()),i.registerLanguage("yaml",kQ()),i.registerLanguage("typescript",wQ()),i.registerLanguage("vbnet",SQ()),i.registerLanguage("wasm",TQ()),i.HighlightJS=i,i.default=i,q0=i,q0}var NQ=EQ();const AQ=Dd(NQ);function MQ(i,e){K.useEffect(()=>{const r=i.current;r&&r.querySelectorAll("pre > code:not(.language-mermaid)").forEach(n=>{if(n.dataset.highlighted!=="yes")try{AQ.highlightElement(n)}catch{}})},[i,e])}we.setOptions({gfm:!0,breaks:!0});function Vd({content:i,frontmatter:e}){const r=K.useMemo(()=>Ol.sanitize(we.parse(i)),[i]),n=K.useRef(null),{resolved:a}=jd();UZ(n,r,a,"md-mmd"),MQ(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 BQ({onManagePacks:i}){const{t:e}=Ni(),{data:r}=OI(),n=(r==null?void 0:r.nudge)??null,a=(r==null?void 0:r.newPacks)??[],[o,c]=K.useState(!1),h=K.useCallback(u=>{u.key==="Escape"&&o&&c(!1)},[o]);return K.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(Vd,{content:n})}),a.length>0&&i&&m.jsx("button",{className:"update-badge-action",onClick:()=>{i(),c(!1)},children:e("update.managePacks")})]})]}):null}const Qu=[.85,.9,1,1.1,1.2],Z5="dreamcontext-zoom";function LQ(){try{const i=localStorage.getItem(Z5);if(i!==null){const e=parseFloat(i);if(Qu.includes(e))return e}}catch{}return 1}function OQ(i){document.documentElement.style.setProperty("--zoom",String(i))}function RQ({onNavigate:i}){const{theme:e,setTheme:r,resolved:n}=jd(),{data:a}=uM(),[o,c]=K.useState(LQ);K.useEffect(()=>{OQ(o)},[o]);const h=(a==null?void 0:a.debt)??0,u=cM(h),d=hM(h),f=()=>{r(e==="system"?"light":e==="light"?"dark":"system")},g=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",x=Qu.indexOf(o),y=x>0,v=x<Qu.length-1,C=_=>{const k=x+_;if(k<0||k>=Qu.length)return;const T=Qu[k];c(T);try{localStorage.setItem(Z5,String(T))}catch{}};return m.jsxs("header",{className:"header",children:[m.jsxs("div",{className:"header-left",children:[m.jsxs("div",{className:`agent-avatar agent-avatar--${d}`,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:d==="must_sleep"?.4:d==="sleepy"?.6:d==="drowsy"?.8:1}),m.jsx("path",{d:"M14 8L19 14L14 20L9 14L14 8Z",fill:"url(#diamond-inner)",opacity:d==="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%)"})]})]})]}),d==="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--${d}`,children:[u," (",h,")"]})]})]}),m.jsxs("div",{className:"header-right",children:[m.jsx(BQ,{onManagePacks:i?()=>i("packs"):void 0}),m.jsxs("div",{className:"zoom-controls",children:[m.jsx("button",{className:"zoom-btn",onClick:()=>C(-1),disabled:!y,title:"Zoom out",children:"-"}),m.jsxs("span",{className:"zoom-label",children:[Math.round(o*100),"%"]}),m.jsx("button",{className:"zoom-btn",onClick:()=>C(1),disabled:!v,title:"Zoom in",children:"+"})]}),m.jsx("button",{className:"theme-toggle",onClick:f,title:`Theme: ${g}`,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 DQ=[{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"}]}],Q5="dreamcontext.dashboard.sidebarCollapsed",J5="dreamcontext.dashboard.aboutSeen",Ac=typeof window<"u"&&window.matchMedia?window.matchMedia("(max-width: 1024px)"):null;function jQ(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Q5)==="1"}catch{return!1}}function FQ(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(J5)==="1"}catch{return!1}}function IQ({activePage:i,onNavigate:e}){const{t:r}=Ni(),[n,a]=K.useState(jQ),[o,c]=K.useState((Ac==null?void 0:Ac.matches)??!1),[h,u]=K.useState(FQ);K.useEffect(()=>{if(!Ac)return;const v=C=>c(C.matches);return Ac.addEventListener("change",v),()=>Ac.removeEventListener("change",v)},[]);const d=o||n,f=()=>{a(v=>{const C=!v;try{window.localStorage.setItem(Q5,C?"1":"0")}catch{}return C})},g=()=>{if(!h){u(!0);try{window.localStorage.setItem(J5,"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")})]}),DQ.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 tD="dreamcontext.dashboard.activePage",$Q=["tasks","core","knowledge","features","sleep","brain","council","taxonomy","settings","packs","about"];function zQ(){if(typeof window>"u")return"brain";try{const i=window.localStorage.getItem(tD);if(i&&$Q.includes(i))return i}catch{}return"brain"}function PQ({children:i}){const[e,r]=K.useState(zQ),[n,a]=K.useState(null),[o,c]=K.useState(0),h=K.useCallback((f,g)=>{r(f),a(g),c(x=>x+1);try{window.localStorage.setItem(tD,f)}catch{}},[]),u=K.useCallback(f=>{h(f,null)},[h]),d=K.useCallback(()=>a(null),[]);return m.jsxs("div",{className:"shell",children:[m.jsx(RQ,{onNavigate:u}),m.jsxs("div",{className:"shell-body",children:[m.jsx(IQ,{activePage:e,onNavigate:u}),m.jsx("main",{className:"shell-main",children:i({page:e,focusId:n,nonce:o,navigate:h,clearFocus:d})})]})]})}function qQ(){return di({queryKey:["tasks"],queryFn:()=>me.get("/tasks"),select:i=>i.tasks})}function UQ(){const i=kr();return Hr({mutationFn:e=>me.post("/tasks",e),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function eD(){const i=kr();return Hr({mutationFn:({slug:e,updates:r})=>me.patch(`/tasks/${e}`,r),onSuccess:(e,r)=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks",r.slug]})}})}function iD(){const i=kr();return Hr({mutationFn:e=>me.del(`/tasks/${e}`),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function HQ(){return di({queryKey:["task-members"],queryFn:()=>me.get("/tasks/members"),select:i=>i.members,staleTime:300*1e3})}function WQ(){return di({queryKey:["tasks-sync-status"],queryFn:()=>me.get("/tasks/sync-status"),select:i=>i.status,refetchInterval:3e4})}function GQ(){const i=kr();return Hr({mutationFn:()=>me.post("/tasks/sync",{direction:"both"}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks-sync-status"]})}})}function YQ(){return di({queryKey:["features"],queryFn:()=>me.get("/features"),select:i=>i.features??[],staleTime:6e4})}function KQ(){const i=kr();return Hr({mutationFn:({slug:e,content:r})=>me.post(`/tasks/${e}/changelog`,{content:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function rD(){return di({queryKey:["releases"],queryFn:()=>me.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"}))})}function nD(){return di({queryKey:["releases"],queryFn:()=>me.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function VQ(){const i=kr();return Hr({mutationFn:e=>me.post("/releases",{...e,status:"planning"}),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}function XQ(){const i=kr();return Hr({mutationFn:({version:e,updates:r})=>me.patch(`/releases/${encodeURIComponent(e)}`,r),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}const aD="dreamcontext:",sD="kanban-presets",Pv=`${aD}${sD}`;function oD(i){return i?`${aD}${i}:${sD}`:Pv}function ZQ(i){const e=oD(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(Pv);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(Pv);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function lD(i,e){try{localStorage.setItem(oD(i),JSON.stringify(e))}catch{}}const zg=new Map;function RC(i){let e=zg.get(i);return e===void 0&&(e=ZQ(i),zg.set(i,e)),e}const qv=new Set;function QQ(i){return qv.add(i),()=>{qv.delete(i)}}function cD(){for(const i of qv)i()}function JQ(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function tJ(i){return K.useSyncExternalStore(QQ,()=>RC(i))}function eJ(i,e,r){const n={id:JQ(),name:e,filters:r},o=[...RC(i),n];return zg.set(i,o),lD(i,o),cD(),n}function iJ(i,e){const r=RC(i),n=r.filter(a=>a.id!==e);n.length!==r.length&&(zg.set(i,n),lD(i,n),cD())}const rJ=10;function Ka(i){let e=2166136261;for(let r=0;r<i.length;r++)e^=i.charCodeAt(r),e=Math.imul(e,16777619);return(e>>>0)%rJ}function Xd({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":Ka(o),children:o},o))}),m.jsx("span",{className:"task-card-date",children:i.updated_at})]})]})}function nJ({label:i,color:e,tasks:r,onTaskClick:n,onTaskContextMenu:a,onDragStart:o}){const[c,h]=K.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(Xd,{task:u,onClick:()=>n(u),onContextMenu:a?d=>a(u,d):void 0,onDragStart:d=>o(d,u)},u.slug))})]})}function VE({title:i,status:e,tasks:r,count:n,colorVar:a,onTaskClick:o,onTaskContextMenu:c,onDrop:h,subGroups:u}){const[d,f]=K.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(nJ,{label:C.label,color:C.color,tasks:C.tasks,onTaskClick:o,onTaskContextMenu:c,onDragStart:v},C.key)):r.map(C=>m.jsx(Xd,{task:C,onClick:()=>o(C),onContextMenu:c?_=>c(C,_):void 0,onDragStart:_=>v(_,C)},C.slug))})]})}function jc({trigger:i,content:e,isOpen:r,onClose:n,align:a="left",width:o}){const c=K.useRef(null),h=K.useCallback(d=>{c.current&&!c.current.contains(d.target)&&n()},[n]),u=K.useCallback(d=>{d.key==="Escape"&&n()},[n]);return K.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 aJ({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 Bu({label:i,options:e,selected:r,onChange:n,isOpen:a,onToggle:o,onClose:c}){var k,T;const h=r.length>0,[u,d]=K.useState(""),f=K.useRef(null);K.useEffect(()=>{a?requestAnimationFrame(()=>{var E;return(E=f.current)==null?void 0:E.focus()}):d("")},[a]);const g=u.trim()?e.filter(E=>E.label.toLowerCase().includes(u.trim().toLowerCase())):e,x=E=>{r.includes(E)?n(r.filter(N=>N!==E)):n([...r,E])},y=()=>n(e.map(E=>E.value)),v=()=>n([]),C=h?r.length<=2?r.map(E=>{var N;return((N=e.find(L=>L.value===E))==null?void 0:N.label)??E}).join(", "):`${((k=e.find(E=>E.value===r[0]))==null?void 0:k.label)??r[0]} +${r.length-1}`:i,_=e.length>5;return m.jsx(jc,{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(E=>E.value===r[0]))==null?void 0:T.color}}),m.jsx("span",{className:"filter-chip-label",children:C}),m.jsx(aJ,{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:E=>d(E.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(E=>m.jsxs("label",{className:"multi-select-option",children:[m.jsx("input",{type:"checkbox",checked:r.includes(E.value),onChange:()=>x(E.value)}),E.color&&m.jsx("span",{className:"filter-option-dot",style:{background:E.color}}),m.jsx("span",{className:"filter-option-label",children:E.label})]},E.value)),g.length===0&&m.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function XE(i){return String(i).padStart(2,"0")}function Ro(i){return`${i.getFullYear()}-${XE(i.getMonth()+1)}-${XE(i.getDate())}`}function hD(){return Ro(new Date)}function Tp(i){const e=new Date;return e.setDate(e.getDate()-i),Ro(e)}function sJ(){const i=new Date,e=i.getDay();return i.setDate(i.getDate()-(e===0?6:e-1)),Ro(i)}function oJ(){const i=new Date;return i.setDate(1),Ro(i)}function lJ(){const i=new Date;return i.setMonth(0,1),Ro(i)}function ZE(i){return new Date(i+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function cJ(){const i=hD();return[{label:"Today",from:i,to:i},{label:"Yesterday",from:Tp(1),to:Tp(1)},{label:"This week",from:sJ(),to:i},{label:"Last 7 days",from:Tp(6),to:i},{label:"This month",from:oJ(),to:i},{label:"Last 30 days",from:Tp(29),to:i},{label:"This year",from:lJ(),to:i}]}const hJ=["January","February","March","April","May","June","July","August","September","October","November","December"],uJ=["Mo","Tu","We","Th","Fr","Sa","Su"];function dJ({dateField:i,dateFrom:e,dateTo:r,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=K.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[d,f]=K.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=K.useMemo(cJ,[]),x=K.useMemo(()=>{const N=new Date(h,d+1,0).getDate(),L=new Date(h,d,1).getDay(),O=L===0?6:L-1,A=[],M=new Date(h,d,0).getDate();for(let D=O-1;D>=0;D--){const $=M-D,U=d===0?11:d-1,Y=d===0?h-1:h;A.push({date:Ro(new Date(Y,U,$)),day:$,isCurrentMonth:!1})}for(let D=1;D<=N;D++)A.push({date:Ro(new Date(h,d,D)),day:D,isCurrentMonth:!0});const z=42-A.length;for(let D=1;D<=z;D++){const $=d===11?0:d+1,U=d===11?h+1:h;A.push({date:Ro(new Date(U,$,D)),day:D,isCurrentMonth:!1})}return A},[h,d]),y=N=>{!e||e&&r?(a(N),o("")):N<e?(o(e),a(N)):o(N)},v=N=>{a(N.from),o(N.to);const L=new Date(N.from+"T00:00:00");u(L.getFullYear()),f(L.getMonth())},C=()=>{a(""),o("")},_=()=>{d===0?(f(11),u(N=>N-1)):f(N=>N-1)},k=()=>{d===11?(f(0),u(N=>N+1)):f(N=>N+1)},T=hD(),E=g.find(N=>N.from===e&&N.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(N=>m.jsx("button",{className:`mini-cal-preset ${(E==null?void 0:E.label)===N.label?"mini-cal-preset--active":""}`,onClick:()=>v(N),children:N.label},N.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:[hJ[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:[uJ.map(N=>m.jsx("div",{className:"mini-cal-day-label",children:N},N)),x.map((N,L)=>{const O=N.date===e,A=N.date===r,M=e&&r&&N.date>e&&N.date<r,z=O&&!r,D=O||A,$=["mini-cal-day",!N.isCurrentMonth&&"mini-cal-day--outside",N.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",z&&"mini-cal-day--single"].filter(Boolean).join(" ");return m.jsx("button",{className:$,onClick:()=>y(N.date),children:N.day},L)})]}),(e||r)&&m.jsxs("div",{className:"mini-cal-footer",children:[m.jsxs("span",{className:"mini-cal-range-text",children:[e&&m.jsx("span",{children:ZE(e)}),e&&r&&e!==r&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mini-cal-arrow",children:"→"}),m.jsx("span",{children:ZE(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 Pg={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function fJ(){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 Ep({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 U0(){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 QE(){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 pJ(){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 gJ(){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 mJ(){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 yJ(){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 bJ(){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 xJ(){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 vJ(){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 CJ=[{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)"}],_J=[{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)"}],kJ=[{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)"}],JE=[{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"}],H0=[{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 wJ(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 SJ(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 TJ({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,$;const{t:x}=Ni(),[y,v]=K.useState(null),[C,_]=K.useState(""),k=wJ(i),T=K.useMemo(()=>SJ(i),[i]),E=U=>v(Y=>Y===U?null:U),N=()=>v(null),L=(D=JE.find(U=>U.value===i.sortField))==null?void 0:D.label,O=($=H0.find(U=>U.value===i.groupBy))==null?void 0:$.label,A=K.useMemo(()=>d.map(U=>({value:U,label:U})),[d]),M=K.useMemo(()=>f.map(U=>({value:U,label:U})),[f]),z=K.useMemo(()=>H0.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(fJ,{}),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(QE,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx(Bu,{id:"status",label:"Status",options:CJ,selected:i.statusFilter,onChange:U=>e("statusFilter",U),isOpen:y==="status",onToggle:()=>E("status"),onClose:N}),m.jsx(Bu,{id:"priority",label:"Priority",options:_J,selected:i.priorityFilter,onChange:U=>e("priorityFilter",U),isOpen:y==="priority",onToggle:()=>E("priority"),onClose:N}),m.jsx(Bu,{id:"urgency",label:"Urgency",options:kJ,selected:i.urgencyFilter,onChange:U=>e("urgencyFilter",U),isOpen:y==="urgency",onToggle:()=>E("urgency"),onClose:N}),A.length>0&&m.jsx(Bu,{id:"tags",label:"Tags",options:A,selected:i.tagFilter,onChange:U=>e("tagFilter",U),isOpen:y==="tags",onToggle:()=>E("tags"),onClose:N}),M.length>0&&m.jsx(Bu,{id:"version",label:"Version",options:M,selected:i.versionFilter,onChange:U=>e("versionFilter",U),isOpen:y==="version",onToggle:()=>E("version"),onClose:N}),m.jsx(jc,{isOpen:y==="date",onClose:N,width:320,trigger:m.jsxs("button",{className:`filter-chip ${T?"filter-chip--active":""}`,onClick:()=>E("date"),children:[m.jsx(pJ,{}),m.jsx("span",{className:"filter-chip-label",children:T??"Date"}),m.jsx(Ep,{open:y==="date"})]}),content:m.jsx(dJ,{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(jc,{isOpen:y==="minRice",onClose:N,width:220,trigger:m.jsxs("button",{className:`filter-chip ${i.minRice!==null?"filter-chip--active":""}`,onClick:()=>E("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(Ep,{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 Y=U.target.value.trim();if(Y===""){e("minRice",null);return}const I=Number(Y);e("minRice",Number.isFinite(I)?I: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(mJ,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:m.jsx(yJ,{})}),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(bJ,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:m.jsx(xJ,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx(jc,{isOpen:y==="sort",onClose:N,align:"right",trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>E("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:L}),m.jsx(Ep,{open:y==="sort"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Sort by"}),JE.map(U=>m.jsxs("button",{className:`filter-option ${i.sortField===U.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",U.value),N()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),i.sortField===U.value&&m.jsx(U0,{})]},U.value))]})}),m.jsx(jc,{isOpen:y==="group",onClose:N,align:"right",trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>E("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(Ep,{open:y==="group"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Group by"}),H0.map(U=>m.jsxs("button",{className:`filter-option ${i.groupBy===U.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",U.value),N()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),i.groupBy===U.value&&m.jsx(U0,{})]},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"}),z.map(U=>m.jsxs("button",{className:`filter-option ${i.subGroupBy===U.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",U.value),N()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),i.subGroupBy===U.value&&m.jsx(U0,{})]},`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(vJ,{})}),m.jsx(jc,{isOpen:y==="views",onClose:N,align:"right",width:220,trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>E("views"),children:[m.jsx(gJ,{}),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),N()},children:U.name}),m.jsx("button",{className:"filter-views-delete",onClick:()=>u(U.id),children:m.jsx(QE,{})})]},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 EJ({onClose:i}){const{t:e}=Ni(),r=UQ(),{data:n}=nD(),[a,o]=K.useState(""),[c,h]=K.useState(""),[u,d]=K.useState("medium"),[f,g]=K.useState("medium"),[x,y]=K.useState(""),[v,C]=K.useState(""),[_,k]=K.useState(""),T=E=>{if(E.preventDefault(),!a.trim())return;const N=x.split(",").map(L=>L.trim()).filter(Boolean);r.mutate({name:a.trim(),description:c,priority:u,tags:N,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:E=>E.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:E=>o(E.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:E=>h(E.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:E=>d(E.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:E=>g(E.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:E=>k(E.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(n??[]).map(E=>m.jsx("option",{value:E.version,children:E.version},E.version))]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Why"}),m.jsx("textarea",{className:"field-textarea",value:v,onChange:E=>C(E.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:E=>y(E.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 Lu={exports:{}},tN;function NJ(){if(tN)return Lu.exports;tN=1,Lu.exports=i,Lu.exports.addWheelListener=i,Lu.exports.removeWheelListener=e;function i(r,n,a){r.addEventListener("wheel",n,a)}function e(r,n,a){r.removeEventListener("wheel",n,a)}return Lu.exports}var Ou={exports:{}},W0,eN;function AJ(){if(eN)return W0;eN=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,E){var N,L,O=0;do L=_+(k-_)/2,N=f(L,T,E)-C,N>0?k=L:_=L;while(Math.abs(N)>r&&++O<n);return L}function y(C,_,k,T){for(var E=0;E<i;++E){var N=g(_,k,T);if(N===0)return _;var L=f(_,k,T)-C;_-=L/N}return _}function v(C){return C}return W0=function(_,k,T,E){if(!(0<=_&&_<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(_===k&&T===E)return v;for(var N=c?new Float32Array(a):new Array(a),L=0;L<a;++L)N[L]=f(L*o,_,T);function O(A){for(var M=0,z=1,D=a-1;z!==D&&N[z]<=A;++z)M+=o;--z;var $=(A-N[z])/(N[z+1]-N[z]),U=M+$*o,Y=g(U,_,T);return Y>=e?y(A,U,_,T):Y===0?U:x(A,M,M+o,_,T)}return function(M){return M===0?0:M===1?1:f(O(M),k,E)}},W0}var iN;function MJ(){if(iN)return Ou.exports;iN=1;var i=AJ(),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)};Ou.exports=r,Ou.exports.makeAggregateRaf=h,Ou.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(z){g[z]=u[z],x[z]=d[z]-u[z]});var T=typeof f.duration=="number"?f.duration:400,E=Math.max(1,T*.06),N,L=0;return N=_.next(A),{cancel:O};function O(){_.cancel(N),N=0}function A(){var z=y(L/E);L+=1,M(z),L<=E?(N=_.next(A),v(u)):(N=0,setTimeout(function(){C(u)},0))}function M(z){k.forEach(function(D){u[D]=x[D]*z+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 Ou.exports}var G0,rN;function BJ(){if(rN)return G0;rN=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 G0=i,G0}var Y0,nN;function LJ(){if(nN)return Y0;nN=1,Y0=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,E,N;return{start:O,stop:M,cancel:L};function L(){u(y),u(N)}function O(){f=n(),_=E=v=k=0,g=new Date,u(y),u(N),y=d(A)}function A(){var D=Date.now(),$=D-g;g=D;var U=n(),Y=U.x-f.x,I=U.y-f.y;f=U;var W=1e3/(1+$);v=.8*Y*W+.2*v,k=.8*I*W+.2*k,y=d(A)}function M(){u(y),u(N);var D=n();C=D.x,T=D.y,g=Date.now(),(v<-c||v>c)&&(_=h*v,C+=_),(k<-c||k>c)&&(E=h*k,T+=E),N=d(z)}function z(){var D=Date.now()-g,$=!1,U=0,Y=0;_&&(U=-_*Math.exp(-D/x),U>.5||U<-.5?$=!0:U=_=0),E&&(Y=-E*Math.exp(-D/x),Y>.5||Y<-.5?$=!0:Y=E=0),$&&(a(C+U,T+Y),N=d(z))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function r(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return Y0}var K0,aN;function OJ(){if(aN)return K0;aN=1,K0=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 K0}var V0,sN;function RJ(){if(sN)return V0;sN=1,V0=i;function i(){this.x=0,this.y=0,this.scale=1}return V0}var Np={exports:{}},oN;function DJ(){if(oN)return Np.exports;oN=1,Np.exports=i,Np.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 Np.exports}var Ap={exports:{}},lN;function jJ(){if(lN)return Ap.exports;lN=1,Ap.exports=i,Ap.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 Ap.exports}var X0,cN;function FJ(){if(cN)return X0;cN=1;var i=NJ(),e=MJ(),r=BJ(),n=LJ(),a=OJ(),o=a(),c=a(!0),h=RJ(),u=DJ(),d=jJ(),f=1,g=1.75,x=300,y=200;X0=v;function v(A,M){M=M||{};var z=M.controller;if(z||(u.canAttach(A)?z=u(A,M):d.canAttach(A)&&(z=d(A,M))),!z)throw new Error("Cannot create panzoom for the current type of dom element");var D=z.getOwner(),$={x:0,y:0},U=!1,Y=new h;z.initTransform&&z.initTransform(Y);var I=typeof M.filterKey=="function"?M.filterKey:k,W=typeof M.pinchSpeed=="number"?M.pinchSpeed:1,j=M.bounds,q=typeof M.maxZoom=="number"?M.maxZoom:Number.POSITIVE_INFINITY,G=typeof M.minZoom=="number"?M.minZoom:0,it=typeof M.boundsPadding=="number"?M.boundsPadding:.05,nt=typeof M.zoomDoubleClickSpeed=="number"?M.zoomDoubleClickSpeed:g,H=M.beforeWheel||k,rt=M.beforeMouseDown||k,ft=typeof M.zoomSpeed=="number"?M.zoomSpeed:f,Q=C(M.transformOrigin),yt=M.enableTextSelection?c:o;T(j),M.autocenter&&Le();var ot,X=0,Z=0,st=0,ct=null,vt=new Date,At,Ft=!1,zt=!1,Rt,Yt,_e,ti,ki,Be;"smoothScroll"in M&&!M.smoothScroll?Be=L():Be=n(tt,ir,M.smoothScroll);var yi,$i,zi,ye=!1;vi();var Ai={dispose:rr,moveBy:Gr,moveTo:wt,smoothMoveTo:on,centerOn:ci,zoomTo:zn,zoomAbs:ii,smoothZoom:ji,smoothZoomAbs:xe,showRectangle:_n,pause:Vi,resume:Mi,isPaused:xr,getTransform:Ue,getMinZoom:Ee,setMinZoom:hr,getMaxZoom:xi,setMaxZoom:Xi,getTransformOrigin:Se,setTransformOrigin:er,getZoomSpeed:wr,setZoomSpeed:Pi};r(Ai);var bi=typeof M.initialX=="number"?M.initialX:Y.x,tr=typeof M.initialY=="number"?M.initialY:Y.y,fi=typeof M.initialZoom=="number"?M.initialZoom:Y.scale;return(bi!=Y.x||tr!=Y.y||fi!=Y.scale)&&ii(bi,tr,fi),Ai;function Vi(){qi(),ye=!0}function Mi(){ye&&(vi(),ye=!1)}function xr(){return ye}function _n(mt){var Bt=D.getBoundingClientRect(),Mt=Di(Bt.width,Bt.height),qt=mt.right-mt.left,Ne=mt.bottom-mt.top;if(!Number.isFinite(qt)||!Number.isFinite(Ne))throw new Error("Invalid rectangle");var $t=Mt.x/qt,Ke=Mt.y/Ne,Re=Math.min($t,Ke);Y.x=-(mt.left+qt/2)*Re+Mt.x/2,Y.y=-(mt.top+Ne/2)*Re+Mt.y/2,Y.scale=Re}function Di(mt,Bt){if(z.getScreenCTM){var Mt=z.getScreenCTM(),qt=Mt.a,Ne=Mt.d,$t=Mt.e,Ke=Mt.f;$.x=mt*qt-$t,$.y=Bt*Ne-Ke}else $.x=mt,$.y=Bt;return $}function Le(){var mt,Bt,Mt=0,qt=0,Ne=ei();if(Ne)Mt=Ne.left,qt=Ne.top,mt=Ne.right-Ne.left,Bt=Ne.bottom-Ne.top;else{var $t=D.getBoundingClientRect();mt=$t.width,Bt=$t.height}var Ke=z.getBBox();if(!(Ke.width===0||Ke.height===0)){var Re=Bt/Ke.height,$e=mt/Ke.width,Dr=Math.min($e,Re);Y.x=-(Ke.left+Ke.width/2)*Dr+mt/2+Mt,Y.y=-(Ke.top+Ke.height/2)*Dr+Bt/2+qt,Y.scale=Dr}}function Ue(){return Y}function Ee(){return G}function hr(mt){G=mt}function xi(){return q}function Xi(mt){q=mt}function Se(){return Q}function er(mt){Q=C(mt)}function wr(){return ft}function Pi(mt){if(!Number.isFinite(mt))throw new Error("Zoom speed should be a number");ft=mt}function tt(){return{x:Y.x,y:Y.y}}function wt(mt,Bt){Y.x=mt,Y.y=Bt,le(),Pn("pan"),Pt()}function Dt(mt,Bt){wt(Y.x+mt,Y.y+Bt)}function le(){var mt=ei();if(mt){var Bt=!1,Mt=ue(),qt=mt.left-Mt.right;return qt>0&&(Y.x+=qt,Bt=!0),qt=mt.right-Mt.left,qt<0&&(Y.x+=qt,Bt=!0),qt=mt.top-Mt.bottom,qt>0&&(Y.y+=qt,Bt=!0),qt=mt.bottom-Mt.top,qt<0&&(Y.y+=qt,Bt=!0),Bt}}function ei(){if(j){if(typeof j=="boolean"){var mt=D.getBoundingClientRect(),Bt=mt.width,Mt=mt.height;return{left:Bt*it,top:Mt*it,right:Bt*(1-it),bottom:Mt*(1-it)}}return j}}function ue(){var mt=z.getBBox(),Bt=Ht(mt.left,mt.top);return{left:Bt.x,top:Bt.y,right:mt.width*Y.scale+Bt.x,bottom:mt.height*Y.scale+Bt.y}}function Ht(mt,Bt){return{x:mt*Y.scale+Y.x,y:Bt*Y.scale+Y.y}}function Pt(){U=!0,ot=window.requestAnimationFrame(kn)}function se(mt,Bt,Mt){if(N(mt)||N(Bt)||N(Mt))throw new Error("zoom requires valid numbers");var qt=Y.scale*Mt;if(qt<G){if(Y.scale===G)return;Mt=G/Y.scale}if(qt>q){if(Y.scale===q)return;Mt=q/Y.scale}var Ne=Di(mt,Bt);if(Y.x=Ne.x-Mt*(Ne.x-Y.x),Y.y=Ne.y-Mt*(Ne.y-Y.y),j&&it===1&&G===1)Y.scale*=Mt,le();else{var $t=le();$t||(Y.scale*=Mt)}Pn("zoom"),Pt()}function ii(mt,Bt,Mt){var qt=Mt/Y.scale;se(mt,Bt,qt)}function ci(mt){var Bt=mt.ownerSVGElement;if(!Bt)throw new Error("ui element is required to be within the scene");var Mt=mt.getBoundingClientRect(),qt=Mt.left+Mt.width/2,Ne=Mt.top+Mt.height/2,$t=Bt.getBoundingClientRect(),Ke=$t.width/2-qt,Re=$t.height/2-Ne;Gr(Ke,Re,!0)}function on(mt,Bt){Gr(mt-Y.x,Bt-Y.y,!0)}function Gr(mt,Bt,Mt){if(!Mt)return Dt(mt,Bt);yi&&yi.cancel();var qt={x:0,y:0},Ne={x:mt,y:Bt},$t=0,Ke=0;yi=e(qt,Ne,{step:function(Re){Dt(Re.x-$t,Re.y-Ke),$t=Re.x,Ke=Re.y}})}function ir(mt,Bt){la(),wt(mt,Bt)}function rr(){qi()}function vi(){D.addEventListener("mousedown",dt,{passive:!1}),D.addEventListener("dblclick",kt,{passive:!1}),D.addEventListener("touchstart",Sr,{passive:!1}),D.addEventListener("keydown",wn,{passive:!1}),i.addWheelListener(D,ni,{passive:!1}),Pt()}function qi(){i.removeWheelListener(D,ni),D.removeEventListener("mousedown",dt),D.removeEventListener("keydown",wn),D.removeEventListener("dblclick",kt),D.removeEventListener("touchstart",Sr),ot&&(window.cancelAnimationFrame(ot),ot=0),Be.cancel(),ee(),je(),yt.release(),qo()}function kn(){U&&In()}function In(){U=!1,z.applyTransform(Y),Pn("transform"),ot=0}function wn(mt){var Bt=0,Mt=0,qt=0;if(mt.keyCode===38?Mt=1:mt.keyCode===40?Mt=-1:mt.keyCode===37?Bt=1:mt.keyCode===39?Bt=-1:mt.keyCode===189||mt.keyCode===109?qt=1:(mt.keyCode===187||mt.keyCode===107)&&(qt=-1),!I(mt,Bt,Mt,qt)){if(Bt||Mt){mt.preventDefault(),mt.stopPropagation();var Ne=D.getBoundingClientRect(),$t=Math.min(Ne.width,Ne.height),Ke=.05,Re=$t*Ke*Bt,$e=$t*Ke*Mt;Gr(Re,$e)}if(qt){var Dr=Ps(qt*100),$t=Q?Ui():Sn();zn($t.x,$t.y,Dr)}}}function Sn(){var mt=D.getBoundingClientRect();return{x:mt.width/2,y:mt.height/2}}function Sr(mt){if($n(mt),dr(),mt.touches.length===1)return ur(mt,mt.touches[0]);mt.touches.length===2&&(ki=V(mt.touches[0],mt.touches[1]),zi=!0,Yr())}function $n(mt){M.onTouch&&!M.onTouch(mt)||(mt.stopPropagation(),mt.preventDefault())}function Ea(mt){dr(),!(M.onDoubleClick&&!M.onDoubleClick(mt))&&(mt.preventDefault(),mt.stopPropagation())}function ur(mt){Z=new Date;var Bt=mt.touches[0],Mt=He(Bt);At=Mt;var qt=Di(Mt.x,Mt.y);Rt=qt.x,Yt=qt.y,_e=Rt,ti=Yt,Be.cancel(),Yr()}function Yr(){Ft||(Ft=!0,document.addEventListener("touchmove",ln),document.addEventListener("touchend",Gt),document.addEventListener("touchcancel",Gt))}function ln(mt){if(mt.touches.length===1){mt.stopPropagation();var Bt=mt.touches[0],Mt=He(Bt),qt=Di(Mt.x,Mt.y),Ne=qt.x-Rt,$t=qt.y-Yt;Ne!==0&&$t!==0&&Ja(),Rt=qt.x,Yt=qt.y,Gr(Ne,$t)}else if(mt.touches.length===2){zi=!0;var Ke=mt.touches[0],Re=mt.touches[1],$e=V(Ke,Re),Dr=1+($e/ki-1)*W,qn=He(Ke),qs=He(Re);if(Rt=(qn.x+qs.x)/2,Yt=(qn.y+qs.y)/2,Q){var Mt=Ui();Rt=Mt.x,Yt=Mt.y}zn(Rt,Yt,Dr),ki=$e,mt.stopPropagation(),mt.preventDefault()}}function dr(){st&&(clearTimeout(st),st=0)}function ri(mt){if(M.onClick){dr();var Bt=Rt-_e,Mt=Yt-ti,qt=Math.sqrt(Bt*Bt+Mt*Mt);qt>5||(st=setTimeout(function(){st=0,M.onClick(mt)},x))}}function Gt(mt){if(dr(),mt.touches.length>0){var Bt=He(mt.touches[0]),Mt=Di(Bt.x,Bt.y);Rt=Mt.x,Yt=Mt.y}else{var qt=new Date;if(qt-X<x)if(Q){var Bt=Ui();ji(Bt.x,Bt.y,nt)}else ji(At.x,At.y,nt);else qt-Z<y&&ri(mt);X=qt,qo(),je()}}function V(mt,Bt){var Mt=mt.clientX-Bt.clientX,qt=mt.clientY-Bt.clientY;return Math.sqrt(Mt*Mt+qt*qt)}function kt(mt){Ea(mt);var Bt=He(mt);Q&&(Bt=Ui()),ji(Bt.x,Bt.y,nt)}function dt(mt){if(dr(),!rt(mt)){if(ct=mt,vt=new Date,Ft)return mt.stopPropagation(),!1;var Bt=mt.button===1&&window.event!==null||mt.button===0;if(Bt){Be.cancel();var Mt=He(mt),qt=Di(Mt.x,Mt.y);return _e=Rt=qt.x,ti=Yt=qt.y,document.addEventListener("mousemove",Lt),document.addEventListener("mouseup",It),yt.capture(mt.target||mt.srcElement),!1}}}function Lt(mt){if(!Ft){Ja();var Bt=He(mt),Mt=Di(Bt.x,Bt.y),qt=Mt.x-Rt,Ne=Mt.y-Yt;Rt=Mt.x,Yt=Mt.y,Gr(qt,Ne)}}function It(){var mt=new Date;mt-vt<y&&ri(ct),yt.release(),qo(),ee()}function ee(){document.removeEventListener("mousemove",Lt),document.removeEventListener("mouseup",It),zt=!1}function je(){document.removeEventListener("touchmove",ln),document.removeEventListener("touchend",Gt),document.removeEventListener("touchcancel",Gt),zt=!1,zi=!1,Ft=!1}function ni(mt){if(!H(mt)){Be.cancel();var Bt=mt.deltaY;mt.deltaMode>0&&(Bt*=100);var Mt=Ps(Bt);if(Mt!==1){var qt=Q?Ui():He(mt);zn(qt.x,qt.y,Mt),mt.preventDefault()}}}function He(mt){var Bt,Mt,qt=D.getBoundingClientRect();return Bt=mt.clientX-qt.left,Mt=mt.clientY-qt.top,{x:Bt,y:Mt}}function ji(mt,Bt,Mt){var qt=Y.scale,Ne={scale:qt},$t={scale:Mt*qt};Be.cancel(),la(),$i=e(Ne,$t,{step:function(Ke){ii(mt,Bt,Ke.scale)},done:Tr})}function xe(mt,Bt,Mt){var qt=Y.scale,Ne={scale:qt},$t={scale:Mt};Be.cancel(),la(),$i=e(Ne,$t,{step:function(Ke){ii(mt,Bt,Ke.scale)},done:Tr})}function Ui(){var mt=D.getBoundingClientRect();return{x:mt.width*Q.x,y:mt.height*Q.y}}function zn(mt,Bt,Mt){return Be.cancel(),la(),se(mt,Bt,Mt)}function la(){$i&&($i.cancel(),$i=null)}function Ps(mt){var Bt=Math.sign(mt),Mt=Math.min(.25,Math.abs(ft*mt/128));return 1-Bt*Mt}function Ja(){zt||(Pn("panstart"),zt=!0,Be.start())}function qo(){zt&&(zi||Be.stop(),Pn("panend"))}function Tr(){Pn("zoomend")}function Pn(mt){Ai.fire(mt,Ai)}}function C(A){if(A){if(typeof A=="object")return(!E(A.x)||!E(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(`
|
|
418
|
+
`))}function k(){}function T(A){var M=typeof A;if(!(M==="undefined"||M==="boolean")){var z=E(A.left)&&E(A.top)&&E(A.bottom)&&E(A.right);if(!z)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function E(A){return Number.isFinite(A)}function N(A){return Number.isNaN?Number.isNaN(A):A!==A}function L(){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,z=0;z<A.length;++z){var D=A[z];if(D.src&&D.src.match(/\bpanzoom(\.min)?\.js/)){M=D;break}}if(!M)return;var $=M.getAttribute("query");if(!$)return;var U=M.getAttribute("name")||"pz",Y=Date.now();I();function I(){var q=document.querySelector($);if(!q){var G=Date.now(),it=G-Y;if(it<2e3){setTimeout(I,100);return}console.error("Cannot find the panzoom element",U);return}var nt=W(M);console.log(nt),window[U]=v(q,nt)}function W(q){for(var G=q.attributes,it={},nt=0;nt<G.length;++nt){var H=G[nt],rt=j(H);rt&&(it[rt.name]=rt.value)}return it}function j(q){if(q.name){var G=q.name[0]==="p"&&q.name[1]==="z"&&q.name[2]==="-";if(G){var it=q.name.substr(3),nt=JSON.parse(q.value);return{name:it,value:nt}}}}}return O(),X0}var IJ=FJ();const uD=Dd(IJ);function Z0(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 Uv({value:i,options:e,placeholder:r="Select…",searchPlaceholder:n="Search…",onChange:a,allowCustom:o=!1,clearLabel:c="None"}){const[h,u]=K.useState(!1),[d,f]=K.useState(""),g=K.useRef(null),x=K.useMemo(()=>{const _=Z0(d.trim());return _?e.filter(k=>Z0(k.label).includes(_)||Z0(k.value).includes(_)):e},[e,d]),y=e.find(_=>_.value===i),v=o&&d.trim()&&!e.some(_=>_.value===d.trim());K.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"})]})]})]})}we.setOptions({gfm:!0,breaks:!0});const $J={"[":"]","(":")","{":"}"};function zJ(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=$J[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 PJ(i){return i.split(`
|
|
419
|
+
`).map(zJ).join(`
|
|
420
|
+
`)}const qJ=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function UJ(i,e,r){const n=i.split(`
|
|
421
|
+
`);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=qJ.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(`
|
|
422
|
+
`),nodeId:C?C[1]:null}}a++}}return null}const HJ=/-->|---|==>|==|-\.|~~~|\.->/;function WJ(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(`
|
|
423
|
+
`);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)||HJ.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(`
|
|
424
|
+
`)}const GJ=[1,2,3,4,5,6,7,8,9,10],YJ=[1,2,3,4,5],KJ=[25,50,75,100],VJ=[.5,1,1.5,2,3,4,5,6,8];function XJ(i){return i==null?"":i<5?"rice-score--low":i<=15?"rice-score--mid":"rice-score--high"}function ZJ({task:i,expanded:e,onToggle:r,onUpdate:n}){const{t:a}=Ni(),o=i.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=XJ(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:"—"}),GJ.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:"—"}),YJ.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:"—"}),KJ.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:"—"}),VJ.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 Fr({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 QJ({text:i}){const[e,r]=K.useState(!1),[n,a]=K.useState(!1),o=K.useRef(null);return K.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 JJ({task:i,onClose:e,initialRiceExpanded:r}){const{t:n}=Ni(),{resolved:a}=jd(),o=eD(),c=KQ(),h=iD(),{data:u}=HQ(),{data:d}=YQ(),{data:f}=nD(),[g,x]=K.useState(""),[y,v]=K.useState(""),[C,_]=K.useState(null),[k,T]=K.useState(r??!!i.rice),[E,N]=K.useState(!1),L=X=>{_(X.message),setTimeout(()=>_(null),5e3)},O=X=>{o.mutate({slug:i.slug,updates:{status:X}},{onError:L})},A=X=>{o.mutate({slug:i.slug,updates:{priority:X}},{onError:L})},M=X=>{o.mutate({slug:i.slug,updates:{urgency:X}},{onError:L})},z=X=>{o.mutate({slug:i.slug,updates:{version:X||null}},{onError:L})},D=X=>{o.mutate({slug:i.slug,updates:{rice:X}},{onError:L})},$=(X,Z)=>{const st=X==="related_feature"?Z.trim()||null:Z.trim();X!=="related_feature"&&!st||o.mutate({slug:i.slug,updates:{[X]:st}},{onError:L})},U=X=>{const Z=X.find(st=>st.startsWith("person:"));return Z?Z.slice(7):null},Y=(X,Z)=>{const st=X.filter(ct=>!ct.startsWith("person:"));return Z?[...st,`person:${Z}`]:st},I=i.assignee??U(i.tags),W=X=>{const Z=X||null;o.mutate({slug:i.slug,updates:{assignee:Z,tags:Y(i.tags,Z)}},{onError:L})},j=()=>{window.confirm(`Delete task "${i.name}"? This propagates to the remote backend on sync.`)&&h.mutate(i.slug,{onError:L,onSuccess:()=>e==null?void 0:e()})},q=X=>{o.mutate({slug:i.slug,updates:{due_date:X||null}},{onError:L})},G=X=>{const Z=U(X);o.mutate({slug:i.slug,updates:{tags:X,...Z!==I?{assignee:Z}:{}}},{onError:L})},it=()=>{const X=y.trim();X&&(i.tags.some(Z=>Z.toLowerCase()===X.toLowerCase())||G([...i.tags,X]),v(""))},nt=X=>{X.preventDefault(),g.trim()&&c.mutate({slug:i.slug,content:g.trim()},{onSuccess:()=>x(""),onError:L})},H=K.useMemo(()=>i.body?we.parse(i.body):"",[i.body]),rt=K.useRef(null),ft=K.useRef(i.body??""),Q=K.useRef(i.body??"");K.useEffect(()=>{ft.current=i.body??"",Q.current=i.body??""},[i.body]);const yt=K.useRef(o),ot=K.useRef(L);return K.useEffect(()=>{yt.current=o,ot.current=L}),K.useEffect(()=>{const X=rt.current;if(!X||!H)return;X.querySelectorAll('input[type="checkbox"]').forEach((ct,vt)=>{ct.removeAttribute("disabled"),ct.dataset.criterionIndex=String(vt)});const st=ct=>{const vt=ct.target;if(!(vt instanceof HTMLInputElement)||vt.type!=="checkbox")return;const At=vt.dataset.criterionIndex;if(At===void 0)return;const Ft=Number(At),zt=vt.checked,Rt=Q.current,Yt=UJ(Rt,Ft,zt);if(!Yt)return;let _e=Yt.body;Yt.nodeId&&(_e=WJ(_e,Yt.nodeId,zt)),_e!==Rt&&(Q.current=_e,yt.current.mutate({slug:i.slug,updates:{body:_e}},{onError:ti=>{vt.checked=!zt,Q.current=ft.current,ot.current(ti)}}))};return X.addEventListener("change",st),()=>X.removeEventListener("change",st)},[H,i.slug]),K.useEffect(()=>{const X=rt.current;if(!X||!H)return;V5(a);let Z=!1;const st=[];let ct=!1;const vt=async()=>{if(Z||ct)return;X.querySelectorAll(".mermaid-rendered").forEach(zt=>{const Rt=zt.dataset.mermaidSource;if(!Rt)return;const Yt=document.createElement("pre"),_e=document.createElement("code");_e.className="language-mermaid",_e.textContent=Rt,Yt.appendChild(_e),zt.replaceWith(Yt)});const Ft=X.querySelectorAll("pre > code.language-mermaid");if(Ft.length!==0){for(ct=!0;st.length;){const zt=st.pop();try{zt==null||zt()}catch{}}for(let zt=0;zt<Ft.length&&!Z;zt++){const Rt=Ft[zt],Yt=Rt.parentElement;if(!Yt)continue;const _e=PJ(Rt.textContent??""),ti=`mmd-${i.slug}-${zt}-${Date.now().toString(36)}`,ki=document.createElement("div");ki.className="mermaid-rendered",ki.dataset.mermaidSource=_e;const Be=document.createElement("div");Be.className="mermaid-stage",ki.appendChild(Be);const yi=document.createElement("div");yi.className="mermaid-controls",yi.innerHTML=`
|
|
425
|
+
<button type="button" data-act="out" title="Zoom out">−</button>
|
|
426
|
+
<button type="button" data-act="reset" title="Fit">⤢</button>
|
|
427
|
+
<button type="button" data-act="in" title="Zoom in">+</button>
|
|
428
|
+
`,ki.appendChild(yi),Yt.replaceWith(ki);try{const{svg:$i,bindFunctions:zi}=await OC.render(ti,_e);if(Z)break;Be.innerHTML=$i,zi==null||zi(Be),ki.dataset.mermaidRendered="1";const ye=Be.querySelector("svg");if(!ye)continue;X5(ye);const Ai=ye.viewBox.baseVal,bi=Ai&&Ai.width>0?Ai.width:ye.getBoundingClientRect().width,tr=Ai&&Ai.height>0?Ai.height:ye.getBoundingClientRect().height;ye.removeAttribute("width"),ye.removeAttribute("height"),ye.style.width=`${bi}px`,ye.style.height=`${tr}px`,ye.style.maxWidth="none",ye.style.transformOrigin="0 0";const fi=uD(ye,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),Vi=()=>{try{const Le=Be.getBoundingClientRect();if(Le.width===0||Le.height===0)return;const Ue=32,Ee=Math.min((Le.width-Ue)/bi,(Le.height-Ue)/tr,1);fi.zoomAbs(0,0,1),fi.moveTo(0,0),fi.zoomAbs(0,0,Ee);const hr=(Le.width-bi*Ee)/2,xi=(Le.height-tr*Ee)/2;fi.moveTo(hr,xi)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(Vi));const Mi=new ResizeObserver(()=>Vi());Mi.observe(Be);let xr=null;const _n=Le=>{try{const Ue=Le.getBoundingClientRect(),Ee=Be.getBoundingClientRect();if(Ue.width===0)return;const hr=Ue.left+Ue.width/2-Ee.left,xi=Ue.top+Ue.height/2-Ee.top,Xi=Math.min(Ee.width*.6/Ue.width,Ee.height*.6/Ue.height,6),Se=fi.getTransform(),er=Xi/Se.scale;if(Math.abs(er-1)<.01)return;fi.smoothZoom(hr,xi,er)}catch{}},Di=Le=>{const Ue=Le.target,Ee=(Ue==null?void 0:Ue.closest("g.node, g.cluster"))??null;if(!Ee){xr&&(xr=null,Vi());return}xr===Ee?(xr=null,Vi()):(xr=Ee,_n(Ee))};Be.addEventListener("click",Di),ye.querySelectorAll("g.node, g.cluster").forEach(Le=>{Le.style.cursor="zoom-in"}),yi.addEventListener("click",Le=>{Le.stopPropagation();const Ue=Le.target.closest("button");if(!Ue)return;const Ee=Be.getBoundingClientRect(),hr=Ee.width/2,xi=Ee.height/2,Xi=Ue.getAttribute("data-act");Xi==="in"?fi.smoothZoom(hr,xi,1.4):Xi==="out"?fi.smoothZoom(hr,xi,1/1.4):Xi==="reset"&&(xr=null,Vi())}),st.push(()=>{Mi.disconnect(),Be.removeEventListener("click",Di),fi.dispose()})}catch($i){if(Z)break;const zi=$i instanceof Error?$i.message:String($i);Be.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${zi.replace(/[<>&]/g,ye=>({"<":"<",">":">","&":"&"})[ye]??ye)}</pre>`}}ct=!1}};vt();const At=new MutationObserver(()=>{if(Z||ct)return;const Ft=X.querySelector("pre > code.language-mermaid"),zt=X.querySelector(".mermaid-rendered .mermaid-stage svg");Ft&&(!zt||Ft)&&Ft&&vt()});return At.observe(X,{childList:!0,subtree:!0}),()=>{for(Z=!0,At.disconnect();st.length;){const Ft=st.pop();try{Ft==null||Ft()}catch{}}}},[H,i.slug,a]),m.jsx("div",{className:`detail-overlay ${E?"detail-overlay--fullscreen":""}`,onClick:e,children:m.jsxs("div",{className:`detail-panel ${E?"detail-panel--fullscreen":""}`,onClick:X=>X.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:()=>N(X=>!X),title:E?"Exit full-page view":"Open in full page","aria-label":E?"Exit full-page view":"Open in full page",children:E?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(Fr,{label:"Status",children:m.jsxs("select",{className:"field-select prop-select",value:i.status,onChange:X=>O(X.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(Fr,{label:n("tasks.priority"),children:m.jsxs("select",{className:"field-select prop-select",value:i.priority,onChange:X=>A(X.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(Fr,{label:"Urgency",children:m.jsxs("select",{className:"field-select prop-select",value:i.urgency,onChange:X=>M(X.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(Fr,{label:n("rice.title"),children:m.jsx(ZJ,{task:i,expanded:k,onToggle:()=>T(X=>!X),onUpdate:D})}),m.jsx(Fr,{label:"Name",children:m.jsx("input",{className:"settings-like-input prop-text-input",defaultValue:i.name,onBlur:X=>{X.target.value.trim()&&X.target.value.trim()!==i.name&&$("name",X.target.value)},onKeyDown:X=>{X.key==="Enter"&&X.target.blur()}},`name-${i.slug}-${i.name}`)}),m.jsx(Fr,{label:"Summary",children:m.jsx("input",{className:"prop-text-input",defaultValue:i.description,placeholder:"One-line summary",onBlur:X=>{X.target.value.trim()&&X.target.value.trim()!==i.description&&$("description",X.target.value)},onKeyDown:X=>{X.key==="Enter"&&X.target.blur()}},`desc-${i.slug}-${i.description}`)}),m.jsx(Fr,{label:"Assignee",children:m.jsx(Uv,{value:I,options:[...(u??[]).map(X=>({value:X.slug,label:X.name,hint:X.slug})),...I&&!(u??[]).some(X=>X.slug===I)?[{value:I,label:I}]:[]],placeholder:"Unassigned",searchPlaceholder:"Search people…",clearLabel:"Unassigned",allowCustom:!0,onChange:X=>W(X??"")})}),m.jsx(Fr,{label:"Feature",children:m.jsx(Uv,{value:i.related_feature??null,options:(d??[]).map(X=>({value:X.slug,label:X.name??X.slug,hint:X.name?X.slug:void 0})),placeholder:"No feature",searchPlaceholder:"Search features…",clearLabel:"No feature",allowCustom:!0,onChange:X=>$("related_feature",X??"")})}),m.jsx(Fr,{label:"Due",children:i.tags.some(X=>X.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:X=>q(X.target.value)})}),m.jsx(Fr,{label:"Tags",children:m.jsxs("div",{className:"prop-tags prop-tags--editable",children:[i.tags.map(X=>m.jsxs("span",{className:"task-tag","data-hue":Ka(X),children:[X,m.jsx("button",{type:"button",className:"task-tag-remove","aria-label":`Remove tag ${X}`,onClick:()=>G(i.tags.filter(Z=>Z!==X)),children:"×"})]},X)),m.jsx("input",{className:"task-tag-input",value:y,placeholder:"+ tag","aria-label":"Add tag",onChange:X=>v(X.target.value),onKeyDown:X=>{X.key==="Enter"&&(X.preventDefault(),it())},onBlur:it})]})}),m.jsx(Fr,{label:"Version",children:m.jsxs("select",{className:"field-select prop-select",value:i.version??"",onChange:X=>z(X.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(f??[]).map(X=>m.jsx("option",{value:X.version,children:X.version},X.version)),i.version&&!(f??[]).some(X=>X.version===i.version)&&m.jsx("option",{value:i.version,children:i.version})]})}),i.description&&m.jsx(Fr,{label:"Description",children:m.jsx(QJ,{text:i.description})}),m.jsx(Fr,{label:"Created",children:m.jsx("span",{className:"prop-date",children:i.created_at})}),m.jsx(Fr,{label:"Updated",children:m.jsx("span",{className:"prop-date",children:i.updated_at})}),i.parent_task&&m.jsx(Fr,{label:"Parent",children:m.jsx("span",{className:"prop-text",children:i.parent_task})}),m.jsx(Fr,{label:"ID",children:m.jsx("code",{className:"prop-id",children:i.id})})]}),m.jsx("hr",{className:"detail-divider"}),H?m.jsx("div",{ref:rt,className:"markdown-body",dangerouslySetInnerHTML:{__html:H}}):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:nt,className:"changelog-add",children:[m.jsx("input",{className:"field-input",value:g,onChange:X=>x(X.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:j,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 ttt=["critical","high"];function qg(i){return ttt.includes(i)}const Hv=[{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 hN(i){const e=qg(i.priority),r=qg(i.urgency);return e&&r?"do":e&&!r?"schedule":!e&&r?"delegate":"eliminate"}function uN(i,e){return i&&!qg(e)?"high":!i&&qg(e)?"medium":null}function dN(i,e){const r=Hv.find(c=>c.key===e);if(!r)return{};const n={},a=uN(r.priorityHigh,i.priority),o=uN(r.urgencyHigh,i.urgency);return a&&(n.priority=a),o&&(n.urgency=o),n}function Q0(i){return!i.priority&&!i.urgency}function ett(i){const e=[];return i.priority&&e.push(`priority → ${i.priority}`),i.urgency&&e.push(`urgency → ${i.urgency}`),e.join(" · ")}function itt({tasks:i,onTaskClick:e,onTaskMove:r}){const n=i.filter(T=>T.status!=="completed"),[a,o]=K.useState(null),[c,h]=K.useState(null),[u,d]=K.useState(null),f=!!r,g=c?n.find(T=>T.slug===c)??null:null,x=g?hN(g):null,y=(T,E)=>{T.dataTransfer.setData("text/plain",E.slug),T.dataTransfer.effectAllowed="move",h(E.slug)},v=()=>{h(null),o(null)},C=(T,E)=>{f&&(T.preventDefault(),T.dataTransfer.dropEffect="move",a!==E&&o(E))},_=(T,E)=>{if(!r)return;T.preventDefault();const N=T.dataTransfer.getData("text/plain");if(v(),!N)return;const L=n.find(M=>M.slug===N);if(!L)return;const O=dN(L,E);if(Q0(O))return;r(N,O);const A=Hv.find(M=>M.key===E);d({slug:N,name:L.name,toLabel:(A==null?void 0:A.label)??E,prev:{priority:L.priority,urgency:L.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:Hv.map(T=>{const E=n.filter(z=>hN(z)===T.key),N=a===T.key,L=x===T.key,O=N&&g?dN(g,T.key):null,A=O?Q0(O)?"Already here":ett(O):null,M=["eisenhower-quadrant",`eisenhower-quadrant--${T.key}`,N?"eisenhower-quadrant--dragover":"",L?"eisenhower-quadrant--source":"",N&&O&&Q0(O)?"eisenhower-quadrant--noop":""].filter(Boolean).join(" ");return m.jsxs("div",{className:M,onDragOver:z=>C(z,T.key),onDragLeave:()=>o(z=>z===T.key?null:z),onDrop:z=>_(z,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:E.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:[E.map(z=>m.jsx(Xd,{task:z,onClick:()=>e(z),onDragStart:D=>y(D,z),dragging:c===z.slug},z.slug)),f&&E.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 be={top:32,right:24,bottom:56,left:64},fN=.5,pN=8,J0=1,gN=5,rtt=2,ntt=3,att={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function tx(i){return Math.log2(Math.max(i,.01)+1)}function ex(i,e,r){return Math.max(e,Math.min(r,i))}function mN(i){const e=i.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function stt({tasks:i,onTaskClick:e}){const r=K.useRef(null),[n,a]=K.useState({width:800,height:480}),[o,c]=K.useState(!1),[h,u]=K.useState(null);K.useEffect(()=>{const D=r.current;if(!D)return;const $=new ResizeObserver(U=>{for(const Y of U){const I=Y.contentRect.width,W=Math.max(360,Math.min(620,I*.6));a({width:I,height:W})}});return $.observe(D),()=>$.disconnect()},[]);const d=K.useMemo(()=>i.filter(D=>D.status!=="completed"),[i]),f=K.useMemo(()=>d.filter(mN),[d]),g=K.useMemo(()=>d.filter(D=>!mN(D)),[d]),x=K.useMemo(()=>[...f].sort((D,$)=>($.rice.score??0)-(D.rice.score??0)),[f]),y=Math.max(120,n.width-be.left-be.right),v=Math.max(120,n.height-be.top-be.bottom),C=tx(fN),k=tx(pN)-C,T=D=>{const $=(tx(ex(D,fN,pN))-C)/k;return be.left+(1-$)*y},E=D=>{const $=(ex(D,J0,gN)-J0)/(gN-J0);return be.top+(1-$)*v},N=D=>6+(ex(D,1,10)-1)/9*18,L=D=>Math.max(.4,D/100),O=T(rtt),A=E(ntt),M=[.5,1,2,4,8],z=[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:be.left,y:be.top,width:O-be.left,height:A-be.top,className:"rice-quad rice-quad--big-bets"}),m.jsx("rect",{x:O,y:be.top,width:be.left+y-O,height:A-be.top,className:"rice-quad rice-quad--quick-wins"}),m.jsx("rect",{x:be.left,y:A,width:O-be.left,height:be.top+v-A,className:"rice-quad rice-quad--time-sinks"}),m.jsx("rect",{x:O,y:A,width:be.left+y-O,height:be.top+v-A,className:"rice-quad rice-quad--fill-ins"}),m.jsx("text",{x:be.left+8,y:be.top+18,className:"rice-quad-label",children:"Big Bets"}),m.jsx("text",{x:be.left+y-8,y:be.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),m.jsx("text",{x:be.left+8,y:be.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),m.jsx("text",{x:be.left+y-8,y:be.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),m.jsx("line",{x1:O,y1:be.top,x2:O,y2:be.top+v,className:"rice-quad-divider"}),m.jsx("line",{x1:be.left,y1:A,x2:be.left+y,y2:A,className:"rice-quad-divider"}),m.jsx("line",{x1:be.left,y1:be.top+v,x2:be.left+y,y2:be.top+v,className:"rice-axis"}),m.jsx("line",{x1:be.left,y1:be.top,x2:be.left,y2:be.top+v,className:"rice-axis"}),M.map(D=>m.jsxs("g",{children:[m.jsx("line",{x1:T(D),y1:be.top+v,x2:T(D),y2:be.top+v+4,className:"rice-axis"}),m.jsxs("text",{x:T(D),y:be.top+v+18,textAnchor:"middle",className:"rice-tick",children:[D,"w"]})]},`xt-${D}`)),m.jsx("text",{x:be.left+y/2,y:be.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),z.map(D=>m.jsxs("g",{children:[m.jsx("line",{x1:be.left-4,y1:E(D),x2:be.left,y2:E(D),className:"rice-axis"}),m.jsx("text",{x:be.left-8,y:E(D)+4,textAnchor:"end",className:"rice-tick",children:D})]},`yt-${D}`)),m.jsx("text",{transform:`translate(${be.left-44}, ${be.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),f.map(D=>{const $=D.rice,U=T($.effort),Y=E($.impact),I=N($.reach),W=L($.confidence),j=att[D.status],q=h===D.slug;return m.jsx("circle",{cx:U,cy:Y,r:I,fill:`var(${j})`,fillOpacity:W,stroke:"var(--color-bg)",strokeWidth:q?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${D.name}: reach ${$.reach}, impact ${$.impact}, confidence ${$.confidence}, effort ${$.effort} weeks, score ${$.score}`,onClick:()=>e(D),onKeyDown:G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),e(D))},onMouseEnter:()=>u(D.slug),onMouseLeave:()=>u(null),onFocus:()=>u(D.slug),onBlur:()=>u(null),children:m.jsx("title",{children:`${D.name}
|
|
429
|
+
R ${$.reach} · I ${$.impact} · C ${$.confidence}% · E ${$.effort}w
|
|
430
|
+
Score: ${$.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(Xd,{task:D,onClick:()=>e(D),onDragStart:()=>{}},D.slug))})]})]})}function ott({onClose:i,tasks:e}){const{data:r,isLoading:n}=rD(),a=VQ(),o=XQ(),[c,h]=K.useState(""),[u,d]=K.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 yN={critical:0,high:1,medium:2,low:3},bN={critical:0,high:1,medium:2,low:3},dD=[{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"}],fD=[{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"}],pD=[{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 ltt(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(yN[r.priority]??9)-(yN[n.priority]??9);case"urgency":return(bN[r.urgency]??9)-(bN[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 ctt(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 ltt(r,e.sortField)}function xN(i){const e=i,r={...Pg};for(const a of Object.keys(Pg))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 vN(i,e){if(e==="none")return[];switch(e){case"status":return dD.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 fD.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 pD.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 htt(i,e){return i?`dreamcontext:${i}:${e}`:`dreamcontext:${e}`}function utt(i,e){try{const r=localStorage.getItem(i);return r===null?e:JSON.parse(r)}catch{return e}}function dtt(i,e){try{localStorage.setItem(i,JSON.stringify(e))}catch{}}function ftt(){const{t:i}=Ni(),{projectId:e}=lM(),{data:r,isLoading:n,isError:a,error:o}=qQ(),{data:c}=rD(),h=eD(),{data:u}=WQ(),d=GQ(),f=iD(),[g,x]=K.useState(null),y=(ot,X)=>{X.preventDefault(),x({x:X.clientX,y:X.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&&z(null)}})},[C,_]=K.useState(null),k=()=>{_(null),d.mutate(void 0,{onSuccess:({report:ot})=>{const X=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?`↕ ${X} synced · ${ot.conflicts.length} conflict(s) preserved`:X>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),E=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,[N,L]=K.useState(!1),[O,A]=K.useState(!1),[M,z]=K.useState(null),D=K.useMemo(()=>htt(e,"kanban-filters"),[e]),[$,U]=K.useState(()=>{const ot=utt(D,Pg);return xN(ot)}),Y=K.useCallback(ot=>{U(X=>{const Z=typeof ot=="function"?ot(X):ot;return dtt(D,Z),Z})},[D]),I=tJ(e),W=K.useCallback((ot,X)=>{Y(Z=>({...Z,[ot]:X}))},[Y]),j=K.useCallback(()=>{Y(ot=>({...Pg,sortField:ot.sortField,groupBy:ot.groupBy,subGroupBy:ot.subGroupBy,viewMode:ot.viewMode}))},[Y]),q=K.useCallback(ot=>{eJ(e,ot,{...$})},[$,e]),G=K.useCallback(ot=>{Y(xN(ot.filters))},[Y]),it=K.useCallback(ot=>{iJ(e,ot)},[e]),nt=K.useMemo(()=>ctt(r??[],$),[r,$]),H=K.useMemo(()=>!M||!r?null:r.find(ot=>ot.slug===M)??null,[M,r]),rt=K.useMemo(()=>{const ot=new Set;for(const X of r??[])for(const Z of X.tags)ot.add(Z);return Array.from(ot).sort()},[r]),ft=K.useMemo(()=>{const ot=new Set;for(const X of r??[])X.version&&ot.add(X.version);for(const X of c??[])ot.add(X.version);return Array.from(ot).sort()},[r,c]),Q=(ot,X,Z)=>{switch(Z){case"status":h.mutate({slug:ot,updates:{status:X}});break;case"priority":h.mutate({slug:ot,updates:{priority:X}});break;case"urgency":h.mutate({slug:ot,updates:{urgency:X}});break;case"tags":{const st=(r??[]).find(ct=>ct.slug===ot);st&&!st.tags.includes(X)&&X!=="(untagged)"&&h.mutate({slug:ot,updates:{tags:[...st.tags,X]}})}break;case"version":h.mutate({slug:ot,updates:{version:X==="(no version)"?null:X}});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 yt=()=>{const{groupBy:ot,subGroupBy:X}=$,Z=(st,ct,vt,At,Ft)=>m.jsx(VE,{title:typeof ct=="string"&&ct.includes(".")?i(ct):ct,status:st,tasks:At,count:At.length,colorVar:vt,onTaskClick:zt=>z(zt.slug),onTaskContextMenu:y,onDrop:(zt,Rt)=>Q(zt,Rt,ot),staggerIndex:Ft+1,subGroups:X!=="none"?vN(At,X):void 0},st);switch(ot){case"status":return dD.map((st,ct)=>Z(st.key,st.labelKey,st.colorVar,nt.filter(vt=>vt.status===st.key),ct));case"priority":return fD.map((st,ct)=>Z(st.key,st.label,st.colorVar,nt.filter(vt=>vt.priority===st.key),ct));case"urgency":return pD.map((st,ct)=>Z(st.key,st.label,st.colorVar,nt.filter(vt=>vt.urgency===st.key),ct));case"tags":{const st=new Map;for(const ct of nt)if(ct.tags.length===0){const vt=st.get("(untagged)")??[];vt.push(ct),st.set("(untagged)",vt)}else for(const vt of ct.tags){const At=st.get(vt)??[];At.push(ct),st.set(vt,At)}return Array.from(st.entries()).map(([ct,vt],At)=>Z(ct,ct,"--color-brand-vivid",vt,At))}case"version":{const st=(c??[]).filter(At=>At.status==="planning").map(At=>At.version),ct=(c??[]).filter(At=>At.status==="released").map(At=>At.version),vt=["(no version)",...st,...ct];for(const At of nt)At.version&&!vt.includes(At.version)&&vt.push(At.version);return vt.map((At,Ft)=>{const zt=nt.filter(Rt=>(Rt.version??"(no version)")===At);return zt.length===0&&At!=="(no version)"?null:Z(At,At,"--color-brand-mid",zt,Ft)}).filter(Boolean)}case"none":return[m.jsx(VE,{title:"All Tasks",status:"all",tasks:nt,count:nt.length,colorVar:"--color-brand-vivid",onTaskClick:st=>z(st.slug),onTaskContextMenu:y,onDrop:()=>{},subGroups:X!=="none"?vN(nt,X):void 0},"all")]}};return m.jsxs("div",{className:"kanban-board",children:[m.jsx(TJ,{filters:$,onFilterChange:W,onClearFilters:j,onCreateClick:()=>L(!0),presets:I,onSavePreset:q,onLoadPreset:G,onDeletePreset:it,allTags:rt,allVersions:ft,onVersionManagerClick:()=>A(!0),syncSlot:E}),$.viewMode==="eisenhower"?m.jsx(itt,{tasks:nt,onTaskClick:ot=>z(ot.slug),onTaskMove:(ot,X)=>h.mutate({slug:ot,updates:X})}):$.viewMode==="scatter"?m.jsx(stt,{tasks:nt,onTaskClick:ot=>z(ot.slug)}):$.viewMode==="list"?m.jsx("div",{className:"task-list",children:nt.map(ot=>m.jsx(Xd,{task:ot,onClick:()=>z(ot.slug),onContextMenu:X=>y(ot,X),onDragStart:()=>{}},ot.slug))}):m.jsx("div",{className:"kanban-columns",children:yt()}),N&&m.jsx(EJ,{onClose:()=>L(!1)}),O&&m.jsx(ott,{onClose:()=>A(!1),tasks:r??[]}),H&&m.jsx(JJ,{task:H,onClose:()=>z(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:()=>{z(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 ptt(){return m.jsx("div",{children:m.jsx(ftt,{})})}function gtt(){return di({queryKey:["changelog"],queryFn:()=>me.get("/changelog")})}const mtt=25;function CN({entry:i}){const{t:e}=Ni();return m.jsxs("div",{className:"changelog-item",children:[m.jsxs("div",{className:"changelog-meta",children:[m.jsx("span",{className:"task-tag","data-hue":Ka(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 ytt(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 btt(){const{t:i}=Ni(),{data:e,isLoading:r,isError:n,error:a}=uM(),{data:o}=gtt();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=cM(e.debt),h=hM(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,mtt),y=ytt(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(CN,{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(CN,{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 xtt=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 ix(i){const e=i.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return xtt.has(e)}function vtt(i){const{entities:e,relations:r}=Ctt(i),n=_tt(i),a=new Set(e.map(f=>f.name.toLowerCase())),o=[...e,...n.filter(f=>!a.has(f.name.toLowerCase()))],c=ktt(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 Ctt(i){const e=[],r=[],n=i.split(`
|
|
431
|
+
`);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 z=g.match(/\/\w+\/\{[^}]+\}/);z&&(c=z[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&&ix(U[2])&&u){const Y=U[1],I=U[2].toLowerCase(),j=(U[3]||"").match(/--\s*(.+)$/),q=j?j[1].trim():void 0;o.push({name:`${u}.${Y}`,type:I,description:q,isNested:!0,parentField:u})}continue}const $=D.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if($&&ix($[3])){const U=$[1].replace(/\[\]$/,""),Y=$[2],I=$[3].toLowerCase(),j=($[4]||"").match(/--\s*(.+)$/),q=j?j[1].trim():void 0;u=U,o.push({name:`${U}.${Y}`,type:I,description:q,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],E=_[3]||"";if(!ix(T))continue;const N=T.toLowerCase(),L=/PRIMARY\s+KEY/i.test(E),O=E.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;(N==="jsonb"||N==="json")&&(u=k),o.push({name:k,type:N,isPrimary:L,description:M})}return d(),{entities:e,relations:r}}function _tt(i){var o,c,h,u,d;const e=[];let r=null,n=!1;const a=i.split(`
|
|
432
|
+
`);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}=_N(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}=_N(_[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 _N(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 ktt(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 Wv(i){return i.toLowerCase().replace(/\s+/g,"-")}function kN(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 wtt(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 Stt(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 Ttt({entity:i,relations:e}){const[r,n]=K.useState(new Set),a=i.storageType==="json"?"{ }":i.storageType==="table"?"SQL":"☰",o=i.fields.filter(u=>!u.isNested),c=K.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":Wv(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=wtt(u,e,i.name),f=kN(u.type),g=c.get(u.name),x=r.has(u.name);return m.jsxs(K.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=kN(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 Ett({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 gD({content:i}){const e=K.useRef(null),[r,n]=K.useState([]),[a,o]=K.useState({width:0,height:0}),c=K.useMemo(()=>vtt(i),[i]),h=K.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="${Wv(g.from)}"]`),y=u.querySelector(`[data-entity="${Wv(g.to)}"]`);if(!x||!y)continue;const v=x.getBoundingClientRect(),C=y.getBoundingClientRect(),{d:_,labelX:k,labelY:T}=Stt(v,C,d,g.from===g.to);f.push({d:_,labelX:k,labelY:T,label:g.cardinality})}n(f)},[c]);return K.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?m.jsx("div",{className:"sql-preview",children:m.jsx("div",{className:"sql-preview-empty",children:"No schema entities found in this file."})}):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(Ttt,{entity:u,relations:c.relations},u.name))}),m.jsx(Ett,{relations:c.relations,entities:c.entities})]})}const Ntt={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function Gv({type:i}){return m.jsx("span",{className:`json-type-badge ${Ntt[i]??""}`,children:i})}function Yv(){return m.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function Att({data:i}){const[e,r]=K.useState("all"),[n,a]=K.useState(new Set),o=K.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=K.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(Gv,{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(Gv,{type:f.type}),f.breaking&&m.jsx(Yv,{}),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 Mtt({data:i}){const[e,r]=K.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(Yv,{}),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(Gv,{type:g.type}),g.breaking&&m.jsx(Yv,{}),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 Btt({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(Att,{data:i}):n&&((c=i[0])!=null&&c.version)?m.jsx(Mtt,{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 Ltt(i){return i.endsWith(".sql")||i.endsWith(".json")||i.endsWith(".md")}function Ott({onNavigateTaxonomy:i}={}){const{t:e}=Ni(),r=kr(),[n,a]=K.useState(null),[o,c]=K.useState(null),[h,u]=K.useState(!1),[d,f]=K.useState("preview"),{data:g,isLoading:x,isError:y,error:v}=di({queryKey:["core"],queryFn:()=>me.get("/core")}),{data:C}=di({queryKey:["core",n],queryFn:()=>me.get(`/core/${n}`),enabled:!!n}),_=Hr({mutationFn:({filename:L,content:O})=>me.put(`/core/${L}`,{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 E=(g==null?void 0:g.files)??[],N=()=>{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(gD,{content:C.content});if(n.endsWith(".json")&&C.data)return m.jsx(Btt,{data:C.data,filename:n});if(n.endsWith(".md")&&C.content)return m.jsx(Vd,{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:E.map((L,O)=>m.jsxs("button",{className:`core-list-item ${n===L.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(O+1,8)}`,onClick:()=>{a(L.filename),u(!1),f("preview")},children:[m.jsx("span",{className:"core-list-name",children:L.name}),m.jsx("span",{className:"core-list-type",children:L.type})]},L.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:[Ltt(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"})]})]}),N()]}),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:L=>c(L.target.value)}),m.jsx("pre",{className:"core-editor-preview",children:o})]})]})]})]})]})}function Rtt(){return di({queryKey:["knowledge"],queryFn:()=>me.get("/knowledge"),select:i=>i.entries})}function Dtt(i){return di({queryKey:["knowledge",i],queryFn:()=>me.get(`/knowledge/${i}`),select:e=>e.entry,enabled:!!i})}function jtt(){const i=kr();return Hr({mutationFn:({slug:e,pinned:r})=>me.patch(`/knowledge/${e}`,{pinned:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["knowledge"]})}})}const Ftt='button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])';function Itt({label:i,actions:e,onClose:r,children:n}){const{t:a}=Ni(),o=K.useRef(null),c=K.useRef(r);return K.useEffect(()=>{c.current=r}),K.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(Ftt);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 rx={exports:{}},wN;function $tt(){return wN||(wN=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,E=3,N=2,L=[],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]=E++,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<N;g++)O=O<<1,A==d-1?(A=0,L.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,L.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<N;g++)O=O<<1|x,A==d-1?(A=0,L.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,L.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,N),N++),delete v[k]}else for(x=y[k],g=0;g<N;g++)O=O<<1|x&1,A==d-1?(A=0,L.push(f(O)),O=0):A++,x=x>>1;T--,T==0&&(T=Math.pow(2,N),N++),y[_]=E++,k=String(C)}if(k!==""){if(Object.prototype.hasOwnProperty.call(v,k)){if(k.charCodeAt(0)<256){for(g=0;g<N;g++)O=O<<1,A==d-1?(A=0,L.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,L.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<N;g++)O=O<<1|x,A==d-1?(A=0,L.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,L.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,N),N++),delete v[k]}else for(x=y[k],g=0;g<N;g++)O=O<<1|x&1,A==d-1?(A=0,L.push(f(O)),O=0):A++,x=x>>1;T--,T==0&&(T=Math.pow(2,N),N++)}for(x=2,g=0;g<N;g++)O=O<<1|x&1,A==d-1?(A=0,L.push(f(O)),O=0):A++,x=x>>1;for(;;)if(O=O<<1,A==d-1){L.push(f(O));break}else A++;return L.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,E,N,L,O,A,M={val:f(0),position:d,index:1};for(k=0;k<3;k+=1)g[k]=k;for(E=0,L=Math.pow(2,2),O=1;O!=L;)N=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(N>0?1:0)*O,O<<=1;switch(E){case 0:for(E=0,L=Math.pow(2,8),O=1;O!=L;)N=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(N>0?1:0)*O,O<<=1;A=r(E);break;case 1:for(E=0,L=Math.pow(2,16),O=1;O!=L;)N=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(N>0?1:0)*O,O<<=1;A=r(E);break;case 2:return""}for(g[3]=A,T=A,_.push(A);;){if(M.index>u)return"";for(E=0,L=Math.pow(2,v),O=1;O!=L;)N=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(N>0?1:0)*O,O<<=1;switch(A=E){case 0:for(E=0,L=Math.pow(2,8),O=1;O!=L;)N=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(N>0?1:0)*O,O<<=1;g[y++]=r(E),A=y-1,x--;break;case 1:for(E=0,L=Math.pow(2,16),O=1;O!=L;)N=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(N>0?1:0)*O,O<<=1;g[y++]=r(E),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})})(rx)),rx.exports}var ztt=$tt();const Ptt=/##\s*Drawing\s*```(compressed-json|json)\s*([\s\S]*?)```/;function qtt(i){const e=i.match(Ptt);if(!e)return null;const[,r,n]=e;let a;if(r==="compressed-json"){const o=ztt.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 mD(i){return i.endsWith(".excalidraw")}function Utt({content:i}){const e=K.useRef(null),{resolved:r}=jd(),[n,a]=K.useState(null);return K.useEffect(()=>{const o=e.current;if(!o)return;let c=!1,h=null,u=null;const d=qtt(i);if(!d){a("Could not read the Excalidraw drawing in this file.");return}return a(null),(async()=>{try{const{exportToSvg:f}=await De(async()=>{const{exportToSvg:_}=await import("./percentages-BXMCSKIN-D36vqrao.js").then(k=>k.i);return{exportToSvg:_}},__vite__mapDeps([50,51]));if(c)return;const g=await f({elements:d.elements,files:d.files??null,appState:{...d.appState??{},exportBackground:!1,exportWithDarkMode:r==="dark",exportEmbedScene:!1},exportPadding:24});if(c)return;const x=parseFloat(g.getAttribute("width")||"0")||g.viewBox.baseVal.width,y=parseFloat(g.getAttribute("height")||"0")||g.viewBox.baseVal.height;g.style.width=`${x}px`,g.style.height=`${y}px`,g.style.maxWidth="none",g.style.transformOrigin="0 0",o.innerHTML="",o.appendChild(g);const v=uD(g,{maxZoom:12,minZoom:.1,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1});h=()=>v.dispose();const C=()=>{try{const _=o.getBoundingClientRect();if(_.width===0||_.height===0||x===0||y===0)return;const k=24,T=Math.min((_.width-k)/x,(_.height-k)/y,1);v.zoomAbs(0,0,1),v.moveTo(0,0),v.zoomAbs(0,0,T);const E=(_.width-x*T)/2,N=(_.height-y*T)/2;v.moveTo(E,N)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(C)),u=new ResizeObserver(()=>C()),u.observe(o)}catch(f){c||a(f instanceof Error?f.message:"Failed to render Excalidraw drawing.")}})(),()=>{c=!0,u==null||u.disconnect(),h==null||h(),o.innerHTML=""}},[i,r]),n?m.jsx("div",{className:"excalidraw-error",children:n}):m.jsx("div",{className:"excalidraw-preview","data-theme":r,children:m.jsx("div",{ref:e,className:"excalidraw-stage"})})}const Htt=/```sql\s*\n([\s\S]*?)```/i;function Wtt(i,e){if(!i.startsWith("data-structures/"))return null;const r=e.match(Htt);return r?r[1]:null}function Gtt(i){return i.split(/[-_]/).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(" ")}function Ytt(i,e){if(!e)return i.name;if(mD(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 Ktt(){const{t:i}=Ni(),{data:e,isLoading:r,isError:n,error:a}=Rtt(),o=jtt(),[c,h]=K.useState(""),[u,d]=K.useState(null),[f,g]=K.useState("preview"),[x,y]=K.useState(new Set),[v,C]=K.useState(!1),{data:_}=Dtt(u??""),k=K.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const D=c.toLowerCase();return e.filter($=>$.name.toLowerCase().includes(D)||$.description.toLowerCase().includes(D)||$.tags.some(U=>U.toLowerCase().includes(D)))},[e,c]),{rootEntries:T,folders:E}=K.useMemo(()=>{const D=[],$=new Map;for(const Y of k){const I=Y.slug.indexOf("/");if(I===-1){D.push(Y);continue}const W=Y.slug.slice(0,I),j=$.get(W);j?j.push(Y):$.set(W,[Y])}const U=[...$.entries()].sort((Y,I)=>Y[0].localeCompare(I[0])).map(([Y,I])=>({folder:Y,label:Gtt(Y),entries:I}));return{rootEntries:D,folders:U}},[k]),N=c.trim().length>0,L=D=>N||x.has(D),O=D=>{y($=>{const U=new Set($);return U.has(D)?U.delete(D):U.add(D),U})},A=(D,$=null)=>m.jsxs("button",{className:`knowledge-card ${u===D.slug?"knowledge-card--active":""}`,onClick:()=>{d(D.slug),g("preview")},children:[m.jsxs("div",{className:"knowledge-card-header",children:[m.jsx("span",{className:"knowledge-card-name",children:Ytt(D,$)}),m.jsx("button",{className:`pin-btn ${D.pinned?"pin-btn--active":""}`,onClick:U=>{U.stopPropagation(),o.mutate({slug:D.slug,pinned:!D.pinned})},title:D.pinned?i("knowledge.unpin"):i("knowledge.pin"),children:D.pinned?"◆":"◇"})]}),D.description&&m.jsx("p",{className:"knowledge-card-desc",children:D.description}),m.jsx("div",{className:"knowledge-card-tags",children:D.tags.map(U=>m.jsx("span",{className:"task-tag","data-hue":Ka(U),children:U},U))})]},D.slug),M=()=>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"})]}),z=D=>{if(f==="preview"&&D.content){if(mD(D.slug))return m.jsx(Utt,{content:D.content});const $=Wtt(D.slug,D.content);return $?m.jsx(gD,{content:$}):m.jsx(Vd,{content:D.content})}return m.jsx("pre",{className:"core-viewer-content",children:D.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:D=>h(D.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")}),E.map(D=>m.jsxs("div",{className:"knowledge-folder",children:[m.jsxs("button",{className:"knowledge-folder-header",onClick:()=>O(D.folder),"aria-expanded":L(D.folder),children:[m.jsx("span",{className:"knowledge-folder-chevron",children:L(D.folder)?"▾":"▸"}),m.jsx("span",{className:"knowledge-folder-name",children:D.label}),m.jsx("span",{className:"knowledge-folder-count",children:D.entries.length})]}),L(D.folder)&&m.jsx("div",{className:"knowledge-folder-items",children:D.entries.map($=>A($,D.folder))})]},D.folder)),T.map(D=>A(D))]}),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:[M(),m.jsx("button",{className:"core-expand-btn",onClick:()=>C(!0),title:i("knowledge.fullscreen"),"aria-label":i("knowledge.fullscreen"),children:"⛶"})]})]}),v?m.jsx(Itt,{label:_.name,actions:M(),onClose:()=>C(!1),children:z(_)}):z(_)]})]})]})]})}function Vtt(){const{t:i}=Ni(),[e,r]=K.useState(null),[n,a]=K.useState("preview"),[o,c]=K.useState(""),{data:h,isLoading:u,isError:d,error:f}=di({queryKey:["features"],queryFn:()=>me.get("/features")}),g=(h==null?void 0:h.features)??[],x=K.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}=di({queryKey:["features",e],queryFn:()=>me.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":Ka(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(Vd,{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 Xtt(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 Ztt(i,e,r){return e=aet(e),e in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function SN(i,e){return tet(i)||Xtt(i,e)||yD(i,e)||ret()}function Qtt(i){return Jtt(i)||eet(i)||yD(i)||iet()}function Jtt(i){if(Array.isArray(i))return Kv(i)}function tet(i){if(Array.isArray(i))return i}function eet(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function yD(i,e){if(i){if(typeof i=="string")return Kv(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 Kv(i,e)}}function Kv(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 iet(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
433
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ret(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
434
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function net(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 aet(i){var e=net(i,"string");return typeof e=="symbol"?e:String(e)}var set=function(e,r){var n=new Set(r);return Object.assign.apply(Object,[{}].concat(Qtt(Object.entries(e).filter(function(a){var o=SN(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=SN(a,2),c=o[0],h=o[1];return Ztt({},c,h)}))))};function Vv(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 oet(i){if(Array.isArray(i))return i}function cet(i){if(Array.isArray(i))return Vv(i)}function het(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function uet(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 det(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
435
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fet(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
436
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pet(i,e){return oet(i)||uet(i,e)||bD(i,e)||det()}function TN(i){return cet(i)||het(i)||bD(i)||fet()}function bD(i,e){if(i){if(typeof i=="string")return Vv(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)?Vv(i,e):void 0}}function get(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 K.forwardRef(function(f,g){var x=K.useRef(),y=K.useMemo(function(){var _=Object.fromEntries(d.filter(function(k){return f.hasOwnProperty(k)}).map(function(k){return[k,f[k]]}));return i(_)},[]);EN(function(){y(o(x.current))},K.useLayoutEffect),EN(function(){return y._destructor instanceof Function?y._destructor:void 0});var v=K.useCallback(function(_){for(var k=arguments.length,T=new Array(k>1?k-1:0),E=1;E<k;E++)T[E-1]=arguments[E];return y[_]instanceof Function?y[_].apply(y,T):void 0},[y]),C=K.useRef({});return Object.keys(set(f,[].concat(TN(h),TN(d)))).filter(function(_){return C.current[_]!==f[_]}).forEach(function(_){return v(_,f[_])}),C.current=f,K.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(_){return[_,function(){for(var k=arguments.length,T=new Array(k),E=0;E<k;E++)T[E]=arguments[E];return v.apply(void 0,[_].concat(T))}]}))},[v]),HA.createElement(n,{ref:x})})}function EN(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K.useEffect,r=K.useRef(),n=K.useRef(!1),a=K.useRef(!1),o=K.useState(0),c=pet(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 met="[object Symbol]";function yet(i){return typeof i=="symbol"||wh(i)&&Hl(i)==met}var bet=/\s/;function xet(i){for(var e=i.length;e--&&bet.test(i.charAt(e)););return e}var vet=/^\s+/;function Cet(i){return i&&i.slice(0,xet(i)+1).replace(vet,"")}var NN=NaN,_et=/^[-+]0x[0-9a-f]+$/i,ket=/^0b[01]+$/i,wet=/^0o[0-7]+$/i,Tet=parseInt;function AN(i){if(typeof i=="number")return i;if(yet(i))return NN;if(ka(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=ka(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=Cet(i);var r=ket.test(i);return r||wet.test(i)?Tet(i.slice(2),r?2:8):_et.test(i)?NN:+i}var nx=function(){return Ta.Date.now()},Eet="Expected a function",Net=Math.max,Aet=Math.min;function xD(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(Eet);e=AN(e)||0,ka(r)&&(f=!!r.leading,g="maxWait"in r,o=g?Net(AN(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,z=e-A;return g?Aet(z,o-M):z}function _(O){var A=O-u,M=O-d;return u===void 0||A>=e||A<0||g&&M>=o}function k(){var O=nx();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 E(){h!==void 0&&clearTimeout(h),d=0,n=u=a=h=void 0}function N(){return h===void 0?c:T(nx())}function L(){var O=nx(),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 L.cancel=E,L.flush=N,L}var Met="Expected a function";function Bet(i,e,r){var n=!0,a=!0;if(typeof i!="function")throw new TypeError(Met);return ka(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),xD(i,e,{leading:n,maxWait:e,trailing:a})}var Nl=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-Nl.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?Nl.Bounce.In(i*2)*.5:Nl.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}}}}),Ju=function(){return performance.now()},vD=(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=Ju()),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})(),Xv={Linear:function(i,e){var r=i.length-1,n=r*e,a=Math.floor(n),o=Xv.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}}},CD=(function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i})(),Zv=new vD,MN=(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=Nl.Linear.None,this._interpolationFunction=Xv.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=CD.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=Zv,Zv.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=Ju()),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=Ju()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},i.prototype.resume=function(e){return e===void 0&&(e=Ju()),!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=Nl.Linear.None),this._easingFunction=e,this},i.prototype.interpolation=function(e){return e===void 0&&(e=Xv.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=Ju()),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})();CD.nextId;var Va=Zv;Va.getAll.bind(Va);Va.removeAll.bind(Va);Va.add.bind(Va);Va.remove.bind(Va);Va.update.bind(Va);function BN(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 Let(i){if(Array.isArray(i))return i}function Oet(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Ret(i,e,r){return Object.defineProperty(i,"prototype",{writable:!1}),i}function Det(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 jet(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
437
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fet(i,e){return Let(i)||Det(i,e)||Iet(i,e)||jet()}function Iet(i,e){if(i){if(typeof i=="string")return BN(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)?BN(i,e):void 0}}var $et=Ret(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;Oet(this,i),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function DC(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 $et(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),E=T?_.shift():void 0,N=_[0],L=N===void 0?{}:N,O=Object.assign({},r instanceof Function?r(L):r,{initialised:!1}),A={};function M($){return z($,L),D(),M}var z=function(U,Y){f.call(M,U,O,Y),O.initialised=!0},D=xD(function(){O.initialised&&(x.call(M,O,A),A={})},1);return y.forEach(function($){M[$.name]=U($);function U(Y){var I=Y.name,W=Y.triggerUpdate,j=W===void 0?!1:W,q=Y.onChange,G=q===void 0?function(H,rt){}:q,it=Y.defaultVal,nt=it===void 0?null:it;return function(H){var rt=O[I];if(!arguments.length)return rt;var ft=H===void 0?nt:H;return O[I]=ft,G.call(M,ft,O,rt),!A.hasOwnProperty(I)&&(A[I]=rt),j&&D(),M}}}),Object.keys(c).forEach(function($){M[$]=function(){for(var U,Y=arguments.length,I=new Array(Y),W=0;W<Y;W++)I[W]=arguments[W];return(U=c[$]).call.apply(U,[M,O].concat(I))}}),Object.entries(u).forEach(function($){var U=Fet($,2),Y=U[0],I=U[1];return M[Y]=M[I]}),M.resetProps=function(){return y.forEach(function($){M[$.name]($.defaultVal)}),M},M.resetProps(),O._rerender=D,T&&E&&M(E),M}}var ai=(function(i){return typeof i=="function"?i:typeof i=="string"?function(e){return e[i]}:function(e){return i}});function Ug(i){"@babel/helpers - typeof";return Ug=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},Ug(i)}var zet=/^\s+/,Pet=/\s+$/;function re(i,e){if(i=i||"",e=e||{},i instanceof re)return i;if(!(this instanceof re))return new re(i,e);var r=qet(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}re.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=_D(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=ON(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=ON(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=LN(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=LN(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 RN(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Get(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(Oi(this._r,255)*100)+"%",g:Math.round(Oi(this._g,255)*100)+"%",b:Math.round(Oi(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Oi(this._r,255)*100)+"%, "+Math.round(Oi(this._g,255)*100)+"%, "+Math.round(Oi(this._b,255)*100)+"%)":"rgba("+Math.round(Oi(this._r,255)*100)+"%, "+Math.round(Oi(this._g,255)*100)+"%, "+Math.round(Oi(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:nit[RN(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+DN(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=re(e);n="#"+DN(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 re(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(Xet,arguments)},brighten:function(){return this._applyModification(Zet,arguments)},darken:function(){return this._applyModification(Qet,arguments)},desaturate:function(){return this._applyModification(Yet,arguments)},saturate:function(){return this._applyModification(Ket,arguments)},greyscale:function(){return this._applyModification(Vet,arguments)},spin:function(){return this._applyModification(Jet,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(iit,arguments)},complement:function(){return this._applyCombination(tit,arguments)},monochromatic:function(){return this._applyCombination(rit,arguments)},splitcomplement:function(){return this._applyCombination(eit,arguments)},triad:function(){return this._applyCombination(jN,[3])},tetrad:function(){return this._applyCombination(jN,[4])}};re.fromRatio=function(i,e){if(Ug(i)=="object"){var r={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?r[n]=i[n]:r[n]=td(i[n]));i=r}return re(i,e)};function qet(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=lit(i)),Ug(i)=="object"&&(bs(i.r)&&bs(i.g)&&bs(i.b)?(e=Uet(i.r,i.g,i.b),c=!0,h=String(i.r).substr(-1)==="%"?"prgb":"rgb"):bs(i.h)&&bs(i.s)&&bs(i.v)?(n=td(i.s),a=td(i.v),e=Wet(i.h,n,a),c=!0,h="hsv"):bs(i.h)&&bs(i.s)&&bs(i.l)&&(n=td(i.s),o=td(i.l),e=Het(i.h,n,o),c=!0,h="hsl"),i.hasOwnProperty("a")&&(r=i.a)),r=_D(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 Uet(i,e,r){return{r:Oi(i,255)*255,g:Oi(e,255)*255,b:Oi(r,255)*255}}function LN(i,e,r){i=Oi(i,255),e=Oi(e,255),r=Oi(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 Het(i,e,r){var n,a,o;i=Oi(i,360),e=Oi(e,100),r=Oi(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 ON(i,e,r){i=Oi(i,255),e=Oi(e,255),r=Oi(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 Wet(i,e,r){i=Oi(i,360)*6,e=Oi(e,100),r=Oi(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 RN(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 Get(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(kD(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 DN(i,e,r,n){var a=[xa(kD(n)),xa(Math.round(i).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(r).toString(16))];return a.join("")}re.equals=function(i,e){return!i||!e?!1:re(i).toRgbString()==re(e).toRgbString()};re.random=function(){return re.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Yet(i,e){e=e===0?0:e||10;var r=re(i).toHsl();return r.s-=e/100,r.s=Cm(r.s),re(r)}function Ket(i,e){e=e===0?0:e||10;var r=re(i).toHsl();return r.s+=e/100,r.s=Cm(r.s),re(r)}function Vet(i){return re(i).desaturate(100)}function Xet(i,e){e=e===0?0:e||10;var r=re(i).toHsl();return r.l+=e/100,r.l=Cm(r.l),re(r)}function Zet(i,e){e=e===0?0:e||10;var r=re(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)))),re(r)}function Qet(i,e){e=e===0?0:e||10;var r=re(i).toHsl();return r.l-=e/100,r.l=Cm(r.l),re(r)}function Jet(i,e){var r=re(i).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,re(r)}function tit(i){var e=re(i).toHsl();return e.h=(e.h+180)%360,re(e)}function jN(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=re(i).toHsl(),n=[re(i)],a=360/e,o=1;o<e;o++)n.push(re({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function eit(i){var e=re(i).toHsl(),r=e.h;return[re(i),re({h:(r+72)%360,s:e.s,l:e.l}),re({h:(r+216)%360,s:e.s,l:e.l})]}function iit(i,e,r){e=e||6,r=r||30;var n=re(i).toHsl(),a=360/r,o=[re(i)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(re(n));return o}function rit(i,e){e=e||6;for(var r=re(i).toHsv(),n=r.h,a=r.s,o=r.v,c=[],h=1/e;e--;)c.push(re({h:n,s:a,v:o})),o=(o+h)%1;return c}re.mix=function(i,e,r){r=r===0?0:r||50;var n=re(i).toRgb(),a=re(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 re(c)};re.readability=function(i,e){var r=re(i),n=re(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};re.isReadable=function(i,e,r){var n=re.readability(i,e),a,o;switch(o=!1,a=cit(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};re.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=re.readability(i,e[d]),o>a&&(a=o,n=re(e[d]));return re.isReadable(i,n,{level:h,size:u})||!c?n:(r.includeFallbackColors=!1,re.mostReadable(i,["#fff","#000"],r))};var Qv=re.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"},nit=re.hexNames=ait(Qv);function ait(i){var e={};for(var r in i)i.hasOwnProperty(r)&&(e[i[r]]=r);return e}function _D(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Oi(i,e){sit(i)&&(i="100%");var r=oit(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 Cm(i){return Math.min(1,Math.max(0,i))}function Dn(i){return parseInt(i,16)}function sit(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function oit(i){return typeof i=="string"&&i.indexOf("%")!=-1}function xa(i){return i.length==1?"0"+i:""+i}function td(i){return i<=1&&(i=i*100+"%"),i}function kD(i){return Math.round(parseFloat(i)*255).toString(16)}function FN(i){return Dn(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 bs(i){return!!da.CSS_UNIT.exec(i)}function lit(i){i=i.replace(zet,"").replace(Pet,"").toLowerCase();var e=!1;if(Qv[i])i=Qv[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:Dn(r[1]),g:Dn(r[2]),b:Dn(r[3]),a:FN(r[4]),format:e?"name":"hex8"}:(r=da.hex6.exec(i))?{r:Dn(r[1]),g:Dn(r[2]),b:Dn(r[3]),format:e?"name":"hex"}:(r=da.hex4.exec(i))?{r:Dn(r[1]+""+r[1]),g:Dn(r[2]+""+r[2]),b:Dn(r[3]+""+r[3]),a:FN(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=da.hex3.exec(i))?{r:Dn(r[1]+""+r[1]),g:Dn(r[2]+""+r[2]),b:Dn(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function cit(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 Jv(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 hit(i){if(Array.isArray(i))return Jv(i)}function wD(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 uit(i,e){if(e.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dit(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Jn(i,e){return i.get(wD(i,e))}function IN(i,e,r){uit(i,e),e.set(i,r)}function $N(i,e,r){return i.set(wD(i,e),r),r}function fit(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,xit(n.key),n)}}function pit(i,e,r){return e&&fit(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function git(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function mit(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
438
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yit(i){return hit(i)||git(i)||vit(i)||mit()}function bit(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 xit(i){var e=bit(i,"string");return typeof e=="symbol"?e:e+""}function vit(i,e){if(i){if(typeof i=="string")return Jv(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)?Jv(i,e):void 0}}var Cit=123,_it=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},SD=function(e,r,n){return(e<<16)+(r<<8)+n},kit=function(e){var r=re(e).toRgb(),n=r.r,a=r.g,o=r.b;return SD(n,a,o)},zN=function(e,r){return e*Cit%Math.pow(2,r)},ol=new WeakMap,xs=new WeakMap,wit=(function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;dit(this,i),IN(this,ol,void 0),IN(this,xs,void 0),$N(xs,this,e),this.reset()}return pit(i,[{key:"reset",value:function(){$N(ol,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Jn(ol,this).length>=Math.pow(2,24-Jn(xs,this)))return null;var n=Jn(ol,this).length,a=zN(n,Jn(xs,this)),o=_it(n+(a<<24-Jn(xs,this)));return Jn(ol,this).push(r),o}},{key:"lookup",value:function(r){if(!r)return null;var n=typeof r=="string"?kit(r):SD.apply(void 0,yit(r));if(!n)return null;var a=n&Math.pow(2,24-Jn(xs,this))-1,o=n>>24-Jn(xs,this)&Math.pow(2,Jn(xs,this))-1;return zN(a,Jn(xs,this))!==o||a>=Jn(ol,this).length?null:Jn(ol,this)[a]}}])})(),Zd,Ri,TD,ED,xo,PN,ND,AD,ax,Qp,cd,MD,jC,t1,e1,Hg={},Wg=[],Sit=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_m=Array.isArray;function Ha(i,e){for(var r in e)i[r]=e[r];return i}function FC(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function Tit(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?Zd.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 hd(i,c,n,a,null)}function hd(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??++TD,__i:-1,__u:0};return a==null&&Ri.vnode!=null&&Ri.vnode(o),o}function km(i){return i.children}function Jp(i,e){this.props=i,this.context=e}function Ch(i,e){if(e==null)return i.__?Ch(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"?Ch(i):null}function Eit(i){if(i.__P&&i.__d){var e=i.__v,r=e.__e,n=[],a=[],o=Ha({},e);o.__v=e.__v+1,Ri.vnode&&Ri.vnode(o),IC(i.__P,o,e,i.__n,i.__P.namespaceURI,32&e.__u?[r]:null,n,r??Ch(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,RD(n,o,a),e.__e=e.__=null,o.__e!=r&&BD(o)}}function BD(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}),BD(i)}function qN(i){(!i.__d&&(i.__d=!0)&&xo.push(i)&&!Gg.__r++||PN!=Ri.debounceRendering)&&((PN=Ri.debounceRendering)||ND)(Gg)}function Gg(){try{for(var i,e=1;xo.length;)xo.length>e&&xo.sort(AD),i=xo.shift(),e=xo.length,Eit(i)}finally{xo.length=Gg.__r=0}}function LD(i,e,r,n,a,o,c,h,u,d,f){var g,x,y,v,C,_,k,T=n&&n.__k||Wg,E=e.length;for(u=Nit(r,e,T,u,E),g=0;g<E;g++)(y=r.__k[g])!=null&&(x=y.__i!=-1&&T[y.__i]||Hg,y.__i=g,_=IC(i,y,x,a,o,c,h,u,d,f),v=y.__e,y.ref&&x.ref!=y.ref&&(x.ref&&$C(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=OD(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 Nit(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]=hd(null,c,null,null,null):_m(c)?c=i.__k[o]=hd(km,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=i.__k[o]=hd(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=Ait(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=Ch(h)),jD(h,h));return n}function OD(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=OD(a[o],e,r,n));return e}i.__e!=e&&(n&&(e&&i.type&&!e.parentNode&&(e=Ch(i)),r.insertBefore(i.__e,e||null)),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Ait(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 UN(i,e,r){e[0]=="-"?i.setProperty(e,r??""):i[e]=r==null?"":typeof r!="number"||Sit.test(e)?r:r+"px"}function Mp(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||UN(i.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||UN(i.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(MD,"$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[cd]=n[cd]:(r[cd]=jC,i.addEventListener(e,o?e1:t1,o)):i.removeEventListener(e,o?e1:t1,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 HN(i){return function(e){if(this.l){var r=this.l[e.type+i];if(e[Qp]==null)e[Qp]=jC++;else if(e[Qp]<r[cd])return;return r(Ri.event?Ri.event(e):e)}}}function IC(i,e,r,n,a,o,c,h,u,d){var f,g,x,y,v,C,_,k,T,E,N,L,O,A,M,z=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),o=[h=e.__e=r.__e]),(f=Ri.__b)&&f(e);t:if(typeof z=="function")try{if(k=e.props,T=z.prototype&&z.prototype.render,E=(f=z.contextType)&&n[f.__c],N=f?E?E.props.value:f.__:n,r.__c?_=(g=e.__c=r.__c).__=g.__E:(T?e.__c=g=new z(k,N):(e.__c=g=new Jp(k,N),g.constructor=z,g.render=Bit),E&&E.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&&z.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Ha({},g.__s)),Ha(g.__s,z.getDerivedStateFromProps(k,g.__s))),y=g.props,v=g.state,g.__v=e,x)T&&z.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&z.getDerivedStateFromProps==null&&k!==y&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(k,N),e.__v==r.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(k,g.__s,N)===!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)}),Wg.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(k,g.__s,N),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(y,v,C)})}if(g.context=N,g.props=k,g.__P=i,g.__e=!1,L=Ri.__r,O=0,T)g.state=g.__s,g.__d=!1,L&&L(e),f=g.render(g.props,g.state,g.context),Wg.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,L&&L(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===km&&f.key==null?DD(f.props.children):f,h=LD(i,_m(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--;)FC(o[M]);i1(e)}else e.__e=r.__e,e.__k=r.__k,D.then||i1(e);Ri.__e(D,e,r)}else o==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):h=e.__e=Mit(r.__e,e,r,n,a,o,c,u,d);return(f=Ri.diffed)&&f(e),128&e.__u?void 0:h}function i1(i){i&&(i.__c&&(i.__c.__e=!0),i.__k&&i.__k.some(i1))}function RD(i,e,r){for(var n=0;n<r.length;n++)$C(r[n],r[++n],r[++n]);Ri.__c&&Ri.__c(e,i),i.some(function(a){try{i=a.__h,a.__h=[],i.some(function(o){o.call(a)})}catch(o){Ri.__e(o,a.__v)}})}function DD(i){return typeof i!="object"||i==null||i.__b>0?i:_m(i)?i.map(DD):Ha({},i)}function Mit(i,e,r,n,a,o,c,h,u){var d,f,g,x,y,v,C,_=r.props||Hg,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&&(Ri.__m&&Ri.__m(e,o),h=!1),o=null}if(T==null)_===k||h&&i.data==k||(i.data=k);else{if(o=o&&Zd.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||Mp(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||Mp(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=""),LD(e.type=="template"?i.content:i,_m(x)?x:[x],e,r,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:r.__k&&Ch(r,0),h,u),o!=null)for(d=o.length;d--;)FC(o[d]);h||(d="value",T=="progress"&&v==null?i.removeAttribute("value"):v!=null&&(v!==i[d]||T=="progress"&&!v||T=="option"&&v!=_[d])&&Mp(i,d,v,_[d],a),d="checked",C!=null&&C!=i[d]&&Mp(i,d,C,_[d],a))}return i}function $C(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){Ri.__e(a,r)}}function jD(i,e,r){var n,a;if(Ri.unmount&&Ri.unmount(i),(n=i.ref)&&(n.current&&n.current!=i.__e||$C(n,null,e)),(n=i.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){Ri.__e(o,e)}n.base=n.__P=null}if(n=i.__k)for(a=0;a<n.length;a++)n[a]&&jD(n[a],e,r||typeof i.type!="function");r||FC(i.__e),i.__c=i.__=i.__e=void 0}function Bit(i,e,r){return this.constructor(i,r)}function Lit(i,e,r){var n,a,o,c;e==document&&(e=document.documentElement),Ri.__&&Ri.__(i,e),a=(n=!1)?null:e.__k,o=[],c=[],IC(e,i=e.__k=Tit(km,null,[i]),a||Hg,Hg,e.namespaceURI,a?null:e.firstChild?Zd.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),RD(o,i,c)}function FD(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?Zd.call(arguments,2):r),hd(i.type,h,n||i.key,a||i.ref,null)}Zd=Wg.slice,Ri={__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}},TD=0,ED=function(i){return i!=null&&i.constructor===void 0},Jp.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),qN(this))},Jp.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),qN(this))},Jp.prototype.render=km,xo=[],ND=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,AD=function(i,e){return i.__v.__b-e.__v.__b},Gg.__r=0,ax=Math.random().toString(8),Qp="__d"+ax,cd="__a"+ax,MD=/(PointerCapture)$|Capture$/i,jC=0,t1=HN(!1),e1=HN(!0);function WN(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 Oit(i){if(Array.isArray(i))return i}function Rit(i,e,r){return(e=zit(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function Dit(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 jit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
439
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GN(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 Fit(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?GN(Object(r),!0).forEach(function(n){Rit(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):GN(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function Iit(i,e){return Oit(i)||Dit(i,e)||Pit(i,e)||jit()}function $it(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 zit(i){var e=$it(i,"string");return typeof e=="symbol"?e:e+""}function Yg(i){"@babel/helpers - typeof";return Yg=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},Yg(i)}function Pit(i,e){if(i){if(typeof i=="string")return WN(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)?WN(i,e):void 0}}var r1=function(e){if(Yg(e)!=="object")return e;var r=FD(e);if(r.props){var n;r.props=Fit({},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(r1):r1(r.props.children))}return r},qit=function(e){return ED(FD(e))},Uit=function(e,r){delete r.__k,Lit(r1(e),r)};function Hit(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 Wit=`.float-tooltip-kap {
|
|
440
|
+
position: absolute;
|
|
441
|
+
width: max-content; /* prevent shrinking near right edge */
|
|
442
|
+
max-width: max(50%, 150px);
|
|
443
|
+
padding: 3px 5px;
|
|
444
|
+
border-radius: 3px;
|
|
445
|
+
font: 12px sans-serif;
|
|
446
|
+
color: #eee;
|
|
447
|
+
background: rgba(0,0,0,0.6);
|
|
448
|
+
pointer-events: none;
|
|
449
|
+
}
|
|
450
|
+
`;Hit(Wit);var Git=DC({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&&Yg(e)==="object"&&!!e.node&&typeof e.node=="function",h=ce(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=Iit(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):qit(e.content)?(e.tooltipEl.text(""),Uit(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 Yit(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 Kit(i){const e=+this._x.call(null,i);return ID(this.cover(e),e,i)}function ID(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 Vit(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)ID(this,r[o],i[o]);return this}function Xit(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 Zit(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function Qit(i){return arguments.length?this.cover(+i[0][0]).cover(+i[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Os(i,e,r){this.node=i,this.x0=e,this.x1=r}function Jit(i,e){var r,n=this._x0,a,o,c=this._x1,h=[],u=this._root,d,f;for(u&&h.push(new Os(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 Os(u[1],g,o),new Os(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 trt(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 ert(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function irt(){return this._root}function rrt(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function nrt(i){var e=[],r,n=this._root,a,o,c;for(n&&e.push(new Os(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 Os(a,h,c)),(a=n[0])&&e.push(new Os(a,o,h))}return this}function art(i){var e=[],r=[],n;for(this._root&&e.push(new Os(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 Os(o,c,u)),(o=a[1])&&e.push(new Os(o,u,h))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.x1);return this}function srt(i){return i[0]}function ort(i){return arguments.length?(this._x=i,this):this._x}function zC(i,e){var r=new PC(e??srt,NaN,NaN);return i==null?r:r.addAll(i)}function PC(i,e,r){this._x=i,this._x0=e,this._x1=r,this._root=void 0}function YN(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Cn=zC.prototype=PC.prototype;Cn.copy=function(){var i=new PC(this._x,this._x0,this._x1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=YN(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]=YN(n));return i};Cn.add=Kit;Cn.addAll=Vit;Cn.cover=Xit;Cn.data=Zit;Cn.extent=Qit;Cn.find=Jit;Cn.remove=trt;Cn.removeAll=ert;Cn.root=irt;Cn.size=rrt;Cn.visit=nrt;Cn.visitAfter=art;Cn.x=ort;function lrt(i){const e=+this._x.call(null,i),r=+this._y.call(null,i),n=+this._z.call(null,i);return $D(this.cover(e,r,n),e,r,n,i)}function $D(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,E,N,L,O,A,M;if(!c)return i._root=h,i;for(;c.length;)if((N=e>=(v=(u+g)/2))?u=v:g=v,(L=r>=(C=(d+x)/2))?d=C:x=C,(O=n>=(_=(f+y)/2))?f=_:y=_,o=c,!(c=c[A=O<<2|L<<1|N]))return o[A]=h,i;if(k=+i._x.call(null,c.data),T=+i._y.call(null,c.data),E=+i._z.call(null,c.data),e===k&&r===T&&n===E)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),(N=e>=(v=(u+g)/2))?u=v:g=v,(L=r>=(C=(d+x)/2))?d=C:x=C,(O=n>=(_=(f+y)/2))?f=_:y=_;while((A=O<<2|L<<1|N)===(M=(E>=_)<<2|(T>=C)<<1|k>=v));return o[M]=c,o[A]=h,i}function crt(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)$D(this,r[g],n[g],a[g],i[g]);return this}function hrt(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 urt(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function drt(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 _i(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 frt(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,E,N;for(T&&k.push(new _i(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);E=k.pop();)if(!(!(T=E.node)||(u=E.x0)>v||(d=E.y0)>C||(f=E.z0)>_||(g=E.x1)<o||(x=E.y1)<c||(y=E.z1)<h))if(T.length){var L=(u+g)/2,O=(d+x)/2,A=(f+y)/2;k.push(new _i(T[7],L,O,A,g,x,y),new _i(T[6],u,O,A,L,x,y),new _i(T[5],L,d,A,g,O,y),new _i(T[4],u,d,A,L,O,y),new _i(T[3],L,O,f,g,x,A),new _i(T[2],u,O,f,L,x,A),new _i(T[1],L,d,f,g,O,A),new _i(T[0],u,d,f,L,O,A)),(N=(r>=A)<<2|(e>=O)<<1|i>=L)&&(E=k[k.length-1],k[k.length-1]=k[k.length-1-N],k[k.length-1-N]=E)}else{var M=i-+this._x.call(null,T.data),z=e-+this._y.call(null,T.data),D=r-+this._z.call(null,T.data),$=M*M+z*z+D*D;if($<n){var U=Math.sqrt(n=$);o=i-U,c=e-U,h=r-U,v=i+U,C=e+U,_=r+U,a=T.data}}return a}const prt=(i,e,r,n,a,o)=>Math.sqrt((i-n)**2+(e-a)**2+(r-o)**2);function grt(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;prt(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 mrt(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,E,N,L,O;if(!r)return this;if(r.length)for(;;){if((T=x>=(C=(c+d)/2))?c=C:d=C,(E=y>=(_=(h+f)/2))?h=_:f=_,(N=v>=(k=(u+g)/2))?u=k:g=k,e=r,!(r=r[L=N<<2|E<<1|T]))return this;if(!r.length)break;(e[L+1&7]||e[L+2&7]||e[L+3&7]||e[L+4&7]||e[L+5&7]||e[L+6&7]||e[L+7&7])&&(n=e,O=L)}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[L]=o:delete e[L],(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 yrt(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function brt(){return this._root}function xrt(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function vrt(i){var e=[],r,n=this._root,a,o,c,h,u,d,f;for(n&&e.push(new _i(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 _i(a,g,x,y,u,d,f)),(a=n[6])&&e.push(new _i(a,o,x,y,g,d,f)),(a=n[5])&&e.push(new _i(a,g,c,y,u,x,f)),(a=n[4])&&e.push(new _i(a,o,c,y,g,x,f)),(a=n[3])&&e.push(new _i(a,g,x,h,u,d,y)),(a=n[2])&&e.push(new _i(a,o,x,h,g,d,y)),(a=n[1])&&e.push(new _i(a,g,c,h,u,x,y)),(a=n[0])&&e.push(new _i(a,o,c,h,g,x,y))}return this}function Crt(i){var e=[],r=[],n;for(this._root&&e.push(new _i(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 _i(o,c,h,u,x,y,v)),(o=a[1])&&e.push(new _i(o,x,h,u,d,y,v)),(o=a[2])&&e.push(new _i(o,c,y,u,x,f,v)),(o=a[3])&&e.push(new _i(o,x,y,u,d,f,v)),(o=a[4])&&e.push(new _i(o,c,h,v,x,y,g)),(o=a[5])&&e.push(new _i(o,x,h,v,d,y,g)),(o=a[6])&&e.push(new _i(o,c,y,v,x,f,g)),(o=a[7])&&e.push(new _i(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 _rt(i){return i[0]}function krt(i){return arguments.length?(this._x=i,this):this._x}function wrt(i){return i[1]}function Srt(i){return arguments.length?(this._y=i,this):this._y}function Trt(i){return i[2]}function Ert(i){return arguments.length?(this._z=i,this):this._z}function qC(i,e,r,n){var a=new UC(e??_rt,r??wrt,n??Trt,NaN,NaN,NaN,NaN,NaN,NaN);return i==null?a:a.addAll(i)}function UC(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 KN(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Rr=qC.prototype=UC.prototype;Rr.copy=function(){var i=new UC(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=KN(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]=KN(n));return i};Rr.add=lrt;Rr.addAll=crt;Rr.cover=hrt;Rr.data=urt;Rr.extent=drt;Rr.find=frt;Rr.findAllWithinRadius=grt;Rr.remove=mrt;Rr.removeAll=yrt;Rr.root=brt;Rr.size=xrt;Rr.visit=vrt;Rr.visitAfter=Crt;Rr.x=krt;Rr.y=Srt;Rr.z=Ert;function br(i){return function(){return i}}function na(i){return(i()-.5)*1e-6}function sx(i){return i.x+i.vx}function VN(i){return i.y+i.vy}function Nrt(i){return i.z+i.vz}function Art(i){var e,r,n,a,o=1,c=1;typeof i!="function"&&(i=br(i==null?1:+i));function h(){for(var f,g=e.length,x,y,v,C,_,k,T,E=0;E<c;++E)for(x=(r===1?zC(e,sx):r===2?U1(e,sx,VN):r===3?qC(e,sx,VN,Nrt):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(N);function N(L,O,A,M,z,D,$){var U=[O,A,M,z,D,$],Y=U[0],I=U[1],W=U[2],j=U[r],q=U[r+1],G=U[r+2],it=L.data,nt=L.r,H=k+nt;if(it){if(it.index>y.index){var rt=v-it.x-it.vx,ft=r>1?C-it.y-it.vy:0,Q=r>2?_-it.z-it.vz:0,yt=rt*rt+ft*ft+Q*Q;yt<H*H&&(rt===0&&(rt=na(a),yt+=rt*rt),r>1&&ft===0&&(ft=na(a),yt+=ft*ft),r>2&&Q===0&&(Q=na(a),yt+=Q*Q),yt=(H-(yt=Math.sqrt(yt)))/yt*o,y.vx+=(rt*=yt)*(H=(nt*=nt)/(T+nt)),r>1&&(y.vy+=(ft*=yt)*H),r>2&&(y.vz+=(Q*=yt)*H),it.vx-=rt*(H=1-H),r>1&&(it.vy-=ft*H),r>2&&(it.vz-=Q*H))}return}return Y>v+H||j<v-H||r>1&&(I>C+H||q<C-H)||r>2&&(W>_+H||G<_-H)}}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:br(+f),d(),h):i},h}function Mrt(i){return i.index}function XN(i,e){var r=i.get(e);if(!r)throw new Error("node not found: "+e);return r}function Brt(i){var e=Mrt,r=x,n,a=br(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,E=i.length;T<g;++T)for(var N=0,L,O,A,M=0,z=0,D=0,$,U;N<E;++N)L=i[N],O=L.source,A=L.target,M=A.x+A.vx-O.x-O.vx||na(f),h>1&&(z=A.y+A.vy-O.y-O.vy||na(f)),h>2&&(D=A.z+A.vz-O.z-O.vz||na(f)),$=Math.sqrt(M*M+z*z+D*D),$=($-o[N])/$*k*n[N],M*=$,z*=$,D*=$,A.vx-=M*(U=d[N]),h>1&&(A.vy-=z*U),h>2&&(A.vz-=D*U),O.vx+=M*(U=1-U),h>1&&(O.vy+=z*U),h>2&&(O.vz+=D*U)}function v(){if(c){var k,T=c.length,E=i.length,N=new Map(c.map((O,A)=>[e(O,A,c),O])),L;for(k=0,u=new Array(T);k<E;++k)L=i[k],L.index=k,typeof L.source!="object"&&(L.source=XN(N,L.source)),typeof L.target!="object"&&(L.target=XN(N,L.target)),u[L.source.index]=(u[L.source.index]||0)+1,u[L.target.index]=(u[L.target.index]||0)+1;for(k=0,d=new Array(E);k<E;++k)L=i[k],d[k]=u[L.source.index]/(u[L.source.index]+u[L.target.index]);n=new Array(E),C(),o=new Array(E),_()}}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(E=>typeof E=="function")||Math.random,h=T.find(E=>[1,2,3].includes(E))||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:br(+k),C(),y):r},y.distance=function(k){return arguments.length?(a=typeof k=="function"?k:br(+k),_(),y):a},y}const Lrt=1664525,Ort=1013904223,ZN=4294967296;function Rrt(){let i=1;return()=>(i=(Lrt*i+Ort)%ZN)/ZN}var QN=3;function ox(i){return i.x}function JN(i){return i.y}function Drt(i){return i.z}var jrt=10,Frt=Math.PI*(3-Math.sqrt(5)),Irt=Math.PI*20/(9+Math.sqrt(221));function $rt(i,e){e=e||2;var r=Math.min(QN,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=zd("tick","end"),x=Rrt();i==null&&(i=[]);function y(){v(),g.call("tick",n),a<o&&(f.stop(),g.call("end",n))}function v(k){var T,E=i.length,N;k===void 0&&(k=1);for(var L=0;L<k;++L)for(a+=(h-a)*c,d.forEach(function(O){O(a)}),T=0;T<E;++T)N=i[T],N.fx==null?N.x+=N.vx*=u:(N.x=N.fx,N.vx=0),r>1&&(N.fy==null?N.y+=N.vy*=u:(N.y=N.fy,N.vy=0)),r>2&&(N.fz==null?N.z+=N.vz*=u:(N.z=N.fz,N.vz=0));return n}function C(){for(var k=0,T=i.length,E;k<T;++k){if(E=i[k],E.index=k,E.fx!=null&&(E.x=E.fx),E.fy!=null&&(E.y=E.fy),E.fz!=null&&(E.z=E.fz),isNaN(E.x)||r>1&&isNaN(E.y)||r>2&&isNaN(E.z)){var N=jrt*(r>2?Math.cbrt(.5+k):r>1?Math.sqrt(.5+k):k),L=k*Frt,O=k*Irt;r===1?E.x=N:r===2?(E.x=N*Math.cos(L),E.y=N*Math.sin(L)):(E.x=N*Math.sin(L)*Math.cos(O),E.y=N*Math.cos(L),E.z=N*Math.sin(L)*Math.sin(O))}(isNaN(E.vx)||r>1&&isNaN(E.vy)||r>2&&isNaN(E.vz))&&(E.vx=0,r>1&&(E.vy=0),r>2&&(E.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(QN,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,E=(r>1?k.shift():null)||0,N=(r>2?k.shift():null)||0,L=k.shift()||1/0,O=0,A=i.length,M,z,D,$,U,Y;for(L*=L,O=0;O<A;++O)U=i[O],M=T-U.x,z=E-(U.y||0),D=N-(U.z||0),$=M*M+z*z+D*D,$<L&&(Y=U,L=$);return Y},on:function(k,T){return arguments.length>1?(g.on(k,T),n):g.on(k)}}}function zrt(){var i,e,r,n,a,o=br(-30),c,h=1,u=1/0,d=.81;function f(v){var C,_=i.length,k=(e===1?zC(i,ox):e===2?U1(i,ox,JN):e===3?qC(i,ox,JN,Drt):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,E,N,L,O,A=v.length;if(A){for(E=N=L=O=0;O<A;++O)(_=v[O])&&(k=Math.abs(_.value))&&(C+=_.value,T+=k,E+=k*(_.x||0),N+=k*(_.y||0),L+=k*(_.z||0));C*=Math.sqrt(4/A),v.x=E/T,e>1&&(v.y=N/T),e>2&&(v.z=L/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 E=[_,k,T][e-1],N=v.x-r.x,L=e>1?v.y-r.y:0,O=e>2?v.z-r.z:0,A=E-C,M=N*N+L*L+O*O;if(A*A/d<M)return M<u&&(N===0&&(N=na(n),M+=N*N),e>1&&L===0&&(L=na(n),M+=L*L),e>2&&O===0&&(O=na(n),M+=O*O),M<h&&(M=Math.sqrt(h*M)),r.vx+=N*v.value*a/M,e>1&&(r.vy+=L*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)&&(N===0&&(N=na(n),M+=N*N),e>1&&L===0&&(L=na(n),M+=L*L),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+=N*A,e>1&&(r.vy+=L*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:br(+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 Prt(i,e,r,n){var a,o,c=br(.1),h,u;typeof i!="function"&&(i=br(+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),E=(u[x]-T)*h[x]*g/T;v.vx+=C*E,o>1&&(v.vy+=_*E),o>2&&(v.vz+=k*E)}}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:br(+g),f(),d):c},d.radius=function(g){return arguments.length?(i=typeof g=="function"?g:br(+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 qrt(i){var e=br(.1),r,n,a;typeof i!="function"&&(i=br(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:br(+h),c(),o):e},o.x=function(h){return arguments.length?(i=typeof h=="function"?h:br(+h),c(),o):i},o}function Urt(i){var e=br(.1),r,n,a;typeof i!="function"&&(i=br(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:br(+h),c(),o):e},o.y=function(h){return arguments.length?(i=typeof h=="function"?h:br(+h),c(),o):i},o}const{abs:Ru,cos:vs,sin:Mc,acos:Hrt,atan2:Du,sqrt:po,pow:ea}=Math;function ju(i){return i<0?-ea(-i,1/3):ea(i,1/3)}const zD=Math.PI,Bp=2*zD,go=zD/2,Wrt=1e-6,lx=Number.MAX_SAFE_INTEGER||9007199254740991,cx=Number.MIN_SAFE_INTEGER||-9007199254740991,Grt={x:0,y:0,z:0},Ot={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],Grt],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||Ot.approximately(i,e)||Ot.approximately(i,r)},approximately:function(i,e,r){return Ru(i-e)<=(r||Wrt)},length:function(i){const r=Ot.Tvalues.length;let n=0;for(let a=0,o;a<r;a++)o=.5*Ot.Tvalues[a]+.5,n+=Ot.Cvalues[a]*Ot.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(Ot.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 Du(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=Ot.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 Ru(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 Ot.lli8(a,o,c,h,u,d,f,g)},lli:function(i,e){return Ot.lli4(i,i.c,e,e.c)},makeline:function(i,e){return new Ti(i.x,i.y,(i.x+e.x)/2,(i.y+e.y)/2,e.x,e.y)},findbbox:function(i){let e=lx,r=lx,n=cx,a=cx;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(!Ot.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=Ot.makeline(e.points[n-1],i.points[0]),c=Ot.makeline(i.points[a-1],e.points[0]),h={startcap:o,forward:i,back:e,endcap:c,bbox:Ot.findbbox([o,i,e,c])};return h.intersections=function(u){return Ot.shapeintersections(h,h.bbox,u,u.bbox,r)},h},getminmax:function(i,e,r){if(!r)return{min:0,max:0};let n=lx,a=cx,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=-Du(e.p2.y-n,e.p2.x-r),o=function(c){return{x:(c.x-r)*vs(a)-(c.y-n)*Mc(a),y:(c.x-r)*Mc(a)+(c.y-n)*vs(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=Ot.align(i,e),a=function(A){return 0<=A&&A<=1};if(r===2){const A=n[0].y,M=n[1].y,z=n[2].y,D=A-2*M+z;if(D!==0){const $=-po(M*M-A*z),U=-A+M,Y=-($+U)/D,I=-(-$+U)/D;return[Y,I].filter(a)}else if(M!==z&&D===0)return[(2*M-z)/(2*M-2*z)].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(Ot.approximately(d,0)){if(Ot.approximately(f,0))return Ot.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,E,N,L,O;if(k<0){const A=-y/3,M=A*A*A,z=po(M),D=-C/(2*z),$=D<-1?-1:D>1?1:D,U=Hrt($),Y=ju(z),I=2*Y;return N=I*vs(U/3)-f/3,L=I*vs((U+Bp)/3)-f/3,O=I*vs((U+2*Bp)/3)-f/3,[N,L,O].filter(a)}else{if(k===0)return T=_<0?ju(-_):-ju(_),N=2*T-f/3,L=-T-f/3,[N,L].filter(a);{const A=po(k);return T=ju(-_+A),E=ju(_+A),[T-E-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=Ot.compute(i,e),x=Ot.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=Ot.curvature(i-.001,e,r,n,!0).k,C=Ot.curvature(i+.001,e,r,n,!0).k;u=(C-d+(d-v))/2,h=(Ru(C-d)+Ru(d-v))/2}return{k:d,r:f,dk:u,adk:h}},inflections:function(i){if(i.length<4)return[];const e=Ot.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(Ot.approximately(c,0)){if(!Ot.approximately(h,0)){let x=-u/h;if(0<=x&&x<=1)return[x]}return[]}const d=2*c;if(Ot.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,Ru(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 Ot.bboxoverlap(g.left.bbox(),g.right.bbox())});let f=[];return d.length===0||(d.forEach(function(g){f=f.concat(Ot.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*vs(go)-a*Mc(go),u=n*Mc(go)+a*vs(go),d=o*vs(go)-c*Mc(go),f=o*Mc(go)+c*vs(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,E=Ot.lli8(g,x,C,_,y,v,k,T),N=Ot.dist(E,i);let L=Du(i.y-E.y,i.x-E.x),O=Du(e.y-E.y,e.x-E.x),A=Du(r.y-E.y,r.x-E.x),M;return L<A?((L>O||O>A)&&(L+=Bp),L>A&&(M=A,A=L,L=M)):A<O&&O<L?(M=A,A=L,L=M):A+=Bp,E.s=L,E.e=A,E.r=N,E},numberSort:function(i,e){return i-e}};class ud{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 Ot.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++)Ot.expandbox(r,e[n].bbox());return r}offset(e){const r=[];return this.curves.forEach(function(n){r.push(...n.offset(e))}),new ud(r)}}const{abs:Fu,min:tA,max:eA,cos:Yrt,sin:Krt,acos:Vrt,sqrt:Iu}=Math,Xrt=Math.PI;class Ti{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=Ot.align(h,{p1:h[0],p2:h[d]}),x=Ot.dist(h[0],h[d]);this._linear=g.reduce((y,v)=>y+Fu(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 Ti(r,r,n);if(a===1)return new Ti(e,r,r);const o=Ti.getABC(2,e,r,n,a);return new Ti(e,o.A,n)}static cubicFromPoints(e,r,n,a,o){typeof a>"u"&&(a=.5);const c=Ti.getABC(3,e,r,n,a);typeof o>"u"&&(o=Ot.dist(r,c.C));const h=o*(1-a)/a,u=Ot.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)},E={x:k.x+(_.x-k.x)/a,y:k.y+(_.y-k.y)/a},N={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},L={x:n.x+(E.x-n.x)/(1-a),y:n.y+(E.y-n.y)/(1-a)};return new Ti(e,N,L,n)}static getUtils(){return Ot}getUtils(){return Ti.getUtils()}static get PolyBezier(){return ud}valueOf(){return this.toString()}toString(){return Ot.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=Ot.derive(this.points,this._3d),this.computedirection()}computedirection(){const e=this.points,r=Ot.angle(e[0],e[this.order],e[1]);this.clockwise=r>0}length(){return Ot.length(this.derivative.bind(this))}static getABC(e=2,r,n,a,o=.5){const c=Ot.projectionratio(o,e),h=1-c,u={x:c*r.x+h*a.x,y:c*r.y+h*a.y},d=Ot.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 Ti.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],Ot.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=Ot.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=Ot.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?Ot.computeWithRatios(e,this.points,this.ratios,this._3d):Ot.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 Ti(r)}derivative(e){return Ot.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Ot.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new Ti(Ot.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return Ot.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Ot.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){const r=this.derivative(e),n=Iu(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=Iu(r.x*r.x+r.y*r.y+r.z*r.z),o=Iu(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=Iu(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=Ot.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 Ti([n[0],n[3],n[5]]):new Ti([n[0],n[4],n[7],n[9]]),right:this.order===2?new Ti([n[5],n[4],n[2]]):new Ti([n[9],n[8],n[6],n[3]]),span:n};return a.left._t1=Ot.map(0,0,1,this._t1,this._t2),a.left._t2=Ot.map(e,0,1,this._t1,this._t2),a.right._t1=Ot.map(e,0,1,this._t1,this._t2),a.right._t2=Ot.map(1,0,1,this._t1,this._t2),r?(r=Ot.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]=Ot.droots(o),this.order===3&&(o=this.dpoints[1].map(a),e[n]=e[n].concat(Ot.droots(o))),e[n]=e[n].filter(function(c){return c>=0&&c<=1}),r=r.concat(e[n].sort(Ot.numberSort))}).bind(this)),e.values=r.sort(Ot.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]=Ot.getminmax(this,n,e[n])}).bind(this)),r}overlaps(e){const r=this.bbox(),n=e.bbox();return Ot.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 Ti(a)]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(this.order===3){const a=Ot.angle(this.points[0],this.points[3],this.points[1]),o=Ot.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),Fu(Vrt(n))<Xrt/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,Fu(r-n)<a)return[];o=d.split(r,n),o._t1=Ot.map(r,0,1,d._t1,d._t2),o._t2=Ot.map(n,0,1,d._t1,d._t2),h.push(o),r=n;break}r<1&&(o=d.split(r,1),o._t1=Ot.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 Ti(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=Ot.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]=Ot.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=Iu(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 Ti(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]=Ot.lli4(x,v,f,o[g+1])}),new Ti(d))}outline(e,r,n,a){if(r=r===void 0?e:r,this._linear){const L=this.normal(0),O=this.points[0],A=this.points[this.points.length-1];let M,z,D;n===void 0&&(n=e,a=r),M={x:O.x+L.x*e,y:O.y+L.y*e},D={x:A.x+L.x*n,y:A.y+L.y*n},z={x:(M.x+D.x)/2,y:(M.y+D.y)/2};const $=[M,z,D];M={x:O.x-L.x*r,y:O.y-L.y*r},D={x:A.x-L.x*a,y:A.y-L.y*a},z={x:(M.x+D.x)/2,y:(M.y+D.y)/2};const U=[D,z,M],Y=Ot.makeline(U[2],$[0]),I=Ot.makeline($[2],U[0]),W=[Y,new Ti($),I,new Ti(U)];return new ud(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(L,O,A,M,z){return function(D){const $=M/A,U=(M+z)/A,Y=O-L;return Ot.map(D,0,1,L+$*Y,L+U*Y)}}o.forEach(function(L){const O=L.length();x?(h.push(L.scale(y(e,n,g,f,O))),u.push(L.scale(y(-r,-a,g,f,O)))):(h.push(L.scale(e)),u.push(L.scale(-r))),f+=O}),u=u.map(function(L){return d=L.points,d[3]?L.points=[d[3],d[2],d[1],d[0]]:L.points=[d[2],d[1],d[0]],L}).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=Ot.makeline(_,v),E=Ot.makeline(C,k),N=[T].concat(h).concat([E]).concat(u);return new ud(N)}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=Ot.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 Ti&&(e=e.reduce()),this.curveintersects(this.reduce(),e,r)):this.selfintersects(r)}lineIntersects(e){const r=tA(e.p1.x,e.p2.x),n=tA(e.p1.y,e.p2.y),a=eA(e.p1.x,e.p2.x),o=eA(e.p1.y,e.p2.y);return Ot.roots(this.points,e).filter(c=>{var h=this.get(c);return Ot.between(h.x,r,a)&&Ot.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=Ot.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=Ot.dist(e,r),d=Ot.dist(e,c),f=Ot.dist(e,h);return Fu(d-u)+Fu(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=Ot.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*Yrt(d.e),y:d.y+d.r*Krt(d.e)};d.e+=Ot.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 n1(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 Zrt(i){if(Array.isArray(i))return i}function Qrt(i){if(Array.isArray(i))return n1(i)}function Jrt(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function tnt(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 ent(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
451
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function int(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
452
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rnt(i,e){if(i==null)return{};var r,n,a=nnt(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 nnt(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 ant(i,e){return Zrt(i)||tnt(i,e)||PD(i,e)||ent()}function snt(i){return Qrt(i)||Jrt(i)||PD(i)||int()}function ont(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 lnt(i){var e=ont(i,"string");return typeof e=="symbol"?e:e+""}function PD(i,e){if(i){if(typeof i=="string")return n1(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)?n1(i,e):void 0}}var cnt=(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=rnt(_,[y].map(lnt));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=ant(f,2),x=g[0],y=g[1];return h(y,[].concat(snt(d),[x]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function hnt(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 unt=`.force-graph-container canvas {
|
|
453
|
+
display: block;
|
|
454
|
+
user-select: none;
|
|
455
|
+
outline: none;
|
|
456
|
+
-webkit-tap-highlight-color: transparent;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.force-graph-container .clickable {
|
|
460
|
+
cursor: pointer;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.force-graph-container .grabbable {
|
|
464
|
+
cursor: move;
|
|
465
|
+
cursor: grab;
|
|
466
|
+
cursor: -moz-grab;
|
|
467
|
+
cursor: -webkit-grab;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.force-graph-container .grabbable:active {
|
|
471
|
+
cursor: grabbing;
|
|
472
|
+
cursor: -moz-grabbing;
|
|
473
|
+
cursor: -webkit-grabbing;
|
|
474
|
+
}
|
|
475
|
+
`;hnt(unt);function a1(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 dnt(i){if(Array.isArray(i))return i}function fnt(i){if(Array.isArray(i))return a1(i)}function iA(i,e,r){if(qD())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 Ad(i,e,r){return(e=xnt(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function qD(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qD=function(){return!!i})()}function pnt(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function gnt(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 mnt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
476
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ynt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
477
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rA(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 Bc(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rA(Object(r),!0).forEach(function(n){Ad(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):rA(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function dd(i,e){return dnt(i)||gnt(i,e)||UD(i,e)||mnt()}function aa(i){return fnt(i)||pnt(i)||UD(i)||ynt()}function bnt(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 xnt(i){var e=bnt(i,"string");return typeof e=="symbol"?e:e+""}function s1(i){"@babel/helpers - typeof";return s1=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},s1(i)}function UD(i,e){if(i){if(typeof i=="string")return a1(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)?a1(i,e):void 0}}var vnt=vB(a9);function nA(i,e,r){!e||typeof r!="string"||i.filter(function(n){return!n[r]}).forEach(function(n){n[r]=vnt(e(n))})}function Cnt(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,_=N(v),k=N(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[_],E=d[k];T.out.push(E);function N(L){return s1(L)==="object"?e(L):L}});var f=[];x(Object.values(d));var g=Object.assign.apply(Object,[{}].concat(aa(Object.entries(d).filter(function(y){var v=dd(y,2),C=v[1];return!C.skip}).map(function(y){var v=dd(y,2),C=v[0],_=v[1];return Ad({},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 N=y[k];if(v.indexOf(N)!==-1){var L=[].concat(aa(v.slice(v.indexOf(N))),[N]).map(function(O){return e(O.data)});return f.some(function(O){return O.length===L.length&&O.every(function(A,M){return A===L[M]})})||(f.push(L),u(L)),1}C>N.depth&&(N.depth=C,x(N.out,[].concat(aa(v),[N]),C+(N.skip?0:1)))},k=0,T=y.length;k<T;k++)_()}}var _nt=2,Ir=function(e,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},aA=function(e,r){if(!r.isShadow){var n=ai(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})}},Kg=DC({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,r){r.engineRunning=!1,aA(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:Ir},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Ir},nodeColor:{default:"color",triggerUpdate:!1,onChange:Ir},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Ir},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ir},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Ir},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Ir},linkColor:{default:"color",triggerUpdate:!1,onChange:Ir},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Ir},linkWidth:{default:1,triggerUpdate:!1,onChange:Ir},linkCurvature:{default:0,triggerUpdate:!1,onChange:Ir},linkCanvasObject:{triggerUpdate:!1,onChange:Ir},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ir},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Ir},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Ir},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Ir},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:aA},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=ai(e.nodeVisibility),u=ai(e.nodeVal),d=ai(e.nodeColor),f=ai(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=ai(e.linkVisibility),u=ai(e.linkColor),d=ai(e.linkWidth),f=ai(e.linkLineDash),g=ai(e.linkCurvature),x=ai(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 E=[],N=[];C.forEach(function(A){return({before:_,after:k,replace:E}[x(A)]||N).push(A)}),T=[].concat(aa(_),k,N),_=_.concat(E)}y.save(),_.forEach(function(A){return e.linkCanvasObject(A,y,e.globalScale)}),y.restore();var L=cnt(T,[u,d,f]);y.save(),Object.entries(L).forEach(function(A){var M=dd(A,2),z=M[0],D=M[1],$=!z||z==="undefined"?"rgba(0,0,0,0.15)":z;Object.entries(D).forEach(function(U){var Y=dd(U,2),I=Y[0],W=Y[1],j=(I||1)/e.globalScale+v;Object.entries(W).forEach(function(q){var G=dd(q,2);G[0];var it=G[1],nt=f(it[0]);y.beginPath(),it.forEach(function(H){var rt=H.source,ft=H.target;if(!(!rt||!ft||!rt.hasOwnProperty("x")||!ft.hasOwnProperty("x"))){y.moveTo(rt.x,rt.y);var Q=H.__controlPoints;Q?y[Q.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,aa(Q).concat([ft.x,ft.y])):y.lineTo(ft.x,ft.y)}}),y.strokeStyle=$,y.lineWidth=j,y.setLineDash(nt||[]),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 z=A.source,D=A.target;if(!(!z||!D||!z.hasOwnProperty("x")||!D.hasOwnProperty("x"))){var $=Math.sqrt(Math.pow(D.x-z.x,2)+Math.pow(D.y-z.y,2));if($>0){var U=Math.atan2(D.y-z.y,D.x-z.x),Y=$*M,I={x:(z.x+D.x)/2+Y*Math.cos(U-Math.PI/2),y:(z.y+D.y)/2+Y*Math.sin(U-Math.PI/2)};A.__controlPoints=[I.x,I.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=ai(e.linkDirectionalArrowLength),f=ai(e.linkDirectionalArrowRelPos),g=ai(e.linkVisibility),x=ai(e.linkDirectionalArrowColor||e.linkColor),y=ai(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 E=Math.sqrt(Math.max(0,y(k)||1))*e.nodeRelSize,N=Math.sqrt(Math.max(0,y(T)||1))*e.nodeRelSize,L=Math.min(1,Math.max(0,f(C))),O=x(C)||"rgba(0,0,0,0.28)",A=_/h/2,M=C.__controlPoints&&iA(Ti,[k.x,k.y].concat(aa(C.__controlPoints),[T.x,T.y])),z=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)),$=E+_+(D-E-N-_)*L,U=z($/D),Y=z(($-_)/D),I=z(($-_*(1-u))/D),W=Math.atan2(U.y-Y.y,U.x-Y.x)-Math.PI/2;v.beginPath(),v.moveTo(U.x,U.y),v.lineTo(Y.x+A*Math.cos(W),Y.y+A*Math.sin(W)),v.lineTo(I.x,I.y),v.lineTo(Y.x-A*Math.cos(W),Y.y-A*Math.sin(W)),v.fillStyle=O,v.fill()}}}),v.restore()}function c(){var h=ai(e.linkDirectionalParticles),u=ai(e.linkDirectionalParticleSpeed),d=ai(e.linkDirectionalParticleOffset),f=ai(e.linkDirectionalParticleWidth),g=ai(e.linkVisibility),x=ai(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),E=Math.abs(d(v)),N=v.__photons||[],L=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?iA(Ti,[_.x,_.y].concat(aa(v.__controlPoints),[k.x,k.y])):null,M=0,z=!1;N.forEach(function(D){var $=!!D.__singleHop;if(D.hasOwnProperty("__progressRatio")||(D.__progressRatio=$?T<0?1:0:(M+E)/C),!$&&M++,D.__progressRatio+=T,D.__progressRatio>=1||D.__progressRatio<0)if(!$)D.__progressRatio=D.__progressRatio%1,D.__progressRatio<0&&D.__progressRatio++;else{z=!0;return}var U=D.__progressRatio,Y=A?A.get(U):{x:_.x+(k.x-_.x)*U||0,y:_.y+(k.y-_.y)*U||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(Y.x,Y.y,v,y,e.globalScale):(y.beginPath(),y.arc(Y.x,Y.y,L,0,2*Math.PI,!1),y.fill())}),z&&(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:$rt().force("link",Brt()).force("charge",zrt()).force("center",Yit()).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&&nA(e.graphData.nodes,ai(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&nA(e.graphData.links,ai(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&&Cnt(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)*_nt*(["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?Prt(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 HD(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 knt=800,wnt=4,Snt=5,WD=HD("forceGraph",Kg),Tnt=HD(["forceGraph","shadowGraph"],Kg),Ent=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 Ad({},i,WD.linkProp(i))})).concat(aa(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(i){return Ad({},i,Tnt.linkProp(i))})))),Nnt=Object.assign.apply(Object,aa(["d3Force","d3ReheatSimulation","emitParticle"].map(function(i){return Ad({},i,WD.linkMethod(i))})));function hx(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 GD(i){var e=window.devicePixelRatio;i.setTransform(e,0,0,e,0,0)}function sA(i,e,r){i.save(),GD(i),i.clearRect(0,0,e,r),i.restore()}var Ant=DC({props:Bc({width:{default:window.innerWidth,onChange:function(e,r){return hx(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,r){return hx(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}},Ent),aliases:{stopAnimation:"pauseAnimation"},methods:Bc({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 MN(c()).to(o,a).easing(Nl.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 MN({k:a()}).to({k:r},n).easing(Nl.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=ai(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:[T2(o,function(c){return c.x-c.r}),S2(o,function(c){return c.x+c.r})],y:[T2(o,function(c){return c.y-c.r}),S2(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:[]})}},Nnt),stateInit:function(){return{lastSetZoom:1,zoom:S9(),forceGraph:new Kg,shadowGraph:new Kg().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new wit,tweenGroup:new vD}},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};ce(r.canvas).call(eP().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&&Snt>=Math.sqrt(fz(["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=ce(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||ai(r.enableZoomInteraction)(f))&&(f.type==="wheel"||ai(r.enablePanInteraction)(f))}).on("zoom",function(f){var g=f.transform;[o,c].forEach(function(x){GD(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Bc(Bc({},g),n.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Bc(Bc({},f.transform),n.centerAt()))}),hx(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=wnt/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new Git(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=Bet(function(){sA(c,r.width,r.height),r.shadowGraph.linkWidth(function(g){return ai(r.linkWidth)(g)+r.linkHoverPrecision});var f=Fa(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},knt);r.flushShadowCanvas=d.flush,(this._animationCycle=function f(){var g=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(E){return E.__photons&&E.__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&&ai(r["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),r.canvas.classList[(x&&r["on".concat(C,"Click")]||!x&&r.onBackgroundClick)&&ai(r.showPointerCursor)(x==null?void 0:x.d)?"add":"remove"]("clickable"),r.hoverObj=x}g&&d()}if(g){sA(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){}}),ux={exports:{}},dx,oA;function Mnt(){if(oA)return dx;oA=1;var i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return dx=i,dx}var fx,lA;function Bnt(){if(lA)return fx;lA=1;var i=Mnt();function e(){}function r(){}return r.resetWarningCache=e,fx=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},fx}var cA;function Lnt(){return cA||(cA=1,ux.exports=Bnt()()),ux.exports}var Ont=Lnt();const lt=Dd(Ont),wm={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},YD={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},HC={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])},Rnt=Object.assign({},wm,YD,{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({},wm,YD,HC,{enableNavigationControls:lt.bool,controlType:lt.oneOf(["trackball","orbit","fly"]),rendererConfig:lt.object,extraRenderers:lt.arrayOf(lt.shape({render:lt.func.isRequired}))});Object.assign({},wm,HC,{nodeDesc:lt.oneOfType([lt.string,lt.func]),linkDesc:lt.oneOfType([lt.string,lt.func])});Object.assign({},wm,HC,{markerAttrs:lt.object,yOffset:lt.number,glScale:lt.number});const WC=get(Ant,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});WC.displayName="ForceGraph2D";WC.propTypes=Rnt;function Dnt(){return di({queryKey:["graph"],queryFn:()=>me.get("/graph"),staleTime:3e4})}const px="dreamcontext:";function jnt(i,e){const{projectId:r}=lM(),n=r?`${px}${r}:${i}`:`${px}${i}`,[a,o]=K.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(r){const u=`${px}${i}`,d=localStorage.getItem(u);if(d!==null)return localStorage.setItem(n,d),localStorage.removeItem(u),JSON.parse(d)}}catch{}return e}),c=K.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 hA={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 Fnt(i){return{centerStrength:.05+i.centerStrength*.45,repelStrength:-(30+i.repelStrength*240),linkStrength:.1+i.linkStrength*1.2,linkDistance:20+i.linkDistance*180}}function Int(){const[i,e]=jnt("brain:settings:v1",hA),r=K.useCallback((o,c)=>{e(h=>({...h,[o]:{...h[o],...c}}))},[e]),n=K.useCallback(o=>{e(c=>({...c,groups:o}))},[e]),a=K.useCallback(()=>{e(hA)},[e]);return{settings:i,patch:r,setGroups:n,reset:a}}function $nt(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 znt{constructor(e){ne(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?KD(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 KD(i){return i.type==="and"||i.type==="or"?{...i,children:i.children.map(KD)}:{...i,negated:!i.negated}}function uA(i){const e=i.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const r=$nt(e),n=new znt(r).parse();return{match:a=>o1(n,a),raw:e,isEmpty:!1}}function o1(i,e){switch(i.type){case"and":return i.children.every(r=>o1(r,e));case"or":return i.children.some(r=>o1(r,e));case"word":return Lp(dA(e,i.value),i.negated);case"phrase":return Lp(dA(e,i.value),i.negated);case"regex":return Lp(Pnt(e,i.value),i.negated);case"op":return Lp(qnt(e,i.op,i.arg),i.negated)}}function Lp(i,e){return e?!i:i}function VD(i){return[i.label,i.path,i.id,i.meta.description??"",...i.meta.tags??[]].join(" ").toLowerCase()}function dA(i,e){return VD(i).includes(e)}function Pnt(i,e){return e.test(VD(i))}function qnt(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 Op={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},gx=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function Unt({settings:i,patch:e,setGroups:r,reset:n,onClose:a}){const[o,c]=K.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(Rp,{label:Op.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($u,{label:"Tags",checked:i.filters.showTags,onChange:u=>e("filters",{showTags:u})}),m.jsx($u,{label:"Attachments",checked:i.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),m.jsx($u,{label:"Existing files only",checked:i.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),m.jsx($u,{label:"Orphans",checked:i.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),m.jsx(Rp,{label:Op.groups,open:o.groups,onToggle:()=>h("groups"),children:m.jsx(Wnt,{groups:i.groups,onChange:r})}),m.jsxs(Rp,{label:Op.display,open:o.display,onToggle:()=>h("display"),children:[m.jsx(Hnt,{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($u,{label:"Arrows",checked:i.display.arrows,onChange:u=>e("display",{arrows:u})}),m.jsx(ll,{label:"Text fade threshold",value:i.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),m.jsx(ll,{label:"Node size",value:i.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),m.jsx(ll,{label:"Link thickness",value:i.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),m.jsxs(Rp,{label:Op.forces,open:o.forces,onToggle:()=>h("forces"),children:[m.jsx(ll,{label:"Center force",value:i.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),m.jsx(ll,{label:"Repel force",value:i.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),m.jsx(ll,{label:"Link force",value:i.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),m.jsx(ll,{label:"Link distance",value:i.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Rp({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 $u({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 Hnt({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 ll({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 Wnt({groups:i,onChange:e}){const[r,n]=K.useState(""),[a,o]=K.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:gx[i.length%gx.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:gx.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 Gnt(i){return di({queryKey:["graph","content",(i==null?void 0:i.path)??null],queryFn:()=>{if(!i||!i.path)throw new Error("No path for node");return me.get(`/graph/content?path=${encodeURIComponent(i.path)}`)},enabled:!!(i&&i.path),staleTime:3e4})}const fA={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Ynt={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},Knt={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function Vnt(i){return i==="task"?"tasks":i==="feature"?"features":i==="knowledge"?"knowledge":i==="soul"||i==="user"||i==="memory"||i==="core"?"core":null}function Xnt({node:i,onClose:e,onSelectRelated:r,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(i!=null&&i.path),u=Gnt(h?i:null);if(!i)return m.jsx("aside",{className:"brain-drawer"});const d=Vnt(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:fA[i.group]}}),Ynt[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(Vd,{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:fA[g.group]}}),m.jsx("span",{children:g.label}),m.jsx("span",{className:"brain-related-kind",children:Knt[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 Znt=K.lazy(()=>De(()=>import("./BrainCanvas3D-BZyWrW3J.js"),__vite__mapDeps([52,51])).then(i=>({default:i.BrainCanvas3D}))),Qnt={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Jnt={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function pA(i){return typeof i=="string"?i:i.id}function XD(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 gA(i,e){return Math.sqrt(XD(i)*e)*3}function tat(i,e,r){for(const{group:n,parsed:a}of e)if(a.match(i))return n.color;return r[i.group]}function eat({onNavigate:i}){const{data:e,isLoading:r,error:n}=Dnt(),a=kr(),{settings:o,patch:c,setGroups:h,reset:u}=Int(),{resolved:d}=jd(),f=d==="dark",g=f?Qnt:Jnt,x=K.useRef(null),y=K.useRef(void 0),[v,C]=K.useState({w:0,h:0}),[_,k]=K.useState(null),[T,E]=K.useState(null),[N,L]=K.useState(!0),O=K.useRef(!1);K.useEffect(()=>{if(!x.current)return;const Z=x.current,st=()=>C({w:Z.clientWidth,h:Z.clientHeight});st();const ct=new ResizeObserver(st);return ct.observe(Z),()=>ct.disconnect()},[]);const A=K.useMemo(()=>uA(o.filters.search),[o.filters.search]),M=K.useMemo(()=>o.groups.map(Z=>({group:Z,parsed:uA(Z.query)})).filter(({parsed:Z})=>!Z.isEmpty),[o.groups]),{filteredData:z,neighborsById:D,totalDegreeById:$,inDegreeById:U}=K.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const Z=new Map,st=new Map;for(const Rt of e.nodes)Z.set(Rt.id,0),st.set(Rt.id,0);for(const Rt of e.links){const Yt=typeof Rt.source=="string"?Rt.source:Rt.source.id,_e=typeof Rt.target=="string"?Rt.target:Rt.target.id;Z.set(_e,(Z.get(_e)??0)+1),st.set(Yt,(st.get(Yt)??0)+1),st.set(_e,(st.get(_e)??0)+1)}const ct=Rt=>(st.get(Rt)??0)===0,vt=[],At=new Set;for(const Rt of e.nodes){if(!o.filters.showTags&&Rt.group==="tag"||!o.filters.showOrphans&&ct(Rt.id)||!A.isEmpty&&!A.match(Rt))continue;const Yt={...Rt};Yt.__inDegree=Z.get(Rt.id)??0,Yt.__totalDegree=st.get(Rt.id)??0,Yt.__color=tat(Rt,M,g),vt.push(Yt),At.add(Rt.id)}const Ft=[],zt=new Map;for(const Rt of vt)zt.set(Rt.id,new Set);for(const Rt of e.links){const Yt=typeof Rt.source=="string"?Rt.source:Rt.source.id,_e=typeof Rt.target=="string"?Rt.target:Rt.target.id;!At.has(Yt)||!At.has(_e)||(Ft.push({source:Yt,target:_e,kind:Rt.kind}),zt.get(Yt).add(_e),zt.get(_e).add(Yt))}return{filteredData:{nodes:vt,links:Ft},neighborsById:zt,totalDegreeById:st,inDegreeById:Z}},[e,o.filters,A,M]),Y=K.useMemo(()=>Fnt(o.forces),[o.forces]),I=.4+o.display.nodeSize*2.2;K.useEffect(()=>{var At,Ft,zt,Rt,Yt,_e,ti,ki,Be;const Z=y.current;if(!Z)return;const st=(At=Z.d3Force)==null?void 0:At.call(Z,"charge");st!=null&&st.strength&&st.strength(Y.repelStrength),st!=null&&st.distanceMax&&st.distanceMax(420);const ct=(Ft=Z.d3Force)==null?void 0:Ft.call(Z,"link");ct&&((zt=ct.strength)==null||zt.call(ct,Y.linkStrength),(Rt=ct.distance)==null||Rt.call(ct,Y.linkDistance));const vt=(Yt=Z.d3Force)==null?void 0:Yt.call(Z,"center");vt!=null&&vt.strength&&vt.strength(Y.centerStrength),(_e=Z.d3Force)==null||_e.call(Z,"collide",Art().radius(yi=>gA(yi,I)+4).strength(.9).iterations(2)),(ti=Z.d3Force)==null||ti.call(Z,"x",qrt(0).strength(Y.centerStrength*.4)),(ki=Z.d3Force)==null||ki.call(Z,"y",Urt(0).strength(Y.centerStrength*.4)),(Be=Z.d3ReheatSimulation)==null||Be.call(Z)},[Y,I,z]),K.useEffect(()=>{O.current=!1},[e==null?void 0:e.nodes.length]),K.useEffect(()=>{if(!e||!z.nodes.length)return;const Z=[];return[800,1600,2600].forEach(st=>{Z.push(setTimeout(()=>{var vt;if(O.current)return;const ct=y.current;ct&&((vt=ct.zoomToFit)==null||vt.call(ct,500,80),st>=2600&&(O.current=!0))},st))}),()=>Z.forEach(clearTimeout)},[e,z.nodes.length]);const W=K.useMemo(()=>z.nodes.find(Z=>Z.id===_)??null,[z,_]),j=K.useMemo(()=>{if(!W||!e)return[];const Z=[],st=new Map(e.nodes.map(ct=>[ct.id,ct]));for(const ct of e.links){const vt=typeof ct.source=="string"?ct.source:ct.source.id,At=typeof ct.target=="string"?ct.target:ct.target.id;if(vt===W.id){const Ft=st.get(At);Ft&&Z.push({node:Ft,kind:ct.kind})}else if(At===W.id){const Ft=st.get(vt);Ft&&Z.push({node:Ft,kind:ct.kind})}}return Z},[e,W]),q=Z=>{k(Z.id);const st=y.current;st&&typeof Z.x=="number"&&typeof Z.y=="number"&&(st.centerAt(Z.x,Z.y,400),st.zoom(Math.max(st.zoom(),2.2),400))},G=()=>a.invalidateQueries({queryKey:["graph"]});K.useEffect(()=>{const Z=st=>{var At;if((At=st.target)!=null&&At.matches("input,textarea"))return;const ct=y.current;if(!ct)return;const vt=ct.zoom();if(st.key==="+"||st.key==="=")ct.zoom(vt*1.2,200);else if(st.key==="-"||st.key==="_")ct.zoom(vt/1.2,200);else if(st.key.startsWith("Arrow")){const Ft=st.shiftKey?120:40,zt=ct.centerAt();let Rt=0,Yt=0;st.key==="ArrowUp"?Yt=-Ft:st.key==="ArrowDown"?Yt=Ft:st.key==="ArrowLeft"?Rt=-Ft:st.key==="ArrowRight"&&(Rt=Ft),ct.centerAt(((zt==null?void 0:zt.x)??0)+Rt/vt,((zt==null?void 0:zt.y)??0)+Yt/vt,150)}};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[]);const it=T??_,nt=it?D.get(it)??new Set:null,H=Z=>!it||Z===it?!1:!(nt!=null&&nt.has(Z)),rt=Z=>{const st=Z.__color??g[Z.group];return H(Z.id)?iat(st,f?.18:.3):st},ft=Z=>{const st=pA(Z.source),ct=pA(Z.target);return it?st===it||ct===it?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)"},Q=.5+o.display.linkThickness*2.5,yt=Z=>Z.kind==="sibling_core"||Z.kind==="release_includes"?Q*1.3:Q,ot=Z=>XD(Z)*I,X=(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:[z.nodes.length,"/",e.nodes.length," nodes · ",z.links.length," links"]}),m.jsxs("div",{className:"brain-header-actions",children:[m.jsx("button",{className:"brain-btn",onClick:G,title:"Refresh",children:"↻"}),m.jsx("button",{className:`brain-btn ${N?"brain-btn--active":""}`,onClick:()=>L(Z=>!Z),title:"Graph settings",children:"⚙"})]})]}),m.jsxs("div",{className:"brain-canvas-wrap",ref:x,onPointerLeave:()=>E(null),onPointerDown:()=>E(null),children:[N&&m.jsx(Unt,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>L(!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&&z.nodes.length===0&&!r&&m.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&z.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&m.jsx(WC,{ref:y,graphData:z,width:v.w,height:v.h,backgroundColor:f?"#151518":"#ffffff",nodeId:"id",nodeLabel:Z=>Z.label,nodeColor:Z=>rt(Z),nodeVal:Z=>ot(Z),nodeRelSize:3,linkColor:Z=>ft(Z),linkWidth:Z=>yt(Z),linkDirectionalArrowLength:Z=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>f?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:Z=>q(Z),onNodeHover:Z=>E(Z?Z.id:null),onNodeDrag:()=>E(null),onZoom:()=>E(null),onBackgroundClick:()=>{k(null),E(null)},onEngineStop:()=>{var st;if(O.current)return;const Z=y.current;Z&&((st=Z.zoomToFit)==null||st.call(Z,600,80),O.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(Z,st,ct)=>{if(!(Z.id===T||Z.id===_||it&&(nt==null?void 0:nt.has(Z.id)))&&ct<X)return;const At=Z.label,Ft=Math.max(10,13/Math.max(ct,.7));st.font=`${Ft}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,st.textAlign="center",st.textBaseline="top";const zt=gA(Z,I),Rt=(Z.y??0)+zt+3,Yt=H(Z.id);f?st.fillStyle=Yt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":st.fillStyle=Yt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",st.fillText(At,Z.x??0,Rt)}}),e&&z.nodes.length>0&&v.w>0&&o.display.view==="3d"&&m.jsx(K.Suspense,{fallback:m.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:m.jsx(Znt,{graphData:z,width:v.w,height:v.h,isDark:f,nodeColor:rt,nodeVal:ot,linkColor:ft,linkWidth:yt,showArrows:o.display.arrows,forces:Y,nodeSizeScale:I,isDimmed:H,neighborsById:D,onNodeClick:q,onNodeHover:Z=>E(Z?Z.id:null),onBackgroundClick:()=>{k(null),E(null)}})}),m.jsx(Xnt,{node:W,onClose:()=>k(null),onSelectRelated:Z=>k(Z),relatedNodes:j,inDegree:W?U.get(W.id)??0:0,totalDegree:W?$.get(W.id)??0:0,onNavigate:i})]})]})}function iat(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 rat(){return di({queryKey:["council"],queryFn:()=>me.get("/council"),select:i=>i.debates})}function nat(i){return di({queryKey:["council",i],queryFn:()=>me.get(`/council/${i}`),select:e=>e.debate,enabled:!!i})}function ZD(i){if(!i)return null;const e=i.split(`
|
|
478
|
+
`)[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 aat(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 QD(i,e){return i.rounds.find(r=>r.round===e)??null}function JD(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 sat(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 oat(i){return i.openQuestions?(i.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function lat(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+JD(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 cat(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return e%360}const mA=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function hat(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return mA[e%mA.length]}function uat(i){const e=(i||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function dat(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 Qd({slug:i,size:e=36,title:r,onClick:n}){const a=cat(i),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=hat(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 fat=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function pat(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 gat(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 mat(i){return i==="complete"?"Complete":i==="synthesizing"?"Synthesizing":i.endsWith("_running")?"In progress":"Pending"}function yat({debates:i,onOpen:e}){const{t:r}=Ni(),[n,a]=K.useState(""),[o,c]=K.useState("all"),h=K.useMemo(()=>i.filter(u=>pat(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:fat.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 ${gat(u.status)}`,children:[m.jsx("span",{className:"council-hall-status-dot"}),mat(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(Qd,{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 bat(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 xat({status:i,size:e="md"}){const{label:r,tone:n}=bat(i);return m.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[m.jsx("span",{className:"council-status-dot"}),r]})}function zu({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 vat({debate:i,onCiteJump:e,onAgentJump:r}){const{t:n}=Ni(),a=K.useMemo(()=>lat(i),[i]),o=i.finalReport?dat(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:we.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:we.parse(o.verdict||"*No verdict section found.*")}})]}),m.jsxs("div",{className:"council-ov-stats",children:[m.jsx(zu,{value:a.rounds,label:"rounds"}),m.jsx(zu,{value:a.personas,label:"personas"}),m.jsx(zu,{value:a.pushbacks,label:"pushbacks"}),m.jsx(zu,{value:a.openRisks,label:"open risks",tone:"warning"}),m.jsx(zu,{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(Cat,{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:we.parse(o.appendix.body)}})]})]})]})}function Cat({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=we.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(Qd,{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 tj({model:i}){const e=uat(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 _at(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(`
|
|
479
|
+
`).toLowerCase().includes(r))return!0;return!1}function GC(i,e){if(!e.trim())return i;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return i.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function kat({debate:i,focusSlug:e}){const{t:r}=Ni(),[n,a]=K.useState(""),[o,c]=K.useState(()=>new Set),h=K.useRef(null),u=K.useMemo(()=>i.personas.filter(f=>_at(f,n)),[i.personas,n]);K.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(wat,{persona:f,query:n,collapsed:o.has(f.slug),highlighted:e===f.slug,onToggle:()=>d(f.slug)},f.slug))]})]})}function wat({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(Qd,{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(tj,{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:GC(we.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(Sat,{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 Sat({round:i,crossContext:e,query:r}){const n=ZD(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:GC(we.parse(e),r)}})]}),i.executiveSummary&&m.jsx(Pu,{title:"Executive summary",body:i.executiveSummary,query:r}),i.position&&m.jsx(Pu,{title:"Position",body:i.position,query:r}),i.reasoning&&m.jsx(Pu,{title:"Reasoning",body:i.reasoning,query:r}),i.reactions&&m.jsx(Pu,{title:"Reactions to peers",body:i.reactions,query:r}),i.openQuestions&&m.jsx(Pu,{title:"Open questions",body:i.openQuestions,query:r})]})}function Pu({title:i,body:e,query:r}){const n=GC(we.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 ej(i,e){return e.trim()?i?[i.executiveSummary,i.position,i.reasoning].filter(Boolean).join(`
|
|
480
|
+
`).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function Tat({debate:i,query:e,onQueryChange:r,selected:n,onSelectCell:a,onClearSelection:o}){const c=K.useRef(null),h=K.useMemo(()=>Array.from({length:Math.max(1,i.frontmatter.rounds_planned)},(f,g)=>g+1),[i.frontmatter.rounds_planned]),u=K.useMemo(()=>i.personas.map(f=>f.slug),[i.personas]),d=K.useMemo(()=>{if(!e.trim())return null;let f=0;for(const g of i.personas)for(const x of h)ej(QD(g,x),e)&&f++;return f},[e,i,h]);return K.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]),K.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(Eat,{persona:f,rounds:h,debate:i,query:e,selected:n,knownSlugs:u,onSelectCell:a},f.slug))]})})]})}function Eat({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(Qd,{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(tj,{model:i.frontmatter.model})]})]}),e.map(h=>{const u=QD(i,h),d=r.frontmatter.status===`round_${h}_running`,f=!!a&&a.slug===i.slug&&a.round===h,g=ej(u,n),x=!!n.trim()&&!g;return m.jsx(Nat,{personaSlug:i.slug,round:h,data:u,isRunning:d,active:f,dimmed:x,knownSlugs:o,onSelect:c},h)})]})}function Nat({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=ZD(r.position),d=aat(r.position),f=JD(r),g=oat(r),x=sat(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(qu,{title:"Executive summary",children:m.jsx("p",{children:r.executiveSummary})}),r.position&&m.jsx(qu,{title:"Position",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.position)}})}),r.reasoning&&m.jsx(qu,{title:"Reasoning",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.reasoning)}})}),r.reactions&&m.jsxs(qu,{title:"Reactions to peers",children:[m.jsx("div",{dangerouslySetInnerHTML:{__html:we.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(Qd,{slug:y,size:14}),m.jsx("span",{children:y})]},y))})]}),r.openQuestions&&m.jsx(qu,{title:"Open questions",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.openQuestions)}})})]})]})}function qu({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 yA(i){return i==="complete"||i==="synthesizing"?"overview":"matrix"}function Aat({debate:i,onBack:e}){const{t:r}=Ni(),[n,a]=K.useState(()=>yA(i.frontmatter.status)),[o,c]=K.useState(""),[h,u]=K.useState(null),[d,f]=K.useState(null);K.useEffect(()=>{a(yA(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(xat,{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(mx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),m.jsx(mx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),m.jsx(mx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),m.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&m.jsx(vat,{debate:i,onCiteJump:g,onAgentJump:x}),n==="agents"&&m.jsx(kat,{debate:i,focusSlug:d}),n==="matrix"&&m.jsx(Tat,{debate:i,query:o,onQueryChange:c,selected:h,onSelectCell:(v,C)=>u({slug:v,round:C}),onClearSelection:()=>u(null)})]})]})}function mx({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 Mat(){const{t:i}=Ni(),{data:e,isLoading:r,isError:n,error:a}=rat(),[o,c]=K.useState(null),{data:h,isLoading:u}=nat(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(Aat,{debate:h,onBack:()=>c(null)})]}):m.jsxs("div",{className:"council-page",children:[m.jsx("h1",{className:"page-title",children:i("council.title")}),m.jsx(yat,{debates:e??[],onOpen:c})]})}function Bat(){return di({queryKey:["config"],queryFn:()=>me.get("/config"),select:i=>i.config})}function Lat(){const i=kr();return Hr({mutationFn:e=>me.patch("/config",e),onSuccess:()=>{i.invalidateQueries({queryKey:["config"]})}})}function Oat(){return di({queryKey:["federation","inbox"],queryFn:()=>me.get("/federation/inbox")})}function Rat(){return Hr({mutationFn:()=>me.post("/federation/sync",{})})}const bA=["out","in","both"];function Dat({shareable:i,onToggleShareable:e,shareablePending:r}){const{t:n}=Ni(),{data:a}=iM(),{data:o}=gI(),c=mI(),h=yI(),{data:u}=Oat(),d=Rat(),[f,g]=K.useState(""),[x,y]=K.useState("both"),[v,C]=K.useState(null),_=(a==null?void 0:a.vaults)??[],k=(a==null?void 0:a.current)??null,T=o??[],E=new Set(T.map(M=>M.vault)),N=_.filter(M=>M.name!==k&&!E.has(M.name)),L=()=>{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,z)=>{c.mutate({vault:M.vault,direction:z,topics:M.topics})},A=(M,z)=>{const D=z.split(",").map($=>$.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:"settings-checkboxes",children:[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 z;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:bA.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:((z=M.topics)==null?void 0:z.join(", "))??"",placeholder:n("federation.topics.placeholder"),onBlur:D=>{const $=D.target.value.split(",").map(Y=>Y.trim()).filter(Boolean).join(", "),U=(M.topics??[]).join(", ");$!==U&&A(M,D.target.value)}})]})]},M.vault)})})]}),m.jsxs("div",{className:"fed-add",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.add")}),N.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")}),N.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:bA.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:L,disabled:c.isPending||!f,children:n("federation.connect")})]}),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)??[],z=(u==null?void 0:u.consumed)??[],D=(u==null?void 0:u.quarantined)??[];return M.length===0&&z.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($=>m.jsx(xA,{entry:$,fromLabel:n("federation.inbox.from")},`p-${$.id}`))})]}),z.length>0&&m.jsxs("div",{className:"fed-inbox-group",children:[m.jsxs("h4",{className:"fed-inbox-group-title",children:[n("federation.inbox.consumed")," (",z.length,")"]}),m.jsx("ul",{className:"fed-entry-list fed-entry-list--consumed",children:z.map($=>m.jsx(xA,{entry:$,fromLabel:n("federation.inbox.from")},`c-${$.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($=>m.jsxs("li",{className:"fed-entry fed-entry--quarantined",children:[m.jsx("code",{className:"fed-entry-file",children:$.file}),m.jsxs("span",{className:"fed-entry-meta",children:["v",$.version]})]},`q-${$.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(jat,{deltas:d.data.deltas,t:n})]})]})}function xA({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 jat({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)})})}const Fat=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],yx={platforms:[],disableNativeMemory:!0};function Iat(){const{t:i}=Ni(),{data:e,isLoading:r,isError:n}=Bat(),a=Lat(),[o,c]=K.useState(yx.platforms),[h,u]=K.useState(yx.disableNativeMemory),[d,f]=K.useState(!1),[g,x]=K.useState(""),[y,v]=K.useState(""),[C,_]=K.useState(""),[k,T]=K.useState(null),[E,N]=K.useState(!1),[L,O]=K.useState(null),[A,M]=K.useState(!1),[z,D]=K.useState(!1),[$,U]=K.useState(!1),{data:Y}=di({queryKey:["tasks-sync-status"],queryFn:()=>me.get("/tasks/sync-status"),select:Q=>Q.status}),{data:I}=di({queryKey:["tasks-containers"],queryFn:()=>me.get("/tasks/containers"),select:Q=>Q.containers,enabled:d,staleTime:300*1e3}),W=Q=>{const yt=(I??[]).find(ot=>ot.ids.listId===Q);yt&&(x(yt.ids.teamId),v(yt.ids.spaceId),_(yt.ids.listId),nt())},j=async()=>{M(!0),O(null);try{const{result:Q}=await me.post("/tasks/provision",{});O(Q.errors.length>0?`⚠ ${Q.errors[0]}`:Q.created.length>0?`✓ Created: ${Q.created.join(", ")}${Q.backfilled>0?` · backfilled ${Q.backfilled} value(s)`:""}`:"✓ All recommended fields already exist.")}catch(Q){O(`⚠ ${Q instanceof Error?Q.message:String(Q)}`)}finally{M(!1)}};if(K.useEffect(()=>{var ot,X,Z;const Q=e??yx;c(Q.platforms),u(Q.disableNativeMemory??!0);const yt=e;f((yt==null?void 0:yt.taskBackend)==="clickup"),x(((ot=yt==null?void 0:yt.clickup)==null?void 0:ot.teamId)??""),v(((X=yt==null?void 0:yt.clickup)==null?void 0:X.spaceId)??""),_(((Z=yt==null?void 0:yt.clickup)==null?void 0:Z.listId)??""),D(!1),U(!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 q=Q=>{c(yt=>{const ot=yt.includes(Q)?yt.filter(X=>X!==Q):[...yt,Q];return D(!0),U(!1),ot})},G=()=>{u(Q=>!Q),D(!0),U(!1)},it=()=>{a.mutate({platforms:o,disableNativeMemory:h,taskBackend:d?"clickup":"local",...d?{clickup:{teamId:g||void 0,spaceId:y||void 0,listId:C||void 0}}:{}},{onSuccess:()=>{D(!1),U(!0)}})},nt=()=>{D(!0),U(!1)},H=(e==null?void 0:e.shareable)===!0,rt=Q=>{a.mutate({shareable:Q})},ft=async()=>{N(!0),T(null);try{T(await me.post("/tasks/sync-test",{}))}catch(Q){T({ok:!1,backend:"clickup",error:Q instanceof Error?Q.message:String(Q)})}finally{N(!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:[$&&!z&&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:it,disabled:!z||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:Fat.map(({id:Q,labelKey:yt})=>m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(Q),onChange:()=>q(Q)}),m.jsx("span",{children:i(yt)})]},Q))})]}),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(Q=>!Q),nt()}}),m.jsx("span",{children:i("settings.cloud_tasks.label")})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.cloud_tasks.hint")}),d&&m.jsxs(m.Fragment,{children:[(I??[]).length>0&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:"List"}),m.jsx(Uv,{value:C||null,options:(I??[]).map(Q=>({value:Q.ids.listId,label:Q.path})),placeholder:"Pick the list to sync to…",searchPlaceholder:"Search lists…",clearLabel:"(keep current)",onChange:W})]}),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:g,onChange:Q=>{x(Q.target.value),nt()}})]}),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:y,onChange:Q=>{v(Q.target.value),nt()}})]}),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:C,onChange:Q=>{_(Q.target.value),nt()}})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.cloud_tasks.token_hint")}),m.jsxs("div",{className:"settings-test-row",children:[m.jsx("button",{className:"btn",onClick:ft,disabled:E,children:i(E?"settings.cloud_tasks.testing":"settings.cloud_tasks.test")}),m.jsx("button",{className:"btn",onClick:j,disabled:A,children:A?"Provisioning…":"Provision fields"}),L&&m.jsx("span",{className:"settings-field-hint",children:L}),k&&k.ok&&m.jsxs("span",{className:"settings-test-ok",children:["✓ ",k.note??`${i("settings.cloud_tasks.test_ok")} ${k.user}`]}),k&&!k.ok&&m.jsxs("span",{className:"settings-test-err",children:["✗ ",k.error]})]}),Y&&Y.backend!=="local"&&m.jsxs("p",{className:"settings-sync-badge",children:[i("settings.cloud_tasks.status"),": ",Y.pendingPush," ",i("settings.cloud_tasks.pending"),Y.conflicts>0&&` · ${Y.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:G}),m.jsx("span",{children:i("settings.native_memory.label")})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.native_memory.hint")})]})]}),m.jsx(Dat,{shareable:H,onToggleShareable:rt,shareablePending:a.isPending})]})}function ij(){return di({queryKey:["packs"],queryFn:()=>me.get("/packs")})}function $at(){const i=kr();return Hr({mutationFn:e=>me.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function zat(){const i=kr();return Hr({mutationFn:e=>me.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function Pat(i){return"base"in i}function rj({item:i,onActionDone:e}){const{t:r}=Ni(),n=$at(),a=zat(),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 qat({item:i,onClose:e}){const{t:r}=Ni(),n=K.useCallback(a=>{a.target===a.currentTarget&&e()},[e]);return K.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(rj,{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":Ka(a),children:a},a))}),Pat(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 vA({item:i,onClick:e}){const{t:r}=Ni(),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":Ka(a),children:a},a))}),m.jsx(rj,{item:i})]})}function Uat(){const{t:i}=Ni(),{data:e,isLoading:r,isError:n,error:a}=ij(),[o,c]=K.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(vA,{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(vA,{item:d,onClick:c},d.name))})]}),o!==null&&m.jsx(qat,{item:o,onClose:()=>c(null)})]})}function Hat(){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 Wat(){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 Gat(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 Sm({spec:i,className:e,size:r="full"}){const a=K.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]:Gat(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 an(i,e,r,n){const a=(e+n)/2;return`M ${i} ${e} C ${i} ${a}, ${r} ${a}, ${r} ${n}`}const YC=[{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:"⬡"}],dl=600,Tm=250,nj=92,ql=4,CA=(1200-ql*Tm)/(ql+1),KC=196,Yat=320,Kat=Yat-KC,Vat=120,aj=470,Xat=548,_A=632;function sj(i){return CA+i*(Tm+CA)}function oj(i){return sj(i)+Tm/2}function lj(i){return KC+i*Kat}const Zat=YC.map((i,e)=>{const r=e%ql,n=Math.floor(e/ql);return{id:`cat-${i.file}`,x:sj(r),y:lj(n),w:Tm,h:nj,title:i.file,sub:i.region,glyph:i.glyph,variant:"region",breathe:!0,breatheDelay:e*.18}}),Qat=YC.slice(0,ql).map((i,e)=>({id:`fan-${e}`,d:an(dl,Vat,oj(e),KC),travel:220,delay:e*.18,dur:2.6})),Jat=YC.map((i,e)=>{const r=e%ql,n=Math.floor(e/ql);return{id:`conv-${i.file}`,d:an(oj(r),lj(n)+nj,dl,aj),travel:300,delay:.5+e*.12,dur:2.8}}),tst={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:dl-215,y:40,w:430,h:80,title:"SessionStart hook fires",sub:"preloads context · 0 tool calls",variant:"hook"},...Zat,{id:"agent",x:dl-250,y:aj,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:dl-200,y:_A,w:400,h:78,title:"RemSleep — parallel specialists",sub:"multi-agent consolidation",variant:"rem"}],edges:[...Qat,...Jat,{id:"agent-rem",d:`M ${dl} ${Xat} L ${dl} ${_A}`,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,Em=300,cj=116,kA=3,wA=(1100-kA*Em)/(kA+1),VC=280,est=196,hj=470,ist=540,SA=596;function uj(i){return wA+i*(Em+wA)}function dj(i){return uj(i)+Em/2}const XC=[{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"}],rst=XC.map((i,e)=>({id:i.id,x:uj(e),y:VC,w:Em,h:cj,title:i.title,sub:i.sub,variant:"region",breathe:!0,breatheDelay:e*.25})),nst=XC.map((i,e)=>({id:`fan-${i.id}`,d:an(Ia,est,dj(e),VC),travel:200,delay:e*.3,dur:2.4})),ast=XC.map((i,e)=>({id:`conv-${i.id}`,d:an(dj(e),VC+cj,Ia,hj),travel:200,delay:.9+e*.2,dur:2.4})),sst={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"},...rst,{id:"converge",x:Ia-220,y:hj,w:440,h:70,title:"system knowledge updated",sub:"reports stitched into one summary",variant:"agent"},{id:"sleep-done",x:Ia-130,y:SA,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},...nst,...ast,{id:"converge-done",d:`M ${Ia} ${ist} L ${Ia} ${SA}`,travel:64,delay:1.8,dur:1.8}]},l1=230,fj=230,TA=132,c1=[{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"}],ost=c1.map(i=>({id:i.id,x:i.x,y:l1-TA/2,w:fj,h:TA,title:i.title,sub:i.sub,variant:i.variant})),lst=c1.slice(0,-1).map((i,e)=>{const r=c1[e+1],n=i.x+fj,a=r.x;return{id:`pipe-${i.id}`,d:`M ${n} ${l1} L ${a} ${l1}`,travel:a-n,delay:e*.4,dur:2.2}}),cst={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:ost,edges:lst},hst=[{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 ust(){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(Sm,{spec:tst}),m.jsx("div",{className:"hiw2-steps",children:hst.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 dst=[{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"}],fst=[{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 pst(){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(Sm,{spec:sst}),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:dst.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:fst.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 gst=[{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 mst(){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(Sm,{spec:cst}),m.jsx("div",{className:"recallf-stages",children:gst.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 EA=[{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 yst(){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:EA.map((i,e)=>m.jsxs("li",{className:"arch-stratum",style:{"--i":e,"--n":EA.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 bst(i){return"base"in i}function NA({item:i}){const e=bst(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 xst(){const{data:i,isLoading:e,isError:r}=ij(),n=K.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(NA,{item:c},`a-${c.name}`))}),m.jsx("ul",{className:"marquee-track marquee-track--dup","aria-hidden":"true",children:n.map(c=>m.jsx(NA,{item:c},`b-${c.name}`))})]})]})}const Po="0 0 360 170";function pj(i,e,r){return{viewBox:Po,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 vst={viewBox:Po,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:an(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}]},Cst={viewBox:Po,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}]},_st={viewBox:Po,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:an(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:an(180,56,296,92),travel:90,dur:2.2,delay:.4}]},kst={viewBox:Po,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:[]},wst={viewBox:Po,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:an(69,54,150,58),travel:90,dur:2.4},{id:"f-tag",d:an(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}]},Sst={viewBox:Po,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:an(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:an(146,85,272,140),travel:90,dur:2.2,delay:.6}]},Tst={viewBox:Po,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:an(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:an(180,58,296,96),travel:90,dur:2.2,delay:.4}]},Est={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:an(166,40,286,96),travel:130,dur:2.4,delay:.4},{id:"p3-syn",d:an(226,136,286,116),travel:76,dur:2.2,delay:.9}]},Nst={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}}]},Ast=pj("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"}),Mst=pj("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"}),gj=[{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:vst},{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:Cst},{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:_st},{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:kst},{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:Mst},{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:wst},{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:Sst},{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:Ast},{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:Tst},{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:Est},{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:Nst},{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:"✦"}],h1=gj.filter(i=>i.defaultOpen),AA=gj.filter(i=>!i.defaultOpen),ta=h1.length,bx=16,Bst=62,Lst=.72,Ost=40,Rst=140,Dst=8;function jst(){const[i,e]=K.useState(0),r=K.useId(),n=K.useRef([]),a=K.useRef([]),o=K.useRef([]),c=K.useRef(null),h=K.useRef(null),u=K.useRef(null),d=K.useRef(!1),f=K.useRef(0),g=_=>`${r}-tab-${_}`,x=_=>`${r}-panel-${_}`,y=K.useCallback(_=>{const k=Math.max(0,Math.min(ta-1,_));k!==f.current&&(f.current=k,e(k))},[]);K.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,E=T??window;let N=0;const L=()=>{N=0;const z=_.getBoundingClientRect(),D=T?T.getBoundingClientRect().top:0,$=z.height-k.offsetHeight;if($<=0)return;const U=Math.max(0,Math.min(1,(D+bx-z.top)/$));u.current&&(u.current.style.transform=`scaleX(${U})`);const Y=U*(ta-1);for(let I=0;I<ta;I++){const W=a.current[I];if(!W)continue;const j=I-Y,q=Math.abs(j);W.style.opacity=String(Math.max(0,1-q/Lst)),W.style.transform=d.current?"none":`translate3d(0, ${j*Ost}px, 0)`;const G=q<.5;W.style.zIndex=G?"2":"1",W.style.pointerEvents=G?"auto":"none";const it=q<1.05;o.current[I]!==it&&(o.current[I]=it,W.classList.toggle("feat-panel--near",it))}y(Math.round(Y))};let O=0;const A=()=>{if(!T)return;const z=_.getBoundingClientRect(),D=z.height-k.offsetHeight;if(D<=0)return;const $=(T.getBoundingClientRect().top+bx-z.top)/D;if($<=.012||$>=.988)return;const Y=(Math.round($*(ta-1))/(ta-1)-$)*D;Math.abs(Y)<Dst||T.scrollTo({top:T.scrollTop+Y,behavior:d.current?"auto":"smooth"})},M=()=>{N||(N=requestAnimationFrame(L)),O&&clearTimeout(O),O=window.setTimeout(A,Rst)};return E.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M),L(),()=>{E.removeEventListener("scroll",M),window.removeEventListener("resize",M),N&&cancelAnimationFrame(N),O&&clearTimeout(O)}},[y]);const v=K.useCallback(_=>{const k=c.current,T=h.current,E=k==null?void 0:k.closest(".shell-main");if(!k||!T||!E){y(_);return}const N=k.getBoundingClientRect(),L=N.height-T.offsetHeight;if(L<=0){y(_);return}const A=_/(ta-1)*L-(E.getBoundingClientRect().top+bx-N.top);E.scrollTo({top:E.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*Bst}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:h1.map((_,k)=>{const T=k===i;return m.jsxs("button",{ref:E=>{n.current[k]=E},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:h1.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(Sm,{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:AA.length})]}),m.jsx("div",{className:"feat-more-grid",children:AA.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 Fst=[{cmd:"dreamcontext init",hint:"# set up the brain"},{cmd:"dreamcontext dashboard",hint:"# open this dashboard"},{cmd:"dreamcontext sleep",hint:"# consolidate the session"}];function Ist(){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:Fst.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 $st(){return m.jsxs("div",{className:"about","data-testid":"about-page",children:[m.jsx(Hat,{}),m.jsx(Wat,{}),m.jsx(ust,{}),m.jsx(pst,{}),m.jsx(mst,{}),m.jsx(yst,{}),m.jsx(xst,{}),m.jsx(jst,{}),m.jsx(Ist,{})]})}function zst(){return di({queryKey:["taxonomy"],queryFn:()=>me.get("/taxonomy")})}const Pst={domain:"Domain",layer:"Layer",kind:"Kind",topic:"Topic"};function MA({tag:i,count:e,dimmed:r}){return m.jsxs("span",{className:`taxonomy-chip${r?" taxonomy-chip--dim":""}`,"data-hue":Ka(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 Dp({label:i,count:e,children:r,defaultOpen:n=!1}){const[a,o]=K.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 qst(){const{t:i}=Ni(),{data:e,isLoading:r,isError:n,error:a}=zst();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:Pst[f]??f}),m.jsx("div",{className:"taxonomy-chip-cluster",children:g.map(x=>{const y=c[x]??0;return m.jsx(MA,{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(MA,{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":Ka(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":Ka(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(Dp,{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(Dp,{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(Dp,{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(Dp,{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 Ust=["tasks.members","tasks.delete","tasks.sync"];function Hst(){const{data:i}=di({queryKey:["health"],queryFn:()=>me.get("/health"),staleTime:6e4,retry:1});if(!i)return null;const e=i.capabilities??[];return Ust.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 BA=new tI({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function Wst({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(eat,{onNavigate:e});case"tasks":return m.jsx(ptt,{});case"sleep":return m.jsx(btt,{});case"core":return m.jsx(Ott,{onNavigateTaxonomy:()=>i.navigate("taxonomy",null)});case"knowledge":return m.jsx(Ktt,{});case"features":return m.jsx(Vtt,{});case"council":return m.jsx(Mat,{});case"settings":return m.jsx(Iat,{});case"packs":return m.jsx(Uat,{});case"taxonomy":return m.jsx(qst,{});case"about":return m.jsx($st,{})}}class LA extends K.Component{constructor(){super(...arguments);ne(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 u1=new URLSearchParams(window.location.search).get("vault");u1&&fI(u1);function Gst(){return u1?m.jsx(LA,{children:m.jsx(KS,{client:BA,children:m.jsx(LI,{children:m.jsx(QS,{children:m.jsxs(MI,{children:[m.jsx(Hst,{}),m.jsx(PQ,{children:i=>m.jsx(Wst,{nav:i})})]})})})})}):m.jsx(LA,{children:m.jsx(KS,{client:BA,children:m.jsx(QS,{children:m.jsx(NI,{})})})})}M4.createRoot(document.getElementById("root")).render(m.jsx(K.StrictMode,{children:m.jsx(Gst,{})}));export{WM as $,eot as A,Lo as B,X6 as C,Ii as D,oz as E,pC as F,RM as G,CW as H,T9 as I,L7 as J,u$ as K,pd as L,Jst as M,um as N,P$ as O,UM as P,v2 as Q,h9 as R,ev as S,vW as T,Id as U,wa as V,_t as W,xt as X,V$ as Y,dW as Z,B as _,ez as a,WU as a$,s9 as a0,Y2 as a1,G2 as a2,hot as a3,aot as a4,lot as a5,oot as a6,rot as a7,W1 as a8,cot as a9,DY as aA,RY as aB,vB as aC,r9 as aD,IG as aE,NM as aF,o9 as aG,Dd as aH,Qst as aI,hm as aJ,Ng as aK,yet as aL,FO as aM,Gd as aN,jG as aO,DG as aP,n9 as aQ,I1 as aR,bo as aS,bd as aT,F2 as aU,bP as aV,zH as aW,DO as aX,NO as aY,HU as aZ,Sg as a_,not as aa,Tc as ab,dot as ac,uot as ad,sot as ae,cY as af,K3 as ag,Aot as ah,R7 as ai,nn as aj,$s as ak,wu as al,gC as am,UO as an,$l as ao,YO as ap,ve as aq,Ga as ar,Vt as as,uK as at,Not as au,Mot as av,Tot as aw,te as ax,Eot as ay,zY as az,tz as b,Eg as b$,wh as b0,ul as b1,DH as b2,pT as b3,ka as b4,GU as b5,oC as b6,UU as b7,VU as b8,kh as b9,zrt as bA,Yit as bB,re as bC,a9 as bD,Git as bE,vD as bF,MN as bG,Nl as bH,get as bI,lt as bJ,K as bK,Art as bL,qrt as bM,Urt as bN,m as bO,AN as bP,oW as bQ,tW as bR,cW as bS,sm as bT,PU as bU,sC as bV,RO as bW,uW as bX,GH as bY,RK as bZ,Hd as b_,$H as ba,lW as bb,tH as bc,eW as bd,aC as be,aE as bf,Zt as bg,KO as bh,OC as bi,vn as bj,uP as bk,F1 as bl,sB as bm,qd as bn,cB as bo,iot as bp,T2 as bq,S2 as br,V6 as bs,br as bt,BJ as bu,ai as bv,DC as bw,Prt as bx,$rt as by,Brt as bz,Ze as c,$o as c0,cT as c1,lC as c2,MO as c3,Fv as c4,Kst as c5,De as c6,HA as c7,E4 as c8,Xst as c9,f1 as ca,Vst as cb,ce as d,HM as e,mr as f,rz as g,js as h,_a as i,F7 as j,$d as k,Nt as l,WO as m,tot as n,Lot as o,nz as p,az as q,Bot as r,iz as s,O7 as t,ba as u,AY as v,wW as w,fot as x,Ol as y,J$ as z};
|