dreamcontext 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/assets/{BrainCanvas3D-BZyWrW3J.js → BrainCanvas3D-CNDjMlun.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-C55dCpzj.js → _baseUniq-DtoPVYjz.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-BTWWh58_.js → ar-SA-G6X2FPQ2-D_dXe_8i.js} +1 -1
- package/dist/dashboard/assets/{arc-BhcvtD7_.js → arc-8LFYH4lG.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-BlVAz3vP.js → architectureDiagram-Q4EWVU46-BIgEpM4v.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-DEPuxlle.js → az-AZ-76LH7QW2-C30ZBwgT.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-CdwdScdW.js → bg-BG-XCXSNQG7-D0R9pSdG.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-CAzEduT-.js → blockDiagram-DXYQGD6D-DRTa0DpJ.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-Cx2p_HrL.js → bn-BD-2XOGV67Q-vkWxteG3.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-C_5GcHxG.js → c4Diagram-AHTNJAMY-Do_gB8Cs.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-BLVJKLW3.js → ca-ES-6MX7JW3Y-CTyxGdzW.js} +1 -1
- package/dist/dashboard/assets/channel-C5p1t-nJ.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-DYYyKwKp.js → chunk-4BX2VUAB-DJlttKoY.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-B9ZDNs0v.js → chunk-4TB4RGXK-BdixZX4J.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-0chbuP2q.js → chunk-55IACEB6-CPhKaTLr.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-BM3tX5V3.js → chunk-EDXVE4YY-Bv0bQVvi.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-D7fWQyLU.js → chunk-FMBD7UC4-DGjRdLDd.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-DRSMwRfw.js → chunk-OYMX7WX6-B-wzkRri.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-BkySqi6f.js → chunk-QZHKN3VN-BwK1NqpV.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-DWxX_bg1.js → chunk-YZCP3GAM-DjEwJGlh.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-sTJpbWV4.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-sTJpbWV4.js +1 -0
- package/dist/dashboard/assets/clone-DTslXBzp.js +1 -0
- package/dist/dashboard/assets/core-Cn4yfEqx.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-CK3SaOdF.js → cose-bilkent-S5V4N54A-BJXUn11L.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-2wFJFdY3.js → cs-CZ-2BRQDIVT-BjRikaNe.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-PZ4S5fLH.js → da-DK-5WZEPLOC-Cn3GTxbV.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-C_O4CkRN.js → dagre-KV5264BT-BHn2c24z.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-COgQyNpE.js → de-DE-XR44H4JA-IvGsdpTt.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-CY7cwksh.js → diagram-5BDNPKRD-YrlF3B5a.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-BBaegF2E.js → diagram-G4DWMVQ6-DHONF1OD.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-Dtp-QpeD.js → diagram-MMDJMWI5-B1vJLt5b.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-h-YHhXz4.js → diagram-TYMM5635-C8P5-4A3.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-DzTJgcWa.js → el-GR-BZB4AONW-B9GA8_lO.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-C8WadTdS.js → erDiagram-SMLLAGMA-CjWWTCWe.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-BMzFbvDd.js → es-ES-U4NZUMDT-Ct1wP_9r.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-CnpRhfeI.js → eu-ES-A7QVB2H4-C-49gWlR.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-DJozguNj.js → fa-IR-HGAKTJCU-DUo8t-xv.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-4vlr1zEE.js → fi-FI-Z5N7JZ37-DCObnr3i.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-BDU_Bd0P.js → flowDiagram-DWJPFMVM-OQ_IRMqG.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-BIMGBozN.js → fr-FR-RHASNOE6-0EGg3zhN.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-DI9axi76.js → ganttDiagram-T4ZO3ILL-DPTSBcnu.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-BuhQ28fO.js → gitGraphDiagram-UUTBAWPF-BxfeiCqm.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-C5wE26uu.js → gl-ES-HMX3MZ6V-WtVwXY6x.js} +1 -1
- package/dist/dashboard/assets/{graph-Djm-nnL-.js → graph-Du_3_o8q.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-B0U2BY4u.js → he-IL-6SHJWFNN-CfgspIku.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-Ddqmbdc3.js → hi-IN-IWLTKZ5I-CS9l2g3B.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-Bql7W1FB.js → hu-HU-A5ZG7DT2-BQ46AerM.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-BgPUuH6X.js → id-ID-SAP4L64H-BeShJyKQ.js} +1 -1
- package/dist/dashboard/assets/{index-DpzkIBIK.js → index-BK87l45R.js} +1 -1
- package/dist/dashboard/assets/index-C9VT2u9E.js +480 -0
- package/dist/dashboard/assets/index-D-gsCv2F.js +1 -0
- package/dist/dashboard/assets/{index-DMgrVZGf.js → index-D7dWmypK.js} +1 -1
- package/dist/dashboard/assets/index-DoFaQKCx.css +1 -0
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-FlC8UXlC.js → infoDiagram-42DDH7IO-CcFhyaQp.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-CM7RkOdA.js → ishikawaDiagram-UXIWVN3A-9QJeD00p.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-B8JStDkT.js → it-IT-JPQ66NNP-csyvfk0t.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-CjqVt-yD.js → ja-JP-DBVTYXUO-DctpJ2yz.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-CmXt_usI.js → journeyDiagram-VCZTEJTY-CU4EYedt.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-qlfTF570.js → kaa-6HZHGXH3-D0tWzHt3.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-B1jcf86v.js → kab-KAB-ZGHBKWFO-BC-g4xJU.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-DfUTCwbu.js → kanban-definition-6JOO6SKY-BxXqVmz1.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-CDGZZuGX.js → kk-KZ-P5N5QNE5-TLB3Lxri.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-VJhAICPS.js → km-KH-HSX4SM5Z-DCh7cRAS.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-DTsCW-6Q.js → ko-KR-MTYHY66A-BPIl5ido.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-B7sBU8-V.js → ku-TR-6OUDTVRD-TUpeN1Tm.js} +1 -1
- package/dist/dashboard/assets/{layout-LL6b15MZ.js → layout-CyrgfqIp.js} +1 -1
- package/dist/dashboard/assets/{linear-th65CRN7.js → linear-B6cMUkoc.js} +1 -1
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-DLwGTeYc.js → lt-LT-XHIRWOB4-BRKyR_Xw.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-Df5ujP3N.js → lv-LV-5QDEKY6T-BANbTe4s.js} +1 -1
- package/dist/dashboard/assets/{min-C1cE6N2D.js → min-lcwVZhZ7.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-n-x0bf17.js → mindmap-definition-QFDTVHPH-fVIbdlXp.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-B0504Lxj.js → mr-IN-CRQNXWMA-DLFutdXk.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-CTTz1o7j.js → my-MM-5M5IBNSE-CGWrcNBC.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-C423tdvs.js → nb-NO-T6EIAALU-CGRDupuc.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-BGX4T5hB.js → nl-NL-IS3SIHDZ-BKwBfrzp.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-e7Z1mG0i.js → nn-NO-6E72VCQL-DDQkGe44.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-CPEhofz-.js → oc-FR-POXYY2M6-DufeHCWh.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-Dmdt2Etw.js → pa-IN-N4M65BXN-BUzelJDX.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-D36vqrao.js → percentages-BXMCSKIN-FxAvjywS.js} +7 -7
- package/dist/dashboard/assets/{pica-DyXfovKp.js → pica-Cek5bFnr.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-DFDPs7b_.js → pieDiagram-DEJITSTG-PgIrKPnB.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-G1JddCZF.js → pl-PL-T2D74RX3-Bd-rxZs3.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-pu4YiRox.js → pt-BR-5N22H2LF-D0QJGoo5.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-BOYLmU0S.js → pt-PT-UZXXM6DQ-DjumltMq.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-D7Ov5Uju.js → quadrantDiagram-34T5L4WZ-C30tZOBh.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-Blqx-X0l.js → requirementDiagram-MS252O5E-D3vhi-ZB.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-DlBiDeMi.js → ro-RO-JPDTUUEW-DmEo8cEd.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-D0J18l95.js → ru-RU-B4JR7IUQ-ZHCu1nBu.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-BQbQa_T1.js → sankeyDiagram-XADWPNL6-Cmbs-PxO.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-DhJhyglC.js → sequenceDiagram-FGHM5R23-DlBqk4uQ.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-4JT6EDIh.js → si-LK-N5RQ5JYF-iuqtpRqI.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-Bx5AqQi7.js → sk-SK-C5VTKIMK-BWFUWdaQ.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-Duy44AJo.js → sl-SI-NN7IZMDC-irYTfiq_.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-B3lrGt3B.js → stateDiagram-FHFEXIEX-B6T9ib8G.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-CN0hAOp7.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-DWRxaQue.js → subset-shared.chunk-LTgWgeng.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-nm8TiAaC.js → subset-worker.chunk-CT_2iDuG.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-_WPtf9Fs.js → sv-SE-XGPEYMSR-BvDzjArd.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-BZEYawlk.js → ta-IN-2NMHFXQM-DdsS_3Yq.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-C_ugiLaK.js → th-TH-HPSO5L25-Duadkok3.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-D0RPX8Ye.js → timeline-definition-GMOUNBTQ-CHTQqVpC.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-DkmWDwcW.js → tr-TR-DEFEU3FU-CTnPpl_3.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-l2YUg_fY.js → uk-UA-QMV73CPH-CAqmQ01_.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-BxCgJ4Ig.js → vennDiagram-DHZGUBPP-tWl34rwo.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-Chu_8vm0.js → vi-VN-M7AON7JQ-Cz7FDG8R.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-B74rcv6j.js → wardley-RL74JXVD-UjdnBcpJ.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-BZex7ruR.js → wardleyDiagram-NUSXRM2D-KhVWSzPf.js} +1 -1
- package/dist/dashboard/assets/webviewWindow-Dlc9MvRw.js +1 -0
- package/dist/dashboard/assets/window-D0tFurhp.js +1 -0
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-BACIDW_J.js → xychartDiagram-5P7HB3ND-SwtVQYTW.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-cY5Hv8ht.js → zh-CN-LNUGB5OW-B7cbFS35.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-BdyhmSC7.js → zh-HK-E62DVLB3-CLi9BFmp.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-CTjI4bec.js → zh-TW-RAJ6MFWO-XAcgJHay.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +429 -179
- package/install.sh +18 -0
- package/package.json +1 -1
- package/dist/dashboard/assets/channel-13cbKCMF.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BX19A8jH.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BX19A8jH.js +0 -1
- package/dist/dashboard/assets/clone-CiHddu7Q.js +0 -1
- package/dist/dashboard/assets/core-RciSkj6z.js +0 -1
- package/dist/dashboard/assets/index-BZEr0UdA.css +0 -1
- package/dist/dashboard/assets/index-CCBqToG8.js +0 -480
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-oO_Mw_KF.js +0 -1
- package/dist/dashboard/assets/webviewWindow-BHsy7FSR.js +0 -1
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BK87l45R.js","assets/core-Cn4yfEqx.js","assets/webviewWindow-Dlc9MvRw.js","assets/window-D0tFurhp.js","assets/index-D-gsCv2F.js","assets/dagre-KV5264BT-BHn2c24z.js","assets/graph-Du_3_o8q.js","assets/_baseUniq-DtoPVYjz.js","assets/layout-CyrgfqIp.js","assets/min-lcwVZhZ7.js","assets/clone-DTslXBzp.js","assets/cose-bilkent-S5V4N54A-BJXUn11L.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-Do_gB8Cs.js","assets/chunk-YZCP3GAM-DjEwJGlh.js","assets/flowDiagram-DWJPFMVM-OQ_IRMqG.js","assets/chunk-FMBD7UC4-DGjRdLDd.js","assets/chunk-55IACEB6-CPhKaTLr.js","assets/chunk-EDXVE4YY-Bv0bQVvi.js","assets/channel-C5p1t-nJ.js","assets/erDiagram-SMLLAGMA-CjWWTCWe.js","assets/gitGraphDiagram-UUTBAWPF-BxfeiCqm.js","assets/chunk-4BX2VUAB-DJlttKoY.js","assets/chunk-QZHKN3VN-BwK1NqpV.js","assets/wardley-RL74JXVD-UjdnBcpJ.js","assets/ganttDiagram-T4ZO3ILL-DPTSBcnu.js","assets/linear-B6cMUkoc.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-CcFhyaQp.js","assets/pieDiagram-DEJITSTG-PgIrKPnB.js","assets/arc-8LFYH4lG.js","assets/quadrantDiagram-34T5L4WZ-C30tZOBh.js","assets/xychartDiagram-5P7HB3ND-SwtVQYTW.js","assets/requirementDiagram-MS252O5E-D3vhi-ZB.js","assets/sequenceDiagram-FGHM5R23-DlBqk4uQ.js","assets/classDiagram-6PBFFD2Q-sTJpbWV4.js","assets/chunk-4TB4RGXK-BdixZX4J.js","assets/classDiagram-v2-HSJHXN6E-sTJpbWV4.js","assets/stateDiagram-FHFEXIEX-B6T9ib8G.js","assets/chunk-OYMX7WX6-B-wzkRri.js","assets/stateDiagram-v2-QKLJ7IA2-CN0hAOp7.js","assets/journeyDiagram-VCZTEJTY-CU4EYedt.js","assets/timeline-definition-GMOUNBTQ-CHTQqVpC.js","assets/mindmap-definition-QFDTVHPH-fVIbdlXp.js","assets/kanban-definition-6JOO6SKY-BxXqVmz1.js","assets/diagram-TYMM5635-C8P5-4A3.js","assets/diagram-MMDJMWI5-B1vJLt5b.js","assets/blockDiagram-DXYQGD6D-DRTa0DpJ.js","assets/diagram-5BDNPKRD-YrlF3B5a.js","assets/architectureDiagram-Q4EWVU46-BIgEpM4v.js","assets/diagram-G4DWMVQ6-DHONF1OD.js","assets/wardleyDiagram-NUSXRM2D-KhVWSzPf.js","assets/percentages-BXMCSKIN-FxAvjywS.js","assets/extends-CF3RwP-h.js","assets/BrainCanvas3D-CNDjMlun.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var M4=Object.defineProperty;var OS=i=>{throw TypeError(i)};var B4=(i,e,r)=>e in i?M4(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var ae=(i,e,r)=>B4(i,typeof e!="symbol"?e+"":e,r),Ab=(i,e,r)=>e.has(i)||OS("Cannot "+r);var it=(i,e,r)=>(Ab(i,e,"read from private field"),r?r.call(i):e.get(i)),se=(i,e,r)=>e.has(i)?OS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),Ht=(i,e,r,n)=>(Ab(i,e,"write to private field"),n?n.call(i,r):e.set(i,r),r),je=(i,e,r)=>(Ab(i,e,"access private method"),r);var hp=(i,e,r,n)=>({set _(a){Ht(i,e,a,r)},get _(){return it(i,e,n)}});function L4(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 _ot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Cot(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 Mb={exports:{}},yu={};/**
|
|
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 RS;function O4(){if(RS)return yu;RS=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 yu.Fragment=e,yu.jsx=r,yu.jsxs=r,yu}var DS;function R4(){return DS||(DS=1,Mb.exports=O4()),Mb.exports}var m=R4(),Bb={exports:{}},Se={};/**
|
|
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 jS;function D4(){if(jS)return Se;jS=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(W){return W===null||typeof W!="object"?null:(W=x&&W[x]||W["@@iterator"],typeof W=="function"?W:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function k(W,rt,ft){this.props=W,this.context=rt,this.refs=C,this.updater=ft||v}k.prototype.isReactComponent={},k.prototype.setState=function(W,rt){if(typeof W!="object"&&typeof W!="function"&&W!=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,W,rt,"setState")},k.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function T(){}T.prototype=k.prototype;function E(W,rt,ft){this.props=W,this.context=rt,this.refs=C,this.updater=ft||v}var N=E.prototype=new T;N.constructor=E,_(N,k.prototype),N.isPureReactComponent=!0;var B=Array.isArray;function O(){}var A={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function F(W,rt,ft){var st=ft.ref;return{$$typeof:i,type:W,key:rt,ref:st!==void 0?st:null,props:ft}}function D(W,rt){return F(W.type,rt,W.props)}function z(W){return typeof W=="object"&&W!==null&&W.$$typeof===i}function U(W){var rt={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(ft){return rt[ft]})}var K=/\/+/g;function $(W,rt){return typeof W=="object"&&W!==null&&W.key!=null?U(""+W.key):rt.toString(36)}function H(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(O,O):(W.status="pending",W.then(function(rt){W.status==="pending"&&(W.status="fulfilled",W.value=rt)},function(rt){W.status==="pending"&&(W.status="rejected",W.reason=rt)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function j(W,rt,ft,st,Ct){var ct=typeof W;(ct==="undefined"||ct==="boolean")&&(W=null);var X=!1;if(W===null)X=!0;else switch(ct){case"bigint":case"string":case"number":X=!0;break;case"object":switch(W.$$typeof){case i:case e:X=!0;break;case f:return X=W._init,j(X(W._payload),rt,ft,st,Ct)}}if(X)return Ct=Ct(W),X=st===""?"."+$(W,0):st,B(Ct)?(ft="",X!=null&&(ft=X.replace(K,"$&/")+"/"),j(Ct,rt,ft,"",function(ot){return ot})):Ct!=null&&(z(Ct)&&(Ct=D(Ct,ft+(Ct.key==null||W&&W.key===Ct.key?"":(""+Ct.key).replace(K,"$&/")+"/")+X)),rt.push(Ct)),1;X=0;var Z=st===""?".":st+":";if(B(W))for(var Q=0;Q<W.length;Q++)st=W[Q],ct=Z+$(st,Q),X+=j(st,rt,ft,ct,Ct);else if(Q=y(W),typeof Q=="function")for(W=Q.call(W),Q=0;!(st=W.next()).done;)st=st.value,ct=Z+$(st,Q++),X+=j(st,rt,ft,ct,Ct);else if(ct==="object"){if(typeof W.then=="function")return j(H(W),rt,ft,st,Ct);throw rt=String(W),Error("Objects are not valid as a React child (found: "+(rt==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":rt)+"). If you meant to render a collection of children, use an array instead.")}return X}function q(W,rt,ft){if(W==null)return W;var st=[],Ct=0;return j(W,st,"","",function(ct){return rt.call(ft,ct,Ct++)}),st}function G(W){if(W._status===-1){var rt=W._result;rt=rt(),rt.then(function(ft){(W._status===0||W._status===-1)&&(W._status=1,W._result=ft)},function(ft){(W._status===0||W._status===-1)&&(W._status=2,W._result=ft)}),W._status===-1&&(W._status=0,W._result=rt)}if(W._status===1)return W._result.default;throw W._result}var et=typeof reportError=="function"?reportError:function(W){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var rt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W=="object"&&W!==null&&typeof W.message=="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(rt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",W);return}console.error(W)},at={map:q,forEach:function(W,rt,ft){q(W,function(){rt.apply(this,arguments)},ft)},count:function(W){var rt=0;return q(W,function(){rt++}),rt},toArray:function(W){return q(W,function(rt){return rt})||[]},only:function(W){if(!z(W))throw Error("React.Children.only expected to receive a single React element child.");return W}};return Se.Activity=g,Se.Children=at,Se.Component=k,Se.Fragment=r,Se.Profiler=a,Se.PureComponent=E,Se.StrictMode=n,Se.Suspense=u,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Se.__COMPILER_RUNTIME={__proto__:null,c:function(W){return A.H.useMemoCache(W)}},Se.cache=function(W){return function(){return W.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(W,rt,ft){if(W==null)throw Error("The argument must be a React element, but you passed "+W+".");var st=_({},W.props),Ct=W.key;if(rt!=null)for(ct in rt.key!==void 0&&(Ct=""+rt.key),rt)!M.call(rt,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&rt.ref===void 0||(st[ct]=rt[ct]);var ct=arguments.length-2;if(ct===1)st.children=ft;else if(1<ct){for(var X=Array(ct),Z=0;Z<ct;Z++)X[Z]=arguments[Z+2];st.children=X}return F(W.type,Ct,st)},Se.createContext=function(W){return W={$$typeof:c,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:o,_context:W},W},Se.createElement=function(W,rt,ft){var st,Ct={},ct=null;if(rt!=null)for(st in rt.key!==void 0&&(ct=""+rt.key),rt)M.call(rt,st)&&st!=="key"&&st!=="__self"&&st!=="__source"&&(Ct[st]=rt[st]);var X=arguments.length-2;if(X===1)Ct.children=ft;else if(1<X){for(var Z=Array(X),Q=0;Q<X;Q++)Z[Q]=arguments[Q+2];Ct.children=Z}if(W&&W.defaultProps)for(st in X=W.defaultProps,X)Ct[st]===void 0&&(Ct[st]=X[st]);return F(W,ct,Ct)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(W){return{$$typeof:h,render:W}},Se.isValidElement=z,Se.lazy=function(W){return{$$typeof:f,_payload:{_status:-1,_result:W},_init:G}},Se.memo=function(W,rt){return{$$typeof:d,type:W,compare:rt===void 0?null:rt}},Se.startTransition=function(W){var rt=A.T,ft={};A.T=ft;try{var st=W(),Ct=A.S;Ct!==null&&Ct(ft,st),typeof st=="object"&&st!==null&&typeof st.then=="function"&&st.then(O,et)}catch(ct){et(ct)}finally{rt!==null&&ft.types!==null&&(rt.types=ft.types),A.T=rt}},Se.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Se.use=function(W){return A.H.use(W)},Se.useActionState=function(W,rt,ft){return A.H.useActionState(W,rt,ft)},Se.useCallback=function(W,rt){return A.H.useCallback(W,rt)},Se.useContext=function(W){return A.H.useContext(W)},Se.useDebugValue=function(){},Se.useDeferredValue=function(W,rt){return A.H.useDeferredValue(W,rt)},Se.useEffect=function(W,rt){return A.H.useEffect(W,rt)},Se.useEffectEvent=function(W){return A.H.useEffectEvent(W)},Se.useId=function(){return A.H.useId()},Se.useImperativeHandle=function(W,rt,ft){return A.H.useImperativeHandle(W,rt,ft)},Se.useInsertionEffect=function(W,rt){return A.H.useInsertionEffect(W,rt)},Se.useLayoutEffect=function(W,rt){return A.H.useLayoutEffect(W,rt)},Se.useMemo=function(W,rt){return A.H.useMemo(W,rt)},Se.useOptimistic=function(W,rt){return A.H.useOptimistic(W,rt)},Se.useReducer=function(W,rt,ft){return A.H.useReducer(W,rt,ft)},Se.useRef=function(W){return A.H.useRef(W)},Se.useState=function(W){return A.H.useState(W)},Se.useSyncExternalStore=function(W,rt,ft){return A.H.useSyncExternalStore(W,rt,ft)},Se.useTransition=function(){return A.H.useTransition()},Se.version="19.2.4",Se}var FS;function b1(){return FS||(FS=1,Bb.exports=D4()),Bb.exports}var Y=b1();const QA=jd(Y),kot=L4({__proto__:null,default:QA},[Y]);var Lb={exports:{}},bu={},Ob={exports:{}},Rb={};/**
|
|
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 IS;function j4(){return IS||(IS=1,(function(i){function e(j,q){var G=j.length;j.push(q);t:for(;0<G;){var et=G-1>>>1,at=j[et];if(0<a(at,q))j[et]=q,j[G]=at,G=et;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 et=0,at=j.length,W=at>>>1;et<W;){var rt=2*(et+1)-1,ft=j[rt],st=rt+1,Ct=j[st];if(0>a(ft,G))st<at&&0>a(Ct,ft)?(j[et]=Ct,j[st]=G,et=st):(j[et]=ft,j[rt]=G,et=rt);else if(st<at&&0>a(Ct,G))j[et]=Ct,j[st]=G,et=st;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,_=!1,C=!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 B(j){if(_=!1,N(j),!v)if(r(u)!==null)v=!0,O||(O=!0,U());else{var q=r(d);q!==null&&H(B,q.startTime-j)}}var O=!1,A=-1,M=5,F=-1;function D(){return C?!0:!(i.unstable_now()-F<M)}function z(){if(C=!1,O){var j=i.unstable_now();F=j;var q=!0;try{t:{v=!1,_&&(_=!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 et=g.callback;if(typeof et=="function"){g.callback=null,x=g.priorityLevel;var at=et(g.expirationTime<=j);if(j=i.unstable_now(),typeof at=="function"){g.callback=at,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 W=r(d);W!==null&&H(B,W.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(z)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,$=K.port2;K.port1.onmessage=z,U=function(){$.postMessage(null)}}else U=function(){k(z,0)};function H(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(){C=!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 et=i.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?et+G:et):G=et,j){case 1:var at=-1;break;case 2:at=250;break;case 5:at=1073741823;break;case 4:at=1e4;break;default:at=5e3}return at=G+at,j={id:f++,callback:q,priorityLevel:j,startTime:G,expirationTime:at,sortIndex:-1},G>et?(j.sortIndex=G,e(d,j),r(u)===null&&j===r(d)&&(_?(T(A),A=-1):_=!0,H(B,G-et))):(j.sortIndex=at,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}}}})(Rb)),Rb}var $S;function F4(){return $S||($S=1,Ob.exports=j4()),Ob.exports}var Db={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 zS;function I4(){if(zS)return jr;zS=1;var i=b1();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 PS;function $4(){if(PS)return Db.exports;PS=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(),Db.exports=I4(),Db.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var qS;function z4(){if(qS)return bu;qS=1;var i=F4(),e=b1(),r=$4();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"),_=Symbol.for("react.fragment"),C=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"),B=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function U(s){return s===null||typeof s!="object"?null:(s=z&&s[z]||s["@@iterator"],typeof s=="function"?s:null)}var K=Symbol.for("react.client.reference");function $(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===K?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case _:return"Fragment";case k:return"Profiler";case C:return"StrictMode";case B:return"Suspense";case O:return"SuspenseList";case F: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:$(s.type)||"Memo";case M:l=s._payload,s=s._init;try{return $(s(l))}catch{}}return null}var H=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},et=[],at=-1;function W(s){return{current:s}}function rt(s){0>at||(s.current=et[at],et[at]=null,at--)}function ft(s,l){at++,et[at]=s.current,s.current=l}var st=W(null),Ct=W(null),ct=W(null),X=W(null);function Z(s,l){switch(ft(ct,l),ft(Ct,s),ft(st,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?iS(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=iS(l),s=rS(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}rt(st),ft(st,s)}function Q(){rt(st),rt(Ct),rt(ct)}function ot(s){s.memoizedState!==null&&ft(X,s);var l=st.current,p=rS(l,s.type);l!==p&&(ft(Ct,s),ft(st,p))}function vt(s){Ct.current===s&&(rt(st),rt(Ct)),X.current===s&&(rt(X),fu._currentValue=G)}var At,jt;function qt(s){if(At===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);At=l&&l[1]||"",jt=-1<p.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+At+s+jt}var Rt=!1;function Gt(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(xt){var yt=xt}Reflect.construct(s,[],Et)}else{try{Et.call()}catch(xt){yt=xt}s.call(Et.prototype)}}else{try{throw Error()}catch(xt){yt=xt}(Et=s())&&typeof Et.catch=="function"&&Et.catch(function(){})}}catch(xt){if(xt&&yt&&typeof xt.stack=="string")return[xt.stack,yt.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:"")?qt(p):""}function zt(s,l){switch(s.tag){case 26:case 27:case 5:return qt(s.type);case 16:return qt("Lazy");case 13:return s.child!==l&&l!==null?qt("Suspense Fallback"):qt("Suspense");case 19:return qt("SuspenseList");case 0:case 15:return Gt(s.type,!1);case 11:return Gt(s.type.render,!1);case 1:return Gt(s.type,!0);case 31:return qt("Activity");default:return""}}function ye(s){try{var l="",p=null;do l+=zt(s,p),p=s,s=s.return;while(s);return l}catch(b){return`
|
|
48
|
+
Error generating stack: `+b.message+`
|
|
49
|
+
`+b.stack}}var Ne=Object.prototype.hasOwnProperty,ve=i.unstable_scheduleCallback,pi=i.unstable_cancelCallback,Li=i.unstable_shouldYield,Ti=i.unstable_requestPaint,fe=i.unstable_now,_i=i.unstable_getCurrentPriorityLevel,$e=i.unstable_ImmediatePriority,Ue=i.unstable_UserBlockingPriority,Fe=i.unstable_NormalPriority,Ii=i.unstable_LowPriority,Oi=i.unstable_IdlePriority,xr=i.log,Cn=i.unstable_setDisableYieldValue,$i=null,De=null;function Ke(s){if(typeof xr=="function"&&Cn(s),De&&typeof De.setStrictMode=="function")try{De.setStrictMode($i,s)}catch{}}var Be=Math.clz32?Math.clz32:Zi,hr=Math.log,Ci=Math.LN2;function Zi(s){return s>>>=0,s===0?32:31-(hr(s)/Ci|0)|0}var Ae=256,er=262144,wr=4194304;function Ui(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=Ui(b):(R&=P,R!==0?w=Ui(R):p||(p=P&~s,p!==0&&(w=Ui(p))))):(P=b&~S,P!==0?w=Ui(P):R!==0?w=Ui(R):p||(p=b&~s,p!==0&&(w=Ui(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 he(){var s=wr;return wr<<=1,(wr&62914560)===0&&(wr=4194304),s}function ai(s){for(var l=[],p=0;31>p;p++)l.push(s);return l}function pe(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Wt(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-Be(p),Et=1<<St;P[St]=0,J[St]=-1;var yt=gt[St];if(yt!==null)for(gt[St]=null,St=0;St<yt.length;St++){var xt=yt[St];xt!==null&&(xt.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-Be(l);s.entangledLanes|=l,s.entanglements[b]=s.entanglements[b]|1073741824|p&261930}function le(s,l){var p=s.entangledLanes|=l;for(s=s.entanglements;p;){var b=31-Be(p),w=1<<b;w&l|s[b]&l&&(s[b]|=l),p&=~w}}function si(s,l){var p=l&-l;return p=(p&42)!==0?1:gi(p),(p&(s.suspendedLanes|l))!==0?0:p}function gi(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:TS(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),ki="__reactFiber$"+rr,Hi="__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[ki],delete s[Hi],delete s[In],delete s[wn],delete s[Sn]}function ur(s){var l=s[ki];if(l)return l;for(var p=s.parentNode;p;){if(l=p[kn]||p[ki]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(s=hS(s);s!==null;){if(p=s[ki])return p;s=hS(s)}return l}s=p,p=s.parentNode}return null}function Yr(s){if(s=s[ki]||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 oi(s){s[$n]=!0}var Kt=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++)Kt.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={},ie={};function ze(s){return Ne.call(ie,s)?!0:Ne.call(It,s)?!1:Lt.test(s)?ie[s]=!0:(It[s]=!0,!1)}function li(s,l,p){if(ze(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 Ve(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 zi(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 Ce(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Wi(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=Wi(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=Wi(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 Ho=/[\n"\\]/g;function Tr(s){return s.replace(Ho,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=""+Ce(l)):s.value!==""+Ce(l)&&(s.value=""+Ce(l)):R!=="submit"&&R!=="reset"||s.removeAttribute("value"),l!=null?Bt(s,R,Ce(l)):p!=null?Bt(s,R,Ce(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=""+Ce(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?""+Ce(p):"",l=l!=null?""+Ce(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=""+Ce(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 Ut(s,l,p){if(l!=null&&(l=""+Ce(l),l!==s.value&&(s.value=l),p==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=p!=null?""+Ce(p):""}function Le(s,l,p,b){if(l==null){if(b!=null){if(p!=null)throw Error(n(92));if(H(b)){if(1<b.length)throw Error(n(93));b=b[0]}p=b}p==null&&(p=""),l=p}p=Ce(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 Je=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 Ie(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||Je.has(l)?l==="float"?s.cssFloat=p:s[l]=(""+p).trim():s[l]=p+"px"}function He(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&&Ie(s,w,b)}else for(var S in l)l.hasOwnProperty(S)&&Ie(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 Ft(){}var Jt=null;function Ee(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var We=null,Pi=null;function Un(s){var l=Yr(s);if(l&&(s=l.stateNode)){var p=s[Hi]||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[Hi]||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":Ut(s,p.value,p.defaultValue);break t;case"select":l=p.value,l!=null&&Mt(s,!!p.multiple,l,!1)}}}var Ah=!1;function tf(s,l,p){if(Ah)return s(l,p);Ah=!0;try{var b=s(l);return b}finally{if(Ah=!1,(We!==null||Pi!==null)&&(qf(),We&&(l=We,s=Pi,Pi=We=null,Un(l),s)))for(l=0;l<s.length;l++)Un(s[l])}}function Mh(s,l){var p=s.stateNode;if(p===null)return null;var b=p[Hi]||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"),Am=!1;if(ts)try{var Bh={};Object.defineProperty(Bh,"passive",{get:function(){Am=!0}}),window.addEventListener("test",Bh,Bh),window.removeEventListener("test",Bh,Bh)}catch{Am=!1}var Hs=null,Mm=null,ef=null;function rC(){if(ef)return ef;var s,l=Mm,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 ef=w.slice(s,1<b?1-b:void 0)}function rf(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 nf(){return!0}function nC(){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)?nf:nC,this.isPropagationStopped=nC,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=nf)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=nf)},persist:function(){},isPersistent:nf}),l}var Wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},af=cn(Wo),Lh=g({},Wo,{view:0,detail:0}),Nj=cn(Lh),Bm,Lm,Oh,sf=g({},Lh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rm,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!==Oh&&(Oh&&s.type==="mousemove"?(Bm=s.screenX-Oh.screenX,Lm=s.screenY-Oh.screenY):Lm=Bm=0,Oh=s),Bm)},movementY:function(s){return"movementY"in s?s.movementY:Lm}}),aC=cn(sf),Aj=g({},sf,{dataTransfer:0}),Mj=cn(Aj),Bj=g({},Lh,{relatedTarget:0}),Om=cn(Bj),Lj=g({},Wo,{animationName:0,elapsedTime:0,pseudoElement:0}),Oj=cn(Lj),Rj=g({},Wo,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Dj=cn(Rj),jj=g({},Wo,{data:0}),sC=cn(jj),Fj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ij={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"},$j={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zj(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=$j[s])?!!l[s]:!1}function Rm(){return zj}var Pj=g({},Lh,{key:function(s){if(s.key){var l=Fj[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=rf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Ij[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rm,charCode:function(s){return s.type==="keypress"?rf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?rf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),qj=cn(Pj),Uj=g({},sf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oC=cn(Uj),Hj=g({},Lh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rm}),Wj=cn(Hj),Gj=g({},Wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yj=cn(Gj),Kj=g({},sf,{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}),Vj=cn(Kj),Xj=g({},Wo,{newState:0,oldState:0}),Zj=cn(Xj),Qj=[9,13,27,32],Dm=ts&&"CompositionEvent"in window,Rh=null;ts&&"documentMode"in document&&(Rh=document.documentMode);var Jj=ts&&"TextEvent"in window&&!Rh,lC=ts&&(!Dm||Rh&&8<Rh&&11>=Rh),cC=" ",hC=!1;function uC(s,l){switch(s){case"keyup":return Qj.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dC(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Vl=!1;function tF(s,l){switch(s){case"compositionend":return dC(l);case"keypress":return l.which!==32?null:(hC=!0,cC);case"textInput":return s=l.data,s===cC&&hC?null:s;default:return null}}function eF(s,l){if(Vl)return s==="compositionend"||!Dm&&uC(s,l)?(s=rC(),ef=Mm=Hs=null,Vl=!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 lC&&l.locale!=="ko"?null:l.data;default:return null}}var iF={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 fC(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!iF[s.type]:l==="textarea"}function pC(s,l,p,b){We?Pi?Pi.push(b):Pi=[b]:We=b,l=Vf(l,"onChange"),0<l.length&&(p=new af("onChange","change",null,p,b),s.push({event:p,listeners:l}))}var Dh=null,jh=null;function rF(s){Xw(s,0)}function of(s){var l=ln(s);if(Ps(l))return s}function gC(s,l){if(s==="change")return l}var mC=!1;if(ts){var jm;if(ts){var Fm="oninput"in document;if(!Fm){var yC=document.createElement("div");yC.setAttribute("oninput","return;"),Fm=typeof yC.oninput=="function"}jm=Fm}else jm=!1;mC=jm&&(!document.documentMode||9<document.documentMode)}function bC(){Dh&&(Dh.detachEvent("onpropertychange",xC),jh=Dh=null)}function xC(s){if(s.propertyName==="value"&&of(jh)){var l=[];pC(l,jh,s,Ee(s)),tf(rF,l)}}function nF(s,l,p){s==="focusin"?(bC(),Dh=l,jh=p,Dh.attachEvent("onpropertychange",xC)):s==="focusout"&&bC()}function aF(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return of(jh)}function sF(s,l){if(s==="click")return of(l)}function oF(s,l){if(s==="input"||s==="change")return of(l)}function lF(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Tn=typeof Object.is=="function"?Object.is:lF;function Fh(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(!Ne.call(l,w)||!Tn(s[w],l[w]))return!1}return!0}function vC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function _C(s,l){var p=vC(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=vC(p)}}function CC(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?CC(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function kC(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 Im(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 cF=ts&&"documentMode"in document&&11>=document.documentMode,Xl=null,$m=null,Ih=null,zm=!1;function wC(s,l,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;zm||Xl==null||Xl!==Ja(b)||(b=Xl,"selectionStart"in b&&Im(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}),Ih&&Fh(Ih,b)||(Ih=b,b=Vf($m,"onSelect"),0<b.length&&(l=new af("onSelect","select",null,l,p),s.push({event:l,listeners:b}),l.target=Xl)))}function Go(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Zl={animationend:Go("Animation","AnimationEnd"),animationiteration:Go("Animation","AnimationIteration"),animationstart:Go("Animation","AnimationStart"),transitionrun:Go("Transition","TransitionRun"),transitionstart:Go("Transition","TransitionStart"),transitioncancel:Go("Transition","TransitionCancel"),transitionend:Go("Transition","TransitionEnd")},Pm={},SC={};ts&&(SC=document.createElement("div").style,"AnimationEvent"in window||(delete Zl.animationend.animation,delete Zl.animationiteration.animation,delete Zl.animationstart.animation),"TransitionEvent"in window||delete Zl.transitionend.transition);function Yo(s){if(Pm[s])return Pm[s];if(!Zl[s])return s;var l=Zl[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in SC)return Pm[s]=l[p];return s}var TC=Yo("animationend"),EC=Yo("animationiteration"),NC=Yo("animationstart"),hF=Yo("transitionrun"),uF=Yo("transitionstart"),dF=Yo("transitioncancel"),AC=Yo("transitionend"),MC=new Map,qm="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(" ");qm.push("scrollEnd");function ca(s,l){MC.set(s,l),kt(l,[s])}var lf=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=[],Ql=0,Um=0;function cf(){for(var s=Ql,l=Um=Ql=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&&BC(p,w,S)}}function hf(s,l,p,b){Hn[Ql++]=s,Hn[Ql++]=l,Hn[Ql++]=p,Hn[Ql++]=b,Um|=b,s.lanes|=b,s=s.alternate,s!==null&&(s.lanes|=b)}function Hm(s,l,p,b){return hf(s,l,p,b),uf(s)}function Ko(s,l){return hf(s,null,null,l),uf(s)}function BC(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-Be(p),s=S.hiddenUpdates,b=s[w],b===null?s[w]=[l]:b.push(l),l.lane=p|536870912),S):null}function uf(s){if(50<su)throw su=0,Jy=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Jl={};function fF(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 fF(s,l,p,b)}function Wm(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 LC(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 df(s,l,p,b,w,S){var R=0;if(b=s,typeof s=="function")Wm(s)&&(R=1);else if(typeof s=="string")R=b4(s,p,st.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case F:return s=En(31,p,l,w),s.elementType=F,s.lanes=S,s;case _:return Vo(p.children,w,S,l);case C:R=8,w|=24;break;case k:return s=En(12,p,l,w|2),s.elementType=k,s.lanes=S,s;case B:return s=En(13,p,l,w),s.elementType=B,s.lanes=S,s;case O:return s=En(19,p,l,w),s.elementType=O,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case 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 Vo(s,l,p,b){return s=En(7,s,b,l),s.lanes=p,s}function Gm(s,l,p){return s=En(6,s,null,l),s.lanes=p,s}function OC(s){var l=En(18,null,null,0);return l.stateNode=s,l}function Ym(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 RC=new WeakMap;function Wn(s,l){if(typeof s=="object"&&s!==null){var p=RC.get(s);return p!==void 0?p:(l={value:s,source:l,stack:ye(l)},RC.set(s,l),l)}return{value:s,source:l,stack:ye(l)}}var tc=[],ec=0,ff=null,$h=0,Gn=[],Yn=0,Ws=null,Na=1,Aa="";function is(s,l){tc[ec++]=$h,tc[ec++]=ff,ff=s,$h=l}function DC(s,l,p){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Ws=s;var b=Na;s=Aa;var w=32-Be(b)-1;b&=~(1<<w),p+=1;var S=32-Be(l)+w;if(30<S){var R=w-w%5;S=(b&(1<<R)-1).toString(32),b>>=R,w-=R,Na=1<<32-Be(l)+w|p<<w|b,Aa=S+s}else Na=1<<S|p<<w|b,Aa=s}function Km(s){s.return!==null&&(is(s,1),DC(s,1,0))}function Vm(s){for(;s===ff;)ff=tc[--ec],tc[ec]=null,$h=tc[--ec],tc[ec]=null;for(;s===Ws;)Ws=Gn[--Yn],Gn[Yn]=null,Aa=Gn[--Yn],Gn[Yn]=null,Na=Gn[--Yn],Gn[Yn]=null}function jC(s,l){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Na=l.id,Aa=l.overflow,Ws=s}var Er=null,Ei=null,Xe=!1,Gs=null,Kn=!1,Xm=Error(n(519));function Ys(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zh(Wn(l,s)),Xm}function FC(s){var l=s.stateNode,p=s.type,b=s.memoizedProps;switch(l[ki]=s,l[Hi]=b,p){case"dialog":qe("cancel",l),qe("close",l);break;case"iframe":case"object":case"embed":qe("load",l);break;case"video":case"audio":for(p=0;p<lu.length;p++)qe(lu[p],l);break;case"source":qe("error",l);break;case"img":case"image":case"link":qe("error",l),qe("load",l);break;case"details":qe("toggle",l);break;case"input":qe("invalid",l),mt(l,b.value,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name,!0);break;case"select":qe("invalid",l);break;case"textarea":qe("invalid",l),Le(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||tS(l.textContent,p)?(b.popover!=null&&(qe("beforetoggle",l),qe("toggle",l)),b.onScroll!=null&&qe("scroll",l),b.onScrollEnd!=null&&qe("scrollend",l),b.onClick!=null&&(l.onclick=Ft),l=!0):l=!1,l||Ys(s,!0)}function IC(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 ic(s){if(s!==Er)return!1;if(!Xe)return IC(s),Xe=!0,!1;var l=s.tag,p;if((p=l!==3&&l!==27)&&((p=l===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||pb(s.type,s.memoizedProps)),p=!p),p&&Ei&&Ys(s),IC(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Ei=cS(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Ei=cS(s)}else l===27?(l=Ei,oo(s.type)?(s=xb,xb=null,Ei=s):Ei=l):Ei=Er?Xn(s.stateNode.nextSibling):null;return!0}function Xo(){Ei=Er=null,Xe=!1}function Zm(){var s=Gs;return s!==null&&(fn===null?fn=s:fn.push.apply(fn,s),Gs=null),s}function zh(s){Gs===null?Gs=[s]:Gs.push(s)}var Qm=W(null),Zo=null,rs=null;function Ks(s,l,p){ft(Qm,l._currentValue),l._currentValue=p}function ns(s){s._currentValue=Qm.current,rt(Qm)}function Jm(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 ty(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),Jm(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),Jm(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 rc(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(fu):s=[fu])}w=w.return}s!==null&&ty(l,s,p,b),l.flags|=262144}function pf(s){for(s=s.firstContext;s!==null;){if(!Tn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Qo(s){Zo=s,rs=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Nr(s){return $C(Zo,s)}function gf(s,l){return Zo===null&&Qo(s),$C(s,l)}function $C(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 pF=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()})}},gF=i.unstable_scheduleCallback,mF=i.unstable_NormalPriority,nr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ey(){return{controller:new pF,data:new Map,refCount:0}}function Ph(s){s.refCount--,s.refCount===0&&gF(mF,function(){s.controller.abort()})}var qh=null,iy=0,nc=0,ac=null;function yF(s,l){if(qh===null){var p=qh=[];iy=0,nc=ab(),ac={status:"pending",value:void 0,then:function(b){p.push(b)}}}return iy++,l.then(zC,zC),l}function zC(){if(--iy===0&&qh!==null){ac!==null&&(ac.status="fulfilled");var s=qh;qh=null,nc=0,ac=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function bF(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 PC=j.S;j.S=function(s,l){ww=fe(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&yF(s,l),PC!==null&&PC(s,l)};var Jo=W(null);function ry(){var s=Jo.current;return s!==null?s:wi.pooledCache}function mf(s,l){l===null?ft(Jo,Jo.current):ft(Jo,l.pool)}function qC(){var s=ry();return s===null?null:{parent:nr._currentValue,pool:s}}var sc=Error(n(460)),ny=Error(n(474)),yf=Error(n(542)),bf={then:function(){}};function UC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function HC(s,l,p){switch(p=s[p],p===void 0?s.push(l):p!==l&&(l.then(Ft,Ft),l=p),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,GC(s),s;default:if(typeof l.status=="string")l.then(Ft,Ft);else{if(s=wi,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,GC(s),s}throw el=l,sc}}function tl(s){try{var l=s._init;return l(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(el=p,sc):p}}var el=null;function WC(){if(el===null)throw Error(n(459));var s=el;return el=null,s}function GC(s){if(s===sc||s===yf)throw Error(n(483))}var oc=null,Uh=0;function xf(s){var l=Uh;return Uh+=1,oc===null&&(oc=[]),HC(oc,s,l)}function Hh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function vf(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 YC(s){function l(ut,nt){if(s){var pt=ut.deletions;pt===null?(ut.deletions=[nt],ut.flags|=16):pt.push(nt)}}function p(ut,nt){if(!s)return null;for(;nt!==null;)l(ut,nt),nt=nt.sibling;return null}function b(ut){for(var nt=new Map;ut!==null;)ut.key!==null?nt.set(ut.key,ut):nt.set(ut.index,ut),ut=ut.sibling;return nt}function w(ut,nt){return ut=es(ut,nt),ut.index=0,ut.sibling=null,ut}function S(ut,nt,pt){return ut.index=pt,s?(pt=ut.alternate,pt!==null?(pt=pt.index,pt<nt?(ut.flags|=67108866,nt):pt):(ut.flags|=67108866,nt)):(ut.flags|=1048576,nt)}function R(ut){return s&&ut.alternate===null&&(ut.flags|=67108866),ut}function P(ut,nt,pt,Tt){return nt===null||nt.tag!==6?(nt=Gm(pt,ut.mode,Tt),nt.return=ut,nt):(nt=w(nt,pt),nt.return=ut,nt)}function J(ut,nt,pt,Tt){var ce=pt.type;return ce===_?St(ut,nt,pt.props.children,Tt,pt.key):nt!==null&&(nt.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===M&&tl(ce)===nt.type)?(nt=w(nt,pt.props),Hh(nt,pt),nt.return=ut,nt):(nt=df(pt.type,pt.key,pt.props,null,ut.mode,Tt),Hh(nt,pt),nt.return=ut,nt)}function gt(ut,nt,pt,Tt){return nt===null||nt.tag!==4||nt.stateNode.containerInfo!==pt.containerInfo||nt.stateNode.implementation!==pt.implementation?(nt=Ym(pt,ut.mode,Tt),nt.return=ut,nt):(nt=w(nt,pt.children||[]),nt.return=ut,nt)}function St(ut,nt,pt,Tt,ce){return nt===null||nt.tag!==7?(nt=Vo(pt,ut.mode,Tt,ce),nt.return=ut,nt):(nt=w(nt,pt),nt.return=ut,nt)}function Et(ut,nt,pt){if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return nt=Gm(""+nt,ut.mode,pt),nt.return=ut,nt;if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case y:return pt=df(nt.type,nt.key,nt.props,null,ut.mode,pt),Hh(pt,nt),pt.return=ut,pt;case v:return nt=Ym(nt,ut.mode,pt),nt.return=ut,nt;case M:return nt=tl(nt),Et(ut,nt,pt)}if(H(nt)||U(nt))return nt=Vo(nt,ut.mode,pt,null),nt.return=ut,nt;if(typeof nt.then=="function")return Et(ut,xf(nt),pt);if(nt.$$typeof===E)return Et(ut,gf(ut,nt),pt);vf(ut,nt)}return null}function yt(ut,nt,pt,Tt){var ce=nt!==null?nt.key:null;if(typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint")return ce!==null?null:P(ut,nt,""+pt,Tt);if(typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case y:return pt.key===ce?J(ut,nt,pt,Tt):null;case v:return pt.key===ce?gt(ut,nt,pt,Tt):null;case M:return pt=tl(pt),yt(ut,nt,pt,Tt)}if(H(pt)||U(pt))return ce!==null?null:St(ut,nt,pt,Tt,null);if(typeof pt.then=="function")return yt(ut,nt,xf(pt),Tt);if(pt.$$typeof===E)return yt(ut,nt,gf(ut,pt),Tt);vf(ut,pt)}return null}function xt(ut,nt,pt,Tt,ce){if(typeof Tt=="string"&&Tt!==""||typeof Tt=="number"||typeof Tt=="bigint")return ut=ut.get(pt)||null,P(nt,ut,""+Tt,ce);if(typeof Tt=="object"&&Tt!==null){switch(Tt.$$typeof){case y:return ut=ut.get(Tt.key===null?pt:Tt.key)||null,J(nt,ut,Tt,ce);case v:return ut=ut.get(Tt.key===null?pt:Tt.key)||null,gt(nt,ut,Tt,ce);case M:return Tt=tl(Tt),xt(ut,nt,pt,Tt,ce)}if(H(Tt)||U(Tt))return ut=ut.get(pt)||null,St(nt,ut,Tt,ce,null);if(typeof Tt.then=="function")return xt(ut,nt,pt,xf(Tt),ce);if(Tt.$$typeof===E)return xt(ut,nt,pt,gf(nt,Tt),ce);vf(nt,Tt)}return null}function Vt(ut,nt,pt,Tt){for(var ce=null,ti=null,te=nt,Oe=nt=0,Ye=null;te!==null&&Oe<pt.length;Oe++){te.index>Oe?(Ye=te,te=null):Ye=te.sibling;var ei=yt(ut,te,pt[Oe],Tt);if(ei===null){te===null&&(te=Ye);break}s&&te&&ei.alternate===null&&l(ut,te),nt=S(ei,nt,Oe),ti===null?ce=ei:ti.sibling=ei,ti=ei,te=Ye}if(Oe===pt.length)return p(ut,te),Xe&&is(ut,Oe),ce;if(te===null){for(;Oe<pt.length;Oe++)te=Et(ut,pt[Oe],Tt),te!==null&&(nt=S(te,nt,Oe),ti===null?ce=te:ti.sibling=te,ti=te);return Xe&&is(ut,Oe),ce}for(te=b(te);Oe<pt.length;Oe++)Ye=xt(te,ut,Oe,pt[Oe],Tt),Ye!==null&&(s&&Ye.alternate!==null&&te.delete(Ye.key===null?Oe:Ye.key),nt=S(Ye,nt,Oe),ti===null?ce=Ye:ti.sibling=Ye,ti=Ye);return s&&te.forEach(function(fo){return l(ut,fo)}),Xe&&is(ut,Oe),ce}function ge(ut,nt,pt,Tt){if(pt==null)throw Error(n(151));for(var ce=null,ti=null,te=nt,Oe=nt=0,Ye=null,ei=pt.next();te!==null&&!ei.done;Oe++,ei=pt.next()){te.index>Oe?(Ye=te,te=null):Ye=te.sibling;var fo=yt(ut,te,ei.value,Tt);if(fo===null){te===null&&(te=Ye);break}s&&te&&fo.alternate===null&&l(ut,te),nt=S(fo,nt,Oe),ti===null?ce=fo:ti.sibling=fo,ti=fo,te=Ye}if(ei.done)return p(ut,te),Xe&&is(ut,Oe),ce;if(te===null){for(;!ei.done;Oe++,ei=pt.next())ei=Et(ut,ei.value,Tt),ei!==null&&(nt=S(ei,nt,Oe),ti===null?ce=ei:ti.sibling=ei,ti=ei);return Xe&&is(ut,Oe),ce}for(te=b(te);!ei.done;Oe++,ei=pt.next())ei=xt(te,ut,Oe,ei.value,Tt),ei!==null&&(s&&ei.alternate!==null&&te.delete(ei.key===null?Oe:ei.key),nt=S(ei,nt,Oe),ti===null?ce=ei:ti.sibling=ei,ti=ei);return s&&te.forEach(function(A4){return l(ut,A4)}),Xe&&is(ut,Oe),ce}function vi(ut,nt,pt,Tt){if(typeof pt=="object"&&pt!==null&&pt.type===_&&pt.key===null&&(pt=pt.props.children),typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case y:t:{for(var ce=pt.key;nt!==null;){if(nt.key===ce){if(ce=pt.type,ce===_){if(nt.tag===7){p(ut,nt.sibling),Tt=w(nt,pt.props.children),Tt.return=ut,ut=Tt;break t}}else if(nt.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===M&&tl(ce)===nt.type){p(ut,nt.sibling),Tt=w(nt,pt.props),Hh(Tt,pt),Tt.return=ut,ut=Tt;break t}p(ut,nt);break}else l(ut,nt);nt=nt.sibling}pt.type===_?(Tt=Vo(pt.props.children,ut.mode,Tt,pt.key),Tt.return=ut,ut=Tt):(Tt=df(pt.type,pt.key,pt.props,null,ut.mode,Tt),Hh(Tt,pt),Tt.return=ut,ut=Tt)}return R(ut);case v:t:{for(ce=pt.key;nt!==null;){if(nt.key===ce)if(nt.tag===4&&nt.stateNode.containerInfo===pt.containerInfo&&nt.stateNode.implementation===pt.implementation){p(ut,nt.sibling),Tt=w(nt,pt.children||[]),Tt.return=ut,ut=Tt;break t}else{p(ut,nt);break}else l(ut,nt);nt=nt.sibling}Tt=Ym(pt,ut.mode,Tt),Tt.return=ut,ut=Tt}return R(ut);case M:return pt=tl(pt),vi(ut,nt,pt,Tt)}if(H(pt))return Vt(ut,nt,pt,Tt);if(U(pt)){if(ce=U(pt),typeof ce!="function")throw Error(n(150));return pt=ce.call(pt),ge(ut,nt,pt,Tt)}if(typeof pt.then=="function")return vi(ut,nt,xf(pt),Tt);if(pt.$$typeof===E)return vi(ut,nt,gf(ut,pt),Tt);vf(ut,pt)}return typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint"?(pt=""+pt,nt!==null&&nt.tag===6?(p(ut,nt.sibling),Tt=w(nt,pt),Tt.return=ut,ut=Tt):(p(ut,nt),Tt=Gm(pt,ut.mode,Tt),Tt.return=ut,ut=Tt),R(ut)):p(ut,nt)}return function(ut,nt,pt,Tt){try{Uh=0;var ce=vi(ut,nt,pt,Tt);return oc=null,ce}catch(te){if(te===sc||te===yf)throw te;var ti=En(29,te,null,ut.mode);return ti.lanes=Tt,ti.return=ut,ti}finally{}}}var il=YC(!0),KC=YC(!1),Vs=!1;function ay(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sy(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,(ni&2)!==0){var w=b.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),b.pending=l,l=uf(s),BC(s,null,p),l}return hf(s,b,l,p),uf(s)}function Wh(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,le(s,p)}}function oy(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 ly=!1;function Gh(){if(ly){var s=ac;if(s!==null)throw s}}function Yh(s,l,p,b){ly=!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 yt=P.lane&-536870913,xt=yt!==P.lane;if(xt?(Ge&yt)===yt:(b&yt)===yt){yt!==0&&yt===nc&&(ly=!0),St!==null&&(St=St.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});t:{var Vt=s,ge=P;yt=l;var vi=p;switch(ge.tag){case 1:if(Vt=ge.payload,typeof Vt=="function"){Et=Vt.call(vi,Et,yt);break t}Et=Vt;break t;case 3:Vt.flags=Vt.flags&-65537|128;case 0:if(Vt=ge.payload,yt=typeof Vt=="function"?Vt.call(vi,Et,yt):Vt,yt==null)break t;Et=g({},Et,yt);break t;case 2:Vs=!0}}yt=P.callback,yt!==null&&(s.flags|=64,xt&&(s.flags|=8192),xt=w.callbacks,xt===null?w.callbacks=[yt]:xt.push(yt))}else xt={lane:yt,tag:P.tag,payload:P.payload,callback:P.callback,next:null},St===null?(gt=St=xt,J=Et):St=St.next=xt,R|=yt;if(P=P.next,P===null){if(P=w.shared.pending,P===null)break;xt=P,P=xt.next,xt.next=null,w.lastBaseUpdate=xt,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 VC(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function XC(s,l){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)VC(p[s],l)}var lc=W(null),_f=W(0);function ZC(s,l){s=fs,ft(_f,s),ft(lc,l),fs=s|l.baseLanes}function cy(){ft(_f,fs),ft(lc,lc.current)}function hy(){fs=_f.current,rt(lc),rt(_f)}var Nn=W(null),Vn=null;function Qs(s){var l=s.alternate;ft(Qi,Qi.current&1),ft(Nn,s),Vn===null&&(l===null||lc.current!==null||l.memoizedState!==null)&&(Vn=s)}function uy(s){ft(Qi,Qi.current),ft(Nn,s),Vn===null&&(Vn=s)}function QC(s){s.tag===22?(ft(Qi,Qi.current),ft(Nn,s),Vn===null&&(Vn=s)):Js()}function Js(){ft(Qi,Qi.current),ft(Nn,Nn.current)}function An(s){rt(Nn),Vn===s&&(Vn=null),rt(Qi)}var Qi=W(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||yb(p)||bb(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,Me=null,bi=null,ar=null,kf=!1,cc=!1,rl=!1,wf=0,Kh=0,hc=null,xF=0;function Gi(){throw Error(n(321))}function dy(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 fy(s,l,p,b,w,S){return as=S,Me=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,j.H=s===null||s.memoizedState===null?Dk:Ny,rl=!1,S=p(b,w),rl=!1,cc&&(S=tk(l,p,b,w)),JC(s),S}function JC(s){j.H=Zh;var l=bi!==null&&bi.next!==null;if(as=0,ar=bi=Me=null,kf=!1,Kh=0,hc=null,l)throw Error(n(300));s===null||sr||(s=s.dependencies,s!==null&&pf(s)&&(sr=!0))}function tk(s,l,p,b){Me=s;var w=0;do{if(cc&&(hc=null),Kh=0,cc=!1,25<=w)throw Error(n(301));if(w+=1,ar=bi=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=jk,S=l(p,b)}while(cc);return S}function vF(){var s=j.H,l=s.useState()[0];return l=typeof l.then=="function"?Vh(l):l,s=s.useState()[0],(bi!==null?bi.memoizedState:null)!==s&&(Me.flags|=1024),l}function py(){var s=wf!==0;return wf=0,s}function gy(s,l,p){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~p}function my(s){if(kf){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}kf=!1}as=0,ar=bi=Me=null,cc=!1,Kh=wf=0,hc=null}function Kr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ar===null?Me.memoizedState=ar=s:ar=ar.next=s,ar}function Ji(){if(bi===null){var s=Me.alternate;s=s!==null?s.memoizedState:null}else s=bi.next;var l=ar===null?Me.memoizedState:ar.next;if(l!==null)ar=l,bi=s;else{if(s===null)throw Me.alternate===null?Error(n(467)):Error(n(310));bi=s,s={memoizedState:bi.memoizedState,baseState:bi.baseState,baseQueue:bi.baseQueue,queue:bi.queue,next:null},ar===null?Me.memoizedState=ar=s:ar=ar.next=s}return ar}function Sf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vh(s){var l=Kh;return Kh+=1,hc===null&&(hc=[]),s=HC(hc,s,l),l=Me,(ar===null?l.memoizedState:ar.next)===null&&(l=l.alternate,j.H=l===null||l.memoizedState===null?Dk:Ny),s}function Tf(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Vh(s);if(s.$$typeof===E)return Nr(s)}throw Error(n(438,String(s)))}function yy(s){var l=null,p=Me.updateQueue;if(p!==null&&(l=p.memoCache),l==null){var b=Me.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=Sf(),Me.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 Ef(s){var l=Ji();return by(l,bi,s)}function by(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?(Ge&Et)===Et:(as&Et)===Et){var yt=gt.revertLane;if(yt===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:gt.action,hasEagerState:gt.hasEagerState,eagerState:gt.eagerState,next:null}),Et===nc&&(St=!0);else if((as&yt)===yt){gt=gt.next,yt===nc&&(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,Me.lanes|=yt,io|=yt;Et=gt.action,rl&&p(S,Et),S=gt.hasEagerState?gt.eagerState:p(S,Et)}else yt={lane:Et,revertLane:gt.revertLane,gesture:gt.gesture,action:gt.action,hasEagerState:gt.hasEagerState,eagerState:gt.eagerState,next:null},J===null?(P=J=yt,R=S):J=J.next=yt,Me.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=ac,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 xy(s){var l=Ji(),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 ek(s,l,p){var b=Me,w=Ji(),S=Xe;if(S){if(p===void 0)throw Error(n(407));p=p()}else p=l();var R=!Tn((bi||w).memoizedState,p);if(R&&(w.memoizedState=p,sr=!0),w=w.queue,Cy(nk.bind(null,b,w,s),[s]),w.getSnapshot!==l||R||ar!==null&&ar.memoizedState.tag&1){if(b.flags|=2048,uc(9,{destroy:void 0},rk.bind(null,b,w,p,l),null),wi===null)throw Error(n(349));S||(as&127)!==0||ik(b,l,p)}return p}function ik(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=Me.updateQueue,l===null?(l=Sf(),Me.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function rk(s,l,p,b){l.value=p,l.getSnapshot=b,ak(l)&&sk(s)}function nk(s,l,p){return p(function(){ak(l)&&sk(s)})}function ak(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!Tn(s,p)}catch{return!0}}function sk(s){var l=Ko(s,2);l!==null&&pn(l,s,2)}function vy(s){var l=Kr();if(typeof s=="function"){var p=s;if(s=p(),rl){Ke(!0);try{p()}finally{Ke(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:s},l}function ok(s,l,p,b){return s.baseState=p,by(s,bi,typeof b=="function"?b:ss)}function _F(s,l,p,b,w){if(Mf(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,lk(l,S)):(S.next=p.next,l.pending=p.next=S)}}function lk(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),ck(s,l,P)}catch(gt){_y(s,l,gt)}finally{S!==null&&R.types!==null&&(S.types=R.types),j.T=S}}else try{S=p(w,b),ck(s,l,S)}catch(gt){_y(s,l,gt)}}function ck(s,l,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(b){hk(s,l,b)},function(b){return _y(s,l,b)}):hk(s,l,p)}function hk(s,l,p){l.status="fulfilled",l.value=p,uk(l),s.state=p,l=s.pending,l!==null&&(p=l.next,p===l?s.pending=null:(p=p.next,l.next=p,lk(s,p)))}function _y(s,l,p){var b=s.pending;if(s.pending=null,b!==null){b=b.next;do l.status="rejected",l.reason=p,uk(l),l=l.next;while(l!==b)}s.action=null}function uk(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function dk(s,l){return l}function fk(s,l){if(Xe){var p=wi.formState;if(p!==null){t:{var b=Me;if(Xe){if(Ei){e:{for(var w=Ei,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){Ei=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:dk,lastRenderedState:l},p.queue=b,p=Lk.bind(null,Me,b),b.dispatch=p,b=vy(!1),S=Ey.bind(null,Me,!1,b.queue),b=Kr(),w={state:l,dispatch:null,action:s,pending:null},b.queue=w,p=_F.bind(null,Me,w,S,p),w.dispatch=p,b.memoizedState=s,[l,p,!1]}function pk(s){var l=Ji();return gk(l,bi,s)}function gk(s,l,p){if(l=by(s,l,dk)[0],s=Ef(ss)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var b=Vh(l)}catch(R){throw R===sc?yf:R}else b=l;l=Ji();var w=l.queue,S=w.dispatch;return p!==l.memoizedState&&(Me.flags|=2048,uc(9,{destroy:void 0},CF.bind(null,w,p),null)),[b,S,s]}function CF(s,l){s.action=l}function mk(s){var l=Ji(),p=bi;if(p!==null)return gk(l,p,s);Ji(),l=l.memoizedState,p=Ji();var b=p.queue.dispatch;return p.memoizedState=s,[l,b,!1]}function uc(s,l,p,b){return s={tag:s,create:p,deps:b,inst:l,next:null},l=Me.updateQueue,l===null&&(l=Sf(),Me.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 yk(){return Ji().memoizedState}function Nf(s,l,p,b){var w=Kr();Me.flags|=s,w.memoizedState=uc(1|l,{destroy:void 0},p,b===void 0?null:b)}function Af(s,l,p,b){var w=Ji();b=b===void 0?null:b;var S=w.memoizedState.inst;bi!==null&&b!==null&&dy(b,bi.memoizedState.deps)?w.memoizedState=uc(l,S,p,b):(Me.flags|=s,w.memoizedState=uc(1|l,S,p,b))}function bk(s,l){Nf(8390656,8,s,l)}function Cy(s,l){Af(2048,8,s,l)}function kF(s){Me.flags|=4;var l=Me.updateQueue;if(l===null)l=Sf(),Me.updateQueue=l,l.events=[s];else{var p=l.events;p===null?l.events=[s]:p.push(s)}}function xk(s){var l=Ji().memoizedState;return kF({ref:l,nextImpl:s}),function(){if((ni&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function vk(s,l){return Af(4,2,s,l)}function _k(s,l){return Af(4,4,s,l)}function Ck(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 kk(s,l,p){p=p!=null?p.concat([s]):null,Af(4,4,Ck.bind(null,l,s),p)}function ky(){}function wk(s,l){var p=Ji();l=l===void 0?null:l;var b=p.memoizedState;return l!==null&&dy(l,b[1])?b[0]:(p.memoizedState=[s,l],s)}function Sk(s,l){var p=Ji();l=l===void 0?null:l;var b=p.memoizedState;if(l!==null&&dy(l,b[1]))return b[0];if(b=s(),rl){Ke(!0);try{s()}finally{Ke(!1)}}return p.memoizedState=[b,l],b}function wy(s,l,p){return p===void 0||(as&1073741824)!==0&&(Ge&261930)===0?s.memoizedState=l:(s.memoizedState=p,s=Tw(),Me.lanes|=s,io|=s,p)}function Tk(s,l,p,b){return Tn(p,l)?p:lc.current!==null?(s=wy(s,p,b),Tn(s,l)||(sr=!0),s):(as&42)===0||(as&1073741824)!==0&&(Ge&261930)===0?(sr=!0,s.memoizedState=p):(s=Tw(),Me.lanes|=s,io|=s,l)}function Ek(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,Ey(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=bF(J,b);Xh(s,l,St,Ln(s))}else Xh(s,l,b,Ln(s))}catch(Et){Xh(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 wF(){}function Sy(s,l,p,b){if(s.tag!==5)throw Error(n(476));var w=Nk(s).queue;Ek(s,w,l,G,p===null?wF:function(){return Ak(s),p(b)})}function Nk(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 Ak(s){var l=Nk(s);l.next===null&&(l=s.alternate.memoizedState),Xh(s,l.next.queue,{},Ln())}function Ty(){return Nr(fu)}function Mk(){return Ji().memoizedState}function Bk(){return Ji().memoizedState}function SF(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),Wh(b,l,p)),l={cache:ey()},s.payload=l;return}l=l.return}}function TF(s,l,p){var b=Ln();p={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Mf(s)?Ok(l,p):(p=Hm(s,l,p,b),p!==null&&(pn(p,s,b),Rk(p,l,b)))}function Lk(s,l,p){var b=Ln();Xh(s,l,p,b)}function Xh(s,l,p,b){var w={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Mf(s))Ok(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 hf(s,l,w,0),wi===null&&cf(),!1}catch{}finally{}if(p=Hm(s,l,w,b),p!==null)return pn(p,s,b),Rk(p,l,b),!0}return!1}function Ey(s,l,p,b){if(b={lane:2,revertLane:ab(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Mf(s)){if(l)throw Error(n(479))}else l=Hm(s,p,b,2),l!==null&&pn(l,s,2)}function Mf(s){var l=s.alternate;return s===Me||l!==null&&l===Me}function Ok(s,l){cc=kf=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function Rk(s,l,p){if((p&4194048)!==0){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,le(s,p)}}var Zh={readContext:Nr,use:Tf,useCallback:Gi,useContext:Gi,useEffect:Gi,useImperativeHandle:Gi,useLayoutEffect:Gi,useInsertionEffect:Gi,useMemo:Gi,useReducer:Gi,useRef:Gi,useState:Gi,useDebugValue:Gi,useDeferredValue:Gi,useTransition:Gi,useSyncExternalStore:Gi,useId:Gi,useHostTransitionStatus:Gi,useFormState:Gi,useActionState:Gi,useOptimistic:Gi,useMemoCache:Gi,useCacheRefresh:Gi};Zh.useEffectEvent=Gi;var Dk={readContext:Nr,use:Tf,useCallback:function(s,l){return Kr().memoizedState=[s,l===void 0?null:l],s},useContext:Nr,useEffect:bk,useImperativeHandle:function(s,l,p){p=p!=null?p.concat([s]):null,Nf(4194308,4,Ck.bind(null,l,s),p)},useLayoutEffect:function(s,l){return Nf(4194308,4,s,l)},useInsertionEffect:function(s,l){Nf(4,2,s,l)},useMemo:function(s,l){var p=Kr();l=l===void 0?null:l;var b=s();if(rl){Ke(!0);try{s()}finally{Ke(!1)}}return p.memoizedState=[b,l],b},useReducer:function(s,l,p){var b=Kr();if(p!==void 0){var w=p(l);if(rl){Ke(!0);try{p(l)}finally{Ke(!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=TF.bind(null,Me,s),[b.memoizedState,s]},useRef:function(s){var l=Kr();return s={current:s},l.memoizedState=s},useState:function(s){s=vy(s);var l=s.queue,p=Lk.bind(null,Me,l);return l.dispatch=p,[s.memoizedState,p]},useDebugValue:ky,useDeferredValue:function(s,l){var p=Kr();return wy(p,s,l)},useTransition:function(){var s=vy(!1);return s=Ek.bind(null,Me,s.queue,!0,!1),Kr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,p){var b=Me,w=Kr();if(Xe){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),wi===null)throw Error(n(349));(Ge&127)!==0||ik(b,l,p)}w.memoizedState=p;var S={value:p,getSnapshot:l};return w.queue=S,bk(nk.bind(null,b,S,s),[s]),b.flags|=2048,uc(9,{destroy:void 0},rk.bind(null,b,S,p,l),null),p},useId:function(){var s=Kr(),l=wi.identifierPrefix;if(Xe){var p=Aa,b=Na;p=(b&~(1<<32-Be(b)-1)).toString(32)+p,l="_"+l+"R_"+p,p=wf++,0<p&&(l+="H"+p.toString(32)),l+="_"}else p=xF++,l="_"+l+"r_"+p.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Ty,useFormState:fk,useActionState:fk,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=Ey.bind(null,Me,!0,p),p.dispatch=l,[s,l]},useMemoCache:yy,useCacheRefresh:function(){return Kr().memoizedState=SF.bind(null,Me)},useEffectEvent:function(s){var l=Kr(),p={impl:s};return l.memoizedState=p,function(){if((ni&2)!==0)throw Error(n(440));return p.impl.apply(void 0,arguments)}}},Ny={readContext:Nr,use:Tf,useCallback:wk,useContext:Nr,useEffect:Cy,useImperativeHandle:kk,useInsertionEffect:vk,useLayoutEffect:_k,useMemo:Sk,useReducer:Ef,useRef:yk,useState:function(){return Ef(ss)},useDebugValue:ky,useDeferredValue:function(s,l){var p=Ji();return Tk(p,bi.memoizedState,s,l)},useTransition:function(){var s=Ef(ss)[0],l=Ji().memoizedState;return[typeof s=="boolean"?s:Vh(s),l]},useSyncExternalStore:ek,useId:Mk,useHostTransitionStatus:Ty,useFormState:pk,useActionState:pk,useOptimistic:function(s,l){var p=Ji();return ok(p,bi,s,l)},useMemoCache:yy,useCacheRefresh:Bk};Ny.useEffectEvent=xk;var jk={readContext:Nr,use:Tf,useCallback:wk,useContext:Nr,useEffect:Cy,useImperativeHandle:kk,useInsertionEffect:vk,useLayoutEffect:_k,useMemo:Sk,useReducer:xy,useRef:yk,useState:function(){return xy(ss)},useDebugValue:ky,useDeferredValue:function(s,l){var p=Ji();return bi===null?wy(p,s,l):Tk(p,bi.memoizedState,s,l)},useTransition:function(){var s=xy(ss)[0],l=Ji().memoizedState;return[typeof s=="boolean"?s:Vh(s),l]},useSyncExternalStore:ek,useId:Mk,useHostTransitionStatus:Ty,useFormState:mk,useActionState:mk,useOptimistic:function(s,l){var p=Ji();return bi!==null?ok(p,bi,s,l):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:yy,useCacheRefresh:Bk};jk.useEffectEvent=xk;function Ay(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 My={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),Wh(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),Wh(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),Wh(l,s,p))}};function Fk(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?!Fh(p,b)||!Fh(w,S):!0}function Ik(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&&My.enqueueReplaceState(l,l.state,null)}function nl(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 $k(s){lf(s)}function zk(s){console.error(s)}function Pk(s){lf(s)}function Bf(s,l){try{var p=s.onUncaughtError;p(l.value,{componentStack:l.stack})}catch(b){setTimeout(function(){throw b})}}function qk(s,l,p){try{var b=s.onCaughtError;b(p.value,{componentStack:p.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function By(s,l,p){return p=Xs(p),p.tag=3,p.payload={element:null},p.callback=function(){Bf(s,l)},p}function Uk(s){return s=Xs(s),s.tag=3,s}function Hk(s,l,p,b){var w=p.type.getDerivedStateFromError;if(typeof w=="function"){var S=b.value;s.payload=function(){return w(S)},s.callback=function(){qk(l,p,b)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(s.callback=function(){qk(l,p,b),typeof w!="function"&&(ro===null?ro=new Set([this]):ro.add(this));var P=b.stack;this.componentDidCatch(b.value,{componentStack:P!==null?P:""})})}function EF(s,l,p,b,w){if(p.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){if(l=p.alternate,l!==null&&rc(l,p,w,!0),p=Nn.current,p!==null){switch(p.tag){case 31:case 13:return Vn===null?Uf():p.alternate===null&&Yi===0&&(Yi=3),p.flags&=-257,p.flags|=65536,p.lanes=w,b===bf?p.flags|=16384:(l=p.updateQueue,l===null?p.updateQueue=new Set([b]):l.add(b),ib(s,b,w)),!1;case 22:return p.flags|=65536,b===bf?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)),ib(s,b,w)),!1}throw Error(n(435,p.tag))}return ib(s,b,w),Uf(),!1}if(Xe)return l=Nn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,b!==Xm&&(s=Error(n(422),{cause:b}),zh(Wn(s,p)))):(b!==Xm&&(l=Error(n(423),{cause:b}),zh(Wn(l,p))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,b=Wn(b,p),w=By(s.stateNode,b,w),oy(s,w),Yi!==4&&(Yi=2)),!1;var S=Error(n(520),{cause:b});if(S=Wn(S,p),au===null?au=[S]:au.push(S),Yi!==4&&(Yi=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=By(p.stateNode,b,s),oy(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=Uk(w),Hk(w,s,p,b),oy(p,w),!1}p=p.return}while(p!==null);return!1}var Ly=Error(n(461)),sr=!1;function Ar(s,l,p,b){l.child=s===null?KC(l,null,p,b):il(l,s.child,p,b)}function Wk(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 Qo(l),b=fy(s,l,p,R,S,w),P=py(),s!==null&&!sr?(gy(s,l,w),os(s,l,w)):(Xe&&P&&Km(l),l.flags|=1,Ar(s,l,b,w),l.child)}function Gk(s,l,p,b,w){if(s===null){var S=p.type;return typeof S=="function"&&!Wm(S)&&S.defaultProps===void 0&&p.compare===null?(l.tag=15,l.type=S,Yk(s,l,S,b,w)):(s=df(p.type,null,b,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!zy(s,w)){var R=S.memoizedProps;if(p=p.compare,p=p!==null?p:Fh,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 Yk(s,l,p,b,w){if(s!==null){var S=s.memoizedProps;if(Fh(S,b)&&s.ref===l.ref)if(sr=!1,l.pendingProps=b=S,zy(s,w))(s.flags&131072)!==0&&(sr=!0);else return l.lanes=s.lanes,os(s,l,w)}return Oy(s,l,p,b,w)}function Kk(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 Vk(s,l,S,p,b)}if((p&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&mf(l,S!==null?S.cachePool:null),S!==null?ZC(l,S):cy(),QC(l);else return b=l.lanes=536870912,Vk(s,l,S!==null?S.baseLanes|p:p,p,b)}else S!==null?(mf(l,S.cachePool),ZC(l,S),Js(),l.memoizedState=null):(s!==null&&mf(l,null),cy(),Js());return Ar(s,l,w,p),l.child}function Qh(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Vk(s,l,p,b,w){var S=ry();return S=S===null?null:{parent:nr._currentValue,pool:S},l.memoizedState={baseLanes:p,cachePool:S},s!==null&&mf(l,null),cy(),QC(l),s!==null&&rc(s,l,b,!0),l.childLanes=w,null}function Lf(s,l){return l=Rf({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function Xk(s,l,p){return il(l,s.child,null,p),s=Lf(l,l.pendingProps),s.flags|=2,An(l),l.memoizedState=null,s}function NF(s,l,p){var b=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(Xe){if(b.mode==="hidden")return s=Lf(l,b),l.lanes=536870912,Qh(null,s);if(uy(l),(s=Ei)?(s=lS(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=OC(s),p.return=l,l.child=p,Er=l,Ei=null)):s=null,s===null)throw Ys(l);return l.lanes=536870912,null}return Lf(l,b)}var S=s.memoizedState;if(S!==null){var R=S.dehydrated;if(uy(l),w)if(l.flags&256)l.flags&=-257,l=Xk(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||rc(s,l,p,!1),w=(p&s.childLanes)!==0,sr||w){if(b=wi,b!==null&&(R=si(b,p),R!==0&&R!==S.retryLane))throw S.retryLane=R,Ko(s,R),pn(b,s,R),Ly;Uf(),l=Xk(s,l,p)}else s=S.treeContext,Ei=Xn(R.nextSibling),Er=l,Xe=!0,Gs=null,Kn=!1,s!==null&&jC(l,s),l=Lf(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 Of(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 Oy(s,l,p,b,w){return Qo(l),p=fy(s,l,p,b,void 0,w),b=py(),s!==null&&!sr?(gy(s,l,w),os(s,l,w)):(Xe&&b&&Km(l),l.flags|=1,Ar(s,l,p,w),l.child)}function Zk(s,l,p,b,w,S){return Qo(l),l.updateQueue=null,p=tk(l,b,p,w),JC(s),b=py(),s!==null&&!sr?(gy(s,l,S),os(s,l,S)):(Xe&&b&&Km(l),l.flags|=1,Ar(s,l,p,S),l.child)}function Qk(s,l,p,b,w){if(Qo(l),l.stateNode===null){var S=Jl,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=My,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=b,S.state=l.memoizedState,S.refs={},ay(l),R=p.contextType,S.context=typeof R=="object"&&R!==null?Nr(R):Jl,S.state=l.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Ay(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&&My.enqueueReplaceState(S,S.state,null),Yh(l,b,S,w),Gh(),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=nl(p,P);S.props=J;var gt=S.context,St=p.contextType;R=Jl,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)&&Ik(l,S,b,R),Vs=!1;var yt=l.memoizedState;S.state=yt,Yh(l,b,S,w),Gh(),gt=l.memoizedState,P||yt!==gt||Vs?(typeof Et=="function"&&(Ay(l,p,Et,b),gt=l.memoizedState),(J=Vs||Fk(l,p,J,b,yt,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,sy(s,l),R=l.memoizedProps,St=nl(p,R),S.props=St,Et=l.pendingProps,yt=S.context,gt=p.contextType,J=Jl,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||yt!==J)&&Ik(l,S,b,J),Vs=!1,yt=l.memoizedState,S.state=yt,Yh(l,b,S,w),Gh();var xt=l.memoizedState;R!==Et||yt!==xt||Vs||s!==null&&s.dependencies!==null&&pf(s.dependencies)?(typeof P=="function"&&(Ay(l,p,P,b),xt=l.memoizedState),(St=Vs||Fk(l,p,St,b,yt,xt,J)||s!==null&&s.dependencies!==null&&pf(s.dependencies))?(gt||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(b,xt,J),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(b,xt,J)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&yt===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&yt===s.memoizedState||(l.flags|=1024),l.memoizedProps=b,l.memoizedState=xt),S.props=b,S.state=xt,S.context=J,b=St):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&yt===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&yt===s.memoizedState||(l.flags|=1024),b=!1)}return S=b,Of(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=il(l,s.child,null,w),l.child=il(l,null,p,w)):Ar(s,l,p,w),l.memoizedState=S.state,s=l.child):s=os(s,l,w),s}function Jk(s,l,p,b){return Xo(),l.flags|=256,Ar(s,l,p,b),l.child}var Ry={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dy(s){return{baseLanes:s,cachePool:qC()}}function jy(s,l,p){return s=s!==null?s.childLanes&~p:0,l&&(s|=Bn),s}function tw(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:(Qi.current&2)!==0),R&&(w=!0,l.flags&=-129),R=(l.flags&32)!==0,l.flags&=-33,s===null){if(Xe){if(w?Qs(l):Js(),(s=Ei)?(s=lS(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=OC(s),p.return=l,l.child=p,Er=l,Ei=null)):s=null,s===null)throw Ys(l);return bb(s)?l.lanes=32:l.lanes=536870912,null}var P=b.children;return b=b.fallback,w?(Js(),w=l.mode,P=Rf({mode:"hidden",children:P},w),b=Vo(b,w,p,null),P.return=l,b.return=l,P.sibling=b,l.child=P,b=l.child,b.memoizedState=Dy(p),b.childLanes=jy(s,R,p),l.memoizedState=Ry,Qh(null,b)):(Qs(l),Fy(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=Iy(s,l,p)):l.memoizedState!==null?(Js(),l.child=s.child,l.flags|=128,l=null):(Js(),P=b.fallback,w=l.mode,b=Rf({mode:"visible",children:b.children},w),P=Vo(P,w,p,null),P.flags|=2,b.return=l,P.return=l,b.sibling=P,l.child=b,il(l,s.child,null,p),b=l.child,b.memoizedState=Dy(p),b.childLanes=jy(s,R,p),l.memoizedState=Ry,l=Qh(null,b));else if(Qs(l),bb(P)){if(R=P.nextSibling&&P.nextSibling.dataset,R)var gt=R.dgst;R=gt,b=Error(n(419)),b.stack="",b.digest=R,zh({value:b,source:null,stack:null}),l=Iy(s,l,p)}else if(sr||rc(s,l,p,!1),R=(p&s.childLanes)!==0,sr||R){if(R=wi,R!==null&&(b=si(R,p),b!==0&&b!==J.retryLane))throw J.retryLane=b,Ko(s,b),pn(R,s,b),Ly;yb(P)||Uf(),l=Iy(s,l,p)}else yb(P)?(l.flags|=192,l.child=s.child,l=null):(s=J.treeContext,Ei=Xn(P.nextSibling),Er=l,Xe=!0,Gs=null,Kn=!1,s!==null&&jC(l,s),l=Fy(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=Vo(P,w,p,null),P.flags|=2),P.return=l,b.return=l,b.sibling=P,l.child=b,Qh(null,b),b=l.child,P=s.child.memoizedState,P===null?P=Dy(p):(w=P.cachePool,w!==null?(J=nr._currentValue,w=w.parent!==J?{parent:J,pool:J}:w):w=qC(),P={baseLanes:P.baseLanes|p,cachePool:w}),b.memoizedState=P,b.childLanes=jy(s,R,p),l.memoizedState=Ry,Qh(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 Fy(s,l){return l=Rf({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Rf(s,l){return s=En(22,s,null,l),s.lanes=0,s}function Iy(s,l,p){return il(l,s.child,null,p),s=Fy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function ew(s,l,p){s.lanes|=l;var b=s.alternate;b!==null&&(b.lanes|=l),Jm(s.return,l,p)}function $y(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 iw(s,l,p){var b=l.pendingProps,w=b.revealOrder,S=b.tail;b=b.children;var R=Qi.current,P=(R&2)!==0;if(P?(R=R&1|2,l.flags|=128):R&=1,ft(Qi,R),Ar(s,l,b,p),b=Xe?$h:0,!P&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&ew(s,p,l);else if(s.tag===19)ew(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),$y(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}$y(l,!0,p,null,S,b);break;case"together":$y(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(rc(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 zy(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&pf(s)))}function AF(s,l,p){switch(l.tag){case 3:Z(l,l.stateNode.containerInfo),Ks(l,nr,s.memoizedState.cache),Xo();break;case 27:case 5:ot(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,uy(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?tw(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||(rc(s,l,p,!1),b=(p&l.childLanes)!==0),w){if(b)return iw(s,l,p);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),ft(Qi,Qi.current),b)break;return null;case 22:return l.lanes=0,Kk(s,l,p,l.pendingProps);case 24:Ks(l,nr,s.memoizedState.cache)}return os(s,l,p)}function rw(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps)sr=!0;else{if(!zy(s,p)&&(l.flags&128)===0)return sr=!1,AF(s,l,p);sr=(s.flags&131072)!==0}else sr=!1,Xe&&(l.flags&1048576)!==0&&DC(l,$h,l.index);switch(l.lanes=0,l.tag){case 16:t:{var b=l.pendingProps;if(s=tl(l.elementType),l.type=s,typeof s=="function")Wm(s)?(b=nl(s,b),l.tag=1,l=Qk(null,l,s,b,p)):(l.tag=0,l=Oy(null,l,s,b,p));else{if(s!=null){var w=s.$$typeof;if(w===N){l.tag=11,l=Wk(null,l,s,b,p);break t}else if(w===A){l.tag=14,l=Gk(null,l,s,b,p);break t}}throw l=$(s)||s,Error(n(306,l,""))}}return l;case 0:return Oy(s,l,l.type,l.pendingProps,p);case 1:return b=l.type,w=nl(b,l.pendingProps),Qk(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,sy(s,l),Yh(l,b,null,p);var R=l.memoizedState;if(b=R.cache,Ks(l,nr,b),b!==S.cache&&ty(l,[nr],p,!0),Gh(),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=Jk(s,l,b,p);break t}else if(b!==w){w=Wn(Error(n(424)),l),zh(w),l=Jk(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(Ei=Xn(s.firstChild),Er=l,Xe=!0,Gs=null,Kn=!0,p=KC(l,null,b,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Xo(),b===w){l=os(s,l,p);break t}Ar(s,l,b,p)}l=l.child}return l;case 26:return Of(s,l),s===null?(p=pS(l.type,null,l.pendingProps,null))?l.memoizedState=p:Xe||(p=l.type,s=l.pendingProps,b=Xf(ct.current).createElement(p),b[ki]=l,b[Hi]=s,Mr(b,p,s),oi(b),l.stateNode=b):l.memoizedState=pS(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return ot(l),s===null&&Xe&&(b=l.stateNode=uS(l.type,l.pendingProps,ct.current),Er=l,Kn=!0,w=Ei,oo(l.type)?(xb=w,Ei=Xn(b.firstChild)):Ei=w),Ar(s,l,l.pendingProps.children,p),Of(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Xe&&((w=b=Ei)&&(b=a4(b,l.type,l.pendingProps,Kn),b!==null?(l.stateNode=b,Er=l,Ei=Xn(b.firstChild),Kn=!1,w=!0):w=!1),w||Ys(l)),ot(l),w=l.type,S=l.pendingProps,R=s!==null?s.memoizedProps:null,b=S.children,pb(w,S)?b=null:R!==null&&pb(w,R)&&(l.flags|=32),l.memoizedState!==null&&(w=fy(s,l,vF,null,null,p),fu._currentValue=w),Of(s,l),Ar(s,l,b,p),l.child;case 6:return s===null&&Xe&&((s=p=Ei)&&(p=s4(p,l.pendingProps,Kn),p!==null?(l.stateNode=p,Er=l,Ei=null,s=!0):s=!1),s||Ys(l)),null;case 13:return tw(s,l,p);case 4:return Z(l,l.stateNode.containerInfo),b=l.pendingProps,s===null?l.child=il(l,null,b,p):Ar(s,l,b,p),l.child;case 11:return Wk(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,Qo(l),w=Nr(w),b=b(w),l.flags|=1,Ar(s,l,b,p),l.child;case 14:return Gk(s,l,l.type,l.pendingProps,p);case 15:return Yk(s,l,l.type,l.pendingProps,p);case 19:return iw(s,l,p);case 31:return NF(s,l,p);case 22:return Kk(s,l,p,l.pendingProps);case 24:return Qo(l),b=Nr(nr),s===null?(w=ry(),w===null&&(w=wi,S=ey(),w.pooledCache=S,S.refCount++,S!==null&&(w.pooledCacheLanes|=p),w=S),l.memoizedState={parent:b,cache:w},ay(l),Ks(l,nr,w)):((s.lanes&p)!==0&&(sy(s,l),Yh(l,null,null,p),Gh()),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&&ty(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 Py(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(Mw())s.flags|=8192;else throw el=bf,ny}else s.flags&=-16777217}function nw(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!xS(l))if(Mw())s.flags|=8192;else throw el=bf,ny}function Df(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?he():536870912,s.lanes|=l,gc|=l)}function Jh(s,l){if(!Xe)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 Ni(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 MF(s,l,p){var b=l.pendingProps;switch(Vm(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ni(l),null;case 1:return Ni(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),Q(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(ic(l)?ls(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Zm())),Ni(l),null;case 26:var w=l.type,S=l.memoizedState;return s===null?(ls(l),S!==null?(Ni(l),nw(l,S)):(Ni(l),Py(l,w,null,b,p))):S?S!==s.memoizedState?(ls(l),Ni(l),nw(l,S)):(Ni(l),l.flags&=-16777217):(s=s.memoizedProps,s!==b&&ls(l),Ni(l),Py(l,w,s,b,p)),null;case 27:if(vt(l),p=ct.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 Ni(l),null}s=st.current,ic(l)?FC(l):(s=uS(w,b,p),l.stateNode=s,ls(l))}return Ni(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 Ni(l),null}if(S=st.current,ic(l))FC(l);else{var R=Xf(ct.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[ki]=l,S[Hi]=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 Ni(l),Py(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=ct.current,ic(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[ki]=l,s=!!(s.nodeValue===p||b!==null&&b.suppressHydrationWarning===!0||tS(s.nodeValue,p)),s||Ys(l,!0)}else s=Xf(s).createTextNode(b),s[ki]=l,l.stateNode=s}return Ni(l),null;case 31:if(p=l.memoizedState,s===null||s.memoizedState!==null){if(b=ic(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[ki]=l}else Xo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ni(l),s=!1}else p=Zm(),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 Ni(l),null;case 13:if(b=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=ic(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[ki]=l}else Xo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ni(l),w=!1}else w=Zm(),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),Df(l,l.updateQueue),Ni(l),null);case 4:return Q(),s===null&&cb(l.stateNode.containerInfo),Ni(l),null;case 10:return ns(l.type),Ni(l),null;case 19:if(rt(Qi),b=l.memoizedState,b===null)return Ni(l),null;if(w=(l.flags&128)!==0,S=b.rendering,S===null)if(w)Jh(b,!1);else{if(Yi!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=Cf(s),S!==null){for(l.flags|=128,Jh(b,!1),s=S.updateQueue,l.updateQueue=s,Df(l,s),l.subtreeFlags=0,s=p,p=l.child;p!==null;)LC(p,s),p=p.sibling;return ft(Qi,Qi.current&1|2),Xe&&is(l,b.treeForkCount),l.child}s=s.sibling}b.tail!==null&&fe()>zf&&(l.flags|=128,w=!0,Jh(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,Df(l,s),Jh(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!Xe)return Ni(l),null}else 2*fe()-b.renderingStartTime>zf&&p!==536870912&&(l.flags|=128,w=!0,Jh(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=fe(),s.sibling=null,p=Qi.current,ft(Qi,w?p&1|2:p&1),Xe&&is(l,b.treeForkCount),s):(Ni(l),null);case 22:case 23:return An(l),hy(),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&&(Ni(l),l.subtreeFlags&6&&(l.flags|=8192)):Ni(l),p=l.updateQueue,p!==null&&Df(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(Jo),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ns(nr),Ni(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function BF(s,l){switch(Vm(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ns(nr),Q(),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));Xo()}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));Xo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return rt(Qi),null;case 4:return Q(),null;case 10:return ns(l.type),null;case 22:case 23:return An(l),hy(),s!==null&&rt(Jo),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 aw(s,l){switch(Vm(l),l.tag){case 3:ns(nr),Q();break;case 26:case 27:case 5:vt(l);break;case 4:Q();break;case 31:l.memoizedState!==null&&An(l);break;case 13:An(l);break;case 19:rt(Qi);break;case 10:ns(l.type);break;case 22:case 23:An(l),hy(),s!==null&&rt(Jo);break;case 24:ns(nr)}}function tu(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){yi(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){yi(w,J,St)}}}b=b.next}while(b!==S)}}catch(St){yi(l,l.return,St)}}function sw(s){var l=s.updateQueue;if(l!==null){var p=s.stateNode;try{XC(l,p)}catch(b){yi(s,s.return,b)}}}function ow(s,l,p){p.props=nl(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(b){yi(s,l,b)}}function eu(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){yi(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){yi(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){yi(s,l,w)}else p.current=null}function lw(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){yi(s,s.return,w)}}function qy(s,l,p){try{var b=s.stateNode;JF(b,s.type,p,l),b[Hi]=l}catch(w){yi(s,s.return,w)}}function cw(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&oo(s.type)||s.tag===4}function Uy(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||cw(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 Hy(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=Ft));else if(b!==4&&(b===27&&oo(s.type)&&(p=s.stateNode,l=null),s=s.child,s!==null))for(Hy(s,l,p),s=s.sibling;s!==null;)Hy(s,l,p),s=s.sibling}function jf(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(jf(s,l,p),s=s.sibling;s!==null;)jf(s,l,p),s=s.sibling}function hw(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[ki]=s,l[Hi]=p}catch(S){yi(s,s.return,S)}}var cs=!1,or=!1,Wy=!1,uw=typeof WeakSet=="function"?WeakSet:Set,vr=null;function LF(s,l){if(s=s.containerInfo,db=rp,s=kC(s),Im(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,yt=null;e:for(;;){for(var xt;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),(xt=Et.firstChild)!==null;)yt=Et,Et=xt;for(;;){if(Et===s)break e;if(yt===p&&++gt===w&&(P=R),yt===S&&++St===b&&(J=R),(xt=Et.nextSibling)!==null)break;Et=yt,yt=Et.parentNode}Et=xt}p=P===-1||J===-1?null:{start:P,end:J}}else p=null}p=p||{start:0,end:0}}else p=null;for(fb={focusedElem:s,selectionRange:p},rp=!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 Vt=nl(p.type,w);s=b.getSnapshotBeforeUpdate(Vt,S),b.__reactInternalSnapshotBeforeUpdate=s}catch(ge){yi(p,p.return,ge)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,p=s.nodeType,p===9)mb(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":mb(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 dw(s,l,p){var b=p.flags;switch(p.tag){case 0:case 11:case 15:us(s,p),b&4&&tu(5,p);break;case 1:if(us(s,p),b&4)if(s=p.stateNode,l===null)try{s.componentDidMount()}catch(R){yi(p,p.return,R)}else{var w=nl(p.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(R){yi(p,p.return,R)}}b&64&&sw(p),b&512&&eu(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{XC(s,l)}catch(R){yi(p,p.return,R)}}break;case 27:l===null&&b&4&&hw(p);case 26:case 5:us(s,p),l===null&&b&4&&lw(p),b&512&&eu(p,p.return);break;case 12:us(s,p);break;case 31:us(s,p),b&4&&gw(s,p);break;case 13:us(s,p),b&4&&mw(s,p),b&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=PF.bind(null,p),o4(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 fw(s){var l=s.alternate;l!==null&&(s.alternate=null,fw(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 Ri=null,hn=!1;function hs(s,l,p){for(p=p.child;p!==null;)pw(s,l,p),p=p.sibling}function pw(s,l,p){if(De&&typeof De.onCommitFiberUnmount=="function")try{De.onCommitFiberUnmount($i,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=Ri,w=hn;oo(p.type)&&(Ri=p.stateNode,hn=!1),hs(s,l,p),hu(p.stateNode),Ri=b,hn=w;break;case 5:or||Ma(p,l);case 6:if(b=Ri,w=hn,Ri=null,hs(s,l,p),Ri=b,hn=w,Ri!==null)if(hn)try{(Ri.nodeType===9?Ri.body:Ri.nodeName==="HTML"?Ri.ownerDocument.body:Ri).removeChild(p.stateNode)}catch(S){yi(p,l,S)}else try{Ri.removeChild(p.stateNode)}catch(S){yi(p,l,S)}break;case 18:Ri!==null&&(hn?(s=Ri,sS(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),kc(s)):sS(Ri,p.stateNode));break;case 4:b=Ri,w=hn,Ri=p.stateNode.containerInfo,hn=!0,hs(s,l,p),Ri=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"&&ow(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 gw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{kc(s)}catch(p){yi(l,l.return,p)}}}function mw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{kc(s)}catch(p){yi(l,l.return,p)}}function OF(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new uw),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new uw),l;default:throw Error(n(435,s.tag))}}function Ff(s,l){var p=OF(s);l.forEach(function(b){if(!p.has(b)){p.add(b);var w=qF.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)){Ri=P.stateNode,hn=!1;break t}break;case 5:Ri=P.stateNode,hn=!1;break t;case 3:case 4:Ri=P.stateNode.containerInfo,hn=!0;break t}P=P.return}if(Ri===null)throw Error(n(160));pw(S,R,w),Ri=null,hn=!1,S=w.alternate,S!==null&&(S.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)yw(l,s),l=l.sibling}var ha=null;function yw(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),tu(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[ki]||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[ki]=s,oi(S),b=S;break t;case"link":var R=yS("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=yS("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[ki]=s,oi(S),b=S}s.stateNode=b}else bS(w,s.type,s.stateNode);else s.stateNode=mS(w,b,s.memoizedProps);else S!==b?(S===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):S.count--,b===null?bS(w,s.type,s.stateNode):mS(w,b,s.memoizedProps)):b===null&&s.stateNode!==null&&qy(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&&qy(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(Vt){yi(s,s.return,Vt)}}b&4&&s.stateNode!=null&&(w=s.memoizedProps,qy(s,w,p!==null?p.memoizedProps:w)),b&1024&&(Wy=!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(Vt){yi(s,s.return,Vt)}}break;case 3:if(Jf=null,w=ha,ha=Zf(l.containerInfo),un(l,s),ha=w,dn(s),b&4&&p!==null&&p.memoizedState.isDehydrated)try{kc(l.containerInfo)}catch(Vt){yi(s,s.return,Vt)}Wy&&(Wy=!1,bw(s));break;case 4:b=ha,ha=Zf(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,Ff(s,b)));break;case 13:un(l,s),dn(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&($f=fe()),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,Ff(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||al(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,yt=Et!=null&&Et.hasOwnProperty("display")?Et.display:null;P.style.display=yt==null||typeof yt=="boolean"?"":(""+yt).trim()}}catch(Vt){yi(J,J.return,Vt)}}}else if(l.tag===6){if(p===null){J=l;try{J.stateNode.nodeValue=w?"":J.memoizedProps}catch(Vt){yi(J,J.return,Vt)}}}else if(l.tag===18){if(p===null){J=l;try{var xt=J.stateNode;w?oS(xt,!0):oS(J.stateNode,!1)}catch(Vt){yi(J,J.return,Vt)}}}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,Ff(s,p))));break;case 19:un(l,s),dn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,Ff(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(cw(b)){p=b;break}b=b.return}if(p==null)throw Error(n(160));switch(p.tag){case 27:var w=p.stateNode,S=Uy(s);jf(s,S,w);break;case 5:var R=p.stateNode;p.flags&32&&($t(R,""),p.flags&=-33);var P=Uy(s);jf(s,P,R);break;case 3:case 4:var J=p.stateNode.containerInfo,gt=Uy(s);Hy(s,gt,J);break;default:throw Error(n(161))}}catch(St){yi(s,s.return,St)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function bw(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;bw(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;)dw(s,l.alternate,l),l=l.sibling}function al(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),al(l);break;case 1:Ma(l,l.return);var p=l.stateNode;typeof p.componentWillUnmount=="function"&&ow(l,l.return,p),al(l);break;case 27:hu(l.stateNode);case 26:case 5:Ma(l,l.return),al(l);break;case 22:l.memoizedState===null&&al(l);break;case 30:al(l);break;default:al(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),tu(4,S);break;case 1:if(ds(w,S,p),b=S,w=b.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(gt){yi(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++)VC(J[w],P)}catch(gt){yi(b,b.return,gt)}}p&&R&64&&sw(S),eu(S,S.return);break;case 27:hw(S);case 26:case 5:ds(w,S,p),p&&b===null&&R&4&&lw(S),eu(S,S.return);break;case 12:ds(w,S,p);break;case 31:ds(w,S,p),p&&R&4&&gw(w,S);break;case 13:ds(w,S,p),p&&R&4&&mw(w,S);break;case 22:S.memoizedState===null&&ds(w,S,p),eu(S,S.return);break;case 30:break;default:ds(w,S,p)}l=l.sibling}}function Gy(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&&Ph(p))}function Yy(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Ph(s))}function ua(s,l,p,b){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)xw(s,l,p,b),l=l.sibling}function xw(s,l,p,b){var w=l.flags;switch(l.tag){case 0:case 11:case 15:ua(s,l,p,b),w&2048&&tu(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&&Ph(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){yi(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):iu(s,l):S._visibility&2?ua(s,l,p,b):(S._visibility|=2,dc(s,l,p,b,(l.subtreeFlags&10256)!==0||!1)),w&2048&&Gy(R,l);break;case 24:ua(s,l,p,b),w&2048&&Yy(l.alternate,l);break;default:ua(s,l,p,b)}}function dc(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:dc(S,R,P,J,w),tu(8,R);break;case 23:break;case 22:var St=R.stateNode;R.memoizedState!==null?St._visibility&2?dc(S,R,P,J,w):iu(S,R):(St._visibility|=2,dc(S,R,P,J,w)),w&>&2048&&Gy(R.alternate,R);break;case 24:dc(S,R,P,J,w),w&>&2048&&Yy(R.alternate,R);break;default:dc(S,R,P,J,w)}l=l.sibling}}function iu(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:iu(p,b),w&2048&&Gy(b.alternate,b);break;case 24:iu(p,b),w&2048&&Yy(b.alternate,b);break;default:iu(p,b)}l=l.sibling}}var ru=8192;function fc(s,l,p){if(s.subtreeFlags&ru)for(s=s.child;s!==null;)vw(s,l,p),s=s.sibling}function vw(s,l,p){switch(s.tag){case 26:fc(s,l,p),s.flags&ru&&s.memoizedState!==null&&x4(p,ha,s.memoizedState,s.memoizedProps);break;case 5:fc(s,l,p);break;case 3:case 4:var b=ha;ha=Zf(s.stateNode.containerInfo),fc(s,l,p),ha=b;break;case 22:s.memoizedState===null&&(b=s.alternate,b!==null&&b.memoizedState!==null?(b=ru,ru=16777216,fc(s,l,p),ru=b):fc(s,l,p));break;default:fc(s,l,p)}}function _w(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 nu(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,kw(b,s)}_w(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Cw(s),s=s.sibling}function Cw(s){switch(s.tag){case 0:case 11:case 15:nu(s),s.flags&2048&&to(9,s,s.return);break;case 3:nu(s);break;case 12:nu(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,If(s)):nu(s);break;default:nu(s)}}function If(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,kw(b,s)}_w(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:to(8,l,l.return),If(l);break;case 22:p=l.stateNode,p._visibility&2&&(p._visibility&=-3,If(l));break;default:If(l)}s=s.sibling}}function kw(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:Ph(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(fw(b),b===p){vr=null;break t}if(w!==null){w.return=S,vr=w;break t}vr=S}}}var RF={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}},DF=typeof WeakMap=="function"?WeakMap:Map,ni=0,wi=null,Pe=null,Ge=0,mi=0,Mn=null,eo=!1,pc=!1,Ky=!1,fs=0,Yi=0,io=0,sl=0,Vy=0,Bn=0,gc=0,au=null,fn=null,Xy=!1,$f=0,ww=0,zf=1/0,Pf=null,ro=null,fr=0,no=null,mc=null,ps=0,Zy=0,Qy=null,Sw=null,su=0,Jy=null;function Ln(){return(ni&2)!==0&&Ge!==0?Ge&-Ge:j.T!==null?ab():Gr()}function Tw(){if(Bn===0)if((Ge&536870912)===0||Xe){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===wi&&(mi===2||mi===9)||s.cancelPendingCommit!==null)&&(yc(s,0),ao(s,Ge,Bn,!1)),pe(s,p),((ni&2)===0||s!==wi)&&(s===wi&&((ni&2)===0&&(sl|=p),Yi===4&&ao(s,Ge,Bn,!1)),Ba(s))}function Ew(s,l,p){if((ni&6)!==0)throw Error(n(327));var b=!p&&(l&127)===0&&(l&s.expiredLanes)===0||wt(s,l),w=b?IF(s,l):eb(s,l,!0),S=b;do{if(w===0){pc&&!b&&ao(s,l,0,!1);break}else{if(p=s.current.alternate,S&&!jF(p)){w=eb(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=au;var J=P.current.memoizedState.isDehydrated;if(J&&(yc(P,R).flags|=256),R=eb(P,R,!1),R!==2){if(Ky&&!J){P.errorRecoveryDisabledLanes|=S,sl|=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){yc(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=$f+300-fe(),10<w)){if(ao(b,l,Bn,!eo),tt(b,0,!0)!==0)break t;ps=l,b.timeoutHandle=nS(Nw.bind(null,b,p,fn,Pf,Xy,l,Bn,sl,gc,eo,S,"Throttled",-0,0),w);break t}Nw(b,p,fn,Pf,Xy,l,Bn,sl,gc,eo,S,null,-0,0)}}break}while(!0);Ba(s)}function Nw(s,l,p,b,w,S,R,P,J,gt,St,Et,yt,xt){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:Ft},vw(l,S,Et);var Vt=(S&62914560)===S?$f-fe():(S&4194048)===S?ww-fe():0;if(Vt=v4(Et,Vt),Vt!==null){ps=S,s.cancelPendingCommit=Vt(jw.bind(null,s,l,S,p,b,w,R,P,J,St,Et,null,yt,xt)),ao(s,S,R,!gt);return}}jw(s,l,S,p,b,w,R,P,J)}function jF(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&=~Vy,l&=~sl,s.suspendedLanes|=l,s.pingedLanes&=~l,b&&(s.warmLanes|=l),b=s.expirationTimes;for(var w=l;0<w;){var S=31-Be(w),R=1<<S;b[S]=-1,w&=~R}p!==0&&Pt(s,p,l)}function qf(){return(ni&6)===0?(ou(0),!1):!0}function tb(){if(Pe!==null){if(mi===0)var s=Pe.return;else s=Pe,rs=Zo=null,my(s),oc=null,Uh=0,s=Pe;for(;s!==null;)aw(s.alternate,s),s=s.return;Pe=null}}function yc(s,l){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,i4(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),ps=0,tb(),wi=s,Pe=p=es(s.current,null),Ge=l,mi=0,Mn=null,eo=!1,pc=wt(s,l),Ky=!1,gc=Bn=Vy=sl=io=Yi=0,fn=au=null,Xy=!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-Be(b),S=1<<w;l|=s[w],b&=~S}return fs=l,cf(),p}function Aw(s,l){Me=null,j.H=Zh,l===sc||l===yf?(l=WC(),mi=3):l===ny?(l=WC(),mi=4):mi=l===Ly?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Mn=l,Pe===null&&(Yi=1,Bf(s,Wn(l,s.current)))}function Mw(){var s=Nn.current;return s===null?!0:(Ge&4194048)===Ge?Vn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?s===Vn:!1}function Bw(){var s=j.H;return j.H=Zh,s===null?Zh:s}function Lw(){var s=j.A;return j.A=RF,s}function Uf(){Yi=4,eo||(Ge&4194048)!==Ge&&Nn.current!==null||(pc=!0),(io&134217727)===0&&(sl&134217727)===0||wi===null||ao(wi,Ge,Bn,!1)}function eb(s,l,p){var b=ni;ni|=2;var w=Bw(),S=Lw();(wi!==s||Ge!==l)&&(Pf=null,yc(s,l)),l=!1;var R=Yi;t:do try{if(mi!==0&&Pe!==null){var P=Pe,J=Mn;switch(mi){case 8:tb(),R=6;break t;case 3:case 2:case 9:case 6:Nn.current===null&&(l=!0);var gt=mi;if(mi=0,Mn=null,bc(s,P,J,gt),p&&pc){R=0;break t}break;default:gt=mi,mi=0,Mn=null,bc(s,P,J,gt)}}FF(),R=Yi;break}catch(St){Aw(s,St)}while(!0);return l&&s.shellSuspendCounter++,rs=Zo=null,ni=b,j.H=w,j.A=S,Pe===null&&(wi=null,Ge=0,cf()),R}function FF(){for(;Pe!==null;)Ow(Pe)}function IF(s,l){var p=ni;ni|=2;var b=Bw(),w=Lw();wi!==s||Ge!==l?(Pf=null,zf=fe()+500,yc(s,l)):pc=wt(s,l);t:do try{if(mi!==0&&Pe!==null){l=Pe;var S=Mn;e:switch(mi){case 1:mi=0,Mn=null,bc(s,l,S,1);break;case 2:case 9:if(UC(S)){mi=0,Mn=null,Rw(l);break}l=function(){mi!==2&&mi!==9||wi!==s||(mi=7),Ba(s)},S.then(l,l);break t;case 3:mi=7;break t;case 4:mi=5;break t;case 7:UC(S)?(mi=0,Mn=null,Rw(l)):(mi=0,Mn=null,bc(s,l,S,7));break;case 5:var R=null;switch(Pe.tag){case 26:R=Pe.memoizedState;case 5:case 27:var P=Pe;if(R?xS(R):P.stateNode.complete){mi=0,Mn=null;var J=P.sibling;if(J!==null)Pe=J;else{var gt=P.return;gt!==null?(Pe=gt,Hf(gt)):Pe=null}break e}}mi=0,Mn=null,bc(s,l,S,5);break;case 6:mi=0,Mn=null,bc(s,l,S,6);break;case 8:tb(),Yi=6;break t;default:throw Error(n(462))}}$F();break}catch(St){Aw(s,St)}while(!0);return rs=Zo=null,j.H=b,j.A=w,ni=p,Pe!==null?0:(wi=null,Ge=0,cf(),Yi)}function $F(){for(;Pe!==null&&!Li();)Ow(Pe)}function Ow(s){var l=rw(s.alternate,s,fs);s.memoizedProps=s.pendingProps,l===null?Hf(s):Pe=l}function Rw(s){var l=s,p=l.alternate;switch(l.tag){case 15:case 0:l=Zk(p,l,l.pendingProps,l.type,void 0,Ge);break;case 11:l=Zk(p,l,l.pendingProps,l.type.render,l.ref,Ge);break;case 5:my(l);default:aw(p,l),l=Pe=LC(l,fs),l=rw(p,l,fs)}s.memoizedProps=s.pendingProps,l===null?Hf(s):Pe=l}function bc(s,l,p,b){rs=Zo=null,my(l),oc=null,Uh=0;var w=l.return;try{if(EF(s,w,l,p,Ge)){Yi=1,Bf(s,Wn(p,s.current)),Pe=null;return}}catch(S){if(w!==null)throw Pe=w,S;Yi=1,Bf(s,Wn(p,s.current)),Pe=null;return}l.flags&32768?(Xe||b===1?s=!0:pc||(Ge&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))),Dw(l,s)):Hf(l)}function Hf(s){var l=s;do{if((l.flags&32768)!==0){Dw(l,eo);return}s=l.return;var p=MF(l.alternate,l,fs);if(p!==null){Pe=p;return}if(l=l.sibling,l!==null){Pe=l;return}Pe=l=s}while(l!==null);Yi===0&&(Yi=5)}function Dw(s,l){do{var p=BF(s.alternate,s);if(p!==null){p.flags&=32767,Pe=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!l&&(s=s.sibling,s!==null)){Pe=s;return}Pe=s=p}while(s!==null);Yi=6,Pe=null}function jw(s,l,p,b,w,S,R,P,J){s.cancelPendingCommit=null;do Wf();while(fr!==0);if((ni&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Um,Wt(s,p,S,R,P,J),s===wi&&(Pe=wi=null,Ge=0),mc=l,no=s,ps=p,Zy=S,Qy=w,Sw=b,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,UF(Fe,function(){return Pw(),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=ni,ni|=4;try{LF(s,l,p)}finally{ni=R,q.p=w,j.T=b}}fr=1,Fw(),Iw(),$w()}}function Fw(){if(fr===1){fr=0;var s=no,l=mc,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=ni;ni|=4;try{yw(l,s);var S=fb,R=kC(s.containerInfo),P=S.focusedElem,J=S.selectionRange;if(R!==P&&P&&P.ownerDocument&&CC(P.ownerDocument.documentElement,P)){if(J!==null&&Im(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,yt=Et&&Et.defaultView||window;if(yt.getSelection){var xt=yt.getSelection(),Vt=P.textContent.length,ge=Math.min(J.start,Vt),vi=J.end===void 0?ge:Math.min(J.end,Vt);!xt.extend&&ge>vi&&(R=vi,vi=ge,ge=R);var ut=_C(P,ge),nt=_C(P,vi);if(ut&&nt&&(xt.rangeCount!==1||xt.anchorNode!==ut.node||xt.anchorOffset!==ut.offset||xt.focusNode!==nt.node||xt.focusOffset!==nt.offset)){var pt=Et.createRange();pt.setStart(ut.node,ut.offset),xt.removeAllRanges(),ge>vi?(xt.addRange(pt),xt.extend(nt.node,nt.offset)):(pt.setEnd(nt.node,nt.offset),xt.addRange(pt))}}}}for(Et=[],xt=P;xt=xt.parentNode;)xt.nodeType===1&&Et.push({element:xt,left:xt.scrollLeft,top:xt.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}}rp=!!db,fb=db=null}finally{ni=w,q.p=b,j.T=p}}s.current=l,fr=2}}function Iw(){if(fr===2){fr=0;var s=no,l=mc,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=ni;ni|=4;try{dw(s,l.alternate,l)}finally{ni=w,q.p=b,j.T=p}}fr=3}}function $w(){if(fr===4||fr===3){fr=0,Ti();var s=no,l=mc,p=ps,b=Sw;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?fr=5:(fr=0,mc=no=null,zw(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(ro=null),on(p),l=l.stateNode,De&&typeof De.onCommitFiberRoot=="function")try{De.onCommitFiberRoot($i,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&&Wf(),Ba(s),w=s.pendingLanes,(p&261930)!==0&&(w&42)!==0?s===Jy?su++:(su=0,Jy=s):su=0,ou(0)}}function zw(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Ph(l)))}function Wf(){return Fw(),Iw(),$w(),Pw()}function Pw(){if(fr!==5)return!1;var s=no,l=Zy;Zy=0;var p=on(ps),b=j.T,w=q.p;try{q.p=32>p?32:p,j.T=null,p=Qy,Qy=null;var S=no,R=ps;if(fr=0,mc=no=null,ps=0,(ni&6)!==0)throw Error(n(331));var P=ni;if(ni|=4,Cw(S.current),xw(S,S.current,R,p),ni=P,ou(0,!1),De&&typeof De.onPostCommitFiberRoot=="function")try{De.onPostCommitFiberRoot($i,S)}catch{}return!0}finally{q.p=w,j.T=b,zw(s,l)}}function qw(s,l,p){l=Wn(p,l),l=By(s.stateNode,l,2),s=Zs(s,l,2),s!==null&&(pe(s,2),Ba(s))}function yi(s,l,p){if(s.tag===3)qw(s,s,p);else for(;l!==null;){if(l.tag===3){qw(l,s,p);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(ro===null||!ro.has(b))){s=Wn(p,s),p=Uk(2),b=Zs(l,p,2),b!==null&&(Hk(p,b,l,s),pe(b,2),Ba(b));break}}l=l.return}}function ib(s,l,p){var b=s.pingCache;if(b===null){b=s.pingCache=new DF;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)||(Ky=!0,w.add(p),s=zF.bind(null,s,l,p),l.then(s,s))}function zF(s,l,p){var b=s.pingCache;b!==null&&b.delete(l),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,wi===s&&(Ge&p)===p&&(Yi===4||Yi===3&&(Ge&62914560)===Ge&&300>fe()-$f?(ni&2)===0&&yc(s,0):Vy|=p,gc===Ge&&(gc=0)),Ba(s)}function Uw(s,l){l===0&&(l=he()),s=Ko(s,l),s!==null&&(pe(s,l),Ba(s))}function PF(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),Uw(s,p)}function qF(s,l){var p=0;switch(s.tag){case 31:case 13:var b=s.stateNode,w=s.memoizedState;w!==null&&(p=w.retryLane);break;case 19:b=s.stateNode;break;case 22:b=s.stateNode._retryCache;break;default:throw Error(n(314))}b!==null&&b.delete(l),Uw(s,p)}function UF(s,l){return ve(s,l)}var Gf=null,xc=null,rb=!1,Yf=!1,nb=!1,so=0;function Ba(s){s!==xc&&s.next===null&&(xc===null?Gf=xc=s:xc=xc.next=s),Yf=!0,rb||(rb=!0,WF())}function ou(s,l){if(!nb&&Yf){nb=!0;do for(var p=!1,b=Gf;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-Be(42|s)+1)-1,S&=w&~(R&~P),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(p=!0,Yw(b,S))}else S=Ge,S=tt(b,b===wi?S:0,b.cancelPendingCommit!==null||b.timeoutHandle!==-1),(S&3)===0||wt(b,S)||(p=!0,Yw(b,S));b=b.next}while(p);nb=!1}}function HF(){Hw()}function Hw(){Yf=rb=!1;var s=0;so!==0&&e4()&&(s=so);for(var l=fe(),p=null,b=Gf;b!==null;){var w=b.next,S=Ww(b,l);S===0?(b.next=null,p===null?Gf=w:p.next=w,w===null&&(xc=p)):(p=b,(s!==0||(S&3)!==0)&&(Yf=!0)),b=w}fr!==0&&fr!==5||ou(s),so!==0&&(so=0)}function Ww(s,l){for(var p=s.suspendedLanes,b=s.pingedLanes,w=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var R=31-Be(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=wi,p=Ge,p=tt(s,s===l?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b=s.callbackNode,p===0||s===l&&(mi===2||mi===9)||s.cancelPendingCommit!==null)return b!==null&&b!==null&&pi(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&&pi(b),on(p)){case 2:case 8:p=Ue;break;case 32:p=Fe;break;case 268435456:p=Oi;break;default:p=Fe}return b=Gw.bind(null,s),p=ve(p,b),s.callbackPriority=l,s.callbackNode=p,l}return b!==null&&b!==null&&pi(b),s.callbackPriority=2,s.callbackNode=null,2}function Gw(s,l){if(fr!==0&&fr!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(Wf()&&s.callbackNode!==p)return null;var b=Ge;return b=tt(s,s===wi?b:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b===0?null:(Ew(s,b,l),Ww(s,fe()),s.callbackNode!=null&&s.callbackNode===p?Gw.bind(null,s):null)}function Yw(s,l){if(Wf())return null;Ew(s,l,!0)}function WF(){r4(function(){(ni&6)!==0?ve($e,HF):Hw()})}function ab(){if(so===0){var s=nc;s===0&&(s=Ae,Ae<<=1,(Ae&261888)===0&&(Ae=256)),so=s}return so}function Kw(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Us(""+s)}function Vw(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 GF(s,l,p,b,w){if(l==="submit"&&p&&p.stateNode===w){var S=Kw((w[Hi]||null).action),R=b.submitter;R&&(l=(l=R[Hi]||null)?Kw(l.formAction):R.getAttribute("formAction"),l!==null&&(S=l,R=null));var P=new af("action","action",null,b,w);s.push({event:P,listeners:[{instance:null,listener:function(){if(b.defaultPrevented){if(so!==0){var J=R?Vw(w,R):new FormData(w);Sy(p,{pending:!0,data:J,method:w.method,action:S},null,J)}}else typeof S=="function"&&(P.preventDefault(),J=R?Vw(w,R):new FormData(w),Sy(p,{pending:!0,data:J,method:w.method,action:S},S,J))},currentTarget:w}]})}}for(var sb=0;sb<qm.length;sb++){var ob=qm[sb],YF=ob.toLowerCase(),KF=ob[0].toUpperCase()+ob.slice(1);ca(YF,"on"+KF)}ca(TC,"onAnimationEnd"),ca(EC,"onAnimationIteration"),ca(NC,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(hF,"onTransitionRun"),ca(uF,"onTransitionStart"),ca(dF,"onTransitionCancel"),ca(AC,"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 lu="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(" "),VF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lu));function Xw(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){lf(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){lf(St)}w.currentTarget=null,S=J}}}}function qe(s,l){var p=l[In];p===void 0&&(p=l[In]=new Set);var b=s+"__bubble";p.has(b)||(Zw(l,s,2,!1),p.add(b))}function lb(s,l,p){var b=0;l&&(b|=4),Zw(p,s,b,l)}var Kf="_reactListening"+Math.random().toString(36).slice(2);function cb(s){if(!s[Kf]){s[Kf]=!0,Kt.forEach(function(p){p!=="selectionchange"&&(VF.has(p)||lb(p,!1,s),lb(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Kf]||(l[Kf]=!0,lb("selectionchange",!1,l))}}function Zw(s,l,p,b){switch(TS(l)){case 2:var w=k4;break;case 8:w=w4;break;default:w=wb}p=w.bind(null,l,p,s),w=void 0,!Am||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 hb(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}tf(function(){var gt=S,St=Ee(p),Et=[];t:{var yt=MC.get(s);if(yt!==void 0){var xt=af,Vt=s;switch(s){case"keypress":if(rf(p)===0)break t;case"keydown":case"keyup":xt=qj;break;case"focusin":Vt="focus",xt=Om;break;case"focusout":Vt="blur",xt=Om;break;case"beforeblur":case"afterblur":xt=Om;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":xt=aC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xt=Mj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xt=Wj;break;case TC:case EC:case NC:xt=Oj;break;case AC:xt=Yj;break;case"scroll":case"scrollend":xt=Nj;break;case"wheel":xt=Vj;break;case"copy":case"cut":case"paste":xt=Dj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xt=oC;break;case"toggle":case"beforetoggle":xt=Zj}var ge=(l&4)!==0,vi=!ge&&(s==="scroll"||s==="scrollend"),ut=ge?yt!==null?yt+"Capture":null:yt;ge=[];for(var nt=gt,pt;nt!==null;){var Tt=nt;if(pt=Tt.stateNode,Tt=Tt.tag,Tt!==5&&Tt!==26&&Tt!==27||pt===null||ut===null||(Tt=Mh(nt,ut),Tt!=null&&ge.push(cu(nt,Tt,pt))),vi)break;nt=nt.return}0<ge.length&&(yt=new xt(yt,Vt,null,p,St),Et.push({event:yt,listeners:ge}))}}if((l&7)===0){t:{if(yt=s==="mouseover"||s==="pointerover",xt=s==="mouseout"||s==="pointerout",yt&&p!==Jt&&(Vt=p.relatedTarget||p.fromElement)&&(ur(Vt)||Vt[kn]))break t;if((xt||yt)&&(yt=St.window===St?St:(yt=St.ownerDocument)?yt.defaultView||yt.parentWindow:window,xt?(Vt=p.relatedTarget||p.toElement,xt=gt,Vt=Vt?ur(Vt):null,Vt!==null&&(vi=o(Vt),ge=Vt.tag,Vt!==vi||ge!==5&&ge!==27&&ge!==6)&&(Vt=null)):(xt=null,Vt=gt),xt!==Vt)){if(ge=aC,Tt="onMouseLeave",ut="onMouseEnter",nt="mouse",(s==="pointerout"||s==="pointerover")&&(ge=oC,Tt="onPointerLeave",ut="onPointerEnter",nt="pointer"),vi=xt==null?yt:ln(xt),pt=Vt==null?yt:ln(Vt),yt=new ge(Tt,nt+"leave",xt,p,St),yt.target=vi,yt.relatedTarget=pt,Tt=null,ur(St)===gt&&(ge=new ge(ut,nt+"enter",Vt,p,St),ge.target=pt,ge.relatedTarget=vi,Tt=ge),vi=Tt,xt&&Vt)e:{for(ge=XF,ut=xt,nt=Vt,pt=0,Tt=ut;Tt;Tt=ge(Tt))pt++;Tt=0;for(var ce=nt;ce;ce=ge(ce))Tt++;for(;0<pt-Tt;)ut=ge(ut),pt--;for(;0<Tt-pt;)nt=ge(nt),Tt--;for(;pt--;){if(ut===nt||nt!==null&&ut===nt.alternate){ge=ut;break e}ut=ge(ut),nt=ge(nt)}ge=null}else ge=null;xt!==null&&Qw(Et,yt,xt,ge,!1),Vt!==null&&vi!==null&&Qw(Et,vi,Vt,ge,!0)}}t:{if(yt=gt?ln(gt):window,xt=yt.nodeName&&yt.nodeName.toLowerCase(),xt==="select"||xt==="input"&&yt.type==="file")var ti=gC;else if(fC(yt))if(mC)ti=oF;else{ti=aF;var te=nF}else xt=yt.nodeName,!xt||xt.toLowerCase()!=="input"||yt.type!=="checkbox"&&yt.type!=="radio"?gt&&Dr(gt.elementType)&&(ti=gC):ti=sF;if(ti&&(ti=ti(s,gt))){pC(Et,ti,p,St);break t}te&&te(s,yt,gt),s==="focusout"&>&&yt.type==="number"&>.memoizedProps.value!=null&&Bt(yt,"number",yt.value)}switch(te=gt?ln(gt):window,s){case"focusin":(fC(te)||te.contentEditable==="true")&&(Xl=te,$m=gt,Ih=null);break;case"focusout":Ih=$m=Xl=null;break;case"mousedown":zm=!0;break;case"contextmenu":case"mouseup":case"dragend":zm=!1,wC(Et,p,St);break;case"selectionchange":if(cF)break;case"keydown":case"keyup":wC(Et,p,St)}var Oe;if(Dm)t:{switch(s){case"compositionstart":var Ye="onCompositionStart";break t;case"compositionend":Ye="onCompositionEnd";break t;case"compositionupdate":Ye="onCompositionUpdate";break t}Ye=void 0}else Vl?uC(s,p)&&(Ye="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(Ye="onCompositionStart");Ye&&(lC&&p.locale!=="ko"&&(Vl||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Vl&&(Oe=rC()):(Hs=St,Mm="value"in Hs?Hs.value:Hs.textContent,Vl=!0)),te=Vf(gt,Ye),0<te.length&&(Ye=new sC(Ye,s,null,p,St),Et.push({event:Ye,listeners:te}),Oe?Ye.data=Oe:(Oe=dC(p),Oe!==null&&(Ye.data=Oe)))),(Oe=Jj?tF(s,p):eF(s,p))&&(Ye=Vf(gt,"onBeforeInput"),0<Ye.length&&(te=new sC("onBeforeInput","beforeinput",null,p,St),Et.push({event:te,listeners:Ye}),te.data=Oe)),GF(Et,s,gt,p,St)}Xw(Et,l)})}function cu(s,l,p){return{instance:s,listener:l,currentTarget:p}}function Vf(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=Mh(s,p),w!=null&&b.unshift(cu(s,w,S)),w=Mh(s,l),w!=null&&b.push(cu(s,w,S))),s.tag===3)return b;s=s.return}return[]}function XF(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function Qw(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=Mh(p,S),gt!=null&&R.unshift(cu(p,gt,J))):w||(gt=Mh(p,S),gt!=null&&R.push(cu(p,gt,J)))),p=p.return}R.length!==0&&s.push({event:l,listeners:R})}var ZF=/\r\n?/g,QF=/\u0000|\uFFFD/g;function Jw(s){return(typeof s=="string"?s:""+s).replace(ZF,`
|
|
50
|
+
`).replace(QF,"")}function tS(s,l){return l=Jw(l),Jw(s)===l}function xi(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":Ve(s,"class",b);break;case"tabIndex":Ve(s,"tabindex",b);break;case"dir":case"role":case"viewBox":case"width":case"height":Ve(s,p,b);break;case"style":He(s,b,S);break;case"data":if(l!=="object"){Ve(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"&&xi(s,l,"name",w.name,w,null),xi(s,l,"formEncType",w.formEncType,w,null),xi(s,l,"formMethod",w.formMethod,w,null),xi(s,l,"formTarget",w.formTarget,w,null)):(xi(s,l,"encType",w.encType,w,null),xi(s,l,"method",w.method,w,null),xi(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=Ft);break;case"onScroll":b!=null&&qe("scroll",s);break;case"onScrollEnd":b!=null&&qe("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":qe("beforetoggle",s),qe("toggle",s),li(s,"popover",b);break;case"xlinkActuate":zi(s,"http://www.w3.org/1999/xlink","xlink:actuate",b);break;case"xlinkArcrole":zi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",b);break;case"xlinkRole":zi(s,"http://www.w3.org/1999/xlink","xlink:role",b);break;case"xlinkShow":zi(s,"http://www.w3.org/1999/xlink","xlink:show",b);break;case"xlinkTitle":zi(s,"http://www.w3.org/1999/xlink","xlink:title",b);break;case"xlinkType":zi(s,"http://www.w3.org/1999/xlink","xlink:type",b);break;case"xmlBase":zi(s,"http://www.w3.org/XML/1998/namespace","xml:base",b);break;case"xmlLang":zi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",b);break;case"xmlSpace":zi(s,"http://www.w3.org/XML/1998/namespace","xml:space",b);break;case"is":li(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,li(s,p,b))}}function ub(s,l,p,b,w,S){switch(p){case"style":He(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&&qe("scroll",s);break;case"onScrollEnd":b!=null&&qe("scrollend",s);break;case"onClick":b!=null&&(s.onclick=Ft);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[Hi]||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,""):li(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":qe("error",s),qe("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:xi(s,l,S,R,p,null)}}w&&xi(s,l,"srcSet",p.srcSet,p,null),b&&xi(s,l,"src",p.src,p,null);return;case"input":qe("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:xi(s,l,b,St,p,null)}}mt(s,S,P,J,gt,R,w,!1);return;case"select":qe("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:xi(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":qe("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:xi(s,l,R,P,p,null)}Le(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:xi(s,l,J,b,p,null)}return;case"dialog":qe("beforetoggle",s),qe("toggle",s),qe("cancel",s),qe("close",s);break;case"iframe":case"object":qe("load",s);break;case"video":case"audio":for(b=0;b<lu.length;b++)qe(lu[b],s);break;case"image":qe("error",s),qe("load",s);break;case"details":qe("toggle",s);break;case"embed":case"source":case"link":qe("error",s),qe("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:xi(s,l,gt,b,p,null)}return;default:if(Dr(l)){for(St in p)p.hasOwnProperty(St)&&(b=p[St],b!==void 0&&ub(s,l,St,b,p,void 0));return}}for(P in p)p.hasOwnProperty(P)&&(b=p[P],b!=null&&xi(s,l,P,b,p,null))}function JF(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(xt in p){var Et=p[xt];if(p.hasOwnProperty(xt)&&Et!=null)switch(xt){case"checked":break;case"value":break;case"defaultValue":J=Et;default:b.hasOwnProperty(xt)||xi(s,l,xt,null,b,Et)}}for(var yt in b){var xt=b[yt];if(Et=p[yt],b.hasOwnProperty(yt)&&(xt!=null||Et!=null))switch(yt){case"type":S=xt;break;case"name":w=xt;break;case"checked":gt=xt;break;case"defaultChecked":St=xt;break;case"value":R=xt;break;case"defaultValue":P=xt;break;case"children":case"dangerouslySetInnerHTML":if(xt!=null)throw Error(n(137,l));break;default:xt!==Et&&xi(s,l,yt,xt,b,Et)}}Pn(s,R,P,J,gt,St,S,w);return;case"select":xt=R=P=yt=null;for(S in p)if(J=p[S],p.hasOwnProperty(S)&&J!=null)switch(S){case"value":break;case"multiple":xt=J;default:b.hasOwnProperty(S)||xi(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":yt=S;break;case"defaultValue":P=S;break;case"multiple":R=S;default:S!==J&&xi(s,l,w,S,b,J)}l=P,p=R,b=xt,yt!=null?Mt(s,!!p,yt,!1):!!b!=!!p&&(l!=null?Mt(s,!!p,l,!0):Mt(s,!!p,p?[]:"",!1));return;case"textarea":xt=yt=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:xi(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":yt=w;break;case"defaultValue":xt=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(n(91));break;default:w!==S&&xi(s,l,R,w,b,S)}Ut(s,yt,xt);return;case"option":for(var Vt in p)if(yt=p[Vt],p.hasOwnProperty(Vt)&&yt!=null&&!b.hasOwnProperty(Vt))switch(Vt){case"selected":s.selected=!1;break;default:xi(s,l,Vt,null,b,yt)}for(J in b)if(yt=b[J],xt=p[J],b.hasOwnProperty(J)&&yt!==xt&&(yt!=null||xt!=null))switch(J){case"selected":s.selected=yt&&typeof yt!="function"&&typeof yt!="symbol";break;default:xi(s,l,J,yt,b,xt)}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 ge in p)yt=p[ge],p.hasOwnProperty(ge)&&yt!=null&&!b.hasOwnProperty(ge)&&xi(s,l,ge,null,b,yt);for(gt in b)if(yt=b[gt],xt=p[gt],b.hasOwnProperty(gt)&&yt!==xt&&(yt!=null||xt!=null))switch(gt){case"children":case"dangerouslySetInnerHTML":if(yt!=null)throw Error(n(137,l));break;default:xi(s,l,gt,yt,b,xt)}return;default:if(Dr(l)){for(var vi in p)yt=p[vi],p.hasOwnProperty(vi)&&yt!==void 0&&!b.hasOwnProperty(vi)&&ub(s,l,vi,void 0,b,yt);for(St in b)yt=b[St],xt=p[St],!b.hasOwnProperty(St)||yt===xt||yt===void 0&&xt===void 0||ub(s,l,St,yt,b,xt);return}}for(var ut in p)yt=p[ut],p.hasOwnProperty(ut)&&yt!=null&&!b.hasOwnProperty(ut)&&xi(s,l,ut,null,b,yt);for(Et in b)yt=b[Et],xt=p[Et],!b.hasOwnProperty(Et)||yt===xt||yt==null&&xt==null||xi(s,l,Et,yt,b,xt)}function eS(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function t4(){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&&eS(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&&eS(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 db=null,fb=null;function Xf(s){return s.nodeType===9?s:s.ownerDocument}function iS(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 rS(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 pb(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 gb=null;function e4(){var s=window.event;return s&&s.type==="popstate"?s===gb?!1:(gb=s,!0):(gb=null,!1)}var nS=typeof setTimeout=="function"?setTimeout:void 0,i4=typeof clearTimeout=="function"?clearTimeout:void 0,aS=typeof Promise=="function"?Promise:void 0,r4=typeof queueMicrotask=="function"?queueMicrotask:typeof aS<"u"?function(s){return aS.resolve(null).then(s).catch(n4)}:nS;function n4(s){setTimeout(function(){throw s})}function oo(s){return s==="head"}function sS(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),kc(l);return}b--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")b++;else if(p==="html")hu(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,hu(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"&&hu(s.ownerDocument.body);p=w}while(p);kc(l)}function oS(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 mb(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":mb(p),Ea(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function a4(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 s4(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 lS(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 yb(s){return s.data==="$?"||s.data==="$~"}function bb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function o4(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 xb=null;function cS(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 hS(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 uS(s,l,p){switch(l=Xf(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 hu(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Ea(s)}var Zn=new Map,dS=new Set;function Zf(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var gs=q.d;q.d={f:l4,r:c4,D:h4,C:u4,L:d4,m:f4,X:g4,S:p4,M:m4};function l4(){var s=gs.f(),l=qf();return s||l}function c4(s){var l=Yr(s);l!==null&&l.tag===5&&l.type==="form"?Ak(l):gs.r(s)}var vc=typeof document>"u"?null:document;function fS(s,l,p){var b=vc;if(b&&typeof l=="string"&&l){var w=Tr(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof p=="string"&&(w+='[crossorigin="'+p+'"]'),dS.has(w)||(dS.add(w),s={rel:s,crossOrigin:p,href:l},b.querySelector(w)===null&&(l=b.createElement("link"),Mr(l,"link",s),oi(l),b.head.appendChild(l)))}}function h4(s){gs.D(s),fS("dns-prefetch",s,null)}function u4(s,l){gs.C(s,l),fS("preconnect",s,l)}function d4(s,l,p){gs.L(s,l,p);var b=vc;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=_c(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(uu(S))||l==="script"&&b.querySelector(du(S))||(l=b.createElement("link"),Mr(l,"link",s),oi(l),b.head.appendChild(l)))}}function f4(s,l){gs.m(s,l);var p=vc;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(du(S)))return}b=p.createElement("link"),Mr(b,"link",s),oi(b),p.head.appendChild(b)}}}function p4(s,l,p){gs.S(s,l,p);var b=vc;if(b&&s){var w=dr(b).hoistableStyles,S=_c(s);l=l||"default";var R=w.get(S);if(!R){var P={loading:0,preload:null};if(R=b.querySelector(uu(S)))P.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},p),(p=Zn.get(S))&&vb(s,p);var J=R=b.createElement("link");oi(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,Qf(R,l,b)}R={type:"stylesheet",instance:R,count:1,state:P},w.set(S,R)}}}function g4(s,l){gs.X(s,l);var p=vc;if(p&&s){var b=dr(p).hoistableScripts,w=Cc(s),S=b.get(w);S||(S=p.querySelector(du(w)),S||(s=g({src:s,async:!0},l),(l=Zn.get(w))&&_b(s,l),S=p.createElement("script"),oi(S),Mr(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function m4(s,l){gs.M(s,l);var p=vc;if(p&&s){var b=dr(p).hoistableScripts,w=Cc(s),S=b.get(w);S||(S=p.querySelector(du(w)),S||(s=g({src:s,async:!0,type:"module"},l),(l=Zn.get(w))&&_b(s,l),S=p.createElement("script"),oi(S),Mr(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function pS(s,l,p,b){var w=(w=ct.current)?Zf(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=_c(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=_c(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(uu(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||y4(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 _c(s){return'href="'+Tr(s)+'"'}function uu(s){return'link[rel="stylesheet"]['+s+"]"}function gS(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function y4(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),oi(l),s.head.appendChild(l))}function Cc(s){return'[src="'+Tr(s)+'"]'}function du(s){return"script[async]"+s}function mS(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,oi(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"),oi(b),Mr(b,"style",w),Qf(b,p.precedence,s),l.instance=b;case"stylesheet":w=_c(p.href);var S=s.querySelector(uu(w));if(S)return l.state.loading|=4,l.instance=S,oi(S),S;b=gS(p),(w=Zn.get(w))&&vb(b,w),S=(s.ownerDocument||s).createElement("link"),oi(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,Qf(S,p.precedence,s),l.instance=S;case"script":return S=Cc(p.src),(w=s.querySelector(du(S)))?(l.instance=w,oi(w),w):(b=p,(w=Zn.get(S))&&(b=g({},p),_b(b,w)),s=s.ownerDocument||s,w=s.createElement("script"),oi(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,Qf(b,p.precedence,s));return l.instance}function Qf(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 vb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function _b(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Jf=null;function yS(s,l,p){if(Jf===null){var b=new Map,w=Jf=new Map;w.set(p,b)}else w=Jf,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[ki]||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 bS(s,l,p){s=s.ownerDocument||s,s.head.insertBefore(p,l==="title"?s.querySelector("head > title"):null)}function b4(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 xS(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function x4(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=_c(b.href),S=l.querySelector(uu(w));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=tp.bind(s),l.then(s,s)),p.state.loading|=4,p.instance=S,oi(S);return}S=l.ownerDocument||l,b=gS(b),(w=Zn.get(w))&&vb(b,w),S=S.createElement("link"),oi(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=tp.bind(s),l.addEventListener("load",p),l.addEventListener("error",p))}}var Cb=0;function v4(s,l){return s.stylesheets&&s.count===0&&ip(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var b=setTimeout(function(){if(s.stylesheets&&ip(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&Cb===0&&(Cb=62500*t4());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&ip(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 tp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ip(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var ep=null;function ip(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,ep=new Map,l.forEach(_4,s),ep=null,tp.call(s))}function _4(s,l){if(!(l.state.loading&4)){var p=ep.get(s);if(p)var b=p.get(null);else{p=new Map,ep.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=tp.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 fu={$$typeof:E,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function C4(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=ai(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ai(0),this.hiddenUpdates=ai(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 vS(s,l,p,b,w,S,R,P,J,gt,St,Et){return s=new C4(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=ey(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:b,isDehydrated:p,cache:l},ay(S),s}function _S(s){return s?(s=Jl,s):Jl}function CS(s,l,p,b,w,S){w=_S(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),Wh(p,s,l))}function kS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function kb(s,l){kS(s,l),(s=s.alternate)&&kS(s,l)}function wS(s){if(s.tag===13||s.tag===31){var l=Ko(s,67108864);l!==null&&pn(l,s,67108864),kb(s,67108864)}}function SS(s){if(s.tag===13||s.tag===31){var l=Ln();l=gi(l);var p=Ko(s,l);p!==null&&pn(p,s,l),kb(s,l)}}var rp=!0;function k4(s,l,p,b){var w=j.T;j.T=null;var S=q.p;try{q.p=2,wb(s,l,p,b)}finally{q.p=S,j.T=w}}function w4(s,l,p,b){var w=j.T;j.T=null;var S=q.p;try{q.p=8,wb(s,l,p,b)}finally{q.p=S,j.T=w}}function wb(s,l,p,b){if(rp){var w=Sb(b);if(w===null)hb(s,l,b,np,p),ES(s,b);else if(T4(w,s,l,p,b))b.stopPropagation();else if(ES(s,b),l&4&&-1<S4.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=Ui(S.pendingLanes);if(R!==0){var P=S;for(P.pendingLanes|=2,P.entangledLanes|=2;R;){var J=1<<31-Be(R);P.entanglements[1]|=J,R&=~J}Ba(S),(ni&6)===0&&(zf=fe()+500,ou(0))}}break;case 31:case 13:P=Ko(S,2),P!==null&&pn(P,S,2),qf(),kb(S,2)}if(S=Sb(b),S===null&&hb(s,l,b,np,p),S===w)break;w=S}w!==null&&b.stopPropagation()}else hb(s,l,b,null,p)}}function Sb(s){return s=Ee(s),Tb(s)}var np=null;function Tb(s){if(np=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 np=s,null}function TS(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(_i()){case $e:return 2;case Ue:return 8;case Fe:case Ii:return 32;case Oi:return 268435456;default:return 32}default:return 32}}var Eb=!1,lo=null,co=null,ho=null,pu=new Map,gu=new Map,uo=[],S4="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 ES(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":pu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":gu.delete(l.pointerId)}}function mu(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&&wS(l)),s):(s.eventSystemFlags|=b,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function T4(s,l,p,b,w){switch(l){case"focusin":return lo=mu(lo,s,l,p,b,w),!0;case"dragenter":return co=mu(co,s,l,p,b,w),!0;case"mouseover":return ho=mu(ho,s,l,p,b,w),!0;case"pointerover":var S=w.pointerId;return pu.set(S,mu(pu.get(S)||null,s,l,p,b,w)),!0;case"gotpointercapture":return S=w.pointerId,gu.set(S,mu(gu.get(S)||null,s,l,p,b,w)),!0}return!1}function NS(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(){SS(p)});return}}else if(l===31){if(l=h(p),l!==null){s.blockedOn=l,ir(s.priority,function(){SS(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 ap(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=Sb(s.nativeEvent);if(p===null){p=s.nativeEvent;var b=new p.constructor(p.type,p);Jt=b,p.target.dispatchEvent(b),Jt=null}else return l=Yr(p),l!==null&&wS(l),s.blockedOn=p,!1;l.shift()}return!0}function AS(s,l,p){ap(s)&&p.delete(l)}function E4(){Eb=!1,lo!==null&&ap(lo)&&(lo=null),co!==null&&ap(co)&&(co=null),ho!==null&&ap(ho)&&(ho=null),pu.forEach(AS),gu.forEach(AS)}function sp(s,l){s.blockedOn===l&&(s.blockedOn=null,Eb||(Eb=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,E4)))}var op=null;function MS(s){op!==s&&(op=s,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){op===s&&(op=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(Tb(b||p)===null)continue;break}var S=Yr(p);S!==null&&(s.splice(l,3),l-=3,Sy(S,{pending:!0,data:w,method:p.method,action:b},b,w))}}))}function kc(s){function l(J){return sp(J,s)}lo!==null&&sp(lo,s),co!==null&&sp(co,s),ho!==null&&sp(ho,s),pu.forEach(l),gu.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);)NS(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[Hi]||null;if(typeof S=="function")R||MS(p);else if(R){var P=null;if(S&&S.hasAttribute("formAction")){if(w=S,R=S[Hi]||null)P=R.formAction;else if(Tb(w)!==null)continue}else P=R.action;typeof P=="function"?p[b+1]=P:(p.splice(b,3),b-=3),MS(p)}}}function BS(){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 Nb(s){this._internalRoot=s}lp.prototype.render=Nb.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var p=l.current,b=Ln();CS(p,b,s,l,null,null)},lp.prototype.unmount=Nb.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;CS(s.current,2,null,s,null,null),qf(),l[kn]=null}};function lp(s){this._internalRoot=s}lp.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&&NS(s)}};var LS=e.version;if(LS!=="19.2.4")throw Error(n(527,LS,"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 N4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cp.isDisabled&&cp.supportsFiber)try{$i=cp.inject(N4),De=cp}catch{}}return bu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var p=!1,b="",w=$k,S=zk,R=Pk;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=vS(s,1,!1,null,null,p,b,null,w,S,R,BS),s[kn]=l.current,cb(s),new Nb(l)},bu.hydrateRoot=function(s,l,p){if(!a(s))throw Error(n(299));var b=!1,w="",S=$k,R=zk,P=Pk,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=vS(s,1,!0,l,p??null,b,w,J,S,R,P,BS),l.context=_S(null),p=l.current,b=Ln(),b=gi(b),w=Xs(b),w.callback=null,Zs(p,w,b),p=b,l.current.lanes=p,pe(l,p),Ba(l),s[kn]=l.current,cb(s),new lp(l)},bu.version="19.2.4",bu}var US;function P4(){if(US)return Lb.exports;US=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(),Lb.exports=z4(),Lb.exports}var q4=P4(),kh=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(){}},U4={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},vo,y1,PA,H4=(PA=class{constructor(){se(this,vo,U4);se(this,y1,!1)}setTimeoutProvider(i){Ht(this,vo,i)}setTimeout(i,e){return it(this,vo).setTimeout(i,e)}clearTimeout(i){it(this,vo).clearTimeout(i)}setInterval(i,e){return it(this,vo).setInterval(i,e)}clearInterval(i){it(this,vo).clearInterval(i)}},vo=new WeakMap,y1=new WeakMap,PA),gl=new H4;function W4(i){setTimeout(i,0)}var Ll=typeof window>"u"||"Deno"in globalThis;function Zr(){}function G4(i,e){return typeof i=="function"?i(e):i}function Cx(i){return typeof i=="number"&&i>=0&&i!==1/0}function JA(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 HS(i,e){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=i;if(c){if(n){if(e.queryHash!==x1(c,e.options))return!1}else if(!pd(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 WS(i,e){const{exact:r,status:n,predicate:a,mutationKey:o}=i;if(o){if(!e.options.mutationKey)return!1;if(r){if(Ol(e.options.mutationKey)!==Ol(o))return!1}else if(!pd(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function x1(i,e){return((e==null?void 0:e.queryKeyHashFn)||Ol)(i)}function Ol(i){return JSON.stringify(i,(e,r)=>kx(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function pd(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(r=>pd(i[r],e[r])):!1}var Y4=Object.prototype.hasOwnProperty;function tM(i,e,r=0){if(i===e)return i;if(r>500)return e;const n=GS(i)&&GS(e);if(!n&&!(kx(i)&&kx(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:Y4.call(i,g))&&d++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[g]=y;continue}const v=tM(x,y,r+1);u[g]=v,v===x&&d++}return o===h&&d===o?i:u}function eg(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 GS(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function kx(i){if(!YS(i))return!1;const e=i.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!YS(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function YS(i){return Object.prototype.toString.call(i)==="[object Object]"}function K4(i){return new Promise(e=>{gl.setTimeout(e,i)})}function wx(i,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(i,e):r.structuralSharing!==!1?tM(i,e):e}function V4(i,e,r=0){const n=[...i,e];return r&&n.length>r?n.slice(1):n}function X4(i,e,r=0){const n=[e,...i];return r&&n.length>r?n.slice(0,-1):n}var v1=Symbol();function eM(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===v1?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function _1(i,e){return typeof i=="function"?i(...e):!!i}function Z4(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 vl,_o,Uc,qA,Q4=(qA=class extends kh{constructor(){super();se(this,vl);se(this,_o);se(this,Uc);Ht(this,Uc,e=>{if(!Ll&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){it(this,_o)||this.setEventListener(it(this,Uc))}onUnsubscribe(){var e;this.hasListeners()||((e=it(this,_o))==null||e.call(this),Ht(this,_o,void 0))}setEventListener(e){var r;Ht(this,Uc,e),(r=it(this,_o))==null||r.call(this),Ht(this,_o,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){it(this,vl)!==e&&(Ht(this,vl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof it(this,vl)=="boolean"?it(this,vl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},vl=new WeakMap,_o=new WeakMap,Uc=new WeakMap,qA),C1=new Q4;function Sx(){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 J4=W4;function tI(){let i=[],e=0,r=h=>{h()},n=h=>{h()},a=J4;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=tI(),Hc,Co,Wc,UA,eI=(UA=class extends kh{constructor(){super();se(this,Hc,!0);se(this,Co);se(this,Wc);Ht(this,Wc,e=>{if(!Ll&&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(){it(this,Co)||this.setEventListener(it(this,Wc))}onUnsubscribe(){var e;this.hasListeners()||((e=it(this,Co))==null||e.call(this),Ht(this,Co,void 0))}setEventListener(e){var r;Ht(this,Wc,e),(r=it(this,Co))==null||r.call(this),Ht(this,Co,e(this.setOnline.bind(this)))}setOnline(e){it(this,Hc)!==e&&(Ht(this,Hc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return it(this,Hc)}},Hc=new WeakMap,Co=new WeakMap,Wc=new WeakMap,UA),ig=new eI;function iI(i){return Math.min(1e3*2**i,3e4)}function iM(i){return(i??"online")==="online"?ig.isOnline():!0}var Tx=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function rM(i){let e=!1,r=0,n;const a=Sx(),o=()=>a.status!=="pending",c=_=>{var C;if(!o()){const k=new Tx(_);x(k),(C=i.onCancel)==null||C.call(i,k)}},h=()=>{e=!0},u=()=>{e=!1},d=()=>C1.isFocused()&&(i.networkMode==="always"||ig.isOnline())&&i.canRun(),f=()=>iM(i.networkMode)&&i.canRun(),g=_=>{o()||(n==null||n(),a.resolve(_))},x=_=>{o()||(n==null||n(),a.reject(_))},y=()=>new Promise(_=>{var C;n=k=>{(o()||d())&&_(k)},(C=i.onPause)==null||C.call(i)}).then(()=>{var _;n=void 0,o()||(_=i.onContinue)==null||_.call(i)}),v=()=>{if(o())return;let _;const C=r===0?i.initialPromise:void 0;try{_=C??i.fn()}catch(k){_=Promise.reject(k)}Promise.resolve(_).then(g).catch(k=>{var O;if(o())return;const T=i.retry??(Ll?0:3),E=i.retryDelay??iI,N=typeof E=="function"?E(r,k):E,B=T===!0||typeof T=="number"&&r<T||typeof T=="function"&&T(r,k);if(e||!B){x(k);return}r++,(O=i.onFail)==null||O.call(i,r,k),K4(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 _l,HA,nM=(HA=class{constructor(){se(this,_l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cx(this.gcTime)&&Ht(this,_l,gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(Ll?1/0:300*1e3))}clearGcTimeout(){it(this,_l)&&(gl.clearTimeout(it(this,_l)),Ht(this,_l,void 0))}},_l=new WeakMap,HA),Cl,Gc,ia,kl,_r,Bd,wl,fa,_s,WA,rI=(WA=class extends nM{constructor(e){super();se(this,fa);se(this,Cl);se(this,Gc);se(this,ia);se(this,kl);se(this,_r);se(this,Bd);se(this,wl);Ht(this,wl,!1),Ht(this,Bd,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ht(this,kl,e.client),Ht(this,ia,it(this,kl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ht(this,Cl,VS(this.options)),this.state=e.state??it(this,Cl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=it(this,_r))==null?void 0:e.promise}setOptions(e){if(this.options={...it(this,Bd),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=VS(this.options);r.data!==void 0&&(this.setState(KS(r.data,r.dataUpdatedAt)),Ht(this,Cl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&it(this,ia).remove(this)}setData(e,r){const n=wx(this.state.data,e,this.options);return je(this,fa,_s).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){je(this,fa,_s).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,a;const r=(n=it(this,_r))==null?void 0:n.promise;return(a=it(this,_r))==null||a.cancel(e),r?r.then(Zr).catch(Zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(it(this,Cl))}isActive(){return this.observers.some(e=>ra(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===v1||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:!JA(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=it(this,_r))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=it(this,_r))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),it(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||(it(this,_r)&&(it(this,wl)?it(this,_r).cancel({revert:!0}):it(this,_r).cancelRetry()),this.scheduleGc()),it(this,ia).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,fa,_s).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=it(this,_r))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(it(this,_r))return it(this,_r).continueRetry(),it(this,_r).promise}if(e&&this.setOptions(e),!this.options.queryFn){const N=this.observers.find(B=>B.options.queryFn);N&&this.setOptions(N.options)}const n=new AbortController,a=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ht(this,wl,!0),n.signal)})},o=()=>{const N=eM(this.options,r),O=(()=>{const A={client:it(this,kl),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return Ht(this,wl,!1),this.options.persister?this.options.persister(N,O,this):N(O)},h=(()=>{const N={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:it(this,kl),state:this.state,fetchFn:o};return a(N),N})();(d=this.options.behavior)==null||d.onFetch(h,this),Ht(this,Gc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=h.fetchOptions)==null?void 0:f.meta))&&je(this,fa,_s).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Ht(this,_r,rM({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,onCancel:N=>{N instanceof Tx&&N.revert&&this.setState({...it(this,Gc),fetchStatus:"idle"}),n.abort()},onFail:(N,B)=>{je(this,fa,_s).call(this,{type:"failed",failureCount:N,error:B})},onPause:()=>{je(this,fa,_s).call(this,{type:"pause"})},onContinue:()=>{je(this,fa,_s).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const N=await it(this,_r).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(y=(x=it(this,ia).config).onSuccess)==null||y.call(x,N,this),(_=(v=it(this,ia).config).onSettled)==null||_.call(v,N,this.state.error,this),N}catch(N){if(N instanceof Tx){if(N.silent)return it(this,_r).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw je(this,fa,_s).call(this,{type:"error",error:N}),(k=(C=it(this,ia).config).onError)==null||k.call(C,N,this),(E=(T=it(this,ia).config).onSettled)==null||E.call(T,this.state.data,N,this),N}finally{this.scheduleGc()}}},Cl=new WeakMap,Gc=new WeakMap,ia=new WeakMap,kl=new WeakMap,_r=new WeakMap,Bd=new WeakMap,wl=new WeakMap,fa=new WeakSet,_s=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,...aM(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...KS(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ht(this,Gc,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()}),it(this,ia).notify({query:this,type:"updated",action:e})})},WA);function aM(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iM(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function KS(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function VS(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,Ze,Ld,Xr,Sl,Yc,ws,ko,Od,Kc,Vc,Tl,El,wo,Xc,ui,Hu,Ex,Nx,Ax,Mx,Bx,Lx,Ox,sM,GA,nI=(GA=class extends kh{constructor(e,r){super();se(this,ui);se(this,mn);se(this,Ze);se(this,Ld);se(this,Xr);se(this,Sl);se(this,Yc);se(this,ws);se(this,ko);se(this,Od);se(this,Kc);se(this,Vc);se(this,Tl);se(this,El);se(this,wo);se(this,Xc,new Set);this.options=r,Ht(this,mn,e),Ht(this,ko,null),Ht(this,ws,Sx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(it(this,Ze).addObserver(this),XS(it(this,Ze),this.options)?je(this,ui,Hu).call(this):this.updateResult(),je(this,ui,Mx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rx(it(this,Ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rx(it(this,Ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,je(this,ui,Bx).call(this),je(this,ui,Lx).call(this),it(this,Ze).removeObserver(this)}setOptions(e){const r=this.options,n=it(this,Ze);if(this.options=it(this,mn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ra(this.options.enabled,it(this,Ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");je(this,ui,Ox).call(this),it(this,Ze).setOptions(this.options),r._defaulted&&!eg(this.options,r)&&it(this,mn).getQueryCache().notify({type:"observerOptionsUpdated",query:it(this,Ze),observer:this});const a=this.hasListeners();a&&ZS(it(this,Ze),n,this.options,r)&&je(this,ui,Hu).call(this),this.updateResult(),a&&(it(this,Ze)!==n||ra(this.options.enabled,it(this,Ze))!==ra(r.enabled,it(this,Ze))||Bo(this.options.staleTime,it(this,Ze))!==Bo(r.staleTime,it(this,Ze)))&&je(this,ui,Ex).call(this);const o=je(this,ui,Nx).call(this);a&&(it(this,Ze)!==n||ra(this.options.enabled,it(this,Ze))!==ra(r.enabled,it(this,Ze))||o!==it(this,wo))&&je(this,ui,Ax).call(this,o)}getOptimisticResult(e){const r=it(this,mn).getQueryCache().build(it(this,mn),e),n=this.createResult(r,e);return sI(this,n)&&(Ht(this,Xr,n),Ht(this,Yc,this.options),Ht(this,Sl,it(this,Ze).state)),n}getCurrentResult(){return it(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&&it(this,ws).status==="pending"&&it(this,ws).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){it(this,Xc).add(e)}getCurrentQuery(){return it(this,Ze)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=it(this,mn).defaultQueryOptions(e),n=it(this,mn).getQueryCache().build(it(this,mn),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return je(this,ui,Hu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),it(this,Xr)))}createResult(e,r){var F;const n=it(this,Ze),a=this.options,o=it(this,Xr),c=it(this,Sl),h=it(this,Yc),d=e!==n?e.state:it(this,Ld),{state:f}=e;let g={...f},x=!1,y;if(r._optimisticResults){const D=this.hasListeners(),z=!D&&XS(e,r),U=D&&ZS(e,n,r,a);(z||U)&&(g={...g,...aM(f.data,e.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:_,status:C}=g;y=g.data;let k=!1;if(r.placeholderData!==void 0&&y===void 0&&C==="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((F=it(this,Vc))==null?void 0:F.state.data,it(this,Vc)):r.placeholderData,D!==void 0&&(C="success",y=wx(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===it(this,Od))y=it(this,Kc);else try{Ht(this,Od,r.select),y=r.select(y),y=wx(o==null?void 0:o.data,y,r),Ht(this,Kc,y),Ht(this,ko,null)}catch(D){Ht(this,ko,D)}it(this,ko)&&(v=it(this,ko),y=it(this,Kc),_=Date.now(),C="error");const T=g.fetchStatus==="fetching",E=C==="pending",N=C==="error",B=E&&T,O=y!==void 0,M={status:C,fetchStatus:g.fetchStatus,isPending:E,isSuccess:C==="success",isError:N,isInitialLoading:B,isLoading:B,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:_,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:k1(e,r),refetch:this.refetch,promise:it(this,ws),isEnabled:ra(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=M.data!==void 0,z=M.status==="error"&&!D,U=H=>{z?H.reject(M.error):D&&H.resolve(M.data)},K=()=>{const H=Ht(this,ws,M.promise=Sx());U(H)},$=it(this,ws);switch($.status){case"pending":e.queryHash===n.queryHash&&U($);break;case"fulfilled":(z||M.data!==$.value)&&K();break;case"rejected":(!z||M.error!==$.reason)&&K();break}}return M}updateResult(){const e=it(this,Xr),r=this.createResult(it(this,Ze),this.options);if(Ht(this,Sl,it(this,Ze).state),Ht(this,Yc,this.options),it(this,Sl).data!==void 0&&Ht(this,Vc,it(this,Ze)),eg(r,e))return;Ht(this,Xr,r);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!it(this,Xc).size)return!0;const c=new Set(o??it(this,Xc));return this.options.throwOnError&&c.add("error"),Object.keys(it(this,Xr)).some(h=>{const u=h;return it(this,Xr)[u]!==e[u]&&c.has(u)})};je(this,ui,sM).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&je(this,ui,Mx).call(this)}},mn=new WeakMap,Ze=new WeakMap,Ld=new WeakMap,Xr=new WeakMap,Sl=new WeakMap,Yc=new WeakMap,ws=new WeakMap,ko=new WeakMap,Od=new WeakMap,Kc=new WeakMap,Vc=new WeakMap,Tl=new WeakMap,El=new WeakMap,wo=new WeakMap,Xc=new WeakMap,ui=new WeakSet,Hu=function(e){je(this,ui,Ox).call(this);let r=it(this,Ze).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Zr)),r},Ex=function(){je(this,ui,Bx).call(this);const e=Bo(this.options.staleTime,it(this,Ze));if(Ll||it(this,Xr).isStale||!Cx(e))return;const n=JA(it(this,Xr).dataUpdatedAt,e)+1;Ht(this,Tl,gl.setTimeout(()=>{it(this,Xr).isStale||this.updateResult()},n))},Nx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(it(this,Ze)):this.options.refetchInterval)??!1},Ax=function(e){je(this,ui,Lx).call(this),Ht(this,wo,e),!(Ll||ra(this.options.enabled,it(this,Ze))===!1||!Cx(it(this,wo))||it(this,wo)===0)&&Ht(this,El,gl.setInterval(()=>{(this.options.refetchIntervalInBackground||C1.isFocused())&&je(this,ui,Hu).call(this)},it(this,wo)))},Mx=function(){je(this,ui,Ex).call(this),je(this,ui,Ax).call(this,je(this,ui,Nx).call(this))},Bx=function(){it(this,Tl)&&(gl.clearTimeout(it(this,Tl)),Ht(this,Tl,void 0))},Lx=function(){it(this,El)&&(gl.clearInterval(it(this,El)),Ht(this,El,void 0))},Ox=function(){const e=it(this,mn).getQueryCache().build(it(this,mn),this.options);if(e===it(this,Ze))return;const r=it(this,Ze);Ht(this,Ze,e),Ht(this,Ld,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},sM=function(e){gr.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(it(this,Xr))}),it(this,mn).getQueryCache().notify({query:it(this,Ze),type:"observerResultsUpdated"})})},GA);function aI(i,e){return ra(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function XS(i,e){return aI(i,e)||i.state.data!==void 0&&Rx(i,e,e.refetchOnMount)}function Rx(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&&k1(i,e)}return!1}function ZS(i,e,r,n){return(i!==e||ra(n.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&k1(i,r)}function k1(i,e){return ra(e.enabled,i)!==!1&&i.isStaleByTime(Bo(e.staleTime,i))}function sI(i,e){return!eg(i.getCurrentResult(),e)}function QS(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 _=!1;const C=E=>{Z4(E,()=>e.signal,()=>_=!0)},k=eM(e.options,e.fetchOptions),T=async(E,N,B)=>{if(_)return Promise.reject();if(N==null&&E.pages.length)return Promise.resolve(E);const A=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:N,direction:B?"backward":"forward",meta:e.options.meta};return C(z),z})(),M=await k(A),{maxPages:F}=e.options,D=B?X4:V4;return{pages:D(E.pages,M,F),pageParams:D(E.pageParams,N,F)}};if(a&&o.length){const E=a==="backward",N=E?oI:JS,B={pages:o,pageParams:c},O=N(n,B);h=await T(B,O,E)}else{const E=i??o.length;do{const N=u===0?c[0]??n.initialPageParam:JS(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:C.call(_,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=d}}}function JS(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 oI(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 Rd,Pa,Pr,Nl,qa,mo,YA,lI=(YA=class extends nM{constructor(e){super();se(this,qa);se(this,Rd);se(this,Pa);se(this,Pr);se(this,Nl);Ht(this,Rd,e.client),this.mutationId=e.mutationId,Ht(this,Pr,e.mutationCache),Ht(this,Pa,[]),this.state=e.state||oM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){it(this,Pa).includes(e)||(it(this,Pa).push(e),this.clearGcTimeout(),it(this,Pr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ht(this,Pa,it(this,Pa).filter(r=>r!==e)),this.scheduleGc(),it(this,Pr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){it(this,Pa).length||(this.state.status==="pending"?this.scheduleGc():it(this,Pr).remove(this))}continue(){var e;return((e=it(this,Nl))==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,B,O,A;const r=()=>{je(this,qa,mo).call(this,{type:"continue"})},n={client:it(this,Rd),meta:this.options.meta,mutationKey:this.options.mutationKey};Ht(this,Nl,rM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,F)=>{je(this,qa,mo).call(this,{type:"failed",failureCount:M,error:F})},onPause:()=>{je(this,qa,mo).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>it(this,Pr).canRun(this)}));const a=this.state.status==="pending",o=!it(this,Nl).canStart();try{if(a)r();else{je(this,qa,mo).call(this,{type:"pending",variables:e,isPaused:o}),it(this,Pr).config.onMutate&&await it(this,Pr).config.onMutate(e,this,n);const F=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));F!==this.state.context&&je(this,qa,mo).call(this,{type:"pending",context:F,variables:e,isPaused:o})}const M=await it(this,Nl).start();return await((d=(u=it(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=it(this,Pr).config).onSettled)==null?void 0:y.call(x,M,null,this.state.variables,this.state.context,this,n)),await((_=(v=this.options).onSettled)==null?void 0:_.call(v,M,null,e,this.state.context,n)),je(this,qa,mo).call(this,{type:"success",data:M}),M}catch(M){try{await((k=(C=it(this,Pr).config).onError)==null?void 0:k.call(C,M,e,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((E=(T=this.options).onError)==null?void 0:E.call(T,M,e,this.state.context,n))}catch(F){Promise.reject(F)}try{await((B=(N=it(this,Pr).config).onSettled)==null?void 0:B.call(N,void 0,M,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((A=(O=this.options).onSettled)==null?void 0:A.call(O,void 0,M,e,this.state.context,n))}catch(F){Promise.reject(F)}throw je(this,qa,mo).call(this,{type:"error",error:M}),M}finally{it(this,Pr).runNext(this)}}},Rd=new WeakMap,Pa=new WeakMap,Pr=new WeakMap,Nl=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(()=>{it(this,Pa).forEach(n=>{n.onMutationUpdate(e)}),it(this,Pr).notify({mutation:this,type:"updated",action:e})})},YA);function oM(){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,Dd,KA,cI=(KA=class extends kh{constructor(e={}){super();se(this,Ss);se(this,pa);se(this,Dd);this.config=e,Ht(this,Ss,new Set),Ht(this,pa,new Map),Ht(this,Dd,0)}build(e,r,n){const a=new lI({client:e,mutationCache:this,mutationId:++hp(this,Dd)._,options:e.defaultMutationOptions(r),state:n});return this.add(a),a}add(e){it(this,Ss).add(e);const r=up(e);if(typeof r=="string"){const n=it(this,pa).get(r);n?n.push(e):it(this,pa).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(it(this,Ss).delete(e)){const r=up(e);if(typeof r=="string"){const n=it(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&&it(this,pa).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=up(e);if(typeof r=="string"){const n=it(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=up(e);if(typeof r=="string"){const a=(n=it(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(()=>{it(this,Ss).forEach(e=>{this.notify({type:"removed",mutation:e})}),it(this,Ss).clear(),it(this,pa).clear()})}getAll(){return Array.from(it(this,Ss))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>WS(r,n))}findAll(e={}){return this.getAll().filter(r=>WS(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,Dd=new WeakMap,KA);function up(i){var e;return(e=i.options.scope)==null?void 0:e.id}var Ts,So,yn,Es,Rs,Ip,Dx,VA,hI=(VA=class extends kh{constructor(r,n){super();se(this,Rs);se(this,Ts);se(this,So);se(this,yn);se(this,Es);Ht(this,Ts,r),this.setOptions(n),this.bindMethods(),je(this,Rs,Ip).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=it(this,Ts).defaultMutationOptions(r),eg(this.options,n)||it(this,Ts).getMutationCache().notify({type:"observerOptionsUpdated",mutation:it(this,yn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ol(n.mutationKey)!==Ol(this.options.mutationKey)?this.reset():((a=it(this,yn))==null?void 0:a.state.status)==="pending"&&it(this,yn).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=it(this,yn))==null||r.removeObserver(this)}onMutationUpdate(r){je(this,Rs,Ip).call(this),je(this,Rs,Dx).call(this,r)}getCurrentResult(){return it(this,So)}reset(){var r;(r=it(this,yn))==null||r.removeObserver(this),Ht(this,yn,void 0),je(this,Rs,Ip).call(this),je(this,Rs,Dx).call(this)}mutate(r,n){var a;return Ht(this,Es,n),(a=it(this,yn))==null||a.removeObserver(this),Ht(this,yn,it(this,Ts).getMutationCache().build(it(this,Ts),this.options)),it(this,yn).addObserver(this),it(this,yn).execute(r)}},Ts=new WeakMap,So=new WeakMap,yn=new WeakMap,Es=new WeakMap,Rs=new WeakSet,Ip=function(){var n;const r=((n=it(this,yn))==null?void 0:n.state)??oM();Ht(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})},Dx=function(r){gr.batch(()=>{var n,a,o,c,h,u,d,f;if(it(this,Es)&&this.hasListeners()){const g=it(this,So).variables,x=it(this,So).context,y={client:it(this,Ts),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(a=(n=it(this,Es)).onSuccess)==null||a.call(n,r.data,g,x,y)}catch(v){Promise.reject(v)}try{(c=(o=it(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=it(this,Es)).onError)==null||u.call(h,r.error,g,x,y)}catch(v){Promise.reject(v)}try{(f=(d=it(this,Es)).onSettled)==null||f.call(d,void 0,r.error,g,x,y)}catch(v){Promise.reject(v)}}}this.listeners.forEach(g=>{g(it(this,So))})})},VA),Ua,XA,uI=(XA=class extends kh{constructor(e={}){super();se(this,Ua);this.config=e,Ht(this,Ua,new Map)}build(e,r,n){const a=r.queryKey,o=r.queryHash??x1(a,r);let c=this.get(o);return c||(c=new rI({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){it(this,Ua).has(e.queryHash)||(it(this,Ua).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=it(this,Ua).get(e.queryHash);r&&(e.destroy(),r===e&&it(this,Ua).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){gr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return it(this,Ua).get(e)}getAll(){return[...it(this,Ua).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>HS(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>HS(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,XA),Xi,To,Eo,Zc,Qc,No,Jc,th,ZA,dI=(ZA=class{constructor(i={}){se(this,Xi);se(this,To);se(this,Eo);se(this,Zc);se(this,Qc);se(this,No);se(this,Jc);se(this,th);Ht(this,Xi,i.queryCache||new uI),Ht(this,To,i.mutationCache||new cI),Ht(this,Eo,i.defaultOptions||{}),Ht(this,Zc,new Map),Ht(this,Qc,new Map),Ht(this,No,0)}mount(){hp(this,No)._++,it(this,No)===1&&(Ht(this,Jc,C1.subscribe(async i=>{i&&(await this.resumePausedMutations(),it(this,Xi).onFocus())})),Ht(this,th,ig.subscribe(async i=>{i&&(await this.resumePausedMutations(),it(this,Xi).onOnline())})))}unmount(){var i,e;hp(this,No)._--,it(this,No)===0&&((i=it(this,Jc))==null||i.call(this),Ht(this,Jc,void 0),(e=it(this,th))==null||e.call(this),Ht(this,th,void 0))}isFetching(i){return it(this,Xi).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return it(this,To).findAll({...i,status:"pending"}).length}getQueryData(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=it(this,Xi).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),r=it(this,Xi).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 it(this,Xi).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=it(this,Xi).get(n.queryHash),o=a==null?void 0:a.state.data,c=G4(e,o);if(c!==void 0)return it(this,Xi).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(i,e,r){return gr.batch(()=>it(this,Xi).findAll(i).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=it(this,Xi).get(e.queryHash))==null?void 0:r.state}removeQueries(i){const e=it(this,Xi);gr.batch(()=>{e.findAll(i).forEach(r=>{e.remove(r)})})}resetQueries(i,e){const r=it(this,Xi);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(()=>it(this,Xi).findAll(i).map(a=>a.cancel(r)));return Promise.all(n).then(Zr).catch(Zr)}invalidateQueries(i,e={}){return gr.batch(()=>(it(this,Xi).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(()=>it(this,Xi).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=it(this,Xi).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=QS(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(Zr).catch(Zr)}ensureInfiniteQueryData(i){return i.behavior=QS(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return ig.isOnline()?it(this,To).resumePausedMutations():Promise.resolve()}getQueryCache(){return it(this,Xi)}getMutationCache(){return it(this,To)}getDefaultOptions(){return it(this,Eo)}setDefaultOptions(i){Ht(this,Eo,i)}setQueryDefaults(i,e){it(this,Zc).set(Ol(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...it(this,Zc).values()],r={};return e.forEach(n=>{pd(i,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(i,e){it(this,Qc).set(Ol(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...it(this,Qc).values()],r={};return e.forEach(n=>{pd(i,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(i){if(i._defaulted)return i;const e={...it(this,Eo).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=x1(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===v1&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...it(this,Eo).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){it(this,Xi).clear(),it(this,To).clear()}},Xi=new WeakMap,To=new WeakMap,Eo=new WeakMap,Zc=new WeakMap,Qc=new WeakMap,No=new WeakMap,Jc=new WeakMap,th=new WeakMap,ZA),lM=Y.createContext(void 0),kr=i=>{const e=Y.useContext(lM);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},t2=({client:i,children:e})=>(Y.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),m.jsx(lM.Provider,{value:i,children:e})),cM=Y.createContext(!1),fI=()=>Y.useContext(cM);cM.Provider;function pI(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var gI=Y.createContext(pI()),mI=()=>Y.useContext(gI),yI=(i,e,r)=>{const n=r!=null&&r.state.error&&typeof i.throwOnError=="function"?_1(i.throwOnError,[r.state.error,r]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},bI=i=>{Y.useEffect(()=>{i.clearReset()},[i])},xI=({result:i,errorResetBoundary:e,throwOnError:r,query:n,suspense:a})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(a&&i.data===void 0||_1(r,[i.error,n])),vI=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))}},_I=(i,e)=>i.isLoading&&i.isFetching&&!e,CI=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,e2=(i,e,r)=>e.fetchOptimistic(i).catch(()=>{r.clearReset()});function kI(i,e,r){var x,y,v,_;const n=fI(),a=mI(),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",vI(c),yI(c,a,h),bI(a);const u=!o.getQueryCache().get(c.queryHash),[d]=Y.useState(()=>new e(o,c)),f=d.getOptimisticResult(c),g=!n&&i.subscribed!==!1;if(Y.useSyncExternalStore(Y.useCallback(C=>{const k=g?d.subscribe(gr.batchCalls(C)):Zr;return d.updateResult(),k},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Y.useEffect(()=>{d.setOptions(c)},[c,d]),CI(c,f))throw e2(c,d,a);if(xI({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw f.error;if((_=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||_.call(v,c,f),c.experimental_prefetchInRender&&!Ll&&_I(f,n)){const C=u?e2(c,d,a):h==null?void 0:h.promise;C==null||C.catch(Zr).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?f:d.trackResult(f)}function di(i,e){return kI(i,nI)}function Hr(i,e){const r=kr(),[n]=Y.useState(()=>new hI(r,i));Y.useEffect(()=>{n.setOptions(i)},[n,i]);const a=Y.useSyncExternalStore(Y.useCallback(c=>n.subscribe(gr.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=Y.useCallback((c,h)=>{n.mutate(c,h).catch(Zr)},[n]);if(a.error&&_1(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const wI="/api";let jx=null;function hM(i){jx=i}class SI{async request(e,r){const n={"Content-Type":"application/json",...r==null?void 0:r.headers};jx&&(n["X-Dreamcontext-Vault"]=jx);const a=await fetch(`${wI}${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 oe=new SI;function uM(){return di({queryKey:["vaults"],queryFn:()=>oe.get("/vaults")})}function TI(){return di({queryKey:["connections"],queryFn:()=>oe.get("/connections"),select:i=>i.connections})}function EI(){const i=kr();return Hr({mutationFn:e=>oe.post("/connections",e),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]})}})}function NI(){const i=kr();return Hr({mutationFn:e=>oe.del(`/connections/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]})}})}const AI="modulepreload",MI=function(i){return"/"+i},i2={},Te=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=MI(d),d in i2)return;i2[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":AI,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 zo(){return!!window.__TAURI_INTERNALS__}async function BI(){if(zo()){const{open:e}=await Te(async()=>{const{open:n}=await import("./index-BK87l45R.js");return{open:n}},__vite__mapDeps([0,1])),r=await e({directory:!0,multiple:!1});return typeof r=="string"?r:null}const i=window.prompt("Enter an absolute path to a dreamcontext project:");return i&&i.trim()?i.trim():null}async function LI(i){if(zo()){const{WebviewWindow:e}=await Te(async()=>{const{WebviewWindow:o}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:o}},__vite__mapDeps([2,3,1])),r=`vault-${i.replace(/[^a-zA-Z0-9_-]/g,"-")}`,n=await e.getByLabel(r);if(n){await n.setFocus();return}const a=new e(r,{url:`${window.location.origin}/?vault=${encodeURIComponent(i)}`,title:`dreamcontext — ${i}`,width:1280,height:800});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 OI(){return di({queryKey:["launcher-defaults"],queryFn:()=>oe.get("/launcher/defaults"),staleTime:1/0})}function RI(){const i=kr();return Hr({mutationFn:e=>oe.post("/launcher/scaffold",e),onSuccess:()=>{i.invalidateQueries({queryKey:["vaults"]})}})}function DI(){return di({queryKey:["launcher-catalog"],queryFn:()=>oe.get("/launcher/catalog"),staleTime:1/0})}async function jI(i){return oe.get(`/launcher/detect?path=${encodeURIComponent(i)}`)}const FI=["name","description","targetUser","stack","priority","platforms","packs","review"],II=["path","description","targetUser","stack","priority","platforms","packs","review"],$I=["path","platforms","packs","review"],jb={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 zI({onClose:i,onReady:e}){const r=OI(),n=DI(),a=RI(),[o,c]=Y.useState(null),[h,u]=Y.useState(0),[d,f]=Y.useState(null),[g,x]=Y.useState(null),[y,v]=Y.useState(null),[_,C]=Y.useState(!1),[k,T]=Y.useState(""),[E,N]=Y.useState(""),[B,O]=Y.useState(""),[A,M]=Y.useState(""),[F,D]=Y.useState(""),[z,U]=Y.useState(""),[K,$]=Y.useState(""),[H,j]=Y.useState(["claude"]),[q,G]=Y.useState([]),[et,at]=Y.useState(!1),W=Y.useRef(null);function rt(zt,ye,Ne){ye(zt.includes(Ne)?zt.filter(ve=>ve!==Ne):[...zt,Ne])}Y.useEffect(()=>{var zt;o==="new"&&!E&&((zt=r.data)!=null&&zt.defaultParent)&&N(r.data.defaultParent)},[o,E,r.data]);const ft=o==="existing"?et?$I:II:FI,st=ft[h];Y.useEffect(()=>{var zt;(zt=W.current)==null||zt.focus()},[st,o]);function Ct(zt){c(zt),u(0),f(null)}async function ct(zt){f(null);const ye=await BI();if(ye){if(zt==="parent"){N(ye);return}O(ye);try{const Ne=await jI(ye);T(Ne.name),!z&&Ne.stack&&U(Ne.stack),at(Ne.hasContext),u(1)}catch(Ne){f(Ne instanceof Error?Ne.message:String(Ne))}}}const X=Y.useMemo(()=>st==="name"?k.trim().length>0&&E.trim().length>0:st==="path"?B.trim().length>0:!0,[st,k,E,B]);function Z(){f(null),h<ft.length-1&&u(zt=>zt+1)}function Q(){f(null),h>0?u(zt=>zt-1):c(null)}async function ot(){f(null);const zt=o==="existing"?{mode:"existing",name:k.trim(),projectPath:B.trim()}:{mode:"new",name:k.trim(),parentDir:E.trim()};zt.description=A.trim()||void 0,zt.targetUser=F.trim()||void 0,zt.stack=z.trim()||void 0,zt.priority=K.trim()||void 0,zt.platforms=H.length>0?H:void 0,zt.packs=q.length>0?q:void 0;try{const ye=await a.mutateAsync(zt);x(ye.vault),v(ye.cli??null)}catch(ye){f(ye instanceof Error?ye.message:String(ye))}}const vt="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 At(){try{await navigator.clipboard.writeText(vt),C(!0),setTimeout(()=>C(!1),1500)}catch{f("Could not copy to clipboard.")}}function jt(zt,ye,Ne){return m.jsx("input",{ref:W,type:"text",className:"wiz-input",value:zt,placeholder:Ne,onChange:ve=>ye(ve.target.value),onKeyDown:ve=>{ve.key==="Enter"&&X&&Z()}})}function qt(){var Ti,fe,_i;if(g)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:["“",g.name,"” is ready"]}),m.jsx("p",{className:"wiz-hint",children:g.path}),(y==null?void 0:y.status)==="installed"&&m.jsx("p",{className:"wiz-hint",children:"Installed the dreamcontext CLI from npm so your hooks work."}),(y==null?void 0:y.status)==="failed"&&m.jsx("div",{className:"wiz-error",children:y.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:vt}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:At,children:_?"Copied ✓":"Copy prompt"})]}),m.jsxs("div",{className:"wiz-actions",children:[m.jsx("button",{type:"button",className:"wiz-btn",onClick:i,children:"Close"}),m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:()=>e(g.name),children:"Open project →"})]})]});if(o===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:()=>Ct("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:()=>Ct("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(st==="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:B,readOnly:!0,placeholder:"No folder chosen"}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>ct("project"),children:a.isPending?"Working…":"Browse…"})]})]});if(st==="name")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:jb.name.label}),m.jsx("p",{className:"wiz-hint",children:jb.name.hint}),jt(k,T,"my-project"),m.jsx("label",{className:"wiz-sublabel",children:"Where should it live?"}),m.jsxs("div",{className:"wiz-row",children:[m.jsx("input",{className:"wiz-input",type:"text",value:E,placeholder:((Ti=r.data)==null?void 0:Ti.defaultParent)??"~/projects",onChange:$e=>N($e.target.value)}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>ct("parent"),children:"Browse…"})]}),k.trim()&&E.trim()&&m.jsxs("p",{className:"wiz-hint wiz-preview",children:["Creates: ",E.replace(/\/+$/,""),"/",k.trim()]})]});if(st==="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:k.trim()}),m.jsx("dt",{children:"Location"}),m.jsx("dd",{children:o==="new"?`${E.replace(/\/+$/,"")}/${k.trim()}`:B}),A.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Description"}),m.jsx("dd",{children:A.trim()})]}),F.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"For"}),m.jsx("dd",{children:F.trim()})]}),z.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Stack"}),m.jsx("dd",{children:z.trim()})]}),K.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Focus"}),m.jsx("dd",{children:K.trim()})]}),m.jsx("dt",{children:"Platforms"}),m.jsx("dd",{children:(H.length>0?H:["claude"]).map($e=>{var Ue,Fe;return((Fe=(Ue=n.data)==null?void 0:Ue.platforms.find(Ii=>Ii.id===$e))==null?void 0:Fe.label)??$e}).join(", ")}),q.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Skill packs"}),m.jsx("dd",{children:q.join(", ")})]})]})]});if(st==="platforms"){const $e=((fe=n.data)==null?void 0:fe.platforms)??[];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Which agent platforms?"}),m.jsx("p",{className:"wiz-hint",children:"Where dreamcontext installs its skills, agents, and hooks. Pick one or more."}),m.jsx("div",{className:"wiz-choices",children:$e.map(Ue=>{const Fe=H.includes(Ue.id);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${Fe?" wiz-select-on":""}`,onClick:()=>rt(H,j,Ue.id),"aria-pressed":Fe,children:[m.jsxs("span",{className:"wiz-choice-title",children:[Ue.label,Ue.recommended&&m.jsx("span",{className:"wiz-badge",children:"Recommended"})]}),m.jsx("span",{className:"wiz-hint",children:Ue.description})]},Ue.id)})}),H.length===0&&m.jsx("p",{className:"wiz-hint wiz-preview",children:"Nothing selected — defaults to Claude."})]})}if(st==="packs"){const $e=((_i=n.data)==null?void 0:_i.packs)??[];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Add skill packs?"}),m.jsx("p",{className:"wiz-hint",children:"Optional curated skills for your agent. You can add more later. Skip if unsure."}),$e.length===0?m.jsx("p",{className:"wiz-hint",children:"No optional packs available."}):m.jsx("div",{className:"wiz-choices",children:$e.map(Ue=>{const Fe=q.includes(Ue.name);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${Fe?" wiz-select-on":""}`,onClick:()=>rt(q,G,Ue.name),"aria-pressed":Fe,children:[m.jsxs("span",{className:"wiz-choice-title",children:[m.jsx("span",{className:"wiz-check","aria-hidden":!0,children:Fe?"☑":"☐"})," ",Ue.name]}),m.jsx("span",{className:"wiz-hint",children:Ue.description})]},Ue.name)})})]})}const ye=jb[st],Ne={description:[A,M,"A persistent brain for AI agents…"],targetUser:[F,D,"Developers"],stack:[z,U,"TypeScript, React, Node…"],priority:[K,$,"Initial setup"]},[ve,pi,Li]=Ne[st];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:ye.label}),m.jsx("p",{className:"wiz-hint",children:ye.hint}),jt(ve,pi,Li)]})}const Rt=st==="review",Gt=o!==null&&st!=="path"&&!g;return m.jsx("div",{className:"wiz-overlay",role:"dialog","aria-modal":"true",onClick:i,children:m.jsxs("div",{className:"wiz-modal",onClick:zt=>zt.stopPropagation(),children:[m.jsx("button",{type:"button",className:"wiz-close",onClick:i,"aria-label":"Close",children:"×"}),m.jsx("div",{className:"wiz-body",children:qt()}),d&&m.jsx("div",{className:"wiz-error",children:d}),Gt&&m.jsxs("div",{className:"wiz-actions",children:[m.jsx("button",{type:"button",className:"wiz-btn",onClick:Q,children:"Back"}),Rt?m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:ot,disabled:a.isPending||!k.trim(),children:a.isPending?"Setting up…":"Set up project"}):m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:Z,disabled:!X,children:"Next"})]})]})})}function PI(){const{data:i,isLoading:e,isError:r,error:n}=uM(),[a,o]=Y.useState(""),[c,h]=Y.useState(null),[u,d]=Y.useState(!1),f=(i==null?void 0:i.vaults)??[],g=Y.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 LI(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(zI,{onClose:()=>d(!1),onReady:async y=>{d(!1),await x(y)}})]})}function w1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hl=w1();function dM(i){Hl=i}var id={exec:()=>null};function fi(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")},qI=/^(?:[ \t]*(?:\n|$))+/,UI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,HI=/^ {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+|$)/,WI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S1=/(?:[*+-]|\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=fi(fM).replace(/bull/g,S1).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(),GI=fi(fM).replace(/bull/g,S1).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(),T1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,YI=/^[^\n]+/,E1=/(?!\s*\])(?:\\.|[^\[\]\\])+/,KI=fi(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",E1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),VI=fi(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S1).getRegex(),Xg="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",N1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,XI=fi("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",N1).replace("tag",Xg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gM=fi(T1).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",Xg).getRegex(),ZI=fi(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gM).getRegex(),A1={blockquote:ZI,code:UI,def:KI,fences:HI,heading:WI,hr:Fd,html:XI,lheading:pM,list:VI,newline:qI,paragraph:gM,table:id,text:YI},r2=fi("^ *([^\\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",Xg).getRegex(),QI={...A1,lheading:GI,table:r2,paragraph:fi(T1).replace("hr",Fd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",r2).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",Xg).getRegex()},JI={...A1,html:fi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",N1).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:id,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fi(T1).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()},t$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,e$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mM=/^( {2,}|\\)\n(?!\s*$)/,i$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Zg=/[\p{P}\p{S}]/u,M1=/[\s\p{P}\p{S}]/u,yM=/[^\s\p{P}\p{S}]/u,r$=fi(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,M1).getRegex(),bM=/(?!~)[\p{P}\p{S}]/u,n$=/(?!~)[\s\p{P}\p{S}]/u,a$=/(?:[^\s\p{P}\p{S}]|~)/u,s$=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,xM=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,o$=fi(xM,"u").replace(/punct/g,Zg).getRegex(),l$=fi(xM,"u").replace(/punct/g,bM).getRegex(),vM="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",c$=fi(vM,"gu").replace(/notPunctSpace/g,yM).replace(/punctSpace/g,M1).replace(/punct/g,Zg).getRegex(),h$=fi(vM,"gu").replace(/notPunctSpace/g,a$).replace(/punctSpace/g,n$).replace(/punct/g,bM).getRegex(),u$=fi("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,yM).replace(/punctSpace/g,M1).replace(/punct/g,Zg).getRegex(),d$=fi(/\\(punct)/,"gu").replace(/punct/g,Zg).getRegex(),f$=fi(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),p$=fi(N1).replace("(?:-->|$)","-->").getRegex(),g$=fi("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",p$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rg=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,m$=fi(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",rg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_M=fi(/^!?\[(label)\]\[(ref)\]/).replace("label",rg).replace("ref",E1).getRegex(),CM=fi(/^!?\[(ref)\](?:\[\])?/).replace("ref",E1).getRegex(),y$=fi("reflink|nolink(?!\\()","g").replace("reflink",_M).replace("nolink",CM).getRegex(),B1={_backpedal:id,anyPunctuation:d$,autolink:f$,blockSkip:s$,br:mM,code:e$,del:id,emStrongLDelim:o$,emStrongRDelimAst:c$,emStrongRDelimUnd:u$,escape:t$,link:m$,nolink:CM,punctuation:r$,reflink:_M,reflinkSearch:y$,tag:g$,text:i$,url:id},b$={...B1,link:fi(/^!?\[(label)\]\((.*?)\)/).replace("label",rg).getRegex(),reflink:fi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rg).getRegex()},Fx={...B1,emStrongRDelimAst:h$,emStrongLDelim:l$,url:fi(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},x$={...Fx,br:fi(mM).replace("{2,}","*").getRegex(),text:fi(Fx.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},dp={normal:A1,gfm:QI,pedantic:JI},xu={normal:B1,gfm:Fx,breaks:x$,pedantic:b$},v$={"&":"&","<":"<",">":">",'"':""","'":"'"},n2=i=>v$[i];function Oa(i,e){if(e){if(Jr.escapeTest.test(i))return i.replace(Jr.escapeReplace,n2)}else if(Jr.escapeTestNoEncode.test(i))return i.replace(Jr.escapeReplaceNoEncode,n2);return i}function a2(i){try{i=encodeURI(i).replace(Jr.percentDecode,"%")}catch{return null}return i}function s2(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 vu(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 _$(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 o2(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 C$(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 ng=class{constructor(i){ae(this,"options");ae(this,"rules");ae(this,"lexer");this.options=i||Hl}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:vu(r,`
|
|
54
|
+
`)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const r=e[0],n=C$(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=vu(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:vu(e[0],`
|
|
55
|
+
`)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let r=vu(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
|
+
`),_=this.blockquote(v);o[o.length-1]=_,n=n.substring(0,n.length-y.raw.length)+_.raw,a=a.substring(0,a.length-y.text.length)+_.text;break}else if((x==null?void 0:x.type)==="list"){const y=x,v=y.raw+`
|
|
64
|
+
`+r.join(`
|
|
65
|
+
`),_=this.list(v);o[o.length-1]=_,n=n.substring(0,n.length-x.raw.length)+_.raw,a=a.substring(0,a.length-y.raw.length)+_.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),B=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)||B.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 _=null,C;this.options.gfm&&(_=this.rules.other.listIsTask.exec(f),_&&(C=_[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!_,checked:C,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=s2(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(s2(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=vu(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=_$(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)),o2(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 o2(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 Ix{constructor(e){ae(this,"tokens");ae(this,"options");ae(this,"state");ae(this,"tokenizer");ae(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Hl,this.options.tokenizer=this.options.tokenizer||new ng,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:dp.normal,inline:xu.normal};this.options.pedantic?(r.block=dp.pedantic,r.inline=xu.pedantic):this.options.gfm&&(r.block=dp.gfm,this.options.breaks?r.inline=xu.breaks:r.inline=xu.gfm),this.tokenizer.rules=r}static get rules(){return{block:dp,inline:xu}}static lex(e,r){return new Ix(r).lex(e)}static lexInline(e,r){return new Ix(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(_=>{v=_.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}},ag=class{constructor(i){ae(this,"options");ae(this,"parser");this.options=i||Hl}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=a2(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=a2(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)}},L1=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 $x{constructor(e){ae(this,"options");ae(this,"renderer");ae(this,"textRenderer");this.options=e||Hl,this.options.renderer=this.options.renderer||new ag,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new L1}static parse(e,r){return new $x(r).parse(e)}static parseInline(e,r){return new $x(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}},_x,$p=(_x=class{constructor(i){ae(this,"options");ae(this,"block");this.options=i||Hl}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}},ae(_x,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),_x),k$=class{constructor(...i){ae(this,"defaults",w1());ae(this,"options",this.setOptions);ae(this,"parse",this.parseMarkdown(!0));ae(this,"parseInline",this.parseMarkdown(!1));ae(this,"Parser",As);ae(this,"Renderer",ag);ae(this,"TextRenderer",L1);ae(this,"Lexer",Ns);ae(this,"Tokenizer",ng);ae(this,"Hooks",$p);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 ag(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 ng(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 $p;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];$p.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}}},Rl=new k$;function we(i,e){return Rl.parse(i,e)}we.options=we.setOptions=function(i){return Rl.setOptions(i),we.defaults=Rl.defaults,dM(we.defaults),we};we.getDefaults=w1;we.defaults=Hl;we.use=function(...i){return Rl.use(...i),we.defaults=Rl.defaults,dM(we.defaults),we};we.walkTokens=function(i,e){return Rl.walkTokens(i,e)};we.parseInline=Rl.parseInline;we.Parser=As;we.parser=As.parse;we.Renderer=ag;we.TextRenderer=L1;we.Lexer=Ns;we.lexer=Ns.lex;we.Tokenizer=ng;we.Hooks=$p;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 l2(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 w$(i){if(Array.isArray(i))return i}function S$(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 T$(){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 E$(i,e){return w$(i)||S$(i,e)||N$(i,e)||T$()}function N$(i,e){if(i){if(typeof i=="string")return l2(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)?l2(i,e):void 0}}const kM=Object.entries,c2=Object.setPrototypeOf,A$=Object.isFrozen,M$=Object.getPrototypeOf,B$=Object.getOwnPropertyDescriptor;let rn=Object.freeze,sa=Object.seal,Oc=Object.create,wM=typeof Reflect<"u"&&Reflect,zx=wM.apply,Px=wM.construct;rn||(rn=function(e){return e});sa||(sa=function(e){return e});zx||(zx=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)});Px||(Px=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 wc=cr(Array.prototype.forEach),L$=cr(Array.prototype.lastIndexOf),h2=cr(Array.prototype.pop),Sc=cr(Array.prototype.push),O$=cr(Array.prototype.splice),Vr=Array.isArray,Wu=cr(String.prototype.toLowerCase),Fb=cr(String.prototype.toString),u2=cr(String.prototype.match),Tc=cr(String.prototype.replace),d2=cr(String.prototype.indexOf),R$=cr(String.prototype.trim),D$=cr(Number.prototype.toString),j$=cr(Boolean.prototype.toString),f2=typeof BigInt>"u"?null:cr(BigInt.prototype.toString),p2=typeof Symbol>"u"?null:cr(Symbol.prototype.toString),Vi=cr(Object.prototype.hasOwnProperty),_u=cr(Object.prototype.toString),Br=cr(RegExp.prototype.test),Cu=F$(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 zx(i,e,n)}}function F$(i){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Px(i,r)}}function Re(i,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wu;if(c2&&c2(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&&(A$(e)||(e[n]=o),a=o)}i[a]=!0}return i}function I$(i){for(let e=0;e<i.length;e++)Vi(i,e)||(i[e]=null);return i}function $r(i){const e=Oc(null);for(const n of kM(i)){var r=E$(n,2);const a=r[0],o=r[1];Vi(i,a)&&(Vr(o)?e[a]=I$(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=$r(o):e[a]=o)}return e}function $$(i){switch(typeof i){case"string":return i;case"number":return D$(i);case"boolean":return j$(i);case"bigint":return f2?f2(i):"0";case"symbol":return p2?p2(i):"Symbol()";case"undefined":return _u(i);case"function":case"object":{if(i===null)return _u(i);const e=i,r=Ra(e,"toString");if(typeof r=="function"){const n=r(e);return typeof n=="string"?n:_u(n)}return _u(i)}default:return _u(i)}}function Ra(i,e){for(;i!==null;){const n=B$(i,e);if(n){if(n.get)return cr(n.get);if(typeof n.value=="function")return cr(n.value)}i=M$(i)}function r(){return null}return r}function z$(i){try{return Br(i,""),!0}catch{return!1}}const g2=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"]),Ib=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"]),$b=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"]),P$=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"]),zb=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"]),q$=rn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),m2=rn(["#text"]),y2=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"]),Pb=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"]),b2=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"]),fp=rn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U$=sa(/{{[\w\W]*|^[\w\W]*}}/g),H$=sa(/<%[\w\W]*|^[\w\W]*%>/g),W$=sa(/\${[\w\W]*/g),G$=sa(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y$=sa(/^aria-[\-\w]+$/),x2=sa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K$=sa(/^(?:\w+script|data):/i),V$=sa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X$=sa(/^html$/i),Z$=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},Q$=function(){return typeof window>"u"?null:window},J$=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}},v2=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function SM(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q$();const e=Kt=>SM(Kt);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"),_=Ra(x,"nextSibling"),C=Ra(x,"childNodes"),k=Ra(x,"parentNode"),T=Ra(x,"shadowRoot"),E=Ra(x,"attributes"),N=c&&c.prototype?Ra(c.prototype,"nodeType"):null,B=c&&c.prototype?Ra(c.prototype,"nodeName"):null;if(typeof o=="function"){const Kt=r.createElement("template");Kt.content&&Kt.content.ownerDocument&&(r=Kt.content.ownerDocument)}let O,A="";const M=r,F=M.implementation,D=M.createNodeIterator,z=M.createDocumentFragment,U=M.getElementsByTagName,K=n.importNode;let $=v2();e.isSupported=typeof kM=="function"&&typeof k=="function"&&F&&F.createHTMLDocument!==void 0;const H=U$,j=H$,q=W$,G=G$,et=Y$,at=K$,W=V$,rt=Z$;let ft=x2,st=null;const Ct=Re({},[...g2,...Ib,...$b,...zb,...m2]);let ct=null;const X=Re({},[...y2,...Pb,...b2,...fp]);let Z=Object.seal(Oc(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}})),Q=null,ot=null;const vt=Object.seal(Oc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let At=!0,jt=!0,qt=!1,Rt=!0,Gt=!1,zt=!0,ye=!1,Ne=!1,ve=!1,pi=!1,Li=!1,Ti=!1,fe=!0,_i=!1;const $e="user-content-";let Ue=!0,Fe=!1,Ii={},Oi=null;const xr=Re({},["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 Cn=null;const $i=Re({},["audio","video","img","source","image","track"]);let De=null;const Ke=Re({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Be="http://www.w3.org/1998/Math/MathML",hr="http://www.w3.org/2000/svg",Ci="http://www.w3.org/1999/xhtml";let Zi=Ci,Ae=!1,er=null;const wr=Re({},[Be,hr,Ci],Fb);let Ui=Re({},["mi","mo","mn","ms","mtext"]),tt=Re({},["annotation-xml"]);const wt=Re({},["title","style","font","a","script"]);let Dt=null;const he=["application/xhtml+xml","text/html"],ai="text/html";let pe=null,Wt=null;const Pt=r.createElement("form"),le=function(V){return V instanceof RegExp||V instanceof Function},si=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Wt&&Wt===V)return;(!V||typeof V!="object")&&(V={}),V=$r(V),Dt=he.indexOf(V.PARSER_MEDIA_TYPE)===-1?ai:V.PARSER_MEDIA_TYPE,pe=Dt==="application/xhtml+xml"?Fb:Wu,st=Vi(V,"ALLOWED_TAGS")&&Vr(V.ALLOWED_TAGS)?Re({},V.ALLOWED_TAGS,pe):Ct,ct=Vi(V,"ALLOWED_ATTR")&&Vr(V.ALLOWED_ATTR)?Re({},V.ALLOWED_ATTR,pe):X,er=Vi(V,"ALLOWED_NAMESPACES")&&Vr(V.ALLOWED_NAMESPACES)?Re({},V.ALLOWED_NAMESPACES,Fb):wr,De=Vi(V,"ADD_URI_SAFE_ATTR")&&Vr(V.ADD_URI_SAFE_ATTR)?Re($r(Ke),V.ADD_URI_SAFE_ATTR,pe):Ke,Cn=Vi(V,"ADD_DATA_URI_TAGS")&&Vr(V.ADD_DATA_URI_TAGS)?Re($r($i),V.ADD_DATA_URI_TAGS,pe):$i,Oi=Vi(V,"FORBID_CONTENTS")&&Vr(V.FORBID_CONTENTS)?Re({},V.FORBID_CONTENTS,pe):xr,Q=Vi(V,"FORBID_TAGS")&&Vr(V.FORBID_TAGS)?Re({},V.FORBID_TAGS,pe):$r({}),ot=Vi(V,"FORBID_ATTR")&&Vr(V.FORBID_ATTR)?Re({},V.FORBID_ATTR,pe):$r({}),Ii=Vi(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,jt=V.ALLOW_DATA_ATTR!==!1,qt=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Rt=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Gt=V.SAFE_FOR_TEMPLATES||!1,zt=V.SAFE_FOR_XML!==!1,ye=V.WHOLE_DOCUMENT||!1,pi=V.RETURN_DOM||!1,Li=V.RETURN_DOM_FRAGMENT||!1,Ti=V.RETURN_TRUSTED_TYPE||!1,ve=V.FORCE_BODY||!1,fe=V.SANITIZE_DOM!==!1,_i=V.SANITIZE_NAMED_PROPS||!1,Ue=V.KEEP_CONTENT!==!1,Fe=V.IN_PLACE||!1,ft=z$(V.ALLOWED_URI_REGEXP)?V.ALLOWED_URI_REGEXP:x2,Zi=typeof V.NAMESPACE=="string"?V.NAMESPACE:Ci,Ui=Vi(V,"MATHML_TEXT_INTEGRATION_POINTS")&&V.MATHML_TEXT_INTEGRATION_POINTS&&typeof V.MATHML_TEXT_INTEGRATION_POINTS=="object"?$r(V.MATHML_TEXT_INTEGRATION_POINTS):Re({},["mi","mo","mn","ms","mtext"]),tt=Vi(V,"HTML_INTEGRATION_POINTS")&&V.HTML_INTEGRATION_POINTS&&typeof V.HTML_INTEGRATION_POINTS=="object"?$r(V.HTML_INTEGRATION_POINTS):Re({},["annotation-xml"]);const kt=Vi(V,"CUSTOM_ELEMENT_HANDLING")&&V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING=="object"?$r(V.CUSTOM_ELEMENT_HANDLING):Oc(null);if(Z=Oc(null),Vi(kt,"tagNameCheck")&&le(kt.tagNameCheck)&&(Z.tagNameCheck=kt.tagNameCheck),Vi(kt,"attributeNameCheck")&&le(kt.attributeNameCheck)&&(Z.attributeNameCheck=kt.attributeNameCheck),Vi(kt,"allowCustomizedBuiltInElements")&&typeof kt.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=kt.allowCustomizedBuiltInElements),Gt&&(jt=!1),Li&&(pi=!0),Ii&&(st=Re({},m2),ct=Oc(null),Ii.html===!0&&(Re(st,g2),Re(ct,y2)),Ii.svg===!0&&(Re(st,Ib),Re(ct,Pb),Re(ct,fp)),Ii.svgFilters===!0&&(Re(st,$b),Re(ct,Pb),Re(ct,fp)),Ii.mathMl===!0&&(Re(st,zb),Re(ct,b2),Re(ct,fp))),vt.tagCheck=null,vt.attributeCheck=null,Vi(V,"ADD_TAGS")&&(typeof V.ADD_TAGS=="function"?vt.tagCheck=V.ADD_TAGS:Vr(V.ADD_TAGS)&&(st===Ct&&(st=$r(st)),Re(st,V.ADD_TAGS,pe))),Vi(V,"ADD_ATTR")&&(typeof V.ADD_ATTR=="function"?vt.attributeCheck=V.ADD_ATTR:Vr(V.ADD_ATTR)&&(ct===X&&(ct=$r(ct)),Re(ct,V.ADD_ATTR,pe))),Vi(V,"ADD_URI_SAFE_ATTR")&&Vr(V.ADD_URI_SAFE_ATTR)&&Re(De,V.ADD_URI_SAFE_ATTR,pe),Vi(V,"FORBID_CONTENTS")&&Vr(V.FORBID_CONTENTS)&&(Oi===xr&&(Oi=$r(Oi)),Re(Oi,V.FORBID_CONTENTS,pe)),Vi(V,"ADD_FORBID_CONTENTS")&&Vr(V.ADD_FORBID_CONTENTS)&&(Oi===xr&&(Oi=$r(Oi)),Re(Oi,V.ADD_FORBID_CONTENTS,pe)),Ue&&(st["#text"]=!0),ye&&Re(st,["html","head","body"]),st.table&&(Re(st,["tbody"]),delete Q.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=J$(g,a)),O!==null&&typeof A=="string"&&(A=O.createHTML(""));($.uponSanitizeElement.length>0||$.uponSanitizeAttribute.length>0)&&st===Ct&&(st=$r(st)),$.uponSanitizeAttribute.length>0&&ct===X&&(ct=$r(ct)),rn&&rn(V),Wt=V},gi=Re({},[...Ib,...$b,...P$]),on=Re({},[...zb,...q$]),Gr=function(V){let kt=k(V);(!kt||!kt.tagName)&&(kt={namespaceURI:Zi,tagName:"template"});const dt=Wu(V.tagName),Lt=Wu(kt.tagName);return er[V.namespaceURI]?V.namespaceURI===hr?kt.namespaceURI===Ci?dt==="svg":kt.namespaceURI===Be?dt==="svg"&&(Lt==="annotation-xml"||Ui[Lt]):!!gi[dt]:V.namespaceURI===Be?kt.namespaceURI===Ci?dt==="math":kt.namespaceURI===hr?dt==="math"&&tt[Lt]:!!on[dt]:V.namespaceURI===Ci?kt.namespaceURI===hr&&!tt[Lt]||kt.namespaceURI===Be&&!Ui[Lt]?!1:!on[dt]&&(wt[dt]||!gi[dt]):!!(Dt==="application/xhtml+xml"&&er[V.namespaceURI]):!1},ir=function(V){Sc(e.removed,{element:V});try{k(V).removeChild(V)}catch{v(V)}},rr=function(V,kt){try{Sc(e.removed,{attribute:kt.getAttributeNode(V),from:kt})}catch{Sc(e.removed,{attribute:null,from:kt})}if(kt.removeAttribute(V),V==="is")if(pi||Li)try{ir(kt)}catch{}else try{kt.setAttribute(V,"")}catch{}},ki=function(V){let kt=null,dt=null;if(ve)V="<remove></remove>"+V;else{const ie=u2(V,/^[\r\n\t ]+/);dt=ie&&ie[0]}Dt==="application/xhtml+xml"&&Zi===Ci&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const Lt=O?O.createHTML(V):V;if(Zi===Ci)try{kt=new f().parseFromString(Lt,Dt)}catch{}if(!kt||!kt.documentElement){kt=F.createDocument(Zi,"template",null);try{kt.documentElement.innerHTML=Ae?A:Lt}catch{}}const It=kt.body||kt.documentElement;return V&&dt&&It.insertBefore(r.createTextNode(dt),It.childNodes[0]||null),Zi===Ci?U.call(kt,ye?"html":"body")[0]:ye?kt.documentElement:It},Hi=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;wc([H,j,q],It=>{Lt=Tc(Lt,It," ")}),dt.data=Lt,dt=kt.nextNode()}},In=function(V){const kt=B?B(V):null;return typeof kt!="string"||pe(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!==C(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(Kt,V,kt){wc(Kt,dt=>{dt.call(e,V,kt,Wt)})}const $n=function(V){let kt=null;if(Sr($.beforeSanitizeElements,V,null),In(V))return ir(V),!0;const dt=pe(V.nodeName);if(Sr($.uponSanitizeElement,V,{tagName:dt,allowedTags:st}),zt&&V.hasChildNodes()&&!Sn(V.firstElementChild)&&Br(/<[/\w!]/g,V.innerHTML)&&Br(/<[/\w!]/g,V.textContent)||zt&&V.namespaceURI===Ci&&dt==="style"&&Sn(V.firstElementChild)||V.nodeType===La.progressingInstruction||zt&&V.nodeType===La.comment&&Br(/<[/\w]/g,V.data))return ir(V),!0;if(Q[dt]||!(vt.tagCheck instanceof Function&&vt.tagCheck(dt))&&!st[dt]){if(!Q[dt]&&Yr(dt)&&(Z.tagNameCheck instanceof RegExp&&Br(Z.tagNameCheck,dt)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(dt)))return!1;if(Ue&&!Oi[dt]){const It=k(V),ie=C(V);if(ie&&It){const ze=ie.length;for(let li=ze-1;li>=0;--li){const Ve=y(ie[li],!0);It.insertBefore(Ve,_(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):(Gt&&V.nodeType===La.text&&(kt=V.textContent,wc([H,j,q],It=>{kt=Tc(kt,It," ")}),V.textContent!==kt&&(Sc(e.removed,{element:V.cloneNode()}),V.textContent=kt)),Sr($.afterSanitizeElements,V,null),!1)},Ea=function(V,kt,dt){if(ot[kt]||fe&&(kt==="id"||kt==="name")&&(dt in r||dt in Pt))return!1;const Lt=ct[kt]||vt.attributeCheck instanceof Function&&vt.attributeCheck(kt,V);if(!(jt&&!ot[kt]&&Br(G,kt))){if(!(At&&Br(et,kt))){if(!Lt||ot[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(!De[kt]){if(!Br(ft,Tc(dt,W,""))){if(!((kt==="src"||kt==="xlink:href"||kt==="href")&&V!=="script"&&d2(dt,"data:")===0&&Cn[V])){if(!(qt&&!Br(at,Tc(dt,W,"")))){if(dt)return!1}}}}}}return!0},ur=Re({},["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[Wu(V)]&&Br(rt,V)},ln=function(V){Sr($.beforeSanitizeAttributes,V,null);const kt=V.attributes;if(!kt||In(V))return;const dt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ct,forceKeepAttr:void 0};let Lt=kt.length;for(;Lt--;){const It=kt[Lt],ie=It.name,ze=It.namespaceURI,li=It.value,Ve=pe(ie),zi=li;let Ce=ie==="value"?zi:R$(zi);if(dt.attrName=Ve,dt.attrValue=Ce,dt.keepAttr=!0,dt.forceKeepAttr=void 0,Sr($.uponSanitizeAttribute,V,dt),Ce=dt.attrValue,_i&&(Ve==="id"||Ve==="name")&&d2(Ce,$e)!==0&&(rr(ie,V),Ce=$e+Ce),zt&&Br(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ce)){rr(ie,V);continue}if(Ve==="attributename"&&u2(Ce,"href")){rr(ie,V);continue}if(dt.forceKeepAttr)continue;if(!dt.keepAttr){rr(ie,V);continue}if(!Rt&&Br(/\/>/i,Ce)){rr(ie,V);continue}Gt&&wc([H,j,q],zn=>{Ce=Tc(Ce,zn," ")});const Wi=pe(V.nodeName);if(!Ea(Wi,Ve,Ce)){rr(ie,V);continue}if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ze)switch(g.getAttributeType(Wi,Ve)){case"TrustedHTML":{Ce=O.createHTML(Ce);break}case"TrustedScriptURL":{Ce=O.createScriptURL(Ce);break}}if(Ce!==zi)try{ze?V.setAttributeNS(ze,ie,Ce):V.setAttribute(ie,Ce),In(V)?ir(V):h2(e.removed)}catch{rr(ie,V)}}Sr($.afterSanitizeAttributes,V,null)},dr=function(V){let kt=null;const dt=Hi(V);for(Sr($.beforeSanitizeShadowDOM,V,null);kt=dt.nextNode();)if(Sr($.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)&&(oi(It),dr(It))}Sr($.afterSanitizeShadowDOM,V,null)},oi=function(V){const kt=N?N(V):V.nodeType;if(kt===La.element){const It=T?T(V):V.shadowRoot;wn(It)&&(oi(It),dr(It))}const dt=C?C(V):V.childNodes;if(!dt)return;const Lt=[];wc(dt,It=>{Sc(Lt,It)});for(const It of Lt)oi(It);if(kt===La.element){const It=B?B(V):null;if(typeof It=="string"&&pe(It)==="template"){const ie=V.content;wn(ie)&&oi(ie)}}};return e.sanitize=function(Kt){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=null,dt=null,Lt=null,It=null;if(Ae=!Kt,Ae&&(Kt="<!-->"),typeof Kt!="string"&&!Sn(Kt)&&(Kt=$$(Kt),typeof Kt!="string"))throw Cu("dirty is not a string, aborting");if(!e.isSupported)return Kt;if(Ne||si(V),e.removed=[],typeof Kt=="string"&&(Fe=!1),Fe){const li=B?B(Kt):Kt.nodeName;if(typeof li=="string"){const Ve=pe(li);if(!st[Ve]||Q[Ve])throw Cu("root node is forbidden and cannot be sanitized in-place")}if(In(Kt))throw Cu("root node is clobbered and cannot be sanitized in-place");oi(Kt)}else if(Sn(Kt))kt=ki("<!---->"),dt=kt.ownerDocument.importNode(Kt,!0),dt.nodeType===La.element&&dt.nodeName==="BODY"||dt.nodeName==="HTML"?kt=dt:kt.appendChild(dt),oi(dt);else{if(!pi&&!Gt&&!ye&&Kt.indexOf("<")===-1)return O&&Ti?O.createHTML(Kt):Kt;if(kt=ki(Kt),!kt)return pi?null:Ti?A:""}kt&&ve&&ir(kt.firstChild);const ie=Hi(Fe?Kt:kt);for(;Lt=ie.nextNode();)$n(Lt),ln(Lt),wn(Lt.content)&&dr(Lt.content);if(Fe)return Gt&&kn(Kt),Kt;if(pi){if(Gt&&kn(kt),Li)for(It=z.call(kt.ownerDocument);kt.firstChild;)It.appendChild(kt.firstChild);else It=kt;return(ct.shadowroot||ct.shadowrootmode)&&(It=K.call(n,It,!0)),It}let ze=ye?kt.outerHTML:kt.innerHTML;return ye&&st["!doctype"]&&kt.ownerDocument&&kt.ownerDocument.doctype&&kt.ownerDocument.doctype.name&&Br(X$,kt.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+kt.ownerDocument.doctype.name+`>
|
|
107
|
+
`+ze),Gt&&wc([H,j,q],li=>{ze=Tc(ze,li," ")}),O&&Ti?O.createHTML(ze):ze},e.setConfig=function(){let Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};si(Kt),Ne=!0},e.clearConfig=function(){Wt=null,Ne=!1},e.isValidAttribute=function(Kt,V,kt){Wt||si({});const dt=pe(Kt),Lt=pe(V);return Ea(dt,Lt,kt)},e.addHook=function(Kt,V){typeof V=="function"&&Sc($[Kt],V)},e.removeHook=function(Kt,V){if(V!==void 0){const kt=L$($[Kt],V);return kt===-1?void 0:O$($[Kt],kt,1)[0]}return h2($[Kt])},e.removeHooks=function(Kt){$[Kt]=[]},e.removeAllHooks=function(){$=v2()},e}var Do=SM();const TM="sleepy:config:v1",EM=TM,qx="sleepy",_2=420,t6=520,Ux={enabled:!1,hotkey:"Alt+Cmd+S"};function O1(){try{const i=localStorage.getItem(EM);if(i){const e=JSON.parse(i);return{enabled:!!e.enabled,hotkey:typeof e.hotkey=="string"&&e.hotkey.trim()?e.hotkey:Ux.hotkey}}}catch{}return{...Ux}}function NM(i){try{localStorage.setItem(EM,JSON.stringify(i))}catch{}}function e6(i){NM(i),oe.post("/launcher/sleepy-config",i).catch(()=>{})}async function i6(){try{const i=await oe.get("/launcher/sleepy-config"),e={enabled:!!i.enabled,hotkey:typeof i.hotkey=="string"&&i.hotkey.trim()?i.hotkey:Ux.hotkey};return NM(e),e}catch{return O1()}}async function r6(i){try{const{currentMonitor:e}=await Te(async()=>{const{currentMonitor:o}=await import("./window-D0tFurhp.js").then(c=>c.w);return{currentMonitor:o}},__vite__mapDeps([3,1])),r=await e(),n=(r==null?void 0:r.scaleFactor)??1,a=((r==null?void 0:r.size.width)??1440)/n;return{x:Math.max(0,Math.round((a-i)/2)),y:0}}catch{return{x:420,y:0}}}async function n6(){if(!zo())return;const{WebviewWindow:i}=await Te(async()=>{const{WebviewWindow:o}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:o}},__vite__mapDeps([2,3,1])),e=await i.getByLabel(qx);if(e){await e.close();return}const{x:r,y:n}=await r6(_2),a=new i(qx,{url:`${window.location.origin}/?capture=1`,width:_2,height:t6,x:r,y:n,decorations:!1,transparent:!0,alwaysOnTop:!0,skipTaskbar:!0,resizable:!1,shadow:!1,focus:!0,title:"dreamcontext capture"});await new Promise(o=>{a.once("tauri://created",()=>o()),a.once("tauri://error",()=>o())});try{await a.setFocus()}catch{}}async function a6(){if(!zo())return;const{WebviewWindow:i}=await Te(async()=>{const{WebviewWindow:r}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:r}},__vite__mapDeps([2,3,1])),e=await i.getByLabel(qx);e&&await e.close()}async function C2(){if(zo())try{const{getCurrentWebviewWindow:i}=await Te(async()=>{const{getCurrentWebviewWindow:e}=await import("./webviewWindow-Dlc9MvRw.js");return{getCurrentWebviewWindow:e}},__vite__mapDeps([2,3,1]));await i().close()}catch{await a6()}}async function s6(i){if(!zo())return()=>{};try{const{getCurrentWebviewWindow:e}=await Te(async()=>{const{getCurrentWebviewWindow:n}=await import("./webviewWindow-Dlc9MvRw.js");return{getCurrentWebviewWindow:n}},__vite__mapDeps([2,3,1]));return await e().onFocusChanged(({payload:n})=>i(n))}catch{return()=>{}}}async function Hx(i){if(zo())try{const{register:e,unregisterAll:r}=await Te(async()=>{const{register:n,unregisterAll:a}=await import("./index-D-gsCv2F.js");return{register:n,unregisterAll:a}},__vite__mapDeps([4,1]));if(await r(),!i.enabled||!i.hotkey.trim())return;await e(i.hotkey,n=>{n.state==="Pressed"&&n6()})}catch(e){console.warn("[sleepy] hotkey registration failed:",e)}}we.setOptions({gfm:!0,breaks:!0});function o6(i){return Do.sanitize(we.parse(i))}const k2="sleepy:lastVault",l6=120;function c6(i){return i>=10?"sleeps":i>=8?"sleepy":"idle"}function h6(){const[i,e]=Y.useState([]),[r,n]=Y.useState(""),[a,o]=Y.useState(""),[c,h]=Y.useState("idle"),[u,d]=Y.useState(""),[f,g]=Y.useState("ask"),[x,y]=Y.useState(null),[v,_]=Y.useState("idle"),C=Y.useRef(null),k=Y.useRef(null),T=Y.useRef(!1),E=Y.useRef(!1);function N(F){F&&(F.style.height="auto",F.style.height=`${Math.min(F.scrollHeight,l6)}px`)}Y.useEffect(()=>{const F=document.documentElement,D=F.style.background,z=document.body.style.background;return F.style.background="transparent",document.body.style.background="transparent",()=>{F.style.background=D,document.body.style.background=z}},[]),Y.useEffect(()=>{oe.get("/vaults").then(F=>{var $;const D=F.vaults.filter(H=>H.exists!==!1),z=D.length>0?D:F.vaults;e(z);const U=localStorage.getItem(k2),K=U&&z.some(H=>H.name===U)?U:(($=z[0])==null?void 0:$.name)??"";n(K)}).catch(()=>h("error"))},[]),Y.useEffect(()=>{if(!r)return;hM(r);let F=!1;return oe.get("/sleep").then(D=>{F||_(c6(typeof D.debt=="number"?D.debt:0))}).catch(()=>{F||_("idle")}),()=>{F=!0}},[r]),Y.useEffect(()=>{var D;(D=C.current)==null||D.focus();const F=z=>{z.key==="Escape"&&(z.preventDefault(),C2())};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[]),Y.useEffect(()=>{let F=!1,D=!1,z=()=>{};return s6(U=>{if(U){F=!0;return}F&&!T.current&&!E.current&&C2()}).then(U=>{D?U():z=U}),()=>{D=!0,z()}},[]),Y.useEffect(()=>()=>{k.current&&window.clearTimeout(k.current)},[]);function B(F,D){k.current&&window.clearTimeout(k.current);let z=0;const U=D==="sleep"?750:150;let K=0;const $=async()=>{z+=1;try{const H=await oe.get(`/launcher/capture/status?id=${encodeURIComponent(F)}`);K=H.state==="unknown"?K+1:0,y({state:H.state,output:H.output,mode:D}),(H.state==="running"||H.state==="unknown")&&z<U&&K<3&&(k.current=window.setTimeout(()=>void $(),1200))}catch{y({state:"error",output:"Lost contact with the run.",mode:D})}};k.current=window.setTimeout(()=>void $(),600)}async function O(){var z;const F=a.trim(),D=f;if(!(D!=="sleep"&&!F||!r||c==="saving")){h("saving"),d(""),y(null);try{const U=await oe.post("/launcher/capture",{vault:r,text:F,mode:D});localStorage.setItem(k2,r),o(""),h(D==="learn"?"saved":"idle"),C.current&&(C.current.style.height="auto"),(z=C.current)==null||z.focus(),U.captureId&&(y({state:"running",output:"",mode:D}),B(U.captureId,D)),window.setTimeout(()=>h("idle"),1400)}catch(U){d(U instanceof Error?U.message:"Capture failed"),h("error"),window.setTimeout(()=>h("idle"),5e3)}}}const A=(x==null?void 0:x.mode)==="sleep"&&(x.state==="running"||x.state==="unknown");E.current=A;const M=A?"sleeps":v;return m.jsxs("div",{className:"cap-root",children:[m.jsx("div",{className:"cap-notch","data-tauri-drag-region":!0,children:m.jsx("img",{className:"cap-char",src:`/api/sleepy/anim?mode=${M}`,alt:"",draggable:!1},M)}),m.jsxs("div",{className:`cap-bar cap-${c}`,children:[m.jsxs("div",{className:"cap-bar-head",children:[m.jsxs("div",{className:"cap-vault-wrap",children:[m.jsxs("select",{className:"cap-vault",value:r,onFocus:()=>{T.current=!0},onBlur:()=>{T.current=!1},onChange:F=>n(F.target.value),"aria-label":"Project",children:[i.length===0&&m.jsx("option",{value:"",children:"No projects"}),i.map(F=>m.jsx("option",{value:F.name,children:F.name},F.name))]}),m.jsx("span",{className:"cap-chev","aria-hidden":!0,children:"⌄"})]}),m.jsx("span",{className:`cap-status cap-status-${c}`,"aria-hidden":!0,children:c==="saving"?"saving…":c==="saved"?"captured ✓":c==="error"?"failed":""}),m.jsx("div",{className:"cap-mode-toggle",role:"radiogroup","aria-label":"Mode",children:["ask","learn","sleep"].map(F=>m.jsx("button",{type:"button",className:`cap-mode-opt ${f===F?"is-active":""}`,role:"radio","aria-checked":f===F,disabled:A,onClick:()=>g(F),children:F==="learn"?"Learn":F==="ask"?"Ask":"Sleep"},F))})]}),f==="sleep"?m.jsx("button",{type:"button",className:"cap-sleep-btn",disabled:A||!r,onClick:()=>void O(),children:A?"Sleeping…":`💤 Sleep — consolidate ${r||"project"}`}):m.jsx("textarea",{ref:C,className:"cap-input",placeholder:f==="ask"?"Ask one question about this project…":"Capture a thought or command…",rows:1,value:a,onChange:F=>{o(F.target.value),N(F.target)},onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),O())}}),c==="error"&&u&&m.jsx("div",{className:"cap-error-msg",children:u}),x&&m.jsxs("div",{className:`cap-enrich cap-enrich-${x.state}`,children:[m.jsx("div",{className:"cap-enrich-head",children:x.state==="running"||x.state==="unknown"?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"cap-spinner","aria-hidden":!0}),m.jsx("span",{children:x.mode==="ask"?"Sleepy is thinking…":x.mode==="sleep"?"Sleepy is sleeping — consolidating memory…":"Sleepy is learning…"})]}):x.state==="done"?m.jsx("span",{className:"cap-enrich-done",children:x.mode==="ask"?"✓ Answer":x.mode==="sleep"?"✓ Slept":"✓ Learned"}):m.jsx("span",{className:"cap-enrich-err",children:x.mode==="ask"?"Couldn't answer":x.mode==="sleep"?"Sleep failed":"Enrichment failed"})}),x.output&&(x.state==="error"?m.jsx("div",{className:"cap-enrich-body",children:x.output}):m.jsx("div",{className:"cap-enrich-body cap-md",dangerouslySetInnerHTML:{__html:o6(x.output)}}))]})]})]})}const AM=Y.createContext(null);function MM(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function w2(i){return i==="system"?MM():i}function S2({children:i}){const[e,r]=Y.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=Y.useState(()=>w2(e)),o=c=>{r(c),localStorage.setItem("dreamcontext-theme",c)};return Y.useEffect(()=>{const c=w2(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),Y.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=MM();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),m.jsx(AM.Provider,{value:{theme:e,resolved:n,setTheme:o},children:i})}function Id(){const i=Y.useContext(AM);if(!i)throw new Error("useTheme must be used within ThemeProvider");return i}const u6={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"}},BM=Y.createContext(null);function d6({children:i}){const[e,r]=Y.useState("en"),n=a=>{var o;return((o=u6[e])==null?void 0:o[a])??a};return m.jsx(BM.Provider,{value:{locale:e,setLocale:r,t:n},children:i})}function Bi(){const i=Y.useContext(BM);if(!i)throw new Error("useI18n must be used within I18nProvider");return i}const LM=Y.createContext({projectId:"",contextRoot:""});function f6(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 p6({children:i}){const[e,r]=Y.useState({kind:"loading"});return Y.useEffect(()=>{oe.get("/health").then(n=>{r({kind:"ready",value:{contextRoot:n.contextRoot,projectId:f6(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(LM.Provider,{value:e.value,children:i})}function OM(){return Y.useContext(LM)}function RM(i){return i<=3?"Alert":i<=6?"Drowsy":i<=9?"Sleepy":"Must Sleep"}function DM(i){return i<=3?"alert":i<=6?"drowsy":i<=9?"sleepy":"must_sleep"}function jM(){return di({queryKey:["sleep"],queryFn:()=>oe.get("/sleep")})}function g6(){return di({queryKey:["version-check"],queryFn:()=>oe.get("/version-check")})}var zp={exports:{}},m6=zp.exports,T2;function y6(){return T2||(T2=1,(function(i,e){(function(r,n){i.exports=n()})(m6,(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",_="Invalid Date",C=/^(\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($){var H=["th","st","nd","rd"],j=$%100;return"["+$+(H[(j-20)%10]||H[j]||H[0])+"]"}},E=function($,H,j){var q=String($);return!q||q.length>=H?$:""+Array(H+1-q.length).join(j)+$},N={s:E,z:function($){var H=-$.utcOffset(),j=Math.abs(H),q=Math.floor(j/60),G=j%60;return(H<=0?"+":"-")+E(q,2,"0")+":"+E(G,2,"0")},m:function $(H,j){if(H.date()<j.date())return-$(j,H);var q=12*(j.year()-H.year())+(j.month()-H.month()),G=H.clone().add(q,g),et=j-G<0,at=H.clone().add(q+(et?-1:1),g);return+(-(q+(j-G)/(et?G-at:at-G))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:g,y,w:f,d,D:v,h:u,m:h,s:c,ms:o,Q:x}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},B="en",O={};O[B]=T;var A="$isDayjsObject",M=function($){return $ instanceof U||!(!$||!$[A])},F=function $(H,j,q){var G;if(!H)return B;if(typeof H=="string"){var et=H.toLowerCase();O[et]&&(G=et),j&&(O[et]=j,G=et);var at=H.split("-");if(!G&&at.length>1)return $(at[0])}else{var W=H.name;O[W]=H,G=W}return!q&&G&&(B=G),G||!q&&B},D=function($,H){if(M($))return $.clone();var j=typeof H=="object"?H:{};return j.date=$,j.args=arguments,new U(j)},z=N;z.l=F,z.i=M,z.w=function($,H){return D($,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var U=(function(){function $(j){this.$L=F(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[A]=!0}var H=$.prototype;return H.parse=function(j){this.$d=(function(q){var G=q.date,et=q.utc;if(G===null)return new Date(NaN);if(z.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var at=G.match(C);if(at){var W=at[2]-1||0,rt=(at[7]||"0").substring(0,3);return et?new Date(Date.UTC(at[1],W,at[3]||1,at[4]||0,at[5]||0,at[6]||0,rt)):new Date(at[1],W,at[3]||1,at[4]||0,at[5]||0,at[6]||0,rt)}}return new Date(G)})(j),this.init()},H.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()},H.$utils=function(){return z},H.isValid=function(){return this.$d.toString()!==_},H.isSame=function(j,q){var G=D(j);return this.startOf(q)<=G&&G<=this.endOf(q)},H.isAfter=function(j,q){return D(j)<this.startOf(q)},H.isBefore=function(j,q){return this.endOf(q)<D(j)},H.$g=function(j,q,G){return z.u(j)?this[q]:this.set(G,j)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(j,q){var G=this,et=!!z.u(q)||q,at=z.p(j),W=function(Q,ot){var vt=z.w(G.$u?Date.UTC(G.$y,ot,Q):new Date(G.$y,ot,Q),G);return et?vt:vt.endOf(d)},rt=function(Q,ot){return z.w(G.toDate()[Q].apply(G.toDate("s"),(et?[0,0,0,0]:[23,59,59,999]).slice(ot)),G)},ft=this.$W,st=this.$M,Ct=this.$D,ct="set"+(this.$u?"UTC":"");switch(at){case y:return et?W(1,0):W(31,11);case g:return et?W(1,st):W(0,st+1);case f:var X=this.$locale().weekStart||0,Z=(ft<X?ft+7:ft)-X;return W(et?Ct-Z:Ct+(6-Z),st);case d:case v:return rt(ct+"Hours",0);case u:return rt(ct+"Minutes",1);case h:return rt(ct+"Seconds",2);case c:return rt(ct+"Milliseconds",3);default:return this.clone()}},H.endOf=function(j){return this.startOf(j,!1)},H.$set=function(j,q){var G,et=z.p(j),at="set"+(this.$u?"UTC":""),W=(G={},G[d]=at+"Date",G[v]=at+"Date",G[g]=at+"Month",G[y]=at+"FullYear",G[u]=at+"Hours",G[h]=at+"Minutes",G[c]=at+"Seconds",G[o]=at+"Milliseconds",G)[et],rt=et===d?this.$D+(q-this.$W):q;if(et===g||et===y){var ft=this.clone().set(v,1);ft.$d[W](rt),ft.init(),this.$d=ft.set(v,Math.min(this.$D,ft.daysInMonth())).$d}else W&&this.$d[W](rt);return this.init(),this},H.set=function(j,q){return this.clone().$set(j,q)},H.get=function(j){return this[z.p(j)]()},H.add=function(j,q){var G,et=this;j=Number(j);var at=z.p(q),W=function(st){var Ct=D(et);return z.w(Ct.date(Ct.date()+Math.round(st*j)),et)};if(at===g)return this.set(g,this.$M+j);if(at===y)return this.set(y,this.$y+j);if(at===d)return W(1);if(at===f)return W(7);var rt=(G={},G[h]=n,G[u]=a,G[c]=r,G)[at]||1,ft=this.$d.getTime()+j*rt;return z.w(ft,this)},H.subtract=function(j,q){return this.add(-1*j,q)},H.format=function(j){var q=this,G=this.$locale();if(!this.isValid())return G.invalidDate||_;var et=j||"YYYY-MM-DDTHH:mm:ssZ",at=z.z(this),W=this.$H,rt=this.$m,ft=this.$M,st=G.weekdays,Ct=G.months,ct=G.meridiem,X=function(ot,vt,At,jt){return ot&&(ot[vt]||ot(q,et))||At[vt].slice(0,jt)},Z=function(ot){return z.s(W%12||12,ot,"0")},Q=ct||function(ot,vt,At){var jt=ot<12?"AM":"PM";return At?jt.toLowerCase():jt};return et.replace(k,(function(ot,vt){return vt||(function(At){switch(At){case"YY":return String(q.$y).slice(-2);case"YYYY":return z.s(q.$y,4,"0");case"M":return ft+1;case"MM":return z.s(ft+1,2,"0");case"MMM":return X(G.monthsShort,ft,Ct,3);case"MMMM":return X(Ct,ft);case"D":return q.$D;case"DD":return z.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return X(G.weekdaysMin,q.$W,st,2);case"ddd":return X(G.weekdaysShort,q.$W,st,3);case"dddd":return st[q.$W];case"H":return String(W);case"HH":return z.s(W,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return Q(W,rt,!0);case"A":return Q(W,rt,!1);case"m":return String(rt);case"mm":return z.s(rt,2,"0");case"s":return String(q.$s);case"ss":return z.s(q.$s,2,"0");case"SSS":return z.s(q.$ms,3,"0");case"Z":return at}return null})(ot)||at.replace(":","")}))},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(j,q,G){var et,at=this,W=z.p(q),rt=D(j),ft=(rt.utcOffset()-this.utcOffset())*n,st=this-rt,Ct=function(){return z.m(at,rt)};switch(W){case y:et=Ct()/12;break;case g:et=Ct();break;case x:et=Ct()/3;break;case f:et=(st-ft)/6048e5;break;case d:et=(st-ft)/864e5;break;case u:et=st/a;break;case h:et=st/n;break;case c:et=st/r;break;default:et=st}return G?et:z.a(et)},H.daysInMonth=function(){return this.endOf(g).$D},H.$locale=function(){return O[this.$L]},H.locale=function(j,q){if(!j)return this.$L;var G=this.clone(),et=F(j,q,!0);return et&&(G.$L=et),G},H.clone=function(){return z.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},$})(),K=U.prototype;return D.prototype=K,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",g],["$y",y],["$D",v]].forEach((function($){K[$[1]]=function(H){return this.$g(H,$[0],$[1])}})),D.extend=function($,H){return $.$i||($(H,U,D),$.$i=!0),D},D.locale=F,D.isDayjs=M,D.unix=function($){return D(1e3*$)},D.en=O[B],D.Ls=O,D.p={},D}))})(zp)),zp.exports}var b6=y6();const x6=jd(b6);var FM=Object.defineProperty,L=(i,e)=>FM(i,"name",{value:e,configurable:!0}),v6=(i,e)=>{for(var r in e)FM(i,r,{get:e[r],enumerable:!0})},ms={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Nt={trace:L((...i)=>{},"trace"),debug:L((...i)=>{},"debug"),info:L((...i)=>{},"info"),warn:L((...i)=>{},"warn"),error:L((...i)=>{},"error"),fatal:L((...i)=>{},"fatal")},R1=L(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=L(i=>`%c${x6().format("ss.SSS")} : ${i} : `,"format");const Pp={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 Pp.hue2rgb(o,a,i+1/3)*255;case"g":return Pp.hue2rgb(o,a,i)*255;case"b":return Pp.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}}},_6={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},C6={dec2hex:i=>{const e=Math.round(i).toString(16);return e.length>1?e:`0${e}`}},ke={channel:Pp,lang:_6,unit:C6},yo={};for(let i=0;i<=255;i++)yo[i]=ke.unit.dec2hex(i);const zr={ALL:0,RGB:1,HSL:2};class k6{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 w6{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new k6}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=ke.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=ke.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=ke.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:a}=e;r===void 0&&(e.r=ke.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=ke.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=ke.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(),ke.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(),ke.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(),ke.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(),ke.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(),ke.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(),ke.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 Qg=new w6({r:0,g:0,b:0,a:0},"transparent"),$c={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const e=i.match($c.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 Qg.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)]}`}},ml={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(ml.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return ke.channel.clamp.h(parseFloat(r)*.9);case"rad":return ke.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ke.channel.clamp.h(parseFloat(r)*360)}}return ke.channel.clamp.h(parseFloat(i))},parse:i=>{const e=i.charCodeAt(0);if(e!==104&&e!==72)return;const r=i.match(ml.re);if(!r)return;const[,n,a,o,c,h]=r;return Qg.set({h:ml._hue2deg(n),s:ke.channel.clamp.s(parseFloat(a)),l:ke.channel.clamp.l(parseFloat(o)),a:c?ke.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(${ke.lang.round(e)}, ${ke.lang.round(r)}%, ${ke.lang.round(n)}%, ${a})`:`hsl(${ke.lang.round(e)}, ${ke.lang.round(r)}%, ${ke.lang.round(n)}%)`}},rd={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=rd.colors[i];if(e)return $c.parse(e)},stringify:i=>{const e=$c.stringify(i);for(const r in rd.colors)if(rd.colors[r]===e)return r}},Gu={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(Gu.re);if(!r)return;const[,n,a,o,c,h,u,d,f]=r;return Qg.set({r:ke.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:ke.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:ke.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:d?ke.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(${ke.lang.round(e)}, ${ke.lang.round(r)}, ${ke.lang.round(n)}, ${ke.lang.round(a)})`:`rgb(${ke.lang.round(e)}, ${ke.lang.round(r)}, ${ke.lang.round(n)})`}},Ga={format:{keyword:rd,hex:$c,rgb:Gu,rgba:Gu,hsl:ml,hsla:ml},parse:i=>{if(typeof i!="string")return i;const e=$c.parse(i)||Gu.parse(i)||ml.parse(i)||rd.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?ml.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?Gu.stringify(i):$c.stringify(i)},IM=(i,e)=>{const r=Ga.parse(i);for(const n in e)r[n]=ke.channel.clamp[n](e[n]);return Ga.stringify(r)},Lo=(i,e,r=0,n=1)=>{if(typeof i!="number")return IM(i,{a:e});const a=Qg.set({r:ke.channel.clamp.r(i),g:ke.channel.clamp.g(e),b:ke.channel.clamp.b(r),a:ke.channel.clamp.a(n)});return Ga.stringify(a)},S6=i=>{const{r:e,g:r,b:n}=Ga.parse(i),a=.2126*ke.channel.toLinear(e)+.7152*ke.channel.toLinear(r)+.0722*ke.channel.toLinear(n);return ke.lang.round(a)},T6=i=>S6(i)>=.5,wa=i=>!T6(i),$M=(i,e,r)=>{const n=Ga.parse(i),a=n[e],o=ke.channel.clamp[e](a+r);return a!==o&&(n[e]=o),Ga.stringify(n)},_t=(i,e)=>$M(i,"l",e),bt=(i,e)=>$M(i,"l",-e),I=(i,e)=>{const r=Ga.parse(i),n={};for(const a in e)e[a]&&(n[a]=r[a]+e[a]);return IM(i,n)},E6=(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,_=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,C=1-_,k=n*_+h*C,T=a*_+u*C,E=o*_+d*C,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,E6(r,i,e)};var zM=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,nd=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,N6=/\s*%%.*\n/gm,eh,PM=(eh=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},L(eh,"UnknownDiagramError"),eh),Dl={},D1=L(function(i,e){i=i.replace(zM,"").replace(nd,"").replace(N6,`
|
|
108
|
+
`);for(const[r,{detector:n}]of Object.entries(Dl))if(n(i,e))return r;throw new PM(`No diagram type detected matching given configuration for text: ${i}`)},"detectType"),Wx=L((...i)=>{for(const{id:e,detector:r,loader:n}of i)qM(e,r,n)},"registerLazyLoadedDiagrams"),qM=L((i,e,r)=>{Dl[i]&&Nt.warn(`Detector with key ${i} already exists. Overwriting.`),Dl[i]={detector:e,loader:r},Nt.debug(`Detector with key ${i} added${r?" with loader":""}`)},"addDetector"),A6=L(i=>Dl[i].loader,"getDiagramLoader"),Gx=L((i,e,{depth:r=2,clobber:n=!1}={})=>{const a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(i)?(e.forEach(o=>Gx(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]=Gx(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=Gx,Xa="#ffffff",Za="#f2f2f2",xe=L((i,e)=>e?I(i,{s:-40,l:10}):I(i,{s:-40,l:-10}),"mkBorder"),ih,M6=(ih=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,B,O,A;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||xe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||xe(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?bt(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||bt(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||bt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||bt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.darkMode)for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=bt(this["cScale"+M],75);else for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=bt(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]||bt(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]||I(this.mainBkg,{h:180,s:-15,l:e*(5+M*3)}),this["surfacePeer"+M]=this["surfacePeer"+M]||I(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||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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??I(this.primaryColor,{l:-30}),this.venn2=this.venn2??I(this.secondaryColor,{l:-30}),this.venn3=this.venn3??I(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??I(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??I(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??I(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??I(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.xyChart)==null?void 0:_.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.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:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?bt(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||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(ih,"Theme"),ih),B6=L(i=>{const e=new M6;return e.calculate(i),e},"getThemeVariables"),rh,L6=(rh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(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=bt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=bt(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||bt(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,B,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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(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]||I(this.mainBkg,{h:30,s:-30,l:-(-10+A*4)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((C=this.radar)==null?void 0:C.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:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?bt(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||I(this.primaryColor,{h:-30}),20),this.git4=_t(this.pie5||I(this.primaryColor,{h:-60}),20),this.git5=_t(this.pie6||I(this.primaryColor,{h:-90}),10),this.git6=_t(this.pie7||I(this.primaryColor,{h:60}),10),this.git7=_t(this.pie8||I(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]})}},L(rh,"Theme"),rh),O6=L(i=>{const e=new L6;return e.calculate(i),e},"getThemeVariables"),nh,R6=(nh=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=I(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(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=xe(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,B,O;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||bt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||bt(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=bt(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||bt(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||I(this["cScale"+A],{h:180});for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||I(this.mainBkg,{h:30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||I(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-30}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||I(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||I(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??I(this.primaryColor,{l:-30}),this.venn2=this.venn2??I(this.secondaryColor,{l:-30}),this.venn3=this.venn3??I(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??I(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??I(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??I(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??I(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.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:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(this.git7,25)),this.gitInv0=this.gitInv0||bt(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]})}},L(nh,"Theme"),nh),D6=L(i=>{const e=new R6;return e.calculate(i),e},"getThemeVariables"),ah,j6=(ah=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=xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(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,B,O;this.actorBorder=bt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||bt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||bt(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=bt(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||bt(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||I(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]||I(this.mainBkg,{h:30,s:-30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(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||I(this.primaryColor,{l:-30}),this.pie5=this.pie5||I(this.secondaryColor,{l:-30}),this.pie6=this.pie6||I(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||I(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??I(this.primaryColor,{l:-30}),this.venn2=this.venn2??I(this.secondaryColor,{l:-30}),this.venn3=this.venn3??I(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??I(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??I(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??I(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??I(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.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:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(ah,"Theme"),ah),F6=L(i=>{const e=new j6;return e.calculate(i),e},"getThemeVariables"),sh,I6=(sh=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=_t(this.contrast,55),this.background="#ffffff",this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(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,B,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]||bt(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]||I(this.mainBkg,{l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(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=bt(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=bt(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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((C=this.radar)==null?void 0:C.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:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=bt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||I(this.primaryColor,{h:-30}),this.git4=this.pie5||I(this.primaryColor,{h:-60}),this.git5=this.pie6||I(this.primaryColor,{h:-90}),this.git6=this.pie7||I(this.primaryColor,{h:60}),this.git7=this.pie8||I(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]})}},L(sh,"Theme"),sh),$6=L(i=>{const e=new I6;return e.calculate(i),e},"getThemeVariables"),oh,z6=(oh=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=xe(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,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||xe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||xe(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?bt(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||bt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=I(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||I(e,{h:30}),this.cScale4=this.cScale4||I(e,{h:60}),this.cScale5=this.cScale5||I(e,{h:90}),this.cScale6=this.cScale6||I(e,{h:120}),this.cScale7=this.cScale7||I(e,{h:150}),this.cScale8=this.cScale8||I(e,{h:210,l:150}),this.cScale9=this.cScale9||I(e,{h:270}),this.cScale10=this.cScale10||I(e,{h:300}),this.cScale11=this.cScale11||I(e,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=bt(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=bt(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||ht(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||_t(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||bt(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||I(e,{h:64}),this.fillType3=this.fillType3||I(r,{h:64}),this.fillType4=this.fillType4||I(e,{h:-64}),this.fillType5=this.fillType5||I(r,{h:-64}),this.fillType6=this.fillType6||I(e,{h:128}),this.fillType7=this.fillType7||I(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||I(e,{l:-10}),this.pie5=this.pie5||I(r,{l:-10}),this.pie6=this.pie6||I(n,{l:-10}),this.pie7=this.pie7||I(e,{h:60,l:-10}),this.pie8=this.pie8||I(e,{h:-60,l:-10}),this.pie9=this.pie9||I(e,{h:120,l:0}),this.pie10=this.pie10||I(e,{h:60,l:-20}),this.pie11=this.pie11||I(e,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.xyChart)==null?void 0:_.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?bt(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||I(e,{h:-30}),this.git4=this.git4||I(e,{h:-60}),this.git5=this.git5||I(e,{h:-90}),this.git6=this.git6||I(e,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(oh,"Theme"),oh),P6=L(i=>{const e=new z6;return e.calculate(i),e},"getThemeVariables"),lh,q6=(lh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(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||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||xe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||xe(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?bt(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||bt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=bt(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=bt(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]||bt(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]||I(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||I(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||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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?bt(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(lh,"Theme"),lh),U6=L(i=>{const e=new q6;return e.calculate(i),e},"getThemeVariables"),ch,H6=(ch=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=xe("#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,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||xe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||xe(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?bt(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||bt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=I(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=bt(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=bt(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||ht(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||_t(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||bt(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||I(e,{h:64}),this.fillType3=this.fillType3||I(r,{h:64}),this.fillType4=this.fillType4||I(e,{h:-64}),this.fillType5=this.fillType5||I(r,{h:-64}),this.fillType6=this.fillType6||I(e,{h:128}),this.fillType7=this.fillType7||I(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||I(e,{l:-10}),this.pie5=this.pie5||I(r,{l:-10}),this.pie6=this.pie6||I(n,{l:-10}),this.pie7=this.pie7||I(e,{h:60,l:-10}),this.pie8=this.pie8||I(e,{h:-60,l:-10}),this.pie9=this.pie9||I(e,{h:120,l:0}),this.pie10=this.pie10||I(e,{h:60,l:-20}),this.pie11=this.pie11||I(e,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.xyChart)==null?void 0:_.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?bt(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||I(e,{h:-30}),this.git4=this.git4||I(e,{h:-60}),this.git5=this.git5||I(e,{h:-90}),this.git6=this.git6||I(e,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(ch,"Theme"),ch),W6=L(i=>{const e=new H6;return e.calculate(i),e},"getThemeVariables"),hh,G6=(hh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(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||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||xe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||xe(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?bt(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||bt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=bt(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=bt(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]||bt(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]||I(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||I(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||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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?bt(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||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(hh,"Theme"),hh),Y6=L(i=>{const e=new G6;return e.calculate(i),e},"getThemeVariables"),uh,K6=(uh=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=xe(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,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||xe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||xe(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?bt(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||bt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ht(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=I(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||ht(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||_t(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||bt(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||I(e,{h:64}),this.fillType3=this.fillType3||I(r,{h:64}),this.fillType4=this.fillType4||I(e,{h:-64}),this.fillType5=this.fillType5||I(r,{h:-64}),this.fillType6=this.fillType6||I(e,{h:128}),this.fillType7=this.fillType7||I(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||I(e,{l:-10}),this.pie5=this.pie5||I(r,{l:-10}),this.pie6=this.pie6||I(n,{l:-10}),this.pie7=this.pie7||I(e,{h:60,l:-10}),this.pie8=this.pie8||I(e,{h:-60,l:-10}),this.pie9=this.pie9||I(e,{h:120,l:0}),this.pie10=this.pie10||I(e,{h:60,l:-20}),this.pie11=this.pie11||I(e,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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:((_=this.xyChart)==null?void 0:_.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?bt(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||I(e,{h:-30}),this.git4=this.git4||I(e,{h:-60}),this.git5=this.git5||I(e,{h:-90}),this.git6=this.git6||I(e,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(uh,"Theme"),uh),V6=L(i=>{const e=new K6;return e.calculate(i),e},"getThemeVariables"),dh,X6=(dh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(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||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||xe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||xe(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?bt(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||bt(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]||bt(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=bt(this["cScale"+y],75);const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||I(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||I(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||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||wa(this.quadrant1Fill)?_t(this.quadrant1Fill):bt(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?bt(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||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(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=bt(this.git0,25),this.git1=bt(this.git1,25),this.git2=bt(this.git2,25),this.git3=bt(this.git3,25),this.git4=bt(this.git4,25),this.git5=bt(this.git5,25),this.git6=bt(this.git6,25),this.git7=bt(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]})}},L(dh,"Theme"),dh),Z6=L(i=>{const e=new X6;return e.calculate(i),e},"getThemeVariables"),Bs={base:{getThemeVariables:B6},dark:{getThemeVariables:O6},default:{getThemeVariables:D6},forest:{getThemeVariables:F6},neutral:{getThemeVariables:$6},neo:{getThemeVariables:P6},"neo-dark":{getThemeVariables:U6},redux:{getThemeVariables:W6},"redux-dark":{getThemeVariables:Y6},"redux-color":{getThemeVariables:V6},"redux-dark-color":{getThemeVariables:Z6}},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},UM={...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:L(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:L(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:L(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...On.gantt,tickInterval:void 0,useWidth:void 0},c4:{...On.c4,useWidth:void 0,personFont:L(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...On.flowchart,inheritDir:!1},external_personFont:L(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:L(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:L(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:L(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:L(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:L(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:L(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:L(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:L(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:L(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:L(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:L(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:L(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:L(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:L(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:L(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:L(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:L(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:L(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:L(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:L(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...On.pie,useWidth:984},xyChart:{...On.xyChart,useWidth:void 0},requirement:{...On.requirement,useWidth:void 0},packet:{...On.packet},treeView:{...On.treeView,useWidth:void 0},radar:{...On.radar},ishikawa:{...On.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...On.venn}},HM=L((i,e="")=>Object.keys(i).reduce((r,n)=>Array.isArray(i[n])?r:typeof i[n]=="object"&&i[n]!==null?[...r,e+n,...HM(i[n],"")]:[...r,e+n],[]),"keyify"),Q6=new Set(HM(UM,"")),WM=UM,sg=L(i=>{if(Nt.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(e=>sg(e));return}for(const e of Object.keys(i)){if(Nt.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Q6.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),sg(i[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(Nt.debug("sanitizing css option",e),i[e]=J6(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"),J6=L(i=>{let e=0,r=0;for(const n of i){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":i},"sanitizeCss"),gh=Object.freeze(WM),Fs=L(i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),"evaluate"),bn=mr({},gh),og,jl=[],ad=mr({},gh),Jg=L((i,e)=>{let r=mr({},i),n={};for(const a of e)KM(a),n=mr(n,a);if(r=mr(r,n),n.theme&&n.theme in Bs){const a=mr({},og),o=mr(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in Bs&&(r.themeVariables=Bs[r.theme].getThemeVariables(o))}return ad=r,XM(ad),ad},"updateCurrentConfig"),tz=L(i=>(bn=mr({},gh),bn=mr(bn,i),i.theme&&Bs[i.theme]&&(bn.themeVariables=Bs[i.theme].getThemeVariables(i.themeVariables)),Jg(bn,jl),bn),"setSiteConfig"),ez=L(i=>{og=mr({},i)},"saveConfigFromInitialize"),iz=L(i=>(bn=mr(bn,i),Jg(bn,jl),bn),"updateSiteConfig"),GM=L(()=>mr({},bn),"getSiteConfig"),YM=L(i=>(XM(i),mr(ad,i),qi()),"setConfig"),qi=L(()=>mr({},ad),"getConfig"),KM=L(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"&&KM(i[e])}))},"sanitize"),rz=L(i=>{var e;sg(i),i.fontFamily&&!((e=i.themeVariables)!=null&&e.fontFamily)&&(i.themeVariables={...i.themeVariables,fontFamily:i.fontFamily}),jl.push(i),Jg(bn,jl)},"addDirective"),lg=L((i=bn)=>{jl=[],Jg(i,jl)},"reset"),nz={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."},E2={},VM=L(i=>{E2[i]||(Nt.warn(nz[i]),E2[i]=!0)},"issueWarning"),XM=L(i=>{i&&(i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&VM("LAZY_LOAD_DEPRECATED")},"checkConfig"),Sot=L(()=>{let i={};og&&(i=mr(i,og));for(const e of jl)i=mr(i,e);return i},"getUserDefinedConfig"),nn=L(i=>{var e,r;return((e=i.flowchart)==null?void 0:e.htmlLabels)!=null&&VM("FLOWCHART_HTML_LABELS_DEPRECATED"),Fs(i.htmlLabels??((r=i.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),$d=/<br\s*\/?>/gi,az=L(i=>i?JM(i).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),sz=(()=>{let i=!1;return()=>{i||(ZM(),i=!0)}})();function ZM(){const i="data-temp-href-target";Do.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(i,e.getAttribute("target")??"")}),Do.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(i)&&(e.setAttribute("target",e.getAttribute(i)??""),e.removeAttribute(i),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}L(ZM,"setupDompurifyHooks");var QM=L(i=>(sz(),Do.sanitize(i)),"removeScript"),N2=L((i,e)=>{if(nn(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?i=QM(i):r!=="loose"&&(i=JM(i),i=i.replace(/</g,"<").replace(/>/g,">"),i=i.replace(/=/g,"="),i=hz(i))}return i},"sanitizeMore"),Ca=L((i,e)=>i&&(e.dompurifyConfig?i=Do.sanitize(N2(i,e),e.dompurifyConfig).toString():i=Do.sanitize(N2(i,e),{FORBID_TAGS:["style"]}).toString(),i),"sanitizeText"),oz=L((i,e)=>typeof i=="string"?Ca(i,e):i.flat().map(r=>Ca(r,e)),"sanitizeTextOrArray"),lz=L(i=>$d.test(i),"hasBreaks"),cz=L(i=>i.split($d),"splitBreaks"),hz=L(i=>i.replace(/#br#/g,"<br/>"),"placeholderToBreak"),JM=L(i=>i.replace($d,"#br#"),"breakToPlaceholder"),uz=L(i=>{let e="";return i&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),dz=L(function(...i){const e=i.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),fz=L(function(...i){const e=i.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),A2=L(function(i){const e=i.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let a=e[n];if(a===","&&n>0&&n+1<e.length){const o=e[n-1],c=e[n+1];pz(o,c)&&(a=o+","+c,n++,r.pop())}r.push(gz(a))}return r.join("")},"parseGenericTypes"),Yx=L((i,e)=>Math.max(0,i.split(e).length-1),"countOccurrence"),pz=L((i,e)=>{const r=Yx(i,"~"),n=Yx(e,"~");return r===1&&n===1},"shouldCombineSets"),gz=L(i=>{const e=Yx(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"),M2=L(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Kx=/\$\$(.*)\$\$/g,gd=L(i=>{var e;return(((e=i.match(Kx))==null?void 0:e.length)??0)>0},"hasKatex"),Tot=L(async(i,e)=>{const r=document.createElement("div");r.innerHTML=await tB(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"),mz=L(async(i,e)=>{if(!gd(i))return i;if(!(M2()||e.legacyMathML||e.forceLegacyMathML))return i.replace(Kx,"MathML is unsupported in this environment.");{const{default:r}=await Te(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!M2()&&e.legacyMathML?"htmlAndMathml":"mathml";return i.split($d).map(a=>gd(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Kx,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),tB=L(async(i,e)=>Ca(await mz(i,e),e),"renderKatexSanitized"),zd={getRows:az,sanitizeText:Ca,sanitizeTextOrArray:oz,hasBreaks:lz,splitBreaks:cz,lineBreakRegex:$d,removeScript:QM,getUrl:uz,evaluate:Fs,getMax:dz,getMin:fz},yz=L(function(i,e){for(let r of e)i.attr(r[0],r[1])},"d3Attrs"),bz=L(function(i,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",i),n.set("width",e)),n},"calculateSvgSizeAttrs"),eB=L(function(i,e,r,n){const a=bz(e,r,n);yz(i,a)},"configureSvgSize"),xz=L(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}`),eB(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"),qp={},vz=L((i,e,r,n)=>{let a="";return i in qp&&qp[i]?a=qp[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=L((i,e)=>{e!==void 0&&(qp[i]=e)},"addStylesForDiagram"),Cz=vz,iB={};v6(iB,{clear:()=>kz,getAccDescription:()=>Ez,getAccTitle:()=>Sz,getDiagramTitle:()=>Az,setAccDescription:()=>Tz,setAccTitle:()=>wz,setDiagramTitle:()=>Nz});var j1="",F1="",I1="",$1=L(i=>Ca(i,qi()),"sanitizeText"),kz=L(()=>{j1="",I1="",F1=""},"clear"),wz=L(i=>{j1=$1(i).replace(/^\s+/g,"")},"setAccTitle"),Sz=L(()=>j1,"getAccTitle"),Tz=L(i=>{I1=$1(i).replace(/\n\s+/g,`
|
|
227
|
+
`)},"setAccDescription"),Ez=L(()=>I1,"getAccDescription"),Nz=L(i=>{F1=$1(i)},"setDiagramTitle"),Az=L(()=>F1,"getDiagramTitle"),B2=Nt,Mz=R1,ii=qi,Eot=YM,Not=gh,z1=L(i=>Ca(i,ii()),"sanitizeText"),Bz=xz,Lz=L(()=>iB,"getCommonDb"),cg={},hg=L((i,e,r)=>{var n;cg[i]&&B2.warn(`Diagram with id ${i} already registered. Overwriting.`),cg[i]=e,r&&qM(i,r),_z(i,e.styles),(n=e.injectUtils)==null||n.call(e,B2,Mz,ii,z1,Bz,Lz(),()=>{})},"registerDiagram"),Vx=L(i=>{if(i in cg)return cg[i];throw new Oz(i)},"getDiagram"),fh,Oz=(fh=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},L(fh,"DiagramNotFoundError"),fh);class L2 extends Map{constructor(e,r=jz){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(O2(this,e))}has(e){return super.has(O2(this,e))}set(e,r){return super.set(Rz(this,e),r)}delete(e){return super.delete(Dz(this,e))}}function O2({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):r}function Rz({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):(i.set(n,r),r)}function Dz({_intern:i,_key:e},r){const n=e(r);return i.has(n)&&(r=i.get(n),i.delete(n)),r}function jz(i){return i!==null&&typeof i=="object"?i.valueOf():i}function R2(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 D2(i,e){let r;if(e===void 0)for(const n of i)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of i)(a=e(a,++n,i))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function Fz(i,e){let r=0;for(let n of i)(n=+n)&&(r+=n);return r}var Iz={value:()=>{}};function Pd(){for(var i=0,e=arguments.length,r={},n;i<e;++i){if(!(n=arguments[i]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Up(r)}function Up(i){this._=i}function $z(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}})}Up.prototype=Pd.prototype={constructor:Up,on:function(i,e){var r=this._,n=$z(i+"",r),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(i=n[o]).type)&&(a=zz(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]=j2(r[a],i.name,e);else if(e==null)for(a in r)r[a]=j2(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 Up(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 zz(i,e){for(var r=0,n=i.length,a;r<n;++r)if((a=i[r]).name===e)return a.value}function j2(i,e,r){for(var n=0,a=i.length;n<a;++n)if(i[n].name===e){i[n]=Iz,i=i.slice(0,n).concat(i.slice(n+1));break}return r!=null&&i.push({name:e,value:r}),i}var Xx="http://www.w3.org/1999/xhtml";const F2={svg:"http://www.w3.org/2000/svg",xhtml:Xx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tm(i){var e=i+="",r=e.indexOf(":");return r>=0&&(e=i.slice(0,r))!=="xmlns"&&(i=i.slice(r+1)),F2.hasOwnProperty(e)?{space:F2[e],local:i}:i}function Pz(i){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Xx&&e.documentElement.namespaceURI===Xx?e.createElement(i):e.createElementNS(r,i)}}function qz(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function rB(i){var e=tm(i);return(e.local?qz:Pz)(e)}function Uz(){}function P1(i){return i==null?Uz:function(){return this.querySelector(i)}}function Hz(i){typeof i!="function"&&(i=P1(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 Wz(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function Gz(){return[]}function nB(i){return i==null?Gz:function(){return this.querySelectorAll(i)}}function Yz(i){return function(){return Wz(i.apply(this,arguments))}}function Kz(i){typeof i=="function"?i=Yz(i):i=nB(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 aB(i){return function(){return this.matches(i)}}function sB(i){return function(e){return e.matches(i)}}var Vz=Array.prototype.find;function Xz(i){return function(){return Vz.call(this.children,i)}}function Zz(){return this.firstElementChild}function Qz(i){return this.select(i==null?Zz:Xz(typeof i=="function"?i:sB(i)))}var Jz=Array.prototype.filter;function t8(){return Array.from(this.children)}function e8(i){return function(){return Jz.call(this.children,i)}}function i8(i){return this.selectAll(i==null?t8:e8(typeof i=="function"?i:sB(i)))}function r8(i){typeof i!="function"&&(i=aB(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 oB(i){return new Array(i.length)}function n8(){return new Fn(this._enter||this._groups.map(oB),this._parents)}function ug(i,e){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=e}ug.prototype={constructor:ug,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 a8(i){return function(){return i}}function s8(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 ug(i,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function o8(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 ug(i,o[h]);for(h=0;h<f;++h)(u=e[h])&&d.get(x[h])===u&&(a[h]=u)}function l8(i){return i.__data__}function c8(i,e){if(!arguments.length)return Array.from(this,l8);var r=e?o8:s8,n=this._parents,a=this._groups;typeof i!="function"&&(i=a8(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=h8(i.call(f,f&&f.__data__,d,n)),v=y.length,_=h[d]=new Array(v),C=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,B;T<v;++T)if(N=_[T]){for(T>=E&&(E=T+1);!(B=C[E])&&++E<v;);N._next=B||null}}return c=new Fn(c,n),c._enter=h,c._exit=u,c}function h8(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function u8(){return new Fn(this._exit||this._groups.map(oB),this._parents)}function d8(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 f8(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 p8(){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 g8(i){i||(i=m8);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 m8(i,e){return i<e?-1:i>e?1:i>=e?0:NaN}function y8(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function b8(){return Array.from(this)}function x8(){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 v8(){let i=0;for(const e of this)++i;return i}function _8(){return!this.node()}function C8(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 k8(i){return function(){this.removeAttribute(i)}}function w8(i){return function(){this.removeAttributeNS(i.space,i.local)}}function S8(i,e){return function(){this.setAttribute(i,e)}}function T8(i,e){return function(){this.setAttributeNS(i.space,i.local,e)}}function E8(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=tm(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?w8:k8:typeof e=="function"?r.local?N8:E8:r.local?T8:S8)(r,e))}function lB(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function M8(i){return function(){this.style.removeProperty(i)}}function B8(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 O8(i,e,r){return arguments.length>1?this.each((e==null?M8:typeof e=="function"?L8:B8)(i,e,r??"")):mh(this.node(),i)}function mh(i,e){return i.style.getPropertyValue(e)||lB(i).getComputedStyle(i,null).getPropertyValue(e)}function R8(i){return function(){delete this[i]}}function D8(i,e){return function(){this[i]=e}}function j8(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?R8:typeof e=="function"?j8:D8)(i,e)):this.node()[i]}function cB(i){return i.trim().split(/^|\s+/)}function q1(i){return i.classList||new hB(i)}function hB(i){this._node=i,this._names=cB(i.getAttribute("class")||"")}hB.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 uB(i,e){for(var r=q1(i),n=-1,a=e.length;++n<a;)r.add(e[n])}function dB(i,e){for(var r=q1(i),n=-1,a=e.length;++n<a;)r.remove(e[n])}function I8(i){return function(){uB(this,i)}}function $8(i){return function(){dB(this,i)}}function z8(i,e){return function(){(e.apply(this,arguments)?uB:dB)(this,i)}}function P8(i,e){var r=cB(i+"");if(arguments.length<2){for(var n=q1(this.node()),a=-1,o=r.length;++a<o;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?z8:e?I8:$8)(r,e))}function q8(){this.textContent=""}function U8(i){return function(){this.textContent=i}}function H8(i){return function(){var e=i.apply(this,arguments);this.textContent=e??""}}function W8(i){return arguments.length?this.each(i==null?q8:(typeof i=="function"?H8:U8)(i)):this.node().textContent}function G8(){this.innerHTML=""}function Y8(i){return function(){this.innerHTML=i}}function K8(i){return function(){var e=i.apply(this,arguments);this.innerHTML=e??""}}function V8(i){return arguments.length?this.each(i==null?G8:(typeof i=="function"?K8:Y8)(i)):this.node().innerHTML}function X8(){this.nextSibling&&this.parentNode.appendChild(this)}function Z8(){return this.each(X8)}function Q8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function J8(){return this.each(Q8)}function tP(i){var e=typeof i=="function"?i:rB(i);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function eP(){return null}function iP(i,e){var r=typeof i=="function"?i:rB(i),n=e==null?eP:typeof e=="function"?e:P1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function rP(){var i=this.parentNode;i&&i.removeChild(this)}function nP(){return this.each(rP)}function aP(){var i=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function sP(){var i=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function oP(i){return this.select(i?sP:aP)}function lP(i){return arguments.length?this.property("__data__",i):this.node().__data__}function cP(i){return function(e){i.call(this,e,this.__data__)}}function hP(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 uP(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 dP(i,e,r){return function(){var n=this.__on,a,o=cP(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 fP(i,e,r){var n=hP(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?dP:uP,a=0;a<o;++a)this.each(h(n[a],e,r));return this}function fB(i,e,r){var n=lB(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 pP(i,e){return function(){return fB(this,i,e)}}function gP(i,e){return function(){return fB(this,i,e.apply(this,arguments))}}function mP(i,e){return this.each((typeof e=="function"?gP:pP)(i,e))}function*yP(){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 pB=[null];function Fn(i,e){this._groups=i,this._parents=e}function qd(){return new Fn([[document.documentElement]],pB)}function bP(){return this}Fn.prototype=qd.prototype={constructor:Fn,select:Hz,selectAll:Kz,selectChild:Qz,selectChildren:i8,filter:r8,data:c8,enter:n8,exit:u8,join:d8,merge:f8,selection:bP,order:p8,sort:g8,call:y8,nodes:b8,node:x8,size:v8,empty:_8,each:C8,attr:A8,style:O8,property:F8,classed:P8,text:W8,html:V8,raise:Z8,lower:J8,append:tP,insert:iP,remove:nP,clone:oP,datum:lP,on:fP,dispatch:mP,[Symbol.iterator]:yP};function ue(i){return typeof i=="string"?new Fn([[document.querySelector(i)]],[document.documentElement]):new Fn([[i]],pB)}function xP(i){let e;for(;e=i.sourceEvent;)i=e;return i}function $a(i,e){if(i=xP(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 vP={passive:!1},md={capture:!0,passive:!1};function qb(i){i.stopImmediatePropagation()}function zc(i){i.preventDefault(),i.stopImmediatePropagation()}function gB(i){var e=i.document.documentElement,r=ue(i).on("dragstart.drag",zc,md);"onselectstart"in e?r.on("selectstart.drag",zc,md):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function mB(i,e){var r=i.document.documentElement,n=ue(i).on("dragstart.drag",null);e&&(n.on("click.drag",zc,md),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 pp=i=>()=>i;function Zx(i,{sourceEvent:e,subject:r,target:n,identifier:a,active:o,x:c,y:h,dx:u,dy:d,dispatch:f}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:f}})}Zx.prototype.on=function(){var i=this._.on.apply(this._,arguments);return i===this._?this:i};function _P(i){return!i.ctrlKey&&!i.button}function CP(){return this.parentNode}function kP(i,e){return e??{x:i.x,y:i.y}}function wP(){return navigator.maxTouchPoints||"ontouchstart"in this}function SP(){var i=_P,e=CP,r=kP,n=wP,a={},o=Pd("start","drag","end"),c=0,h,u,d,f,g=0;function x(N){N.on("mousedown.drag",y).filter(n).on("touchstart.drag",C).on("touchmove.drag",k,vP).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(N,B){if(!(f||!i.call(this,N,B))){var O=E(this,e.call(this,N,B),N,B,"mouse");O&&(ue(N.view).on("mousemove.drag",v,md).on("mouseup.drag",_,md),gB(N.view),qb(N),d=!1,h=N.clientX,u=N.clientY,O("start",N))}}function v(N){if(zc(N),!d){var B=N.clientX-h,O=N.clientY-u;d=B*B+O*O>g}a.mouse("drag",N)}function _(N){ue(N.view).on("mousemove.drag mouseup.drag",null),mB(N.view,d),zc(N),a.mouse("end",N)}function C(N,B){if(i.call(this,N,B)){var O=N.changedTouches,A=e.call(this,N,B),M=O.length,F,D;for(F=0;F<M;++F)(D=E(this,A,N,B,O[F].identifier,O[F]))&&(qb(N),D("start",N,O[F]))}}function k(N){var B=N.changedTouches,O=B.length,A,M;for(A=0;A<O;++A)(M=a[B[A].identifier])&&(zc(N),M("drag",N,B[A]))}function T(N){var B=N.changedTouches,O=B.length,A,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<O;++A)(M=a[B[A].identifier])&&(qb(N),M("end",N,B[A]))}function E(N,B,O,A,M,F){var D=o.copy(),z=$a(F||O,B),U,K,$;if(($=r.call(N,new Zx("beforestart",{sourceEvent:O,target:x,identifier:M,active:c,x:z[0],y:z[1],dx:0,dy:0,dispatch:D}),A))!=null)return U=$.x-z[0]||0,K=$.y-z[1]||0,function H(j,q,G){var et=z,at;switch(j){case"start":a[M]=H,at=c++;break;case"end":delete a[M],--c;case"drag":z=$a(G||q,B),at=c;break}D.call(j,N,new Zx(j,{sourceEvent:q,subject:$,target:x,identifier:M,active:at,x:z[0]+U,y:z[1]+K,dx:z[0]-et[0],dy:z[1]-et[1],dispatch:D}),A)}}return x.filter=function(N){return arguments.length?(i=typeof N=="function"?N:pp(!!N),x):i},x.container=function(N){return arguments.length?(e=typeof N=="function"?N:pp(N),x):e},x.subject=function(N){return arguments.length?(r=typeof N=="function"?N:pp(N),x):r},x.touchable=function(N){return arguments.length?(n=typeof N=="function"?N:pp(!!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 U1(i,e,r){i.prototype=e.prototype=r,r.constructor=i}function yB(i,e){var r=Object.create(i.prototype);for(var n in e)r[n]=e[n];return r}function Ud(){}var yd=.7,dg=1/yd,Pc="\\s*([+-]?\\d+)\\s*",bd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",TP=/^#([0-9a-f]{3,8})$/,EP=new RegExp(`^rgb\\(${Pc},${Pc},${Pc}\\)$`),NP=new RegExp(`^rgb\\(${Wa},${Wa},${Wa}\\)$`),AP=new RegExp(`^rgba\\(${Pc},${Pc},${Pc},${bd}\\)$`),MP=new RegExp(`^rgba\\(${Wa},${Wa},${Wa},${bd}\\)$`),BP=new RegExp(`^hsl\\(${bd},${Wa},${Wa}\\)$`),LP=new RegExp(`^hsla\\(${bd},${Wa},${Wa},${bd}\\)$`),I2={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};U1(Ud,xd,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:$2,formatHex:$2,formatHex8:OP,formatHsl:RP,formatRgb:z2,toString:z2});function $2(){return this.rgb().formatHex()}function OP(){return this.rgb().formatHex8()}function RP(){return bB(this).formatHsl()}function z2(){return this.rgb().formatRgb()}function xd(i){var e,r;return i=(i+"").trim().toLowerCase(),(e=TP.exec(i))?(r=e[1].length,e=parseInt(e[1],16),r===6?P2(e):r===3?new vn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?gp(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?gp(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=EP.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))?gp(e[1],e[2],e[3],e[4]):(e=MP.exec(i))?gp(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=BP.exec(i))?H2(e[1],e[2]/100,e[3]/100,1):(e=LP.exec(i))?H2(e[1],e[2]/100,e[3]/100,e[4]):I2.hasOwnProperty(i)?P2(I2[i]):i==="transparent"?new vn(NaN,NaN,NaN,0):null}function P2(i){return new vn(i>>16&255,i>>8&255,i&255,1)}function gp(i,e,r,n){return n<=0&&(i=e=r=NaN),new vn(i,e,r,n)}function DP(i){return i instanceof Ud||(i=xd(i)),i?(i=i.rgb(),new vn(i.r,i.g,i.b,i.opacity)):new vn}function Qx(i,e,r,n){return arguments.length===1?DP(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}U1(vn,Qx,yB(Ud,{brighter(i){return i=i==null?dg:Math.pow(dg,i),new vn(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?yd:Math.pow(yd,i),new vn(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new vn(Al(this.r),Al(this.g),Al(this.b),fg(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:q2,formatHex:q2,formatHex8:jP,formatRgb:U2,toString:U2}));function q2(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}`}function jP(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}${yl((isNaN(this.opacity)?1:this.opacity)*255)}`}function U2(){const i=fg(this.opacity);return`${i===1?"rgb(":"rgba("}${Al(this.r)}, ${Al(this.g)}, ${Al(this.b)}${i===1?")":`, ${i})`}`}function fg(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function Al(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function yl(i){return i=Al(i),(i<16?"0":"")+i.toString(16)}function H2(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 bB(i){if(i instanceof ya)return new ya(i.h,i.s,i.l,i.opacity);if(i instanceof Ud||(i=xd(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?bB(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}U1(ya,FP,yB(Ud,{brighter(i){return i=i==null?dg:Math.pow(dg,i),new ya(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?yd:Math.pow(yd,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(Ub(i>=240?i-240:i+120,a,n),Ub(i,a,n),Ub(i<120?i+240:i-120,a,n),this.opacity)},clamp(){return new ya(W2(this.h),mp(this.s),mp(this.l),fg(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=fg(this.opacity);return`${i===1?"hsl(":"hsla("}${W2(this.h)}, ${mp(this.s)*100}%, ${mp(this.l)*100}%${i===1?")":`, ${i})`}`}}));function W2(i){return i=(i||0)%360,i<0?i+360:i}function mp(i){return Math.max(0,Math.min(1,i||0))}function Ub(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 H1=i=>()=>i;function xB(i,e){return function(r){return i+r*e}}function IP(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 Aot(i,e){var r=e-i;return r?xB(i,r>180||r<-180?r-360*Math.round(r/360):r):H1(isNaN(i)?e:i)}function $P(i){return(i=+i)==1?vB:function(e,r){return r-e?IP(e,r,i):H1(isNaN(e)?r:e)}}function vB(i,e){var r=e-i;return r?xB(i,r):H1(isNaN(i)?e:i)}const G2=(function i(e){var r=$P(e);function n(a,o){var c=r((a=Qx(a)).r,(o=Qx(o)).r),h=r(a.g,o.g),u=r(a.b,o.b),d=vB(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 Jx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hb=new RegExp(Jx.source,"g");function zP(i){return function(){return i}}function PP(i){return function(e){return i(e)+""}}function qP(i,e){var r=Jx.lastIndex=Hb.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(i=i+"",e=e+"";(n=Jx.exec(i))&&(a=Hb.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=Hb.lastIndex;return r<e.length&&(o=e.slice(r),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?PP(u[0].x):zP(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 Y2=180/Math.PI,tv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _B(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)*Y2,skewX:Math.atan(u)*Y2,scaleX:c,scaleY:h}}var yp;function UP(i){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return e.isIdentity?tv:_B(e.a,e.b,e.c,e.d,e.e,e.f)}function HP(i){return i==null||(yp||(yp=document.createElementNS("http://www.w3.org/2000/svg","g")),yp.setAttribute("transform",i),!(i=yp.transform.baseVal.consolidate()))?tv:(i=i.matrix,_B(i.a,i.b,i.c,i.d,i.e,i.f))}function CB(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 _=y.push("translate(",null,e,null,r);v.push({i:_-4,x:bo(d,g)},{i:_-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 _=y.push(a(y)+"scale(",null,",",null,")");v.push({i:_-4,x:bo(d,g)},{i:_-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,_=x.length,C;++v<_;)g[(C=x[v]).i]=C.x(y);return g.join("")}}}var WP=CB(UP,"px, ","px)","deg)"),GP=CB(HP,", ",")",")"),YP=1e-12;function K2(i){return((i=Math.exp(i))+1/i)/2}function KP(i){return((i=Math.exp(i))-1/i)/2}function VP(i){return((i=Math.exp(2*i))-1)/(i+1)}const XP=(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,_=y*y+v*v,C,k;if(_<YP)k=Math.log(x/d)/e,C=function(A){return[h+A*y,u+A*v,d*Math.exp(e*A*k)]};else{var T=Math.sqrt(_),E=(x*x-d*d+n*_)/(2*d*r*T),N=(x*x-d*d-n*_)/(2*x*r*T),B=Math.log(Math.sqrt(E*E+1)-E),O=Math.log(Math.sqrt(N*N+1)-N);k=(O-B)/e,C=function(A){var M=A*k,F=K2(B),D=d/(r*T)*(F*VP(e*M+B)-KP(B));return[h+D*y,u+D*v,d*F/K2(e*M+B)]}}return C.duration=k*1e3*e/Math.SQRT2,C}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 yh=0,Yu=0,ku=0,kB=1e3,pg,Ku,gg=0,Fl=0,em=0,vd=typeof performance=="object"&&performance.now?performance:Date,wB=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function W1(){return Fl||(wB(ZP),Fl=vd.now()+em)}function ZP(){Fl=0}function mg(){this._call=this._time=this._next=null}mg.prototype=G1.prototype={constructor:mg,restart:function(i,e,r){if(typeof i!="function")throw new TypeError("callback is not a function");r=(r==null?W1():+r)+(e==null?0:+e),!this._next&&Ku!==this&&(Ku?Ku._next=this:pg=this,Ku=this),this._call=i,this._time=r,ev()},stop:function(){this._call&&(this._call=null,this._time=1/0,ev())}};function G1(i,e,r){var n=new mg;return n.restart(i,e,r),n}function QP(){W1(),++yh;for(var i=pg,e;i;)(e=Fl-i._time)>=0&&i._call.call(void 0,e),i=i._next;--yh}function V2(){Fl=(gg=vd.now())+em,yh=Yu=0;try{QP()}finally{yh=0,tq(),Fl=0}}function JP(){var i=vd.now(),e=i-gg;e>kB&&(em-=e,gg=i)}function tq(){for(var i,e=pg,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:pg=r);Ku=i,ev(n)}function ev(i){if(!yh){Yu&&(Yu=clearTimeout(Yu));var e=i-Fl;e>24?(i<1/0&&(Yu=setTimeout(V2,i-vd.now()-em)),ku&&(ku=clearInterval(ku))):(ku||(gg=vd.now(),ku=setInterval(JP,kB)),yh=1,wB(V2))}}function X2(i,e,r){var n=new mg;return e=e==null?0:+e,n.restart(a=>{n.stop(),i(a+e)},e,r),n}var eq=Pd("start","end","cancel","interrupt"),iq=[],SB=0,Z2=1,iv=2,Hp=3,Q2=4,rv=5,Wp=6;function im(i,e,r,n,a,o){var c=i.__transition;if(!c)i.__transition={};else if(r in c)return;rq(i,r,{name:e,index:n,group:a,on:eq,tween:iq,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:SB})}function Y1(i,e){var r=Sa(i,e);if(r.state>SB)throw new Error("too late; already scheduled");return r}function Qa(i,e){var r=Sa(i,e);if(r.state>Hp)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 rq(i,e,r){var n=i.__transition,a;n[e]=r,r.timer=G1(o,0,r.time);function o(d){r.state=Z2,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!==Z2)return u();for(f in n)if(y=n[f],y.name===r.name){if(y.state===Hp)return X2(c);y.state===Q2?(y.state=Wp,y.timer.stop(),y.on.call("interrupt",i,i.__data__,y.index,y.group),delete n[f]):+f<e&&(y.state=Wp,y.timer.stop(),y.on.call("cancel",i,i.__data__,y.index,y.group),delete n[f])}if(X2(function(){r.state===Hp&&(r.state=Q2,r.timer.restart(h,r.delay,r.time),h(d))}),r.state=iv,r.on.call("start",i,i.__data__,r.index,r.group),r.state===iv){for(r.state=Hp,a=new Array(x=r.tween.length),f=0,g=-1;f<x;++f)(y=r.tween[f].value.call(i,i.__data__,r.index,r.group))&&(a[++g]=y);a.length=g+1}}function h(d){for(var f=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(u),r.state=rv,1),g=-1,x=a.length;++g<x;)a[g].call(i,f);r.state===rv&&(r.on.call("end",i,i.__data__,r.index,r.group),u())}function u(){r.state=Wp,r.timer.stop(),delete n[e];for(var d in n)return;delete i.__transition}}function Gp(i,e){var r=i.__transition,n,a,o=!0,c;if(r){e=e==null?null:e+"";for(c in r){if((n=r[c]).name!==e){o=!1;continue}a=n.state>iv&&n.state<rv,n.state=Wp,n.timer.stop(),n.on.call(a?"interrupt":"cancel",i,i.__data__,n.index,n.group),delete r[c]}o&&delete i.__transition}}function nq(i){return this.each(function(){Gp(this,i)})}function aq(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 sq(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 oq(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?aq:sq)(r,i,e))}function K1(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 TB(i,e){var r;return(typeof e=="number"?bo:e instanceof xd?G2:(r=xd(e))?(e=r,G2):qP)(i,e)}function lq(i){return function(){this.removeAttribute(i)}}function cq(i){return function(){this.removeAttributeNS(i.space,i.local)}}function hq(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 uq(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 dq(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 fq(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 pq(i,e){var r=tm(i),n=r==="transform"?GP:TB;return this.attrTween(i,typeof e=="function"?(r.local?fq:dq)(r,n,K1(this,"attr."+i,e)):e==null?(r.local?cq:lq)(r):(r.local?uq:hq)(r,n,e))}function gq(i,e){return function(r){this.setAttribute(i,e.call(this,r))}}function mq(i,e){return function(r){this.setAttributeNS(i.space,i.local,e.call(this,r))}}function yq(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&mq(i,o)),r}return a._value=e,a}function bq(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&gq(i,o)),r}return a._value=e,a}function xq(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=tm(i);return this.tween(r,(n.local?yq:bq)(n,e))}function vq(i,e){return function(){Y1(this,i).delay=+e.apply(this,arguments)}}function _q(i,e){return e=+e,function(){Y1(this,i).delay=e}}function Cq(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?vq:_q)(e,i)):Sa(this.node(),e).delay}function kq(i,e){return function(){Qa(this,i).duration=+e.apply(this,arguments)}}function wq(i,e){return e=+e,function(){Qa(this,i).duration=e}}function Sq(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?kq:wq)(e,i)):Sa(this.node(),e).duration}function Tq(i,e){if(typeof e!="function")throw new Error;return function(){Qa(this,i).ease=e}}function Eq(i){var e=this._id;return arguments.length?this.each(Tq(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 Mq(i){typeof i!="function"&&(i=aB(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 Bq(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 Oq(i,e,r){var n,a,o=Lq(e)?Y1:Qa;return function(){var c=o(this,i),h=c.on;h!==n&&(a=(n=h).copy()).on(e,r),c.on=a}}function Rq(i,e){var r=this._id;return arguments.length<2?Sa(this.node(),r).on.on(i):this.each(Oq(r,i,e))}function Dq(i){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==i)return;e&&e.removeChild(this)}}function jq(){return this.on("end.remove",Dq(this._id))}function Fq(i){var e=this._name,r=this._id;typeof i!="function"&&(i=P1(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,im(d[x],e,r,x,d,Sa(f,r)));return new Ds(o,this._parents,e,r)}function Iq(i){var e=this._name,r=this._id;typeof i!="function"&&(i=nB(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),_=0,C=x.length;_<C;++_)(y=x[_])&&im(y,e,r,_,x,v);o.push(x),c.push(f)}return new Ds(o,c,e,r)}var $q=qd.prototype.constructor;function zq(){return new $q(this._groups,this._parents)}function Pq(i,e){var r,n,a;return function(){var o=mh(this,i),c=(this.style.removeProperty(i),mh(this,i));return o===c?null:o===r&&c===n?a:a=e(r=o,n=c)}}function EB(i){return function(){this.style.removeProperty(i)}}function qq(i,e,r){var n,a=r+"",o;return function(){var c=mh(this,i);return c===a?null:c===n?o:o=e(n=c,r)}}function Uq(i,e,r){var n,a,o;return function(){var c=mh(this,i),h=r(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(i),mh(this,i))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function Hq(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=EB(e)):void 0;(d!==r||a!==f)&&(n=(r=d).copy()).on(c,a=f),u.on=n}}function Wq(i,e,r){var n=(i+="")=="transform"?WP:TB;return e==null?this.styleTween(i,Pq(i,n)).on("end.style."+i,EB(i)):typeof e=="function"?this.styleTween(i,Uq(i,n,K1(this,"style."+i,e))).each(Hq(this._id,i)):this.styleTween(i,qq(i,n,e),r).on("end.style."+i,null)}function Gq(i,e,r){return function(n){this.style.setProperty(i,e.call(this,n),r)}}function Yq(i,e,r){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&Gq(i,c,r)),n}return o._value=e,o}function Kq(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,Yq(i,e,r??""))}function Vq(i){return function(){this.textContent=i}}function Xq(i){return function(){var e=i(this);this.textContent=e??""}}function Zq(i){return this.tween("text",typeof i=="function"?Xq(K1(this,"text",i)):Vq(i==null?"":i+""))}function Qq(i){return function(e){this.textContent=i.call(this,e)}}function Jq(i){var e,r;function n(){var a=i.apply(this,arguments);return a!==r&&(e=(r=a)&&Qq(a)),e}return n._value=i,n}function t9(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,Jq(i))}function e9(){for(var i=this._name,e=this._id,r=NB(),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);im(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 i9(){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 r9=0;function Ds(i,e,r,n){this._groups=i,this._parents=e,this._name=r,this._id=n}function NB(){return++r9}var ys=qd.prototype;Ds.prototype={constructor:Ds,select:Fq,selectAll:Iq,selectChild:ys.selectChild,selectChildren:ys.selectChildren,filter:Mq,merge:Bq,selection:zq,transition:e9,call:ys.call,nodes:ys.nodes,node:ys.node,size:ys.size,empty:ys.empty,each:ys.each,on:Rq,attr:pq,attrTween:xq,style:Wq,styleTween:Kq,text:Zq,textTween:t9,remove:jq,tween:oq,delay:Cq,duration:Sq,ease:Eq,easeVarying:Aq,end:i9,[Symbol.iterator]:ys[Symbol.iterator]};function n9(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var a9={time:null,delay:0,duration:250,ease:n9};function s9(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 o9(i){var e,r;i instanceof Ds?(e=i._id,i=i._name):(e=NB(),(r=a9).time=W1(),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])&&im(u,i,e,d,c,r||s9(u,e));return new Ds(n,this._parents,i,e)}qd.prototype.interrupt=nq;qd.prototype.transition=o9;const nv=Math.PI,av=2*nv,ul=1e-6,l9=av-ul;function AB(i){this._+=i[0];for(let e=1,r=i.length;e<r;++e)this._+=arguments[e]+i[e]}function c9(i){let e=Math.floor(i);if(!(e>=0))throw new Error(`invalid digits: ${i}`);if(e>15)return AB;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 h9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?AB:c9(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>ul)if(!(Math.abs(g*u-d*f)>ul)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let y=n-c,v=a-h,_=u*u+d*d,C=y*y+v*v,k=Math.sqrt(_),T=Math.sqrt(x),E=o*Math.tan((nv-Math.acos((_+x-C)/(2*k*T)))/2),N=E/T,B=E/k;Math.abs(N-1)>ul&&this._append`L${e+N*f},${r+N*g}`,this._append`A${o},${o},0,0,${+(g*y>f*v)},${this._x1=e+B*u},${this._y1=r+B*d}`}}arc(e,r,n,a,o,c){if(e=+e,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let h=n*Math.cos(a),u=n*Math.sin(a),d=e+h,f=r+u,g=1^c,x=c?a-o:o-a;this._x1===null?this._append`M${d},${f}`:(Math.abs(this._x1-d)>ul||Math.abs(this._y1-f)>ul)&&this._append`L${d},${f}`,n&&(x<0&&(x=x%av+av),x>l9?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>ul&&this._append`A${n},${n},0,${+(x>=nv)},${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 u9(i){const e=+this._x.call(null,i),r=+this._y.call(null,i);return MB(this.cover(e,r),e,r,i)}function MB(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((_=e>=(g=(h+d)/2))?h=g:d=g,(C=r>=(x=(u+f)/2))?u=x:f=x,a=o,!(o=o[k=C<<1|_]))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),(_=e>=(g=(h+d)/2))?h=g:d=g,(C=r>=(x=(u+f)/2))?u=x:f=x;while((k=C<<1|_)===(T=(v>=x)<<1|y>=g));return a[T]=o,a[k]=c,i}function d9(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)MB(this,c[r],h[r],i[r]);return this}function f9(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 p9(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function g9(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 m9(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,_;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=(c+u)/2,k=(h+d)/2;x.push(new Qr(y[3],C,k,u,d),new Qr(y[2],c,k,C,d),new Qr(y[1],C,h,u,k),new Qr(y[0],c,h,C,k)),(_=(e>=k)<<1|i>=C)&&(v=x[x.length-1],x[x.length-1]=x[x.length-1-_],x[x.length-1-_]=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 B=Math.sqrt(r=N);a=i-B,o=e-B,f=i+B,g=e+B,n=y.data}}return n}function y9(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,(_=g>=(y=(h+d)/2))?h=y:d=y,e=r,!(r=r[C=_<<1|v]))return this;if(!r.length)break;(e[C+1&3]||e[C+2&3]||e[C+3&3])&&(n=e,k=C)}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[C]=o:delete e[C],(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 b9(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function x9(){return this._root}function v9(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function _9(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 C9(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 k9(i){return i[0]}function w9(i){return arguments.length?(this._x=i,this):this._x}function S9(i){return i[1]}function T9(i){return arguments.length?(this._y=i,this):this._y}function V1(i,e,r){var n=new X1(e??k9,r??S9,NaN,NaN,NaN,NaN);return i==null?n:n.addAll(i)}function X1(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 J2(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var sn=V1.prototype=X1.prototype;sn.copy=function(){var i=new X1(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=J2(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]=J2(n));return i};sn.add=u9;sn.addAll=d9;sn.cover=f9;sn.data=p9;sn.extent=g9;sn.find=m9;sn.remove=y9;sn.removeAll=b9;sn.root=x9;sn.size=v9;sn.visit=_9;sn.visitAfter=C9;sn.x=w9;sn.y=T9;function E9(i,e){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(e).domain(i);break}return this}const tT=Symbol("implicit");function BB(){var i=new L2,e=[],r=[],n=tT;function a(o){let c=i.get(o);if(c===void 0){if(n!==tT)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 L2;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 BB(e,r).unknown(n)},E9.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 Ec(i){return function(){return i}}const Mot=Math.abs,Bot=Math.atan2,Lot=Math.cos,Oot=Math.max,Rot=Math.min,Dot=Math.sin,jot=Math.sqrt,eT=1e-12,Z1=Math.PI,iT=Z1/2,Fot=2*Z1;function Iot(i){return i>1?0:i<-1?Z1:Math.acos(i)}function $ot(i){return i>=1?iT:i<=-1?-iT:Math.asin(i)}function M9(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 h9(e)}function B9(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function LB(i){this._context=i}LB.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 sd(i){return new LB(i)}function L9(i){return i[0]}function O9(i){return i[1]}function R9(i,e){var r=Ec(!0),n=null,a=sd,o=null,c=M9(h);i=typeof i=="function"?i:i===void 0?L9:Ec(i),e=typeof e=="function"?e:e===void 0?O9:Ec(e);function h(u){var d,f=(u=B9(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:Ec(+u),h):i},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:Ec(+u),h):e},h.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Ec(!!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 OB{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 RB(i){return new OB(i,!0)}function DB(i){return new OB(i,!1)}function jo(){}function yg(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 rm(i){this._context=i}rm.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:yg(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:yg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function sv(i){return new rm(i)}function jB(i){this._context=i}jB.prototype={areaStart:jo,areaEnd:jo,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:yg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function D9(i){return new jB(i)}function FB(i){this._context=i}FB.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:yg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function j9(i){return new FB(i)}function IB(i,e){this._basis=new rm(i),this._beta=e}IB.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 rm(n):new IB(n,e)}return r.beta=function(n){return i(+n)},r})(.85);function bg(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 Q1(i,e){this._context=i,this._k=(1-e)/6}Q1.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:bg(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:bg(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 $B=(function i(e){function r(n){return new Q1(n,e)}return r.tension=function(n){return i(+n)},r})(0);function J1(i,e){this._context=i,this._k=(1-e)/6}J1.prototype={areaStart:jo,areaEnd:jo,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:bg(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 I9=(function i(e){function r(n){return new J1(n,e)}return r.tension=function(n){return i(+n)},r})(0);function t_(i,e){this._context=i,this._k=(1-e)/6}t_.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:bg(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 $9=(function i(e){function r(n){return new t_(n,e)}return r.tension=function(n){return i(+n)},r})(0);function e_(i,e,r){var n=i._x1,a=i._y1,o=i._x2,c=i._y2;if(i._l01_a>eT){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>eT){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 zB(i,e){this._context=i,this._alpha=e}zB.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:e_(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 PB=(function i(e){function r(n){return e?new zB(n,e):new Q1(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function qB(i,e){this._context=i,this._alpha=e}qB.prototype={areaStart:jo,areaEnd:jo,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:e_(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 z9=(function i(e){function r(n){return e?new qB(n,e):new J1(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function UB(i,e){this._context=i,this._alpha=e}UB.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:e_(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 P9=(function i(e){function r(n){return e?new UB(n,e):new t_(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function HB(i){this._context=i}HB.prototype={areaStart:jo,areaEnd:jo,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 q9(i){return new HB(i)}function rT(i){return i<0?-1:1}function nT(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(rT(o)+rT(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function aT(i,e){var r=i._x1-i._x0;return r?(3*(i._y1-i._y0)/r-e)/2:e}function Wb(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 xg(i){this._context=i}xg.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:Wb(this,this._t0,aT(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,Wb(this,aT(this,r=nT(this,i,e)),r);break;default:Wb(this,this._t0,r=nT(this,i,e));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e,this._t0=r}}};function WB(i){this._context=new GB(i)}(WB.prototype=Object.create(xg.prototype)).point=function(i,e){xg.prototype.point.call(this,e,i)};function GB(i){this._context=i}GB.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 YB(i){return new xg(i)}function KB(i){return new WB(i)}function VB(i){this._context=i}VB.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=sT(i),a=sT(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 sT(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 XB(i){return new VB(i)}function nm(i,e){this._context=i,this._t=e}nm.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 nm(i,.5)}function QB(i){return new nm(i,0)}function JB(i){return new nm(i,1)}const bp=i=>()=>i;function U9(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 i_=new Ms(1,0,0);Fa.prototype=Ms.prototype;function Fa(i){for(;!i.__zoom;)if(!(i=i.parentNode))return i_;return i.__zoom}function Gb(i){i.stopImmediatePropagation()}function wu(i){i.preventDefault(),i.stopImmediatePropagation()}function H9(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function W9(){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 oT(){return this.__zoom||i_}function G9(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function Y9(){return navigator.maxTouchPoints||"ontouchstart"in this}function K9(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 V9(){var i=H9,e=W9,r=K9,n=G9,a=Y9,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=XP,d=Pd("start","zoom","end"),f,g,x,y=500,v=150,_=0,C=10;function k($){$.property("__zoom",oT).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",D).filter(a).on("touchstart.zoom",z).on("touchmove.zoom",U).on("touchend.zoom touchcancel.zoom",K).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function($,H,j,q){var G=$.selection?$.selection():$;G.property("__zoom",oT),$!==G?B($,H,j,q):G.interrupt().each(function(){O(this,arguments).event(q).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},k.scaleBy=function($,H,j,q){k.scaleTo($,function(){var G=this.__zoom.k,et=typeof H=="function"?H.apply(this,arguments):H;return G*et},j,q)},k.scaleTo=function($,H,j,q){k.transform($,function(){var G=e.apply(this,arguments),et=this.__zoom,at=j==null?N(G):typeof j=="function"?j.apply(this,arguments):j,W=et.invert(at),rt=typeof H=="function"?H.apply(this,arguments):H;return r(E(T(et,rt),at,W),G,c)},j,q)},k.translateBy=function($,H,j,q){k.transform($,function(){return r(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof j=="function"?j.apply(this,arguments):j),e.apply(this,arguments),c)},null,q)},k.translateTo=function($,H,j,q,G){k.transform($,function(){var et=e.apply(this,arguments),at=this.__zoom,W=q==null?N(et):typeof q=="function"?q.apply(this,arguments):q;return r(i_.translate(W[0],W[1]).scale(at.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof j=="function"?-j.apply(this,arguments):-j),et,c)},q,G)};function T($,H){return H=Math.max(o[0],Math.min(o[1],H)),H===$.k?$:new Ms(H,$.x,$.y)}function E($,H,j){var q=H[0]-j[0]*$.k,G=H[1]-j[1]*$.k;return q===$.x&&G===$.y?$:new Ms($.k,q,G)}function N($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function B($,H,j,q){$.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,et=arguments,at=O(G,et).event(q),W=e.apply(G,et),rt=j==null?N(W):typeof j=="function"?j.apply(G,et):j,ft=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),st=G.__zoom,Ct=typeof H=="function"?H.apply(G,et):H,ct=u(st.invert(rt).concat(ft/st.k),Ct.invert(rt).concat(ft/Ct.k));return function(X){if(X===1)X=Ct;else{var Z=ct(X),Q=ft/Z[2];X=new Ms(Q,rt[0]-Z[0]*Q,rt[1]-Z[1]*Q)}at.zoom(null,X)}})}function O($,H,j){return!j&&$.__zooming||new A($,H)}function A($,H){this.that=$,this.args=H,this.active=0,this.sourceEvent=null,this.extent=e.apply($,H),this.taps=0}A.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,H){return this.mouse&&$!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var H=ue(this.that).datum();d.call($,this.that,new U9($,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),H)}};function M($,...H){if(!i.apply(this,arguments))return;var j=O(this,H).event($),q=this.__zoom,G=Math.max(o[0],Math.min(o[1],q.k*Math.pow(2,n.apply(this,arguments)))),et=$a($);if(j.wheel)(j.mouse[0][0]!==et[0]||j.mouse[0][1]!==et[1])&&(j.mouse[1]=q.invert(j.mouse[0]=et)),clearTimeout(j.wheel);else{if(q.k===G)return;j.mouse=[et,q.invert(et)],Gp(this),j.start()}wu($),j.wheel=setTimeout(at,v),j.zoom("mouse",r(E(T(q,G),j.mouse[0],j.mouse[1]),j.extent,c));function at(){j.wheel=null,j.end()}}function F($,...H){if(x||!i.apply(this,arguments))return;var j=$.currentTarget,q=O(this,H,!0).event($),G=ue($.view).on("mousemove.zoom",rt,!0).on("mouseup.zoom",ft,!0),et=$a($,j),at=$.clientX,W=$.clientY;gB($.view),Gb($),q.mouse=[et,this.__zoom.invert(et)],Gp(this),q.start();function rt(st){if(wu(st),!q.moved){var Ct=st.clientX-at,ct=st.clientY-W;q.moved=Ct*Ct+ct*ct>_}q.event(st).zoom("mouse",r(E(q.that.__zoom,q.mouse[0]=$a(st,j),q.mouse[1]),q.extent,c))}function ft(st){G.on("mousemove.zoom mouseup.zoom",null),mB(st.view,q.moved),wu(st),q.event(st).end()}}function D($,...H){if(i.apply(this,arguments)){var j=this.__zoom,q=$a($.changedTouches?$.changedTouches[0]:$,this),G=j.invert(q),et=j.k*($.shiftKey?.5:2),at=r(E(T(j,et),q,G),e.apply(this,H),c);wu($),h>0?ue(this).transition().duration(h).call(B,at,q,$):ue(this).call(k.transform,at,q,$)}}function z($,...H){if(i.apply(this,arguments)){var j=$.touches,q=j.length,G=O(this,H,$.changedTouches.length===q).event($),et,at,W,rt;for(Gb($),at=0;at<q;++at)W=j[at],rt=$a(W,this),rt=[rt,this.__zoom.invert(rt),W.identifier],G.touch0?!G.touch1&&G.touch0[2]!==rt[2]&&(G.touch1=rt,G.taps=0):(G.touch0=rt,et=!0,G.taps=1+!!f);f&&(f=clearTimeout(f)),et&&(G.taps<2&&(g=rt[0],f=setTimeout(function(){f=null},y)),Gp(this),G.start())}}function U($,...H){if(this.__zooming){var j=O(this,H).event($),q=$.changedTouches,G=q.length,et,at,W,rt;for(wu($),et=0;et<G;++et)at=q[et],W=$a(at,this),j.touch0&&j.touch0[2]===at.identifier?j.touch0[0]=W:j.touch1&&j.touch1[2]===at.identifier&&(j.touch1[0]=W);if(at=j.that.__zoom,j.touch1){var ft=j.touch0[0],st=j.touch0[1],Ct=j.touch1[0],ct=j.touch1[1],X=(X=Ct[0]-ft[0])*X+(X=Ct[1]-ft[1])*X,Z=(Z=ct[0]-st[0])*Z+(Z=ct[1]-st[1])*Z;at=T(at,Math.sqrt(X/Z)),W=[(ft[0]+Ct[0])/2,(ft[1]+Ct[1])/2],rt=[(st[0]+ct[0])/2,(st[1]+ct[1])/2]}else if(j.touch0)W=j.touch0[0],rt=j.touch0[1];else return;j.zoom("touch",r(E(at,W,rt),j.extent,c))}}function K($,...H){if(this.__zooming){var j=O(this,H).event($),q=$.changedTouches,G=q.length,et,at;for(Gb($),x&&clearTimeout(x),x=setTimeout(function(){x=null},y),et=0;et<G;++et)at=q[et],j.touch0&&j.touch0[2]===at.identifier?delete j.touch0:j.touch1&&j.touch1[2]===at.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&&(at=$a(at,this),Math.hypot(g[0]-at[0],g[1]-at[1])<C)){var W=ue(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return k.wheelDelta=function($){return arguments.length?(n=typeof $=="function"?$:bp(+$),k):n},k.filter=function($){return arguments.length?(i=typeof $=="function"?$:bp(!!$),k):i},k.touchable=function($){return arguments.length?(a=typeof $=="function"?$:bp(!!$),k):a},k.extent=function($){return arguments.length?(e=typeof $=="function"?$:bp([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),k):e},k.scaleExtent=function($){return arguments.length?(o[0]=+$[0],o[1]=+$[1],k):[o[0],o[1]]},k.translateExtent=function($){return arguments.length?(c[0][0]=+$[0][0],c[1][0]=+$[1][0],c[0][1]=+$[0][1],c[1][1]=+$[1][1],k):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},k.constrain=function($){return arguments.length?(r=$,k):r},k.duration=function($){return arguments.length?(h=+$,k):h},k.interpolate=function($){return arguments.length?(u=$,k):u},k.on=function(){var $=d.on.apply(d,arguments);return $===d?k:$},k.clickDistance=function($){return arguments.length?(_=($=+$)*$,k):Math.sqrt(_)},k.tapDistance=function($){return arguments.length?(C=+$,k):C},k}var X9=L(i=>{var a;const{securityLevel:e}=ii();let r=ue("body");if(e==="sandbox"){const c=((a=ue(`#i${i}`).node())==null?void 0:a.contentDocument)??document;r=ue(c.body)}return r.select(`#${i}`)},"selectSvgElement");function r_(i){return typeof i>"u"||i===null}L(r_,"isNothing");function tL(i){return typeof i=="object"&&i!==null}L(tL,"isObject");function eL(i){return Array.isArray(i)?i:r_(i)?[]:[i]}L(eL,"toArray");function iL(i,e){var r,n,a,o;if(e)for(o=Object.keys(e),r=0,n=o.length;r<n;r+=1)a=o[r],i[a]=e[a];return i}L(iL,"extend");function rL(i,e){var r="",n;for(n=0;n<e;n+=1)r+=i;return r}L(rL,"repeat");function nL(i){return i===0&&Number.NEGATIVE_INFINITY===1/i}L(nL,"isNegativeZero");var Z9=r_,Q9=tL,J9=eL,t7=rL,e7=nL,i7=iL,yr={isNothing:Z9,isObject:Q9,toArray:J9,repeat:t7,isNegativeZero:e7,extend:i7};function n_(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}L(n_,"formatError");function bh(i,e){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=e,this.message=n_(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}L(bh,"YAMLException$1");bh.prototype=Object.create(Error.prototype);bh.prototype.constructor=bh;bh.prototype.toString=L(function(e){return this.name+": "+n_(this,e)},"toString");var xn=bh;function Yp(i,e,r,n,a){var o="",c="",h=Math.floor(a/2)-1;return n-e>h&&(o=" ... ",e=n-h+o.length),r-n>h&&(c=" ...",r=n+h-c.length),{str:o+i.slice(e,r).replace(/\t/g,"→")+c,pos:n-e+o.length}}L(Yp,"getLine");function Kp(i,e){return yr.repeat(" ",e-i.length)+i}L(Kp,"padStart");function aL(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=Yp(i.buffer,n[c-u],a[c-u],i.position-(n[c]-n[c-u]),g),h=yr.repeat(" ",e.indent)+Kp((i.line-u+1).toString(),f)+" | "+d.str+`
|
|
230
|
+
`+h;for(d=Yp(i.buffer,n[c],a[c],i.position,g),h+=yr.repeat(" ",e.indent)+Kp((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=Yp(i.buffer,n[c+u],a[c+u],i.position-(n[c]-n[c+u]),g),h+=yr.repeat(" ",e.indent)+Kp((i.line+u+1).toString(),f)+" | "+d.str+`
|
|
233
|
+
`;return h.replace(/\n$/,"")}L(aL,"makeSnippet");var r7=aL,n7=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],a7=["scalar","sequence","mapping"];function sL(i){var e={};return i!==null&&Object.keys(i).forEach(function(r){i[r].forEach(function(n){e[String(n)]=r})}),e}L(sL,"compileStyleAliases");function oL(i,e){if(e=e||{},Object.keys(e).forEach(function(r){if(n7.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=sL(e.styleAliases||null),a7.indexOf(this.kind)===-1)throw new xn('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}L(oL,"Type$1");var Ur=oL;function ov(i,e){var r=[];return i[e].forEach(function(n){var a=r.length;r.forEach(function(o,c){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=c)}),r[a]=n}),r}L(ov,"compileList");function lL(){var i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(a){a.multi?(i.multi[a.kind].push(a),i.multi.fallback.push(a)):i[a.kind][a.tag]=i.fallback[a.tag]=a}for(L(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return i}L(lL,"compileMap");function vg(i){return this.extend(i)}L(vg,"Schema$1");vg.prototype.extend=L(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(vg.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=ov(a,"implicit"),a.compiledExplicit=ov(a,"explicit"),a.compiledTypeMap=lL(a.compiledImplicit,a.compiledExplicit),a},"extend");var s7=vg,o7=new Ur("tag:yaml.org,2002:str",{kind:"scalar",construct:L(function(i){return i!==null?i:""},"construct")}),l7=new Ur("tag:yaml.org,2002:seq",{kind:"sequence",construct:L(function(i){return i!==null?i:[]},"construct")}),c7=new Ur("tag:yaml.org,2002:map",{kind:"mapping",construct:L(function(i){return i!==null?i:{}},"construct")}),h7=new s7({explicit:[o7,l7,c7]});function cL(i){if(i===null)return!0;var e=i.length;return e===1&&i==="~"||e===4&&(i==="null"||i==="Null"||i==="NULL")}L(cL,"resolveYamlNull");function hL(){return null}L(hL,"constructYamlNull");function uL(i){return i===null}L(uL,"isNull");var u7=new Ur("tag:yaml.org,2002:null",{kind:"scalar",resolve:cL,construct:hL,predicate:uL,represent:{canonical:L(function(){return"~"},"canonical"),lowercase:L(function(){return"null"},"lowercase"),uppercase:L(function(){return"NULL"},"uppercase"),camelcase:L(function(){return"Null"},"camelcase"),empty:L(function(){return""},"empty")},defaultStyle:"lowercase"});function dL(i){if(i===null)return!1;var e=i.length;return e===4&&(i==="true"||i==="True"||i==="TRUE")||e===5&&(i==="false"||i==="False"||i==="FALSE")}L(dL,"resolveYamlBoolean");function fL(i){return i==="true"||i==="True"||i==="TRUE"}L(fL,"constructYamlBoolean");function pL(i){return Object.prototype.toString.call(i)==="[object Boolean]"}L(pL,"isBoolean");var d7=new Ur("tag:yaml.org,2002:bool",{kind:"scalar",resolve:dL,construct:fL,predicate:pL,represent:{lowercase:L(function(i){return i?"true":"false"},"lowercase"),uppercase:L(function(i){return i?"TRUE":"FALSE"},"uppercase"),camelcase:L(function(i){return i?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function gL(i){return 48<=i&&i<=57||65<=i&&i<=70||97<=i&&i<=102}L(gL,"isHexCode");function mL(i){return 48<=i&&i<=55}L(mL,"isOctCode");function yL(i){return 48<=i&&i<=57}L(yL,"isDecCode");function bL(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(!gL(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!mL(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=i[r],a!=="_"){if(!yL(i.charCodeAt(r)))return!1;n=!0}return!(!n||a==="_")}L(bL,"resolveYamlInteger");function xL(i){var e=i,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}L(xL,"constructYamlInteger");function vL(i){return Object.prototype.toString.call(i)==="[object Number]"&&i%1===0&&!yr.isNegativeZero(i)}L(vL,"isInteger");var f7=new Ur("tag:yaml.org,2002:int",{kind:"scalar",resolve:bL,construct:xL,predicate:vL,represent:{binary:L(function(i){return i>=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},"binary"),octal:L(function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},"octal"),decimal:L(function(i){return i.toString(10)},"decimal"),hexadecimal:L(function(i){return i>=0?"0x"+i.toString(16).toUpperCase():"-0x"+i.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),p7=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function _L(i){return!(i===null||!p7.test(i)||i[i.length-1]==="_")}L(_L,"resolveYamlFloat");function CL(i){var e,r;return e=i.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}L(CL,"constructYamlFloat");var g7=/^[-+]?[0-9]+e/;function kL(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),g7.test(r)?r.replace("e",".e"):r}L(kL,"representYamlFloat");function wL(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||yr.isNegativeZero(i))}L(wL,"isFloat");var m7=new Ur("tag:yaml.org,2002:float",{kind:"scalar",resolve:_L,construct:CL,predicate:wL,represent:kL,defaultStyle:"lowercase"}),SL=h7.extend({implicit:[u7,d7,f7,m7]}),y7=SL,TL=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),EL=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 NL(i){return i===null?!1:TL.exec(i)!==null||EL.exec(i)!==null}L(NL,"resolveYamlTimestamp");function AL(i){var e,r,n,a,o,c,h,u=0,d=null,f,g,x;if(e=TL.exec(i),e===null&&(e=EL.exec(i)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,n,a));if(o=+e[4],c=+e[5],h=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(f=+e[10],g=+(e[11]||0),d=(f*60+g)*6e4,e[9]==="-"&&(d=-d)),x=new Date(Date.UTC(r,n,a,o,c,h,u)),d&&x.setTime(x.getTime()-d),x}L(AL,"constructYamlTimestamp");function ML(i){return i.toISOString()}L(ML,"representYamlTimestamp");var b7=new Ur("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:NL,construct:AL,instanceOf:Date,represent:ML});function BL(i){return i==="<<"||i===null}L(BL,"resolveYamlMerge");var x7=new Ur("tag:yaml.org,2002:merge",{kind:"scalar",resolve:BL}),a_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
234
|
+
\r`;function LL(i){if(i===null)return!1;var e,r,n=0,a=i.length,o=a_;for(r=0;r<a;r++)if(e=o.indexOf(i.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}L(LL,"resolveYamlBinary");function OL(i){var e,r,n=i.replace(/[\r\n=]/g,""),a=n.length,o=a_,c=0,h=[];for(e=0;e<a;e++)e%4===0&&e&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|o.indexOf(n.charAt(e));return r=a%4*6,r===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):r===18?(h.push(c>>10&255),h.push(c>>2&255)):r===12&&h.push(c>>4&255),new Uint8Array(h)}L(OL,"constructYamlBinary");function RL(i){var e="",r=0,n,a,o=i.length,c=a_;for(n=0;n<o;n++)n%3===0&&n&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+i[n];return a=o%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}L(RL,"representYamlBinary");function DL(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}L(DL,"isBinary");var v7=new Ur("tag:yaml.org,2002:binary",{kind:"scalar",resolve:LL,construct:OL,predicate:DL,represent:RL}),_7=Object.prototype.hasOwnProperty,C7=Object.prototype.toString;function jL(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,C7.call(a)!=="[object Object]")return!1;for(o in a)if(_7.call(a,o))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}L(jL,"resolveYamlOmap");function FL(i){return i!==null?i:[]}L(FL,"constructYamlOmap");var k7=new Ur("tag:yaml.org,2002:omap",{kind:"sequence",resolve:jL,construct:FL}),w7=Object.prototype.toString;function IL(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],w7.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}L(IL,"resolveYamlPairs");function $L(i){if(i===null)return[];var e,r,n,a,o,c=i;for(o=new Array(c.length),e=0,r=c.length;e<r;e+=1)n=c[e],a=Object.keys(n),o[e]=[a[0],n[a[0]]];return o}L($L,"constructYamlPairs");var S7=new Ur("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:IL,construct:$L}),T7=Object.prototype.hasOwnProperty;function zL(i){if(i===null)return!0;var e,r=i;for(e in r)if(T7.call(r,e)&&r[e]!==null)return!1;return!0}L(zL,"resolveYamlSet");function PL(i){return i!==null?i:{}}L(PL,"constructYamlSet");var E7=new Ur("tag:yaml.org,2002:set",{kind:"mapping",resolve:zL,construct:PL}),qL=y7.extend({implicit:[b7,x7],explicit:[v7,k7,S7,E7]}),Fo=Object.prototype.hasOwnProperty,_g=1,UL=2,HL=3,Cg=4,Yb=1,N7=2,lT=3,A7=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M7=/[\x85\u2028\u2029]/,B7=/[,\[\]\{\}]/,WL=/^(?:!|!!|![a-z\-]+!)$/i,GL=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function lv(i){return Object.prototype.toString.call(i)}L(lv,"_class");function va(i){return i===10||i===13}L(va,"is_EOL");function Oo(i){return i===9||i===32}L(Oo,"is_WHITE_SPACE");function tn(i){return i===9||i===32||i===10||i===13}L(tn,"is_WS_OR_EOL");function bl(i){return i===44||i===91||i===93||i===123||i===125}L(bl,"is_FLOW_INDICATOR");function YL(i){var e;return 48<=i&&i<=57?i-48:(e=i|32,97<=e&&e<=102?e-97+10:-1)}L(YL,"fromHexCode");function KL(i){return i===120?2:i===117?4:i===85?8:0}L(KL,"escapedHexLen");function VL(i){return 48<=i&&i<=57?i-48:-1}L(VL,"fromDecimalCode");function cv(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":""}L(cv,"simpleEscapeSequence");function XL(i){return i<=65535?String.fromCharCode(i):String.fromCharCode((i-65536>>10)+55296,(i-65536&1023)+56320)}L(XL,"charFromCodepoint");function s_(i,e,r){e==="__proto__"?Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):i[e]=r}L(s_,"setProperty");var ZL=new Array(256),QL=new Array(256);for(ol=0;ol<256;ol++)ZL[ol]=cv(ol)?1:0,QL[ol]=cv(ol);var ol;function JL(i,e){this.input=i,this.filename=e.filename||null,this.schema=e.schema||qL,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=i.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}L(JL,"State$1");function o_(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=r7(r),new xn(e,r)}L(o_,"generateError");function re(i,e){throw o_(i,e)}L(re,"throwError");function _d(i,e){i.onWarning&&i.onWarning.call(null,o_(i,e))}L(_d,"throwWarning");var cT={YAML:L(function(e,r,n){var a,o,c;e.version!==null&&re(e,"duplication of %YAML directive"),n.length!==1&&re(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&re(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&re(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&_d(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:L(function(e,r,n){var a,o;n.length!==2&&re(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],WL.test(a)||re(e,"ill-formed tag handle (first argument) of the TAG directive"),Fo.call(e.tagMap,a)&&re(e,'there is a previously declared suffix for "'+a+'" tag handle'),GL.test(o)||re(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{re(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||re(i,"expected valid JSON character");else A7.test(h)&&re(i,"the stream contains non-printable characters");i.result+=h}}L(Ls,"captureSegment");function hv(i,e,r,n){var a,o,c,h;for(yr.isObject(r)||re(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],Fo.call(e,o)||(s_(e,o,r[o]),n[o]=!0)}L(hv,"mergeMappings");function xl(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])&&re(i,"nested arrays are not supported inside keys"),typeof a=="object"&&lv(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&lv(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)hv(i,e,o[d],r);else hv(i,e,o,r);else!i.json&&!Fo.call(r,a)&&Fo.call(e,a)&&(i.line=c||i.line,i.lineStart=h||i.lineStart,i.position=u||i.position,re(i,"duplicated mapping key")),s_(e,a,o),delete r[a];return e}L(xl,"storeMappingPair");function am(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++):re(i,"a line break is expected"),i.line+=1,i.lineStart=i.position,i.firstTabInLine=-1}L(am,"readLineBreak");function tr(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(am(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&&_d(i,"deficient indentation"),n}L(tr,"skipSeparationSpace");function Hd(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)))}L(Hd,"testDocumentSeparator");function sm(i,e){e===1?i.result+=" ":e>1&&(i.result+=yr.repeat(`
|
|
236
|
+
`,e-1))}L(sm,"writeFoldedLines");function tO(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)||bl(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&&bl(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&&bl(a))break}else if(y===35){if(n=i.input.charCodeAt(i.position-1),tn(n))break}else{if(i.position===i.lineStart&&Hd(i)||r&&bl(y))break;if(va(y))if(u=i.line,d=i.lineStart,f=i.lineIndent,tr(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),sm(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)}L(tO,"readPlainScalar");function eO(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),sm(i,tr(i,!1,e)),n=a=i.position):i.position===i.lineStart&&Hd(i)?re(i,"unexpected end of the document within a single quoted scalar"):(i.position++,a=i.position);re(i,"unexpected end of the stream within a single quoted scalar")}L(eO,"readSingleQuotedScalar");function iO(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))tr(i,!1,e);else if(h<256&&ZL[h])i.result+=QL[h],i.position++;else if((c=KL(h))>0){for(a=c,o=0;a>0;a--)h=i.input.charCodeAt(++i.position),(c=YL(h))>=0?o=(o<<4)+c:re(i,"expected hexadecimal character");i.result+=XL(o),i.position++}else re(i,"unknown escape sequence");r=n=i.position}else va(h)?(Ls(i,r,n,!0),sm(i,tr(i,!1,e)),r=n=i.position):i.position===i.lineStart&&Hd(i)?re(i,"unexpected end of the document within a double quoted scalar"):(i.position++,n=i.position)}re(i,"unexpected end of the stream within a double quoted scalar")}L(iO,"readDoubleQuotedScalar");function rO(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(tr(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&&re(i,"expected the node content, but found ','"):re(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++,tr(i,!0,e))),n=i.line,a=i.lineStart,o=i.position,Il(i,e,_g,!1,!0),C=i.tag,_=i.result,tr(i,!0,e),T=i.input.charCodeAt(i.position),(x||i.line===n)&&T===58&&(g=!0,T=i.input.charCodeAt(++i.position),tr(i,!0,e),Il(i,e,_g,!1,!0),k=i.result),y?xl(i,h,v,C,_,k,n,a,o):g?h.push(xl(i,null,v,C,_,k,n,a,o)):h.push(_),tr(i,!0,e),T=i.input.charCodeAt(i.position),T===44?(r=!0,T=i.input.charCodeAt(++i.position)):r=!1}re(i,"unexpected end of the stream within a flow collection")}L(rO,"readFlowCollection");function nO(i,e){var r,n,a=Yb,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)Yb===a?a=g===43?lT:N7:re(i,"repeat of a chomping mode identifier");else if((f=VL(g))>=0)f===0?re(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?re(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(am(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===lT?i.result+=yr.repeat(`
|
|
237
|
+
`,o?1+u:u):a===Yb&&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}L(nO,"readBlockScalar");function uv(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,re(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++,tr(i,!0,-1)&&i.lineIndent<=e){o.push(null),u=i.input.charCodeAt(i.position);continue}if(r=i.line,Il(i,e,HL,!1,!0),o.push(i.result),tr(i,!0,-1),u=i.input.charCodeAt(i.position),(i.line===r||i.lineIndent>e)&&u!==0)re(i,"bad indentation of a sequence entry");else if(i.lineIndent<e)break}return h?(i.tag=n,i.anchor=a,i.kind="sequence",i.result=o,!0):!1}L(uv,"readBlockSequence");function aO(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,_=null,C=!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(!C&&i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,re(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?(C&&(xl(i,g,x,y,v,null,c,h,u),y=v=_=null),k=!0,C=!0,a=!0):C?(C=!1,a=!0):re(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,!Il(i,r,UL,!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)||re(i,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(xl(i,g,x,y,v,null,c,h,u),y=v=_=null),k=!0,C=!1,a=!1,y=i.tag,v=i.result;else if(k)re(i,"can not read an implicit mapping pair; a colon is missed");else return i.tag=d,i.anchor=f,!0}else if(k)re(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&&(c=i.line,h=i.lineStart,u=i.position),Il(i,e,Cg,!0,a)&&(C?v=i.result:_=i.result),C||(xl(i,g,x,y,v,_,c,h,u),y=v=_=null),tr(i,!0,-1),T=i.input.charCodeAt(i.position)),(i.line===o||i.lineIndent>e)&&T!==0)re(i,"bad indentation of a mapping entry");else if(i.lineIndent<e)break}return C&&xl(i,g,x,y,v,null,c,h,u),k&&(i.tag=d,i.anchor=f,i.kind="mapping",i.result=g),k}L(aO,"readBlockMapping");function sO(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&&re(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)):re(i,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!tn(c);)c===33&&(n?re(i,"tag suffix cannot contain exclamation marks"):(a=i.input.slice(e-1,i.position+1),WL.test(a)||re(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),B7.test(o)&&re(i,"tag suffix cannot contain flow indicator characters")}o&&!GL.test(o)&&re(i,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{re(i,"tag name is malformed: "+o)}return r?i.tag=o:Fo.call(i.tagMap,a)?i.tag=i.tagMap[a]+o:a==="!"?i.tag="!"+o:a==="!!"?i.tag="tag:yaml.org,2002:"+o:re(i,'undeclared tag handle "'+a+'"'),!0}L(sO,"readTagProperty");function oO(i){var e,r;if(r=i.input.charCodeAt(i.position),r!==38)return!1;for(i.anchor!==null&&re(i,"duplication of an anchor property"),r=i.input.charCodeAt(++i.position),e=i.position;r!==0&&!tn(r)&&!bl(r);)r=i.input.charCodeAt(++i.position);return i.position===e&&re(i,"name of an anchor node must contain at least one character"),i.anchor=i.input.slice(e,i.position),!0}L(oO,"readAnchorProperty");function lO(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)&&!bl(n);)n=i.input.charCodeAt(++i.position);return i.position===e&&re(i,"name of an alias node must contain at least one character"),r=i.input.slice(e,i.position),Fo.call(i.anchorMap,r)||re(i,'unidentified alias "'+r+'"'),i.result=i.anchorMap[r],tr(i,!0,-1),!0}L(lO,"readAlias");function Il(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||HL===r,n&&tr(i,!0,-1)&&(d=!0,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)),u===1)for(;sO(i)||oO(i);)tr(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)&&(_g===r||UL===r?_=e:_=e+1,C=i.position-i.lineStart,u===1?h&&(uv(i,C)||aO(i,C,_))||rO(i,_)?f=!0:(c&&nO(i,_)||eO(i,_)||iO(i,_)?f=!0:lO(i)?(f=!0,(i.tag!==null||i.anchor!==null)&&re(i,"alias node should not have any properties")):tO(i,_,_g===r)&&(f=!0,i.tag===null&&(i.tag="?")),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):u===0&&(f=h&&uv(i,C))),i.tag===null)i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);else if(i.tag==="?"){for(i.result!==null&&i.kind!=="scalar"&&re(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(Fo.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||re(i,"unknown tag !<"+i.tag+">"),i.result!==null&&v.kind!==i.kind&&re(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)):re(i,"cannot resolve a node with !<"+i.tag+"> explicit tag")}return i.listener!==null&&i.listener("close",i),i.tag!==null||i.anchor!==null||f}L(Il,"composeNode");function cO(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&&(tr(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&&re(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&&am(i),Fo.call(cT,n)?cT[n](i,n,a):_d(i,'unknown document directive "'+n+'"')}if(tr(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,tr(i,!0,-1)):o&&re(i,"directives end mark is expected"),Il(i,i.lineIndent-1,Cg,!1,!0),tr(i,!0,-1),i.checkLineBreaks&&M7.test(i.input.slice(e,i.position))&&_d(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&Hd(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,tr(i,!0,-1));return}if(i.position<i.length-1)re(i,"end of the stream or a document separator is expected");else return}L(cO,"readDocument");function l_(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 JL(i,e),n=i.indexOf("\0");for(n!==-1&&(r.position=n,re(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;)cO(r);return r.documents}L(l_,"loadDocuments");function L7(i,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=l_(i,r);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}L(L7,"loadAll$1");function hO(i,e){var r=l_(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")}}L(hO,"load$1");var O7=hO,R7={load:O7},uO=Object.prototype.toString,dO=Object.prototype.hasOwnProperty,c_=65279,D7=9,Cd=10,j7=13,F7=32,I7=33,$7=34,dv=35,z7=37,P7=38,q7=39,U7=42,fO=44,H7=45,kg=58,W7=61,G7=62,Y7=63,K7=64,pO=91,gO=93,V7=96,mO=123,X7=124,yO=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 Z7=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Q7=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function bO(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&&dO.call(u.styleAliases,h)&&(h=u.styleAliases[h]),r[c]=h;return r}L(bO,"compileStyleMap");function xO(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}L(xO,"encodeHex");var J7=1,kd=2;function vO(i){this.schema=i.schema||qL,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=bO(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==='"'?kd:J7,this.forceQuotes=i.forceQuotes||!1,this.replacer=typeof i.replacer=="function"?i.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}L(vO,"State");function fv(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}L(fv,"indentString");function wg(i,e){return`
|
|
246
|
+
`+yr.repeat(" ",i.indent*e)}L(wg,"generateNextLine");function _O(i,e){var r,n,a;for(r=0,n=i.implicitTypes.length;r<n;r+=1)if(a=i.implicitTypes[r],a.resolve(e))return!0;return!1}L(_O,"testImplicitResolving");function wd(i){return i===F7||i===D7}L(wd,"isWhitespace");function xh(i){return 32<=i&&i<=126||161<=i&&i<=55295&&i!==8232&&i!==8233||57344<=i&&i<=65533&&i!==c_||65536<=i&&i<=1114111}L(xh,"isPrintable");function pv(i){return xh(i)&&i!==c_&&i!==j7&&i!==Cd}L(pv,"isNsCharOrWhitespace");function gv(i,e,r){var n=pv(i),a=n&&!wd(i);return(r?n:n&&i!==fO&&i!==pO&&i!==gO&&i!==mO&&i!==yO)&&i!==dv&&!(e===kg&&!a)||pv(e)&&!wd(e)&&i===dv||e===kg&&a}L(gv,"isPlainSafe");function CO(i){return xh(i)&&i!==c_&&!wd(i)&&i!==H7&&i!==Y7&&i!==kg&&i!==fO&&i!==pO&&i!==gO&&i!==mO&&i!==yO&&i!==dv&&i!==P7&&i!==U7&&i!==I7&&i!==X7&&i!==W7&&i!==G7&&i!==q7&&i!==$7&&i!==z7&&i!==K7&&i!==V7}L(CO,"isPlainSafeFirst");function kO(i){return!wd(i)&&i!==kg}L(kO,"isPlainSafeLast");function Ic(i,e){var r=i.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<i.length&&(n=i.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}L(Ic,"codePointAt");function h_(i){var e=/^\n* /;return e.test(i)}L(h_,"needIndentIndicator");var wO=1,mv=2,SO=3,TO=4,Rc=5;function EO(i,e,r,n,a,o,c,h){var u,d=0,f=null,g=!1,x=!1,y=n!==-1,v=-1,_=CO(Ic(i,0))&&kO(Ic(i,i.length-1));if(e||c)for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=Ic(i,u),!xh(d))return Rc;_=_&&gv(d,f,h),f=d}else{for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=Ic(i,u),d===Cd)g=!0,y&&(x=x||u-v-1>n&&i[v+1]!==" ",v=u);else if(!xh(d))return Rc;_=_&&gv(d,f,h),f=d}x=x||y&&u-v-1>n&&i[v+1]!==" "}return!g&&!x?_&&!c&&!a(i)?wO:o===kd?Rc:mv:r>9&&h_(i)?Rc:c?o===kd?Rc:mv:x?TO:SO}L(EO,"chooseScalarStyle");function NO(i,e,r,n,a){i.dump=(function(){if(e.length===0)return i.quotingType===kd?'""':"''";if(!i.noCompatMode&&(Z7.indexOf(e)!==-1||Q7.test(e)))return i.quotingType===kd?'"'+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 _O(i,d)}switch(L(u,"testAmbiguity"),EO(e,h,i.indent,c,u,i.quotingType,i.forceQuotes&&!n,a)){case wO:return e;case mv:return"'"+e.replace(/'/g,"''")+"'";case SO:return"|"+yv(e,i.indent)+bv(fv(e,o));case TO:return">"+yv(e,i.indent)+bv(fv(AO(e,c),o));case Rc:return'"'+MO(e)+'"';default:throw new xn("impossible error: invalid scalar style")}})()}L(NO,"writeScalar");function yv(i,e){var r=h_(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
|
+
`}L(yv,"blockHeader");function bv(i){return i[i.length-1]===`
|
|
251
|
+
`?i.slice(0,-1):i}L(bv,"dropEndingNewline");function AO(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,xv(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
|
+
`:"")+xv(u,e),a=o}return n}L(AO,"foldString");function xv(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)}L(xv,"foldLine");function MO(i){for(var e="",r=0,n,a=0;a<i.length;r>=65536?a+=2:a++)r=Ic(i,a),n=Wr[r],!n&&xh(r)?(e+=i[a],r>=65536&&(e+=i[a+1])):e+=n||xO(r);return e}L(MO,"escapeString");function BO(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+"]"}L(BO,"writeFlowSequence");function vv(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+=wg(i,e)),i.dump&&Cd===i.dump.charCodeAt(0)?a+="-":a+="- ",a+=i.dump);i.tag=o,i.dump=a||"[]"}L(vv,"writeBlockSequence");function LO(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+"}"}L(LO,"writeFlowMapping");function OO(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+=wg(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+=wg(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||"{}"}L(OO,"writeBlockMapping");function _v(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,uO.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(dO.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}L(_v,"detectType");function Ya(i,e,r,n,a,o,c){i.tag=null,i.dump=r,_v(i,r,!1)||_v(i,r,!0);var h=uO.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?(OO(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(LO(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?vv(i,e-1,i.dump,a):vv(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(BO(i,e,i.dump),x&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object String]")i.tag!=="?"&&NO(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}L(Ya,"writeNode");function RO(i,e){var r=[],n=[],a,o;for(Sg(i,r,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(o)}L(RO,"getDuplicateReferences");function Sg(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)Sg(i[a],e,r);else for(n=Object.keys(i),a=0,o=n.length;a<o;a+=1)Sg(i[n[a]],e,r)}L(Sg,"inspectNode");function tU(i,e){e=e||{};var r=new vO(e);r.noRefs||RO(i,r);var n=i;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ya(r,0,n,!0,!0)?r.dump+`
|
|
258
|
+
`:""}L(tU,"dump$1");function eU(i,e){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}L(eU,"renamed");var iU=SL,rU=R7.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 Su=L((i,e)=>{if(e)return"translate("+-i.width/2+", "+-i.height/2+")";const r=i.x??0,n=i.y??0;return"translate("+-(r+i.width/2)+", "+-(n+i.height/2)+")"},"computeLabelTransform"),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},hT={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Vu(i,e){if(i===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};i=Di(i),e=Di(e);const[r,n]=[i.x,i.y],[a,o]=[e.x,e.y],c=a-r,h=o-n;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}L(Vu,"calculateDeltaAndAngle");var Di=L(i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,"pointTransformer"),nU=L(i=>({x:L(function(e,r,n){let a=0;const o=Di(n[0]).x<Di(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(qr,i.arrowTypeStart)){const{angle:y,deltaX:v}=Vu(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}=Vu(n[n.length-1],n[n.length-2]);a=qr[i.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(Di(e).x-Di(n[n.length-1]).x),h=Math.abs(Di(e).y-Di(n[n.length-1]).y),u=Math.abs(Di(e).x-Di(n[0]).x),d=Math.abs(Di(e).y-Di(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 Di(e).x+a},"x"),y:L(function(e,r,n){let a=0;const o=Di(n[0]).y<Di(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(qr,i.arrowTypeStart)){const{angle:y,deltaY:v}=Vu(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}=Vu(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(Di(e).y-Di(n[n.length-1]).y),h=Math.abs(Di(e).x-Di(n[n.length-1]).x),u=Math.abs(Di(e).y-Di(n[0]).y),d=Math.abs(Di(e).x-Di(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 Di(e).y+a},"y")}),"getLineFunctionsWithOffset"),xp={},pr={},uT;function aU(){return uT||(uT=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 dT;function sU(){if(dT)return xp;dT=1,Object.defineProperty(xp,"__esModule",{value:!0}),xp.sanitizeUrl=o;var i=aU();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 xp}var oU=sU(),DO=typeof global=="object"&&global&&global.Object===Object&&global,lU=typeof self=="object"&&self&&self.Object===Object&&self,Ta=DO||lU||Function("return this")(),Tg=Ta.Symbol,jO=Object.prototype,cU=jO.hasOwnProperty,hU=jO.toString,Tu=Tg?Tg.toStringTag:void 0;function uU(i){var e=cU.call(i,Tu),r=i[Tu];try{i[Tu]=void 0;var n=!0}catch{}var a=hU.call(i);return n&&(e?i[Tu]=r:delete i[Tu]),a}var dU=Object.prototype,fU=dU.toString;function pU(i){return fU.call(i)}var gU="[object Null]",mU="[object Undefined]",fT=Tg?Tg.toStringTag:void 0;function Wl(i){return i==null?i===void 0?mU:gU:fT&&fT in Object(i)?uU(i):pU(i)}function ka(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var yU="[object AsyncFunction]",bU="[object Function]",xU="[object GeneratorFunction]",vU="[object Proxy]";function u_(i){if(!ka(i))return!1;var e=Wl(i);return e==bU||e==xU||e==yU||e==vU}var Kb=Ta["__core-js_shared__"],pT=(function(){var i=/[^.]+$/.exec(Kb&&Kb.keys&&Kb.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function _U(i){return!!pT&&pT in i}var CU=Function.prototype,kU=CU.toString;function Gl(i){if(i!=null){try{return kU.call(i)}catch{}try{return i+""}catch{}}return""}var wU=/[\\^$.*+?()[\]{}|]/g,SU=/^\[object .+?Constructor\]$/,TU=Function.prototype,EU=Object.prototype,NU=TU.toString,AU=EU.hasOwnProperty,MU=RegExp("^"+NU.call(AU).replace(wU,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function BU(i){if(!ka(i)||_U(i))return!1;var e=u_(i)?MU:SU;return e.test(Gl(i))}function LU(i,e){return i==null?void 0:i[e]}function Yl(i,e){var r=LU(i,e);return BU(r)?r:void 0}var Sd=Yl(Object,"create");function OU(){this.__data__=Sd?Sd(null):{},this.size=0}function RU(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var DU="__lodash_hash_undefined__",jU=Object.prototype,FU=jU.hasOwnProperty;function IU(i){var e=this.__data__;if(Sd){var r=e[i];return r===DU?void 0:r}return FU.call(e,i)?e[i]:void 0}var $U=Object.prototype,zU=$U.hasOwnProperty;function PU(i){var e=this.__data__;return Sd?e[i]!==void 0:zU.call(e,i)}var qU="__lodash_hash_undefined__";function UU(i,e){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=Sd&&e===void 0?qU:e,this}function $l(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])}}$l.prototype.clear=OU;$l.prototype.delete=RU;$l.prototype.get=IU;$l.prototype.has=PU;$l.prototype.set=UU;function HU(){this.__data__=[],this.size=0}function om(i,e){return i===e||i!==i&&e!==e}function lm(i,e){for(var r=i.length;r--;)if(om(i[r][0],e))return r;return-1}var WU=Array.prototype,GU=WU.splice;function YU(i){var e=this.__data__,r=lm(e,i);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():GU.call(e,r,1),--this.size,!0}function KU(i){var e=this.__data__,r=lm(e,i);return r<0?void 0:e[r][1]}function VU(i){return lm(this.__data__,i)>-1}function XU(i,e){var r=this.__data__,n=lm(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=HU;Is.prototype.delete=YU;Is.prototype.get=KU;Is.prototype.has=VU;Is.prototype.set=XU;var Td=Yl(Ta,"Map");function ZU(){this.size=0,this.__data__={hash:new $l,map:new(Td||Is),string:new $l}}function QU(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function cm(i,e){var r=i.__data__;return QU(e)?r[typeof e=="string"?"string":"hash"]:r.map}function JU(i){var e=cm(this,i).delete(i);return this.size-=e?1:0,e}function tH(i){return cm(this,i).get(i)}function eH(i){return cm(this,i).has(i)}function iH(i,e){var r=cm(this,i),n=r.size;return r.set(i,e),this.size+=r.size==n?0:1,this}function Po(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])}}Po.prototype.clear=ZU;Po.prototype.delete=JU;Po.prototype.get=tH;Po.prototype.has=eH;Po.prototype.set=iH;var rH="Expected a function";function Wd(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(rH);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(Wd.Cache||Po),r}Wd.Cache=Po;function nH(){this.__data__=new Is,this.size=0}function aH(i){var e=this.__data__,r=e.delete(i);return this.size=e.size,r}function sH(i){return this.__data__.get(i)}function oH(i){return this.__data__.has(i)}var lH=200;function cH(i,e){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!Td||n.length<lH-1)return n.push([i,e]),this.size=++r.size,this;r=this.__data__=new Po(n)}return r.set(i,e),this.size=r.size,this}function wh(i){var e=this.__data__=new Is(i);this.size=e.size}wh.prototype.clear=nH;wh.prototype.delete=aH;wh.prototype.get=sH;wh.prototype.has=oH;wh.prototype.set=cH;var Eg=(function(){try{var i=Yl(Object,"defineProperty");return i({},"",{}),i}catch{}})();function d_(i,e,r){e=="__proto__"&&Eg?Eg(i,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[e]=r}function Cv(i,e,r){(r!==void 0&&!om(i[e],r)||r===void 0&&!(e in i))&&d_(i,e,r)}function hH(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 uH=hH(),FO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gT=FO&&typeof module=="object"&&module&&!module.nodeType&&module,dH=gT&&gT.exports===FO,mT=dH?Ta.Buffer:void 0,yT=mT?mT.allocUnsafe:void 0;function fH(i,e){if(e)return i.slice();var r=i.length,n=yT?yT(r):new i.constructor(r);return i.copy(n),n}var bT=Ta.Uint8Array;function pH(i){var e=new i.constructor(i.byteLength);return new bT(e).set(new bT(i)),e}function gH(i,e){var r=e?pH(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}function mH(i,e){var r=-1,n=i.length;for(e||(e=Array(n));++r<n;)e[r]=i[r];return e}var xT=Object.create,yH=(function(){function i(){}return function(e){if(!ka(e))return{};if(xT)return xT(e);i.prototype=e;var r=new i;return i.prototype=void 0,r}})();function IO(i,e){return function(r){return i(e(r))}}var $O=IO(Object.getPrototypeOf,Object),bH=Object.prototype;function hm(i){var e=i&&i.constructor,r=typeof e=="function"&&e.prototype||bH;return i===r}function xH(i){return typeof i.constructor=="function"&&!hm(i)?yH($O(i)):{}}function Sh(i){return i!=null&&typeof i=="object"}var vH="[object Arguments]";function vT(i){return Sh(i)&&Wl(i)==vH}var zO=Object.prototype,_H=zO.hasOwnProperty,CH=zO.propertyIsEnumerable,Ng=vT((function(){return arguments})())?vT:function(i){return Sh(i)&&_H.call(i,"callee")&&!CH.call(i,"callee")},Ag=Array.isArray,kH=9007199254740991;function PO(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=kH}function um(i){return i!=null&&PO(i.length)&&!u_(i)}function wH(i){return Sh(i)&&um(i)}function SH(){return!1}var qO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_T=qO&&typeof module=="object"&&module&&!module.nodeType&&module,TH=_T&&_T.exports===qO,CT=TH?Ta.Buffer:void 0,EH=CT?CT.isBuffer:void 0,f_=EH||SH,NH="[object Object]",AH=Function.prototype,MH=Object.prototype,UO=AH.toString,BH=MH.hasOwnProperty,LH=UO.call(Object);function OH(i){if(!Sh(i)||Wl(i)!=NH)return!1;var e=$O(i);if(e===null)return!0;var r=BH.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&UO.call(r)==LH}var RH="[object Arguments]",DH="[object Array]",jH="[object Boolean]",FH="[object Date]",IH="[object Error]",$H="[object Function]",zH="[object Map]",PH="[object Number]",qH="[object Object]",UH="[object RegExp]",HH="[object Set]",WH="[object String]",GH="[object WeakMap]",YH="[object ArrayBuffer]",KH="[object DataView]",VH="[object Float32Array]",XH="[object Float64Array]",ZH="[object Int8Array]",QH="[object Int16Array]",JH="[object Int32Array]",tW="[object Uint8Array]",eW="[object Uint8ClampedArray]",iW="[object Uint16Array]",rW="[object Uint32Array]",Mi={};Mi[VH]=Mi[XH]=Mi[ZH]=Mi[QH]=Mi[JH]=Mi[tW]=Mi[eW]=Mi[iW]=Mi[rW]=!0;Mi[RH]=Mi[DH]=Mi[YH]=Mi[jH]=Mi[KH]=Mi[FH]=Mi[IH]=Mi[$H]=Mi[zH]=Mi[PH]=Mi[qH]=Mi[UH]=Mi[HH]=Mi[WH]=Mi[GH]=!1;function nW(i){return Sh(i)&&PO(i.length)&&!!Mi[Wl(i)]}function aW(i){return function(e){return i(e)}}var HO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,od=HO&&typeof module=="object"&&module&&!module.nodeType&&module,sW=od&&od.exports===HO,Vb=sW&&DO.process,kT=(function(){try{var i=od&&od.require&&od.require("util").types;return i||Vb&&Vb.binding&&Vb.binding("util")}catch{}})(),wT=kT&&kT.isTypedArray,p_=wT?aW(wT):nW;function kv(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}var oW=Object.prototype,lW=oW.hasOwnProperty;function cW(i,e,r){var n=i[e];(!(lW.call(i,e)&&om(n,r))||r===void 0&&!(e in i))&&d_(i,e,r)}function hW(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?d_(r,h,u):cW(r,h,u)}return r}function uW(i,e){for(var r=-1,n=Array(i);++r<i;)n[r]=e(r);return n}var dW=9007199254740991,fW=/^(?:0|[1-9]\d*)$/;function WO(i,e){var r=typeof i;return e=e??dW,!!e&&(r=="number"||r!="symbol"&&fW.test(i))&&i>-1&&i%1==0&&i<e}var pW=Object.prototype,gW=pW.hasOwnProperty;function mW(i,e){var r=Ag(i),n=!r&&Ng(i),a=!r&&!n&&f_(i),o=!r&&!n&&!a&&p_(i),c=r||n||a||o,h=c?uW(i.length,String):[],u=h.length;for(var d in i)(e||gW.call(i,d))&&!(c&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||WO(d,u)))&&h.push(d);return h}function yW(i){var e=[];if(i!=null)for(var r in Object(i))e.push(r);return e}var bW=Object.prototype,xW=bW.hasOwnProperty;function vW(i){if(!ka(i))return yW(i);var e=hm(i),r=[];for(var n in i)n=="constructor"&&(e||!xW.call(i,n))||r.push(n);return r}function GO(i){return um(i)?mW(i,!0):vW(i)}function _W(i){return hW(i,GO(i))}function CW(i,e,r,n,a,o,c){var h=kv(i,r),u=kv(e,r),d=c.get(u);if(d){Cv(i,r,d);return}var f=o?o(h,u,r+"",i,e,c):void 0,g=f===void 0;if(g){var x=Ag(u),y=!x&&f_(u),v=!x&&!y&&p_(u);f=u,x||y||v?Ag(h)?f=h:wH(h)?f=mH(h):y?(g=!1,f=fH(u,!0)):v?(g=!1,f=gH(u,!0)):f=[]:OH(u)||Ng(u)?(f=h,Ng(h)?f=_W(h):(!ka(h)||u_(h))&&(f=xH(u))):g=!1}g&&(c.set(u,f),a(f,u,n,o,c),c.delete(u)),Cv(i,r,f)}function YO(i,e,r,n,a){i!==e&&uH(e,function(o,c){if(a||(a=new wh),ka(o))CW(i,e,c,r,YO,n,a);else{var h=n?n(kv(i,c),o,c+"",i,e,a):void 0;h===void 0&&(h=o),Cv(i,c,h)}},GO)}function KO(i){return i}function kW(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 ST=Math.max;function wW(i,e,r){return e=ST(e===void 0?i.length-1:e,0),function(){for(var n=arguments,a=-1,o=ST(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),kW(i,this,h)}}function SW(i){return function(){return i}}var TW=Eg?function(i,e){return Eg(i,"toString",{configurable:!0,enumerable:!1,value:SW(e),writable:!0})}:KO,EW=800,NW=16,AW=Date.now;function MW(i){var e=0,r=0;return function(){var n=AW(),a=NW-(n-r);if(r=n,a>0){if(++e>=EW)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}var BW=MW(TW);function LW(i,e){return BW(wW(i,e,KO),i+"")}function OW(i,e,r){if(!ka(r))return!1;var n=typeof e;return(n=="number"?um(r)&&WO(e,r.length):n=="string"&&e in r)?om(r[e],i):!1}function RW(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&&OW(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 DW=RW(function(i,e,r){YO(i,e,r)}),jW="",FW={curveBasis:sv,curveBasisClosed:D9,curveBasisOpen:j9,curveBumpX:RB,curveBumpY:DB,curveBundle:F9,curveCardinalClosed:I9,curveCardinalOpen:$9,curveCardinal:$B,curveCatmullRomClosed:z9,curveCatmullRomOpen:P9,curveCatmullRom:PB,curveLinear:sd,curveLinearClosed:q9,curveMonotoneX:YB,curveMonotoneY:KB,curveNatural:XB,curveStep:ZB,curveStepAfter:JB,curveStepBefore:QB},IW=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,$W=L(function(i,e){const r=VO(i,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const c=r.map(h=>h.args);sg(c),n=mr(n,[...c])}else n=r.args;if(!n)return;let a=D1(i,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),VO=L(function(i,e=null){var r,n;try{const a=new RegExp(`[%]{2}(?![{]${IW.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=nd.exec(i))!==null;)if(o.index===nd.lastIndex&&nd.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"),zW=L(function(i){return i.replace(nd,"")},"removeDirectives"),PW=L(function(i,e){for(const[r,n]of e.entries())if(n.match(i))return r;return-1},"isSubstringInArray");function g_(i,e){if(!i)return e;const r=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return FW[r]??e}L(g_,"interpolateToCurve");function XO(i,e){const r=i.trim();if(r)return e.securityLevel!=="loose"?oU.sanitizeUrl(r):r}L(XO,"formatUrl");var qW=L((i,...e)=>{const r=i.split("."),n=r.length-1,a=r[n];let o=window;for(let c=0;c<n;c++)if(o=o[r[c]],!o){Nt.error(`Function name: ${i} not found in window`);return}o[a](...e)},"runFunc");function m_(i,e){return!i||!e?0:Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}L(m_,"distance");function ZO(i){let e,r=0;i.forEach(a=>{r+=m_(a,e),e=a});const n=r/2;return y_(i,n)}L(ZO,"traverseEdge");function QO(i){return i.length===1?i[0]:ZO(i)}L(QO,"calcLabelPosition");var TT=L((i,e=2)=>{const r=Math.pow(10,e);return Math.round(i*r)/r},"roundNumber"),y_=L((i,e)=>{let r,n=e;for(const a of i){if(r){const o=m_(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:TT((1-c)*r.x+c*a.x,5),y:TT((1-c)*r.y+c*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),UW=L((i,e,r)=>{Nt.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const a=y_(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 JO(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=y_(n,a),c=10+i*.5,h=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*c+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(h)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2-5):(u.x=Math.sin(h)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2),u}L(JO,"calcTerminalLabelPosition");function tR(i){let e="",r="";for(const n of i)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}L(tR,"getStylesFromArray");var ET=0,HW=L(()=>(ET++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ET),"generateId");function eR(i){let e="";const r="0123456789abcdef",n=r.length;for(let a=0;a<i;a++)e+=r.charAt(Math.floor(Math.random()*n));return e}L(eR,"makeRandomHex");var WW=L(i=>eR(i.length),"random"),GW=L(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),YW=L(function(i,e){const r=e.text.replace(zd.lineBreakRegex," "),[,n]=dm(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"),KW=Wd((i,e,r)=>{if(!i||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),zd.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}=VW(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}`),VW=Wd((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 iR(i,e){return b_(i,e).height}L(iR,"calculateTextHeight");function js(i,e){return b_(i,e).width}L(js,"calculateTextWidth");var b_=Wd((i,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!i)return{width:0,height:0};const[,o]=dm(r),c=["sans-serif",n],h=i.split(zd.lineBreakRegex),u=[],d=ue("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 _ of h){const C=GW();C.text=_||jW;const k=YW(f,C).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}`),ph,XW=(ph=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},L(ph,"InitIDGenerator"),ph),vp,ZW=L(function(i){return vp=vp||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),vp.innerHTML=i,unescape(vp.textContent)},"entityDecode");function x_(i){return"str"in i}L(x_,"isDetailedError");var QW=L((i,e,r,n)=>{var o;if(!n)return;const a=(o=i.node())==null?void 0:o.getBBox();a&&i.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),dm=L(i=>{if(typeof i=="number")return[i,i+"px"];const e=parseInt(i??"",10);return Number.isNaN(e)?[void 0,void 0]:i===String(e)?[e,i+"px"]:[e,i]},"parseFontSize");function v_(i,e){return DW({},i,e)}L(v_,"cleanAndMerge");var ba={assignWithDepth:mr,wrapLabel:KW,calculateTextHeight:iR,calculateTextWidth:js,calculateTextDimensions:b_,cleanAndMerge:v_,detectInit:$W,detectDirective:VO,isSubstringInArray:PW,interpolateToCurve:g_,calcLabelPosition:QO,calcCardinalityPosition:UW,calcTerminalLabelPosition:JO,formatUrl:XO,getStylesFromArray:tR,generateId:HW,random:WW,runFunc:qW,entityDecode:ZW,insertTitle:QW,isLabelCoordinateInPath:rR,parseFontSize:dm,InitIDGenerator:XW},JW=L(function(i){let e=i;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),zl=L(function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),zot=L((i,e,{counter:r=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${i}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function Cr(i){return i??null}L(Cr,"handleUndefinedAttr");function rR(i,e){const r=Math.round(i.x),n=Math.round(i.y),a=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(r.toString())||a.includes(n.toString())}L(rR,"isLabelCoordinateInPath");var __=L(({flowchart:i})=>{var a,o;const e=((a=i==null?void 0:i.subGraphTitleMargin)==null?void 0:a.top)??0,r=((o=i==null?void 0:i.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");async function nR(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=ii().fontSize?ii().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[d=WM.fontSize]=dm(h),f=d*u+"px";a.style.minWidth=f,a.style.maxWidth=f}else a.style.width="100%";o(a)}L(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}L(nR,"configureLabelImages");var tG=L(i=>{const{handDrawnSeed:e}=ii();return{fill:i,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:i,seed:e}},"solidStateFill"),Th=L(i=>{const e=eG([...i.cssCompiledStyles||[],...i.cssStyles||[],...i.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),eG=L(i=>{const e=new Map;return i.forEach(r=>{const[n,a]=r.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),aR=L(i=>i==="color"||i==="font-size"||i==="font-family"||i==="font-weight"||i==="font-style"||i==="text-decoration"||i==="text-align"||i==="text-transform"||i==="line-height"||i==="letter-spacing"||i==="word-spacing"||i==="text-shadow"||i==="text-overflow"||i==="white-space"||i==="word-wrap"||i==="word-break"||i==="overflow-wrap"||i==="hyphens","isLabelStyle"),Qt=L(i=>{const{stylesArray:e}=Th(i),r=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];aR(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"),Zt=L((i,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=ii(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:c}=Th(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:iG(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),iG=L(i=>{if(!i)return[0,0];const e=i.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray");const rG=Object.freeze({left:0,top:0,width:16,height:16}),Mg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sR=Object.freeze({...rG,...Mg}),nG=Object.freeze({...sR,body:"",hidden:!1}),aG=Object.freeze({width:null,height:null}),sG=Object.freeze({...aG,...Mg}),oG=(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 Xb(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 Xb(h)?h:null}if(r&&n===""){const h={provider:n,prefix:"",name:o};return Xb(h,r)?h:null}return null},Xb=(i,e)=>i?!!((e&&i.prefix===""||i.prefix)&&i.name):!1;function lG(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 NT(i,e){const r=lG(i,e);for(const n in nG)n in Mg?n in i&&!(n in r)&&(r[n]=Mg[n]):n in e?r[n]=e[n]:n in i&&(r[n]=i[n]);return r}function cG(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 AT(i,e,r){const n=i.icons,a=i.aliases||Object.create(null);let o={};function c(h){o=NT(n[h]||a[h],o)}return c(e),r.forEach(c),NT(i,o)}function hG(i,e){if(i.icons[e])return AT(i,e,[]);const r=cG(i,[e])[e];return r?AT(i,e,r):null}const uG=/(-?[0-9.]*[0-9]+[0-9.]*)/g,dG=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function MT(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(uG);if(n===null||!n.length)return i;const a=[];let o=n.shift(),c=dG.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 fG(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 pG(i,e){return i?"<defs>"+i+"</defs>"+e:e}function gG(i,e,r){const n=fG(i);return pG(n.defs,e+n.content+r)}const mG=i=>i==="unset"||i==="undefined"||i==="none";function yG(i,e){const r={...sR,...i},n={...sG,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(_=>{const C=[],k=_.hFlip,T=_.vFlip;let E=_.rotate;k?T?E+=2:(C.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),C.push("scale(-1 1)"),a.top=a.left=0):T&&(C.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),C.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,C.unshift("rotate(90 "+N.toString()+" "+N.toString()+")");break;case 2:C.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:N=a.width/2+a.left,C.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)),C.length&&(o=gG(o,'<g transform="'+C.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=MT(g,u/d)):(f=c==="auto"?u:c,g=h===null?MT(f,d/u):h==="auto"?d:h);const x={},y=(_,C)=>{mG(C)||(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 bG=/\sid="(\S+)"/g,BT=new Map;function xG(i){i=i.replace(/[0-9]+$/,"")||"a";const e=BT.get(i)||0;return BT.set(i,e+1),e?`${i}${e}`:i}function vG(i){const e=[];let r;for(;r=bG.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=xG(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 _G(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 C_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Kl=C_();function oR(i){Kl=i}var ld={exec:()=>null};function ri(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 CG=(()=>{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")},kG=/^(?:[ \t]*(?:\n|$))+/,wG=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,SG=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,TG=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,k_=/(?:[*+-]|\d{1,9}[.)])/,lR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cR=ri(lR).replace(/bull/g,k_).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(),EG=ri(lR).replace(/bull/g,k_).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(),w_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,NG=/^[^\n]+/,S_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,AG=ri(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",S_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),MG=ri(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,k_).getRegex(),fm="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",T_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,BG=ri("^ {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",T_).replace("tag",fm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),hR=ri(w_).replace("hr",Gd).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",fm).getRegex(),LG=ri(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",hR).getRegex(),E_={blockquote:LG,code:wG,def:AG,fences:SG,heading:TG,hr:Gd,html:BG,lheading:cR,list:MG,newline:kG,paragraph:hR,table:ld,text:NG},LT=ri("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gd).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",fm).getRegex(),OG={...E_,lheading:EG,table:LT,paragraph:ri(w_).replace("hr",Gd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",LT).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",fm).getRegex()},RG={...E_,html:ri(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",T_).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:ld,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ri(w_).replace("hr",Gd).replace("heading",` *#{1,6} *[^
|
|
264
|
+
]`).replace("lheading",cR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},DG=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jG=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,uR=/^( {2,}|\\)\n(?!\s*$)/,FG=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pm=/[\p{P}\p{S}]/u,N_=/[\s\p{P}\p{S}]/u,dR=/[^\s\p{P}\p{S}]/u,IG=ri(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,N_).getRegex(),fR=/(?!~)[\p{P}\p{S}]/u,$G=/(?!~)[\s\p{P}\p{S}]/u,zG=/(?:[^\s\p{P}\p{S}]|~)/u,PG=ri(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",CG?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,qG=ri(pR,"u").replace(/punct/g,pm).getRegex(),UG=ri(pR,"u").replace(/punct/g,fR).getRegex(),gR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",HG=ri(gR,"gu").replace(/notPunctSpace/g,dR).replace(/punctSpace/g,N_).replace(/punct/g,pm).getRegex(),WG=ri(gR,"gu").replace(/notPunctSpace/g,zG).replace(/punctSpace/g,$G).replace(/punct/g,fR).getRegex(),GG=ri("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,dR).replace(/punctSpace/g,N_).replace(/punct/g,pm).getRegex(),YG=ri(/\\(punct)/,"gu").replace(/punct/g,pm).getRegex(),KG=ri(/^<(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(),VG=ri(T_).replace("(?:-->|$)","-->").getRegex(),XG=ri("^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",VG).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bg=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ZG=ri(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mR=ri(/^!?\[(label)\]\[(ref)\]/).replace("label",Bg).replace("ref",S_).getRegex(),yR=ri(/^!?\[(ref)\](?:\[\])?/).replace("ref",S_).getRegex(),QG=ri("reflink|nolink(?!\\()","g").replace("reflink",mR).replace("nolink",yR).getRegex(),OT=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,A_={_backpedal:ld,anyPunctuation:YG,autolink:KG,blockSkip:PG,br:uR,code:jG,del:ld,emStrongLDelim:qG,emStrongRDelimAst:HG,emStrongRDelimUnd:GG,escape:DG,link:ZG,nolink:yR,punctuation:IG,reflink:mR,reflinkSearch:QG,tag:XG,text:FG,url:ld},JG={...A_,link:ri(/^!?\[(label)\]\((.*?)\)/).replace("label",Bg).getRegex(),reflink:ri(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bg).getRegex()},wv={...A_,emStrongRDelimAst:WG,emStrongLDelim:UG,url:ri(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",OT).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:ri(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",OT).getRegex()},tY={...wv,br:ri(uR).replace("{2,}","*").getRegex(),text:ri(wv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},_p={normal:E_,gfm:OG,pedantic:RG},Eu={normal:A_,gfm:wv,breaks:tY,pedantic:JG},eY={"&":"&","<":"<",">":">",'"':""","'":"'"},RT=i=>eY[i];function Da(i,e){if(e){if(en.escapeTest.test(i))return i.replace(en.escapeReplace,RT)}else if(en.escapeTestNoEncode.test(i))return i.replace(en.escapeReplaceNoEncode,RT);return i}function DT(i){try{i=encodeURI(i).replace(en.percentDecode,"%")}catch{return null}return i}function jT(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 Nu(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 iY(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 FT(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 rY(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 Lg=class{constructor(e){ae(this,"options");ae(this,"rules");ae(this,"lexer");this.options=e||Kl}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:Nu(n,`
|
|
267
|
+
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],a=rY(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=Nu(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:Nu(r[0],`
|
|
268
|
+
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Nu(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,_=v.raw+`
|
|
275
|
+
`+n.join(`
|
|
276
|
+
`),C=this.blockquote(_);c[c.length-1]=C,a=a.substring(0,a.length-v.raw.length)+C.raw,o=o.substring(0,o.length-v.text.length)+C.text;break}else if((y==null?void 0:y.type)==="list"){let v=y,_=v.raw+`
|
|
277
|
+
`+n.join(`
|
|
278
|
+
`),C=this.list(_);c[c.length-1]=C,a=a.substring(0,a.length-y.raw.length)+C.raw,o=o.substring(0,o.length-v.raw.length)+C.raw,n=_.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(),_=0;if(this.options.pedantic?(_=2,g=x.trimStart()):v?_=r[1].length+1:(_=r[2].search(this.rules.other.nonSpaceChar),_=_>4?1:_,g=x.slice(_),_+=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(_),E=this.rules.other.hrRegex(_),N=this.rules.other.fencesBeginRegex(_),B=this.rules.other.headingBeginRegex(_),O=this.rules.other.htmlBeginRegex(_);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)||B.test(y)||O.test(y)||T.test(y)||E.test(y))break;if(M.search(this.rules.other.nonSpaceChar)>=_||!y.trim())g+=`
|
|
284
|
+
`+M.slice(_);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(x)||B.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(_)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(h=!0));let C=null,k;this.options.gfm&&(C=this.rules.other.listIsTask.exec(g),C&&(k=C[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!C,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=jT(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(jT(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=Nu(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=iY(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)),FT(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 FT(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 Sv{constructor(e){ae(this,"tokens");ae(this,"options");ae(this,"state");ae(this,"tokenizer");ae(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Kl,this.options.tokenizer=this.options.tokenizer||new Lg,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:_p.normal,inline:Eu.normal};this.options.pedantic?(r.block=_p.pedantic,r.inline=Eu.pedantic):this.options.gfm&&(r.block=_p.gfm,this.options.breaks?r.inline=Eu.breaks:r.inline=Eu.gfm),this.tokenizer.rules=r}static get rules(){return{block:_p,inline:Eu}}static lex(e,r){return new Sv(r).lex(e)}static lexInline(e,r){return new Sv(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(_=>(y=_.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 _=r.at(-1);y.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=y.raw,_.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 _=1/0,C=e.slice(1),k;this.options.extensions.startInline.forEach(T=>{k=T.call({lexer:this},C),typeof k=="number"&&k>=0&&(_=Math.min(_,k))}),_<1/0&&_>=0&&(v=e.substring(0,_+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 _=r.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=y.raw,_.text+=y.text):r.push(y);continue}if(e){let _="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return r}},Og=class{constructor(e){ae(this,"options");ae(this,"parser");this.options=e||Kl}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=DT(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=DT(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)}},M_=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 Tv{constructor(e){ae(this,"options");ae(this,"renderer");ae(this,"textRenderer");this.options=e||Kl,this.options.renderer=this.options.renderer||new Og,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new M_}static parse(e,r){return new Tv(r).parse(e)}static parseInline(e,r){return new Tv(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}},Fp,Xu=(Fp=class{constructor(e){ae(this,"options");ae(this,"block");this.options=e||Kl}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}},ae(Fp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ae(Fp,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Fp),nY=class{constructor(...e){ae(this,"defaults",C_());ae(this,"options",this.setOptions);ae(this,"parse",this.parseMarkdown(!0));ae(this,"parseInline",this.parseMarkdown(!1));ae(this,"Parser",ma);ae(this,"Renderer",Og);ae(this,"TextRenderer",M_);ae(this,"Lexer",ga);ae(this,"Tokenizer",Lg);ae(this,"Hooks",Xu);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 Og(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 Lg(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 Xu;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];Xu.passThroughHooks.has(c)?o[h]=f=>{if(this.defaults.async&&Xu.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}}},Pl=new nY;function hi(i,e){return Pl.parse(i,e)}hi.options=hi.setOptions=function(i){return Pl.setOptions(i),hi.defaults=Pl.defaults,oR(hi.defaults),hi};hi.getDefaults=C_;hi.defaults=Kl;hi.use=function(...i){return Pl.use(...i),hi.defaults=Pl.defaults,oR(hi.defaults),hi};hi.walkTokens=function(i,e){return Pl.walkTokens(i,e)};hi.parseInline=Pl.parseInline;hi.Parser=ma;hi.parser=ma.parse;hi.Renderer=Og;hi.TextRenderer=M_;hi.Lexer=ga;hi.lexer=ga.lex;hi.Tokenizer=Lg;hi.Hooks=Xu;hi.parse=hi;hi.options;hi.setOptions;hi.use;hi.walkTokens;hi.parseInline;ma.parse;ga.lex;function bR(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 aY={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},Ev=new Map,xR=new Map,sY=L(i=>{for(const e of i){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Nt.debug("Registering icon pack:",e.name),"loader"in e)xR.set(e.name,e.loader);else if("icons"in e)Ev.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"),vR=L(async(i,e)=>{const r=oG(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=Ev.get(n);if(!a){const c=xR.get(n);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await c(),prefix:n},Ev.set(n,a)}catch(h){throw Nt.error(h),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=hG(a,r.name);if(!o)throw new Error(`Icon not found: ${i}`);return o},"getRegisteredIconData"),oY=L(async i=>{try{return await vR(i),!0}catch{return!1}},"isIconAvailable"),Yd=L(async(i,e,r)=>{let n;try{n=await vR(i,e==null?void 0:e.fallbackPrefix)}catch(c){Nt.error(c),n=aY}const a=yG(n,e),o=_G(vG(a.body),{...a.attributes,...r});return Ca(o,qi())},"getIconSVG");function _R(i,{markdownAutoWrap:e}){const n=i.replace(/<br\/>/g,`
|
|
328
|
+
`).replace(/\n{2,}/g,`
|
|
329
|
+
`);return bR(n)}L(_R,"preprocessMarkdown");function CR(i){return i.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var r;return((r=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(n=>({content:n,type:"normal"})))??[]})}L(CR,"nonMarkdownToLines");function kR(i,e={}){const r=_R(i,e),n=hi.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 L(c,"processNode"),n.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(d=>{c(d)}):h.type==="html"?a[o].push({content:h.text,type:"normal"}):a[o].push({content:h.raw,type:"normal"})}),a}L(kR,"markdownToLines");function wR(i){return i?`<p>${i.replace(/\\n|\n/g,"<br />")}</p>`:""}L(wR,"nonMarkdownToHTML");function SR(i,{markdownAutoWrap:e}={}){const r=hi.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 L(n,"output"),r.map(n).join("")}L(SR,"markdownToHTML");function TR(i){return Intl.Segmenter?[...new Intl.Segmenter().segment(i)].map(e=>e.segment):[...i]}L(TR,"splitTextToChars");function ER(i,e){const r=TR(e.content);return B_(i,[],r,e.type)}L(ER,"splitWordToFitWidth");function B_(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}])?B_(i,c,o,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}L(B_,"splitWordToFitWidthRecursion");function NR(i,e){if(i.some(({content:r})=>r.includes(`
|
|
331
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Rg(i,e)}L(NR,"splitLineToFitWidth");function Rg(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 Rg(i,e,r,c);if(n.length>0)r.push(n),i.unshift(o);else if(o.content){const[h,u]=ER(e,o);r.push([h]),u.content&&i.unshift(u)}return Rg(i,e,r)}L(Rg,"splitLineToFitWidthRecursion");function Nv(i,e){e&&i.attr("style",e)}L(Nv,"applyStyle");var IT=16384;async function AR(i,e,r,n,a=!1,o=qi()){const c=i.append("foreignObject");c.attr("width",`${Math.min(10*r,IT)}px`),c.attr("height",`${Math.min(10*r,IT)}px`);const h=c.append("xhtml:div"),u=gd(e.label)?await tB(e.label.replace(zd.lineBreakRegex,`
|
|
332
|
+
`),o):Ca(e.label,o),d=e.isNode?"nodeLabel":"edgeLabel",f=h.append("span");f.html(u),Nv(f,e.labelStyle),f.attr("class",`${d} ${n}`),Nv(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===r&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px"),g=h.node().getBoundingClientRect()),c.node()}L(AR,"addHtmlSpan");function gm(i,e,r,n=!1){const a=i.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return n&&a.attr("text-anchor","middle"),a}L(gm,"createTspan");function MR(i,e,r){const n=i.append("text"),a=gm(n,1,e);mm(a,r);const o=a.node().getComputedTextLength();return n.remove(),o}L(MR,"computeWidthOfText");function lY(i,e,r){var c;const n=i.append("text"),a=gm(n,1,e);mm(a,[{content:r,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}L(lY,"computeDimensionOfText");function BR(i,e,r,n=!1,a=!1){const c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");a&&u.attr("text-anchor","middle");let d=0;for(const f of r){const g=L(y=>MR(c,1.1,y)<=i,"checkWidth"),x=g(f)?[f]:NR(f,g);for(const y of x){const v=gm(u,d,1.1,a);mm(v,y),d++}}if(n){const f=u.node().getBBox(),g=2;return h.attr("x",f.x-g).attr("y",f.y-g).attr("width",f.width+2*g).attr("height",f.height+2*g),c.node()}else return u.node()}L(BR,"createFormattedText");function Av(i){const e=/&(amp|lt|gt);/g;return i.replace(e,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}L(Av,"decodeHTMLEntities");function mm(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(Av(r.content)):a.text(" "+Av(r.content))})}L(mm,"updateTextContentAndStyles");async function LR(i,e={}){const r=[];i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(r.push((async()=>{const h=`${o}:${c}`;return await oY(h)?await Yd(h,void 0,{class:"label-icon"}):`<i class='${Ca(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(r);return i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}L(LR,"replaceIconSubstring");var $s=L(async(i,e="",{style:r="",isTitle:n=!1,classes:a="",useHtmlLabels:o=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:d=!1}={},f)=>{if(Nt.debug("XYZ createText",e,r,n,a,o,h,"addSvgBackground: ",d),o){const g=c?SR(e,f):wR(e),x=await LR(zl(g),f),y=e.replace(/\\\\/g,"\\"),v={isNode:h,label:gd(e)?y:x,labelStyle:r.replace("fill:","color:")};return await AR(i,v,u,a,d,f)}else{const g=zl(e.replace(/<br\s*\/?>/g,"<br/>")),x=c?kR(g.replace("<br>","<br/>"),f):CR(g),y=BR(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:");ue(y).attr("style",v)}else{const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ue(y).select("rect").attr("style",v.replace(/background:/g,"fill:"));const _=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ue(y).select("text").attr("style",_)}return n?ue(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ue(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function Zb(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 cY(i,e){return i[0]===e[0]&&i[1]===e[1]}function hY(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)Zb(d,h,a);const u=(function(d,f,g){const x=[];for(const T of d){const E=[...T];cY(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],B=T[E+1];if(N[1]!==B[1]){const O=Math.min(N[1],B[1]);v.push({ymin:O,ymax:Math.max(N[1],B[1]),x:O===N[1]?N[0]:B[0],islope:(B[0]-N[0])/(B[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(;_.length||v.length;){if(v.length){let T=-1;for(let E=0;E<v.length&&!(v[E].ymin>C);E++)T=E;v.splice(0,T+1).forEach((E=>{_.push({s:C,edge:E})}))}if(_=_.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)&&_.length>1)for(let T=0;T<_.length;T+=2){const E=T+1;if(E>=_.length)break;const N=_[T].edge,B=_[E].edge;y.push([[Math.round(N.x),C],[Math.round(B.x),C]])}C+=g,_.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)Zb(d,h,-a);(function(d,f,g){const x=[];d.forEach((y=>x.push(...y))),Zb(x,f,g)})(u,h,-a)}return u}function Kd(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),hY(i,a,n,o||1)}let L_=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Kd(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 ym(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 uY=class extends L_{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const a=Kd(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)ym([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)}}},dY=class extends L_{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}},fY=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=Kd(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=ym(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 _=y+g+v*a,C=x-c+2*Math.random()*c,k=_-c+2*Math.random()*c,T=this.helper.ellipse(C,k,o,o,r);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}},pY=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=Kd(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=ym(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),_=v+n,C=[f[0]+v*Math.cos(x)+d*Math.cos(x),f[1]+v*Math.sin(x)+d*Math.sin(x)],k=[f[0]+_*Math.cos(x)+d*Math.cos(x),f[1]+_*Math.sin(x)+d*Math.sin(x)];o.push(...this.helper.doubleLineOps(C[0],C[1],k[0],k[1],r))}})),o}},gY=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=Kd(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=ym(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)),_=[u[0]+x*Math.cos(f),u[1]+x*Math.sin(f)],C=[u[0]+y*Math.cos(f),u[1]+y*Math.sin(f)],k=[_[0]+v*Math.cos(f+Math.PI/4),_[1]+v*Math.sin(f+Math.PI/4)];a.push(...this.helper.doubleLineOps(_[0],_[1],k[0],k[1],n),...this.helper.doubleLineOps(k[0],k[1],C[0],C[1],n))}})),a}};const gn={};let mY=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 yY=0,Qb=1,$T=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 Jb(i,e){return i.type===e}function O_(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:yY,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:Qb,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:$T,text:""},h})(i);let n="BOD",a=0,o=r[a];for(;!Jb(o,$T);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return O_("M0,0"+i);a++,c=Cp[o.text],n=o.text}else Jb(o,Qb)?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(!Jb(d,Qb))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 OR(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 RR(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 _=n+2*(y-n)/3,C=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,_=n+2*(g-n)/3,C=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],_=f[4],C=f[5],k=f[6];g===0||x===0?(e.push({key:"C",data:[n,a,C,k,C,k]}),n=C,a=k):(n!==C||a!==k)&&(DR(n,a,C,k,g,x,y,v,_).forEach((function(T){e.push({key:"C",data:T})})),n=C,a=k);break}case"Z":e.push({key:"Z",data:[]}),n=o,a=c}r=d}return e}function Au(i,e,r){return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function DR(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,_=0,C=0;if(d)[y,v,_,C]=d;else{[i,e]=Au(i,e,-f),[r,n]=Au(r,n,-f);const K=(i-r)/2,$=(e-n)/2;let H=K*K/(a*a)+$*$/(o*o);H>1&&(H=Math.sqrt(H),a*=H,o*=H);const j=a*a,q=o*o,G=j*q-j*$*$-q*K*K,et=j*$*$+q*K*K,at=(h===u?-1:1)*Math.sqrt(Math.abs(G/et));_=at*a*$/o+(i+r)/2,C=at*-o*K/a+(e+n)/2,y=Math.asin(parseFloat(((e-C)/o).toFixed(9))),v=Math.asin(parseFloat(((n-C)/o).toFixed(9))),i<_&&(y=Math.PI-y),r<_&&(v=Math.PI-v),y<0&&(y=2*Math.PI+y),v<0&&(v=2*Math.PI+v),u&&y>v&&(y-=2*Math.PI),!u&&v>y&&(v-=2*Math.PI)}let k=v-y;if(Math.abs(k)>120*Math.PI/180){const K=v,$=r,H=n;v=u&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=DR(r=_+a*Math.cos(v),n=C+o*Math.sin(v),$,H,a,o,c,0,u,[v,K,_,C])}k=v-y;const T=Math.cos(y),E=Math.sin(y),N=Math.cos(v),B=Math.sin(v),O=Math.tan(k/4),A=4/3*a*O,M=4/3*o*O,F=[i,e],D=[i+A*E,e-M*T],z=[r+A*B,n-M*N],U=[r,n];if(D[0]=2*F[0]-D[0],D[1]=2*F[1]-D[1],d)return[D,z,U].concat(x);{x=[D,z,U].concat(x);const K=[];for(let $=0;$<x.length;$+=3){const H=Au(x[$][0],x[$][1],f),j=Au(x[$+1][0],x[$+1][1],f),q=Au(x[$+2][0],x[$+2][1],f);K.push([H[0],H[1],j[0],j[1],q[0],q[1]])}return K}}const bY={randOffset:function(i,e){return be(i,e)},randOffsetWithRange:function(i,e,r){return Dg(i,e,r)},ellipse:function(i,e,r,n,a){const o=FR(r,n,a);return Mv(i,e,a,o).opset},doubleLineOps:function(i,e,r,n,a){return Io(i,e,r,n,a,!0)}};function jR(i,e,r,n,a){return{type:"path",ops:Io(i,e,r,n,a)}}function Vp(i,e,r){const n=(i||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...Io(i[o][0],i[o][1],i[o+1][0],i[o+1][1],r));return e&&a.push(...Io(i[n-1][0],i[n-1][1],i[0][0],i[0][1],r)),{type:"path",ops:a}}return n===2?jR(i[0][0],i[0][1],i[1][0],i[1][1],r):{type:"path",ops:[]}}function xY(i,e,r,n,a){return(function(o,c){return Vp(o,!0,c)})([[i,e],[i+r,e],[i+r,e+n],[i,e+n]],a)}function zT(i,e){if(i.length){const r=typeof i[0][0]=="number"?[i]:i,n=kp(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:kp(r[0],1.5*(1+.22*e.roughness),UT(e));for(let o=1;o<r.length;o++){const c=r[o];if(c.length){const h=kp(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:kp(c,1.5*(1+.22*e.roughness),UT(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 FR(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+=be(c*u,r),h+=be(h*u,r),{increment:o,rx:c,ry:h}}function Mv(i,e,r,n){const[a,o]=HT(n.increment,i,e,n.rx,n.ry,1,n.increment*Dg(.1,Dg(.4,1,r),r),r);let c=jg(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[h]=HT(n.increment,i,e,n.rx,n.ry,1.5,0,r),u=jg(h,null,r);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function PT(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+=be(.01*g,u),x+=be(.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 _=2*Math.PI/u.curveStepCount,C=Math.min(_/2,(v-y)/2),k=WT(C,d,f,g,x,y,v,1,u);if(!u.disableMultiStroke){const T=WT(C,d,f,g,x,y,v,1.5,u);k.push(...T)}return c&&(h?k.push(...Io(d,f,d+g*Math.cos(y),f+x*Math.sin(y),u),...Io(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 qT(i,e){const r=RR(OR(O_(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(...Io(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(...vY(u,d,f,g,x,y,o,e)),o=[x,y];break}case"Z":n.push(...Io(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function t0(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]+be(a,e),n[0][1]+be(a,e)]});for(let c=1;c<o;c++)r.push({op:"lineTo",data:[n[c][0]+be(a,e),n[c][1]+be(a,e)]})}}return{type:"fillPath",ops:r}}function Nc(i,e){return(function(r,n){let a=r.fillStyle||"hachure";if(!gn[a])switch(a){case"zigzag":gn[a]||(gn[a]=new uY(n));break;case"cross-hatch":gn[a]||(gn[a]=new dY(n));break;case"dots":gn[a]||(gn[a]=new fY(n));break;case"dashed":gn[a]||(gn[a]=new pY(n));break;case"zigzag-line":gn[a]||(gn[a]=new gY(n));break;default:a="hachure",gn[a]||(gn[a]=new L_(n))}return gn[a]})(e,bY).fillPolygons(i,e)}function UT(i){const e=Object.assign({},i);return e.randomizer=void 0,i.seed&&(e.seed=i.seed+1),e}function IR(i){return i.randomizer||(i.randomizer=new mY(i.seed||0)),i.randomizer.next()}function Dg(i,e,r,n=1){return r.roughness*n*(IR(r)*(e-i)+i)}function be(i,e,r=1){return Dg(-i,i,e,r)}function Io(i,e,r,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=Bv(i,e,r,n,a,!0,!1);if(c)return h;const u=Bv(i,e,r,n,a,!0,!0);return h.concat(u)}function Bv(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*IR(a);let y=a.bowing*a.maxRandomnessOffset*(n-e)/200,v=a.bowing*a.maxRandomnessOffset*(i-r)/200;y=be(y,a,d),v=be(v,a,d);const _=[],C=()=>be(g,a,d),k=()=>be(f,a,d),T=a.preserveVertices;return c?_.push({op:"move",data:[i+(T?0:C()),e+(T?0:C())]}):_.push({op:"move",data:[i+(T?0:be(f,a,d)),e+(T?0:be(f,a,d))]}),c?_.push({op:"bcurveTo",data:[y+i+(r-i)*x+C(),v+e+(n-e)*x+C(),y+i+2*(r-i)*x+C(),v+e+2*(n-e)*x+C(),r+(T?0:C()),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())]}),_}function kp(i,e,r){if(!i.length)return[];const n=[];n.push([i[0][0]+be(e,r),i[0][1]+be(e,r)]),n.push([i[0][0]+be(e,r),i[0][1]+be(e,r)]);for(let a=1;a<i.length;a++)n.push([i[a][0]+be(e,r),i[a][1]+be(e,r)]),a===i.length-1&&n.push([i[a][0]+be(e,r),i[a][1]+be(e,r)]);return jg(n,null,r)}function jg(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(...Bv(i[0][0],i[0][1],i[1][0],i[1][1],r,!0,!0));return a}function HT(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=be(.5,h)-Math.PI/2;d.push([be(o,h)+e+.9*n*Math.cos(f-i),be(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=[be(o,h)+e+n*Math.cos(x),be(o,h)+r+a*Math.sin(x)];u.push(y),d.push(y)}d.push([be(o,h)+e+n*Math.cos(f+2*Math.PI+.5*c),be(o,h)+r+a*Math.sin(f+2*Math.PI+.5*c)]),d.push([be(o,h)+e+.98*n*Math.cos(f+c),be(o,h)+r+.98*a*Math.sin(f+c)]),d.push([be(o,h)+e+.9*n*Math.cos(f+.5*c),be(o,h)+r+.9*a*Math.sin(f+.5*c)])}return[d,u]}function WT(i,e,r,n,a,o,c,h,u){const d=o+be(.1,u),f=[];f.push([be(h,u)+e+.9*n*Math.cos(d-i),be(h,u)+r+.9*a*Math.sin(d-i)]);for(let g=d;g<=c;g+=i)f.push([be(h,u)+e+n*Math.cos(g),be(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)]),jg(f,null,u)}function vY(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:be(d[0],h)),c[1]+(x?0:be(d[0],h))]}),f=x?[a,o]:[a+be(d[y],h),o+be(d[y],h)],u.push({op:"bcurveTo",data:[i+be(d[y],h),e+be(d[y],h),r+be(d[y],h),n+be(d[y],h),f[0],f[1]]});return u}function Mu(i){return[...i]}function GT(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(Mu(i[0]),Mu(i[1]),Mu(i[2]),Mu(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(Mu(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 Xp(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)}function _Y(i,e,r){const n=Xp(e,r);if(n===0)return Xp(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)),Xp(i,dl(e,r,a))}function dl(i,e,r){return[i[0]+(e[0]-i[0])*r,i[1]+(e[1]-i[1])*r]}function Lv(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 _=3*g[0]-2*x[0]-d[0];_*=_;let C=3*g[1]-2*x[1]-d[1];return C*=C,y<_&&(y=_),v<C&&(v=C),y+v})(i,e)<r){const h=i[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(Xp(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=dl(u,d,.5),y=dl(d,f,.5),v=dl(f,g,.5),_=dl(x,y,.5),C=dl(y,v,.5),k=dl(_,C,.5);Lv([u,x,_,k],0,r,a),Lv([k,C,v,g],0,r,a)}var o,c;return a}function CY(i,e){return Fg(i,0,i.length,e)}function Fg(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=_Y(i[f],c,h);g>u&&(u=g,d=f)}return Math.sqrt(u)>n?(Fg(i,e,d+1,n,o),Fg(i,d,r,n,o)):(o.length||o.push(c),o.push(h)),o}function e0(i,e=.15,r){const n=[],a=(i.length-1)/3;for(let o=0;o<a;o++)Lv(i,3*o,e,n);return r&&r>0?Fg(n,0,n.length,r):n}const Rn="none";class Ig{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",[jR(e,r,n,a,c)],c)}rectangle(e,r,n,a,o){const c=this._o(o),h=[],u=xY(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(t0([d],c)):h.push(Nc([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=FR(n,a,c),d=Mv(e,r,c,u);if(c.fill)if(c.fillStyle==="solid"){const f=Mv(e,r,c,u).opset;f.type="fillPath",h.push(f)}else h.push(Nc([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",[Vp(e,!1,n)],n)}arc(e,r,n,a,o,c,h=!1,u){const d=this._o(u),f=[],g=PT(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=PT(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 B=Math.abs(v/2),O=Math.abs(_/2);B+=be(.01*B,T),O+=be(.01*O,T);let A=C,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 F=(M-A)/T.curveStepCount,D=[];for(let z=A;z<=M;z+=F)D.push([E+B*Math.cos(z),N+O*Math.sin(z)]);return D.push([E+B*Math.cos(M),N+O*Math.sin(M)]),D.push([E,N]),Nc([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=zT(e,n);if(n.fill&&n.fill!==Rn)if(n.fillStyle==="solid"){const c=zT(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(...e0(GT([d[0],d[0],d[1],d[2]]),10,(1+n.roughness)/2)):c.push(...e0(GT(d),10,(1+n.roughness)/2))}c.length&&a.push(Nc([c],n))}return n.stroke!==Rn&&a.push(o),this._d("curve",a,n)}polygon(e,r){const n=this._o(r),a=[],o=Vp(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(t0([e],n)):a.push(Nc([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=RR(OR(O_(f))),v=[];let _=[],C=[0,0],k=[];const T=()=>{k.length>=4&&_.push(...e0(k,g)),k=[]},E=()=>{T(),_.length&&(v.push(_),_=[])};for(const{key:B,data:O}of y)switch(B){case"M":E(),C=[O[0],O[1]],_.push(C);break;case"L":T(),_.push([O[0],O[1]]);break;case"C":if(!k.length){const A=_.length?_[_.length-1]:C;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(),_.push([C[0],C[1]])}if(E(),!x)return v;const N=[];for(const B of v){const O=CY(B,x);O.length&&N.push(O)}return N})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),d=qT(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const f=qT(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(t0(u,n));else a.push(Nc(u,n));return c&&(h?u.forEach((f=>{a.push(Vp(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 kY{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Ig(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 wp="http://www.w3.org/2000/svg";class wY{constructor(e,r){this.svg=e,this.gen=new Ig(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(wp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of r){let u=null;switch(h.type){case"path":u=a.createElementNS(wp,"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(wp,"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(wp,"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 Xt={canvas:(i,e)=>new kY(i,e),svg:(i,e)=>new wY(i,e),generator:i=>new Ig(i),newSeed:()=>Ig.newSeed()},me=L(async(i,e,r)=>{var y,v;let n;const a=e.useHtmlLabels||Fs((y=ii())==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",Cr(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,Ca(zl(h),ii()),{useHtmlLabels:a,width:e.width||((v=ii().flowchart)==null?void 0:v.wrappingWidth),classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},ii());let g=f.getBBox();const x=((e==null?void 0:e.padding)??0)/2;if(a){const _=f.children[0],C=ue(f);await nR(_,h),g=_.getBoundingClientRect(),C.attr("width",g.width),C.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"),i0=L(async(i,e,r)=>{var u,d;const n=r.useHtmlLabels??nn(ii()),a=i.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await $s(a,Ca(zl(e),ii()),{useHtmlLabels:n,width:r.width||((d=(u=ii())==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(ii())){const f=o.children[0],g=ue(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"),ee=L((i,e)=>{const r=e.node().getBBox();i.width=r.width,i.height=r.height},"updateNodeBounds"),de=L((i,e)=>(i.look==="handDrawn"?"rough-node":"node")+" "+i.cssClasses+" "+(e||""),"getNodeClasses");function Qe(i){const e=i.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}L(Qe,"createPathFromPoints");function $o(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,_=i+v*u,C=x+a*Math.sin(g*(_-i));c.push({x:_,y:C})}return c}L($o,"generateFullSineWavePoints");function Ed(i,e,r,n,a,o){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}L(Ed,"generateCirclePoints");function Ov(i){const e=Array.from(i.childNodes).filter(u=>u.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",n);const a=e.find(u=>u.getAttribute("fill")!=="none"),o=e.find(u=>u.getAttribute("stroke")!=="none"),c=L((u,d)=>(u==null?void 0:u.getAttribute(d))??void 0,"getAttr");if(a){const u={fill:c(a,"fill"),"fill-opacity":c(a,"fill-opacity")??"1"};Object.entries(u).forEach(([d,f])=>{f&&r.setAttribute(d,f)})}if(o){const u={stroke:c(o,"stroke"),"stroke-width":c(o,"stroke-width")??"1","stroke-opacity":c(o,"stroke-opacity")??"1"};Object.entries(u).forEach(([d,f])=>{f&&r.setAttribute(d,f)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(r),h}L(Ov,"mergePaths");var SY=L((i,e)=>{var r=i.x,n=i.y,a=e.x-r,o=e.y-n,c=i.width/2,h=i.height/2,u,d;return Math.abs(o)*c>Math.abs(a)*h?(o<0&&(h=-h),u=o===0?0:h*a/o,d=h):(a<0&&(c=-c),u=c,d=a===0?0:c*o/a),{x:r+u,y:n+d}},"intersectRect"),Eh=SY,TY=L(async(i,e,r,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=ii(),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=TY,qo=L((i,e,r,n,a)=>["M",i+a,e,"H",i+r-a,"A",a,a,0,0,1,i+r,e+a,"V",e+n-a,"A",a,a,0,0,1,i+r-a,e+n,"H",i+a,"A",a,a,0,0,1,i,e+n-a,"V",e+a,"A",a,a,0,0,1,i+a,e,"Z"].join(" "),"createRoundedRectPathD"),$R=L(async(i,e)=>{Nt.info("Creating subgraph rect for ",e.id,e);const r=ii(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=Qt(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 _=v.getBBox();if(nn(r)){const A=v.children[0],M=ue(v);_=A.getBoundingClientRect(),M.attr("width",_.width),M.attr("height",_.height)}const C=e.width<=_.width+e.padding?_.width+e.padding:e.width;e.width<=_.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-C/2,E=e.y-k/2;Nt.trace("Data ",e,JSON.stringify(e));let N;if(e.look==="handDrawn"){const A=Xt.svg(g),M=Zt(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),F=A.path(qo(T,E,C,k,0),M);N=g.insert(()=>(Nt.debug("Rough node insert CXC",F),F),":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",C).attr("height",k);const{subGraphTitleTopMargin:B}=__(r);if(y.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+B})`),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=_.height-e.padding/2,e.intersect=function(A){return Eh(e,A)},{cluster:g,labelBBox:_}},"rect"),EY=L((i,e)=>{const r=i.insert("g").attr("class","note-cluster").attr("id",e.domId),n=r.insert("rect",":first-child"),a=0*e.padding,o=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const c=n.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return Eh(e,h)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),NY=L(async(i,e)=>{const r=ii(),{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 F=y.children[0],D=ue(y);v=F.getBoundingClientRect(),D.attr("width",v.width),D.attr("height",v.height)}const _=0*e.padding,C=_/2,k=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+_;e.width<=v.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+_,E=e.height+_-v.height-6,N=e.x-k/2,B=e.y-T/2;e.width=k;const O=e.y-e.height/2-C+v.height+2;let A;if(e.look==="handDrawn"){const F=e.cssClasses.includes("statediagram-cluster-alt"),D=Xt.svg(d),z=e.rx||e.ry?D.path(qo(N,B,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):D.rectangle(N,B,k,T,{seed:a});A=d.insert(()=>z,":first-child");const U=D.rectangle(N,O,k,E,{fill:F?o:c,fillStyle:F?"hachure":"solid",stroke:u,seed:a});A=d.insert(()=>z,":first-child"),x=d.insert(()=>U)}else A=f.insert("rect",":first-child"),A.attr("class","outer").attr("x",N).attr("y",B).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}, ${B+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(F){return Eh(e,F)},{cluster:d,labelBBox:v}},"roundedWithTitle"),AY=L(async(i,e)=>{Nt.info("Creating subgraph rect for ",e.id,e);const r=ii(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=Qt(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 _=v.getBBox();if(nn(r)){const A=v.children[0],M=ue(v);_=A.getBoundingClientRect(),M.attr("width",_.width),M.attr("height",_.height)}const C=e.width<=_.width+e.padding?_.width+e.padding:e.width;e.width<=_.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-C/2,E=e.y-k/2;Nt.trace("Data ",e,JSON.stringify(e));let N;if(e.look==="handDrawn"){const A=Xt.svg(g),M=Zt(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),F=A.path(qo(T,E,C,k,e.rx),M);N=g.insert(()=>(Nt.debug("Rough node insert CXC",F),F),":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",C).attr("height",k);const{subGraphTitleTopMargin:B}=__(r);if(y.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+B})`),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=_.height-e.padding/2,e.intersect=function(A){return Eh(e,A)},{cluster:g,labelBBox:_}},"kanbanSection"),MY=L((i,e)=>{const r=ii(),{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 C=Xt.svg(c).rectangle(g,x,d,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});y=c.insert(()=>C,":first-child")}else{y=h.insert("rect",":first-child");let _="outer";e.look,_="divider",y.attr("class",_).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(_){return Eh(e,_)},{cluster:c,labelBBox:{}}},"divider"),BY=$R,LY={rect:$R,squareRect:BY,roundedWithTitle:NY,noteGroup:EY,divider:MY,kanbanSection:AY},zR=new Map,OY=L(async(i,e)=>{const r=e.shape||"rect",n=await LY[r](i,e);return zR.set(e.id,n),n},"insertCluster"),Jot=L(()=>{zR=new Map},"clear");function PR(i,e){return i.intersect(e)}L(PR,"intersectNode");var RY=PR;function qR(i,e,r,n){var a=i.x,o=i.y,c=a-n.x,h=o-n.y,u=Math.sqrt(e*e*h*h+r*r*c*c),d=Math.abs(e*r*c/u);n.x<a&&(d=-d);var f=Math.abs(e*r*h/u);return n.y<o&&(f=-f),{x:a+d,y:o+f}}L(qR,"intersectEllipse");var UR=qR;function HR(i,e,r){return UR(i,e,e,r)}L(HR,"intersectCircle");var DY=HR;function WR(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&&Rv(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&&Rv(y,v))return;const _=a*g-f*o;if(_===0)return;const C=Math.abs(_/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}}}L(WR,"intersectLine");function Rv(i,e){return i*e>0}L(Rv,"sameSign");var jY=WR;function GR(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=jY(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),_=g.x-r.x,C=g.y-r.y,k=Math.sqrt(_*_+C*C);return v<k?-1:v===k?0:1}),o[0]):i}L(GR,"intersectPolygon");var FY=GR,Yt={node:RY,circle:DY,ellipse:UR,polygon:FY,rect:Eh};function YR(i,e){const{labelStyles:r}=Qt(e);e.labelStyle=r;const n=de(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=Xt.svg(o),d=Zt(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",Cr(h)),ee(e,g),e.intersect=function(x){return Nt.info("Circle intersect",e,c,x),Yt.circle(e,c,x)},o}L(YR,"anchor");function Dv(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,_=Math.sqrt(y**2+v**2);if(_>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-_**2),k=u+C*o*Math.sin(f)*(c?-1:1),T=d-C*a*Math.cos(f)*(c?-1:1),E=Math.atan2((e-T)/o,(i-k)/a);let B=Math.atan2((n-T)/o,(r-k)/a)-E;c&&B<0&&(B+=2*Math.PI),!c&&B>0&&(B-=2*Math.PI);const O=[];for(let A=0;A<20;A++){const M=A/19,F=E+M*B,D=k+a*Math.cos(F),z=T+o*Math.sin(F);O.push({x:D,y:z})}return O}L(Dv,"generateArcPoints");function KR(i,e,r){const[n,a]=[e,r].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(i/n/2)**2))}L(KR,"calculateArcSagitta");async function VR(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=L(F=>F+c,"calcTotalHeight"),u=L(F=>{const D=F/2;return[D/(2.5+F/50),D]},"calcEllipseRadius"),{shapeSvg:d,bbox:f}=await me(i,e,de(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:f.height),[x,y]=u(g),v=KR(g,x,y),C=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+v-v,k=g,{cssStyles:T}=e,E=[{x:C/2,y:-k/2},{x:-C/2,y:-k/2},...Dv(-C/2,-k/2,-C/2,k/2,x,y,!1),{x:C/2,y:k/2},...Dv(C/2,k/2,C/2,-k/2,x,y,!0)],N=Xt.svg(d),B=Zt(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=Qe(E),A=N.path(O,B),M=d.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(${x/2}, 0)`),ee(e,M),e.intersect=function(F){return Yt.polygon(e,E,F)},d}L(VR,"bowTieRect");function zs(i,e,r,n){return i.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}L(zs,"insertPolygonShape");var Sp=12;async function XR(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(e)),d=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+Sp),f=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,x=d,y=-f,v=0,_=[{x:g+Sp,y},{x,y},{x,y:v},{x:g,y:v},{x:g,y:y+Sp},{x:g+Sp,y}];let C;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=Xt.svg(h),E=Zt(e,{}),N=Qe(_),B=T.path(N,E);C=h.insert(()=>B,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),k&&C.attr("style",k)}else C=zs(h,d,f,_);return n&&C.attr("style",n),ee(e,C),e.intersect=function(T){return Yt.polygon(e,_,T)},h}L(XR,"card");function ZR(i,e){const{nodeStyles:r}=Qt(e);e.label="";const n=i.insert("g").attr("class",de(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=Xt.svg(n),u=Zt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Qe(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 Yt.polygon(e,c,x)},n}L(ZR,"choice");async function R_(i,e,r){const{labelStyles:n,nodeStyles:a}=Qt(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await me(i,e,de(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=Xt.svg(o),v=Zt(e,{}),_=y.circle(0,0,f*2,v);g=o.insert(()=>_,":first-child"),g.attr("class","basic label-container").attr("style",Cr(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 ee(e,g),e.calcIntersect=function(y,v){const _=y.width/2;return Yt.circle(y,_,v)},e.intersect=function(y){return Nt.info("Circle intersect",e,f,y),Yt.circle(e,f,y)},o}L(R_,"circle");function QR(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}`}L(QR,"createLine");function JR(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r,e.label="";const a=i.insert("g").attr("class",de(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=Xt.svg(a),u=Zt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,o*2,u),f=QR(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),ee(e,x),e.intersect=function(y){return Nt.info("crossedCircle intersect",e,{radius:o,point:y}),Yt.circle(e,o,y)},a}L(JR,"crossedCircle");function Cs(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}L(Cs,"generateCirclePoints");async function t3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await me(i,e,de(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=[...Cs(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},...Cs(d/2+g*2,-g,g,20,-180,-270),...Cs(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},...Cs(d/2,f/2,g,20,0,90)],v=[{x:d/2,y:-f/2-g},{x:-d/2,y:-f/2-g},...Cs(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},...Cs(d/2+d*.1,-g,g,20,-180,-270),...Cs(d/2+d*.1,g,g,20,-90,-180),{x:-d/2-g,y:f/2},...Cs(d/2,f/2,g,20,0,90),{x:-d/2,y:f/2+g},{x:d/2,y:f/2+g}],_=Xt.svg(a),C=Zt(e,{fill:"none"});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=Qe(y).replace("Z",""),E=_.path(T,C),N=Qe(v),B=_.path(N,{...C}),O=a.insert("g",":first-child");return O.insert(()=>B,":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))})`),ee(e,O),e.intersect=function(A){return Yt.polygon(e,v,A)},a}L(t3,"curlyBraceLeft");function ks(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:y,y:v})}return c}L(ks,"generateCirclePoints");async function e3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await me(i,e,de(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}],_=Xt.svg(a),C=Zt(e,{fill:"none"});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=Qe(y).replace("Z",""),E=_.path(T,C),N=Qe(v),B=_.path(N,{...C}),O=a.insert("g",":first-child");return O.insert(()=>B,":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))})`),ee(e,O),e.intersect=function(A){return Yt.polygon(e,v,A)},a}L(e3,"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}L(Lr,"generateCirclePoints");async function i3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await me(i,e,de(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)],_=[{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)],C=Xt.svg(a),k=Zt(e,{fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=Qe(y).replace("Z",""),N=C.path(E,k),O=Qe(v).replace("Z",""),A=C.path(O,k),M=Qe(_),F=C.path(M,{...k}),D=a.insert("g",":first-child");return D.insert(()=>F,":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))})`),ee(e,D),e.intersect=function(z){return Yt.polygon(e,_,z)},a}L(i3,"curlyBraces");async function r3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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,_=Xt.svg(d),C=Zt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=g,T=x,E=k-y,N=T/4,B=[{x:E,y:0},{x:N,y:0},{x:0,y:T/2},{x:N,y:T},{x:E,y:T},...Ed(-E,-T/2,y,50,270,90)],O=Qe(B),A=_.path(O,C),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})`),ee(e,M),e.intersect=function(F){return Yt.polygon(e,B,F)},d}L(r3,"curvedTrapezoid");var IY=L((i,e,r,n,a,o)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),$Y=L((i,e,r,n,a,o)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),zY=L((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),YT=8,KT=8;async function n3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 C=e.width??0;e.width=(e.width??0)-c,e.width<KT&&(e.width=KT);const T=C/2/(2.5+C/50);e.height=(e.height??0)-o-T*3,e.height<YT&&(e.height=YT)}const{shapeSvg:h,bbox:u,label:d}=await me(i,e,de(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:_}=e;if(e.look==="handDrawn"){const C=Xt.svg(h),k=$Y(0,0,f,y,g,x),T=zY(0,x,f,y,g,x),E=Zt(e,{}),N=C.path(k,E),B=C.path(T,Zt(e,{fill:"none"}));v=h.insert(()=>B,":first-child"),v=h.insert(()=>N,":first-child"),v.attr("class","basic label-container"),_&&v.attr("style",_)}else{const C=IY(0,0,f,y,g,x);v=h.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Cr(_)).attr("style",n)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),ee(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(C){const k=Yt.rect(e,C),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,C.y-(e.y??0)>0&&(E=-E),k.y+=E}return k},h}L(n3,"cylinder");async function a3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(e)),d=h.width+a,f=h.height+o,g=f*.2,x=-d/2,y=-f/2-g/2,{cssStyles:v}=e,_=Xt.svg(c),C=Zt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.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=_.polygon(k.map(N=>[N.x,N.y]),C),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))})`),ee(e,E),e.intersect=function(N){return Yt.rect(e,N)},c}L(a3,"dividedRectangle");async function s3(i,e){var y,v;const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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 _=Xt.svg(h),C=Zt(e,{roughness:.2,strokeWidth:2.5}),k=Zt(e,{roughness:.2,strokeWidth:1.5}),T=_.circle(0,0,d*2,C),E=_.circle(0,0,f*2,k);g=h.insert("g",":first-child"),g.attr("class",Cr(e.cssClasses)).attr("style",Cr(x)),(y=g.node())==null||y.appendChild(T),(v=g.node())==null||v.appendChild(E)}else{g=h.insert("g",":first-child");const _=g.insert("circle",":first-child"),C=g.insert("circle");g.attr("class","basic label-container").attr("style",n),_.attr("class","outer-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return ee(e,g),e.intersect=function(_){return Nt.info("DoubleCircle intersect",e,d,_),Yt.circle(e,d,_)},h}L(s3,"doublecircle");function o3(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=Qt(e);e.label="",e.labelStyle=n;const o=i.insert("g").attr("class",de(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=Xt.svg(o),{nodeBorder:d}=r,f=Zt(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),ee(e,x),e.intersect=function(y){return Nt.info("filledCircle intersect",e,{radius:c,point:y}),Yt.circle(e,c,y)},o}L(o3,"filledCircle");var VT=10,XT=10;async function l3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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<VT&&(e.height=VT),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<XT&&(e.width=XT));const{shapeSvg:c,bbox:h,label:u}=await me(i,e,de(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=Xt.svg(c),_=Zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=Qe(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,ee(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),Yt.polygon(e,x,E)},c}L(l3,"flippedTriangle");function c3(i,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=Qt(e);e.label="";const c=i.insert("g").attr("class",de(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=Xt.svg(c),y=Zt(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.insert(()=>v,":first-child");h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),o&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",o),ee(e,_);const C=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=C/2||0,e.height+=C/2||0),e.intersect=function(k){return Yt.rect(e,k)},c}L(c3,"forkJoin");async function h3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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=Xt.svg(u),_=Zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{x:-f/2,y:-g/2},{x:f/2-x,y:-g/2},...Ed(-f/2+x,0,x,50,90,270),{x:f/2-x,y:g/2},{x:-f/2,y:g/2}],k=Qe(C),T=v.path(k,_),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),ee(e,E),e.intersect=function(N){return Nt.info("Pill intersect",e,{radius:x,point:N}),Yt.polygon(e,C,N)},u}L(h3,"halfRoundedRectangle");var PY=L((i,e,r,n,a)=>[`M${i+a},${e}`,`L${i+r-a},${e}`,`L${i+r},${e-n/2}`,`L${i+r-a},${e-n}`,`L${i+a},${e-n}`,`L${i},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function u3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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,_=[{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 C;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=Xt.svg(f),E=Zt(e,{}),N=PY(0,0,v,x,y),B=T.path(N,E);C=f.insert(()=>B,":first-child").attr("transform",`translate(${-v/2}, ${x/2})`),k&&C.attr("style",k)}else C=zs(f,v,x,_);return n&&C.attr("style",n),e.width=v,e.height=x,ee(e,C),e.intersect=function(T){return Yt.polygon(e,_,T)},f}L(u3,"hexagon");async function d3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await me(i,e,de(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=Xt.svg(a),d=Zt(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=Qe(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})`),ee(e,y),e.intersect=function(v){return Nt.info("Pill intersect",e,{points:f}),Yt.polygon(e,f,v)},a}L(d3,"hourglass");async function f3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Qt(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 me(i,e,"icon-shape default"),x=e.pos==="t",y=h,v=h,{nodeBorder:_}=r,{stylesMap:C}=Th(e),k=-v/2,T=-y/2,E=e.label?8:0,N=Xt.svg(d),B=Zt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=N.rectangle(k,T,v,y,B),A=Math.max(v,f.width),M=y+f.height+E,F=N.rectangle(-A/2,-M/2,A,M,{...B,fill:"transparent",stroke:"none"}),D=d.insert(()=>O,":first-child"),z=d.insert(()=>F);if(e.icon){const U=d.append("g");U.html(`<g>${await Yd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const K=U.node().getBBox(),$=K.width,H=K.height,j=K.x,q=K.y;U.attr("transform",`translate(${-$/2-j},${x?f.height/2+E/2-H/2-q:-f.height/2-E/2-H/2-q})`),U.attr("style",`color: ${C.get("stroke")??_};`)}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})`),ee(e,z),e.intersect=function(U){if(Nt.info("iconSquare intersect",e,U),!e.label)return Yt.rect(e,U);const K=e.x??0,$=e.y??0,H=e.height??0;let j=[];return x?j=[{x:K-f.width/2,y:$-H/2},{x:K+f.width/2,y:$-H/2},{x:K+f.width/2,y:$-H/2+f.height+E},{x:K+v/2,y:$-H/2+f.height+E},{x:K+v/2,y:$+H/2},{x:K-v/2,y:$+H/2},{x:K-v/2,y:$-H/2+f.height+E},{x:K-f.width/2,y:$-H/2+f.height+E}]:j=[{x:K-v/2,y:$-H/2},{x:K+v/2,y:$-H/2},{x:K+v/2,y:$-H/2+y},{x:K+f.width/2,y:$-H/2+y},{x:K+f.width/2/2,y:$+H/2},{x:K-f.width/2,y:$+H/2},{x:K-f.width/2,y:$-H/2+y},{x:K-v/2,y:$-H/2+y}],Yt.polygon(e,j,U)},d}L(f3,"icon");async function p3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Qt(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 me(i,e,"icon-shape default"),x=20,y=e.label?8:0,v=e.pos==="t",{nodeBorder:_,mainBkg:C}=r,{stylesMap:k}=Th(e),T=Xt.svg(d),E=Zt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=k.get("fill");E.stroke=N??C;const B=d.append("g");e.icon&&B.html(`<g>${await Yd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const O=B.node().getBBox(),A=O.width,M=O.height,F=O.x,D=O.y,z=Math.max(A,M)*Math.SQRT2+x*2,U=T.circle(0,0,z,E),K=Math.max(z,f.width),$=z+f.height+y,H=T.rectangle(-K/2,-$/2,K,$,{...E,fill:"transparent",stroke:"none"}),j=d.insert(()=>U,":first-child"),q=d.insert(()=>H);return B.attr("transform",`translate(${-A/2-F},${v?f.height/2+y/2-M/2-D:-f.height/2-y/2-M/2-D})`),B.attr("style",`color: ${k.get("stroke")??_};`),g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-$/2:$/2-f.height})`),j.attr("transform",`translate(0,${v?f.height/2+y/2:-f.height/2-y/2})`),ee(e,q),e.intersect=function(G){return Nt.info("iconSquare intersect",e,G),Yt.rect(e,G)},d}L(p3,"iconCircle");async function g3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Qt(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 me(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,_=h+g*2,{nodeBorder:C,mainBkg:k}=r,{stylesMap:T}=Th(e),E=-_/2,N=-v/2,B=e.label?8:0,O=Xt.svg(d),A=Zt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const F=O.path(qo(E,N,_,v,5),A),D=Math.max(_,f.width),z=v+f.height+B,U=O.rectangle(-D/2,-z/2,D,z,{...A,fill:"transparent",stroke:"none"}),K=d.insert(()=>F,":first-child").attr("class","icon-shape2"),$=d.insert(()=>U);if(e.icon){const H=d.append("g");H.html(`<g>${await Yd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=H.node().getBBox(),q=j.width,G=j.height,et=j.x,at=j.y;H.attr("transform",`translate(${-q/2-et},${y?f.height/2+B/2-G/2-at:-f.height/2-B/2-G/2-at})`),H.attr("style",`color: ${T.get("stroke")??C};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-z/2:z/2-f.height})`),K.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),ee(e,$),e.intersect=function(H){if(Nt.info("iconSquare intersect",e,H),!e.label)return Yt.rect(e,H);const j=e.x??0,q=e.y??0,G=e.height??0;let et=[];return y?et=[{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+B},{x:j+_/2,y:q-G/2+f.height+B},{x:j+_/2,y:q+G/2},{x:j-_/2,y:q+G/2},{x:j-_/2,y:q-G/2+f.height+B},{x:j-f.width/2,y:q-G/2+f.height+B}]:et=[{x:j-_/2,y:q-G/2},{x:j+_/2,y:q-G/2},{x:j+_/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-_/2,y:q-G/2+v}],Yt.polygon(e,et,H)},d}L(g3,"iconRounded");async function m3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Qt(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 me(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,_=h+g*2,{nodeBorder:C,mainBkg:k}=r,{stylesMap:T}=Th(e),E=-_/2,N=-v/2,B=e.label?8:0,O=Xt.svg(d),A=Zt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const F=O.path(qo(E,N,_,v,.1),A),D=Math.max(_,f.width),z=v+f.height+B,U=O.rectangle(-D/2,-z/2,D,z,{...A,fill:"transparent",stroke:"none"}),K=d.insert(()=>F,":first-child"),$=d.insert(()=>U);if(e.icon){const H=d.append("g");H.html(`<g>${await Yd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=H.node().getBBox(),q=j.width,G=j.height,et=j.x,at=j.y;H.attr("transform",`translate(${-q/2-et},${y?f.height/2+B/2-G/2-at:-f.height/2-B/2-G/2-at})`),H.attr("style",`color: ${T.get("stroke")??C};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-z/2:z/2-f.height})`),K.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),ee(e,$),e.intersect=function(H){if(Nt.info("iconSquare intersect",e,H),!e.label)return Yt.rect(e,H);const j=e.x??0,q=e.y??0,G=e.height??0;let et=[];return y?et=[{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+B},{x:j+_/2,y:q-G/2+f.height+B},{x:j+_/2,y:q+G/2},{x:j-_/2,y:q+G/2},{x:j-_/2,y:q-G/2+f.height+B},{x:j-f.width/2,y:q-G/2+f.height+B}]:et=[{x:j-_/2,y:q-G/2},{x:j+_/2,y:q-G/2},{x:j+_/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-_/2,y:q-G/2+v}],Yt.polygon(e,et,H)},d}L(m3,"iconSquare");async function y3(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}=Qt(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 me(i,e,"image-shape default"),v=e.pos==="t",_=-d/2,C=-f/2,k=e.label?8:0,T=Xt.svg(g),E=Zt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=T.rectangle(_,C,d,f,E),B=Math.max(d,x.width),O=f+x.height+k,A=T.rectangle(-B/2,-O/2,B,O,{...E,fill:"none",stroke:"none"}),M=g.insert(()=>N,":first-child"),F=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})`),ee(e,F),e.intersect=function(D){if(Nt.info("iconSquare intersect",e,D),!e.label)return Yt.rect(e,D);const z=e.x??0,U=e.y??0,K=e.height??0;let $=[];return v?$=[{x:z-x.width/2,y:U-K/2},{x:z+x.width/2,y:U-K/2},{x:z+x.width/2,y:U-K/2+x.height+k},{x:z+d/2,y:U-K/2+x.height+k},{x:z+d/2,y:U+K/2},{x:z-d/2,y:U+K/2},{x:z-d/2,y:U-K/2+x.height+k},{x:z-x.width/2,y:U-K/2+x.height+k}]:$=[{x:z-d/2,y:U-K/2},{x:z+d/2,y:U-K/2},{x:z+d/2,y:U-K/2+f},{x:z+x.width/2,y:U-K/2+f},{x:z+x.width/2/2,y:U+K/2},{x:z-x.width/2,y:U+K/2},{x:z-x.width/2,y:U-K/2+f},{x:z-d/2,y:U-K/2+f}],Yt.polygon(e,$,D)},g}L(y3,"imageSquare");async function b3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await me(i,e,de(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=Xt.svg(h),_=Zt(e,{}),C=Qe(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,ee(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}L(b3,"inv_trapezoid");async function Vd(i,e,r){const{labelStyles:n,nodeStyles:a}=Qt(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await me(i,e,de(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 _=Xt.svg(o),C=Zt(e,{}),k=x||y?_.path(qo(d,f,h,u,x||0),C):_.rectangle(d,f,h,u,C);g=o.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Cr(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",Cr(x)).attr("ry",Cr(y)).attr("x",d).attr("y",f).attr("width",h).attr("height",u);return ee(e,g),e.calcIntersect=function(_,C){return Yt.rect(_,C)},e.intersect=function(_){return Yt.rect(e,_)},o}L(Vd,"drawRect");async function x3(i,e){const{shapeSvg:r,bbox:n,label:a}=await me(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))})`),ee(e,o),e.intersect=function(u){return Yt.rect(e,u)},r}L(x3,"labelRect");async function v3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await me(i,e,de(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=Xt.svg(h),_=Zt(e,{}),C=Qe(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,ee(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}L(v3,"lean_left");async function _3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await me(i,e,de(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=Xt.svg(h),_=Zt(e,{}),C=Qe(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,ee(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}L(_3,"lean_right");function C3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.label="",e.labelStyle=r;const a=i.insert("g").attr("class",de(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=Xt.svg(a),g=Zt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=Qe(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})`),ee(e,v),e.intersect=function(_){return Nt.info("lightningBolt intersect",e,_),Yt.polygon(e,d,_)},a}L(C3,"lightningBolt");var qY=L((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),UY=L((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),HY=L((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ZT=10,QT=10;async function k3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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<QT&&(e.width=QT);const E=k/2/(2.5+k/50);e.height=(e.height??0)-c-E*3,e.height<ZT&&(e.height=ZT)}const{shapeSvg:h,bbox:u,label:d}=await me(i,e,de(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 _;const{cssStyles:C}=e;if(e.look==="handDrawn"){const k=Xt.svg(h),T=UY(0,0,f,y,g,x,v),E=HY(0,x,f,y,g,x),N=Zt(e,{}),B=k.path(T,N),O=k.path(E,N);h.insert(()=>O,":first-child").attr("class","line"),_=h.insert(()=>B,":first-child"),_.attr("class","basic label-container"),C&&_.attr("style",C)}else{const k=qY(0,0,f,y,g,x,v);_=h.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",Cr(C)).attr("style",n)}return _.attr("label-offset-y",x),_.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),ee(e,_),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=Yt.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}L(k3,"linedCylinder");async function w3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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,_=Xt.svg(h),C=Zt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-f/2-f/2*.1,y:-y/2},{x:-f/2-f/2*.1,y:y/2},...$o(-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=_.polygon(k.map(N=>[N.x,N.y]),C),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))})`),ee(e,E),e.intersect=function(N){return Yt.polygon(e,k,N)},h}L(w3,"linedWaveEdgedRect");async function S3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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,_=-y/2,C=-v/2,{cssStyles:k}=e,T=Xt.svg(u),E=Zt(e,{}),N=[{x:_-h,y:C+h},{x:_-h,y:C+v+h},{x:_+y-h,y:C+v+h},{x:_+y-h,y:C+v},{x:_+y,y:C+v},{x:_+y,y:C+v-h},{x:_+y+h,y:C+v-h},{x:_+y+h,y:C-h},{x:_+h,y:C-h},{x:_+h,y:C},{x:_,y:C},{x:_,y:C+h}],B=[{x:_,y:C+h},{x:_+y-h,y:C+h},{x:_+y-h,y:C+v},{x:_+y,y:C+v},{x:_+y,y:C},{x:_,y:C}];e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const O=Qe(N);let A=T.path(O,E);const M=Qe(B);let F=T.path(M,E);e.look!=="handDrawn"&&(A=Ov(A),F=Ov(F));const D=u.insert("g",":first-child");return D.insert(()=>A),D.insert(()=>F),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))})`),ee(e,D),e.intersect=function(z){return Yt.polygon(e,N,z)},u}L(S3,"multiRect");async function T3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await me(i,e,de(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),_=-g/2,C=-v/2,k=10,{cssStyles:T}=e,E=$o(_-k,C+v+k,_+g-k,C+v+k,y,.8),N=E==null?void 0:E[E.length-1],B=[{x:_-k,y:C+k},{x:_-k,y:C+v+k},...E,{x:_+g-k,y:N.y-k},{x:_+g,y:N.y-k},{x:_+g,y:N.y-2*k},{x:_+g+k,y:N.y-2*k},{x:_+g+k,y:C-k},{x:_+k,y:C-k},{x:_+k,y:C},{x:_,y:C},{x:_,y:C+k}],O=[{x:_,y:C+k},{x:_+g-k,y:C+k},{x:_+g-k,y:N.y-k},{x:_+g,y:N.y-k},{x:_+g,y:C},{x:_,y:C}],A=Xt.svg(a),M=Zt(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const F=Qe(B),D=A.path(F,M),z=Qe(O),U=A.path(z,M),K=a.insert(()=>D,":first-child");return K.insert(()=>U),K.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&K.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&K.selectAll("path").attr("style",n),K.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(o.width/2)-k-(o.x-(o.left??0))}, ${-(o.height/2)+k-y/2-(o.y-(o.top??0))})`),ee(e,K),e.intersect=function($){return Yt.polygon(e,B,$)},a}L(T3,"multiWaveEdgedRectangle");async function E3(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=Qt(e);e.labelStyle=n,e.useHtmlLabels||nn(qi())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await me(i,e,de(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=Xt.svg(c),_=Zt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=v.rectangle(g,x,d,f,_),k=c.insert(()=>C,":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))})`),ee(e,k),e.intersect=function(T){return Yt.rect(e,T)},c}L(E3,"note");var WY=L((i,e,r)=>[`M${i+r/2},${e}`,`L${i+r},${e-r/2}`,`L${i+r/2},${e-r}`,`L${i},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function N3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await me(i,e,de(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=Xt.svg(a),v=Zt(e,{}),_=WY(0,0,u),C=y.path(_,v);g=a.insert(()=>C,":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),ee(e,g),e.calcIntersect=function(y,v){const _=y.width,C=[{x:_/2,y:0},{x:_,y:-_/2},{x:_/2,y:-_},{x:0,y:-_/2}],k=Yt.polygon(y,C,v);return{x:k.x-.5,y:k.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}L(N3,"question");async function A3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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,_=[{x:x+v,y},{x,y:0},{x:x+v,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:C}=e,k=Xt.svg(h),T=Zt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=Qe(_),N=k.path(E,T),B=h.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${-v/2},0)`),d.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),ee(e,B),e.intersect=function(O){return Yt.polygon(e,_,O)},h}L(A3,"rect_left_inv_arrow");async function M3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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(ii())){const M=f.children[0],F=ue(f);g=M.getBoundingClientRect(),F.attr("width",g.width),F.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),_=v.children[0],C=ue(v);g=_.getBoundingClientRect(),C.attr("width",g.width),C.attr("height",g.height);const k=(e.padding||0)/2;ue(v).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+k+5)+")"),ue(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,B=-g.height/2-k;let O,A;if(e.look==="handDrawn"){const M=Xt.svg(o),F=Zt(e,{}),D=M.path(qo(N,B,T,E,e.rx||0),F),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,F);A=o.insert(()=>(Nt.debug("Rough node insert CXC",D),z),":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 ee(e,O),e.intersect=function(M){return Yt.rect(e,M)},o}L(M3,"rectWithTitle");async function B3(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 Vd(i,e,a)}L(B3,"roundedRect");var ll=8;async function L3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(e)),d=((e==null?void 0:e.width)??h.width)+a*2+(e.look==="neo"?ll:ll*2),f=((e==null?void 0:e.height)??h.height)+o*2,g=d-ll,x=f,y=ll-d/2,v=-f/2,{cssStyles:_}=e,C=Xt.svg(c),k=Zt(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-ll,y:v+x},{x:y-ll,y:v},{x:y,y:v},{x:y,y:v+x}],E=C.polygon(T.map(B=>[B.x,B.y]),k),N=c.insert(()=>E,":first-child");return N.attr("class","basic label-container outer-path").attr("style",Cr(_)),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),_&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),u.attr("transform",`translate(${ll/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ee(e,N),e.intersect=function(B){return Yt.rect(e,B)},c}L(L3,"shadedProcess");async function O3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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,_=-y/2,{cssStyles:C}=e,k=Xt.svg(h),T=Zt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=[{x:v,y:_},{x:v,y:_+y},{x:v+x,y:_+y},{x:v+x,y:_-y/2}],N=Qe(E),B=k.path(N,T),O=h.insert(()=>B,":first-child");return O.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",C),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))})`),ee(e,O),e.intersect=function(A){return Yt.polygon(e,E,A)},h}L(O3,"slopedRect");async function R3(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 Vd(i,e,o)}L(R3,"squareRect");async function D3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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=Xt.svg(h),v=Zt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=[{x:-f/2+g,y:-d/2},{x:f/2-g,y:-d/2},...Ed(-f/2+g,0,g,50,90,270),{x:f/2-g,y:d/2},...Ed(f/2-g,0,g,50,270,450)],C=Qe(_),k=y.path(C,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),ee(e,T),e.intersect=function(E){return Yt.polygon(e,_,E)},h}L(D3,"stadium");async function j3(i,e){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Vd(i,e,r)}L(j3,"state");function F3(i,e,{config:{themeVariables:r}}){var T,E;const{labelStyles:n,nodeStyles:a}=Qt(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=Xt.svg(f),x=Zt(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,_=(e.width??0)*5/14,C=g.circle(0,0,_,{...x,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),k=f.insert(()=>y,":first-child");if(k.insert(()=>C),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)??"",B=N?`${N}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${B})`)}return ee(e,k),e.intersect=function(N){return Yt.circle(e,(e.width??0)/2,N)},f}L(F3,"stateEnd");function I3(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=Xt.svg(o).circle(0,0,e.width,tG(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 ee(e,c),e.intersect=function(d){return Yt.circle(e,(e.width??7)/2,d)},o}L(I3,"stateStart");var Ac=8;async function $3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(e)),d=((e==null?void 0:e.width)??u.width)+2*Ac+o,f=((e==null?void 0:e.height)??u.height)+c,g=d-2*Ac,x=f,y=-d/2,v=-f/2,_=[{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 C=Xt.svg(h),k=Zt(e,{}),T=C.rectangle(y,v,g+16,x,k),E=C.line(y+Ac,v,y+Ac,v+x,k),N=C.line(y+Ac+g,v,y+Ac+g,v+x,k);h.insert(()=>E,":first-child"),h.insert(()=>N,":first-child");const B=h.insert(()=>T,":first-child"),{cssStyles:O}=e;B.attr("class","basic label-container").attr("style",Cr(O)),ee(e,B)}else{const C=zs(h,g,x,_);n&&C.attr("style",n),ee(e,C)}return e.intersect=function(C){return Yt.polygon(e,_,C)},h}L($3,"subroutine");var r0=.2;async function z3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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-r0*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await me(i,e,de(e)),d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,f=r0*d,g=r0*d,y=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2+f-f,v=d,_=-y/2,C=-v/2,{cssStyles:k}=e,T=Xt.svg(h),E=Zt(e,{}),N=[{x:_-f/2,y:C},{x:_+y+f/2,y:C},{x:_+y+f/2,y:C+v},{x:_-f/2,y:C+v}],B=[{x:_+y-f/2,y:C+v},{x:_+y+f/2,y:C+v},{x:_+y+f/2,y:C+v-g}];e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const O=Qe(N),A=T.path(O,E),M=Qe(B),F=T.path(M,{...E,fillStyle:"solid"}),D=h.insert(()=>F,":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),ee(e,D),e.intersect=function(z){return Yt.polygon(e,N,z)},h}L(z3,"taggedRect");async function P3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await me(i,e,de(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=Xt.svg(a),_=Zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:x/2},...$o(-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},...$o(k+h,(T+u)*1.25,k+h-f,(T+u)*1.3,-u*.02,.5)],N=Qe(C),B=v.path(N,_),O=Qe(E),A=v.path(O,{..._,fillStyle:"solid"}),M=a.insert(()=>A,":first-child");return M.insert(()=>B,":first-child"),M.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),ee(e,M),e.intersect=function(F){return Yt.polygon(e,C,F)},a}L(P3,"taggedWaveEdgedRectangle");async function q3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await me(i,e,de(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),ee(e,f),e.intersect=function(g){return Yt.rect(e,g)},a}L(q3,"text");var GY=L((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"),YY=L((i,e,r,n,a,o)=>[`M${i},${e}`,`M${i+r},${e}`,`a${a},${o} 0,0,0 0,${-n}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),KY=L((i,e,r,n,a,o)=>[`M${i+r/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),JT=5,tE=10;async function U3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?12:a/2;if(e.width||e.height){const _=e.height??0;e.height=(e.height??0)-o,e.height<JT&&(e.height=JT);const k=_/2/(2.5+_/50);e.width=(e.width??0)-o-k*3,e.width<tE&&(e.width=tE)}const{shapeSvg:c,bbox:h,label:u}=await me(i,e,de(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 _=Xt.svg(c),C=YY(0,0,x,d,g,f),k=KY(0,0,x,d,g,f),T=_.path(C,Zt(e,{})),E=_.path(k,Zt(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 _=GY(0,0,x,d,g,f);v=c.insert("path",":first-child").attr("d",_).attr("class","basic label-container").attr("style",Cr(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))})`),ee(e,v),e.intersect=function(_){const C=Yt.rect(e,_),k=C.y-(e.y??0);if(f!=0&&(Math.abs(k)<(e.height??0)/2||Math.abs(k)==(e.height??0)/2&&Math.abs(C.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,_.x-(e.x??0)>0&&(T=-T),C.x+=T}return C},c}L(U3,"tiltedCylinder");async function H3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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=Xt.svg(h),_=Zt(e,{}),C=Qe(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,ee(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}L(H3,"trapezoid");async function W3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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=Xt.svg(d),_=Zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{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=Qe(C),T=v.path(k,_),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),ee(e,E),e.intersect=function(N){return Yt.polygon(e,C,N)},d}L(W3,"trapezoidalPentagon");var eE=10,iE=10;async function G3(i,e){var N;const{labelStyles:r,nodeStyles:n}=Qt(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<iE&&(e.width=iE),e.height=(e==null?void 0:e.height)??0,e.height<eE&&(e.height=eE));const{shapeSvg:c,bbox:h,label:u}=await me(i,e,de(e)),d=Fs((N=ii().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,_=Xt.svg(c),C=Zt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Qe(y),T=_.path(k,C),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,ee(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(B){return Nt.info("Triangle intersect",e,y,B),Yt.polygon(e,y,B)},c}L(G3,"triangle");async function Y3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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:_}=e,k=14-g,T=k>0?k/2:0,E=Xt.svg(u),N=Zt(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const B=[{x:-g/2-T,y:v/2},...$o(-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=Qe(B),A=E.path(O,N),M=u.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",_),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))})`),ee(e,M),e.intersect=function(F){return Yt.polygon(e,B,F)},u}L(Y3,"waveEdgedRectangle");async function K3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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 me(i,e,de(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=Xt.svg(h),_=Zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{x:-d/2,y:x/2},...$o(-d/2,x/2,d/2,x/2,g,1),{x:d/2,y:-x/2},...$o(d/2,-x/2,-d/2,-x/2,g,-1)],k=Qe(C),T=v.path(k,_),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),ee(e,E),e.intersect=function(N){return Yt.polygon(e,C,N)},h}L(K3,"waveRectangle");var Ki=10;async function V3(i,e){const{labelStyles:r,nodeStyles:n}=Qt(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-Ki,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-Ki,10));const{shapeSvg:c,bbox:h,label:u}=await me(i,e,de(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+Ki,f=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+Ki,g=d-Ki,x=f-Ki,y=-g/2,v=-x/2,{cssStyles:_}=e,C=Xt.svg(c),k=Zt(e,{}),T=[{x:y-Ki,y:v-Ki},{x:y-Ki,y:v+x},{x:y+g,y:v+x},{x:y+g,y:v-Ki}],E=`M${y-Ki},${v-Ki} L${y+g},${v-Ki} L${y+g},${v+x} L${y-Ki},${v+x} L${y-Ki},${v-Ki}
|
|
340
|
+
M${y-Ki},${v} L${y+g},${v}
|
|
341
|
+
M${y},${v-Ki} L${y},${v+x}`;e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const N=C.path(E,k),B=c.insert(()=>N,":first-child");return B.attr("transform",`translate(${Ki/2}, ${Ki/2})`),B.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+Ki/2-(h.x-(h.left??0))}, ${-(h.height/2)+Ki/2-(h.y-(h.top??0))})`),ee(e,B),e.intersect=function(O){return Yt.polygon(e,T,O)},c}L(V3,"windowPane");var rE=new Set(["redux-color","redux-dark-color"]),VY=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function D_(i,e){var ct,X,Z,Q;const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:a}=qi(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:ot}=qi(),{background:vt}=ot,At={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${vt}`]};await D_(i,At)}const d=qi();e.useHtmlLabels=d.htmlLabels;let f=((ct=d.er)==null?void 0:ct.diagramPadding)??10,g=((X=d.er)==null?void 0:X.entityPadding)??6;const{cssStyles:x}=e,{labelStyles:y,nodeStyles:v}=Qt(e);if(r.attributes.length===0&&e.label){const ot={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5};js(e.label,d)+ot.labelPaddingX*2<d.er.minEntityWidth&&(e.width=d.er.minEntityWidth);const vt=await Vd(i,e,ot);if(n!=null&&rE.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"),jt=(Z=At.node())==null?void 0:Z.getBBox();At.attr("transform",`translate(${-jt.width/2}, 0)`)}return vt}d.htmlLabels||(f*=1.25,g*=1.25);let _=de(e);_||(_="node default");const C=i.insert("g").attr("class",_).attr("id",e.domId||e.id),k=await Dc(C,e.label??"",d,0,0,["name"],y);k.height+=g;let T=0;const E=[],N=[];let B=0,O=0,A=0,M=0,F=!0,D=!0;for(const ot of r.attributes){const vt=await Dc(C,ot.type,d,0,T,["attribute-type"],y);B=Math.max(B,vt.width+f);const At=await Dc(C,ot.name,d,0,T,["attribute-name"],y);O=Math.max(O,At.width+f);const jt=await Dc(C,ot.keys.join(),d,0,T,["attribute-keys"],y);A=Math.max(A,jt.width+f);const qt=await Dc(C,ot.comment,d,0,T,["attribute-comment"],y);M=Math.max(M,qt.width+f);const Rt=Math.max(vt.height,At.height,jt.height,qt.height)+g;N.push({yOffset:T,rowHeight:Rt}),T+=Rt}let z=4;A<=f&&(F=!1,A=0,z--),M<=f&&(D=!1,M=0,z--);const U=C.node().getBBox();if(k.width+f*2-(B+O+A+M)>0){const ot=k.width+f*2-(B+O+A+M);B+=ot/z,O+=ot/z,A>0&&(A+=ot/z),M>0&&(M+=ot/z)}const K=B+O+A+M,$=Xt.svg(C),H=Zt(e,{});e.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");let j=0;N.length>0&&(j=N.reduce((ot,vt)=>ot+((vt==null?void 0:vt.rowHeight)??0),0));const q=Math.max(U.width+f*2,(e==null?void 0:e.width)||0,K),G=Math.max((j??0)+k.height,(e==null?void 0:e.height)||0),et=-q/2,at=-G/2;if(C.selectAll("g:not(:first-child)").each((ot,vt,At)=>{const jt=ue(At[vt]),qt=jt.attr("transform");let Rt=0,Gt=0;if(qt){const ye=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(qt);ye&&(Rt=parseFloat(ye[1]),Gt=parseFloat(ye[2]),jt.attr("class").includes("attribute-name")?Rt+=B:jt.attr("class").includes("attribute-keys")?Rt+=B+O:jt.attr("class").includes("attribute-comment")&&(Rt+=B+O+A))}jt.attr("transform",`translate(${et+f/2+Rt}, ${Gt+at+k.height+g/2})`)}),C.select(".name").attr("transform","translate("+-k.width/2+", "+(at+g/2)+")"),n!=null&&rE.has(n)){const ot=r.colorIndex??0;C.attr("data-color-id",`color-${ot%u.length}`)}const W=$.rectangle(et,at,q,G,H),rt=C.insert(()=>W,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(const[ot,vt]of N.entries()){const jt=(ot+1)%2===0&&vt.yOffset!==0,qt=$.rectangle(et,k.height+at+(vt==null?void 0:vt.yOffset),q,vt==null?void 0:vt.rowHeight,{...H,fill:jt?o:c,stroke:h});C.insert(()=>qt,"g.label").attr("style",x.join("")).attr("class",`row-rect-${jt?"even":"odd"}`)}const ft=1e-4;let st=jc(et,k.height+at,q+et,k.height+at,ft),Ct=$.polygon(st.map(ot=>[ot.x,ot.y]),H);if(C.insert(()=>Ct).attr("class","divider"),st=jc(B+et,k.height+at,B+et,G+at,ft),Ct=$.polygon(st.map(ot=>[ot.x,ot.y]),H),C.insert(()=>Ct).attr("class","divider"),F){const ot=B+O+et;st=jc(ot,k.height+at,ot,G+at,ft),Ct=$.polygon(st.map(vt=>[vt.x,vt.y]),H),C.insert(()=>Ct).attr("class","divider")}if(D){const ot=B+O+A+et;st=jc(ot,k.height+at,ot,G+at,ft),Ct=$.polygon(st.map(vt=>[vt.x,vt.y]),H),C.insert(()=>Ct).attr("class","divider")}for(const ot of E){const vt=k.height+at+ot;st=jc(et,vt,q+et,vt,ft),Ct=$.polygon(st.map(At=>[At.x,At.y]),H),C.insert(()=>Ct).attr("class","divider")}if(ee(e,rt),v&&e.look!=="handDrawn")if(n!=null&&VY.has(n))C.selectAll("path").attr("style",v);else{const ot=v.split(";"),vt=(Q=ot==null?void 0:ot.filter(At=>At.includes("stroke")))==null?void 0:Q.map(At=>`${At}`).join("; ");C.selectAll("path").attr("style",vt??""),C.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(ot){return Yt.rect(e,ot)},C}L(D_,"erBox");async function Dc(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!==A2(e)&&(e=A2(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=ue(u);d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}L(Dc,"addText");function jc(i,e,r,n,a){return i===r?[{x:i-a/2,y:e},{x:i+a/2,y:e},{x:r+a/2,y:n},{x:r-a/2,y:n}]:[{x:i,y:e-a/2},{x:i,y:e+a/2},{x:r,y:n+a/2},{x:r,y:n-a/2}]}L(jc,"lineToPolygon");async function X3(i,e,r,n,a=r.class.padding??12){const o=n?0:3,c=i.insert("g").attr("class",de(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 Zu(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await Zu(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();x=v.height,d=c.insert("g").attr("class","members-group text");let _=0;for(const T of e.members){const E=await Zu(d,T,_,[T.parseClassifier()]);_+=E+o}y=d.node().getBBox().height,y<=0&&(y=a/2),f=c.insert("g").attr("class","methods-group text");let C=0;for(const T of e.methods){const E=await Zu(f,T,C,[T.parseClassifier()]);C+=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}}L(X3,"textHelper");async function Zu(i,e,r,n=[]){const a=i.insert("g").attr("class","label").attr("style",n.join("; ")),o=qi();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)),gd(h)&&(c=!0);const u=await $s(a,z1(zl(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=ue(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(_=>new Promise(C=>{function k(){var T;if(_.style.display="flex",_.style.flexDirection="column",v){const E=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,B=parseInt(E,10)*5+"px";_.style.minWidth=B,_.style.maxWidth=B}else _.style.width="100%";C(_)}L(k,"setupImage"),setTimeout(()=>{_.complete&&k()}),_.addEventListener("error",k),_.addEventListener("load",k)})))}d=g.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}else{n.includes("font-weight: bolder")&&ue(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;const g=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(g.textContent=h[0]+h.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),d=u.getBBox()}return a.attr("transform","translate(0,"+(-d.height/(2*f)+r)+")"),d.height}L(Zu,"addText");async function Z3(i,e){var $,H;const r=ii(),{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 X3(i,e,r,h,c),{labelStyles:g,nodeStyles:x}=Qt(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=(($=u.styles)==null?void 0:$.join(";"))||x||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((H=r.class)!=null&&H.hideEmptyMembersBox),_=Xt.svg(d),C=Zt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.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,B=-T/2;let O=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;E&&(O=o*2);const A=_.rectangle(N-o,B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0),k+2*o,T+2*o+O,C),M=d.insert(()=>A,":first-child");M.attr("class","basic label-container outer-path");const F=M.node().getBBox(),D=d.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,z=d.select(".label-group").node().getBBox().height-(v?o/2:0)||0,U=d.select(".members-group").node().getBBox().height-(v?o/2:0)||0,K=(D+z+B+o-(B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each((j,q,G)=>{var st,Ct;const et=ue(G[q]),at=et.attr("transform");let W=0;if(at){const X=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(at);X&&(W=parseFloat(X[2]))}let rt=W+B+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(et.attr("class").includes("methods-group")){const ct=Math.max(U,c/2);E?rt=Math.max(K,D+z+ct+B+c*2+o)+c*2:rt=D+z+ct+B+c*4+o}u.members.length===0&&u.methods.length===0&&((st=r.class)!=null&&st.hideEmptyMembersBox)&&(u.annotations.length>0?rt=W-c:rt=W),h||(rt-=4);let ft=N;(et.attr("class").includes("label-group")||et.attr("class").includes("annotation-group"))&&(ft=-((Ct=et.node())==null?void 0:Ct.getBBox().width)/2||0,d.selectAll("text").each(function(ct,X,Z){window.getComputedStyle(Z[X]).textAnchor==="middle"&&(ft=0)})),et.attr("transform",`translate(${ft}, ${rt})`)}),u.members.length>0||u.methods.length>0||v){const j=D+z+B+o,q=_.line(F.x,j,F.x+F.width,j+.001,C);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+z+U+B+c*2+o,q=_.line(F.x,E?Math.max(K,j):j,F.x+F.width,(E?Math.max(K,j):j)+.001,C);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 et=G[0].replace("color","fill");d.selectAll("tspan").attr("style",et)}}}return ee(e,M),e.intersect=function(j){return Yt.rect(e,j)},d}L(Z3,"classBox");async function Q3(i,e){var F,D;const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,d=de(e),{themeVariables:f}=ii(),{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 _=v;const C=await ja(y,a.name,_,e.labelStyle+"; font-weight: bold;");if(_+=C+h,u){const z=await ja(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,_,e.labelStyle);_+=z;const U=await ja(y,`${a.text?`Text: ${a.text}`:""}`,_,e.labelStyle);_+=U;const K=await ja(y,`${a.risk?`Risk: ${a.risk}`:""}`,_,e.labelStyle);_+=K,await ja(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,_,e.labelStyle)}else{const z=await ja(y,`${o.type?`Type: ${o.type}`:""}`,_,e.labelStyle);_+=z,await ja(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,_,e.labelStyle)}const k=(((F=y.node())==null?void 0:F.getBBox().width)??200)+c,T=(((D=y.node())==null?void 0:D.getBBox().height)??200)+c,E=-k/2,N=-T/2,B=Xt.svg(y),O=Zt(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const A=B.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 z=e.colorIndex??0;y.attr("data-color-id",`color-${z%g.length}`)}if(y.selectAll(".label").each((z,U,K)=>{const $=ue(K[U]),H=$.attr("transform");let j=0,q=0;if(H){const W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(H);W&&(j=parseFloat(W[1]),q=parseFloat(W[2]))}const G=q-T/2;let et=E+c/2;(U===0||U===1)&&(et=j),$.attr("transform",`translate(${et}, ${G+c})`)}),_>v+C+h){const z=N+v+C+h;let U;if(e.look==="neo"){const H=[[E,z],[E+k,z],[E+k,z+.001],[E,z+.001]];U=B.polygon(H,O)}else U=B.line(E,z,E+k,z,O);y.insert(()=>U).attr("class","divider")}return ee(e,M),e.intersect=function(z){return Yt.rect(e,z)},n&&e.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}L(Q3,"requirementBox");async function ja(i,e,r,n=""){if(e==="")return 0;const a=i.insert("g").attr("class","label").attr("style",n),o=ii(),c=o.htmlLabels??!0,h=await $s(a,z1(zl(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=ue(h);u=d.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{const d=h.children[0];for(const f of d.children)n&&f.setAttribute("style",n);u=h.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}L(ja,"addText");var XY=L(i=>{switch(i){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function J3(i,e,{config:r}){var U,K;const{labelStyles:n,nodeStyles:a}=Qt(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:d}=await me(i,e,de(e)),f=e.padding||10;let g="",x;"ticket"in e&&e.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(g=(K=r==null?void 0:r.kanban)==null?void 0:K.ticketBaseUrl.replace("#TICKET#",e.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let v,_;x?{label:v,bbox:_}=await i0(x,"ticket"in e&&e.ticket||"",y):{label:v,bbox:_}=await i0(h,"ticket"in e&&e.ticket||"",y);const{label:C,bbox:k}=await i0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,E=(e==null?void 0:e.width)||0,N=Math.max(_.height,k.height)/2,B=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+N,O=-E/2,A=-B/2;d.attr("transform","translate("+(f-E/2)+", "+(-N-u.height/2)+")"),v.attr("transform","translate("+(f-E/2)+", "+(-N+u.height/2)+")"),C.attr("transform","translate("+(f+E/2-k.width-2*o)+", "+(-N+u.height/2)+")");let M;const{rx:F,ry:D}=e,{cssStyles:z}=e;if(e.look==="handDrawn"){const $=Xt.svg(h),H=Zt(e,{}),j=F||D?$.path(qo(O,A,E,B,F||0),H):$.rectangle(O,A,E,B,H);M=h.insert(()=>j,":first-child"),M.attr("class","basic label-container").attr("style",z||null)}else{M=h.insert("rect",":first-child"),M.attr("class","basic label-container __APA__").attr("style",a).attr("rx",F??5).attr("ry",D??5).attr("x",O).attr("y",A).attr("width",E).attr("height",B);const $="priority"in e&&e.priority;if($){const H=h.append("line"),j=O+2,q=A+Math.floor((F??0)/2),G=A+B-Math.floor((F??0)/2);H.attr("x1",j).attr("y1",q).attr("x2",j).attr("y2",G).attr("stroke-width","4").attr("stroke",XY($))}}return ee(e,M),e.height=B,e.intersect=function($){return Yt.rect(e,$)},h}L(J3,"kanbanItem");async function t5(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await me(i,e,de(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),_=Math.max(d,y);h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let C;const k=`M0 0
|
|
342
|
+
a${f},${f} 1 0,0 ${v*.25},${-1*_*.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},${_*.1}
|
|
346
|
+
|
|
347
|
+
a${f},${f} 1 0,0 ${v*.15},${_*.33}
|
|
348
|
+
a${f*.8},${f*.8} 1 0,0 0,${_*.34}
|
|
349
|
+
a${f},${f} 1 0,0 ${-1*v*.15},${_*.33}
|
|
350
|
+
|
|
351
|
+
a${f},${f} 1 0,0 ${-1*v*.25},${_*.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*_*.15}
|
|
355
|
+
|
|
356
|
+
a${f},${f} 1 0,0 ${-1*v*.1},${-1*_*.33}
|
|
357
|
+
a${f*.8},${f*.8} 1 0,0 0,${-1*_*.34}
|
|
358
|
+
a${f},${f} 1 0,0 ${v*.1},${-1*_*.33}
|
|
359
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const T=Xt.svg(a),E=Zt(e,{}),N=T.path(k,E);C=a.insert(()=>N,":first-child"),C.attr("class","basic label-container").attr("style",Cr(g))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",k);return C.attr("transform",`translate(${-v/2}, ${-_/2})`),ee(e,C),e.calcIntersect=function(T,E){return Yt.rect(T,E)},e.intersect=function(T){return Nt.info("Bang intersect",e,T),Yt.rect(e,T)},a}L(t5,"bang");async function e5(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await me(i,e,de(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 _;const C=`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=Xt.svg(a),T=Zt(e,{}),E=k.path(C,T);_=a.insert(()=>E,":first-child"),_.attr("class","basic label-container").attr("style",Cr(v))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",C);return h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),_.attr("transform",`translate(${-u/2}, ${-d/2})`),ee(e,_),e.calcIntersect=function(k,T){return Yt.rect(k,T)},e.intersect=function(k){return Nt.info("Cloud intersect",e,k),Yt.rect(e,k)},a}L(e5,"cloud");async function i5(i,e){const{labelStyles:r,nodeStyles:n}=Qt(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await me(i,e,de(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()),ee(e,x),e.calcIntersect=function(y,v){return Yt.rect(y,v)},e.intersect=function(y){return Yt.rect(e,y)},a}L(i5,"defaultMindmapNode");async function r5(i,e){const r={padding:e.padding??0};return R_(i,e,r)}L(r5,"mindmapCircle");var ZY=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:R3},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:B3},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:D3},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$3},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:n3},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:R_},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:t5},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:e5},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:N3},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:u3},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_3},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:v3},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:H3},{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:b3},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:s3},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:q3},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:XR},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:L3},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:I3},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:F3},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:c3},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:d3},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:t3},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:e3},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:i3},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:C3},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Y3},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:h3},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:U3},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:k3},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:r3},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:a3},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:G3},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:V3},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:o3},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:W3},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:l3},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:O3},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:T3},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:S3},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:VR},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:JR},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:P3},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:z3},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:K3},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:A3},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:w3}],QY=L(()=>{const e=[...Object.entries({state:j3,choice:ZR,note:E3,rectWithTitle:M3,labelRect:x3,iconSquare:m3,iconCircle:p3,icon:f3,iconRounded:g3,imageSquare:y3,anchor:YR,kanbanItem:J3,mindmapCircle:r5,defaultMindmapNode:i5,classBox:Z3,erBox:D_,requirementBox:Q3}),...ZY.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),n5=QY();function JY(i){return i in n5}L(JY,"isValidShape");var bm=new Map;async function a5(i,e,r){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?n5[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",Cr(e.look)),e.tooltip&&a.attr("title",e.tooltip),bm.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}L(a5,"insertNode");var tlt=L((i,e)=>{bm.set(e.id,i)},"setNodeElem"),elt=L(()=>{bm.clear()},"clear"),ilt=L(i=>{const e=bm.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"),tK=L((i,e,r,n,a,o=!1,c)=>{e.arrowTypeStart&&nE(i,"start",e.arrowTypeStart,r,n,a,o,c),e.arrowTypeEnd&&nE(i,"end",e.arrowTypeEnd,r,n,a,o,c)},"addEdgeMarkers"),eK={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}},iK=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],nE=L((i,e,r,n,a,o,c=!1,h)=>{var v;const u=eK[r],d=u&&iK.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 _=h.replace(/[^\dA-Za-z]/g,"_"),C=`${y}_${_}`;if(!document.getElementById(C)){const k=document.getElementById(y);if(k){const T=k.cloneNode(!0);T.id=C,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}#${C})`)}else i.attr(`marker-${e}`,`url(${n}#${y})`)},"addEdgeMarker"),rK=L(i=>{var e,r;return typeof i=="string"?i:(r=(e=ii())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),$g=new Map,Or=new Map,rlt=L(()=>{$g.clear(),Or.clear()},"clear"),Bu=L(i=>i?typeof i=="string"?i:i.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),nK=L(async(i,e)=>{const r=ii();let n=nn(r);const{labelStyles:a}=Qt(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:Bu(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=ue(d);f=y.getBoundingClientRect(),g=f,v.attr("width",f.width),v.attr("height",f.height)}else{const y=ue(d).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",Su(g,n)),$g.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"),_=await Ao(v,e.startLabelLeft,Bu(e.labelStyle)||"",!1,!1);x=_;let C=_.getBBox();if(n){const k=_.children[0],T=ue(_);C=k.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",Su(C,n)),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).startLeft=y,Qu(x,e.startLabelLeft)}if(e.startLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),_=await Ao(v,e.startLabelRight,Bu(e.labelStyle)||"",!1,!1);x=_,v.node().appendChild(_);let C=_.getBBox();if(n){const k=_.children[0],T=ue(_);C=k.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",Su(C,n)),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).startRight=y,Qu(x,e.startLabelRight)}if(e.endLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),_=await Ao(v,e.endLabelLeft,Bu(e.labelStyle)||"",!1,!1);x=_;let C=_.getBBox();if(n){const k=_.children[0],T=ue(_);C=k.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",Su(C,n)),y.node().appendChild(_),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).endLeft=y,Qu(x,e.endLabelLeft)}if(e.endLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),_=await Ao(v,e.endLabelRight,Bu(e.labelStyle)||"",!1,!1);x=_;let C=_.getBBox();if(n){const k=_.children[0],T=ue(_);C=k.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",Su(C,n)),y.node().appendChild(_),Or.get(e.id)||Or.set(e.id,{}),Or.get(e.id).endRight=y,Qu(x,e.endLabelRight)}return d},"insertEdgeLabel");function Qu(i,e){nn(ii())&&i&&(i.style.width=e.length*9+"px",i.style.height="12px")}L(Qu,"setTerminalWidth");var aK=L((i,e)=>{Nt.debug("Moving label abc88 ",i.id,i.label,$g.get(i.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=ii(),{subGraphTitleTotalMargin:a}=__(n);if(i.label){const o=$g.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"),sK=L((i,e)=>{const r=i.x,n=i.y,a=Math.abs(e.x-r),o=Math.abs(e.y-n),c=i.width/2,h=i.height/2;return a>=c||o>=h},"outsideNode"),oK=L((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"),aE=L((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),!sK(e,o)&&!a){const c=oK(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 s5(i){const e=[],r=[];for(let n=1;n<i.length-1;n++){const a=i[n-1],o=i[n],c=i[n+1];(a.x===o.x&&o.y===c.y&&Math.abs(o.x-c.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===c.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-c.y)>5)&&(e.push(o),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}L(s5,"extractCornerPoints");var sE=L(function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=Math.sqrt(n*n+a*a),c=r/o;return{x:e.x-c*n,y:e.y-c*a}},"findAdjacentPoint"),lK=L(function(i){const{cornerPointPositions:e}=s5(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=sE(a,c,5),u=sE(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"),cK=L((i,e,r)=>{const n=i-e-r,a=2,o=2,c=a+o,h=Math.floor(n/c),u=Array(h).fill(`${a} ${o}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),hK=L(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}=ii();let d=e.points,f=!1;const g=a;var x=o;const y=[];for(const G in e.cssCompiledStyles)aR(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=aE(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=aE(d.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let _=d.filter(G=>!Number.isNaN(G.y));const C=rK(e.curve);C!=="rounded"&&(_=lK(_));let k=sd;switch(C){case"linear":k=sd;break;case"basis":k=sv;break;case"cardinal":k=$B;break;case"bumpX":k=RB;break;case"bumpY":k=DB;break;case"catmullRom":k=PB;break;case"monotoneX":k=YB;break;case"monotoneY":k=KB;break;case"natural":k=XB;break;case"step":k=ZB;break;case"stepAfter":k=JB;break;case"stepBefore":k=QB;break;case"rounded":k=sd;break;default:k=sv}const{x:T,y:E}=nU(e),N=R9().x(T).y(E).curve(k);let B;switch(e.thickness){case"normal":B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible";break;default:B="edge-thickness-normal"}switch(e.pattern){case"solid":B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed";break;default:B+=" edge-pattern-solid"}let O,A=C==="rounded"?o5(l5(_,e),5):N(_);const M=Array.isArray(e.style)?e.style:[e.style];let F=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 z=!1;if(e.look==="handDrawn"){const G=Xt.svg(i);Object.assign([],_);const et=G.path(A,{roughness:.3,seed:u});B+=" transition",O=ue(et).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",M?M.reduce((W,rt)=>W+";"+rt,""):"");let at=O.attr("d");O.attr("d",at),i.node().appendChild(O.node())}else{const G=y.join(";"),et=M?M.reduce((Ct,ct)=>Ct+ct+";",""):"",at=(G?G+";"+et+";":et)+";"+(M?M.reduce((Ct,ct)=>Ct+";"+ct,""):"");O=i.append("path").attr("d",A).attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",at),F=(q=at.match(/stroke:([^;]+)/))==null?void 0:q[1],z=e.animate===!0||!!e.animation||G.includes("animation");const W=O.node(),rt=typeof W.getTotalLength=="function"?W.getTotalLength():0,ft=hT[e.arrowTypeStart]||0,st=hT[e.arrowTypeEnd]||0;if(e.look==="neo"&&!z){const ct=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?cK(rt,ft,st):`0 ${ft} ${rt-ft-st} ${st}`}; stroke-dashoffset: 0;`;O.attr("style",ct+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",Cr(e.look)),e.showPoints&&_.forEach(G=>{i.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",G.x).attr("cy",G.y)});let U="";(ii().flowchart.arrowMarkerAbsolute||ii().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 K=!z&&(e==null?void 0:e.look)==="neo";tK(O,e,U,c,n,K,F);const $=Math.floor(d.length/2),H=d[$];ba.isLabelCoordinateInPath(H,O.attr("d"))||(f=!0);let j={};return f&&(j.updatedPath=d),j.originalPath=e.points,j},"insertEdge");function o5(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 _=d/y,C=f/y,k=g/v,T=x/v,E=_*k+C*T,N=Math.max(-1,Math.min(1,E)),B=Math.acos(N);if(B<a||Math.abs(Math.PI-B)<a){r+=`L${c.x},${c.y}`;continue}const O=Math.min(e/Math.sin(B/2),y/2,v/2),A=c.x-_*O,M=c.y-C*O,F=c.x+k*O,D=c.y+T*O;r+=`L${A},${M}`,r+=`Q${c.x},${c.y} ${F},${D}`}}return r}L(o5,"generateRoundedPath");function jv(i,e){if(!i||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-i.x,n=e.y-i.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}L(jv,"calculateDeltaAndAngle");function l5(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}=jv(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}=jv(c,o),u=a*Math.cos(h),d=a*Math.sin(h);r[n-1].x=o.x-u,r[n-1].y=o.y-d}return r}L(l5,"applyMarkerOffsetsToPoints");var uK=L((i,e,r,n)=>{e.forEach(a=>{RK[a](i,r,n)})},"insertMarkers"),dK=L((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"),fK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),pK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),gK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),mK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),yK=L((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),bK=L((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),xK=L((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),i.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),vK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),_K=L((i,e,r)=>{const n=qi(),{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"),CK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),kK=L((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),wK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),SK=L((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),TK=L((i,e,r)=>{const n=qi(),{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"),EK=L((i,e,r)=>{const n=qi(),{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=L((i,e,r)=>{const n=qi(),{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=L((i,e,r)=>{const n=qi(),{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"),MK=L((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
397
|
+
L20,10
|
|
398
|
+
M20,10
|
|
399
|
+
L0,20`)},"requirement_arrow"),BK=L((i,e,r)=>{const n=qi(),{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=L((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),OK=L((i,e,r)=>{const n=qi(),{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"),RK={extension:dK,composition:fK,aggregation:pK,dependency:gK,lollipop:mK,point:yK,circle:bK,cross:xK,barb:vK,barbNeo:_K,only_one:CK,zero_or_one:kK,one_or_more:wK,zero_or_more:SK,only_one_neo:TK,zero_or_one_neo:EK,one_or_more_neo:NK,zero_or_more_neo:AK,requirement_arrow:MK,requirement_contains:LK,requirement_arrow_neo:BK,requirement_contains_neo:OK},DK=uK,jK={common:zd,getConfig:qi,insertCluster:OY,insertEdge:hK,insertEdgeLabel:nK,insertMarkers:DK,insertNode:a5,interpolateToCurve:g_,labelHelper:me,log:Nt,positionEdgeLabel:aK},Nd={},c5=L(i=>{for(const e of i)Nd[e.name]=e},"registerLayoutLoaders"),FK=L(()=>{c5([{name:"dagre",loader:L(async()=>await Te(()=>import("./dagre-KV5264BT-BHn2c24z.js"),__vite__mapDeps([5,6,7,8,9,10])),"loader")},{name:"cose-bilkent",loader:L(async()=>await Te(()=>import("./cose-bilkent-S5V4N54A-BJXUn11L.js"),__vite__mapDeps([11,12])),"loader")}])},"registerDefaultLayoutLoaders");FK();var nlt=L(async(i,e)=>{if(!(i.layoutAlgorithm in Nd))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=Nd[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,jK,{algorithm:r.algorithm})},"render"),alt=L((i="",{fallback:e="dagre"}={})=>{if(i in Nd)return i;if(e in Nd)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"),h5="comm",u5="rule",d5="decl",IK="@import",$K="@namespace",zK="@keyframes",PK="@layer",qK=Math.abs,cd=String.fromCharCode;function f5(i){return i.trim()}function Fv(i,e,r){return i.replace(e,r)}function qc(i,e){return i.charCodeAt(e)|0}function vh(i,e,r){return i.slice(e,r)}function za(i){return i.length}function UK(i){return i.length}function Tp(i,e){return e.push(i),i}var xm=1,_h=1,p5=0,oa=0,lr=0,Nh="";function j_(i,e,r,n,a,o,c,h){return{value:i,root:e,parent:r,type:n,props:a,children:o,line:xm,column:_h,length:c,return:"",siblings:h}}function HK(){return lr}function WK(){return lr=oa>0?qc(Nh,--oa):0,_h--,lr===10&&(_h=1,xm--),lr}function _a(){return lr=oa<p5?qc(Nh,oa++):0,_h++,lr===10&&(_h=1,xm++),lr}function Mo(){return qc(Nh,oa)}function Zp(){return oa}function vm(i,e){return vh(Nh,i,e)}function Ad(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 GK(i){return xm=_h=1,p5=za(Nh=i),oa=0,[]}function YK(i){return Nh="",i}function n0(i){return f5(vm(oa-1,Iv(i===91?i+2:i===40?i+1:i)))}function KK(i){for(;(lr=Mo())&&lr<33;)_a();return Ad(i)>2||Ad(lr)>3?"":" "}function VK(i,e){for(;--e&&_a()&&!(lr<48||lr>102||lr>57&&lr<65||lr>70&&lr<97););return vm(i,Zp()+(e<6&&Mo()==32&&_a()==32))}function Iv(i){for(;_a();)switch(lr){case i:return oa;case 34:case 39:i!==34&&i!==39&&Iv(lr);break;case 40:i===41&&Iv(i);break;case 92:_a();break}return oa}function XK(i,e){for(;_a()&&i+lr!==57;)if(i+lr===84&&Mo()===47)break;return"/*"+vm(e,oa-1)+"*"+cd(i===47?i:_a())}function ZK(i){for(;!Ad(Mo());)_a();return vm(i,oa)}function QK(i){return YK(Qp("",null,null,null,[""],i=GK(i),0,[0],i))}function Qp(i,e,r,n,a,o,c,h,u){for(var d=0,f=0,g=c,x=0,y=0,v=0,_=1,C=1,k=1,T=0,E=0,N="",B=a,O=o,A=n,M=N;C;)switch(v=E,E=_a()){case 40:v!=108&&qc(M,g-1)==58?(T++,M+="("):M+=n0(E);break;case 41:T--,M+=")";break;case 34:case 39:case 91:M+=n0(E);break;case 9:case 10:case 13:case 32:if(T>0){M+=cd(E);break}M+=KK(v);break;case 92:M+=VK(Zp()-1,7);continue;case 47:switch(Mo()){case 42:case 47:Tp(JK(XK(_a(),Zp()),e,r,u),u),(Ad(v||1)==5||Ad(Mo()||1)==5)&&za(M)&&vh(M,-1,void 0)!==" "&&(M+=" ");break;default:M+="/"}break;case 123*_:h[d++]=za(M)*k;case 125*_:case 59:case 0:if(T>0&&E){M+=cd(E);break}switch(E){case 0:case 125:C=0;case 59+f:k==-1&&(M=Fv(M,/\f/g,"")),y>0&&(za(M)-g||_===0)&&Tp(y>32?lE(M+";",n,r,g-1,u):lE(Fv(M," ","")+";",n,r,g-2,u),u);break;case 59:M+=";";default:if(Tp(A=oE(M,e,r,d,f,a,h,N,B=[],O=[],g,o),o),E===123)if(f===0)Qp(M,e,A,A,B,o,g,h,O);else{switch(x){case 99:if(qc(M,3)===110)break;case 108:if(qc(M,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Qp(i,A,A,n&&Tp(oE(i,A,A,0,0,a,h,N,a,B=[],g,O),O),a,O,g,h,n?B:O):Qp(M,A,A,A,[""],O,0,h,O)}}d=f=y=0,_=k=1,N=M="",g=c;break;case 58:g=1+za(M),y=v;default:if(_<1){if(E==123)--_;else if(E==125&&_++==0&&WK()==125)continue}switch(M+=cd(E),E*_){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+=n0(_a())),x=Mo(),f=g=za(N=M+=ZK(Zp())),E++;break;case 45:v===45&&za(M)==2&&(_=0)}}return o}function oE(i,e,r,n,a,o,c,h,u,d,f,g){for(var x=a-1,y=a===0?o:[""],v=UK(y),_=0,C=0,k=0;_<n;++_)for(var T=0,E=vh(i,x+1,x=qK(C=c[_])),N=i;T<v;++T)(N=f5(C>0?y[T]+" "+E:Fv(E,/&\f/g,y[T])))&&(u[k++]=N);return j_(i,e,r,a===0?u5:h,u,d,f,g)}function JK(i,e,r,n){return j_(i,e,r,h5,cd(HK()),vh(i,2,-2),0,n)}function lE(i,e,r,n,a){return j_(i,e,r,d5,vh(i,0,n),vh(i,n+1,-1),n,a)}function $v(i,e){for(var r="",n=0;n<i.length;n++)r+=e(i[n],n,i,e)||"";return r}function tV(i,e,r,n){switch(i.type){case PK:if(i.children.length)break;case IK:case $K:case d5:return i.return=i.return||i.value;case h5:return"";case zK:return i.return=i.value+"{"+$v(i.children,n)+"}";case u5:if(!za(i.value=i.props.join(",")))return""}return za(r=$v(i.children,n))?i.return=i.value+"{"+r+"}":""}var eV=IO(Object.keys,Object),iV=Object.prototype,rV=iV.hasOwnProperty;function nV(i){if(!hm(i))return eV(i);var e=[];for(var r in Object(i))rV.call(i,r)&&r!="constructor"&&e.push(r);return e}var zv=Yl(Ta,"DataView"),Pv=Yl(Ta,"Promise"),qv=Yl(Ta,"Set"),Uv=Yl(Ta,"WeakMap"),cE="[object Map]",aV="[object Object]",hE="[object Promise]",uE="[object Set]",dE="[object WeakMap]",fE="[object DataView]",sV=Gl(zv),oV=Gl(Td),lV=Gl(Pv),cV=Gl(qv),hV=Gl(Uv),fl=Wl;(zv&&fl(new zv(new ArrayBuffer(1)))!=fE||Td&&fl(new Td)!=cE||Pv&&fl(Pv.resolve())!=hE||qv&&fl(new qv)!=uE||Uv&&fl(new Uv)!=dE)&&(fl=function(i){var e=Wl(i),r=e==aV?i.constructor:void 0,n=r?Gl(r):"";if(n)switch(n){case sV:return fE;case oV:return cE;case lV:return hE;case cV:return uE;case hV:return dE}return e});var uV="[object Map]",dV="[object Set]",fV=Object.prototype,pV=fV.hasOwnProperty;function pE(i){if(i==null)return!0;if(um(i)&&(Ag(i)||typeof i=="string"||typeof i.splice=="function"||f_(i)||p_(i)||Ng(i)))return!i.length;var e=fl(i);if(e==uV||e==dV)return!i.size;if(hm(i))return!nV(i).length;for(var r in i)if(pV.call(i,r))return!1;return!0}var g5="c4",gV=L(i=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),mV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-Do_gB8Cs.js");return{diagram:e}},__vite__mapDeps([13,14]));return{id:g5,diagram:i}},"loader"),yV={id:g5,detector:gV,loader:mV},bV=yV,m5="flowchart",xV=L((i,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(i)},"detector"),vV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-OQ_IRMqG.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:m5,diagram:i}},"loader"),_V={id:m5,detector:xV,loader:vV},CV=_V,y5="flowchart-v2",kV=L((i,e)=>{var r,n,a;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(i)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(i))},"detector"),wV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-OQ_IRMqG.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:y5,diagram:i}},"loader"),SV={id:y5,detector:kV,loader:wV},TV=SV,b5="er",EV=L(i=>/^\s*erDiagram/.test(i),"detector"),NV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-CjWWTCWe.js");return{diagram:e}},__vite__mapDeps([20,17,18,19]));return{id:b5,diagram:i}},"loader"),AV={id:b5,detector:EV,loader:NV},MV=AV,x5="gitGraph",BV=L(i=>/^\s*gitGraph/.test(i),"detector"),LV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-BxfeiCqm.js");return{diagram:e}},__vite__mapDeps([21,22,23,24,9,7]));return{id:x5,diagram:i}},"loader"),OV={id:x5,detector:BV,loader:LV},RV=OV,v5="gantt",DV=L(i=>/^\s*gantt/.test(i),"detector"),jV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-DPTSBcnu.js");return{diagram:e}},__vite__mapDeps([25,26,27]));return{id:v5,diagram:i}},"loader"),FV={id:v5,detector:DV,loader:jV},IV=FV,_5="info",$V=L(i=>/^\s*info/.test(i),"detector"),zV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-CcFhyaQp.js");return{diagram:e}},__vite__mapDeps([28,24,9,7]));return{id:_5,diagram:i}},"loader"),PV={id:_5,detector:$V,loader:zV},C5="pie",qV=L(i=>/^\s*pie/.test(i),"detector"),UV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-PgIrKPnB.js");return{diagram:e}},__vite__mapDeps([29,22,24,9,7,30]));return{id:C5,diagram:i}},"loader"),HV={id:C5,detector:qV,loader:UV},k5="quadrantChart",WV=L(i=>/^\s*quadrantChart/.test(i),"detector"),GV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-C30tZOBh.js");return{diagram:e}},__vite__mapDeps([31,26,27]));return{id:k5,diagram:i}},"loader"),YV={id:k5,detector:WV,loader:GV},KV=YV,w5="xychart",VV=L(i=>/^\s*xychart(-beta)?/.test(i),"detector"),XV=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-SwtVQYTW.js");return{diagram:e}},__vite__mapDeps([32,26,27]));return{id:w5,diagram:i}},"loader"),ZV={id:w5,detector:VV,loader:XV},QV=ZV,S5="requirement",JV=L(i=>/^\s*requirement(Diagram)?/.test(i),"detector"),tX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-D3vhi-ZB.js");return{diagram:e}},__vite__mapDeps([33,17,18]));return{id:S5,diagram:i}},"loader"),eX={id:S5,detector:JV,loader:tX},iX=eX,T5="sequence",rX=L(i=>/^\s*sequenceDiagram/.test(i),"detector"),nX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-DlBqk4uQ.js");return{diagram:e}},__vite__mapDeps([34,14,23]));return{id:T5,diagram:i}},"loader"),aX={id:T5,detector:rX,loader:nX},sX=aX,E5="class",oX=L((i,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(i)},"detector"),lX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-sTJpbWV4.js");return{diagram:e}},__vite__mapDeps([35,36,16,14,17,18]));return{id:E5,diagram:i}},"loader"),cX={id:E5,detector:oX,loader:lX},hX=cX,N5="classDiagram",uX=L((i,e)=>{var r;return/^\s*classDiagram/.test(i)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(i)},"detector"),dX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-sTJpbWV4.js");return{diagram:e}},__vite__mapDeps([37,36,16,14,17,18]));return{id:N5,diagram:i}},"loader"),fX={id:N5,detector:uX,loader:dX},pX=fX,A5="state",gX=L((i,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(i)},"detector"),mX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-B6T9ib8G.js");return{diagram:e}},__vite__mapDeps([38,39,17,18,6,7,8,9]));return{id:A5,diagram:i}},"loader"),yX={id:A5,detector:gX,loader:mX},bX=yX,M5="stateDiagram",xX=L((i,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(i)||/^\s*stateDiagram/.test(i)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),vX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-CN0hAOp7.js");return{diagram:e}},__vite__mapDeps([40,39,17,18]));return{id:M5,diagram:i}},"loader"),_X={id:M5,detector:xX,loader:vX},CX=_X,B5="journey",kX=L(i=>/^\s*journey/.test(i),"detector"),wX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-CU4EYedt.js");return{diagram:e}},__vite__mapDeps([41,16,14,30]));return{id:B5,diagram:i}},"loader"),SX={id:B5,detector:kX,loader:wX},TX=SX,EX=L((i,e,r)=>{Nt.debug(`rendering svg for syntax error
|
|
403
|
+
`);const n=X9(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),eB(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"),L5={draw:EX},NX=L5,AX={db:{},renderer:L5,parser:{parse:L(()=>{},"parse")}},MX=AX,O5="flowchart-elk",BX=L((i,e={})=>{var r;return/^\s*flowchart-elk/.test(i)||/^\s*(flowchart|graph)/.test(i)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),LX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-OQ_IRMqG.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:O5,diagram:i}},"loader"),OX={id:O5,detector:BX,loader:LX},RX=OX,R5="timeline",DX=L(i=>/^\s*timeline/.test(i),"detector"),jX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-CHTQqVpC.js");return{diagram:e}},__vite__mapDeps([42,30]));return{id:R5,diagram:i}},"loader"),FX={id:R5,detector:DX,loader:jX},IX=FX,D5="mindmap",$X=L(i=>/^\s*mindmap/.test(i),"detector"),zX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-fVIbdlXp.js");return{diagram:e}},__vite__mapDeps([43,17,18]));return{id:D5,diagram:i}},"loader"),PX={id:D5,detector:$X,loader:zX},qX=PX,j5="kanban",UX=L(i=>/^\s*kanban/.test(i),"detector"),HX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-BxXqVmz1.js");return{diagram:e}},__vite__mapDeps([44,16]));return{id:j5,diagram:i}},"loader"),WX={id:j5,detector:UX,loader:HX},GX=WX,F5="sankey",YX=L(i=>/^\s*sankey(-beta)?/.test(i),"detector"),KX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-Cmbs-PxO.js");return{diagram:e}},[]);return{id:F5,diagram:i}},"loader"),VX={id:F5,detector:YX,loader:KX},XX=VX,I5="packet",ZX=L(i=>/^\s*packet(-beta)?/.test(i),"detector"),QX=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-C8P5-4A3.js");return{diagram:e}},__vite__mapDeps([45,22,24,9,7]));return{id:I5,diagram:i}},"loader"),JX={id:I5,detector:ZX,loader:QX},$5="radar",tZ=L(i=>/^\s*radar-beta/.test(i),"detector"),eZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-B1vJLt5b.js");return{diagram:e}},__vite__mapDeps([46,22,24,9,7]));return{id:$5,diagram:i}},"loader"),iZ={id:$5,detector:tZ,loader:eZ},z5="block",rZ=L(i=>/^\s*block(-beta)?/.test(i),"detector"),nZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-DRTa0DpJ.js");return{diagram:e}},__vite__mapDeps([47,16,10,6,7,19]));return{id:z5,diagram:i}},"loader"),aZ={id:z5,detector:rZ,loader:nZ},sZ=aZ,P5="treeView",oZ=L(i=>/^\s*treeView-beta/.test(i),"detector"),lZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-YrlF3B5a.js");return{diagram:e}},__vite__mapDeps([48,22,23,24,9,7]));return{id:P5,diagram:i}},"loader"),cZ={id:P5,detector:oZ,loader:lZ},hZ=cZ,q5="architecture",uZ=L(i=>/^\s*architecture/.test(i),"detector"),dZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-BIgEpM4v.js");return{diagram:e}},__vite__mapDeps([49,22,24,9,7,12]));return{id:q5,diagram:i}},"loader"),fZ={id:q5,detector:uZ,loader:dZ},pZ=fZ,U5="ishikawa",gZ=L(i=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),mZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-9QJeD00p.js");return{diagram:e}},[]);return{id:U5,diagram:i}},"loader"),yZ={id:U5,detector:gZ,loader:mZ},H5="venn",bZ=L(i=>/^\s*venn-beta/.test(i),"detector"),xZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-tWl34rwo.js");return{diagram:e}},[]);return{id:H5,diagram:i}},"loader"),vZ={id:H5,detector:bZ,loader:xZ},_Z=vZ,W5="treemap",CZ=L(i=>/^\s*treemap/.test(i),"detector"),kZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-DHONF1OD.js");return{diagram:e}},__vite__mapDeps([50,18,22,24,9,7,27]));return{id:W5,diagram:i}},"loader"),wZ={id:W5,detector:CZ,loader:kZ},G5="wardley-beta",SZ=L(i=>/^\s*wardley-beta/i.test(i),"detector"),TZ=L(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-KhVWSzPf.js");return{diagram:e}},__vite__mapDeps([51,22,24,9,7]));return{id:G5,diagram:i}},"loader"),EZ={id:G5,detector:SZ,loader:TZ},NZ=EZ,gE=!1,_m=L(()=>{gE||(gE=!0,hg("error",MX,i=>i.toLowerCase().trim()==="error"),hg("---",{db:{clear:L(()=>{},"clear")},styles:{},renderer:{draw:L(()=>{},"draw")},parser:{parse:L(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:L(()=>null,"init")},i=>i.toLowerCase().trimStart().startsWith("---")),Wx(RX,qX,pZ),Wx(bV,GX,pX,hX,MV,IV,PV,HV,iX,sX,TV,CV,IX,RV,CX,bX,TX,KV,XX,JX,QV,sZ,hZ,iZ,yZ,wZ,_Z,NZ))},"addDiagrams"),AZ=L(async()=>{Nt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Dl).map(async([r,{detector:n,loader:a}])=>{if(a)try{Vx(r)}catch{try{const{diagram:o,id:c}=await a();hg(c,o,n)}catch(o){throw Nt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Dl[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"),MZ="graphics-document document";function Y5(i,e){i.attr("role",MZ),e!==""&&i.attr("aria-roledescription",e)}L(Y5,"setA11yDiagramInfo");function K5(i,e,r,n){if(i.insert!==void 0){if(r){const a=`chart-desc-${n}`;i.attr("aria-describedby",a),i.insert("desc",":first-child").attr("id",a).text(r)}if(e){const a=`chart-title-${n}`;i.attr("aria-labelledby",a),i.insert("title",":first-child").attr("id",a).text(e)}}}L(K5,"addSVGa11yTitleDescription");var Bl,Hv=(Bl=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=qi(),a=D1(e,n);e=JW(e)+`
|
|
404
|
+
`;try{Vx(a)}catch{const g=A6(a);if(!g)throw new PM(`Diagram ${a} not found.`);const{id:x,diagram:y}=await g();hg(x,y)}const{db:o,parser:c,renderer:h,init:u}=Vx(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 Bl(a,e,o,c,h)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},L(Bl,"Diagram"),Bl),mE=[],BZ=L(()=>{mE.forEach(i=>{i()}),mE=[]},"attachFunctions"),LZ=L(i=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function V5(i){const e=i.match(zM);if(!e)return{text:i,metadata:{}};let r=rU(e[1],{schema:iU})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:i.slice(e[0].length),metadata:n}}L(V5,"extractFrontMatter");var OZ=L(i=>i.replace(/\r\n?/g,`
|
|
405
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),RZ=L(i=>{const{text:e,metadata:r}=V5(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"),DZ=L(i=>{const e=ba.detectInit(i)??{},r=ba.detectDirective(i,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:zW(i),directive:e}},"processDirectives");function F_(i){const e=OZ(i),r=RZ(e),n=DZ(r.text),a=v_(r.config,n.directive);return i=LZ(n.text),{code:i,title:r.title,config:a}}L(F_,"preprocessDiagram");function X5(i){const e=new TextEncoder().encode(i),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}L(X5,"toBase64");var jZ=5e4,FZ="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",IZ="sandbox",$Z="loose",zZ="http://www.w3.org/2000/svg",PZ="http://www.w3.org/1999/xlink",qZ="http://www.w3.org/1999/xhtml",UZ="100%",HZ="100%",WZ="border:0;margin:0;",GZ="margin:0",YZ="allow-top-navigation-by-user-activation allow-popups",KZ='The "iframe" tag is not supported by your browser.',VZ=["foreignobject"],XZ=["dominant-baseline"];function I_(i){const e=F_(i);return lg(),rz(e.config??{}),e}L(I_,"processAndSetConfigs");async function Z5(i,e){_m();try{const{code:r,config:n}=I_(i);return{diagramType:(await J5(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}L(Z5,"parse");var yE=L((i,e,r=[])=>`
|
|
406
|
+
.${i} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),ZZ=L((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=>{pE(h.styles)||c.forEach(u=>{r+=yE(h.id,u,h.styles)}),pE(h.textStyles)||(r+=yE(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),QZ=L((i,e,r,n)=>{const a=ZZ(i,r),o=Cz(e,a,{...i.themeVariables,theme:i.theme,look:i.look},n);return $v(QK(`${n}{${o}}`),tV)},"createUserStyles"),JZ=L((i="",e,r)=>{let n=i;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=zl(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),tQ=L((i="",e)=>{var a,o;const r=(o=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":HZ,n=X5(`<body style="${GZ}">${i}</body>`);return`<iframe style="width:${UZ};height:${r};${WZ}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${YZ}">
|
|
410
|
+
${KZ}
|
|
411
|
+
</iframe>`},"putIntoIFrame"),bE=L((i,e,r,n,a)=>{const o=i.append("div");o.attr("id",r),n&&o.attr("style",n);const c=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",zZ);return a&&c.attr("xmlns:xlink",a),c.append("g"),i},"appendDivSvgG");function Wv(i,e){return i.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}L(Wv,"sandboxedIframe");var eQ=L((i,e,r,n)=>{var a,o,c;(a=i.getElementById(e))==null||a.remove(),(o=i.getElementById(r))==null||o.remove(),(c=i.getElementById(n))==null||c.remove()},"removeExistingElements"),iQ=L(async function(i,e,r){var U,K,$,H,j,q;_m();const n=I_(e);e=n.code;const a=qi();Nt.debug(a),e.length>((a==null?void 0:a.maxTextSize)??jZ)&&(e=FZ);const o="#"+i,c="i"+i,h="#"+c,u="d"+i,d="#"+u,f=L(()=>{const et=ue(x?h:d).node();et&&"remove"in et&&et.remove()},"removeTempElements");let g=ue("body");const x=a.securityLevel===IZ,y=a.securityLevel===$Z,v=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),x){const G=Wv(ue(r),c);g=ue(G.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ue(r);bE(g,i,u,`font-family: ${v}`,PZ)}else{if(eQ(document,i,u,c),x){const G=Wv(ue("body"),c);g=ue(G.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ue("body");bE(g,i,u)}let _,C;try{_=await Hv.fromText(e,{title:n.title})}catch(G){if(a.suppressErrorRendering)throw f(),G;_=await Hv.fromText("error"),C=G}const k=g.select(d).node(),T=_.type,E=k.firstChild,N=E.firstChild,B=(K=(U=_.renderer).getClasses)==null?void 0:K.call(U,e,_),O=QZ(a,T,B,o),A=document.createElement("style");A.innerHTML=O,E.insertBefore(A,N);try{await _.renderer.draw(e,i,"11.14.0",_)}catch(G){throw a.suppressErrorRendering?f():NX.draw(e,i,"11.14.0"),G}const M=g.select(`${d} svg`),F=(H=($=_.db).getAccTitle)==null?void 0:H.call($),D=(q=(j=_.db).getAccDescription)==null?void 0:q.call(j);tD(T,M,F,D),g.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",qZ);let z=g.select(d).node().innerHTML;if(Nt.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),z=JZ(z,x,Fs(a.arrowMarkerAbsolute)),x){const G=g.select(d+" svg").node();z=tQ(z,G)}else y||(z=Do.sanitize(z,{ADD_TAGS:VZ,ADD_ATTR:XZ,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(BZ(),C)throw C;return f(),{diagramType:T,svg:z,bindFunctions:_.db.bindFunctions}},"render");function Q5(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),ez(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"?tz(e):GM();R1(r.logLevel),_m()}L(Q5,"initialize");var J5=L((i,e={})=>{const{code:r}=F_(i);return Hv.fromText(r,e)},"getDiagramFromText");function tD(i,e,r,n){Y5(e,i),K5(e,r,n,e.attr("id"))}L(tD,"addA11yInfo");var ql=Object.freeze({render:iQ,parse:Z5,getDiagramFromText:J5,initialize:Q5,getConfig:qi,setConfig:YM,getSiteConfig:GM,updateSiteConfig:iz,reset:L(()=>{lg()},"reset"),globalReset:L(()=>{lg(gh)},"globalReset"),defaultConfig:gh});R1(qi().logLevel);lg(qi());var rQ=L((i,e,r)=>{Nt.warn(i),x_(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"),eD=L(async function(i={querySelector:".mermaid"}){try{await nQ(i)}catch(e){if(x_(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"),nQ=L(async function({postRenderCallback:i,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=ql.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)),ql.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=bR(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 aD(d,c,u);u.innerHTML=g,i&&await i(d),x&&x(u)}catch(g){rQ(g,h,jn.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),iD=L(function(i){ql.initialize(i)},"initialize"),aQ=L(async function(i,e,r){Nt.warn("mermaid.init is deprecated. Please use run instead."),i&&iD(i);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await eD(n)},"init"),sQ=L(async(i,{lazyLoad:e=!0}={})=>{_m(),Wx(...i),e===!1&&await AZ()},"registerExternalDiagrams"),rD=L(function(){if(jn.startOnLoad){const{startOnLoad:i}=ql.getConfig();i&&jn.run().catch(e=>Nt.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",rD,!1);var oQ=L(function(i){jn.parseError=i},"setParseErrorHandler"),zg=[],a0=!1,nD=L(async()=>{if(!a0){for(a0=!0;zg.length>0;){const i=zg.shift();if(i)try{await i()}catch(e){Nt.error("Error executing queue",e)}}a0=!1}},"executeQueue"),lQ=L(async(i,e)=>new Promise((r,n)=>{const a=L(()=>new Promise((o,c)=>{ql.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");zg.push(a),nD().catch(n)}),"parse"),aD=L((i,e,r)=>new Promise((n,a)=>{const o=L(()=>new Promise((c,h)=>{ql.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");zg.push(o),nD().catch(a)}),"render"),cQ=L(()=>Object.keys(Dl).map(i=>({id:i})),"getRegisteredDiagramsMetadata"),jn={startOnLoad:!0,mermaidAPI:ql,parse:lQ,render:aD,init:aQ,run:eD,registerExternalDiagrams:sQ,registerLayoutLoaders:c5,initialize:iD,parseError:void 0,contentLoaded:rD,setParseErrorHandler:oQ,detectType:D1,registerIconPacks:sY,getRegisteredDiagramsMetadata:cQ},$_=jn;/*! Check if previously processed *//*!
|
|
412
|
+
* Wait for document loaded before starting the execution
|
|
413
|
+
*/let xE=null;function hQ(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 sD(i){xE!==i&&($_.initialize(hQ(i)),xE=i)}function uQ(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 oD(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(uQ);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 dQ(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 $_.render(u,h);f.innerHTML=g;const x=f.querySelector("svg");x&&(x.removeAttribute("height"),x.style.maxWidth="100%",x.style.height="auto",oD(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 fQ(i,e,r,n="mmd"){Y.useEffect(()=>{const a=i.current;if(!a||!e)return;sD(r);let o=!1;return queueMicrotask(()=>{o||dQ(a,n)}),()=>{o=!0}},[i,e,r,n])}var s0,vE;function pQ(){if(vE)return s0;vE=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],he=typeof Dt;(he==="object"||he==="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 he in tt)Dt[he]=tt[he];return wt.forEach(function(he){for(const ai in he)Dt[ai]=he[ai]}),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((he,ai)=>`${he}${"_".repeat(ai+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(he=>this._walk(wt,he)),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 he=wt.root;Dt&&(he.scope=`language:${Dt}`),this.add(he)}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 _("(?=",tt,")")}function y(tt){return _("(?:",tt,")*")}function v(tt){return _("(?:",tt,")?")}function _(...tt){return tt.map(Dt=>g(Dt)).join("")}function C(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"("+(C(tt).capture?"":"?:")+tt.map(he=>g(he)).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 B(tt,{joinWith:wt}){let Dt=0;return tt.map(he=>{Dt+=1;const ai=Dt;let pe=g(he),Wt="";for(;pe.length>0;){const Pt=N.exec(pe);if(!Pt){Wt+=pe;break}Wt+=pe.substring(0,Pt.index),pe=pe.substring(Pt.index+Pt[0].length),Pt[0][0]==="\\"&&Pt[1]?Wt+="\\"+String(Number(Pt[1])+ai):(Wt+=Pt[0],Pt[0]==="("&&Dt++)}return Wt}).map(he=>`(${he})`).join(wt)}const O=/\b\B/,A="[a-zA-Z]\\w*",M="[a-zA-Z_]\\w*",F="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",z="\\b(0b[01]+)",U="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",K=(tt={})=>{const wt=/^#![ ]*\//;return tt.binary&&(tt.begin=_(wt,/.*\b/,tt.binary,/\b.*/)),n({scope:"meta",begin:wt,end:/$/,relevance:0,"on:begin":(Dt,he)=>{Dt.index!==0&&he.ignoreMatch()}},tt)},$={begin:"\\\\[\\s\\S]",relevance:0},H={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[$]},j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[$]},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 he=n({scope:"comment",begin:tt,end:wt,contains:[]},Dt);he.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 ai=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 he.contains.push({begin:_(/[ ]+/,"(",ai,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),he},et=G("//","$"),at=G("/\\*","\\*/"),W=G("#","$"),rt={scope:"number",begin:F,relevance:0},ft={scope:"number",begin:D,relevance:0},st={scope:"number",begin:z,relevance:0},Ct={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[$,{begin:/\[/,end:/\]/,relevance:0,contains:[$]}]},ct={scope:"title",begin:A,relevance:0},X={scope:"title",begin:M,relevance:0},Z={begin:"\\.\\s*"+M,relevance:0};var ot=Object.freeze({__proto__:null,APOS_STRING_MODE:H,BACKSLASH_ESCAPE:$,BINARY_NUMBER_MODE:st,BINARY_NUMBER_RE:z,COMMENT:G,C_BLOCK_COMMENT_MODE:at,C_LINE_COMMENT_MODE:et,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:W,IDENT_RE:A,MATCH_NOTHING_RE:O,METHOD_GUARD:Z,NUMBER_MODE:rt,NUMBER_RE:F,PHRASAL_WORDS_MODE:q,QUOTE_STRING_MODE:j,REGEXP_MODE:Ct,RE_STARTERS_RE:U,SHEBANG:K,TITLE_MODE:ct,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 jt(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 qt(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 Gt(tt,wt){tt.relevance===void 0&&(tt.relevance=1)}const zt=(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(he=>{delete tt[he]}),tt.keywords=Dt.keywords,tt.begin=_(Dt.beforeMatch,x(Dt.begin)),tt.starts={relevance:0,contains:[Object.assign(Dt,{endsParent:!0})]},tt.relevance=0,delete Dt.beforeMatch},ye=["of","and","for","in","not","or","if","then","parent","list","value"],Ne="keyword";function ve(tt,wt,Dt=Ne){const he=Object.create(null);return typeof tt=="string"?ai(Dt,tt.split(" ")):Array.isArray(tt)?ai(Dt,tt):Object.keys(tt).forEach(function(pe){Object.assign(he,ve(tt[pe],wt,pe))}),he;function ai(pe,Wt){wt&&(Wt=Wt.map(Pt=>Pt.toLowerCase())),Wt.forEach(function(Pt){const le=Pt.split("|");he[le[0]]=[pe,pi(le[0],le[1])]})}}function pi(tt,wt){return wt?Number(wt):Li(tt)?0:1}function Li(tt){return ye.includes(tt.toLowerCase())}const Ti={},fe=tt=>{console.error(tt)},_i=(tt,...wt)=>{console.log(`WARN: ${tt}`,...wt)},$e=(tt,wt)=>{Ti[`${tt}/${wt}`]||(console.log(`Deprecated as of ${tt}. ${wt}`),Ti[`${tt}/${wt}`]=!0)},Ue=new Error;function Fe(tt,wt,{key:Dt}){let he=0;const ai=tt[Dt],pe={},Wt={};for(let Pt=1;Pt<=wt.length;Pt++)Wt[Pt+he]=ai[Pt],pe[Pt+he]=!0,he+=T(wt[Pt-1]);tt[Dt]=Wt,tt[Dt]._emit=pe,tt[Dt]._multi=!0}function Ii(tt){if(Array.isArray(tt.begin)){if(tt.skip||tt.excludeBegin||tt.returnBegin)throw fe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ue;if(typeof tt.beginScope!="object"||tt.beginScope===null)throw fe("beginScope must be object"),Ue;Fe(tt,tt.begin,{key:"beginScope"}),tt.begin=B(tt.begin,{joinWith:""})}}function Oi(tt){if(Array.isArray(tt.end)){if(tt.skip||tt.excludeEnd||tt.returnEnd)throw fe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ue;if(typeof tt.endScope!="object"||tt.endScope===null)throw fe("endScope must be object"),Ue;Fe(tt,tt.end,{key:"endScope"}),tt.end=B(tt.end,{joinWith:""})}}function xr(tt){tt.scope&&typeof tt.scope=="object"&&tt.scope!==null&&(tt.beginScope=tt.scope,delete tt.scope)}function Cn(tt){xr(tt),typeof tt.beginScope=="string"&&(tt.beginScope={_wrap:tt.beginScope}),typeof tt.endScope=="string"&&(tt.endScope={_wrap:tt.endScope}),Ii(tt),Oi(tt)}function $i(tt){function wt(Wt,Pt){return new RegExp(g(Wt),"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,le){le.position=this.position++,this.matchIndexes[this.matchAt]=le,this.regexes.push([le,Pt]),this.matchAt+=T(Pt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Pt=this.regexes.map(le=>le[1]);this.matcherRe=wt(B(Pt,{joinWith:"|"}),!0),this.lastIndex=0}exec(Pt){this.matcherRe.lastIndex=this.lastIndex;const le=this.matcherRe.exec(Pt);if(!le)return null;const si=le.findIndex((on,Gr)=>Gr>0&&on!==void 0),gi=this.matchIndexes[si];return le.splice(0,si),Object.assign(le,gi)}}class he{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 le=new Dt;return this.rules.slice(Pt).forEach(([si,gi])=>le.addRule(si,gi)),le.compile(),this.multiRegexes[Pt]=le,le}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Pt,le){this.rules.push([Pt,le]),le.type==="begin"&&this.count++}exec(Pt){const le=this.getMatcher(this.regexIndex);le.lastIndex=this.lastIndex;let si=le.exec(Pt);if(this.resumingScanAtSamePosition()&&!(si&&si.index===this.lastIndex)){const gi=this.getMatcher(0);gi.lastIndex=this.lastIndex+1,si=gi.exec(Pt)}return si&&(this.regexIndex+=si.position+1,this.regexIndex===this.count&&this.considerAll()),si}}function ai(Wt){const Pt=new he;return Wt.contains.forEach(le=>Pt.addRule(le.begin,{rule:le,type:"begin"})),Wt.terminatorEnd&&Pt.addRule(Wt.terminatorEnd,{type:"end"}),Wt.illegal&&Pt.addRule(Wt.illegal,{type:"illegal"}),Pt}function pe(Wt,Pt){const le=Wt;if(Wt.isCompiled)return le;[At,Rt,Cn,zt].forEach(gi=>gi(Wt,Pt)),tt.compilerExtensions.forEach(gi=>gi(Wt,Pt)),Wt.__beforeBegin=null,[jt,qt,Gt].forEach(gi=>gi(Wt,Pt)),Wt.isCompiled=!0;let si=null;return typeof Wt.keywords=="object"&&Wt.keywords.$pattern&&(Wt.keywords=Object.assign({},Wt.keywords),si=Wt.keywords.$pattern,delete Wt.keywords.$pattern),si=si||/\w+/,Wt.keywords&&(Wt.keywords=ve(Wt.keywords,tt.case_insensitive)),le.keywordPatternRe=wt(si,!0),Pt&&(Wt.begin||(Wt.begin=/\B|\b/),le.beginRe=wt(le.begin),!Wt.end&&!Wt.endsWithParent&&(Wt.end=/\B|\b/),Wt.end&&(le.endRe=wt(le.end)),le.terminatorEnd=g(le.end)||"",Wt.endsWithParent&&Pt.terminatorEnd&&(le.terminatorEnd+=(Wt.end?"|":"")+Pt.terminatorEnd)),Wt.illegal&&(le.illegalRe=wt(Wt.illegal)),Wt.contains||(Wt.contains=[]),Wt.contains=[].concat(...Wt.contains.map(function(gi){return Ke(gi==="self"?Wt:gi)})),Wt.contains.forEach(function(gi){pe(gi,le)}),Wt.starts&&pe(Wt.starts,Pt),le.matcher=ai(le),le}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||{}),pe(tt)}function De(tt){return tt?tt.endsWithParent||De(tt.starts):!1}function Ke(tt){return tt.variants&&!tt.cachedVariants&&(tt.cachedVariants=tt.variants.map(function(wt){return n(tt,{variants:null},wt)})),tt.cachedVariants?tt.cachedVariants:De(tt)?n(tt,{starts:tt.starts?n(tt.starts):null}):Object.isFrozen(tt)?n(tt):tt}var Be="11.11.1";class hr extends Error{constructor(wt,Dt){super(wt),this.name="HTMLInjectionError",this.html=Dt}}const Ci=r,Zi=n,Ae=Symbol("nomatch"),er=7,wr=function(tt){const wt=Object.create(null),Dt=Object.create(null),he=[];let ai=!0;const pe="Could not find the language '{}', did you forget to load/include a language module?",Wt={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 le(dt){return Pt.noHighlightRe.test(dt)}function si(dt){let Lt=dt.className+" ";Lt+=dt.parentNode?dt.parentNode.className:"";const It=Pt.languageDetectRe.exec(Lt);if(It){const ie=ur(It[1]);return ie||(_i(pe.replace("{}",It[1])),_i("Falling back to no-highlight mode for this block.",dt)),ie?It[1]:"no-highlight"}return Lt.split(/\s+/).find(ie=>le(ie)||ur(ie))}function gi(dt,Lt,It){let ie="",ze="";typeof Lt=="object"?(ie=dt,It=Lt.ignoreIllegals,ze=Lt.language):($e("10.7.0","highlight(lang, code, ...args) has been deprecated."),$e("10.7.0",`Please use highlight(code, options) instead.
|
|
414
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),ze=dt,ie=Lt),It===void 0&&(It=!0);const li={code:ie,language:ze};V("before:highlight",li);const Ve=li.result?li.result:on(li.language,li.code,It);return Ve.code=li.code,V("after:highlight",Ve),Ve}function on(dt,Lt,It,ie){const ze=Object.create(null);function li(Ft,Jt){return Ft.keywords[Jt]}function Ve(){if(!$t.keywords){Ie.addText(He);return}let Ft=0;$t.keywordPatternRe.lastIndex=0;let Jt=$t.keywordPatternRe.exec(He),Ee="";for(;Jt;){Ee+=He.substring(Ft,Jt.index);const We=Mt.case_insensitive?Jt[0].toLowerCase():Jt[0],Pi=li($t,We);if(Pi){const[Un,Ah]=Pi;if(Ie.addText(Ee),Ee="",ze[We]=(ze[We]||0)+1,ze[We]<=er&&(Dr+=Ah),Un.startsWith("_"))Ee+=Jt[0];else{const tf=Mt.classNameAliases[Un]||Un;Wi(Jt[0],tf)}}else Ee+=Jt[0];Ft=$t.keywordPatternRe.lastIndex,Jt=$t.keywordPatternRe.exec(He)}Ee+=He.substring(Ft),Ie.addText(Ee)}function zi(){if(He==="")return;let Ft=null;if(typeof $t.subLanguage=="string"){if(!wt[$t.subLanguage]){Ie.addText(He);return}Ft=on($t.subLanguage,He,!0,Je[$t.subLanguage]),Je[$t.subLanguage]=Ft._top}else Ft=ir(He,$t.subLanguage.length?$t.subLanguage:null);$t.relevance>0&&(Dr+=Ft.relevance),Ie.__addSublanguage(Ft._emitter,Ft.language)}function Ce(){$t.subLanguage!=null?zi():Ve(),He=""}function Wi(Ft,Jt){Ft!==""&&(Ie.startScope(Jt),Ie.addText(Ft),Ie.endScope())}function zn(Ft,Jt){let Ee=1;const We=Jt.length-1;for(;Ee<=We;){if(!Ft._emit[Ee]){Ee++;continue}const Pi=Mt.classNameAliases[Ft[Ee]]||Ft[Ee],Un=Jt[Ee];Pi?Wi(Un,Pi):(He=Un,Ve(),He=""),Ee++}}function la(Ft,Jt){return Ft.scope&&typeof Ft.scope=="string"&&Ie.openNode(Mt.classNameAliases[Ft.scope]||Ft.scope),Ft.beginScope&&(Ft.beginScope._wrap?(Wi(He,Mt.classNameAliases[Ft.beginScope._wrap]||Ft.beginScope._wrap),He=""):Ft.beginScope._multi&&(zn(Ft.beginScope,Jt),He="")),$t=Object.create(Ft,{parent:{value:$t}}),$t}function Ps(Ft,Jt,Ee){let We=E(Ft.endRe,Ee);if(We){if(Ft["on:end"]){const Pi=new e(Ft);Ft["on:end"](Jt,Pi),Pi.isMatchIgnored&&(We=!1)}if(We){for(;Ft.endsParent&&Ft.parent;)Ft=Ft.parent;return Ft}}if(Ft.endsWithParent)return Ps(Ft.parent,Jt,Ee)}function Ja(Ft){return $t.matcher.regexIndex===0?(He+=Ft[0],1):(Us=!0,0)}function Ho(Ft){const Jt=Ft[0],Ee=Ft.rule,We=new e(Ee),Pi=[Ee.__beforeBegin,Ee["on:begin"]];for(const Un of Pi)if(Un&&(Un(Ft,We),We.isMatchIgnored))return Ja(Jt);return Ee.skip?He+=Jt:(Ee.excludeBegin&&(He+=Jt),Ce(),!Ee.returnBegin&&!Ee.excludeBegin&&(He=Jt)),la(Ee,Ft),Ee.returnBegin?0:Jt.length}function Tr(Ft){const Jt=Ft[0],Ee=Lt.substring(Ft.index),We=Ps($t,Ft,Ee);if(!We)return Ae;const Pi=$t;$t.endScope&&$t.endScope._wrap?(Ce(),Wi(Jt,$t.endScope._wrap)):$t.endScope&&$t.endScope._multi?(Ce(),zn($t.endScope,Ft)):Pi.skip?He+=Jt:(Pi.returnEnd||Pi.excludeEnd||(He+=Jt),Ce(),Pi.excludeEnd&&(He=Jt));do $t.scope&&Ie.closeNode(),!$t.skip&&!$t.subLanguage&&(Dr+=$t.relevance),$t=$t.parent;while($t!==We.parent);return We.starts&&la(We.starts,Ft),Pi.returnEnd?0:Jt.length}function Pn(){const Ft=[];for(let Jt=$t;Jt!==Mt;Jt=Jt.parent)Jt.scope&&Ft.unshift(Jt.scope);Ft.forEach(Jt=>Ie.openNode(Jt))}let mt={};function Bt(Ft,Jt){const Ee=Jt&&Jt[0];if(He+=Ft,Ee==null)return Ce(),0;if(mt.type==="begin"&&Jt.type==="end"&&mt.index===Jt.index&&Ee===""){if(He+=Lt.slice(Jt.index,Jt.index+1),!ai){const We=new Error(`0 width match regex (${dt})`);throw We.languageName=dt,We.badRule=mt.rule,We}return 1}if(mt=Jt,Jt.type==="begin")return Ho(Jt);if(Jt.type==="illegal"&&!It){const We=new Error('Illegal lexeme "'+Ee+'" for mode "'+($t.scope||"<unnamed>")+'"');throw We.mode=$t,We}else if(Jt.type==="end"){const We=Tr(Jt);if(We!==Ae)return We}if(Jt.type==="illegal"&&Ee==="")return He+=`
|
|
415
|
+
`,1;if(qs>1e5&&qs>Jt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return He+=Ee,Ee.length}const Mt=ur(dt);if(!Mt)throw fe(pe.replace("{}",dt)),new Error('Unknown language: "'+dt+'"');const Ut=$i(Mt);let Le="",$t=ie||Ut;const Je={},Ie=new Pt.__emitter(Pt);Pn();let He="",Dr=0,qn=0,qs=0,Us=!1;try{if(Mt.__emitTokens)Mt.__emitTokens(Lt,Ie);else{for($t.matcher.considerAll();;){qs++,Us?Us=!1:$t.matcher.considerAll(),$t.matcher.lastIndex=qn;const Ft=$t.matcher.exec(Lt);if(!Ft)break;const Jt=Lt.substring(qn,Ft.index),Ee=Bt(Jt,Ft);qn=Ft.index+Ee}Bt(Lt.substring(qn))}return Ie.finalize(),Le=Ie.toHTML(),{language:dt,value:Le,relevance:Dr,illegal:!1,_emitter:Ie,_top:$t}}catch(Ft){if(Ft.message&&Ft.message.includes("Illegal"))return{language:dt,value:Ci(Lt),illegal:!0,relevance:0,_illegalBy:{message:Ft.message,index:qn,context:Lt.slice(qn-100,qn+100),mode:Ft.mode,resultSoFar:Le},_emitter:Ie};if(ai)return{language:dt,value:Ci(Lt),illegal:!1,relevance:0,errorRaised:Ft,_emitter:Ie,_top:$t};throw Ft}}function Gr(dt){const Lt={value:Ci(dt),illegal:!1,relevance:0,_top:Wt,_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),ie=Lt.filter(ur).filter(ln).map(Ce=>on(Ce,dt,!1));ie.unshift(It);const ze=ie.sort((Ce,Wi)=>{if(Ce.relevance!==Wi.relevance)return Wi.relevance-Ce.relevance;if(Ce.language&&Wi.language){if(ur(Ce.language).supersetOf===Wi.language)return 1;if(ur(Wi.language).supersetOf===Ce.language)return-1}return 0}),[li,Ve]=ze,zi=li;return zi.secondBest=Ve,zi}function rr(dt,Lt,It){const ie=Lt&&Dt[Lt]||It;dt.classList.add("hljs"),dt.classList.add(`language-${ie}`)}function ki(dt){let Lt=null;const It=si(dt);if(le(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 ie=Lt.textContent,ze=It?gi(ie,{language:It,ignoreIllegals:!0}):ir(ie);dt.innerHTML=ze.value,dt.dataset.highlighted="yes",rr(dt,It,ze.language),dt.result={language:ze.language,re:ze.relevance,relevance:ze.relevance},ze.secondBest&&(dt.secondBest={language:ze.secondBest.language,relevance:ze.secondBest.relevance}),V("after:highlightElement",{el:dt,result:ze,text:ie})}function Hi(dt){Pt=Zi(Pt,dt)}const kn=()=>{Sn(),$e("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function In(){Sn(),$e("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(ki)}function Sr(dt,Lt){let It=null;try{It=Lt(tt)}catch(ie){if(fe("Language definition for '{}' could not be registered.".replace("{}",dt)),ai)fe(ie);else throw ie;It=Wt}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 oi(dt){dr(dt),he.push(dt)}function Kt(dt){const Lt=he.indexOf(dt);Lt!==-1&&he.splice(Lt,1)}function V(dt,Lt){const It=dt;he.forEach(function(ie){ie[It]&&ie[It](Lt)})}function kt(dt){return $e("10.7.0","highlightBlock will be removed entirely in v12.0"),$e("10.7.0","Please use highlightElement now."),ki(dt)}Object.assign(tt,{highlight:gi,highlightAuto:ir,highlightAll:Sn,highlightElement:ki,highlightBlock:kt,configure:Hi,initHighlighting:kn,initHighlightingOnLoad:In,registerLanguage:Sr,unregisterLanguage:$n,listLanguages:Ea,getLanguage:ur,registerAliases:Yr,autoDetection:ln,inherit:Zi,addPlugin:oi,removePlugin:Kt}),tt.debugMode=function(){ai=!1},tt.safeMode=function(){ai=!0},tt.versionString=Be,tt.regex={concat:_,lookahead:x,either:k,optional:v,anyNumberOfTimes:y};for(const dt in ot)typeof ot[dt]=="object"&&i(ot[dt]);return Object.assign(tt,ot),tt},Ui=wr({});return Ui.newInstance=()=>wr({}),s0=Ui,Ui.HighlightJS=Ui,Ui.default=Ui,s0}var o0,_E;function gQ(){if(_E)return o0;_E=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 o0=i,o0}var l0,CE;function mQ(){if(CE)return l0;CE=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}),_={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},C=["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"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:C,literal:k,built_in:[...E,...N,"set","shopt",...B,...O]},contains:[v,e.SHEBANG(),_,x,c,h,T,u,d,f,g,n]}}return l0=i,l0}var c0,kE;function yQ(){if(kE)return c0;kE=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 c0=i,c0}var h0,wE;function bQ(){if(wE)return h0;wE=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*\\(",_=["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"],C=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],B={type:C,keyword:_,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},O={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},A=[O,x,u,n,e.C_BLOCK_COMMENT_MODE,g,f],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:B,contains:A.concat([{begin:/\(/,end:/\)/,keywords:B,contains:A.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:B,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:B,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:B,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,F,O,A,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:B,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:B},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return h0=i,h0}var u0,SE;function xQ(){if(SE)return u0;SE=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/}),_={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},C={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},k=e.inherit(C,{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,_,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+")*>)?(\\[\\])?",B={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:h,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},T,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,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]},B]}}return u0=i,u0}var d0,TE;function vQ(){if(TE)return d0;TE=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+)*/,_="[a-zA-Z-][a-zA-Z0-9_-]*",C=[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:"\\."+_,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,...C,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...C,{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"},...C,g.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b"}]}}return d0=u,d0}var f0,EE;function _Q(){if(EE)return f0;EE=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 f0=i,f0}var p0,NE;function CQ(){if(NE)return p0;NE=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 p0=i,p0}var g0,AE;function kQ(){if(AE)return g0;AE=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])*",_={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"}]},C={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:[C]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:n}],relevance:0},_,{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,C.contains=A;const z=[{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(z).concat(f).concat(A)}}return g0=i,g0}var m0,ME;function wQ(){if(ME)return m0;ME=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 m0=i,m0}var y0,BE;function SQ(){if(BE)return y0;BE=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 y0=i,y0}var b0,LE;function TQ(){if(LE)return b0;LE=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 b0=i,b0}var x0,OE;function EQ(){if(OE)return x0;OE=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"]},_={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},C={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.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.APOS_STRING_MODE,c.QUOTE_STRING_MODE,n,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},n,_]}}return x0=o,x0}var v0,RE;function NQ(){if(RE)return v0;RE=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 Q="</"+X[0].slice(1);return X.input.indexOf(Q,Z)!==-1},x=i,y={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(X,Z)=>{const Q=X[0].length+X.index,ot=X.input[Q];if(ot==="<"||ot===","){Z.ignoreMatch();return}ot===">"&&(g(X,{after:Q})||Z.ignoreMatch());let vt;const At=X.input.substring(Q);if(vt=At.match(/^\s*=/)){Z.ignoreMatch();return}if((vt=At.match(/^\s+extends\s+/))&&vt.index===0){Z.ignoreMatch();return}}},C={$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},B={className:"subst",begin:"\\$\\{",end:"\\}",keywords:C,contains:[]},O={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"css"}},M={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"graphql"}},F={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,B]},z={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,F,{match:/\$\d+/},N];B.contains=U.concat({begin:/\{/,end:/\}/,keywords:C,contains:["self"].concat(U)});const K=[].concat(z,B.contains),$=K.concat([{begin:/(\s*)\(/,end:/\)/,keywords:C,contains:["self"].concat(K)}]),H={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:$},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)['"]/},et={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[H],illegal:/%/},at={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(X){return f.concat("(?!",X.join("|"),")")}const rt={match:f.concat(/\b/,W([...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},st={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},H]},Ct="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",ct={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(Ct)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[H]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:C,exports:{PARAMS_CONTAINS:$,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,F,z,{match:/\$\d+/},N,q,{scope:"attr",match:x+f.lookahead(":"),relevance:0},ct,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[z,d.REGEXP_MODE,{className:"function",begin:Ct,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:C,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:y.begin,end:y.end},{match:v},{begin:_.begin,"on:begin":_.isTrulyOpeningTag,end:_.end}],subLanguage:"xml",contains:[{begin:_.begin,end:_.end,skip:!0,contains:["self"]}]}]},et,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[H,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:[H]},rt,at,j,st,{match:/\$[(.]/}]}}return v0=u,v0}var _0,DE;function AQ(){if(DE)return _0;DE=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 _0=i,_0}var C0,jE;function MQ(){if(jE)return C0;jE=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,_=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),C={variants:[{className:"type",begin:o.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},k=C;return k.variants[1].contains=[C],C.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,_,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:[C,o.C_LINE_COMMENT_MODE,_],relevance:0},o.C_LINE_COMMENT_MODE,_,x,y,g,o.C_NUMBER_MODE]},_]},{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 k0,FE;function BQ(){if(FE)return k0;FE=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-]+",_="("+v+"|@\\{"+v+"\\})",C=[],k=[],T=function(K){return{className:"string",begin:"~?"+K+".*?"+K}},E=function(K,$,H){return{className:K,begin:$,relevance:H}},N={$pattern:/[a-z-]+/,keyword:y,attribute:a.join(" ")},B={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,B,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:C}),A={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(k)},M={begin:_+"\\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}}]},F={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}},z={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:_,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",_,0),E("selector-id","#"+_),E("selector-class","\\."+_,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:[z]};return C.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,F,D,U,M,z,A,g.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:C}}return k0=d,k0}var w0,IE;function LQ(){if(IE)return w0;IE=1;function i(e){const r="\\[=*\\[",n="\\]=*\\]",a={begin:r,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+r+")","$"),e.COMMENT("--"+r,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:r,end:n,contains:[a],relevance:5}])}}return w0=i,w0}var S0,$E;function OQ(){if($E)return S0;$E=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 S0=i,S0}var T0,zE;function RQ(){if(zE)return T0;zE=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=(C,k,T="\\1")=>{const E=T==="\\1"?T:r.concat(T,k);return r.concat(r.concat("(?:",C,")"),k,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,T,a)},v=(C,k,T)=>r.concat(r.concat("(?:",C,")"),k,/(?:\\.|[^\\\/])*?/,T,a),_=[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=_,h.contains=_,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:_}}return T0=i,T0}var E0,PE;function DQ(){if(PE)return E0;PE=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 E0=i,E0}var N0,qE;function jQ(){if(qE)return N0;qE=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":(H,j)=>{j.data._beginMatch=H[1]||H[2]},"on:end":(H,j)=>{j.data._beginMatch!==H[1]&&j.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
417
|
+
]`,_={scope:"string",variants:[g,f,x,y]},C={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"],B={keyword:T,literal:(H=>{const j=[];return H.forEach(q=>{j.push(q),q.toLowerCase()===q?j.push(q.toUpperCase()):j.push(q.toLowerCase())}),j})(k),built_in:E},O=H=>H.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(?!\\()"),F={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(/(?!::)/))},z={relevance:0,begin:/\(/,end:/\)/,keywords:B,contains:[D,h,F,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:[z]};z.contains.push(U);const K=[D,F,e.C_BLOCK_COMMENT_MODE,_,C,A],$={begin:r.concat(/#\[\s*\\?/,r.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:B,contains:[$,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,F,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:B,contains:["self",$,h,F,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 N0=i,N0}var A0,UE;function FQ(){if(UE)return A0;UE=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 A0=i,A0}var M0,HE;function IQ(){if(HE)return M0;HE=1;function i(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return M0=i,M0}var B0,WE;function $Q(){if(WE)return B0;WE=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})\\.`,_=`\\b|${a.join("|")}`,C={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${_})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${_})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${_})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${_})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${_})`},{begin:`\\b(${y})[jJ](?=${_})`}]},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,C,x,e.HASH_COMMENT_MODE]}]};return f.contains=[x,C,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[d,C,{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:[C,T,x]}]}}return B0=i,B0}var L0,GE;function zQ(){if(GE)return L0;GE=1;function i(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return L0=i,L0}var O0,YE;function PQ(){if(YE)return O0;YE=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 O0=i,O0}var R0,KE;function qQ(){if(KE)return R0;KE=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 R0=i,R0}var D0,VE;function UQ(){if(VE)return D0;VE=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",C={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("|")+")"},C,{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,C,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"},C,d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,f.HEXCOLOR,f.CSS_NUMBER_MODE]},f.FUNCTION_DISPATCH]}}return D0=u,D0}var j0,XE;function HQ(){if(XE)return j0;XE=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 j0=i,j0}var F0,ZE;function WQ(){if(ZE)return F0;ZE=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,_=[...f,...d].filter(O=>!g.includes(O)),C={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 B(O,{exceptions:A,when:M}={}){const F=M;return A=A||[],O.map(D=>D.match(/\|\d+$/)||A.includes(D)?D:F(D)?`${D}|0`:D)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:B(_,{when:O=>O.length<3}),literal:c,type:u,built_in:x},contains:[{scope:"type",match:E(h)},N,T,C,a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}return F0=i,F0}var I0,QE;function GQ(){if(QE)return I0;QE=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 F=M[M.length-1];return typeof F=="object"&&F.constructor===Object?(M.splice(M.length-1,1),F):{}}function a(...M){return"("+(n(M).capture?"":"?:")+M.map(z=>i(z)).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]/),_=a(v,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),C=r(v,_,"*"),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,"*"),B=["attached","autoclosure",r(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",r(/objc\(/,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 F={match:/\s+/,relevance:0},D=M.COMMENT("/\\*","\\*/",{contains:["self"]}),z=[M.C_LINE_COMMENT_MODE,D],U={match:[/\./,a(...c,...h)],className:{2:"keyword"}},K={match:r(/\./,a(...d)),relevance:0},$=d.filter(Ae=>typeof Ae=="string").concat(["_|0"]),H=d.filter(Ae=>typeof Ae!="string").concat(u).map(o),j={variants:[{className:"keyword",match:a(...H,...h)}]},q={$pattern:a(/\b\w+/,/#\w+/),keyword:$.concat(x),literal:f},G=[U,K,j],et={match:r(/\./,a(...y)),relevance:0},at={className:"built_in",match:r(/\b/,a(...y),/(?=\()/)},W=[et,at],rt={match:/->/,relevance:0},ft={className:"operator",relevance:0,variants:[{match:C},{match:`\\.(\\.|${_})+`}]},st=[rt,ft],Ct="([0-9]_*)+",ct="([0-9a-fA-F]_*)+",X={className:"number",relevance:0,variants:[{match:`\\b(${Ct})(\\.(${Ct}))?([eE][+-]?(${Ct}))?\\b`},{match:`\\b0x(${ct})(\\.(${ct}))?([pP][+-]?(${Ct}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Z=(Ae="")=>({className:"subst",variants:[{match:r(/\\/,Ae,/[0\\tnr"']/)},{match:r(/\\/,Ae,/u\{[0-9a-fA-F]{1,8}\}/)}]}),Q=(Ae="")=>({className:"subst",match:r(/\\/,Ae,/[\t ]*(?:[\r\n]|\r\n)/)}),ot=(Ae="")=>({className:"subst",label:"interpol",begin:r(/\\/,Ae,/\(/),end:/\)/}),vt=(Ae="")=>({begin:r(Ae,/"""/),end:r(/"""/,Ae),contains:[Z(Ae),Q(Ae),ot(Ae)]}),At=(Ae="")=>({begin:r(Ae,/"/),end:r(/"/,Ae),contains:[Z(Ae),ot(Ae)]}),jt={className:"string",variants:[vt(),vt("#"),vt("##"),vt("###"),At(),At("#"),At("##"),At("###")]},qt=[M.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[M.BACKSLASH_ESCAPE]}],Rt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:qt},Gt=Ae=>{const er=r(Ae,/\//),wr=r(/\//,Ae);return{begin:er,end:wr,contains:[...qt,{scope:"comment",begin:`#(?!.*${wr})`,end:/$/}]}},zt={scope:"regexp",variants:[Gt("###"),Gt("##"),Gt("#"),Rt]},ye={match:r(/`/,E,/`/)},Ne={className:"variable",match:/\$\d+/},ve={className:"variable",match:`\\$${T}+`},pi=[ye,Ne,ve],Li={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:O,contains:[...st,X,jt]}]}},Ti={scope:"keyword",match:r(/@/,a(...B),e(a(/\(/,/\s+/)))},fe={scope:"meta",match:r(/@/,E)},_i=[Li,Ti,fe],$e={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}]},Ue={begin:/</,end:/>/,keywords:q,contains:[...z,...G,..._i,rt,$e]};$e.contains.push(Ue);const Fe={match:r(E,/\s*:/),keywords:"_|0",relevance:0},Ii={begin:/\(/,end:/\)/,relevance:0,keywords:q,contains:["self",Fe,...z,zt,...G,...W,...st,X,jt,...pi,..._i,$e]},Oi={begin:/</,end:/>/,keywords:"repeat each",contains:[...z,$e]},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}]},Cn={begin:/\(/,end:/\)/,keywords:q,contains:[xr,...z,...G,...st,X,jt,..._i,$e,Ii],endsParent:!0,illegal:/["']/},$i={match:[/(func|macro)/,/\s+/,a(ye.match,E,C)],className:{1:"keyword",3:"title.function"},contains:[Oi,Cn,F],illegal:[/\[/,/%/]},De={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Oi,Cn,F],illegal:/\[|%/},Ke={match:[/operator/,/\s+/,C],className:{1:"keyword",3:"title"}},Be={begin:[/precedencegroup/,/\s+/,N],className:{1:"keyword",3:"title"},contains:[$e],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"}},Ci={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Zi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,E,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:q,contains:[Oi,...G,{begin:/:/,end:/\{/,keywords:q,contains:[{scope:"title.class.inherited",match:N},...G],relevance:0}]};for(const Ae of jt.variants){const er=Ae.contains.find(Ui=>Ui.label==="interpol");er.keywords=q;const wr=[...G,...W,...st,X,jt,...pi];er.contains=[...wr,{begin:/\(/,end:/\)/,contains:["self",...wr]}]}return{name:"Swift",keywords:q,contains:[...z,$i,De,hr,Ci,Zi,Ke,Be,{beginKeywords:"import",end:/$/,contains:[...z],relevance:0},zt,...G,...W,...st,X,jt,...pi,..._i,$e,Ii]}}return I0=A,I0}var $0,JE;function YQ(){if(JE)return $0;JE=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},_={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},C={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 $0=i,$0}var z0,tN;function KQ(){if(tN)return z0;tN=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:Q})=>{const ot="</"+Z[0].slice(1);return Z.input.indexOf(ot,Q)!==-1},y=i,v={begin:"<>",end:"</>"},_=/<[A-Za-z0-9\\._:-]+\s*\/>/,C={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{const ot=Z[0].length+Z.index,vt=Z.input[ot];if(vt==="<"||vt===","){Q.ignoreMatch();return}vt===">"&&(x(Z,{after:ot})||Q.ignoreMatch());let At;const jt=Z.input.substring(ot);if(At=jt.match(/^\s*=/)){Q.ignoreMatch();return}if((At=jt.match(/^\s+extends\s+/))&&At.index===0){Q.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]*",B={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"}},F={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,O],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[f.BACKSLASH_ESCAPE,O]},U={className:"comment",variants:[f.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),f.C_BLOCK_COMMENT_MODE,f.C_LINE_COMMENT_MODE]},K=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,F,D,{match:/\$\d+/},B];O.contains=K.concat({begin:/\{/,end:/\}/,keywords:k,contains:["self"].concat(K)});const $=[].concat(U,O.contains),H=$.concat([{begin:/(\s*)\(/,end:/\)/,keywords:k,contains:["self"].concat($)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:k,contains:H},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]}},et={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},at={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},W={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},st={begin:g.concat(/\./,g.lookahead(g.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Ct={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},ct="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",X={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(ct)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:k,exports:{PARAMS_CONTAINS:H,CLASS_REFERENCE:G},illegal:/#(?![$_A-z])/,contains:[f.SHEBANG({label:"shebang",binary:"node",relevance:5}),et,f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,F,D,U,{match:/\$\d+/},B,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:ct,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:H}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:v.begin,end:v.end},{match:_},{begin:C.begin,"on:begin":C.isTrulyOpeningTag,end:C.end}],subLanguage:"xml",contains:[{begin:C.begin,end:C.end,skip:!0,contains:["self"]}]}]},at,{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},st,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},ft,W,q,Ct,{match:/\$[(.]/}]}}function d(f){const g=f.regex,x=u(f),y=i,v=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],_={begin:[/namespace/,/\s+/,f.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},C={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},B=(F,D,z)=>{const U=F.contains.findIndex(K=>K.label===D);if(U===-1)throw new Error("can not find mode to replace");F.contains.splice(U,1,z)};Object.assign(x.keywords,E),x.exports.PARAMS_CONTAINS.push(N);const O=x.contains.find(F=>F.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]),B(x,"shebang",f.SHEBANG()),B(x,"use_strict",k);const M=x.contains.find(F=>F.label==="func.def");return M.relevance=0,Object.assign(x,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),x}return z0=d,z0}var P0,eN;function VQ(){if(eN)return P0;eN=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 P0=i,P0}var q0,iN;function XQ(){if(iN)return q0;iN=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 q0=i,q0}var U0,rN;function ZQ(){if(rN)return U0;rN=1;var i=pQ();return i.registerLanguage("xml",gQ()),i.registerLanguage("bash",mQ()),i.registerLanguage("c",yQ()),i.registerLanguage("cpp",bQ()),i.registerLanguage("csharp",xQ()),i.registerLanguage("css",vQ()),i.registerLanguage("markdown",_Q()),i.registerLanguage("diff",CQ()),i.registerLanguage("ruby",kQ()),i.registerLanguage("go",wQ()),i.registerLanguage("graphql",SQ()),i.registerLanguage("ini",TQ()),i.registerLanguage("java",EQ()),i.registerLanguage("javascript",NQ()),i.registerLanguage("json",AQ()),i.registerLanguage("kotlin",MQ()),i.registerLanguage("less",BQ()),i.registerLanguage("lua",LQ()),i.registerLanguage("makefile",OQ()),i.registerLanguage("perl",RQ()),i.registerLanguage("objectivec",DQ()),i.registerLanguage("php",jQ()),i.registerLanguage("php-template",FQ()),i.registerLanguage("plaintext",IQ()),i.registerLanguage("python",$Q()),i.registerLanguage("python-repl",zQ()),i.registerLanguage("r",PQ()),i.registerLanguage("rust",qQ()),i.registerLanguage("scss",UQ()),i.registerLanguage("shell",HQ()),i.registerLanguage("sql",WQ()),i.registerLanguage("swift",GQ()),i.registerLanguage("yaml",YQ()),i.registerLanguage("typescript",KQ()),i.registerLanguage("vbnet",VQ()),i.registerLanguage("wasm",XQ()),i.HighlightJS=i,i.default=i,U0=i,U0}var QQ=ZQ();const JQ=jd(QQ);function tJ(i,e){Y.useEffect(()=>{const r=i.current;r&&r.querySelectorAll("pre > code:not(.language-mermaid)").forEach(n=>{if(n.dataset.highlighted!=="yes")try{JQ.highlightElement(n)}catch{}})},[i,e])}we.setOptions({gfm:!0,breaks:!0});function Xd({content:i,frontmatter:e}){const r=Y.useMemo(()=>Do.sanitize(we.parse(i)),[i]),n=Y.useRef(null),{resolved:a}=Id();fQ(n,r,a,"md-mmd"),tJ(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 eJ({onManagePacks:i}){const{t:e}=Bi(),{data:r}=g6(),n=(r==null?void 0:r.nudge)??null,a=(r==null?void 0:r.newPacks)??[],[o,c]=Y.useState(!1),h=Y.useCallback(u=>{u.key==="Escape"&&o&&c(!1)},[o]);return Y.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(Xd,{content:n})}),a.length>0&&i&&m.jsx("button",{className:"update-badge-action",onClick:()=>{i(),c(!1)},children:e("update.managePacks")})]})]}):null}const Ju=[.85,.9,1,1.1,1.2],lD="dreamcontext-zoom";function iJ(){try{const i=localStorage.getItem(lD);if(i!==null){const e=parseFloat(i);if(Ju.includes(e))return e}}catch{}return 1}function rJ(i){document.documentElement.style.setProperty("--zoom",String(i))}function nJ({onNavigate:i}){const{theme:e,setTheme:r,resolved:n}=Id(),{data:a}=jM(),[o,c]=Y.useState(iJ);Y.useEffect(()=>{rJ(o)},[o]);const h=(a==null?void 0:a.debt)??0,u=RM(h),d=DM(h),f=()=>{r(e==="system"?"light":e==="light"?"dark":"system")},g=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",x=Ju.indexOf(o),y=x>0,v=x<Ju.length-1,_=C=>{const k=x+C;if(k<0||k>=Ju.length)return;const T=Ju[k];c(T);try{localStorage.setItem(lD,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(eJ,{onManagePacks:i?()=>i("packs"):void 0}),m.jsxs("div",{className:"zoom-controls",children:[m.jsx("button",{className:"zoom-btn",onClick:()=>_(-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:()=>_(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 aJ=[{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"}]}],cD="dreamcontext.dashboard.sidebarCollapsed",hD="dreamcontext.dashboard.aboutSeen",Mc=typeof window<"u"&&window.matchMedia?window.matchMedia("(max-width: 1024px)"):null;function sJ(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(cD)==="1"}catch{return!1}}function oJ(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(hD)==="1"}catch{return!1}}function lJ({activePage:i,onNavigate:e}){const{t:r}=Bi(),[n,a]=Y.useState(sJ),[o,c]=Y.useState((Mc==null?void 0:Mc.matches)??!1),[h,u]=Y.useState(oJ);Y.useEffect(()=>{if(!Mc)return;const v=_=>c(_.matches);return Mc.addEventListener("change",v),()=>Mc.removeEventListener("change",v)},[]);const d=o||n,f=()=>{a(v=>{const _=!v;try{window.localStorage.setItem(cD,_?"1":"0")}catch{}return _})},g=()=>{if(!h){u(!0);try{window.localStorage.setItem(hD,"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")})]}),aJ.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:_,icon:C,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===_?"sidebar-item--active":""}`,onClick:()=>e(_),title:T,"aria-current":i===_?"page":void 0,children:[m.jsx("span",{className:"sidebar-icon",children:C}),m.jsx("span",{className:"sidebar-label",children:T})]})},_)})})]},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 uD="dreamcontext.dashboard.activePage",cJ=["tasks","core","knowledge","features","sleep","brain","council","taxonomy","settings","packs","about"];function hJ(){if(typeof window>"u")return"brain";try{const i=window.localStorage.getItem(uD);if(i&&cJ.includes(i))return i}catch{}return"brain"}function uJ({children:i}){const[e,r]=Y.useState(hJ),[n,a]=Y.useState(null),[o,c]=Y.useState(0),h=Y.useCallback((f,g)=>{r(f),a(g),c(x=>x+1);try{window.localStorage.setItem(uD,f)}catch{}},[]),u=Y.useCallback(f=>{h(f,null)},[h]),d=Y.useCallback(()=>a(null),[]);return m.jsxs("div",{className:"shell",children:[m.jsx(nJ,{onNavigate:u}),m.jsxs("div",{className:"shell-body",children:[m.jsx(lJ,{activePage:e,onNavigate:u}),m.jsx("main",{className:"shell-main",children:i({page:e,focusId:n,nonce:o,navigate:h,clearFocus:d})})]})]})}function dJ(){return di({queryKey:["tasks"],queryFn:()=>oe.get("/tasks"),select:i=>i.tasks})}function fJ(){const i=kr();return Hr({mutationFn:e=>oe.post("/tasks",e),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function dD(){const i=kr();return Hr({mutationFn:({slug:e,updates:r})=>oe.patch(`/tasks/${e}`,r),onSuccess:(e,r)=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks",r.slug]})}})}function fD(){const i=kr();return Hr({mutationFn:e=>oe.del(`/tasks/${e}`),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function pJ(){return di({queryKey:["task-members"],queryFn:()=>oe.get("/tasks/members"),select:i=>i.members,staleTime:300*1e3})}function gJ(){return di({queryKey:["tasks-sync-status"],queryFn:()=>oe.get("/tasks/sync-status"),select:i=>i.status,refetchInterval:3e4})}function mJ(){const i=kr();return Hr({mutationFn:()=>oe.post("/tasks/sync",{direction:"both"}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks-sync-status"]})}})}function yJ(){return di({queryKey:["features"],queryFn:()=>oe.get("/features"),select:i=>i.features??[],staleTime:6e4})}function bJ(){const i=kr();return Hr({mutationFn:({slug:e,content:r})=>oe.post(`/tasks/${e}/changelog`,{content:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function pD(){return di({queryKey:["releases"],queryFn:()=>oe.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"}))})}function gD(){return di({queryKey:["releases"],queryFn:()=>oe.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function xJ(){const i=kr();return Hr({mutationFn:e=>oe.post("/releases",{...e,status:"planning"}),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}function vJ(){const i=kr();return Hr({mutationFn:({version:e,updates:r})=>oe.patch(`/releases/${encodeURIComponent(e)}`,r),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}const mD="dreamcontext:",yD="kanban-presets",Gv=`${mD}${yD}`;function bD(i){return i?`${mD}${i}:${yD}`:Gv}function _J(i){const e=bD(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(Gv);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(Gv);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function xD(i,e){try{localStorage.setItem(bD(i),JSON.stringify(e))}catch{}}const Pg=new Map;function z_(i){let e=Pg.get(i);return e===void 0&&(e=_J(i),Pg.set(i,e)),e}const Yv=new Set;function CJ(i){return Yv.add(i),()=>{Yv.delete(i)}}function vD(){for(const i of Yv)i()}function kJ(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function wJ(i){return Y.useSyncExternalStore(CJ,()=>z_(i))}function SJ(i,e,r){const n={id:kJ(),name:e,filters:r},o=[...z_(i),n];return Pg.set(i,o),xD(i,o),vD(),n}function TJ(i,e){const r=z_(i),n=r.filter(a=>a.id!==e);n.length!==r.length&&(Pg.set(i,n),xD(i,n),vD())}const EJ=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)%EJ}function Zd({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]=Y.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(Zd,{task:u,onClick:()=>n(u),onContextMenu:a?d=>a(u,d):void 0,onDragStart:d=>o(d,u)},u.slug))})]})}function nN({title:i,status:e,tasks:r,count:n,colorVar:a,onTaskClick:o,onTaskContextMenu:c,onDrop:h,subGroups:u}){const[d,f]=Y.useState(!1),g=_=>{_.preventDefault(),_.dataTransfer.dropEffect="move",f(!0)},x=()=>{f(!1)},y=_=>{_.preventDefault(),f(!1);const C=_.dataTransfer.getData("text/plain");C&&h(C,e)},v=(_,C)=>{_.dataTransfer.setData("text/plain",C.slug),_.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(_=>m.jsx(NJ,{label:_.label,color:_.color,tasks:_.tasks,onTaskClick:o,onTaskContextMenu:c,onDragStart:v},_.key)):r.map(_=>m.jsx(Zd,{task:_,onClick:()=>o(_),onContextMenu:c?C=>c(_,C):void 0,onDragStart:C=>v(C,_)},_.slug))})]})}function Fc({trigger:i,content:e,isOpen:r,onClose:n,align:a="left",width:o}){const c=Y.useRef(null),h=Y.useCallback(d=>{c.current&&!c.current.contains(d.target)&&n()},[n]),u=Y.useCallback(d=>{d.key==="Escape"&&n()},[n]);return Y.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 Lu({label:i,options:e,selected:r,onChange:n,isOpen:a,onToggle:o,onClose:c}){var k,T;const h=r.length>0,[u,d]=Y.useState(""),f=Y.useRef(null);Y.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([]),_=h?r.length<=2?r.map(E=>{var N;return((N=e.find(B=>B.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,C=e.length>5;return m.jsx(Fc,{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:_}),m.jsx(AJ,{open:a})]}),content:m.jsxs("div",{className:"multi-select-list",children:[C&&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 aN(i){return String(i).padStart(2,"0")}function Ro(i){return`${i.getFullYear()}-${aN(i.getMonth()+1)}-${aN(i.getDate())}`}function _D(){return Ro(new Date)}function Ep(i){const e=new Date;return e.setDate(e.getDate()-i),Ro(e)}function MJ(){const i=new Date,e=i.getDay();return i.setDate(i.getDate()-(e===0?6:e-1)),Ro(i)}function BJ(){const i=new Date;return i.setDate(1),Ro(i)}function LJ(){const i=new Date;return i.setMonth(0,1),Ro(i)}function sN(i){return new Date(i+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function OJ(){const i=_D();return[{label:"Today",from:i,to:i},{label:"Yesterday",from:Ep(1),to:Ep(1)},{label:"This week",from:MJ(),to:i},{label:"Last 7 days",from:Ep(6),to:i},{label:"This month",from:BJ(),to:i},{label:"Last 30 days",from:Ep(29),to:i},{label:"This year",from:LJ(),to:i}]}const RJ=["January","February","March","April","May","June","July","August","September","October","November","December"],DJ=["Mo","Tu","We","Th","Fr","Sa","Su"];function jJ({dateField:i,dateFrom:e,dateTo:r,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=Y.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[d,f]=Y.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=Y.useMemo(OJ,[]),x=Y.useMemo(()=>{const N=new Date(h,d+1,0).getDate(),B=new Date(h,d,1).getDay(),O=B===0?6:B-1,A=[],M=new Date(h,d,0).getDate();for(let D=O-1;D>=0;D--){const z=M-D,U=d===0?11:d-1,K=d===0?h-1:h;A.push({date:Ro(new Date(K,U,z)),day:z,isCurrentMonth:!1})}for(let D=1;D<=N;D++)A.push({date:Ro(new Date(h,d,D)),day:D,isCurrentMonth:!0});const F=42-A.length;for(let D=1;D<=F;D++){const z=d===11?0:d+1,U=d===11?h+1:h;A.push({date:Ro(new Date(U,z,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 B=new Date(N.from+"T00:00:00");u(B.getFullYear()),f(B.getMonth())},_=()=>{a(""),o("")},C=()=>{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=_D(),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:C,"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:[RJ[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:[DJ.map(N=>m.jsx("div",{className:"mini-cal-day-label",children:N},N)),x.map((N,B)=>{const O=N.date===e,A=N.date===r,M=e&&r&&N.date>e&&N.date<r,F=O&&!r,D=O||A,z=["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",F&&"mini-cal-day--single"].filter(Boolean).join(" ");return m.jsx("button",{className:z,onClick:()=>y(N.date),children:N.day},B)})]}),(e||r)&&m.jsxs("div",{className:"mini-cal-footer",children:[m.jsxs("span",{className:"mini-cal-range-text",children:[e&&m.jsx("span",{children:sN(e)}),e&&r&&e!==r&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mini-cal-arrow",children:"→"}),m.jsx("span",{children:sN(r)})]}),e&&!r&&m.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),m.jsx("button",{className:"mini-cal-clear-btn",onClick:_,children:"Clear"})]})]})}const qg={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 Np({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 H0(){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 oN(){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 IJ(){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 $J(){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 zJ(){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 PJ(){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 qJ(){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 UJ(){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 HJ(){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 WJ=[{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)"}],GJ=[{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)"}],YJ=[{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)"}],lN=[{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"}],W0=[{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 KJ(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 VJ(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 XJ({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,z;const{t:x}=Bi(),[y,v]=Y.useState(null),[_,C]=Y.useState(""),k=KJ(i),T=Y.useMemo(()=>VJ(i),[i]),E=U=>v(K=>K===U?null:U),N=()=>v(null),B=(D=lN.find(U=>U.value===i.sortField))==null?void 0:D.label,O=(z=W0.find(U=>U.value===i.groupBy))==null?void 0:z.label,A=Y.useMemo(()=>d.map(U=>({value:U,label:U})),[d]),M=Y.useMemo(()=>f.map(U=>({value:U,label:U})),[f]),F=Y.useMemo(()=>W0.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(oN,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx(Lu,{id:"status",label:"Status",options:WJ,selected:i.statusFilter,onChange:U=>e("statusFilter",U),isOpen:y==="status",onToggle:()=>E("status"),onClose:N}),m.jsx(Lu,{id:"priority",label:"Priority",options:GJ,selected:i.priorityFilter,onChange:U=>e("priorityFilter",U),isOpen:y==="priority",onToggle:()=>E("priority"),onClose:N}),m.jsx(Lu,{id:"urgency",label:"Urgency",options:YJ,selected:i.urgencyFilter,onChange:U=>e("urgencyFilter",U),isOpen:y==="urgency",onToggle:()=>E("urgency"),onClose:N}),A.length>0&&m.jsx(Lu,{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(Lu,{id:"version",label:"Version",options:M,selected:i.versionFilter,onChange:U=>e("versionFilter",U),isOpen:y==="version",onToggle:()=>E("version"),onClose:N}),m.jsx(Fc,{isOpen:y==="date",onClose:N,width:320,trigger:m.jsxs("button",{className:`filter-chip ${T?"filter-chip--active":""}`,onClick:()=>E("date"),children:[m.jsx(IJ,{}),m.jsx("span",{className:"filter-chip-label",children:T??"Date"}),m.jsx(Np,{open:y==="date"})]}),content:m.jsx(jJ,{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(Fc,{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(Np,{open:y==="minRice"})]}),content:m.jsxs("div",{className:"filter-min-rice",children:[m.jsx("label",{className:"filter-min-rice-label",htmlFor:"filter-min-rice-input",children:x("filter.min_rice")}),m.jsx("input",{id:"filter-min-rice-input",type:"number",min:"0",step:"0.1",className:"field-input",value:i.minRice??"",placeholder:"e.g. 5",onChange:U=>{const K=U.target.value.trim();if(K===""){e("minRice",null);return}const $=Number(K);e("minRice",Number.isFinite($)?$: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(zJ,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:m.jsx(PJ,{})}),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(qJ,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:m.jsx(UJ,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx(Fc,{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:B}),m.jsx(Np,{open:y==="sort"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Sort by"}),lN.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(H0,{})]},U.value))]})}),m.jsx(Fc,{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(Np,{open:y==="group"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Group by"}),W0.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(H0,{})]},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"}),F.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(H0,{})]},`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(HJ,{})}),m.jsx(Fc,{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($J,{}),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(oN,{})})]},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:_,onChange:U=>C(U.target.value),onKeyDown:U=>{U.key==="Enter"&&_.trim()&&(c(_.trim()),C(""))}}),m.jsx("button",{className:"filter-views-save-btn",disabled:!_.trim(),onClick:()=>{_.trim()&&(c(_.trim()),C(""))},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 ZJ({onClose:i}){const{t:e}=Bi(),r=fJ(),{data:n}=gD(),[a,o]=Y.useState(""),[c,h]=Y.useState(""),[u,d]=Y.useState("medium"),[f,g]=Y.useState("medium"),[x,y]=Y.useState(""),[v,_]=Y.useState(""),[C,k]=Y.useState(""),T=E=>{if(E.preventDefault(),!a.trim())return;const N=x.split(",").map(B=>B.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:C||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:C,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=>_(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 Ou={exports:{}},cN;function QJ(){if(cN)return Ou.exports;cN=1,Ou.exports=i,Ou.exports.addWheelListener=i,Ou.exports.removeWheelListener=e;function i(r,n,a){r.addEventListener("wheel",n,a)}function e(r,n,a){r.removeEventListener("wheel",n,a)}return Ou.exports}var Ru={exports:{}},G0,hN;function JJ(){if(hN)return G0;hN=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*C+3*_}function u(_,C){return 3*C-6*_}function d(_){return 3*_}function f(_,C,k){return((h(C,k)*_+u(C,k))*_+d(C))*_}function g(_,C,k){return 3*h(C,k)*_*_+2*u(C,k)*_+d(C)}function x(_,C,k,T,E){var N,B,O=0;do B=C+(k-C)/2,N=f(B,T,E)-_,N>0?k=B:C=B;while(Math.abs(N)>r&&++O<n);return B}function y(_,C,k,T){for(var E=0;E<i;++E){var N=g(C,k,T);if(N===0)return C;var B=f(C,k,T)-_;C-=B/N}return C}function v(_){return _}return G0=function(C,k,T,E){if(!(0<=C&&C<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(C===k&&T===E)return v;for(var N=c?new Float32Array(a):new Array(a),B=0;B<a;++B)N[B]=f(B*o,C,T);function O(A){for(var M=0,F=1,D=a-1;F!==D&&N[F]<=A;++F)M+=o;--F;var z=(A-N[F])/(N[F+1]-N[F]),U=M+z*o,K=g(U,C,T);return K>=e?y(A,U,C,T):K===0?U:x(A,M,M+o,C,T)}return function(M){return M===0?0:M===1?1:f(O(M),k,E)}},G0}var uN;function ttt(){if(uN)return Ru.exports;uN=1;var i=JJ(),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)};Ru.exports=r,Ru.exports.makeAggregateRaf=h,Ru.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,_=typeof f.done=="function"?f.done:n,C=a(f.scheduler),k=Object.keys(d);k.forEach(function(F){g[F]=u[F],x[F]=d[F]-u[F]});var T=typeof f.duration=="number"?f.duration:400,E=Math.max(1,T*.06),N,B=0;return N=C.next(A),{cancel:O};function O(){C.cancel(N),N=0}function A(){var F=y(B/E);B+=1,M(F),B<=E?(N=C.next(A),v(u)):(N=0,setTimeout(function(){_(u)},0))}function M(F){k.forEach(function(D){u[D]=x[D]*F+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(_){d.add(_),y()}function y(){f||(f=requestAnimationFrame(v))}function v(){f=0;var _=d;d=u,u=_,u.forEach(function(C){C()}),u.clear()}}return Ru.exports}var Y0,dN;function ett(){if(dN)return Y0;dN=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 Y0=i,Y0}var K0,fN;function itt(){if(fN)return K0;fN=1,K0=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:B};function B(){u(y),u(N)}function O(){f=n(),C=E=v=k=0,g=new Date,u(y),u(N),y=d(A)}function A(){var D=Date.now(),z=D-g;g=D;var U=n(),K=U.x-f.x,$=U.y-f.y;f=U;var H=1e3/(1+z);v=.8*K*H+.2*v,k=.8*$*H+.2*k,y=d(A)}function M(){u(y),u(N);var D=n();_=D.x,T=D.y,g=Date.now(),(v<-c||v>c)&&(C=h*v,_+=C),(k<-c||k>c)&&(E=h*k,T+=E),N=d(F)}function F(){var D=Date.now()-g,z=!1,U=0,K=0;C&&(U=-C*Math.exp(-D/x),U>.5||U<-.5?z=!0:U=C=0),E&&(K=-E*Math.exp(-D/x),K>.5||K<-.5?z=!0:K=E=0),z&&(a(_+U,T+K),N=d(F))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function r(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return K0}var V0,pN;function rtt(){if(pN)return V0;pN=1,V0=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 V0}var X0,gN;function ntt(){if(gN)return X0;gN=1,X0=i;function i(){this.x=0,this.y=0,this.scale=1}return X0}var Ap={exports:{}},mN;function att(){if(mN)return Ap.exports;mN=1,Ap.exports=i,Ap.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 Ap.exports}var Mp={exports:{}},yN;function stt(){if(yN)return Mp.exports;yN=1,Mp.exports=i,Mp.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 Mp.exports}var Z0,bN;function ott(){if(bN)return Z0;bN=1;var i=QJ(),e=ttt(),r=ett(),n=itt(),a=rtt(),o=a(),c=a(!0),h=ntt(),u=att(),d=stt(),f=1,g=1.75,x=300,y=200;Z0=v;function v(A,M){M=M||{};var F=M.controller;if(F||(u.canAttach(A)?F=u(A,M):d.canAttach(A)&&(F=d(A,M))),!F)throw new Error("Cannot create panzoom for the current type of dom element");var D=F.getOwner(),z={x:0,y:0},U=!1,K=new h;F.initTransform&&F.initTransform(K);var $=typeof M.filterKey=="function"?M.filterKey:k,H=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,et=typeof M.boundsPadding=="number"?M.boundsPadding:.05,at=typeof M.zoomDoubleClickSpeed=="number"?M.zoomDoubleClickSpeed:g,W=M.beforeWheel||k,rt=M.beforeMouseDown||k,ft=typeof M.zoomSpeed=="number"?M.zoomSpeed:f,st=_(M.transformOrigin),Ct=M.enableTextSelection?c:o;T(j),M.autocenter&&De();var ct,X=0,Z=0,Q=0,ot=null,vt=new Date,At,jt=!1,qt=!1,Rt,Gt,zt,ye,Ne,ve;"smoothScroll"in M&&!M.smoothScroll?ve=B():ve=n(tt,ir,M.smoothScroll);var pi,Li,Ti,fe=!1;ki();var _i={dispose:rr,moveBy:Gr,moveTo:wt,smoothMoveTo:on,centerOn:gi,zoomTo:zn,zoomAbs:si,smoothZoom:zi,smoothZoomAbs:Ce,showRectangle:Cn,pause:Ii,resume:Oi,isPaused:xr,getTransform:Ke,getMinZoom:Be,setMinZoom:hr,getMaxZoom:Ci,setMaxZoom:Zi,getTransformOrigin:Ae,setTransformOrigin:er,getZoomSpeed:wr,setZoomSpeed:Ui};r(_i);var $e=typeof M.initialX=="number"?M.initialX:K.x,Ue=typeof M.initialY=="number"?M.initialY:K.y,Fe=typeof M.initialZoom=="number"?M.initialZoom:K.scale;return($e!=K.x||Ue!=K.y||Fe!=K.scale)&&si($e,Ue,Fe),_i;function Ii(){Hi(),fe=!0}function Oi(){fe&&(ki(),fe=!1)}function xr(){return fe}function Cn(mt){var Bt=D.getBoundingClientRect(),Mt=$i(Bt.width,Bt.height),Ut=mt.right-mt.left,Le=mt.bottom-mt.top;if(!Number.isFinite(Ut)||!Number.isFinite(Le))throw new Error("Invalid rectangle");var $t=Mt.x/Ut,Je=Mt.y/Le,Ie=Math.min($t,Je);K.x=-(mt.left+Ut/2)*Ie+Mt.x/2,K.y=-(mt.top+Le/2)*Ie+Mt.y/2,K.scale=Ie}function $i(mt,Bt){if(F.getScreenCTM){var Mt=F.getScreenCTM(),Ut=Mt.a,Le=Mt.d,$t=Mt.e,Je=Mt.f;z.x=mt*Ut-$t,z.y=Bt*Le-Je}else z.x=mt,z.y=Bt;return z}function De(){var mt,Bt,Mt=0,Ut=0,Le=ai();if(Le)Mt=Le.left,Ut=Le.top,mt=Le.right-Le.left,Bt=Le.bottom-Le.top;else{var $t=D.getBoundingClientRect();mt=$t.width,Bt=$t.height}var Je=F.getBBox();if(!(Je.width===0||Je.height===0)){var Ie=Bt/Je.height,He=mt/Je.width,Dr=Math.min(He,Ie);K.x=-(Je.left+Je.width/2)*Dr+mt/2+Mt,K.y=-(Je.top+Je.height/2)*Dr+Bt/2+Ut,K.scale=Dr}}function Ke(){return K}function Be(){return G}function hr(mt){G=mt}function Ci(){return q}function Zi(mt){q=mt}function Ae(){return st}function er(mt){st=_(mt)}function wr(){return ft}function Ui(mt){if(!Number.isFinite(mt))throw new Error("Zoom speed should be a number");ft=mt}function tt(){return{x:K.x,y:K.y}}function wt(mt,Bt){K.x=mt,K.y=Bt,he(),Pn("pan"),Pt()}function Dt(mt,Bt){wt(K.x+mt,K.y+Bt)}function he(){var mt=ai();if(mt){var Bt=!1,Mt=pe(),Ut=mt.left-Mt.right;return Ut>0&&(K.x+=Ut,Bt=!0),Ut=mt.right-Mt.left,Ut<0&&(K.x+=Ut,Bt=!0),Ut=mt.top-Mt.bottom,Ut>0&&(K.y+=Ut,Bt=!0),Ut=mt.bottom-Mt.top,Ut<0&&(K.y+=Ut,Bt=!0),Bt}}function ai(){if(j){if(typeof j=="boolean"){var mt=D.getBoundingClientRect(),Bt=mt.width,Mt=mt.height;return{left:Bt*et,top:Mt*et,right:Bt*(1-et),bottom:Mt*(1-et)}}return j}}function pe(){var mt=F.getBBox(),Bt=Wt(mt.left,mt.top);return{left:Bt.x,top:Bt.y,right:mt.width*K.scale+Bt.x,bottom:mt.height*K.scale+Bt.y}}function Wt(mt,Bt){return{x:mt*K.scale+K.x,y:Bt*K.scale+K.y}}function Pt(){U=!0,ct=window.requestAnimationFrame(kn)}function le(mt,Bt,Mt){if(N(mt)||N(Bt)||N(Mt))throw new Error("zoom requires valid numbers");var Ut=K.scale*Mt;if(Ut<G){if(K.scale===G)return;Mt=G/K.scale}if(Ut>q){if(K.scale===q)return;Mt=q/K.scale}var Le=$i(mt,Bt);if(K.x=Le.x-Mt*(Le.x-K.x),K.y=Le.y-Mt*(Le.y-K.y),j&&et===1&&G===1)K.scale*=Mt,he();else{var $t=he();$t||(K.scale*=Mt)}Pn("zoom"),Pt()}function si(mt,Bt,Mt){var Ut=Mt/K.scale;le(mt,Bt,Ut)}function gi(mt){var Bt=mt.ownerSVGElement;if(!Bt)throw new Error("ui element is required to be within the scene");var Mt=mt.getBoundingClientRect(),Ut=Mt.left+Mt.width/2,Le=Mt.top+Mt.height/2,$t=Bt.getBoundingClientRect(),Je=$t.width/2-Ut,Ie=$t.height/2-Le;Gr(Je,Ie,!0)}function on(mt,Bt){Gr(mt-K.x,Bt-K.y,!0)}function Gr(mt,Bt,Mt){if(!Mt)return Dt(mt,Bt);pi&&pi.cancel();var Ut={x:0,y:0},Le={x:mt,y:Bt},$t=0,Je=0;pi=e(Ut,Le,{step:function(Ie){Dt(Ie.x-$t,Ie.y-Je),$t=Ie.x,Je=Ie.y}})}function ir(mt,Bt){la(),wt(mt,Bt)}function rr(){Hi()}function ki(){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,li,{passive:!1}),Pt()}function Hi(){i.removeWheelListener(D,li),D.removeEventListener("mousedown",dt),D.removeEventListener("keydown",wn),D.removeEventListener("dblclick",kt),D.removeEventListener("touchstart",Sr),ct&&(window.cancelAnimationFrame(ct),ct=0),ve.cancel(),ie(),ze(),Ct.release(),Ho()}function kn(){U&&In()}function In(){U=!1,F.applyTransform(K),Pn("transform"),ct=0}function wn(mt){var Bt=0,Mt=0,Ut=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?Ut=1:(mt.keyCode===187||mt.keyCode===107)&&(Ut=-1),!$(mt,Bt,Mt,Ut)){if(Bt||Mt){mt.preventDefault(),mt.stopPropagation();var Le=D.getBoundingClientRect(),$t=Math.min(Le.width,Le.height),Je=.05,Ie=$t*Je*Bt,He=$t*Je*Mt;Gr(Ie,He)}if(Ut){var Dr=Ps(Ut*100),$t=st?Wi():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&&(Ne=V(mt.touches[0],mt.touches[1]),Ti=!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=Ve(Bt);At=Mt;var Ut=$i(Mt.x,Mt.y);Rt=Ut.x,Gt=Ut.y,zt=Rt,ye=Gt,ve.cancel(),Yr()}function Yr(){jt||(jt=!0,document.addEventListener("touchmove",ln),document.addEventListener("touchend",Kt),document.addEventListener("touchcancel",Kt))}function ln(mt){if(mt.touches.length===1){mt.stopPropagation();var Bt=mt.touches[0],Mt=Ve(Bt),Ut=$i(Mt.x,Mt.y),Le=Ut.x-Rt,$t=Ut.y-Gt;Le!==0&&$t!==0&&Ja(),Rt=Ut.x,Gt=Ut.y,Gr(Le,$t)}else if(mt.touches.length===2){Ti=!0;var Je=mt.touches[0],Ie=mt.touches[1],He=V(Je,Ie),Dr=1+(He/Ne-1)*H,qn=Ve(Je),qs=Ve(Ie);if(Rt=(qn.x+qs.x)/2,Gt=(qn.y+qs.y)/2,st){var Mt=Wi();Rt=Mt.x,Gt=Mt.y}zn(Rt,Gt,Dr),Ne=He,mt.stopPropagation(),mt.preventDefault()}}function dr(){Q&&(clearTimeout(Q),Q=0)}function oi(mt){if(M.onClick){dr();var Bt=Rt-zt,Mt=Gt-ye,Ut=Math.sqrt(Bt*Bt+Mt*Mt);Ut>5||(Q=setTimeout(function(){Q=0,M.onClick(mt)},x))}}function Kt(mt){if(dr(),mt.touches.length>0){var Bt=Ve(mt.touches[0]),Mt=$i(Bt.x,Bt.y);Rt=Mt.x,Gt=Mt.y}else{var Ut=new Date;if(Ut-X<x)if(st){var Bt=Wi();zi(Bt.x,Bt.y,at)}else zi(At.x,At.y,at);else Ut-Z<y&&oi(mt);X=Ut,Ho(),ze()}}function V(mt,Bt){var Mt=mt.clientX-Bt.clientX,Ut=mt.clientY-Bt.clientY;return Math.sqrt(Mt*Mt+Ut*Ut)}function kt(mt){Ea(mt);var Bt=Ve(mt);st&&(Bt=Wi()),zi(Bt.x,Bt.y,at)}function dt(mt){if(dr(),!rt(mt)){if(ot=mt,vt=new Date,jt)return mt.stopPropagation(),!1;var Bt=mt.button===1&&window.event!==null||mt.button===0;if(Bt){ve.cancel();var Mt=Ve(mt),Ut=$i(Mt.x,Mt.y);return zt=Rt=Ut.x,ye=Gt=Ut.y,document.addEventListener("mousemove",Lt),document.addEventListener("mouseup",It),Ct.capture(mt.target||mt.srcElement),!1}}}function Lt(mt){if(!jt){Ja();var Bt=Ve(mt),Mt=$i(Bt.x,Bt.y),Ut=Mt.x-Rt,Le=Mt.y-Gt;Rt=Mt.x,Gt=Mt.y,Gr(Ut,Le)}}function It(){var mt=new Date;mt-vt<y&&oi(ot),Ct.release(),Ho(),ie()}function ie(){document.removeEventListener("mousemove",Lt),document.removeEventListener("mouseup",It),qt=!1}function ze(){document.removeEventListener("touchmove",ln),document.removeEventListener("touchend",Kt),document.removeEventListener("touchcancel",Kt),qt=!1,Ti=!1,jt=!1}function li(mt){if(!W(mt)){ve.cancel();var Bt=mt.deltaY;mt.deltaMode>0&&(Bt*=100);var Mt=Ps(Bt);if(Mt!==1){var Ut=st?Wi():Ve(mt);zn(Ut.x,Ut.y,Mt),mt.preventDefault()}}}function Ve(mt){var Bt,Mt,Ut=D.getBoundingClientRect();return Bt=mt.clientX-Ut.left,Mt=mt.clientY-Ut.top,{x:Bt,y:Mt}}function zi(mt,Bt,Mt){var Ut=K.scale,Le={scale:Ut},$t={scale:Mt*Ut};ve.cancel(),la(),Li=e(Le,$t,{step:function(Je){si(mt,Bt,Je.scale)},done:Tr})}function Ce(mt,Bt,Mt){var Ut=K.scale,Le={scale:Ut},$t={scale:Mt};ve.cancel(),la(),Li=e(Le,$t,{step:function(Je){si(mt,Bt,Je.scale)},done:Tr})}function Wi(){var mt=D.getBoundingClientRect();return{x:mt.width*st.x,y:mt.height*st.y}}function zn(mt,Bt,Mt){return ve.cancel(),la(),le(mt,Bt,Mt)}function la(){Li&&(Li.cancel(),Li=null)}function Ps(mt){var Bt=Math.sign(mt),Mt=Math.min(.25,Math.abs(ft*mt/128));return 1-Bt*Mt}function Ja(){qt||(Pn("panstart"),qt=!0,ve.start())}function Ho(){qt&&(Ti||ve.stop(),Pn("panend"))}function Tr(){Pn("zoomend")}function Pn(mt){_i.fire(mt,_i)}}function _(A){if(A){if(typeof A=="object")return(!E(A.x)||!E(A.y))&&C(A),A;C()}}function C(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 F=E(A.left)&&E(A.top)&&E(A.bottom)&&E(A.right);if(!F)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 B(){return{start:k,stop:k,cancel:k}}function O(){if(typeof document>"u")return;var A=document.getElementsByTagName("script");if(!A)return;for(var M,F=0;F<A.length;++F){var D=A[F];if(D.src&&D.src.match(/\bpanzoom(\.min)?\.js/)){M=D;break}}if(!M)return;var z=M.getAttribute("query");if(!z)return;var U=M.getAttribute("name")||"pz",K=Date.now();$();function $(){var q=document.querySelector(z);if(!q){var G=Date.now(),et=G-K;if(et<2e3){setTimeout($,100);return}console.error("Cannot find the panzoom element",U);return}var at=H(M);console.log(at),window[U]=v(q,at)}function H(q){for(var G=q.attributes,et={},at=0;at<G.length;++at){var W=G[at],rt=j(W);rt&&(et[rt.name]=rt.value)}return et}function j(q){if(q.name){var G=q.name[0]==="p"&&q.name[1]==="z"&&q.name[2]==="-";if(G){var et=q.name.substr(3),at=JSON.parse(q.value);return{name:et,value:at}}}}}return O(),Z0}var ltt=ott();const CD=jd(ltt);function Q0(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 Kv({value:i,options:e,placeholder:r="Select…",searchPlaceholder:n="Search…",onChange:a,allowCustom:o=!1,clearLabel:c="None"}){const[h,u]=Y.useState(!1),[d,f]=Y.useState(""),g=Y.useRef(null),x=Y.useMemo(()=>{const C=Q0(d.trim());return C?e.filter(k=>Q0(k.label).includes(C)||Q0(k.value).includes(C)):e},[e,d]),y=e.find(C=>C.value===i),v=o&&d.trim()&&!e.some(C=>C.value===d.trim());Y.useEffect(()=>{if(!h)return;const C=T=>{g.current&&!g.current.contains(T.target)&&u(!1)},k=T=>{T.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",C),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",k)}},[h]);const _=C=>{a(C),u(!1),f("")};return m.jsxs("div",{className:"ss-root",ref:g,children:[m.jsxs("button",{type:"button",className:"ss-trigger",onClick:()=>{u(C=>!C),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:C=>f(C.target.value),onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),x.length>0?_(x[0].value):v&&_(d.trim()))}}),m.jsxs("div",{className:"ss-list",children:[m.jsx("button",{type:"button",className:"ss-item ss-item--clear",onClick:()=>_(null),children:c}),x.map(C=>m.jsxs("button",{type:"button",className:`ss-item${C.value===i?" ss-item--active":""}`,onClick:()=>_(C.value),children:[m.jsx("span",{children:C.label}),C.hint&&m.jsx("span",{className:"ss-hint",children:C.hint})]},C.value)),v&&m.jsxs("button",{type:"button",className:"ss-item",onClick:()=>_(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 ctt={"[":"]","(":")","{":"}"};function htt(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=ctt[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 utt(i){return i.split(`
|
|
419
|
+
`).map(htt).join(`
|
|
420
|
+
`)}const dtt=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function ftt(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=dtt.exec(u);if(f){if(a===e){const[,g,,x,y]=f,v=r?"[x]":"[ ]";n[h]=`${g}${v}${x}${y}`;const _=/<!--\s*node:([A-Za-z0-9_-]+)\s*-->/.exec(y);return{body:n.join(`
|
|
422
|
+
`),nodeId:_?_[1]:null}}a++}}return null}const ptt=/-->|---|==>|==|-\.|~~~|\.->/;function gtt(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 _=/^(\s*)(```|~~~)\s*mermaid\b/i.exec(f);_&&(h=!0,u=_[2]);continue}if(f.trim().startsWith(u)){h=!1,u="";continue}if(/^\s*(classDef|class|style|linkStyle|click|subgraph|end)\b/.test(f)||ptt.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 mtt=[1,2,3,4,5,6,7,8,9,10],ytt=[1,2,3,4,5],btt=[25,50,75,100],xtt=[.5,1,1.5,2,3,4,5,6,8];function vtt(i){return i==null?"":i<5?"rice-score--low":i<=15?"rice-score--mid":"rice-score--high"}function _tt({task:i,expanded:e,onToggle:r,onUpdate:n}){const{t:a}=Bi(),o=i.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=vtt(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:"—"}),mtt.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:"—"}),ytt.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:"—"}),btt.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:"—"}),xtt.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 Ctt({text:i}){const[e,r]=Y.useState(!1),[n,a]=Y.useState(!1),o=Y.useRef(null);return Y.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 ktt({task:i,onClose:e,initialRiceExpanded:r}){const{t:n}=Bi(),{resolved:a}=Id(),o=dD(),c=bJ(),h=fD(),{data:u}=pJ(),{data:d}=yJ(),{data:f}=gD(),[g,x]=Y.useState(""),[y,v]=Y.useState(""),[_,C]=Y.useState(null),[k,T]=Y.useState(r??!!i.rice),[E,N]=Y.useState(!1),B=X=>{C(X.message),setTimeout(()=>C(null),5e3)},O=X=>{o.mutate({slug:i.slug,updates:{status:X}},{onError:B})},A=X=>{o.mutate({slug:i.slug,updates:{priority:X}},{onError:B})},M=X=>{o.mutate({slug:i.slug,updates:{urgency:X}},{onError:B})},F=X=>{o.mutate({slug:i.slug,updates:{version:X||null}},{onError:B})},D=X=>{o.mutate({slug:i.slug,updates:{rice:X}},{onError:B})},z=(X,Z)=>{const Q=X==="related_feature"?Z.trim()||null:Z.trim();X!=="related_feature"&&!Q||o.mutate({slug:i.slug,updates:{[X]:Q}},{onError:B})},U=X=>{const Z=X.find(Q=>Q.startsWith("person:"));return Z?Z.slice(7):null},K=(X,Z)=>{const Q=X.filter(ot=>!ot.startsWith("person:"));return Z?[...Q,`person:${Z}`]:Q},$=i.assignee??U(i.tags),H=X=>{const Z=X||null;o.mutate({slug:i.slug,updates:{assignee:Z,tags:K(i.tags,Z)}},{onError:B})},j=()=>{window.confirm(`Delete task "${i.name}"? This propagates to the remote backend on sync.`)&&h.mutate(i.slug,{onError:B,onSuccess:()=>e==null?void 0:e()})},q=X=>{o.mutate({slug:i.slug,updates:{due_date:X||null}},{onError:B})},G=X=>{const Z=U(X);o.mutate({slug:i.slug,updates:{tags:X,...Z!==$?{assignee:Z}:{}}},{onError:B})},et=()=>{const X=y.trim();X&&(i.tags.some(Z=>Z.toLowerCase()===X.toLowerCase())||G([...i.tags,X]),v(""))},at=X=>{X.preventDefault(),g.trim()&&c.mutate({slug:i.slug,content:g.trim()},{onSuccess:()=>x(""),onError:B})},W=Y.useMemo(()=>i.body?we.parse(i.body):"",[i.body]),rt=Y.useRef(null),ft=Y.useRef(i.body??""),st=Y.useRef(i.body??"");Y.useEffect(()=>{ft.current=i.body??"",st.current=i.body??""},[i.body]);const Ct=Y.useRef(o),ct=Y.useRef(B);return Y.useEffect(()=>{Ct.current=o,ct.current=B}),Y.useEffect(()=>{const X=rt.current;if(!X||!W)return;X.querySelectorAll('input[type="checkbox"]').forEach((ot,vt)=>{ot.removeAttribute("disabled"),ot.dataset.criterionIndex=String(vt)});const Q=ot=>{const vt=ot.target;if(!(vt instanceof HTMLInputElement)||vt.type!=="checkbox")return;const At=vt.dataset.criterionIndex;if(At===void 0)return;const jt=Number(At),qt=vt.checked,Rt=st.current,Gt=ftt(Rt,jt,qt);if(!Gt)return;let zt=Gt.body;Gt.nodeId&&(zt=gtt(zt,Gt.nodeId,qt)),zt!==Rt&&(st.current=zt,Ct.current.mutate({slug:i.slug,updates:{body:zt}},{onError:ye=>{vt.checked=!qt,st.current=ft.current,ct.current(ye)}}))};return X.addEventListener("change",Q),()=>X.removeEventListener("change",Q)},[W,i.slug]),Y.useEffect(()=>{const X=rt.current;if(!X||!W)return;sD(a);let Z=!1;const Q=[];let ot=!1;const vt=async()=>{if(Z||ot)return;X.querySelectorAll(".mermaid-rendered").forEach(qt=>{const Rt=qt.dataset.mermaidSource;if(!Rt)return;const Gt=document.createElement("pre"),zt=document.createElement("code");zt.className="language-mermaid",zt.textContent=Rt,Gt.appendChild(zt),qt.replaceWith(Gt)});const jt=X.querySelectorAll("pre > code.language-mermaid");if(jt.length!==0){for(ot=!0;Q.length;){const qt=Q.pop();try{qt==null||qt()}catch{}}for(let qt=0;qt<jt.length&&!Z;qt++){const Rt=jt[qt],Gt=Rt.parentElement;if(!Gt)continue;const zt=utt(Rt.textContent??""),ye=`mmd-${i.slug}-${qt}-${Date.now().toString(36)}`,Ne=document.createElement("div");Ne.className="mermaid-rendered",Ne.dataset.mermaidSource=zt;const ve=document.createElement("div");ve.className="mermaid-stage",Ne.appendChild(ve);const pi=document.createElement("div");pi.className="mermaid-controls",pi.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
|
+
`,Ne.appendChild(pi),Gt.replaceWith(Ne);try{const{svg:Li,bindFunctions:Ti}=await $_.render(ye,zt);if(Z)break;ve.innerHTML=Li,Ti==null||Ti(ve),Ne.dataset.mermaidRendered="1";const fe=ve.querySelector("svg");if(!fe)continue;oD(fe);const _i=fe.viewBox.baseVal,$e=_i&&_i.width>0?_i.width:fe.getBoundingClientRect().width,Ue=_i&&_i.height>0?_i.height:fe.getBoundingClientRect().height;fe.removeAttribute("width"),fe.removeAttribute("height"),fe.style.width=`${$e}px`,fe.style.height=`${Ue}px`,fe.style.maxWidth="none",fe.style.transformOrigin="0 0";const Fe=CD(fe,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),Ii=()=>{try{const De=ve.getBoundingClientRect();if(De.width===0||De.height===0)return;const Ke=32,Be=Math.min((De.width-Ke)/$e,(De.height-Ke)/Ue,1);Fe.zoomAbs(0,0,1),Fe.moveTo(0,0),Fe.zoomAbs(0,0,Be);const hr=(De.width-$e*Be)/2,Ci=(De.height-Ue*Be)/2;Fe.moveTo(hr,Ci)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(Ii));const Oi=new ResizeObserver(()=>Ii());Oi.observe(ve);let xr=null;const Cn=De=>{try{const Ke=De.getBoundingClientRect(),Be=ve.getBoundingClientRect();if(Ke.width===0)return;const hr=Ke.left+Ke.width/2-Be.left,Ci=Ke.top+Ke.height/2-Be.top,Zi=Math.min(Be.width*.6/Ke.width,Be.height*.6/Ke.height,6),Ae=Fe.getTransform(),er=Zi/Ae.scale;if(Math.abs(er-1)<.01)return;Fe.smoothZoom(hr,Ci,er)}catch{}},$i=De=>{const Ke=De.target,Be=(Ke==null?void 0:Ke.closest("g.node, g.cluster"))??null;if(!Be){xr&&(xr=null,Ii());return}xr===Be?(xr=null,Ii()):(xr=Be,Cn(Be))};ve.addEventListener("click",$i),fe.querySelectorAll("g.node, g.cluster").forEach(De=>{De.style.cursor="zoom-in"}),pi.addEventListener("click",De=>{De.stopPropagation();const Ke=De.target.closest("button");if(!Ke)return;const Be=ve.getBoundingClientRect(),hr=Be.width/2,Ci=Be.height/2,Zi=Ke.getAttribute("data-act");Zi==="in"?Fe.smoothZoom(hr,Ci,1.4):Zi==="out"?Fe.smoothZoom(hr,Ci,1/1.4):Zi==="reset"&&(xr=null,Ii())}),Q.push(()=>{Oi.disconnect(),ve.removeEventListener("click",$i),Fe.dispose()})}catch(Li){if(Z)break;const Ti=Li instanceof Error?Li.message:String(Li);ve.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${Ti.replace(/[<>&]/g,fe=>({"<":"<",">":">","&":"&"})[fe]??fe)}</pre>`}}ot=!1}};vt();const At=new MutationObserver(()=>{if(Z||ot)return;const jt=X.querySelector("pre > code.language-mermaid"),qt=X.querySelector(".mermaid-rendered .mermaid-stage svg");jt&&(!qt||jt)&&jt&&vt()});return At.observe(X,{childList:!0,subtree:!0}),()=>{for(Z=!0,At.disconnect();Q.length;){const jt=Q.pop();try{jt==null||jt()}catch{}}}},[W,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:[_&&m.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:_}),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(_tt,{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&&z("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&&z("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(Kv,{value:$,options:[...(u??[]).map(X=>({value:X.slug,label:X.name,hint:X.slug})),...$&&!(u??[]).some(X=>X.slug===$)?[{value:$,label:$}]:[]],placeholder:"Unassigned",searchPlaceholder:"Search people…",clearLabel:"Unassigned",allowCustom:!0,onChange:X=>H(X??"")})}),m.jsx(Fr,{label:"Feature",children:m.jsx(Kv,{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=>z("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(),et())},onBlur:et})]})}),m.jsx(Fr,{label:"Version",children:m.jsxs("select",{className:"field-select prop-select",value:i.version??"",onChange:X=>F(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(Ctt,{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"}),W?m.jsx("div",{ref:rt,className:"markdown-body",dangerouslySetInnerHTML:{__html:W}}):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:at,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 wtt=["critical","high"];function Ug(i){return wtt.includes(i)}const Vv=[{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 xN(i){const e=Ug(i.priority),r=Ug(i.urgency);return e&&r?"do":e&&!r?"schedule":!e&&r?"delegate":"eliminate"}function vN(i,e){return i&&!Ug(e)?"high":!i&&Ug(e)?"medium":null}function _N(i,e){const r=Vv.find(c=>c.key===e);if(!r)return{};const n={},a=vN(r.priorityHigh,i.priority),o=vN(r.urgencyHigh,i.urgency);return a&&(n.priority=a),o&&(n.urgency=o),n}function J0(i){return!i.priority&&!i.urgency}function Stt(i){const e=[];return i.priority&&e.push(`priority → ${i.priority}`),i.urgency&&e.push(`urgency → ${i.urgency}`),e.join(" · ")}function Ttt({tasks:i,onTaskClick:e,onTaskMove:r}){const n=i.filter(T=>T.status!=="completed"),[a,o]=Y.useState(null),[c,h]=Y.useState(null),[u,d]=Y.useState(null),f=!!r,g=c?n.find(T=>T.slug===c)??null:null,x=g?xN(g):null,y=(T,E)=>{T.dataTransfer.setData("text/plain",E.slug),T.dataTransfer.effectAllowed="move",h(E.slug)},v=()=>{h(null),o(null)},_=(T,E)=>{f&&(T.preventDefault(),T.dataTransfer.dropEffect="move",a!==E&&o(E))},C=(T,E)=>{if(!r)return;T.preventDefault();const N=T.dataTransfer.getData("text/plain");if(v(),!N)return;const B=n.find(M=>M.slug===N);if(!B)return;const O=_N(B,E);if(J0(O))return;r(N,O);const A=Vv.find(M=>M.key===E);d({slug:N,name:B.name,toLabel:(A==null?void 0:A.label)??E,prev:{priority:B.priority,urgency:B.urgency}})},k=()=>{!u||!r||(r(u.slug,{priority:u.prev.priority,urgency:u.prev.urgency}),d(null))};return m.jsxs("div",{className:`eisenhower${g?" eisenhower--dragging":""}`,children:[f&&u&&m.jsxs("div",{className:"eisenhower-undo",role:"status",children:[m.jsxs("span",{className:"eisenhower-undo-text",children:["Moved ",m.jsx("strong",{children:u.name})," → ",u.toLabel]}),m.jsx("button",{type:"button",className:"eisenhower-undo-btn",onClick:k,children:"Undo"}),m.jsx("button",{type:"button",className:"eisenhower-undo-dismiss","aria-label":"Dismiss",onClick:()=>d(null),children:"×"})]}),m.jsx("div",{className:"eisenhower-grid",onDragEnd:v,children:Vv.map(T=>{const E=n.filter(F=>xN(F)===T.key),N=a===T.key,B=x===T.key,O=N&&g?_N(g,T.key):null,A=O?J0(O)?"Already here":Stt(O):null,M=["eisenhower-quadrant",`eisenhower-quadrant--${T.key}`,N?"eisenhower-quadrant--dragover":"",B?"eisenhower-quadrant--source":"",N&&O&&J0(O)?"eisenhower-quadrant--noop":""].filter(Boolean).join(" ");return m.jsxs("div",{className:M,onDragOver:F=>_(F,T.key),onDragLeave:()=>o(F=>F===T.key?null:F),onDrop:F=>C(F,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(F=>m.jsx(Zd,{task:F,onClick:()=>e(F),onDragStart:D=>y(D,F),dragging:c===F.slug},F.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 _e={top:32,right:24,bottom:56,left:64},CN=.5,kN=8,tx=1,wN=5,Ett=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 ex(i){return Math.log2(Math.max(i,.01)+1)}function ix(i,e,r){return Math.max(e,Math.min(r,i))}function SN(i){const e=i.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function Mtt({tasks:i,onTaskClick:e}){const r=Y.useRef(null),[n,a]=Y.useState({width:800,height:480}),[o,c]=Y.useState(!1),[h,u]=Y.useState(null);Y.useEffect(()=>{const D=r.current;if(!D)return;const z=new ResizeObserver(U=>{for(const K of U){const $=K.contentRect.width,H=Math.max(360,Math.min(620,$*.6));a({width:$,height:H})}});return z.observe(D),()=>z.disconnect()},[]);const d=Y.useMemo(()=>i.filter(D=>D.status!=="completed"),[i]),f=Y.useMemo(()=>d.filter(SN),[d]),g=Y.useMemo(()=>d.filter(D=>!SN(D)),[d]),x=Y.useMemo(()=>[...f].sort((D,z)=>(z.rice.score??0)-(D.rice.score??0)),[f]),y=Math.max(120,n.width-_e.left-_e.right),v=Math.max(120,n.height-_e.top-_e.bottom),_=ex(CN),k=ex(kN)-_,T=D=>{const z=(ex(ix(D,CN,kN))-_)/k;return _e.left+(1-z)*y},E=D=>{const z=(ix(D,tx,wN)-tx)/(wN-tx);return _e.top+(1-z)*v},N=D=>6+(ix(D,1,10)-1)/9*18,B=D=>Math.max(.4,D/100),O=T(Ett),A=E(Ntt),M=[.5,1,2,4,8],F=[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:_e.left,y:_e.top,width:O-_e.left,height:A-_e.top,className:"rice-quad rice-quad--big-bets"}),m.jsx("rect",{x:O,y:_e.top,width:_e.left+y-O,height:A-_e.top,className:"rice-quad rice-quad--quick-wins"}),m.jsx("rect",{x:_e.left,y:A,width:O-_e.left,height:_e.top+v-A,className:"rice-quad rice-quad--time-sinks"}),m.jsx("rect",{x:O,y:A,width:_e.left+y-O,height:_e.top+v-A,className:"rice-quad rice-quad--fill-ins"}),m.jsx("text",{x:_e.left+8,y:_e.top+18,className:"rice-quad-label",children:"Big Bets"}),m.jsx("text",{x:_e.left+y-8,y:_e.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),m.jsx("text",{x:_e.left+8,y:_e.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),m.jsx("text",{x:_e.left+y-8,y:_e.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),m.jsx("line",{x1:O,y1:_e.top,x2:O,y2:_e.top+v,className:"rice-quad-divider"}),m.jsx("line",{x1:_e.left,y1:A,x2:_e.left+y,y2:A,className:"rice-quad-divider"}),m.jsx("line",{x1:_e.left,y1:_e.top+v,x2:_e.left+y,y2:_e.top+v,className:"rice-axis"}),m.jsx("line",{x1:_e.left,y1:_e.top,x2:_e.left,y2:_e.top+v,className:"rice-axis"}),M.map(D=>m.jsxs("g",{children:[m.jsx("line",{x1:T(D),y1:_e.top+v,x2:T(D),y2:_e.top+v+4,className:"rice-axis"}),m.jsxs("text",{x:T(D),y:_e.top+v+18,textAnchor:"middle",className:"rice-tick",children:[D,"w"]})]},`xt-${D}`)),m.jsx("text",{x:_e.left+y/2,y:_e.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),F.map(D=>m.jsxs("g",{children:[m.jsx("line",{x1:_e.left-4,y1:E(D),x2:_e.left,y2:E(D),className:"rice-axis"}),m.jsx("text",{x:_e.left-8,y:E(D)+4,textAnchor:"end",className:"rice-tick",children:D})]},`yt-${D}`)),m.jsx("text",{transform:`translate(${_e.left-44}, ${_e.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),f.map(D=>{const z=D.rice,U=T(z.effort),K=E(z.impact),$=N(z.reach),H=B(z.confidence),j=Att[D.status],q=h===D.slug;return m.jsx("circle",{cx:U,cy:K,r:$,fill:`var(${j})`,fillOpacity:H,stroke:"var(--color-bg)",strokeWidth:q?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${D.name}: reach ${z.reach}, impact ${z.impact}, confidence ${z.confidence}, effort ${z.effort} weeks, score ${z.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 ${z.reach} · I ${z.impact} · C ${z.confidence}% · E ${z.effort}w
|
|
430
|
+
Score: ${z.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(Zd,{task:D,onClick:()=>e(D),onDragStart:()=>{}},D.slug))})]})]})}function Btt({onClose:i,tasks:e}){const{data:r,isLoading:n}=pD(),a=xJ(),o=vJ(),[c,h]=Y.useState(""),[u,d]=Y.useState(""),f=v=>{v.preventDefault(),c.trim()&&a.mutate({version:c.trim(),summary:u.trim()||void 0},{onSuccess:()=>{h(""),d("")}})},g=v=>e.filter(_=>_.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 _=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:[_," task",_!==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 _=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:[_," task",_!==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 TN={critical:0,high:1,medium:2,low:3},EN={critical:0,high:1,medium:2,low:3},kD=[{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"}],wD=[{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"}],SD=[{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(TN[r.priority]??9)-(TN[n.priority]??9);case"urgency":return(EN[r.urgency]??9)-(EN[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 Ott(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 NN(i){const e=i,r={...qg};for(const a of Object.keys(qg))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 AN(i,e){if(e==="none")return[];switch(e){case"status":return kD.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 wD.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 SD.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 Rtt(i,e){return i?`dreamcontext:${i}:${e}`:`dreamcontext:${e}`}function Dtt(i,e){try{const r=localStorage.getItem(i);return r===null?e:JSON.parse(r)}catch{return e}}function jtt(i,e){try{localStorage.setItem(i,JSON.stringify(e))}catch{}}function Ftt(){const{t:i}=Bi(),{projectId:e}=OM(),{data:r,isLoading:n,isError:a,error:o}=dJ(),{data:c}=pD(),h=dD(),{data:u}=gJ(),d=mJ(),f=fD(),[g,x]=Y.useState(null),y=(ct,X)=>{X.preventDefault(),x({x:X.clientX,y:X.clientY,task:ct})},v=()=>{if(!g)return;const ct=g.task;x(null),window.confirm(`Delete task "${ct.name}"? This propagates to the remote backend on sync.`)&&f.mutate(ct.slug,{onSuccess:()=>{M===ct.slug&&F(null)}})},[_,C]=Y.useState(null),k=()=>{C(null),d.mutate(void 0,{onSuccess:({report:ct})=>{const X=ct.pushed+ct.created+ct.pulled+ct.deleted+ct.mirrorDeleted;C(ct.skipped==="locked"?"⏳ another sync is already running":ct.errors.length>0?`⚠ ${ct.errors[0]}`:ct.conflicts.length>0?`↕ ${X} synced · ${ct.conflicts.length} conflict(s) preserved`:X>0?`↕ ${ct.pushed+ct.created} up · ${ct.pulled} down`:"✓ up to date"),setTimeout(()=>C(null),6e3)},onError:ct=>{C(`⚠ ${ct.message}`),setTimeout(()=>C(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:[_&&m.jsx("span",{className:"filter-sync-note",children:_}),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,B]=Y.useState(!1),[O,A]=Y.useState(!1),[M,F]=Y.useState(null),D=Y.useMemo(()=>Rtt(e,"kanban-filters"),[e]),[z,U]=Y.useState(()=>{const ct=Dtt(D,qg);return NN(ct)}),K=Y.useCallback(ct=>{U(X=>{const Z=typeof ct=="function"?ct(X):ct;return jtt(D,Z),Z})},[D]),$=wJ(e),H=Y.useCallback((ct,X)=>{K(Z=>({...Z,[ct]:X}))},[K]),j=Y.useCallback(()=>{K(ct=>({...qg,sortField:ct.sortField,groupBy:ct.groupBy,subGroupBy:ct.subGroupBy,viewMode:ct.viewMode}))},[K]),q=Y.useCallback(ct=>{SJ(e,ct,{...z})},[z,e]),G=Y.useCallback(ct=>{K(NN(ct.filters))},[K]),et=Y.useCallback(ct=>{TJ(e,ct)},[e]),at=Y.useMemo(()=>Ott(r??[],z),[r,z]),W=Y.useMemo(()=>!M||!r?null:r.find(ct=>ct.slug===M)??null,[M,r]),rt=Y.useMemo(()=>{const ct=new Set;for(const X of r??[])for(const Z of X.tags)ct.add(Z);return Array.from(ct).sort()},[r]),ft=Y.useMemo(()=>{const ct=new Set;for(const X of r??[])X.version&&ct.add(X.version);for(const X of c??[])ct.add(X.version);return Array.from(ct).sort()},[r,c]),st=(ct,X,Z)=>{switch(Z){case"status":h.mutate({slug:ct,updates:{status:X}});break;case"priority":h.mutate({slug:ct,updates:{priority:X}});break;case"urgency":h.mutate({slug:ct,updates:{urgency:X}});break;case"tags":{const Q=(r??[]).find(ot=>ot.slug===ct);Q&&!Q.tags.includes(X)&&X!=="(untagged)"&&h.mutate({slug:ct,updates:{tags:[...Q.tags,X]}})}break;case"version":h.mutate({slug:ct,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 Ct=()=>{const{groupBy:ct,subGroupBy:X}=z,Z=(Q,ot,vt,At,jt)=>m.jsx(nN,{title:typeof ot=="string"&&ot.includes(".")?i(ot):ot,status:Q,tasks:At,count:At.length,colorVar:vt,onTaskClick:qt=>F(qt.slug),onTaskContextMenu:y,onDrop:(qt,Rt)=>st(qt,Rt,ct),staggerIndex:jt+1,subGroups:X!=="none"?AN(At,X):void 0},Q);switch(ct){case"status":return kD.map((Q,ot)=>Z(Q.key,Q.labelKey,Q.colorVar,at.filter(vt=>vt.status===Q.key),ot));case"priority":return wD.map((Q,ot)=>Z(Q.key,Q.label,Q.colorVar,at.filter(vt=>vt.priority===Q.key),ot));case"urgency":return SD.map((Q,ot)=>Z(Q.key,Q.label,Q.colorVar,at.filter(vt=>vt.urgency===Q.key),ot));case"tags":{const Q=new Map;for(const ot of at)if(ot.tags.length===0){const vt=Q.get("(untagged)")??[];vt.push(ot),Q.set("(untagged)",vt)}else for(const vt of ot.tags){const At=Q.get(vt)??[];At.push(ot),Q.set(vt,At)}return Array.from(Q.entries()).map(([ot,vt],At)=>Z(ot,ot,"--color-brand-vivid",vt,At))}case"version":{const Q=(c??[]).filter(At=>At.status==="planning").map(At=>At.version),ot=(c??[]).filter(At=>At.status==="released").map(At=>At.version),vt=["(no version)",...Q,...ot];for(const At of at)At.version&&!vt.includes(At.version)&&vt.push(At.version);return vt.map((At,jt)=>{const qt=at.filter(Rt=>(Rt.version??"(no version)")===At);return qt.length===0&&At!=="(no version)"?null:Z(At,At,"--color-brand-mid",qt,jt)}).filter(Boolean)}case"none":return[m.jsx(nN,{title:"All Tasks",status:"all",tasks:at,count:at.length,colorVar:"--color-brand-vivid",onTaskClick:Q=>F(Q.slug),onTaskContextMenu:y,onDrop:()=>{},subGroups:X!=="none"?AN(at,X):void 0},"all")]}};return m.jsxs("div",{className:"kanban-board",children:[m.jsx(XJ,{filters:z,onFilterChange:H,onClearFilters:j,onCreateClick:()=>B(!0),presets:$,onSavePreset:q,onLoadPreset:G,onDeletePreset:et,allTags:rt,allVersions:ft,onVersionManagerClick:()=>A(!0),syncSlot:E}),z.viewMode==="eisenhower"?m.jsx(Ttt,{tasks:at,onTaskClick:ct=>F(ct.slug),onTaskMove:(ct,X)=>h.mutate({slug:ct,updates:X})}):z.viewMode==="scatter"?m.jsx(Mtt,{tasks:at,onTaskClick:ct=>F(ct.slug)}):z.viewMode==="list"?m.jsx("div",{className:"task-list",children:at.map(ct=>m.jsx(Zd,{task:ct,onClick:()=>F(ct.slug),onContextMenu:X=>y(ct,X),onDragStart:()=>{}},ct.slug))}):m.jsx("div",{className:"kanban-columns",children:Ct()}),N&&m.jsx(ZJ,{onClose:()=>B(!1)}),O&&m.jsx(Btt,{onClose:()=>A(!1),tasks:r??[]}),W&&m.jsx(ktt,{task:W,onClose:()=>F(null)}),g&&m.jsx("div",{className:"task-ctx-overlay",onClick:()=>x(null),onContextMenu:ct=>{ct.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:ct=>ct.stopPropagation(),children:[m.jsx("div",{className:"task-ctx-name",children:g.task.name}),m.jsx("button",{type:"button",className:"task-ctx-item",onClick:()=>{F(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 Itt(){return m.jsx("div",{children:m.jsx(Ftt,{})})}function $tt(){return di({queryKey:["changelog"],queryFn:()=>oe.get("/changelog")})}const ztt=25;function MN({entry:i}){const{t:e}=Bi();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 Ptt(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 qtt(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=jM(),{data:o}=$tt();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=RM(e.debt),h=DM(e.debt),u=e.last_sleep,d=(o==null?void 0:o.entries)??[],f=u?d.filter(_=>_.date>u):[],g=u?d.filter(_=>_.date<=u):d,x=g.slice(0,ztt),y=Ptt(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(MN,{entry:_},`p-${C}`))})]}),y.map(_=>m.jsxs("div",{className:"changelog-group",children:[m.jsx("h3",{className:"changelog-group-title changelog-group-title--day",children:_.date}),m.jsx("div",{className:"changelog-list",children:_.items.map((C,k)=>m.jsx(MN,{entry:C},`${_.date}-${k}`))})]},_.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:_.stopped_at??"Active"}),_.score!==null&&m.jsxs("span",{className:"session-score",children:["+",_.score]}),_.change_count!==null&&m.jsxs("span",{className:"session-changes",children:[_.change_count," changes"]}),_.tool_count!=null&&m.jsxs("span",{className:"session-changes",children:[_.tool_count," tools"]})]}),_.last_assistant_message&&m.jsxs("p",{className:"session-message",children:[_.last_assistant_message.slice(0,150),_.last_assistant_message.length>150?"...":""]})]},C))})]}),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:_.timestamp}),m.jsxs("span",{className:"session-changes",children:[_.entity," / ",_.action]})]}),m.jsx("p",{className:"session-message",children:_.summary})]},C))})]})]})}const Utt=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 rx(i){const e=i.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return Utt.has(e)}function Htt(i){const{entities:e,relations:r}=Wtt(i),n=Gtt(i),a=new Set(e.map(f=>f.name.toLowerCase())),o=[...e,...n.filter(f=>!a.has(f.name.toLowerCase()))],c=Ytt(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 Wtt(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 F=g.match(/\/\w+\/\{[^}]+\}/);F&&(c=F[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&&rx(U[2])&&u){const K=U[1],$=U[2].toLowerCase(),j=(U[3]||"").match(/--\s*(.+)$/),q=j?j[1].trim():void 0;o.push({name:`${u}.${K}`,type:$,description:q,isNested:!0,parentField:u})}continue}const z=D.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(z&&rx(z[3])){const U=z[1].replace(/\[\]$/,""),K=z[2],$=z[3].toLowerCase(),j=(z[4]||"").match(/--\s*(.+)$/),q=j?j[1].trim():void 0;u=U,o.push({name:`${U}.${K}`,type:$,description:q,isNested:!0,parentField:U});continue}continue}if(!x)continue;const _=x.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(_))continue;const C=_.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!C)continue;const k=C[1],T=C[2],E=C[3]||"";if(!rx(T))continue;const N=T.toLowerCase(),B=/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:B,description:M})}return d(),{entities:e,relations:r}}function Gtt(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 _=v[1].trim();if(_===_.toUpperCase()&&_.length>1){r&&r.fields.length>0&&e.push(r);const C=v[2].trim();r={name:_,path:C,storageType:C.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(r){const _=y.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(_){r.managedBy=_[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 _=y.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(_){const{type:k,enumValues:T}=BN(_[2].trim(),(o=_[3])==null?void 0:o.trim());r.fields.push({name:_[1],type:k,enumValues:T,description:(c=_[3])==null?void 0:c.trim(),isPrimary:_[1]==="id"});continue}const C=y.match(/^"([a-z_]\w*)":\s+(.+?)(?:,)?(?:\s{2,}--\s+(.+))?$/);if(C){const{type:k,enumValues:T}=BN(C[2].trim(),(h=C[3])==null?void 0:h.trim());r.fields.push({name:C[1],type:k,enumValues:T,description:(u=C[3])==null?void 0:u.trim()});continue}}if(r&&y.startsWith("Body ")&&(r.notes.push(y),y.includes("sections")&&f+1<a.length)){const _=(d=a[f+1])==null?void 0:d.match(/^--\s?(.*)/);_&&/^\s*(Why|[A-Z])/.test(_[1])&&(r.notes.push(_[1].trim()),f++)}}}return r&&r.fields.length>0&&e.push(r),e}function BN(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 Ytt(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 Xv(i){return i.toLowerCase().replace(/\s+/g,"-")}function LN(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 Ktt(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 Vtt(i,e,r,n){if(n){const _=i.right-r.left,C=i.top+i.height*.35-r.top,k=36,T=28;return{d:`M ${_},${C} C ${_+k},${C-T*.3} ${_+k},${C-T*1.3} ${_},${C-T}`,labelX:_+k+4,labelY:C-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 _=(x-f)*.4;return{d:`M ${f},${g} C ${f+_},${g} ${x-_},${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 Xtt({entity:i,relations:e}){const[r,n]=Y.useState(new Set),a=i.storageType==="json"?"{ }":i.storageType==="table"?"SQL":"☰",o=i.fields.filter(u=>!u.isNested),c=Y.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":Xv(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=Ktt(u,e,i.name),f=LN(u.type),g=c.get(u.name),x=r.has(u.name);return m.jsxs(Y.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 C;const v=LN(y.type),_=y.name.slice((((C=y.parentField)==null?void 0:C.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:[".",_]}),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 Ztt({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 TD({content:i}){const e=Y.useRef(null),[r,n]=Y.useState([]),[a,o]=Y.useState({width:0,height:0}),c=Y.useMemo(()=>Htt(i),[i]),h=Y.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="${Xv(g.from)}"]`),y=u.querySelector(`[data-entity="${Xv(g.to)}"]`);if(!x||!y)continue;const v=x.getBoundingClientRect(),_=y.getBoundingClientRect(),{d:C,labelX:k,labelY:T}=Vtt(v,_,d,g.from===g.to);f.push({d:C,labelX:k,labelY:T,label:g.cardinality})}n(f)},[c]);return Y.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(Xtt,{entity:u,relations:c.relations},u.name))}),m.jsx(Ztt,{relations:c.relations,entities:c.entities})]})}const Qtt={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function Zv({type:i}){return m.jsx("span",{className:`json-type-badge ${Qtt[i]??""}`,children:i})}function Qv(){return m.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function Jtt({data:i}){const[e,r]=Y.useState("all"),[n,a]=Y.useState(new Set),o=Y.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=Y.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(Zv,{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(Zv,{type:f.type}),f.breaking&&m.jsx(Qv,{}),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 tet({data:i}){const[e,r]=Y.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(Qv,{}),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(Zv,{type:g.type}),g.breaking&&m.jsx(Qv,{}),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 eet({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(Jtt,{data:i}):n&&((c=i[0])!=null&&c.version)?m.jsx(tet,{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 iet(i){return i.endsWith(".sql")||i.endsWith(".json")||i.endsWith(".md")}function ret({onNavigateTaxonomy:i}={}){const{t:e}=Bi(),r=kr(),[n,a]=Y.useState(null),[o,c]=Y.useState(null),[h,u]=Y.useState(!1),[d,f]=Y.useState("preview"),{data:g,isLoading:x,isError:y,error:v}=di({queryKey:["core"],queryFn:()=>oe.get("/core")}),{data:_}=di({queryKey:["core",n],queryFn:()=>oe.get(`/core/${n}`),enabled:!!n}),C=Hr({mutationFn:({filename:B,content:O})=>oe.put(`/core/${B}`,{content:O}),onSuccess:()=>{r.invalidateQueries({queryKey:["core"]}),u(!1)}}),k=()=>{(_==null?void 0:_.content)!==void 0&&(c(_.content),u(!0))},T=()=>{n&&o!==null&&C.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||!_)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")&&_.content)return m.jsx(TD,{content:_.content});if(n.endsWith(".json")&&_.data)return m.jsx(eet,{data:_.data,filename:n});if(n.endsWith(".md")&&_.content)return m.jsx(Xd,{content:_.content,frontmatter:_.frontmatter})}return m.jsx("pre",{className:"core-viewer-content",children:_.content??JSON.stringify(_.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((B,O)=>m.jsxs("button",{className:`core-list-item ${n===B.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(O+1,8)}`,onClick:()=>{a(B.filename),u(!1),f("preview")},children:[m.jsx("span",{className:"core-list-name",children:B.name}),m.jsx("span",{className:"core-list-type",children:B.type})]},B.filename))}),m.jsxs("div",{className:"core-detail",children:[!n&&m.jsx("div",{className:"core-empty",children:"Select a file to view."}),n&&_&&!h&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:_.filename}),m.jsxs("div",{className:"core-viewer-actions",children:[iet(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"})]}),_.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:C.isPending,children:C.isPending?"Saving...":"Save"})]})]}),m.jsxs("div",{className:"core-editor-split",children:[m.jsx("textarea",{className:"core-editor-textarea",value:o??"",onChange:B=>c(B.target.value)}),m.jsx("pre",{className:"core-editor-preview",children:o})]})]})]})]})]})}function net(){return di({queryKey:["knowledge"],queryFn:()=>oe.get("/knowledge"),select:i=>i.entries})}function aet(i){return di({queryKey:["knowledge",i],queryFn:()=>oe.get(`/knowledge/${i}`),select:e=>e.entry,enabled:!!i})}function set(){const i=kr();return Hr({mutationFn:({slug:e,pinned:r})=>oe.patch(`/knowledge/${e}`,{pinned:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["knowledge"]})}})}const oet='button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])';function cet({label:i,actions:e,onClose:r,children:n}){const{t:a}=Bi(),o=Y.useRef(null),c=Y.useRef(r);return Y.useEffect(()=>{c.current=r}),Y.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 _=h.querySelectorAll(oet);if(_.length===0){v.preventDefault();return}const C=_[0],k=_[_.length-1],T=document.activeElement;!T||!h.contains(T)?(v.preventDefault(),(v.shiftKey?k:C).focus()):v.shiftKey&&(T===C||T===h)?(v.preventDefault(),k.focus()):!v.shiftKey&&T===k&&(v.preventDefault(),C.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 nx={exports:{}},ON;function het(){return ON||(ON=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,B=[],O=0,A=0,M;for(M=0;M<u.length;M+=1)if(_=u.charAt(M),Object.prototype.hasOwnProperty.call(y,_)||(y[_]=E++,v[_]=!0),C=k+_,Object.prototype.hasOwnProperty.call(y,C))k=C;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,B.push(f(O)),O=0):A++;for(x=k.charCodeAt(0),g=0;g<8;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<N;g++)O=O<<1|x,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,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,B.push(f(O)),O=0):A++,x=x>>1;T--,T==0&&(T=Math.pow(2,N),N++),y[C]=E++,k=String(_)}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,B.push(f(O)),O=0):A++;for(x=k.charCodeAt(0),g=0;g<8;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<N;g++)O=O<<1|x,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,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,B.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,B.push(f(O)),O=0):A++,x=x>>1;for(;;)if(O=O<<1,A==d-1){B.push(f(O));break}else A++;return B.join("")},decompress:function(u){return u==null?"":u==""?null:h._decompress(u.length,32768,function(d){return u.charCodeAt(d)})},_decompress:function(u,d,f){var g=[],x=4,y=4,v=3,_="",C=[],k,T,E,N,B,O,A,M={val:f(0),position:d,index:1};for(k=0;k<3;k+=1)g[k]=k;for(E=0,B=Math.pow(2,2),O=1;O!=B;)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,B=Math.pow(2,8),O=1;O!=B;)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,B=Math.pow(2,16),O=1;O!=B;)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,C.push(A);;){if(M.index>u)return"";for(E=0,B=Math.pow(2,v),O=1;O!=B;)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,B=Math.pow(2,8),O=1;O!=B;)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,B=Math.pow(2,16),O=1;O!=B;)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 C.join("")}if(x==0&&(x=Math.pow(2,v),v++),g[A])_=g[A];else if(A===y)_=T+T.charAt(0);else return null;C.push(_),g[y++]=T+_.charAt(0),x--,T=_,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})})(nx)),nx.exports}var uet=het();const det=/##\s*Drawing\s*```(compressed-json|json)\s*([\s\S]*?)```/;function fet(i){const e=i.match(det);if(!e)return null;const[,r,n]=e;let a;if(r==="compressed-json"){const o=uet.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 ED(i){return i.endsWith(".excalidraw")}function pet({content:i}){const e=Y.useRef(null),{resolved:r}=Id(),[n,a]=Y.useState(null);return Y.useEffect(()=>{const o=e.current;if(!o)return;let c=!1,h=null,u=null;const d=fet(i);if(!d){a("Could not read the Excalidraw drawing in this file.");return}return a(null),(async()=>{try{const{exportToSvg:f}=await Te(async()=>{const{exportToSvg:C}=await import("./percentages-BXMCSKIN-FxAvjywS.js").then(k=>k.i);return{exportToSvg:C}},__vite__mapDeps([52,53]));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=CD(g,{maxZoom:12,minZoom:.1,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1});h=()=>v.dispose();const _=()=>{try{const C=o.getBoundingClientRect();if(C.width===0||C.height===0||x===0||y===0)return;const k=24,T=Math.min((C.width-k)/x,(C.height-k)/y,1);v.zoomAbs(0,0,1),v.moveTo(0,0),v.zoomAbs(0,0,T);const E=(C.width-x*T)/2,N=(C.height-y*T)/2;v.moveTo(E,N)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(_)),u=new ResizeObserver(()=>_()),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 get=/```sql\s*\n([\s\S]*?)```/i;function met(i,e){if(!i.startsWith("data-structures/"))return null;const r=e.match(get);return r?r[1]:null}function yet(i){return i.split(/[-_]/).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(" ")}function bet(i,e){if(!e)return i.name;if(ED(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 xet(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=net(),o=set(),[c,h]=Y.useState(""),[u,d]=Y.useState(null),[f,g]=Y.useState("preview"),[x,y]=Y.useState(new Set),[v,_]=Y.useState(!1),{data:C}=aet(u??""),k=Y.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const D=c.toLowerCase();return e.filter(z=>z.name.toLowerCase().includes(D)||z.description.toLowerCase().includes(D)||z.tags.some(U=>U.toLowerCase().includes(D)))},[e,c]),{rootEntries:T,folders:E}=Y.useMemo(()=>{const D=[],z=new Map;for(const K of k){const $=K.slug.indexOf("/");if($===-1){D.push(K);continue}const H=K.slug.slice(0,$),j=z.get(H);j?j.push(K):z.set(H,[K])}const U=[...z.entries()].sort((K,$)=>K[0].localeCompare($[0])).map(([K,$])=>({folder:K,label:yet(K),entries:$}));return{rootEntries:D,folders:U}},[k]),N=c.trim().length>0,B=D=>N||x.has(D),O=D=>{y(z=>{const U=new Set(z);return U.has(D)?U.delete(D):U.add(D),U})},A=(D,z=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:bet(D,z)}),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"})]}),F=D=>{if(f==="preview"&&D.content){if(ED(D.slug))return m.jsx(pet,{content:D.content});const z=met(D.slug,D.content);return z?m.jsx(TD,{content:z}):m.jsx(Xd,{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":B(D.folder),children:[m.jsx("span",{className:"knowledge-folder-chevron",children:B(D.folder)?"▾":"▸"}),m.jsx("span",{className:"knowledge-folder-name",children:D.label}),m.jsx("span",{className:"knowledge-folder-count",children:D.entries.length})]}),B(D.folder)&&m.jsx("div",{className:"knowledge-folder-items",children:D.entries.map(z=>A(z,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&&C&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:C.name}),m.jsxs("div",{className:"core-viewer-actions",children:[M(),m.jsx("button",{className:"core-expand-btn",onClick:()=>_(!0),title:i("knowledge.fullscreen"),"aria-label":i("knowledge.fullscreen"),children:"⛶"})]})]}),v?m.jsx(cet,{label:C.name,actions:M(),onClose:()=>_(!1),children:F(C)}):F(C)]})]})]})]})}function vet(){const{t:i}=Bi(),[e,r]=Y.useState(null),[n,a]=Y.useState("preview"),[o,c]=Y.useState(""),{data:h,isLoading:u,isError:d,error:f}=di({queryKey:["features"],queryFn:()=>oe.get("/features")}),g=(h==null?void 0:h.features)??[],x=Y.useMemo(()=>{if(!o.trim())return g;const v=o.toLowerCase();return g.filter(_=>_.slug.toLowerCase().includes(v)||_.status.toLowerCase().includes(v)||_.tags.some(C=>C.toLowerCase().includes(v)))},[g,o]),{data:y}=di({queryKey:["features",e],queryFn:()=>oe.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,_)=>{var C;return m.jsxs("button",{className:`feature-card ${e===v.slug?"feature-card--active":""} animate-stagger animate-stagger-${Math.min(_+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:[((C=v.freshness)==null?void 0:C.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(Xd,{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 _et(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 Cet(i,e,r){return e=Bet(e),e in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function RN(i,e){return Tet(i)||_et(i,e)||ND(i,e)||Aet()}function ket(i){return wet(i)||Eet(i)||ND(i)||Net()}function wet(i){if(Array.isArray(i))return Jv(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 ND(i,e){if(i){if(typeof i=="string")return Jv(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 Jv(i,e)}}function Jv(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 Net(){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 Aet(){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 Met(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 Bet(i){var e=Met(i,"string");return typeof e=="symbol"?e:String(e)}var Let=function(e,r){var n=new Set(r);return Object.assign.apply(Object,[{}].concat(ket(Object.entries(e).filter(function(a){var o=RN(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=RN(a,2),c=o[0],h=o[1];return Cet({},c,h)}))))};function t1(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 Ret(i){if(Array.isArray(i))return t1(i)}function Det(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function jet(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 Fet(){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 Iet(){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 $et(i,e){return Oet(i)||jet(i,e)||AD(i,e)||Fet()}function DN(i){return Ret(i)||Det(i)||AD(i)||Iet()}function AD(i,e){if(i){if(typeof i=="string")return t1(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)?t1(i,e):void 0}}function zet(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 Y.forwardRef(function(f,g){var x=Y.useRef(),y=Y.useMemo(function(){var C=Object.fromEntries(d.filter(function(k){return f.hasOwnProperty(k)}).map(function(k){return[k,f[k]]}));return i(C)},[]);jN(function(){y(o(x.current))},Y.useLayoutEffect),jN(function(){return y._destructor instanceof Function?y._destructor:void 0});var v=Y.useCallback(function(C){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[C]instanceof Function?y[C].apply(y,T):void 0},[y]),_=Y.useRef({});return Object.keys(Let(f,[].concat(DN(h),DN(d)))).filter(function(C){return _.current[C]!==f[C]}).forEach(function(C){return v(C,f[C])}),_.current=f,Y.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(C){return[C,function(){for(var k=arguments.length,T=new Array(k),E=0;E<k;E++)T[E]=arguments[E];return v.apply(void 0,[C].concat(T))}]}))},[v]),QA.createElement(n,{ref:x})})}function jN(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.useEffect,r=Y.useRef(),n=Y.useRef(!1),a=Y.useRef(!1),o=Y.useState(0),c=$et(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 Pet="[object Symbol]";function qet(i){return typeof i=="symbol"||Sh(i)&&Wl(i)==Pet}var Uet=/\s/;function Het(i){for(var e=i.length;e--&&Uet.test(i.charAt(e)););return e}var Wet=/^\s+/;function Get(i){return i&&i.slice(0,Het(i)+1).replace(Wet,"")}var FN=NaN,Yet=/^[-+]0x[0-9a-f]+$/i,Ket=/^0b[01]+$/i,Vet=/^0o[0-7]+$/i,Xet=parseInt;function IN(i){if(typeof i=="number")return i;if(qet(i))return FN;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=Get(i);var r=Ket.test(i);return r||Vet.test(i)?Xet(i.slice(2),r?2:8):Yet.test(i)?FN:+i}var ax=function(){return Ta.Date.now()},Zet="Expected a function",Qet=Math.max,Jet=Math.min;function MD(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(Zet);e=IN(e)||0,ka(r)&&(f=!!r.leading,g="maxWait"in r,o=g?Qet(IN(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 _(O){var A=O-u,M=O-d,F=e-A;return g?Jet(F,o-M):F}function C(O){var A=O-u,M=O-d;return u===void 0||A>=e||A<0||g&&M>=o}function k(){var O=ax();if(C(O))return T(O);h=setTimeout(k,_(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(ax())}function B(){var O=ax(),A=C(O);if(n=arguments,a=this,u=O,A){if(h===void 0)return v(u);if(g)return clearTimeout(h),h=setTimeout(k,e),y(u)}return h===void 0&&(h=setTimeout(k,e)),c}return B.cancel=E,B.flush=N,B}var tit="Expected a function";function eit(i,e,r){var n=!0,a=!0;if(typeof i!="function")throw new TypeError(tit);return ka(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),MD(i,e,{leading:n,maxWait:e,trailing:a})}var Ml=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-Ml.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?Ml.Bounce.In(i*2)*.5:Ml.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}}}}),td=function(){return performance.now()},BD=(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=td()),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})(),e1={Linear:function(i,e){var r=i.length-1,n=r*e,a=Math.floor(n),o=e1.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}}},LD=(function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i})(),i1=new BD,$N=(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=Ml.Linear.None,this._interpolationFunction=e1.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=LD.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=i1,i1.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=td()),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 _=this._handleRelativeValue(h,g[y]);if(isNaN(_)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}x.push(_)}f&&(n[c]=x)}if((d==="object"||u)&&h&&!f){r[c]=u?[]:{};var C=h;for(var k in C)r[c][k]=C[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(C,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=td()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},i.prototype.resume=function(e){return e===void 0&&(e=td()),!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=Ml.Linear.None),this._easingFunction=e,this},i.prototype.interpolation=function(e){return e===void 0&&(e=e1.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=td()),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 _=Math.trunc(c/h),C=c-_*h,k=Math.min(C/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})();LD.nextId;var Va=i1;Va.getAll.bind(Va);Va.removeAll.bind(Va);Va.add.bind(Va);Va.remove.bind(Va);Va.update.bind(Va);function zN(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 iit(i){if(Array.isArray(i))return i}function rit(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function nit(i,e,r){return Object.defineProperty(i,"prototype",{writable:!1}),i}function ait(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 sit(){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 oit(i,e){return iit(i)||ait(i,e)||lit(i,e)||sit()}function lit(i,e){if(i){if(typeof i=="string")return zN(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)?zN(i,e):void 0}}var cit=nit(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;rit(this,i),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function P_(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 cit(v,a[v])});return function v(){for(var _=arguments.length,C=new Array(_),k=0;k<_;k++)C[k]=arguments[k];var T=!!(this instanceof v&&this.constructor),E=T?C.shift():void 0,N=C[0],B=N===void 0?{}:N,O=Object.assign({},r instanceof Function?r(B):r,{initialised:!1}),A={};function M(z){return F(z,B),D(),M}var F=function(U,K){f.call(M,U,O,K),O.initialised=!0},D=MD(function(){O.initialised&&(x.call(M,O,A),A={})},1);return y.forEach(function(z){M[z.name]=U(z);function U(K){var $=K.name,H=K.triggerUpdate,j=H===void 0?!1:H,q=K.onChange,G=q===void 0?function(W,rt){}:q,et=K.defaultVal,at=et===void 0?null:et;return function(W){var rt=O[$];if(!arguments.length)return rt;var ft=W===void 0?at:W;return O[$]=ft,G.call(M,ft,O,rt),!A.hasOwnProperty($)&&(A[$]=rt),j&&D(),M}}}),Object.keys(c).forEach(function(z){M[z]=function(){for(var U,K=arguments.length,$=new Array(K),H=0;H<K;H++)$[H]=arguments[H];return(U=c[z]).call.apply(U,[M,O].concat($))}}),Object.entries(u).forEach(function(z){var U=oit(z,2),K=U[0],$=U[1];return M[K]=M[$]}),M.resetProps=function(){return y.forEach(function(z){M[z.name](z.defaultVal)}),M},M.resetProps(),O._rerender=D,T&&E&&M(E),M}}var ci=(function(i){return typeof i=="function"?i:typeof i=="string"?function(e){return e[i]}:function(e){return i}});function Hg(i){"@babel/helpers - typeof";return Hg=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},Hg(i)}var hit=/^\s+/,uit=/\s+$/;function ne(i,e){if(i=i||"",e=e||{},i instanceof ne)return i;if(!(this instanceof ne))return new ne(i,e);var r=dit(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}ne.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=OD(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=qN(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=qN(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=PN(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=PN(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 UN(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return mit(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(ji(this._r,255)*100)+"%",g:Math.round(ji(this._g,255)*100)+"%",b:Math.round(ji(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ji(this._r,255)*100)+"%, "+Math.round(ji(this._g,255)*100)+"%, "+Math.round(ji(this._b,255)*100)+"%)":"rgba("+Math.round(ji(this._r,255)*100)+"%, "+Math.round(ji(this._g,255)*100)+"%, "+Math.round(ji(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Nit[UN(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+HN(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=ne(e);n="#"+HN(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 ne(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(vit,arguments)},brighten:function(){return this._applyModification(_it,arguments)},darken:function(){return this._applyModification(Cit,arguments)},desaturate:function(){return this._applyModification(yit,arguments)},saturate:function(){return this._applyModification(bit,arguments)},greyscale:function(){return this._applyModification(xit,arguments)},spin:function(){return this._applyModification(kit,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Tit,arguments)},complement:function(){return this._applyCombination(wit,arguments)},monochromatic:function(){return this._applyCombination(Eit,arguments)},splitcomplement:function(){return this._applyCombination(Sit,arguments)},triad:function(){return this._applyCombination(WN,[3])},tetrad:function(){return this._applyCombination(WN,[4])}};ne.fromRatio=function(i,e){if(Hg(i)=="object"){var r={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?r[n]=i[n]:r[n]=ed(i[n]));i=r}return ne(i,e)};function dit(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)),Hg(i)=="object"&&(bs(i.r)&&bs(i.g)&&bs(i.b)?(e=fit(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=ed(i.s),a=ed(i.v),e=git(i.h,n,a),c=!0,h="hsv"):bs(i.h)&&bs(i.s)&&bs(i.l)&&(n=ed(i.s),o=ed(i.l),e=pit(i.h,n,o),c=!0,h="hsl"),i.hasOwnProperty("a")&&(r=i.a)),r=OD(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 fit(i,e,r){return{r:ji(i,255)*255,g:ji(e,255)*255,b:ji(r,255)*255}}function PN(i,e,r){i=ji(i,255),e=ji(e,255),r=ji(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 pit(i,e,r){var n,a,o;i=ji(i,360),e=ji(e,100),r=ji(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 qN(i,e,r){i=ji(i,255),e=ji(e,255),r=ji(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 git(i,e,r){i=ji(i,360)*6,e=ji(e,100),r=ji(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 UN(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 mit(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(RD(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 HN(i,e,r,n){var a=[xa(RD(n)),xa(Math.round(i).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(r).toString(16))];return a.join("")}ne.equals=function(i,e){return!i||!e?!1:ne(i).toRgbString()==ne(e).toRgbString()};ne.random=function(){return ne.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function yit(i,e){e=e===0?0:e||10;var r=ne(i).toHsl();return r.s-=e/100,r.s=Cm(r.s),ne(r)}function bit(i,e){e=e===0?0:e||10;var r=ne(i).toHsl();return r.s+=e/100,r.s=Cm(r.s),ne(r)}function xit(i){return ne(i).desaturate(100)}function vit(i,e){e=e===0?0:e||10;var r=ne(i).toHsl();return r.l+=e/100,r.l=Cm(r.l),ne(r)}function _it(i,e){e=e===0?0:e||10;var r=ne(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)))),ne(r)}function Cit(i,e){e=e===0?0:e||10;var r=ne(i).toHsl();return r.l-=e/100,r.l=Cm(r.l),ne(r)}function kit(i,e){var r=ne(i).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,ne(r)}function wit(i){var e=ne(i).toHsl();return e.h=(e.h+180)%360,ne(e)}function WN(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ne(i).toHsl(),n=[ne(i)],a=360/e,o=1;o<e;o++)n.push(ne({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function Sit(i){var e=ne(i).toHsl(),r=e.h;return[ne(i),ne({h:(r+72)%360,s:e.s,l:e.l}),ne({h:(r+216)%360,s:e.s,l:e.l})]}function Tit(i,e,r){e=e||6,r=r||30;var n=ne(i).toHsl(),a=360/r,o=[ne(i)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(ne(n));return o}function Eit(i,e){e=e||6;for(var r=ne(i).toHsv(),n=r.h,a=r.s,o=r.v,c=[],h=1/e;e--;)c.push(ne({h:n,s:a,v:o})),o=(o+h)%1;return c}ne.mix=function(i,e,r){r=r===0?0:r||50;var n=ne(i).toRgb(),a=ne(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 ne(c)};ne.readability=function(i,e){var r=ne(i),n=ne(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};ne.isReadable=function(i,e,r){var n=ne.readability(i,e),a,o;switch(o=!1,a=Oit(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};ne.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=ne.readability(i,e[d]),o>a&&(a=o,n=ne(e[d]));return ne.isReadable(i,n,{level:h,size:u})||!c?n:(r.includeFallbackColors=!1,ne.mostReadable(i,["#fff","#000"],r))};var r1=ne.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=ne.hexNames=Ait(r1);function Ait(i){var e={};for(var r in i)i.hasOwnProperty(r)&&(e[i[r]]=r);return e}function OD(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function ji(i,e){Mit(i)&&(i="100%");var r=Bit(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 Mit(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function Bit(i){return typeof i=="string"&&i.indexOf("%")!=-1}function xa(i){return i.length==1?"0"+i:""+i}function ed(i){return i<=1&&(i=i*100+"%"),i}function RD(i){return Math.round(parseFloat(i)*255).toString(16)}function GN(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(hit,"").replace(uit,"").toLowerCase();var e=!1;if(r1[i])i=r1[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:GN(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:GN(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 Oit(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 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 Rit(i){if(Array.isArray(i))return n1(i)}function DD(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 Dit(i,e){if(e.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jit(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Jn(i,e){return i.get(DD(i,e))}function YN(i,e,r){Dit(i,e),e.set(i,r)}function KN(i,e,r){return i.set(DD(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,Uit(n.key),n)}}function Iit(i,e,r){return e&&Fit(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function $it(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function zit(){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 Pit(i){return Rit(i)||$it(i)||Hit(i)||zit()}function qit(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 Uit(i){var e=qit(i,"string");return typeof e=="symbol"?e:e+""}function Hit(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 Wit=123,Git=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},jD=function(e,r,n){return(e<<16)+(r<<8)+n},Yit=function(e){var r=ne(e).toRgb(),n=r.r,a=r.g,o=r.b;return jD(n,a,o)},VN=function(e,r){return e*Wit%Math.pow(2,r)},cl=new WeakMap,xs=new WeakMap,Kit=(function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;jit(this,i),YN(this,cl,void 0),YN(this,xs,void 0),KN(xs,this,e),this.reset()}return Iit(i,[{key:"reset",value:function(){KN(cl,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Jn(cl,this).length>=Math.pow(2,24-Jn(xs,this)))return null;var n=Jn(cl,this).length,a=VN(n,Jn(xs,this)),o=Git(n+(a<<24-Jn(xs,this)));return Jn(cl,this).push(r),o}},{key:"lookup",value:function(r){if(!r)return null;var n=typeof r=="string"?Yit(r):jD.apply(void 0,Pit(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 VN(a,Jn(xs,this))!==o||a>=Jn(cl,this).length?null:Jn(cl,this)[a]}}])})(),Qd,Fi,FD,ID,xo,XN,$D,zD,sx,Jp,hd,PD,q_,a1,s1,Wg={},Gg=[],Vit=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,km=Array.isArray;function Ha(i,e){for(var r in e)i[r]=e[r];return i}function U_(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function Xit(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?Qd.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 ud(i,c,n,a,null)}function ud(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??++FD,__i:-1,__u:0};return a==null&&Fi.vnode!=null&&Fi.vnode(o),o}function wm(i){return i.children}function tg(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 Zit(i){if(i.__P&&i.__d){var e=i.__v,r=e.__e,n=[],a=[],o=Ha({},e);o.__v=e.__v+1,Fi.vnode&&Fi.vnode(o),H_(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,WD(n,o,a),e.__e=e.__=null,o.__e!=r&&qD(o)}}function qD(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}),qD(i)}function ZN(i){(!i.__d&&(i.__d=!0)&&xo.push(i)&&!Yg.__r++||XN!=Fi.debounceRendering)&&((XN=Fi.debounceRendering)||$D)(Yg)}function Yg(){try{for(var i,e=1;xo.length;)xo.length>e&&xo.sort(zD),i=xo.shift(),e=xo.length,Zit(i)}finally{xo.length=Yg.__r=0}}function UD(i,e,r,n,a,o,c,h,u,d,f){var g,x,y,v,_,C,k,T=n&&n.__k||Gg,E=e.length;for(u=Qit(r,e,T,u,E),g=0;g<E;g++)(y=r.__k[g])!=null&&(x=y.__i!=-1&&T[y.__i]||Wg,y.__i=g,C=H_(i,y,x,a,o,c,h,u,d,f),v=y.__e,y.ref&&x.ref!=y.ref&&(x.ref&&W_(x.ref,null,y),f.push(y.ref,y.__c||v,y)),_==null&&v!=null&&(_=v),(k=!!(4&y.__u))||x.__k===y.__k?(u=HD(y,u,i,k),k&&x.__e&&(x.__e=null)):typeof y.type=="function"&&C!==void 0?u=C:v&&(u=v.nextSibling),y.__u&=-7);return r.__e=_,u}function Qit(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]=ud(null,c,null,null,null):km(c)?c=i.__k[o]=ud(wm,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=i.__k[o]=ud(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=Jit(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)),YD(h,h));return n}function HD(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=HD(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 Jit(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 QN(i,e,r){e[0]=="-"?i.setProperty(e,r??""):i[e]=r==null?"":typeof r!="number"||Vit.test(e)?r:r+"px"}function Bp(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||QN(i.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||QN(i.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(PD,"$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[hd]=n[hd]:(r[hd]=q_,i.addEventListener(e,o?s1:a1,o)):i.removeEventListener(e,o?s1:a1,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 JN(i){return function(e){if(this.l){var r=this.l[e.type+i];if(e[Jp]==null)e[Jp]=q_++;else if(e[Jp]<r[hd])return;return r(Fi.event?Fi.event(e):e)}}}function H_(i,e,r,n,a,o,c,h,u,d){var f,g,x,y,v,_,C,k,T,E,N,B,O,A,M,F=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),o=[h=e.__e=r.__e]),(f=Fi.__b)&&f(e);t:if(typeof F=="function")try{if(k=e.props,T=F.prototype&&F.prototype.render,E=(f=F.contextType)&&n[f.__c],N=f?E?E.props.value:f.__:n,r.__c?C=(g=e.__c=r.__c).__=g.__E:(T?e.__c=g=new F(k,N):(e.__c=g=new tg(k,N),g.constructor=F,g.render=ert),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&&F.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Ha({},g.__s)),Ha(g.__s,F.getDerivedStateFromProps(k,g.__s))),y=g.props,v=g.state,g.__v=e,x)T&&F.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&F.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)}),Gg.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,_)})}if(g.context=N,g.props=k,g.__P=i,g.__e=!1,B=Fi.__r,O=0,T)g.state=g.__s,g.__d=!1,B&&B(e),f=g.render(g.props,g.state,g.context),Gg.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,B&&B(e),f=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++O<25);g.state=g.__s,g.getChildContext!=null&&(n=Ha(Ha({},n),g.getChildContext())),T&&!x&&g.getSnapshotBeforeUpdate!=null&&(_=g.getSnapshotBeforeUpdate(y,v)),A=f!=null&&f.type===wm&&f.key==null?GD(f.props.children):f,h=UD(i,km(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),C&&(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--;)U_(o[M]);o1(e)}else e.__e=r.__e,e.__k=r.__k,D.then||o1(e);Fi.__e(D,e,r)}else o==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):h=e.__e=trt(r.__e,e,r,n,a,o,c,u,d);return(f=Fi.diffed)&&f(e),128&e.__u?void 0:h}function o1(i){i&&(i.__c&&(i.__c.__e=!0),i.__k&&i.__k.some(o1))}function WD(i,e,r){for(var n=0;n<r.length;n++)W_(r[n],r[++n],r[++n]);Fi.__c&&Fi.__c(e,i),i.some(function(a){try{i=a.__h,a.__h=[],i.some(function(o){o.call(a)})}catch(o){Fi.__e(o,a.__v)}})}function GD(i){return typeof i!="object"||i==null||i.__b>0?i:km(i)?i.map(GD):Ha({},i)}function trt(i,e,r,n,a,o,c,h,u){var d,f,g,x,y,v,_,C=r.props||Wg,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&&(Fi.__m&&Fi.__m(e,o),h=!1),o=null}if(T==null)C===k||h&&i.data==k||(i.data=k);else{if(o=o&&Qd.call(i.childNodes),!h&&o!=null)for(C={},d=0;d<i.attributes.length;d++)C[(y=i.attributes[d]).name]=y.value;for(d in C)y=C[d],d=="dangerouslySetInnerHTML"?g=y:d=="children"||d in k||d=="value"&&"defaultValue"in k||d=="checked"&&"defaultChecked"in k||Bp(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"?_=y:h&&typeof y!="function"||C[d]===y||Bp(i,d,y,C[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=""),UD(e.type=="template"?i.content:i,km(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--;)U_(o[d]);h||(d="value",T=="progress"&&v==null?i.removeAttribute("value"):v!=null&&(v!==i[d]||T=="progress"&&!v||T=="option"&&v!=C[d])&&Bp(i,d,v,C[d],a),d="checked",_!=null&&_!=i[d]&&Bp(i,d,_,C[d],a))}return i}function W_(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){Fi.__e(a,r)}}function YD(i,e,r){var n,a;if(Fi.unmount&&Fi.unmount(i),(n=i.ref)&&(n.current&&n.current!=i.__e||W_(n,null,e)),(n=i.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){Fi.__e(o,e)}n.base=n.__P=null}if(n=i.__k)for(a=0;a<n.length;a++)n[a]&&YD(n[a],e,r||typeof i.type!="function");r||U_(i.__e),i.__c=i.__=i.__e=void 0}function ert(i,e,r){return this.constructor(i,r)}function irt(i,e,r){var n,a,o,c;e==document&&(e=document.documentElement),Fi.__&&Fi.__(i,e),a=(n=!1)?null:e.__k,o=[],c=[],H_(e,i=e.__k=Xit(wm,null,[i]),a||Wg,Wg,e.namespaceURI,a?null:e.firstChild?Qd.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),WD(o,i,c)}function KD(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?Qd.call(arguments,2):r),ud(i.type,h,n||i.key,a||i.ref,null)}Qd=Gg.slice,Fi={__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}},FD=0,ID=function(i){return i!=null&&i.constructor===void 0},tg.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),ZN(this))},tg.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),ZN(this))},tg.prototype.render=wm,xo=[],$D=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zD=function(i,e){return i.__v.__b-e.__v.__b},Yg.__r=0,sx=Math.random().toString(8),Jp="__d"+sx,hd="__a"+sx,PD=/(PointerCapture)$|Capture$/i,q_=0,a1=JN(!1),s1=JN(!0);function tA(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 rrt(i){if(Array.isArray(i))return i}function nrt(i,e,r){return(e=hrt(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function art(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 srt(){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 eA(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 ort(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eA(Object(r),!0).forEach(function(n){nrt(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):eA(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function lrt(i,e){return rrt(i)||art(i,e)||urt(i,e)||srt()}function crt(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 hrt(i){var e=crt(i,"string");return typeof e=="symbol"?e:e+""}function Kg(i){"@babel/helpers - typeof";return Kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kg(i)}function urt(i,e){if(i){if(typeof i=="string")return tA(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)?tA(i,e):void 0}}var l1=function(e){if(Kg(e)!=="object")return e;var r=KD(e);if(r.props){var n;r.props=ort({},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(l1):l1(r.props.children))}return r},drt=function(e){return ID(KD(e))},frt=function(e,r){delete r.__k,irt(l1(e),r)};function prt(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 grt=`.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
|
+
`;prt(grt);var mrt=P_({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.style,o=a===void 0?{}:a,c=!!e&&Kg(e)==="object"&&!!e.node&&typeof e.node=="function",h=ue(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=lrt(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):drt(e.content)?(e.tooltipEl.text(""),frt(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 yrt(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 brt(i){const e=+this._x.call(null,i);return VD(this.cover(e),e,i)}function VD(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 xrt(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)VD(this,r[o],i[o]);return this}function vrt(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 _rt(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function Crt(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 krt(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 wrt(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 Srt(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function Trt(){return this._root}function Ert(){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 Mrt(i){return i[0]}function Brt(i){return arguments.length?(this._x=i,this):this._x}function G_(i,e){var r=new Y_(e??Mrt,NaN,NaN);return i==null?r:r.addAll(i)}function Y_(i,e,r){this._x=i,this._x0=e,this._x1=r,this._root=void 0}function iA(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var _n=G_.prototype=Y_.prototype;_n.copy=function(){var i=new Y_(this._x,this._x0,this._x1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=iA(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]=iA(n));return i};_n.add=brt;_n.addAll=xrt;_n.cover=vrt;_n.data=_rt;_n.extent=Crt;_n.find=krt;_n.remove=wrt;_n.removeAll=Srt;_n.root=Trt;_n.size=Ert;_n.visit=Nrt;_n.visitAfter=Art;_n.x=Brt;function Lrt(i){const e=+this._x.call(null,i),r=+this._y.call(null,i),n=+this._z.call(null,i);return XD(this.cover(e,r,n),e,r,n,i)}function XD(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,B,O,A,M;if(!c)return i._root=h,i;for(;c.length;)if((N=e>=(v=(u+g)/2))?u=v:g=v,(B=r>=(_=(d+x)/2))?d=_:x=_,(O=n>=(C=(f+y)/2))?f=C:y=C,o=c,!(c=c[A=O<<2|B<<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,(B=r>=(_=(d+x)/2))?d=_:x=_,(O=n>=(C=(f+y)/2))?f=C:y=C;while((A=O<<2|B<<1|N)===(M=(E>=C)<<2|(T>=_)<<1|k>=v));return o[M]=c,o[A]=h,i}function Ort(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,_;g<e;++g)isNaN(y=+this._x.call(null,x=i[g]))||isNaN(v=+this._y.call(null,x))||isNaN(_=+this._z.call(null,x))||(r[g]=y,n[g]=v,a[g]=_,y<o&&(o=y),y>u&&(u=y),v<c&&(c=v),v>d&&(d=v),_<h&&(h=_),_>f&&(f=_));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)XD(this,r[g],n[g],a[g],i[g]);return this}function Rrt(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 Drt(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function jrt(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 Si(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,_=this._y1,C=this._z1,k=[],T=this._root,E,N;for(T&&k.push(new Si(T,o,c,h,v,_,C)),n==null?n=1/0:(o=i-n,c=e-n,h=r-n,v=i+n,_=e+n,C=r+n,n*=n);E=k.pop();)if(!(!(T=E.node)||(u=E.x0)>v||(d=E.y0)>_||(f=E.z0)>C||(g=E.x1)<o||(x=E.y1)<c||(y=E.z1)<h))if(T.length){var B=(u+g)/2,O=(d+x)/2,A=(f+y)/2;k.push(new Si(T[7],B,O,A,g,x,y),new Si(T[6],u,O,A,B,x,y),new Si(T[5],B,d,A,g,O,y),new Si(T[4],u,d,A,B,O,y),new Si(T[3],B,O,f,g,x,A),new Si(T[2],u,O,f,B,x,A),new Si(T[1],B,d,f,g,O,A),new Si(T[0],u,d,f,B,O,A)),(N=(r>=A)<<2|(e>=O)<<1|i>=B)&&(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),F=e-+this._y.call(null,T.data),D=r-+this._z.call(null,T.data),z=M*M+F*F+D*D;if(z<n){var U=Math.sqrt(n=z);o=i-U,c=e-U,h=r-U,v=i+U,_=e+U,C=r+U,a=T.data}}return a}const Irt=(i,e,r,n,a,o)=>Math.sqrt((i-n)**2+(e-a)**2+(r-o)**2);function $rt(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;Irt(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||_<o||C<c||k<h}),a}function zrt(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,B,O;if(!r)return this;if(r.length)for(;;){if((T=x>=(_=(c+d)/2))?c=_:d=_,(E=y>=(C=(h+f)/2))?h=C:f=C,(N=v>=(k=(u+g)/2))?u=k:g=k,e=r,!(r=r[B=N<<2|E<<1|T]))return this;if(!r.length)break;(e[B+1&7]||e[B+2&7]||e[B+3&7]||e[B+4&7]||e[B+5&7]||e[B+6&7]||e[B+7&7])&&(n=e,O=B)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[B]=o:delete e[B],(r=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&r===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[O]=r:this._root=r),this):(this._root=o,this)}function Prt(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function qrt(){return this._root}function Urt(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function Hrt(i){var e=[],r,n=this._root,a,o,c,h,u,d,f;for(n&&e.push(new Si(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 Si(a,g,x,y,u,d,f)),(a=n[6])&&e.push(new Si(a,o,x,y,g,d,f)),(a=n[5])&&e.push(new Si(a,g,c,y,u,x,f)),(a=n[4])&&e.push(new Si(a,o,c,y,g,x,f)),(a=n[3])&&e.push(new Si(a,g,x,h,u,d,y)),(a=n[2])&&e.push(new Si(a,o,x,h,g,d,y)),(a=n[1])&&e.push(new Si(a,g,c,h,u,x,y)),(a=n[0])&&e.push(new Si(a,o,c,h,g,x,y))}return this}function Wrt(i){var e=[],r=[],n;for(this._root&&e.push(new Si(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 Si(o,c,h,u,x,y,v)),(o=a[1])&&e.push(new Si(o,x,h,u,d,y,v)),(o=a[2])&&e.push(new Si(o,c,y,u,x,f,v)),(o=a[3])&&e.push(new Si(o,x,y,u,d,f,v)),(o=a[4])&&e.push(new Si(o,c,h,v,x,y,g)),(o=a[5])&&e.push(new Si(o,x,h,v,d,y,g)),(o=a[6])&&e.push(new Si(o,c,y,v,x,f,g)),(o=a[7])&&e.push(new Si(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 Grt(i){return i[0]}function Yrt(i){return arguments.length?(this._x=i,this):this._x}function Krt(i){return i[1]}function Vrt(i){return arguments.length?(this._y=i,this):this._y}function Xrt(i){return i[2]}function Zrt(i){return arguments.length?(this._z=i,this):this._z}function K_(i,e,r,n){var a=new V_(e??Grt,r??Krt,n??Xrt,NaN,NaN,NaN,NaN,NaN,NaN);return i==null?a:a.addAll(i)}function V_(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 rA(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Rr=K_.prototype=V_.prototype;Rr.copy=function(){var i=new V_(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=rA(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]=rA(n));return i};Rr.add=Lrt;Rr.addAll=Ort;Rr.cover=Rrt;Rr.data=Drt;Rr.extent=jrt;Rr.find=Frt;Rr.findAllWithinRadius=$rt;Rr.remove=zrt;Rr.removeAll=Prt;Rr.root=qrt;Rr.size=Urt;Rr.visit=Hrt;Rr.visitAfter=Wrt;Rr.x=Yrt;Rr.y=Vrt;Rr.z=Zrt;function br(i){return function(){return i}}function na(i){return(i()-.5)*1e-6}function ox(i){return i.x+i.vx}function nA(i){return i.y+i.vy}function Qrt(i){return i.z+i.vz}function Jrt(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?G_(e,ox):r===2?V1(e,ox,nA):r===3?K_(e,ox,nA,Qrt):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&&(_=y.y+y.vy),r>2&&(C=y.z+y.vz),x.visit(N);function N(B,O,A,M,F,D,z){var U=[O,A,M,F,D,z],K=U[0],$=U[1],H=U[2],j=U[r],q=U[r+1],G=U[r+2],et=B.data,at=B.r,W=k+at;if(et){if(et.index>y.index){var rt=v-et.x-et.vx,ft=r>1?_-et.y-et.vy:0,st=r>2?C-et.z-et.vz:0,Ct=rt*rt+ft*ft+st*st;Ct<W*W&&(rt===0&&(rt=na(a),Ct+=rt*rt),r>1&&ft===0&&(ft=na(a),Ct+=ft*ft),r>2&&st===0&&(st=na(a),Ct+=st*st),Ct=(W-(Ct=Math.sqrt(Ct)))/Ct*o,y.vx+=(rt*=Ct)*(W=(at*=at)/(T+at)),r>1&&(y.vy+=(ft*=Ct)*W),r>2&&(y.vz+=(st*=Ct)*W),et.vx-=rt*(W=1-W),r>1&&(et.vy-=ft*W),r>2&&(et.vz-=st*W))}return}return K>v+W||j<v-W||r>1&&($>_+W||q<_-W)||r>2&&(H>C+W||G<C-W)}}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 tnt(i){return i.index}function aA(i,e){var r=i.get(e);if(!r)throw new Error("node not found: "+e);return r}function ent(i){var e=tnt,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,B,O,A,M=0,F=0,D=0,z,U;N<E;++N)B=i[N],O=B.source,A=B.target,M=A.x+A.vx-O.x-O.vx||na(f),h>1&&(F=A.y+A.vy-O.y-O.vy||na(f)),h>2&&(D=A.z+A.vz-O.z-O.vz||na(f)),z=Math.sqrt(M*M+F*F+D*D),z=(z-o[N])/z*k*n[N],M*=z,F*=z,D*=z,A.vx-=M*(U=d[N]),h>1&&(A.vy-=F*U),h>2&&(A.vz-=D*U),O.vx+=M*(U=1-U),h>1&&(O.vy+=F*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])),B;for(k=0,u=new Array(T);k<E;++k)B=i[k],B.index=k,typeof B.source!="object"&&(B.source=aA(N,B.source)),typeof B.target!="object"&&(B.target=aA(N,B.target)),u[B.source.index]=(u[B.source.index]||0)+1,u[B.target.index]=(u[B.target.index]||0)+1;for(k=0,d=new Array(E);k<E;++k)B=i[k],d[k]=u[B.source.index]/(u[B.source.index]+u[B.target.index]);n=new Array(E),_(),o=new Array(E),C()}}function _(){if(c)for(var k=0,T=i.length;k<T;++k)n[k]=+r(i[k],k,i)}function C(){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),_(),y):r},y.distance=function(k){return arguments.length?(a=typeof k=="function"?k:br(+k),C(),y):a},y}const int=1664525,rnt=1013904223,sA=4294967296;function nnt(){let i=1;return()=>(i=(int*i+rnt)%sA)/sA}var oA=3;function lx(i){return i.x}function lA(i){return i.y}function ant(i){return i.z}var snt=10,ont=Math.PI*(3-Math.sqrt(5)),lnt=Math.PI*20/(9+Math.sqrt(221));function cnt(i,e){e=e||2;var r=Math.min(oA,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=G1(y),g=Pd("tick","end"),x=nnt();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 B=0;B<k;++B)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 _(){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=snt*(r>2?Math.cbrt(.5+k):r>1?Math.sqrt(.5+k):k),B=k*ont,O=k*lnt;r===1?E.x=N:r===2?(E.x=N*Math.cos(B),E.y=N*Math.sin(B)):(E.x=N*Math.sin(B)*Math.cos(O),E.y=N*Math.cos(B),E.z=N*Math.sin(B)*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 C(k){return k.initialize&&k.initialize(i,x,r),k}return _(),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(oA,Math.max(1,Math.round(k))),d.forEach(C),n):r},nodes:function(k){return arguments.length?(i=k,_(),d.forEach(C),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(C),n):x},force:function(k,T){return arguments.length>1?(T==null?d.delete(k):d.set(k,C(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,B=k.shift()||1/0,O=0,A=i.length,M,F,D,z,U,K;for(B*=B,O=0;O<A;++O)U=i[O],M=T-U.x,F=E-(U.y||0),D=N-(U.z||0),z=M*M+F*F+D*D,z<B&&(K=U,B=z);return K},on:function(k,T){return arguments.length>1?(g.on(k,T),n):g.on(k)}}}function hnt(){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?G_(i,lx):e===2?V1(i,lx,lA):e===3?K_(i,lx,lA,ant):null).visitAfter(x);for(a=v,_=0;_<C;++_)r=i[_],k.visit(y)}function g(){if(i){var v,_=i.length,C;for(c=new Array(_),v=0;v<_;++v)C=i[v],c[C.index]=+o(C,v,i)}}function x(v){var _=0,C,k,T=0,E,N,B,O,A=v.length;if(A){for(E=N=B=O=0;O<A;++O)(C=v[O])&&(k=Math.abs(C.value))&&(_+=C.value,T+=k,E+=k*(C.x||0),N+=k*(C.y||0),B+=k*(C.z||0));_*=Math.sqrt(4/A),v.x=E/T,e>1&&(v.y=N/T),e>2&&(v.z=B/T)}else{C=v,C.x=C.data.x,e>1&&(C.y=C.data.y),e>2&&(C.z=C.data.z);do _+=c[C.data.index];while(C=C.next)}v.value=_}function y(v,_,C,k,T){if(!v.value)return!0;var E=[C,k,T][e-1],N=v.x-r.x,B=e>1?v.y-r.y:0,O=e>2?v.z-r.z:0,A=E-_,M=N*N+B*B+O*O;if(A*A/d<M)return M<u&&(N===0&&(N=na(n),M+=N*N),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&O===0&&(O=na(n),M+=O*O),M<h&&(M=Math.sqrt(h*M)),r.vx+=N*v.value*a/M,e>1&&(r.vy+=B*v.value*a/M),e>2&&(r.vz+=O*v.value*a/M)),!0;if(v.length||M>=u)return;(v.data!==r||v.next)&&(N===0&&(N=na(n),M+=N*N),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&O===0&&(O=na(n),M+=O*O),M<h&&(M=Math.sqrt(h*M)));do v.data!==r&&(A=c[v.data.index]*a/M,r.vx+=N*A,e>1&&(r.vy+=B*A),e>2&&(r.vz+=O*A));while(v=v.next)}return f.initialize=function(v,..._){i=v,n=_.find(C=>typeof C=="function")||Math.random,e=_.find(C=>[1,2,3].includes(C))||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 unt(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],_=v.x-e||1e-6,C=(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+=_*E,o>1&&(v.vy+=C*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 dnt(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 fnt(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:Du,cos:vs,sin:Bc,acos:pnt,atan2:ju,sqrt:po,pow:ea}=Math;function Fu(i){return i<0?-ea(-i,1/3):ea(i,1/3)}const ZD=Math.PI,Lp=2*ZD,go=ZD/2,gnt=1e-6,cx=Number.MAX_SAFE_INTEGER||9007199254740991,hx=Number.MIN_SAFE_INTEGER||-9007199254740991,mnt={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],mnt],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 Du(i-e)<=(r||gnt)},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 ju(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 Du(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 Ai(i.x,i.y,(i.x+e.x)/2,(i.y+e.y)/2,e.x,e.y)},findbbox:function(i){let e=cx,r=cx,n=hx,a=hx;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=cx,a=hx,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=-ju(e.p2.y-n,e.p2.x-r),o=function(c){return{x:(c.x-r)*vs(a)-(c.y-n)*Bc(a),y:(c.x-r)*Bc(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,F=n[2].y,D=A-2*M+F;if(D!==0){const z=-po(M*M-A*F),U=-A+M,K=-(z+U)/D,$=-(-z+U)/D;return[K,$].filter(a)}else if(M!==F&&D===0)return[(2*M-F)/(2*M-2*F)].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,_=(2*f*f*f-9*f*g+27*x)/27,C=_/2,k=C*C+v*v*v;let T,E,N,B,O;if(k<0){const A=-y/3,M=A*A*A,F=po(M),D=-_/(2*F),z=D<-1?-1:D>1?1:D,U=pnt(z),K=Fu(F),$=2*K;return N=$*vs(U/3)-f/3,B=$*vs((U+Lp)/3)-f/3,O=$*vs((U+2*Lp)/3)-f/3,[N,B,O].filter(a)}else{if(k===0)return T=C<0?Fu(-C):-Fu(C),N=2*T-f/3,B=-T-f/3,[N,B].filter(a);{const A=po(k);return T=Fu(-C+A),E=Fu(C+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,_=Ot.curvature(i+.001,e,r,n,!0).k;u=(_-d+(d-v))/2,h=(Du(_-d)+Du(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,Du(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*Bc(go),u=n*Bc(go)+a*vs(go),d=o*vs(go)-c*Bc(go),f=o*Bc(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,_=g+h,C=x+u,k=y+d,T=v+f,E=Ot.lli8(g,x,_,C,y,v,k,T),N=Ot.dist(E,i);let B=ju(i.y-E.y,i.x-E.x),O=ju(e.y-E.y,e.x-E.x),A=ju(r.y-E.y,r.x-E.x),M;return B<A?((B>O||O>A)&&(B+=Lp),B>A&&(M=A,A=B,B=M)):A<O&&O<B?(M=A,A=B,B=M):A+=Lp,E.s=B,E.e=A,E.r=N,E},numberSort:function(i,e){return i-e}};class dd{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 dd(r)}}const{abs:Iu,min:cA,max:hA,cos:ynt,sin:bnt,acos:xnt,sqrt:$u}=Math,vnt=Math.PI;class Ai{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(_){typeof v[_]<"u"&&y.push(v[_])})}),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+Iu(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 Ai(r,r,n);if(a===1)return new Ai(e,r,r);const o=Ai.getABC(2,e,r,n,a);return new Ai(e,o.A,n)}static cubicFromPoints(e,r,n,a,o){typeof a>"u"&&(a=.5);const c=Ai.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,_={x:r.x-g,y:r.y-x},C={x:r.x+y,y:r.y+v},k=c.A,T={x:k.x+(_.x-k.x)/(1-a),y:k.y+(_.y-k.y)/(1-a)},E={x:k.x+(C.x-k.x)/a,y:k.y+(C.y-k.y)/a},N={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},B={x:n.x+(E.x-n.x)/(1-a),y:n.y+(E.y-n.y)/(1-a)};return new Ai(e,N,B,n)}static getUtils(){return Ot}getUtils(){return Ai.getUtils()}static get PolyBezier(){return dd}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 Ai.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 Ai(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 Ai(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=$u(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=$u(r.x*r.x+r.y*r.y+r.z*r.z),o=$u(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=$u(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 Ai([n[0],n[3],n[5]]):new Ai([n[0],n[4],n[7],n[9]]),right:this.order===2?new Ai([n[5],n[4],n[2]]):new Ai([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 Ai(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),Iu(xnt(n))<vnt/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,Iu(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 Ai(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 _=$u(y.x*y.x+y.y*y.y);y.x/=_,y.y/=_,d[g+1]={x:x.x+v*y.x,y:x.y+v*y.y}}}),new Ai(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 Ai(d))}outline(e,r,n,a){if(r=r===void 0?e:r,this._linear){const B=this.normal(0),O=this.points[0],A=this.points[this.points.length-1];let M,F,D;n===void 0&&(n=e,a=r),M={x:O.x+B.x*e,y:O.y+B.y*e},D={x:A.x+B.x*n,y:A.y+B.y*n},F={x:(M.x+D.x)/2,y:(M.y+D.y)/2};const z=[M,F,D];M={x:O.x-B.x*r,y:O.y-B.y*r},D={x:A.x-B.x*a,y:A.y-B.y*a},F={x:(M.x+D.x)/2,y:(M.y+D.y)/2};const U=[D,F,M],K=Ot.makeline(U[2],z[0]),$=Ot.makeline(z[2],U[0]),H=[K,new Ai(z),$,new Ai(U)];return new dd(H)}const o=this.reduce(),c=o.length,h=[];let u=[],d,f=0,g=this.length();const x=typeof n<"u"&&typeof a<"u";function y(B,O,A,M,F){return function(D){const z=M/A,U=(M+F)/A,K=O-B;return Ot.map(D,0,1,B+z*K,B+U*K)}}o.forEach(function(B){const O=B.length();x?(h.push(B.scale(y(e,n,g,f,O))),u.push(B.scale(y(-r,-a,g,f,O)))):(h.push(B.scale(e)),u.push(B.scale(-r))),f+=O}),u=u.map(function(B){return d=B.points,d[3]?B.points=[d[3],d[2],d[1],d[0]]:B.points=[d[2],d[1],d[0]],B}).reverse();const v=h[0].points[0],_=h[c-1].points[h[c-1].points.length-1],C=u[c-1].points[u[c-1].points.length-1],k=u[0].points[0],T=Ot.makeline(C,v),E=Ot.makeline(_,k),N=[T].concat(h).concat([E]).concat(u);return new dd(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 Ai&&(e=e.reduce()),this.curveintersects(this.reduce(),e,r)):this.selfintersects(r)}lineIntersects(e){const r=cA(e.p1.x,e.p2.x),n=cA(e.p1.y,e.p2.y),a=hA(e.p1.x,e.p2.x),o=hA(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 Iu(d-u)+Iu(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,_=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||(_=a),g){if(a>=1){if(d.interval.end=_=1,f=d,a>1){let k={x:d.x+d.r*ynt(d.e),y:d.y+d.r*bnt(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=_}while(a<1);return r}}function c1(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 _nt(i){if(Array.isArray(i))return i}function Cnt(i){if(Array.isArray(i))return c1(i)}function knt(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function wnt(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 Snt(){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 Tnt(){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 Ent(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 _nt(i)||wnt(i,e)||QD(i,e)||Snt()}function Mnt(i){return Cnt(i)||knt(i)||QD(i)||Tnt()}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 String(i)}function Lnt(i){var e=Bnt(i,"string");return typeof e=="symbol"?e:e+""}function QD(i,e){if(i){if(typeof i=="string")return c1(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)?c1(i,e):void 0}}var Ont=(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,_;if(v){var C=f,k=C[y],T=Ent(C,[y].map(Lnt));_=k,f=T}else _=y(f,x);x+1<a.length?(d.hasOwnProperty(_)||(d[_]={}),d=d[_]):r?(d.hasOwnProperty(_)||(d[_]=[]),d[_].push(f)):d[_]=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(Mnt(d),[x]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function Rnt(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 Dnt=`.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
|
+
`;Rnt(Dnt);function h1(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 jnt(i){if(Array.isArray(i))return i}function Fnt(i){if(Array.isArray(i))return h1(i)}function uA(i,e,r){if(JD())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 Md(i,e,r){return(e=Unt(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function JD(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JD=function(){return!!i})()}function Int(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function $nt(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 znt(){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 Pnt(){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 dA(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 Lc(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dA(Object(r),!0).forEach(function(n){Md(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):dA(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function fd(i,e){return jnt(i)||$nt(i,e)||tj(i,e)||znt()}function aa(i){return Fnt(i)||Int(i)||tj(i)||Pnt()}function qnt(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 Unt(i){var e=qnt(i,"string");return typeof e=="symbol"?e:e+""}function u1(i){"@babel/helpers - typeof";return u1=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},u1(i)}function tj(i,e){if(i){if(typeof i=="string")return h1(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)?h1(i,e):void 0}}var Hnt=BB(A9);function fA(i,e,r){!e||typeof r!="string"||i.filter(function(n){return!n[r]}).forEach(function(n){n[r]=Hnt(e(n))})}function Wnt(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,_=y.target,C=N(v),k=N(_);if(!d.hasOwnProperty(C))throw"Missing source node with id: ".concat(C);if(!d.hasOwnProperty(k))throw"Missing target node with id: ".concat(k);var T=d[C],E=d[k];T.out.push(E);function N(B){return u1(B)==="object"?e(B):B}});var f=[];x(Object.values(d));var g=Object.assign.apply(Object,[{}].concat(aa(Object.entries(d).filter(function(y){var v=fd(y,2),_=v[1];return!_.skip}).map(function(y){var v=fd(y,2),_=v[0],C=v[1];return Md({},_,C.depth)}))));return g;function x(y){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=function(){var N=y[k];if(v.indexOf(N)!==-1){var B=[].concat(aa(v.slice(v.indexOf(N))),[N]).map(function(O){return e(O.data)});return f.some(function(O){return O.length===B.length&&O.every(function(A,M){return A===B[M]})})||(f.push(B),u(B)),1}_>N.depth&&(N.depth=_,x(N.out,[].concat(aa(v),[N]),_+(N.skip?0:1)))},k=0,T=y.length;k<T;k++)C()}}var Gnt=2,Ir=function(e,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},pA=function(e,r){if(!r.isShadow){var n=ci(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})}},Vg=P_({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,r){r.engineRunning=!1,pA(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:pA},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=ci(e.nodeVisibility),u=ci(e.nodeVal),d=ci(e.nodeColor),f=ci(e.nodeCanvasObjectMode),g=e.ctx,x=e.isShadow/e.globalScale,y=e.graphData.nodes.filter(h);g.save(),y.forEach(function(v){var _=f(v);if(e.nodeCanvasObject&&(_==="before"||_==="replace")&&(e.nodeCanvasObject(v,g,e.globalScale),_==="replace")){g.restore();return}var C=Math.sqrt(Math.max(0,u(v)||1))*e.nodeRelSize+x;g.beginPath(),g.arc(v.x,v.y,C,0,2*Math.PI,!1),g.fillStyle=d(v)||"rgba(31, 120, 180, 0.92)",g.fill(),e.nodeCanvasObject&&_==="after"&&e.nodeCanvasObject(v,e.ctx,e.globalScale)}),g.restore()}function a(){var h=ci(e.linkVisibility),u=ci(e.linkColor),d=ci(e.linkWidth),f=ci(e.linkLineDash),g=ci(e.linkCurvature),x=ci(e.linkCanvasObjectMode),y=e.ctx,v=e.isShadow*2,_=e.graphData.links.filter(h);_.forEach(O);var C=[],k=[],T=_;if(e.linkCanvasObject){var E=[],N=[];_.forEach(function(A){return({before:C,after:k,replace:E}[x(A)]||N).push(A)}),T=[].concat(aa(C),k,N),C=C.concat(E)}y.save(),C.forEach(function(A){return e.linkCanvasObject(A,y,e.globalScale)}),y.restore();var B=Ont(T,[u,d,f]);y.save(),Object.entries(B).forEach(function(A){var M=fd(A,2),F=M[0],D=M[1],z=!F||F==="undefined"?"rgba(0,0,0,0.15)":F;Object.entries(D).forEach(function(U){var K=fd(U,2),$=K[0],H=K[1],j=($||1)/e.globalScale+v;Object.entries(H).forEach(function(q){var G=fd(q,2);G[0];var et=G[1],at=f(et[0]);y.beginPath(),et.forEach(function(W){var rt=W.source,ft=W.target;if(!(!rt||!ft||!rt.hasOwnProperty("x")||!ft.hasOwnProperty("x"))){y.moveTo(rt.x,rt.y);var st=W.__controlPoints;st?y[st.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,aa(st).concat([ft.x,ft.y])):y.lineTo(ft.x,ft.y)}}),y.strokeStyle=z,y.lineWidth=j,y.setLineDash(at||[]),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 F=A.source,D=A.target;if(!(!F||!D||!F.hasOwnProperty("x")||!D.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow(D.x-F.x,2)+Math.pow(D.y-F.y,2));if(z>0){var U=Math.atan2(D.y-F.y,D.x-F.x),K=z*M,$={x:(F.x+D.x)/2+K*Math.cos(U-Math.PI/2),y:(F.y+D.y)/2+K*Math.sin(U-Math.PI/2)};A.__controlPoints=[$.x,$.y]}else{var H=M*70;A.__controlPoints=[D.x,D.y-H,D.x+H,D.y]}}}}function o(){var h=1.6,u=.2,d=ci(e.linkDirectionalArrowLength),f=ci(e.linkDirectionalArrowRelPos),g=ci(e.linkVisibility),x=ci(e.linkDirectionalArrowColor||e.linkColor),y=ci(e.nodeVal),v=e.ctx;v.save(),e.graphData.links.filter(g).forEach(function(_){var C=d(_);if(!(!C||C<0)){var k=_.source,T=_.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,B=Math.min(1,Math.max(0,f(_))),O=x(_)||"rgba(0,0,0,0.28)",A=C/h/2,M=_.__controlPoints&&uA(Ai,[k.x,k.y].concat(aa(_.__controlPoints),[T.x,T.y])),F=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)),z=E+C+(D-E-N-C)*B,U=F(z/D),K=F((z-C)/D),$=F((z-C*(1-u))/D),H=Math.atan2(U.y-K.y,U.x-K.x)-Math.PI/2;v.beginPath(),v.moveTo(U.x,U.y),v.lineTo(K.x+A*Math.cos(H),K.y+A*Math.sin(H)),v.lineTo($.x,$.y),v.lineTo(K.x-A*Math.cos(H),K.y-A*Math.sin(H)),v.fillStyle=O,v.fill()}}}),v.restore()}function c(){var h=ci(e.linkDirectionalParticles),u=ci(e.linkDirectionalParticleSpeed),d=ci(e.linkDirectionalParticleOffset),f=ci(e.linkDirectionalParticleWidth),g=ci(e.linkVisibility),x=ci(e.linkDirectionalParticleColor||e.linkColor),y=e.ctx;y.save(),e.graphData.links.filter(g).forEach(function(v){var _=h(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var C=v.source,k=v.target;if(!(!C||!k||!C.hasOwnProperty("x")||!k.hasOwnProperty("x"))){var T=u(v),E=Math.abs(d(v)),N=v.__photons||[],B=Math.max(0,f(v)/2)/Math.sqrt(e.globalScale),O=x(v)||"rgba(0,0,0,0.28)";y.fillStyle=O;var A=v.__controlPoints?uA(Ai,[C.x,C.y].concat(aa(v.__controlPoints),[k.x,k.y])):null,M=0,F=!1;N.forEach(function(D){var z=!!D.__singleHop;if(D.hasOwnProperty("__progressRatio")||(D.__progressRatio=z?T<0?1:0:(M+E)/_),!z&&M++,D.__progressRatio+=T,D.__progressRatio>=1||D.__progressRatio<0)if(!z)D.__progressRatio=D.__progressRatio%1,D.__progressRatio<0&&D.__progressRatio++;else{F=!0;return}var U=D.__progressRatio,K=A?A.get(U):{x:C.x+(k.x-C.x)*U||0,y:C.y+(k.y-C.y)*U||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(K.x,K.y,v,y,e.globalScale):(y.beginPath(),y.arc(K.x,K.y,B,0,2*Math.PI,!1),y.fill())}),F&&(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:cnt().force("link",ent()).force("charge",hnt()).force("center",yrt()).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&&fA(e.graphData.nodes,ci(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&fA(e.graphData.links,ci(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&&Wnt(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)*Gnt*(["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?unt(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 ej(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 Ynt=800,Knt=4,Vnt=5,ij=ej("forceGraph",Vg),Xnt=ej(["forceGraph","shadowGraph"],Vg),Znt=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 Md({},i,ij.linkProp(i))})).concat(aa(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(i){return Md({},i,Xnt.linkProp(i))})))),Qnt=Object.assign.apply(Object,aa(["d3Force","d3ReheatSimulation","emitParticle"].map(function(i){return Md({},i,ij.linkMethod(i))})));function ux(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 rj(i){var e=window.devicePixelRatio;i.setTransform(e,0,0,e,0,0)}function gA(i,e,r){i.save(),rj(i),i.clearRect(0,0,e,r),i.restore()}var Jnt=P_({props:Lc({width:{default:window.innerWidth,onChange:function(e,r){return ux(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,r){return ux(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}},Znt),aliases:{stopAnimation:"pauseAnimation"},methods:Lc({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 $N(c()).to(o,a).easing(Ml.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 $N({k:a()}).to({k:r},n).easing(Ml.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=ci(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:[D2(o,function(c){return c.x-c.r}),R2(o,function(c){return c.x+c.r})],y:[D2(o,function(c){return c.y-c.r}),R2(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:[]})}},Qnt),stateInit:function(){return{lastSetZoom:1,zoom:V9(),forceGraph:new Vg,shadowGraph:new Vg().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Kit,tweenGroup:new BD}},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};ue(r.canvas).call(SP().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,_={x:x.x+(y.x-x.x)/v-g.x,y:x.y+(y.y-x.y)/v-g.y};["x","y"].forEach(function(C){return g["f".concat(C)]=g[C]=x[C]+(y[C]-x[C])/v}),!(!g.__dragged&&Vnt>=Math.sqrt(Fz(["x","y"].map(function(C){return Math.pow(f[C]-x[C],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,g.__dragged=!0,r.onNodeDrag(g,_))}).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=ue(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||ci(r.enableZoomInteraction)(f))&&(f.type==="wheel"||ci(r.enablePanInteraction)(f))}).on("zoom",function(f){var g=f.transform;[o,c].forEach(function(x){rj(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Lc(Lc({},g),n.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Lc(Lc({},f.transform),n.centerAt()))}),ux(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=Knt/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new mrt(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 _=v.getBoundingClientRect(),C=window.pageXOffset||document.documentElement.scrollLeft,k=window.pageYOffset||document.documentElement.scrollTop;return{top:_.top+k,left:_.left+C}}},{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=eit(function(){gA(c,r.width,r.height),r.shadowGraph.linkWidth(function(g){return ci(r.linkWidth)(g)+r.linkHoverPrecision});var f=Fa(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},Ynt);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,_=x?x.type:null;if(v&&v!==_){var C=r["on".concat(v,"Hover")];C&&C(null,y.d)}if(_){var k=r["on".concat(_,"Hover")];k&&k(x.d,v===_?y.d:null)}r.tooltip.content(x&&ci(r["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),r.canvas.classList[(x&&r["on".concat(_,"Click")]||!x&&r.onBackgroundClick)&&ci(r.showPointerCursor)(x==null?void 0:x.d)?"add":"remove"]("clickable"),r.hoverObj=x}g&&d()}if(g){gA(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){}}),dx={exports:{}},fx,mA;function tat(){if(mA)return fx;mA=1;var i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fx=i,fx}var px,yA;function eat(){if(yA)return px;yA=1;var i=tat();function e(){}function r(){}return r.resetWarningCache=e,px=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},px}var bA;function iat(){return bA||(bA=1,dx.exports=eat()()),dx.exports}var rat=iat();const lt=jd(rat),Sm={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},nj={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},X_={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])},nat=Object.assign({},Sm,nj,{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({},Sm,nj,X_,{enableNavigationControls:lt.bool,controlType:lt.oneOf(["trackball","orbit","fly"]),rendererConfig:lt.object,extraRenderers:lt.arrayOf(lt.shape({render:lt.func.isRequired}))});Object.assign({},Sm,X_,{nodeDesc:lt.oneOfType([lt.string,lt.func]),linkDesc:lt.oneOfType([lt.string,lt.func])});Object.assign({},Sm,X_,{markerAttrs:lt.object,yOffset:lt.number,glScale:lt.number});const Z_=zet(Jnt,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Z_.displayName="ForceGraph2D";Z_.propTypes=nat;function aat(){return di({queryKey:["graph"],queryFn:()=>oe.get("/graph"),staleTime:3e4})}const gx="dreamcontext:";function sat(i,e){const{projectId:r}=OM(),n=r?`${gx}${r}:${i}`:`${gx}${i}`,[a,o]=Y.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(r){const u=`${gx}${i}`,d=localStorage.getItem(u);if(d!==null)return localStorage.setItem(n,d),localStorage.removeItem(u),JSON.parse(d)}}catch{}return e}),c=Y.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 xA={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 oat(i){return{centerStrength:.05+i.centerStrength*.45,repelStrength:-(30+i.repelStrength*240),linkStrength:.1+i.linkStrength*1.2,linkDistance:20+i.linkDistance*180}}function lat(){const[i,e]=sat("brain:settings:v1",xA),r=Y.useCallback((o,c)=>{e(h=>({...h,[o]:{...h[o],...c}}))},[e]),n=Y.useCallback(o=>{e(c=>({...c,groups:o}))},[e]),a=Y.useCallback(()=>{e(xA)},[e]);return{settings:i,patch:r,setGroups:n,reset:a}}function cat(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 hat{constructor(e){ae(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?aj(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 aj(i){return i.type==="and"||i.type==="or"?{...i,children:i.children.map(aj)}:{...i,negated:!i.negated}}function vA(i){const e=i.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const r=cat(e),n=new hat(r).parse();return{match:a=>d1(n,a),raw:e,isEmpty:!1}}function d1(i,e){switch(i.type){case"and":return i.children.every(r=>d1(r,e));case"or":return i.children.some(r=>d1(r,e));case"word":return Op(_A(e,i.value),i.negated);case"phrase":return Op(_A(e,i.value),i.negated);case"regex":return Op(uat(e,i.value),i.negated);case"op":return Op(dat(e,i.op,i.arg),i.negated)}}function Op(i,e){return e?!i:i}function sj(i){return[i.label,i.path,i.id,i.meta.description??"",...i.meta.tags??[]].join(" ").toLowerCase()}function _A(i,e){return sj(i).includes(e)}function uat(i,e){return e.test(sj(i))}function dat(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 Rp={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},mx=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function fat({settings:i,patch:e,setGroups:r,reset:n,onClose:a}){const[o,c]=Y.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(Dp,{label:Rp.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(zu,{label:"Tags",checked:i.filters.showTags,onChange:u=>e("filters",{showTags:u})}),m.jsx(zu,{label:"Attachments",checked:i.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),m.jsx(zu,{label:"Existing files only",checked:i.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),m.jsx(zu,{label:"Orphans",checked:i.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),m.jsx(Dp,{label:Rp.groups,open:o.groups,onToggle:()=>h("groups"),children:m.jsx(gat,{groups:i.groups,onChange:r})}),m.jsxs(Dp,{label:Rp.display,open:o.display,onToggle:()=>h("display"),children:[m.jsx(pat,{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(zu,{label:"Arrows",checked:i.display.arrows,onChange:u=>e("display",{arrows:u})}),m.jsx(hl,{label:"Text fade threshold",value:i.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),m.jsx(hl,{label:"Node size",value:i.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),m.jsx(hl,{label:"Link thickness",value:i.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),m.jsxs(Dp,{label:Rp.forces,open:o.forces,onToggle:()=>h("forces"),children:[m.jsx(hl,{label:"Center force",value:i.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),m.jsx(hl,{label:"Repel force",value:i.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),m.jsx(hl,{label:"Link force",value:i.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),m.jsx(hl,{label:"Link distance",value:i.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Dp({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 zu({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 pat({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 hl({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 gat({groups:i,onChange:e}){const[r,n]=Y.useState(""),[a,o]=Y.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:mx[i.length%mx.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:mx.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 mat(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 oe.get(`/graph/content?path=${encodeURIComponent(i.path)}`)},enabled:!!(i&&i.path),staleTime:3e4})}const CA={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},yat={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},bat={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function xat(i){return i==="task"?"tasks":i==="feature"?"features":i==="knowledge"?"knowledge":i==="soul"||i==="user"||i==="memory"||i==="core"?"core":null}function vat({node:i,onClose:e,onSelectRelated:r,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(i!=null&&i.path),u=mat(h?i:null);if(!i)return m.jsx("aside",{className:"brain-drawer"});const d=xat(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:CA[i.group]}}),yat[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(Xd,{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:CA[g.group]}}),m.jsx("span",{children:g.label}),m.jsx("span",{className:"brain-related-kind",children:bat[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 _at=Y.lazy(()=>Te(()=>import("./BrainCanvas3D-CNDjMlun.js"),__vite__mapDeps([54,53])).then(i=>({default:i.BrainCanvas3D}))),Cat={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},kat={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function kA(i){return typeof i=="string"?i:i.id}function oj(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 wA(i,e){return Math.sqrt(oj(i)*e)*3}function wat(i,e,r){for(const{group:n,parsed:a}of e)if(a.match(i))return n.color;return r[i.group]}function Sat({onNavigate:i}){const{data:e,isLoading:r,error:n}=aat(),a=kr(),{settings:o,patch:c,setGroups:h,reset:u}=lat(),{resolved:d}=Id(),f=d==="dark",g=f?Cat:kat,x=Y.useRef(null),y=Y.useRef(void 0),[v,_]=Y.useState({w:0,h:0}),[C,k]=Y.useState(null),[T,E]=Y.useState(null),[N,B]=Y.useState(!0),O=Y.useRef(!1);Y.useEffect(()=>{if(!x.current)return;const Z=x.current,Q=()=>_({w:Z.clientWidth,h:Z.clientHeight});Q();const ot=new ResizeObserver(Q);return ot.observe(Z),()=>ot.disconnect()},[]);const A=Y.useMemo(()=>vA(o.filters.search),[o.filters.search]),M=Y.useMemo(()=>o.groups.map(Z=>({group:Z,parsed:vA(Z.query)})).filter(({parsed:Z})=>!Z.isEmpty),[o.groups]),{filteredData:F,neighborsById:D,totalDegreeById:z,inDegreeById:U}=Y.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const Z=new Map,Q=new Map;for(const Rt of e.nodes)Z.set(Rt.id,0),Q.set(Rt.id,0);for(const Rt of e.links){const Gt=typeof Rt.source=="string"?Rt.source:Rt.source.id,zt=typeof Rt.target=="string"?Rt.target:Rt.target.id;Z.set(zt,(Z.get(zt)??0)+1),Q.set(Gt,(Q.get(Gt)??0)+1),Q.set(zt,(Q.get(zt)??0)+1)}const ot=Rt=>(Q.get(Rt)??0)===0,vt=[],At=new Set;for(const Rt of e.nodes){if(!o.filters.showTags&&Rt.group==="tag"||!o.filters.showOrphans&&ot(Rt.id)||!A.isEmpty&&!A.match(Rt))continue;const Gt={...Rt};Gt.__inDegree=Z.get(Rt.id)??0,Gt.__totalDegree=Q.get(Rt.id)??0,Gt.__color=wat(Rt,M,g),vt.push(Gt),At.add(Rt.id)}const jt=[],qt=new Map;for(const Rt of vt)qt.set(Rt.id,new Set);for(const Rt of e.links){const Gt=typeof Rt.source=="string"?Rt.source:Rt.source.id,zt=typeof Rt.target=="string"?Rt.target:Rt.target.id;!At.has(Gt)||!At.has(zt)||(jt.push({source:Gt,target:zt,kind:Rt.kind}),qt.get(Gt).add(zt),qt.get(zt).add(Gt))}return{filteredData:{nodes:vt,links:jt},neighborsById:qt,totalDegreeById:Q,inDegreeById:Z}},[e,o.filters,A,M]),K=Y.useMemo(()=>oat(o.forces),[o.forces]),$=.4+o.display.nodeSize*2.2;Y.useEffect(()=>{var At,jt,qt,Rt,Gt,zt,ye,Ne,ve;const Z=y.current;if(!Z)return;const Q=(At=Z.d3Force)==null?void 0:At.call(Z,"charge");Q!=null&&Q.strength&&Q.strength(K.repelStrength),Q!=null&&Q.distanceMax&&Q.distanceMax(420);const ot=(jt=Z.d3Force)==null?void 0:jt.call(Z,"link");ot&&((qt=ot.strength)==null||qt.call(ot,K.linkStrength),(Rt=ot.distance)==null||Rt.call(ot,K.linkDistance));const vt=(Gt=Z.d3Force)==null?void 0:Gt.call(Z,"center");vt!=null&&vt.strength&&vt.strength(K.centerStrength),(zt=Z.d3Force)==null||zt.call(Z,"collide",Jrt().radius(pi=>wA(pi,$)+4).strength(.9).iterations(2)),(ye=Z.d3Force)==null||ye.call(Z,"x",dnt(0).strength(K.centerStrength*.4)),(Ne=Z.d3Force)==null||Ne.call(Z,"y",fnt(0).strength(K.centerStrength*.4)),(ve=Z.d3ReheatSimulation)==null||ve.call(Z)},[K,$,F]),Y.useEffect(()=>{O.current=!1},[e==null?void 0:e.nodes.length]),Y.useEffect(()=>{if(!e||!F.nodes.length)return;const Z=[];return[800,1600,2600].forEach(Q=>{Z.push(setTimeout(()=>{var vt;if(O.current)return;const ot=y.current;ot&&((vt=ot.zoomToFit)==null||vt.call(ot,500,80),Q>=2600&&(O.current=!0))},Q))}),()=>Z.forEach(clearTimeout)},[e,F.nodes.length]);const H=Y.useMemo(()=>F.nodes.find(Z=>Z.id===C)??null,[F,C]),j=Y.useMemo(()=>{if(!H||!e)return[];const Z=[],Q=new Map(e.nodes.map(ot=>[ot.id,ot]));for(const ot of e.links){const vt=typeof ot.source=="string"?ot.source:ot.source.id,At=typeof ot.target=="string"?ot.target:ot.target.id;if(vt===H.id){const jt=Q.get(At);jt&&Z.push({node:jt,kind:ot.kind})}else if(At===H.id){const jt=Q.get(vt);jt&&Z.push({node:jt,kind:ot.kind})}}return Z},[e,H]),q=Z=>{k(Z.id);const Q=y.current;Q&&typeof Z.x=="number"&&typeof Z.y=="number"&&(Q.centerAt(Z.x,Z.y,400),Q.zoom(Math.max(Q.zoom(),2.2),400))},G=()=>a.invalidateQueries({queryKey:["graph"]});Y.useEffect(()=>{const Z=Q=>{var At;if((At=Q.target)!=null&&At.matches("input,textarea"))return;const ot=y.current;if(!ot)return;const vt=ot.zoom();if(Q.key==="+"||Q.key==="=")ot.zoom(vt*1.2,200);else if(Q.key==="-"||Q.key==="_")ot.zoom(vt/1.2,200);else if(Q.key.startsWith("Arrow")){const jt=Q.shiftKey?120:40,qt=ot.centerAt();let Rt=0,Gt=0;Q.key==="ArrowUp"?Gt=-jt:Q.key==="ArrowDown"?Gt=jt:Q.key==="ArrowLeft"?Rt=-jt:Q.key==="ArrowRight"&&(Rt=jt),ot.centerAt(((qt==null?void 0:qt.x)??0)+Rt/vt,((qt==null?void 0:qt.y)??0)+Gt/vt,150)}};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[]);const et=T??C,at=et?D.get(et)??new Set:null,W=Z=>!et||Z===et?!1:!(at!=null&&at.has(Z)),rt=Z=>{const Q=Z.__color??g[Z.group];return W(Z.id)?Tat(Q,f?.18:.3):Q},ft=Z=>{const Q=kA(Z.source),ot=kA(Z.target);return et?Q===et||ot===et?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)"},st=.5+o.display.linkThickness*2.5,Ct=Z=>Z.kind==="sibling_core"||Z.kind==="release_includes"?st*1.3:st,ct=Z=>oj(Z)*$,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:[F.nodes.length,"/",e.nodes.length," nodes · ",F.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:()=>B(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(fat,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>B(!1)}),r&&m.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&m.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&F.nodes.length===0&&!r&&m.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&F.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&m.jsx(Z_,{ref:y,graphData:F,width:v.w,height:v.h,backgroundColor:f?"#151518":"#ffffff",nodeId:"id",nodeLabel:Z=>Z.label,nodeColor:Z=>rt(Z),nodeVal:Z=>ct(Z),nodeRelSize:3,linkColor:Z=>ft(Z),linkWidth:Z=>Ct(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 Q;if(O.current)return;const Z=y.current;Z&&((Q=Z.zoomToFit)==null||Q.call(Z,600,80),O.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(Z,Q,ot)=>{if(!(Z.id===T||Z.id===C||et&&(at==null?void 0:at.has(Z.id)))&&ot<X)return;const At=Z.label,jt=Math.max(10,13/Math.max(ot,.7));Q.font=`${jt}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,Q.textAlign="center",Q.textBaseline="top";const qt=wA(Z,$),Rt=(Z.y??0)+qt+3,Gt=W(Z.id);f?Q.fillStyle=Gt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":Q.fillStyle=Gt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",Q.fillText(At,Z.x??0,Rt)}}),e&&F.nodes.length>0&&v.w>0&&o.display.view==="3d"&&m.jsx(Y.Suspense,{fallback:m.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:m.jsx(_at,{graphData:F,width:v.w,height:v.h,isDark:f,nodeColor:rt,nodeVal:ct,linkColor:ft,linkWidth:Ct,showArrows:o.display.arrows,forces:K,nodeSizeScale:$,isDimmed:W,neighborsById:D,onNodeClick:q,onNodeHover:Z=>E(Z?Z.id:null),onBackgroundClick:()=>{k(null),E(null)}})}),m.jsx(vat,{node:H,onClose:()=>k(null),onSelectRelated:Z=>k(Z),relatedNodes:j,inDegree:H?U.get(H.id)??0:0,totalDegree:H?z.get(H.id)??0:0,onNavigate:i})]})]})}function Tat(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 Eat(){return di({queryKey:["council"],queryFn:()=>oe.get("/council"),select:i=>i.debates})}function Nat(i){return di({queryKey:["council",i],queryFn:()=>oe.get(`/council/${i}`),select:e=>e.debate,enabled:!!i})}function lj(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 cj(i,e){return i.rounds.find(r=>r.round===e)??null}function hj(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 Mat(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 Bat(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+hj(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 Oat(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return e%360}const SA=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function Rat(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return SA[e%SA.length]}function Dat(i){const e=(i||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function jat(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 Jd({slug:i,size:e=36,title:r,onClick:n}){const a=Oat(i),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=Rat(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 Iat(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 $at(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 zat(i){return i==="complete"?"Complete":i==="synthesizing"?"Synthesizing":i.endsWith("_running")?"In progress":"Pending"}function Pat({debates:i,onOpen:e}){const{t:r}=Bi(),[n,a]=Y.useState(""),[o,c]=Y.useState("all"),h=Y.useMemo(()=>i.filter(u=>Iat(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 ${$at(u.status)}`,children:[m.jsx("span",{className:"council-hall-status-dot"}),zat(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(Jd,{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 qat(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 Uat({status:i,size:e="md"}){const{label:r,tone:n}=qat(i);return m.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[m.jsx("span",{className:"council-status-dot"}),r]})}function Pu({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 Hat({debate:i,onCiteJump:e,onAgentJump:r}){const{t:n}=Bi(),a=Y.useMemo(()=>Lat(i),[i]),o=i.finalReport?jat(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(Pu,{value:a.rounds,label:"rounds"}),m.jsx(Pu,{value:a.personas,label:"personas"}),m.jsx(Pu,{value:a.pushbacks,label:"pushbacks"}),m.jsx(Pu,{value:a.openRisks,label:"open risks",tone:"warning"}),m.jsx(Pu,{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(Wat,{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 Wat({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 _=a.length;return a.push({slug:y,round:Number(v)}),`\0CITE${_}\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 _=a[v];f.push(m.jsxs("button",{type:"button",className:"council-cite-chip",onClick:()=>r(_.slug,_.round),children:[m.jsx(Jd,{slug:_.slug,size:14}),m.jsx("span",{children:_.slug}),m.jsxs("span",{className:"council-cite-round",children:["R",_.round]})]},`c-${g}`))}else{const _=h[v];f.push(m.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(_),children:_},`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 uj({model:i}){const e=Dat(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 Gat(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 Q_(i,e){if(!e.trim())return i;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return i.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function Yat({debate:i,focusSlug:e}){const{t:r}=Bi(),[n,a]=Y.useState(""),[o,c]=Y.useState(()=>new Set),h=Y.useRef(null),u=Y.useMemo(()=>i.personas.filter(f=>Gat(f,n)),[i.personas,n]);Y.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(Kat,{persona:f,query:n,collapsed:o.has(f.slug),highlighted:e===f.slug,onToggle:()=>d(f.slug)},f.slug))]})]})}function Kat({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(Jd,{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(uj,{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:Q_(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(Vat,{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 Vat({round:i,crossContext:e,query:r}){const n=lj(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:Q_(we.parse(e),r)}})]}),i.executiveSummary&&m.jsx(qu,{title:"Executive summary",body:i.executiveSummary,query:r}),i.position&&m.jsx(qu,{title:"Position",body:i.position,query:r}),i.reasoning&&m.jsx(qu,{title:"Reasoning",body:i.reasoning,query:r}),i.reactions&&m.jsx(qu,{title:"Reactions to peers",body:i.reactions,query:r}),i.openQuestions&&m.jsx(qu,{title:"Open questions",body:i.openQuestions,query:r})]})}function qu({title:i,body:e,query:r}){const n=Q_(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 dj(i,e){return e.trim()?i?[i.executiveSummary,i.position,i.reasoning].filter(Boolean).join(`
|
|
480
|
+
`).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function Xat({debate:i,query:e,onQueryChange:r,selected:n,onSelectCell:a,onClearSelection:o}){const c=Y.useRef(null),h=Y.useMemo(()=>Array.from({length:Math.max(1,i.frontmatter.rounds_planned)},(f,g)=>g+1),[i.frontmatter.rounds_planned]),u=Y.useMemo(()=>i.personas.map(f=>f.slug),[i.personas]),d=Y.useMemo(()=>{if(!e.trim())return null;let f=0;for(const g of i.personas)for(const x of h)dj(cj(g,x),e)&&f++;return f},[e,i,h]);return Y.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(_=>_.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]),Y.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(Zat,{persona:f,rounds:h,debate:i,query:e,selected:n,knownSlugs:u,onSelectCell:a},f.slug))]})})]})}function Zat({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(Jd,{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(uj,{model:i.frontmatter.model})]})]}),e.map(h=>{const u=cj(i,h),d=r.frontmatter.status===`round_${h}_running`,f=!!a&&a.slug===i.slug&&a.round===h,g=dj(u,n),x=!!n.trim()&&!g;return m.jsx(Qat,{personaSlug:i.slug,round:h,data:u,isRunning:d,active:f,dimmed:x,knownSlugs:o,onSelect:c},h)})]})}function Qat({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=lj(r.position),d=Aat(r.position),f=hj(r),g=Bat(r),x=Mat(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(Uu,{title:"Executive summary",children:m.jsx("p",{children:r.executiveSummary})}),r.position&&m.jsx(Uu,{title:"Position",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.position)}})}),r.reasoning&&m.jsx(Uu,{title:"Reasoning",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.reasoning)}})}),r.reactions&&m.jsxs(Uu,{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(Jd,{slug:y,size:14}),m.jsx("span",{children:y})]},y))})]}),r.openQuestions&&m.jsx(Uu,{title:"Open questions",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.openQuestions)}})})]})]})}function Uu({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 TA(i){return i==="complete"||i==="synthesizing"?"overview":"matrix"}function Jat({debate:i,onBack:e}){const{t:r}=Bi(),[n,a]=Y.useState(()=>TA(i.frontmatter.status)),[o,c]=Y.useState(""),[h,u]=Y.useState(null),[d,f]=Y.useState(null);Y.useEffect(()=>{a(TA(i.frontmatter.status)),c(""),u(null),f(null)},[i.frontmatter.id]);const g=(v,_)=>{a("matrix"),u({slug:v,round:_})},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(Uat,{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(yx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),m.jsx(yx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),m.jsx(yx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),m.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&m.jsx(Hat,{debate:i,onCiteJump:g,onAgentJump:x}),n==="agents"&&m.jsx(Yat,{debate:i,focusSlug:d}),n==="matrix"&&m.jsx(Xat,{debate:i,query:o,onQueryChange:c,selected:h,onSelectCell:(v,_)=>u({slug:v,round:_}),onClearSelection:()=>u(null)})]})]})}function yx({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 tst(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=Eat(),[o,c]=Y.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(Jat,{debate:h,onBack:()=>c(null)})]}):m.jsxs("div",{className:"council-page",children:[m.jsx("h1",{className:"page-title",children:i("council.title")}),m.jsx(Pat,{debates:e??[],onOpen:c})]})}function est(){return di({queryKey:["config"],queryFn:()=>oe.get("/config"),select:i=>i.config})}function ist(){const i=kr();return Hr({mutationFn:e=>oe.patch("/config",e),onSuccess:()=>{i.invalidateQueries({queryKey:["config"]})}})}function rst(){return di({queryKey:["federation","inbox"],queryFn:()=>oe.get("/federation/inbox")})}function nst(){return Hr({mutationFn:()=>oe.post("/federation/sync",{})})}const EA=["out","in","both"];function ast({shareable:i,onToggleShareable:e,shareablePending:r}){const{t:n}=Bi(),{data:a}=uM(),{data:o}=TI(),c=EI(),h=NI(),{data:u}=rst(),d=nst(),[f,g]=Y.useState(""),[x,y]=Y.useState("both"),[v,_]=Y.useState(null),C=(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=C.filter(M=>M.name!==k&&!E.has(M.name)),B=()=>{if(_(null),!f){_(n("federation.error.pick_vault"));return}c.mutate({vault:f,direction:x},{onSuccess:()=>{g(""),y("both")},onError:M=>_(M instanceof Error?M.message:String(M))})},O=(M,F)=>{c.mutate({vault:M.vault,direction:F,topics:M.topics})},A=(M,F)=>{const D=F.split(",").map(z=>z.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")}),C.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.vaults.empty")}):m.jsx("ul",{className:"fed-vault-list",children:C.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 F;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:EA.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:((F=M.topics)==null?void 0:F.join(", "))??"",placeholder:n("federation.topics.placeholder"),onBlur:D=>{const z=D.target.value.split(",").map(K=>K.trim()).filter(Boolean).join(", "),U=(M.topics??[]).join(", ");z!==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:EA.map(M=>m.jsx("button",{className:`fed-dir-btn${x===M?" fed-dir-btn--active":""}`,onClick:()=>y(M),children:n(`federation.direction.${M}`)},M))}),m.jsx("button",{className:"btn btn--primary",onClick:B,disabled:c.isPending||!f,children:n("federation.connect")})]}),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)??[],F=(u==null?void 0:u.consumed)??[],D=(u==null?void 0:u.quarantined)??[];return M.length===0&&F.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(z=>m.jsx(NA,{entry:z,fromLabel:n("federation.inbox.from")},`p-${z.id}`))})]}),F.length>0&&m.jsxs("div",{className:"fed-inbox-group",children:[m.jsxs("h4",{className:"fed-inbox-group-title",children:[n("federation.inbox.consumed")," (",F.length,")"]}),m.jsx("ul",{className:"fed-entry-list fed-entry-list--consumed",children:F.map(z=>m.jsx(NA,{entry:z,fromLabel:n("federation.inbox.from")},`c-${z.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(z=>m.jsxs("li",{className:"fed-entry fed-entry--quarantined",children:[m.jsx("code",{className:"fed-entry-file",children:z.file}),m.jsxs("span",{className:"fed-entry-meta",children:["v",z.version]})]},`q-${z.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(sst,{deltas:d.data.deltas,t:n})]})]})}function NA({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 sst({deltas:i,t:e}){return i.length===0?m.jsx("p",{className:"settings-field-hint",children:e("federation.preview.none")}):m.jsx("ul",{className:"fed-delta-list",children:i.map(r=>{let n;return r.stale?n=e("federation.preview.stale"):r.consented?r.entries.length===0?n=e("federation.preview.nodelta"):n=`${r.entries.length} ${e("federation.preview.entries")}`:n=e("federation.preview.noconsent"),m.jsxs("li",{className:"fed-delta",children:[m.jsxs("div",{className:"fed-delta-head",children:[m.jsx("span",{className:"fed-delta-vault",children:r.vault}),m.jsx("span",{className:"fed-delta-status",children:n})]}),r.entries.length>0&&m.jsx("ul",{className:"fed-entry-list",children:r.entries.map((a,o)=>m.jsx("li",{className:"fed-entry",children:m.jsxs("div",{className:"fed-entry-head",children:[m.jsx("span",{className:"fed-entry-title",children:a.title}),m.jsx("span",{className:`fed-entry-kind fed-entry-kind--${a.kind}`,children:a.kind})]})},`${r.vault}-${o}`))})]},r.vault)})})}function ost(i){const e=[];i.metaKey&&e.push("Cmd"),i.ctrlKey&&e.push("Ctrl"),i.altKey&&e.push("Alt"),i.shiftKey&&e.push("Shift");let r=i.key;return["Meta","Control","Alt","Shift"].includes(r)||(r===" "?r="Space":r.length===1?r=r.toUpperCase():r=r.charAt(0).toUpperCase()+r.slice(1),e.length===0)?null:[...e,r].join("+")}const lst=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],bx={platforms:[],disableNativeMemory:!0};function cst(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n}=est(),a=ist(),[o,c]=Y.useState(bx.platforms),[h,u]=Y.useState(bx.disableNativeMemory),[d,f]=Y.useState(!1),[g,x]=Y.useState(""),[y,v]=Y.useState(""),[_,C]=Y.useState(""),[k,T]=Y.useState(null),[E,N]=Y.useState(!1),[B,O]=Y.useState(null),[A,M]=Y.useState(!1),[F,D]=Y.useState(!1),[z,U]=Y.useState(!1),[K,$]=Y.useState(()=>O1()),[H,j]=Y.useState(!1),q=Q=>{$(Q),e6(Q),Hx(Q)},{data:G}=di({queryKey:["tasks-sync-status"],queryFn:()=>oe.get("/tasks/sync-status"),select:Q=>Q.status}),{data:et}=di({queryKey:["tasks-containers"],queryFn:()=>oe.get("/tasks/containers"),select:Q=>Q.containers,enabled:d,staleTime:300*1e3}),at=Q=>{const ot=(et??[]).find(vt=>vt.ids.listId===Q);ot&&(x(ot.ids.teamId),v(ot.ids.spaceId),C(ot.ids.listId),Ct())},W=async()=>{M(!0),O(null);try{const{result:Q}=await oe.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(Y.useEffect(()=>{var vt,At,jt;const Q=e??bx;c(Q.platforms),u(Q.disableNativeMemory??!0);const ot=e;f((ot==null?void 0:ot.taskBackend)==="clickup"),x(((vt=ot==null?void 0:ot.clickup)==null?void 0:vt.teamId)??""),v(((At=ot==null?void 0:ot.clickup)==null?void 0:At.spaceId)??""),C(((jt=ot==null?void 0:ot.clickup)==null?void 0:jt.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 rt=Q=>{c(ot=>{const vt=ot.includes(Q)?ot.filter(At=>At!==Q):[...ot,Q];return D(!0),U(!1),vt})},ft=()=>{u(Q=>!Q),D(!0),U(!1)},st=()=>{a.mutate({platforms:o,disableNativeMemory:h,taskBackend:d?"clickup":"local",...d?{clickup:{teamId:g||void 0,spaceId:y||void 0,listId:_||void 0}}:{}},{onSuccess:()=>{D(!1),U(!0)}})},Ct=()=>{D(!0),U(!1)},ct=(e==null?void 0:e.shareable)===!0,X=Q=>{a.mutate({shareable:Q})},Z=async()=>{N(!0),T(null);try{T(await oe.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&&!F&&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:st,disabled:!F||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:lst.map(({id:Q,labelKey:ot})=>m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(Q),onChange:()=>rt(Q)}),m.jsx("span",{children:i(ot)})]},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),Ct()}}),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:[(et??[]).length>0&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:"List"}),m.jsx(Kv,{value:_||null,options:(et??[]).map(Q=>({value:Q.ids.listId,label:Q.path})),placeholder:"Pick the list to sync to…",searchPlaceholder:"Search lists…",clearLabel:"(keep current)",onChange:at})]}),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),Ct()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.space")}),m.jsx("input",{className:"settings-text-input",value:y,onChange:Q=>{v(Q.target.value),Ct()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.list")}),m.jsx("input",{className:"settings-text-input",value:_,onChange:Q=>{C(Q.target.value),Ct()}})]}),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:Z,disabled:E,children:i(E?"settings.cloud_tasks.testing":"settings.cloud_tasks.test")}),m.jsx("button",{className:"btn",onClick:W,disabled:A,children:A?"Provisioning…":"Provision fields"}),B&&m.jsx("span",{className:"settings-field-hint",children:B}),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]})]}),G&&G.backend!=="local"&&m.jsxs("p",{className:"settings-sync-badge",children:[i("settings.cloud_tasks.status"),": ",G.pendingPush," ",i("settings.cloud_tasks.pending"),G.conflicts>0&&` · ${G.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:ft}),m.jsx("span",{children:i("settings.native_memory.label")})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.native_memory.hint")})]})]}),m.jsx(ast,{shareable:ct,onToggleShareable:X,shareablePending:a.isPending}),zo()&&m.jsxs("section",{className:"settings-section",children:[m.jsxs("h2",{className:"settings-section-title",children:["Sleepy — notch quick-capture",m.jsx("span",{className:"settings-beta-badge",children:"BETA"})]}),m.jsxs("div",{className:"settings-checkboxes",children:[m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:K.enabled,onChange:()=>q({...K,enabled:!K.enabled})}),m.jsx("span",{children:"Enable Sleepy"})]}),m.jsx("p",{className:"settings-field-hint",children:"Press the hotkey anywhere to drop a capture bar under the notch: pick a project, type a thought, hit return — it's saved to that project's memory and learned."}),K.enabled&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:"Hotkey"}),m.jsx("input",{className:"settings-text-input",readOnly:!0,value:H?"Press a key combo…":K.hotkey,onFocus:()=>j(!0),onBlur:()=>j(!1),onKeyDown:Q=>{Q.preventDefault();const ot=ost(Q);ot&&(q({...K,hotkey:ot}),j(!1),Q.currentTarget.blur())}})]})]})]})]})}function fj(){return di({queryKey:["packs"],queryFn:()=>oe.get("/packs")})}function hst(){const i=kr();return Hr({mutationFn:e=>oe.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function ust(){const i=kr();return Hr({mutationFn:e=>oe.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function dst(i){return"base"in i}function pj({item:i,onActionDone:e}){const{t:r}=Bi(),n=hst(),a=ust(),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 fst({item:i,onClose:e}){const{t:r}=Bi(),n=Y.useCallback(a=>{a.target===a.currentTarget&&e()},[e]);return Y.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(pj,{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))}),dst(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 AA({item:i,onClick:e}){const{t:r}=Bi(),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(pj,{item:i})]})}function pst(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=fj(),[o,c]=Y.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(AA,{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(AA,{item:d,onClick:c},d.name))})]}),o!==null&&m.jsx(fst,{item:o,onClose:()=>c(null)})]})}function gst(){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 mst(){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 yst(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 Tm({spec:i,className:e,size:r="full"}){const a=Y.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]:yst(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:C===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 J_=[{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:"⬡"}],pl=600,Em=250,gj=92,Ul=4,MA=(1200-Ul*Em)/(Ul+1),tC=196,bst=320,xst=bst-tC,vst=120,mj=470,_st=548,BA=632;function yj(i){return MA+i*(Em+MA)}function bj(i){return yj(i)+Em/2}function xj(i){return tC+i*xst}const Cst=J_.map((i,e)=>{const r=e%Ul,n=Math.floor(e/Ul);return{id:`cat-${i.file}`,x:yj(r),y:xj(n),w:Em,h:gj,title:i.file,sub:i.region,glyph:i.glyph,variant:"region",breathe:!0,breatheDelay:e*.18}}),kst=J_.slice(0,Ul).map((i,e)=>({id:`fan-${e}`,d:an(pl,vst,bj(e),tC),travel:220,delay:e*.18,dur:2.6})),wst=J_.map((i,e)=>{const r=e%Ul,n=Math.floor(e/Ul);return{id:`conv-${i.file}`,d:an(bj(r),xj(n)+gj,pl,mj),travel:300,delay:.5+e*.12,dur:2.8}}),Sst={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:pl-215,y:40,w:430,h:80,title:"SessionStart hook fires",sub:"preloads context · 0 tool calls",variant:"hook"},...Cst,{id:"agent",x:pl-250,y:mj,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:pl-200,y:BA,w:400,h:78,title:"RemSleep — parallel specialists",sub:"multi-agent consolidation",variant:"rem"}],edges:[...kst,...wst,{id:"agent-rem",d:`M ${pl} ${_st} L ${pl} ${BA}`,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,Nm=300,vj=116,LA=3,OA=(1100-LA*Nm)/(LA+1),eC=280,Tst=196,_j=470,Est=540,RA=596;function Cj(i){return OA+i*(Nm+OA)}function kj(i){return Cj(i)+Nm/2}const iC=[{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"}],Nst=iC.map((i,e)=>({id:i.id,x:Cj(e),y:eC,w:Nm,h:vj,title:i.title,sub:i.sub,variant:"region",breathe:!0,breatheDelay:e*.25})),Ast=iC.map((i,e)=>({id:`fan-${i.id}`,d:an(Ia,Tst,kj(e),eC),travel:200,delay:e*.3,dur:2.4})),Mst=iC.map((i,e)=>({id:`conv-${i.id}`,d:an(kj(e),eC+vj,Ia,_j),travel:200,delay:.9+e*.2,dur:2.4})),Bst={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"},...Nst,{id:"converge",x:Ia-220,y:_j,w:440,h:70,title:"system knowledge updated",sub:"reports stitched into one summary",variant:"agent"},{id:"sleep-done",x:Ia-130,y:RA,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},...Ast,...Mst,{id:"converge-done",d:`M ${Ia} ${Est} L ${Ia} ${RA}`,travel:64,delay:1.8,dur:1.8}]},f1=230,wj=230,DA=132,p1=[{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"}],Lst=p1.map(i=>({id:i.id,x:i.x,y:f1-DA/2,w:wj,h:DA,title:i.title,sub:i.sub,variant:i.variant})),Ost=p1.slice(0,-1).map((i,e)=>{const r=p1[e+1],n=i.x+wj,a=r.x;return{id:`pipe-${i.id}`,d:`M ${n} ${f1} L ${a} ${f1}`,travel:a-n,delay:e*.4,dur:2.2}}),Rst={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:Lst,edges:Ost},Dst=[{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 jst(){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(Tm,{spec:Sst}),m.jsx("div",{className:"hiw2-steps",children:Dst.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 Fst=[{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"}],Ist=[{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 $st(){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(Tm,{spec:Bst}),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:Fst.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:Ist.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 zst=[{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 Pst(){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(Tm,{spec:Rst}),m.jsx("div",{className:"recallf-stages",children:zst.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 jA=[{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 qst(){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:jA.map((i,e)=>m.jsxs("li",{className:"arch-stratum",style:{"--i":e,"--n":jA.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 Ust(i){return"base"in i}function FA({item:i}){const e=Ust(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 Hst(){const{data:i,isLoading:e,isError:r}=fj(),n=Y.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(FA,{item:c},`a-${c.name}`))}),m.jsx("ul",{className:"marquee-track marquee-track--dup","aria-hidden":"true",children:n.map(c=>m.jsx(FA,{item:c},`b-${c.name}`))})]})]})}const Uo="0 0 360 170";function Sj(i,e,r){return{viewBox:Uo,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 Wst={viewBox:Uo,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}]},Gst={viewBox:Uo,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}]},Yst={viewBox:Uo,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:Uo,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:[]},Vst={viewBox:Uo,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}]},Xst={viewBox:Uo,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}]},Zst={viewBox:Uo,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}]},Qst={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}]},Jst={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}}]},tot=Sj("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"}),eot=Sj("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"}),Tj=[{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:Wst},{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:Gst},{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:Yst},{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:eot},{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:Vst},{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:Xst},{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:tot},{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:Zst},{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:Qst},{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:Jst},{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:"✦"}],g1=Tj.filter(i=>i.defaultOpen),IA=Tj.filter(i=>!i.defaultOpen),ta=g1.length,xx=16,iot=62,rot=.72,not=40,aot=140,sot=8;function oot(){const[i,e]=Y.useState(0),r=Y.useId(),n=Y.useRef([]),a=Y.useRef([]),o=Y.useRef([]),c=Y.useRef(null),h=Y.useRef(null),u=Y.useRef(null),d=Y.useRef(!1),f=Y.useRef(0),g=C=>`${r}-tab-${C}`,x=C=>`${r}-panel-${C}`,y=Y.useCallback(C=>{const k=Math.max(0,Math.min(ta-1,C));k!==f.current&&(f.current=k,e(k))},[]);Y.useLayoutEffect(()=>{const C=c.current,k=h.current;if(!C||!k)return;d.current=window.matchMedia("(prefers-reduced-motion: reduce)").matches;const T=C.closest(".shell-main")??null,E=T??window;let N=0;const B=()=>{N=0;const F=C.getBoundingClientRect(),D=T?T.getBoundingClientRect().top:0,z=F.height-k.offsetHeight;if(z<=0)return;const U=Math.max(0,Math.min(1,(D+xx-F.top)/z));u.current&&(u.current.style.transform=`scaleX(${U})`);const K=U*(ta-1);for(let $=0;$<ta;$++){const H=a.current[$];if(!H)continue;const j=$-K,q=Math.abs(j);H.style.opacity=String(Math.max(0,1-q/rot)),H.style.transform=d.current?"none":`translate3d(0, ${j*not}px, 0)`;const G=q<.5;H.style.zIndex=G?"2":"1",H.style.pointerEvents=G?"auto":"none";const et=q<1.05;o.current[$]!==et&&(o.current[$]=et,H.classList.toggle("feat-panel--near",et))}y(Math.round(K))};let O=0;const A=()=>{if(!T)return;const F=C.getBoundingClientRect(),D=F.height-k.offsetHeight;if(D<=0)return;const z=(T.getBoundingClientRect().top+xx-F.top)/D;if(z<=.012||z>=.988)return;const K=(Math.round(z*(ta-1))/(ta-1)-z)*D;Math.abs(K)<sot||T.scrollTo({top:T.scrollTop+K,behavior:d.current?"auto":"smooth"})},M=()=>{N||(N=requestAnimationFrame(B)),O&&clearTimeout(O),O=window.setTimeout(A,aot)};return E.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M),B(),()=>{E.removeEventListener("scroll",M),window.removeEventListener("resize",M),N&&cancelAnimationFrame(N),O&&clearTimeout(O)}},[y]);const v=Y.useCallback(C=>{const k=c.current,T=h.current,E=k==null?void 0:k.closest(".shell-main");if(!k||!T||!E){y(C);return}const N=k.getBoundingClientRect(),B=N.height-T.offsetHeight;if(B<=0){y(C);return}const A=C/(ta-1)*B-(E.getBoundingClientRect().top+xx-N.top);E.scrollTo({top:E.scrollTop+A,behavior:d.current?"auto":"smooth"})},[y]);function _(C){var T;let k=f.current;if(C.key==="ArrowDown"||C.key==="ArrowRight")k=(f.current+1)%ta;else if(C.key==="ArrowUp"||C.key==="ArrowLeft")k=(f.current-1+ta)%ta;else if(C.key==="Home")k=0;else if(C.key==="End")k=ta-1;else return;C.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*iot}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:_,children:g1.map((C,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:C.title}),C.tag&&m.jsx("span",{className:"feat-rail-tag",children:C.tag})]},C.id)})})]}),m.jsx("div",{className:"feat-stage",children:g1.map((C,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:[C.tag&&m.jsx("span",{className:"feat-stage-chip",children:C.tag}),m.jsx("h3",{className:"feat-stage-title",children:C.title})]}),m.jsx("p",{className:"feat-stage-body",children:C.body}),C.flow&&m.jsx(Tm,{spec:C.flow,className:"feat-stage-flow"})]},C.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:IA.length})]}),m.jsx("div",{className:"feat-more-grid",children:IA.map(C=>m.jsxs("div",{className:"feat-more-card",children:[m.jsx("span",{className:"feat-more-glyph","aria-hidden":"true",children:C.glyph??"✦"}),m.jsxs("div",{className:"feat-more-meta",children:[m.jsx("span",{className:"feat-more-title",children:C.title}),m.jsx("span",{className:"feat-more-tagline",children:C.tagline})]})]},C.id))})]})]})}const lot=[{cmd:"dreamcontext init",hint:"# set up the brain"},{cmd:"dreamcontext dashboard",hint:"# open this dashboard"},{cmd:"dreamcontext sleep",hint:"# consolidate the session"}];function cot(){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:lot.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 hot(){return m.jsxs("div",{className:"about","data-testid":"about-page",children:[m.jsx(gst,{}),m.jsx(mst,{}),m.jsx(jst,{}),m.jsx($st,{}),m.jsx(Pst,{}),m.jsx(qst,{}),m.jsx(Hst,{}),m.jsx(oot,{}),m.jsx(cot,{})]})}function uot(){return di({queryKey:["taxonomy"],queryFn:()=>oe.get("/taxonomy")})}const dot={domain:"Domain",layer:"Layer",kind:"Kind",topic:"Topic"};function $A({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 jp({label:i,count:e,children:r,defaultOpen:n=!1}){const[a,o]=Y.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 fot(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=uot();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:dot[f]??f}),m.jsx("div",{className:"taxonomy-chip-cluster",children:g.map(x=>{const y=c[x]??0;return m.jsx($A,{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($A,{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(jp,{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(jp,{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(jp,{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(jp,{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 pot=["tasks.members","tasks.delete","tasks.sync"];function got(){const{data:i}=di({queryKey:["health"],queryFn:()=>oe.get("/health"),staleTime:6e4,retry:1});if(!i)return null;const e=i.capabilities??[];return pot.filter(n=>!e.includes(n)).length===0?null:m.jsxs("div",{className:"stale-server-banner",children:["⚠ The dashboard server is running an older build — some actions will fail. Restart it: ",m.jsx("code",{children:"dreamcontext dashboard"})]})}const zA=new dI({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function mot({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(Sat,{onNavigate:e});case"tasks":return m.jsx(Itt,{});case"sleep":return m.jsx(qtt,{});case"core":return m.jsx(ret,{onNavigateTaxonomy:()=>i.navigate("taxonomy",null)});case"knowledge":return m.jsx(xet,{});case"features":return m.jsx(vet,{});case"council":return m.jsx(tst,{});case"settings":return m.jsx(cst,{});case"packs":return m.jsx(pst,{});case"taxonomy":return m.jsx(fot,{});case"about":return m.jsx(hot,{})}}class vx extends Y.Component{constructor(){super(...arguments);ae(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 Ej=new URLSearchParams(window.location.search),m1=Ej.get("vault"),yot=Ej.get("capture")==="1";m1&&hM(m1);function bot(){return Y.useEffect(()=>{i6().then(e=>Hx(e));const i=e=>{(e.key===null||e.key===TM)&&Hx(O1())};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]),null}function xot(){return yot?m.jsx(vx,{children:m.jsx(h6,{})}):m1?m.jsx(vx,{children:m.jsx(t2,{client:zA,children:m.jsx(p6,{children:m.jsx(S2,{children:m.jsxs(d6,{children:[m.jsx(got,{}),m.jsx(uJ,{children:i=>m.jsx(mot,{nav:i})})]})})})})}):m.jsx(vx,{children:m.jsx(t2,{client:zA,children:m.jsxs(S2,{children:[m.jsx(bot,{}),m.jsx(PI,{})]})})})}q4.createRoot(document.getElementById("root")).render(m.jsx(Y.StrictMode,{children:m.jsx(xot,{})}));export{iB as $,Not as A,Lo as B,v6 as C,qi as D,Bz as E,v_ as F,WM as G,WW as H,X9 as I,iU as J,D6 as K,gd as L,Tot as M,dm as N,uz as O,tB as P,A2 as Q,R9 as R,sv as S,HW as T,$d as U,wa as V,_t as W,bt as X,xz as Y,jW as Z,L as _,Sz as a,gH as a$,M9 as a0,iT as a1,eT as a2,Fot as a3,Lot as a4,Dot as a5,Rot as a6,Mot as a7,Z1 as a8,jot as a9,aK as aA,nK as aB,BB as aC,E9 as aD,lY as aE,$M as aF,B9 as aG,jd as aH,Sot as aI,um as aJ,Ag as aK,qet as aL,KO as aM,Yd as aN,sY as aO,aY as aP,N9 as aQ,H1 as aR,bo as aS,xd as aT,G2 as aU,qP as aV,hW as aW,GO as aX,$O as aY,pH as aZ,Tg as a_,Bot as aa,Ec as ab,$ot as ac,Iot as ad,Oot as ae,OY as af,a5 as ag,ilt as ah,nU as ai,nn as aj,$s as ak,Su as al,__ as am,tR as an,zl as ao,nR as ap,ke as aq,Ga as ar,Xt as as,DK as at,elt as au,rlt as av,Jot as aw,ee as ax,tlt as ay,hK as az,wz as b,Ng as b$,Sh as b0,fl as b1,aW as b2,kT as b3,ka as b4,mH as b5,f_ as b6,fH as b7,xH as b8,wh as b9,hnt as bA,yrt as bB,ne as bC,A9 as bD,mrt as bE,BD as bF,$N as bG,Ml as bH,zet as bI,lt as bJ,Y as bK,Jrt as bL,dnt as bM,fnt as bN,m as bO,IN as bP,BW as bQ,wW as bR,OW as bS,om as bT,uH as bU,d_ as bV,WO as bW,DW as bX,mW as bY,nV as bZ,Wd as b_,cW as ba,LW as bb,wH as bc,SW as bd,u_ as be,pE as bf,Qt as bg,aR as bh,$_ as bi,vn as bj,DP as bk,U1 as bl,yB as bm,Ud as bn,vB as bo,Aot as bp,D2 as bq,R2 as br,x6 as bs,br as bt,ett as bu,ci as bv,P_ as bw,unt as bx,cnt as by,ent as bz,ii as c,Po as c0,bT as c1,p_ as c2,PO as c3,qv as c4,_ot as c5,Te as c6,QA as c7,$4 as c8,kot as c9,b1 as ca,Cot as cb,ue as d,eB as e,mr as f,Ez as g,js as h,Ca as i,oU as j,zd as k,Nt as l,iR as m,Eot as n,alt as o,Nz as p,Az as q,nlt as r,Tz as s,rU as t,ba as u,JY as v,KW as w,zot as x,Do as y,kz as z};
|