dreamcontext 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -3
- package/agents/sleep-product.md +22 -0
- package/agents/sleep-state.md +3 -1
- package/agents/sleep-tasks.md +3 -1
- package/dist/agents/sleep-product.md +22 -0
- package/dist/agents/sleep-state.md +3 -1
- package/dist/agents/sleep-tasks.md +3 -1
- package/dist/dashboard/assets/{BrainCanvas3D-CNDjMlun.js → BrainCanvas3D-CoTzHqzT.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-DtoPVYjz.js → _baseUniq-BlQ6XWxs.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-D_dXe_8i.js → ar-SA-G6X2FPQ2-C4qyHe9L.js} +1 -1
- package/dist/dashboard/assets/{arc-8LFYH4lG.js → arc-uGukQNxI.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-BIgEpM4v.js → architectureDiagram-Q4EWVU46-BhtWTFvf.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-C30ZBwgT.js → az-AZ-76LH7QW2-HfK2pIVQ.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-D0R9pSdG.js → bg-BG-XCXSNQG7-L7TlhXli.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-DRTa0DpJ.js → blockDiagram-DXYQGD6D-BmPhQEp6.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-vkWxteG3.js → bn-BD-2XOGV67Q-DE0uNoU6.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-Do_gB8Cs.js → c4Diagram-AHTNJAMY-DtQKYrmP.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-CTyxGdzW.js → ca-ES-6MX7JW3Y-7JHCTA6b.js} +1 -1
- package/dist/dashboard/assets/channel-3OfE-PZ3.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-DJlttKoY.js → chunk-4BX2VUAB-BvnLY9qE.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-BdixZX4J.js → chunk-4TB4RGXK--piiFXgS.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-CPhKaTLr.js → chunk-55IACEB6-C7uvmawY.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-Bv0bQVvi.js → chunk-EDXVE4YY-BuWBKOPY.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-DGjRdLDd.js → chunk-FMBD7UC4-C1Le6hxh.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-B-wzkRri.js → chunk-OYMX7WX6-B8JE8Wz4.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-BwK1NqpV.js → chunk-QZHKN3VN-U9FJi59p.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-DjEwJGlh.js → chunk-YZCP3GAM-BNc94uy1.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-Dpt9qwZI.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-Dpt9qwZI.js +1 -0
- package/dist/dashboard/assets/clone-CZ-InUnR.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-BJXUn11L.js → cose-bilkent-S5V4N54A-D0hUzBCj.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-BjRikaNe.js → cs-CZ-2BRQDIVT-B0rWHDIi.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-Cn3GTxbV.js → da-DK-5WZEPLOC-D_PQO_T0.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-BHn2c24z.js → dagre-KV5264BT-B_bjkEDQ.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-IvGsdpTt.js → de-DE-XR44H4JA-D1G4J6Mz.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-YrlF3B5a.js → diagram-5BDNPKRD-B63uEoiS.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-DHONF1OD.js → diagram-G4DWMVQ6-DShdwm3D.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-B1vJLt5b.js → diagram-MMDJMWI5-DdVsHQ-l.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-C8P5-4A3.js → diagram-TYMM5635-BdHifyqU.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-B9GA8_lO.js → el-GR-BZB4AONW-a0CO4RfB.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-CjWWTCWe.js → erDiagram-SMLLAGMA-CYxdxNcb.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-Ct1wP_9r.js → es-ES-U4NZUMDT-ejRYVYRf.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-C-49gWlR.js → eu-ES-A7QVB2H4-B-4OXJLd.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-DUo8t-xv.js → fa-IR-HGAKTJCU-DhOcLy7v.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-DCObnr3i.js → fi-FI-Z5N7JZ37-CKQF9xKf.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-OQ_IRMqG.js → flowDiagram-DWJPFMVM-azQUtREP.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-0EGg3zhN.js → fr-FR-RHASNOE6-CsGekBXq.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-DPTSBcnu.js → ganttDiagram-T4ZO3ILL-DjXmGcb4.js} +2 -2
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-BxfeiCqm.js → gitGraphDiagram-UUTBAWPF-Dz87wo6e.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-WtVwXY6x.js → gl-ES-HMX3MZ6V-NRfsjlmW.js} +1 -1
- package/dist/dashboard/assets/{graph-Du_3_o8q.js → graph-BMW3t-Jz.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-CfgspIku.js → he-IL-6SHJWFNN-CK4gfEss.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-CS9l2g3B.js → hi-IN-IWLTKZ5I-CqyBl1jA.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-BQ46AerM.js → hu-HU-A5ZG7DT2-BO0SthvO.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-BeShJyKQ.js → id-ID-SAP4L64H-CrHxJe1s.js} +1 -1
- package/dist/dashboard/assets/{index-D7dWmypK.js → index-B0pCDfL8.js} +1 -1
- package/dist/dashboard/assets/index-rIZLhbl7.js +480 -0
- package/dist/dashboard/assets/index-sax--nf3.css +1 -0
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-CcFhyaQp.js → infoDiagram-42DDH7IO-zG-8q9HR.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-9QJeD00p.js → ishikawaDiagram-UXIWVN3A-5OzPmL1c.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-csyvfk0t.js → it-IT-JPQ66NNP-CW6fpZrT.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-DctpJ2yz.js → ja-JP-DBVTYXUO-DMJRiMhd.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-CU4EYedt.js → journeyDiagram-VCZTEJTY-f8lbDQ22.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-D0tWzHt3.js → kaa-6HZHGXH3-C4yr2X6j.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-BC-g4xJU.js → kab-KAB-ZGHBKWFO-BtwhZ5Ak.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-BxXqVmz1.js → kanban-definition-6JOO6SKY-BJtF1llZ.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-TLB3Lxri.js → kk-KZ-P5N5QNE5-BiS5ISFw.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-DCh7cRAS.js → km-KH-HSX4SM5Z-CJcAjj0D.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-BPIl5ido.js → ko-KR-MTYHY66A-yw6XRj7m.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-TUpeN1Tm.js → ku-TR-6OUDTVRD-nAwdHGyN.js} +1 -1
- package/dist/dashboard/assets/{layout-CyrgfqIp.js → layout-guqP2e-e.js} +1 -1
- package/dist/dashboard/assets/linear-W2_Ct9N6.js +1 -0
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-BRKyR_Xw.js → lt-LT-XHIRWOB4-D7h1NJrv.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-BANbTe4s.js → lv-LV-5QDEKY6T-DJfUJgRc.js} +1 -1
- package/dist/dashboard/assets/{min-lcwVZhZ7.js → min-BlLHklQU.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-fVIbdlXp.js → mindmap-definition-QFDTVHPH-Ch2AO4mc.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-DLFutdXk.js → mr-IN-CRQNXWMA-BV3znx0p.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-CGWrcNBC.js → my-MM-5M5IBNSE-IjUN-e5U.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-CGRDupuc.js → nb-NO-T6EIAALU-MMsvbc2a.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-BKwBfrzp.js → nl-NL-IS3SIHDZ-ByYTJGOK.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-DDQkGe44.js → nn-NO-6E72VCQL-Bgbgzvhm.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-DufeHCWh.js → oc-FR-POXYY2M6-BMBbvfQp.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-BUzelJDX.js → pa-IN-N4M65BXN-CgcUC9Zd.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-FxAvjywS.js → percentages-BXMCSKIN-AuedyVVS.js} +7 -7
- package/dist/dashboard/assets/{pica-Cek5bFnr.js → pica-DxO5y0j_.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-PgIrKPnB.js → pieDiagram-DEJITSTG-q-J8tI3B.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-Bd-rxZs3.js → pl-PL-T2D74RX3-BaZSYTKJ.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-D0QJGoo5.js → pt-BR-5N22H2LF-DSPF7aLm.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-DjumltMq.js → pt-PT-UZXXM6DQ-aoPTHC3m.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-C30tZOBh.js → quadrantDiagram-34T5L4WZ-CGbfFson.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-D3vhi-ZB.js → requirementDiagram-MS252O5E-ThxVmoCe.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-DmEo8cEd.js → ro-RO-JPDTUUEW-YfCwiIS2.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-ZHCu1nBu.js → ru-RU-B4JR7IUQ-zIVsVhsz.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-Cmbs-PxO.js → sankeyDiagram-XADWPNL6-BvEv917s.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-DlBqk4uQ.js → sequenceDiagram-FGHM5R23-JrhjN3MG.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-iuqtpRqI.js → si-LK-N5RQ5JYF-CegSAwip.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-BWFUWdaQ.js → sk-SK-C5VTKIMK-C_K-Uoai.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-irYTfiq_.js → sl-SI-NN7IZMDC-DHGXOoZl.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-B6T9ib8G.js → stateDiagram-FHFEXIEX-BzOtZESp.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-CjcHIbj7.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-LTgWgeng.js → subset-shared.chunk-BWfXaC19.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-CT_2iDuG.js → subset-worker.chunk-DHcqLDUZ.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-BvDzjArd.js → sv-SE-XGPEYMSR-BoNob2y3.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-DdsS_3Yq.js → ta-IN-2NMHFXQM-C8UHJYct.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-Duadkok3.js → th-TH-HPSO5L25-D7wP1iSi.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-CHTQqVpC.js → timeline-definition-GMOUNBTQ-Gwb0w7bX.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-CTnPpl_3.js → tr-TR-DEFEU3FU-He51QB-L.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-CAqmQ01_.js → uk-UA-QMV73CPH-Blg5n9CR.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-tWl34rwo.js → vennDiagram-DHZGUBPP-y2S0dZjp.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-Cz7FDG8R.js → vi-VN-M7AON7JQ-2z-4xcM3.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-UjdnBcpJ.js → wardley-RL74JXVD-BNThyuCt.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-KhVWSzPf.js → wardleyDiagram-NUSXRM2D-Sljri5hz.js} +1 -1
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-SwtVQYTW.js → xychartDiagram-5P7HB3ND-BIFYd4_d.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-B7cbFS35.js → zh-CN-LNUGB5OW-DZ8sfmlq.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-CLi9BFmp.js → zh-HK-E62DVLB3-Zvqwoloz.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-XAcgJHay.js → zh-TW-RAJ6MFWO-Ck_uDtMQ.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +930 -471
- package/package.json +1 -1
- package/dist/dashboard/assets/channel-C5p1t-nJ.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-sTJpbWV4.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-sTJpbWV4.js +0 -1
- package/dist/dashboard/assets/clone-DTslXBzp.js +0 -1
- package/dist/dashboard/assets/index-C9VT2u9E.js +0 -480
- package/dist/dashboard/assets/index-DoFaQKCx.css +0 -1
- package/dist/dashboard/assets/linear-B6cMUkoc.js +0 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-CN0hAOp7.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-B_bjkEDQ.js","assets/graph-BMW3t-Jz.js","assets/_baseUniq-BlQ6XWxs.js","assets/layout-guqP2e-e.js","assets/min-BlLHklQU.js","assets/clone-CZ-InUnR.js","assets/cose-bilkent-S5V4N54A-D0hUzBCj.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-DtQKYrmP.js","assets/chunk-YZCP3GAM-BNc94uy1.js","assets/flowDiagram-DWJPFMVM-azQUtREP.js","assets/chunk-FMBD7UC4-C1Le6hxh.js","assets/chunk-55IACEB6-C7uvmawY.js","assets/chunk-EDXVE4YY-BuWBKOPY.js","assets/channel-3OfE-PZ3.js","assets/erDiagram-SMLLAGMA-CYxdxNcb.js","assets/gitGraphDiagram-UUTBAWPF-Dz87wo6e.js","assets/chunk-4BX2VUAB-BvnLY9qE.js","assets/chunk-QZHKN3VN-U9FJi59p.js","assets/wardley-RL74JXVD-BNThyuCt.js","assets/ganttDiagram-T4ZO3ILL-DjXmGcb4.js","assets/linear-W2_Ct9N6.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-zG-8q9HR.js","assets/pieDiagram-DEJITSTG-q-J8tI3B.js","assets/arc-uGukQNxI.js","assets/quadrantDiagram-34T5L4WZ-CGbfFson.js","assets/xychartDiagram-5P7HB3ND-BIFYd4_d.js","assets/requirementDiagram-MS252O5E-ThxVmoCe.js","assets/sequenceDiagram-FGHM5R23-JrhjN3MG.js","assets/classDiagram-6PBFFD2Q-Dpt9qwZI.js","assets/chunk-4TB4RGXK--piiFXgS.js","assets/classDiagram-v2-HSJHXN6E-Dpt9qwZI.js","assets/stateDiagram-FHFEXIEX-BzOtZESp.js","assets/chunk-OYMX7WX6-B8JE8Wz4.js","assets/stateDiagram-v2-QKLJ7IA2-CjcHIbj7.js","assets/journeyDiagram-VCZTEJTY-f8lbDQ22.js","assets/timeline-definition-GMOUNBTQ-Gwb0w7bX.js","assets/mindmap-definition-QFDTVHPH-Ch2AO4mc.js","assets/kanban-definition-6JOO6SKY-BJtF1llZ.js","assets/diagram-TYMM5635-BdHifyqU.js","assets/diagram-MMDJMWI5-DdVsHQ-l.js","assets/blockDiagram-DXYQGD6D-BmPhQEp6.js","assets/diagram-5BDNPKRD-B63uEoiS.js","assets/architectureDiagram-Q4EWVU46-BhtWTFvf.js","assets/diagram-G4DWMVQ6-DShdwm3D.js","assets/wardleyDiagram-NUSXRM2D-Sljri5hz.js","assets/percentages-BXMCSKIN-AuedyVVS.js","assets/extends-CF3RwP-h.js","assets/BrainCanvas3D-CoTzHqzT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var O4=Object.defineProperty;var jS=i=>{throw TypeError(i)};var R4=(i,e,r)=>e in i?O4(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var se=(i,e,r)=>R4(i,typeof e!="symbol"?e+"":e,r),Lb=(i,e,r)=>e.has(i)||jS("Cannot "+r);var rt=(i,e,r)=>(Lb(i,e,"read from private field"),r?r.call(i):e.get(i)),oe=(i,e,r)=>e.has(i)?jS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),Ht=(i,e,r,n)=>(Lb(i,e,"write to private field"),n?n.call(i,r):e.set(i,r),r),De=(i,e,r)=>(Lb(i,e,"access private method"),r);var dp=(i,e,r,n)=>({set _(a){Ht(i,e,a,r)},get _(){return rt(i,e,n)}});function j4(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 Oot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Id(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Rot(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 Ob={exports:{}},xu={};/**
|
|
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 DS;function D4(){if(DS)return xu;DS=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 xu.Fragment=e,xu.jsx=r,xu.jsxs=r,xu}var FS;function F4(){return FS||(FS=1,Ob.exports=D4()),Ob.exports}var m=F4(),Rb={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 IS;function I4(){if(IS)return Se;IS=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function y(H){return H===null||typeof H!="object"?null:(H=x&&H[x]||H["@@iterator"],typeof H=="function"?H:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function k(H,J,ht){this.props=H,this.context=J,this.refs=_,this.updater=ht||v}k.prototype.isReactComponent={},k.prototype.setState=function(H,J){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,J,"setState")},k.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function T(){}T.prototype=k.prototype;function E(H,J,ht){this.props=H,this.context=J,this.refs=_,this.updater=ht||v}var A=E.prototype=new T;A.constructor=E,C(A,k.prototype),A.isPureReactComponent=!0;var B=Array.isArray;function L(){}var N={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function I(H,J,ht){var at=ht.ref;return{$$typeof:i,type:H,key:J,ref:at!==void 0?at:null,props:ht}}function j(H,J){return I(H.type,J,H.props)}function P(H){return typeof H=="object"&&H!==null&&H.$$typeof===i}function W(H){var J={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(ht){return J[ht]})}var K=/\/+/g;function z(H,J){return typeof H=="object"&&H!==null&&H.key!=null?W(""+H.key):J.toString(36)}function G(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(L,L):(H.status="pending",H.then(function(J){H.status==="pending"&&(H.status="fulfilled",H.value=J)},function(J){H.status==="pending"&&(H.status="rejected",H.reason=J)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function D(H,J,ht,at,vt){var ct=typeof H;(ct==="undefined"||ct==="boolean")&&(H=null);var Z=!1;if(H===null)Z=!0;else switch(ct){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(H.$$typeof){case i:case e:Z=!0;break;case f:return Z=H._init,D(Z(H._payload),J,ht,at,vt)}}if(Z)return vt=vt(H),Z=at===""?"."+z(H,0):at,B(vt)?(ht="",Z!=null&&(ht=Z.replace(K,"$&/")+"/"),D(vt,J,ht,"",function(ot){return ot})):vt!=null&&(P(vt)&&(vt=j(vt,ht+(vt.key==null||H&&H.key===vt.key?"":(""+vt.key).replace(K,"$&/")+"/")+Z)),J.push(vt)),1;Z=0;var Q=at===""?".":at+":";if(B(H))for(var tt=0;tt<H.length;tt++)at=H[tt],ct=Q+z(at,tt),Z+=D(at,J,ht,ct,vt);else if(tt=y(H),typeof tt=="function")for(H=tt.call(H),tt=0;!(at=H.next()).done;)at=at.value,ct=Q+z(at,tt++),Z+=D(at,J,ht,ct,vt);else if(ct==="object"){if(typeof H.then=="function")return D(G(H),J,ht,at,vt);throw J=String(H),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Z}function F(H,J,ht){if(H==null)return H;var at=[],vt=0;return D(H,at,"","",function(ct){return J.call(ht,ct,vt++)}),at}function q(H){if(H._status===-1){var J=H._result;J=J(),J.then(function(ht){(H._status===0||H._status===-1)&&(H._status=1,H._result=ht)},function(ht){(H._status===0||H._status===-1)&&(H._status=2,H._result=ht)}),H._status===-1&&(H._status=0,H._result=J)}if(H._status===1)return H._result.default;throw H._result}var X=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},nt={map:F,forEach:function(H,J,ht){F(H,function(){J.apply(this,arguments)},ht)},count:function(H){var J=0;return F(H,function(){J++}),J},toArray:function(H){return F(H,function(J){return J})||[]},only:function(H){if(!P(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Se.Activity=g,Se.Children=nt,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=N,Se.__COMPILER_RUNTIME={__proto__:null,c:function(H){return N.H.useMemoCache(H)}},Se.cache=function(H){return function(){return H.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(H,J,ht){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var at=C({},H.props),vt=H.key;if(J!=null)for(ct in J.key!==void 0&&(vt=""+J.key),J)!M.call(J,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&J.ref===void 0||(at[ct]=J[ct]);var ct=arguments.length-2;if(ct===1)at.children=ht;else if(1<ct){for(var Z=Array(ct),Q=0;Q<ct;Q++)Z[Q]=arguments[Q+2];at.children=Z}return I(H.type,vt,at)},Se.createContext=function(H){return H={$$typeof:c,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:o,_context:H},H},Se.createElement=function(H,J,ht){var at,vt={},ct=null;if(J!=null)for(at in J.key!==void 0&&(ct=""+J.key),J)M.call(J,at)&&at!=="key"&&at!=="__self"&&at!=="__source"&&(vt[at]=J[at]);var Z=arguments.length-2;if(Z===1)vt.children=ht;else if(1<Z){for(var Q=Array(Z),tt=0;tt<Z;tt++)Q[tt]=arguments[tt+2];vt.children=Q}if(H&&H.defaultProps)for(at in Z=H.defaultProps,Z)vt[at]===void 0&&(vt[at]=Z[at]);return I(H,ct,vt)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(H){return{$$typeof:h,render:H}},Se.isValidElement=P,Se.lazy=function(H){return{$$typeof:f,_payload:{_status:-1,_result:H},_init:q}},Se.memo=function(H,J){return{$$typeof:d,type:H,compare:J===void 0?null:J}},Se.startTransition=function(H){var J=N.T,ht={};N.T=ht;try{var at=H(),vt=N.S;vt!==null&&vt(ht,at),typeof at=="object"&&at!==null&&typeof at.then=="function"&&at.then(L,X)}catch(ct){X(ct)}finally{J!==null&&ht.types!==null&&(J.types=ht.types),N.T=J}},Se.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Se.use=function(H){return N.H.use(H)},Se.useActionState=function(H,J,ht){return N.H.useActionState(H,J,ht)},Se.useCallback=function(H,J){return N.H.useCallback(H,J)},Se.useContext=function(H){return N.H.useContext(H)},Se.useDebugValue=function(){},Se.useDeferredValue=function(H,J){return N.H.useDeferredValue(H,J)},Se.useEffect=function(H,J){return N.H.useEffect(H,J)},Se.useEffectEvent=function(H){return N.H.useEffectEvent(H)},Se.useId=function(){return N.H.useId()},Se.useImperativeHandle=function(H,J,ht){return N.H.useImperativeHandle(H,J,ht)},Se.useInsertionEffect=function(H,J){return N.H.useInsertionEffect(H,J)},Se.useLayoutEffect=function(H,J){return N.H.useLayoutEffect(H,J)},Se.useMemo=function(H,J){return N.H.useMemo(H,J)},Se.useOptimistic=function(H,J){return N.H.useOptimistic(H,J)},Se.useReducer=function(H,J,ht){return N.H.useReducer(H,J,ht)},Se.useRef=function(H){return N.H.useRef(H)},Se.useState=function(H){return N.H.useState(H)},Se.useSyncExternalStore=function(H,J,ht){return N.H.useSyncExternalStore(H,J,ht)},Se.useTransition=function(){return N.H.useTransition()},Se.version="19.2.4",Se}var $S;function C1(){return $S||($S=1,Rb.exports=I4()),Rb.exports}var Y=C1();const eM=Id(Y),jot=j4({__proto__:null,default:eM},[Y]);var jb={exports:{}},vu={},Db={exports:{}},Fb={};/**
|
|
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 zS;function $4(){return zS||(zS=1,(function(i){function e(D,F){var q=D.length;D.push(F);t:for(;0<q;){var X=q-1>>>1,nt=D[X];if(0<a(nt,F))D[X]=F,D[q]=nt,q=X;else break t}}function r(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var F=D[0],q=D.pop();if(q!==F){D[0]=q;t:for(var X=0,nt=D.length,H=nt>>>1;X<H;){var J=2*(X+1)-1,ht=D[J],at=J+1,vt=D[at];if(0>a(ht,q))at<nt&&0>a(vt,ht)?(D[X]=vt,D[at]=q,X=at):(D[X]=ht,D[J]=q,X=J);else if(at<nt&&0>a(vt,q))D[X]=vt,D[at]=q,X=at;else break t}}return F}function a(D,F){var q=D.sortIndex-F.sortIndex;return q!==0?q:D.id-F.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;i.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();i.unstable_now=function(){return c.now()-h}}var u=[],d=[],f=1,g=null,x=3,y=!1,v=!1,C=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function A(D){for(var F=r(d);F!==null;){if(F.callback===null)n(d);else if(F.startTime<=D)n(d),F.sortIndex=F.expirationTime,e(u,F);else break;F=r(d)}}function B(D){if(C=!1,A(D),!v)if(r(u)!==null)v=!0,L||(L=!0,W());else{var F=r(d);F!==null&&G(B,F.startTime-D)}}var L=!1,N=-1,M=5,I=-1;function j(){return _?!0:!(i.unstable_now()-I<M)}function P(){if(_=!1,L){var D=i.unstable_now();I=D;var F=!0;try{t:{v=!1,C&&(C=!1,T(N),N=-1),y=!0;var q=x;try{e:{for(A(D),g=r(u);g!==null&&!(g.expirationTime>D&&j());){var X=g.callback;if(typeof X=="function"){g.callback=null,x=g.priorityLevel;var nt=X(g.expirationTime<=D);if(D=i.unstable_now(),typeof nt=="function"){g.callback=nt,A(D),F=!0;break e}g===r(u)&&n(u),A(D)}else n(u);g=r(u)}if(g!==null)F=!0;else{var H=r(d);H!==null&&G(B,H.startTime-D),F=!1}}break t}finally{g=null,x=q,y=!1}F=void 0}}finally{F?W():L=!1}}}var W;if(typeof E=="function")W=function(){E(P)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,z=K.port2;K.port1.onmessage=P,W=function(){z.postMessage(null)}}else W=function(){k(P,0)};function G(D,F){N=k(function(){D(i.unstable_now())},F)}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(D){D.callback=null},i.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<D?Math.floor(1e3/D):5},i.unstable_getCurrentPriorityLevel=function(){return x},i.unstable_next=function(D){switch(x){case 1:case 2:case 3:var F=3;break;default:F=x}var q=x;x=F;try{return D()}finally{x=q}},i.unstable_requestPaint=function(){_=!0},i.unstable_runWithPriority=function(D,F){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var q=x;x=D;try{return F()}finally{x=q}},i.unstable_scheduleCallback=function(D,F,q){var X=i.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?X+q:X):q=X,D){case 1:var nt=-1;break;case 2:nt=250;break;case 5:nt=1073741823;break;case 4:nt=1e4;break;default:nt=5e3}return nt=q+nt,D={id:f++,callback:F,priorityLevel:D,startTime:q,expirationTime:nt,sortIndex:-1},q>X?(D.sortIndex=q,e(d,D),r(u)===null&&D===r(d)&&(C?(T(N),N=-1):C=!0,G(B,q-X))):(D.sortIndex=nt,e(u,D),v||y||(v=!0,L||(L=!0,W()))),D},i.unstable_shouldYield=j,i.unstable_wrapCallback=function(D){var F=x;return function(){var q=x;x=F;try{return D.apply(this,arguments)}finally{x=q}}}})(Fb)),Fb}var PS;function z4(){return PS||(PS=1,Db.exports=$4()),Db.exports}var Ib={exports:{}},Fr={};/**
|
|
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 qS;function P4(){if(qS)return Fr;qS=1;var i=C1();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 Fr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Fr.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)},Fr.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()}},Fr.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))},Fr.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},Fr.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})}},Fr.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)},Fr.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})}},Fr.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)},Fr.requestFormReset=function(u){n.d.r(u)},Fr.unstable_batchedUpdates=function(u,d){return u(d)},Fr.useFormState=function(u,d,f){return c.H.useFormState(u,d,f)},Fr.useFormStatus=function(){return c.H.useHostTransitionStatus()},Fr.version="19.2.4",Fr}var US;function q4(){if(US)return Ib.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(),Ib.exports=P4(),Ib.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 HS;function U4(){if(HS)return vu;HS=1;var i=z4(),e=C1(),r=q4();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,U=w.child;U;){if(U===p){R=!0,p=w,b=S;break}if(U===b){R=!0,b=w,p=S;break}U=U.sibling}if(!R){for(U=S.child;U;){if(U===p){R=!0,p=S,b=w;break}if(U===b){R=!0,b=S,p=w;break}U=U.sibling}if(!R)throw Error(n(189))}}if(p.alternate!==b)throw Error(n(190))}if(p.tag!==3)throw Error(n(188));return p.stateNode.current===p?s:l}function f(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=f(s),l!==null)return l;s=s.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function W(s){return s===null||typeof s!="object"?null:(s=P&&s[P]||s["@@iterator"],typeof s=="function"?s:null)}var K=Symbol.for("react.client.reference");function z(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===K?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case k:return"Profiler";case _:return"StrictMode";case B:return"Suspense";case L:return"SuspenseList";case I: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 A:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case N:return l=s.displayName||null,l!==null?l:z(s.type)||"Memo";case M:l=s._payload,s=s._init;try{return z(s(l))}catch{}}return null}var G=Array.isArray,D=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},X=[],nt=-1;function H(s){return{current:s}}function J(s){0>nt||(s.current=X[nt],X[nt]=null,nt--)}function ht(s,l){nt++,X[nt]=s.current,s.current=l}var at=H(null),vt=H(null),ct=H(null),Z=H(null);function Q(s,l){switch(ht(ct,l),ht(vt,s),ht(at,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?nS(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=nS(l),s=aS(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}J(at),ht(at,s)}function tt(){J(at),J(vt),J(ct)}function ot(s){s.memoizedState!==null&&ht(Z,s);var l=at.current,p=aS(l,s.type);l!==p&&(ht(vt,s),ht(at,p))}function Ct(s){vt.current===s&&(J(at),J(vt)),Z.current===s&&(J(Z),gu._currentValue=q)}var At,Dt;function qt(s){if(At===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);At=l&&l[1]||"",Dt=-1<p.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+At+s+Dt}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],U=S[1];if(R&&U){var et=R.split(`
|
|
45
|
+
`),gt=U.split(`
|
|
46
|
+
`);for(w=b=0;b<et.length&&!et[b].includes("DetermineComponentFrameRoot");)b++;for(;w<gt.length&&!gt[w].includes("DetermineComponentFrameRoot");)w++;if(b===et.length||w===gt.length)for(b=et.length-1,w=gt.length-1;1<=b&&0<=w&&et[b]!==gt[w];)w--;for(;1<=b&&0<=w;b--,w--)if(et[b]!==gt[w]){if(b!==1||w!==1)do if(b--,w--,0>w||et[b]!==gt[w]){var St=`
|
|
47
|
+
`+et[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,Ci=i.unstable_getCurrentPriorityLevel,$e=i.unstable_ImmediatePriority,Ue=i.unstable_UserBlockingPriority,Fe=i.unstable_NormalPriority,Ii=i.unstable_LowPriority,Oi=i.unstable_IdlePriority,Cr=i.log,_n=i.unstable_setDisableYieldValue,$i=null,je=null;function Ke(s){if(typeof Cr=="function"&&_n(s),je&&typeof je.setStrictMode=="function")try{je.setStrictMode($i,s)}catch{}}var Be=Math.clz32?Math.clz32:Qi,dr=Math.log,_i=Math.LN2;function Qi(s){return s>>>=0,s===0?32:31-(dr(s)/_i|0)|0}var Ae=256,rr=262144,Sr=4194304;function Hi(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 it(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 U=b&134217727;return U!==0?(b=U&~S,b!==0?w=Hi(b):(R&=U,R!==0?w=Hi(R):p||(p=U&~s,p!==0&&(w=Hi(p))))):(U=b&~S,U!==0?w=Hi(U):R!==0?w=Hi(R):p||(p=b&~s,p!==0&&(w=Hi(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 jt(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=Sr;return Sr<<=1,(Sr&62914560)===0&&(Sr=4194304),s}function si(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 U=s.entanglements,et=s.expirationTimes,gt=s.hiddenUpdates;for(p=R&~p;0<p;){var St=31-Be(p),Et=1<<St;U[St]=0,et[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 oi(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=F.p;return s!==0?s:(s=window.event,s===void 0?32:NS(s.type))}function nr(s,l){var p=F.p;try{return F.p=s,l()}finally{F.p=p}}var ar=Math.random().toString(36).slice(2),ki="__reactFiber$"+ar,Wi="__reactProps$"+ar,kn="__reactContainer$"+ar,In="__reactEvents$"+ar,wn="__reactListeners$"+ar,Sn="__reactHandles$"+ar,Tr="__reactResources$"+ar,$n="__reactMarker$"+ar;function Ea(s){delete s[ki],delete s[Wi],delete s[In],delete s[wn],delete s[Sn]}function fr(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=dS(s);s!==null;){if(p=s[ki])return p;s=dS(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 pr(s){var l=s[Tr];return l||(l=s[Tr]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function li(s){s[$n]=!0}var Kt=new Set,V={};function kt(s,l){ft(s,l),ft(s+"Capture",l)}function ft(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={},re={};function ze(s){return Ne.call(re,s)?!0:Ne.call(It,s)?!1:Lt.test(s)?re[s]=!0:(It[s]=!0,!1)}function ci(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 _e(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Gi(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=Gi(s)?"checked":"value";s._valueTracker=zn(s,l,""+s[l])}}function qs(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var p=l.getValue(),b="";return s&&(b=Gi(s)?s.checked?"true":"false":s.value),s=b,s!==p?(l.setValue(s),!0):!1}function Ja(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Wo=/[\n"\\]/g;function Er(s){return s.replace(Wo,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Pn(s,l,p,b,w,S,R,U){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=""+_e(l)):s.value!==""+_e(l)&&(s.value=""+_e(l)):R!=="submit"&&R!=="reset"||s.removeAttribute("value"),l!=null?Bt(s,R,_e(l)):p!=null?Bt(s,R,_e(p)):b!=null&&s.removeAttribute("value"),w==null&&S!=null&&(s.defaultChecked=!!S),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?s.name=""+_e(U):s.removeAttribute("name")}function mt(s,l,p,b,w,S,R,U){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?""+_e(p):"",l=l!=null?""+_e(l):p,U||l===s.value||(s.value=l),s.defaultValue=l}b=b??w,b=typeof b!="function"&&typeof b!="symbol"&&!!b,s.checked=U?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=""+_e(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=""+_e(l),l!==s.value&&(s.value=l),p==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=p!=null?""+_e(p):""}function Le(s,l,p,b){if(l==null){if(b!=null){if(p!=null)throw Error(n(92));if(G(b)){if(1<b.length)throw Error(n(93));b=b[0]}p=b}p==null&&(p=""),l=p}p=_e(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"]]),Us=/^[\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 Hs(s){return Us.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Ft(){}var te=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[Wi]||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="'+Er(""+l)+'"][type="radio"]'),l=0;l<p.length;l++){var b=p[l];if(b!==s&&b.form===s.form){var w=b[Wi]||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&&qs(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 Bh=!1;function rf(s,l,p){if(Bh)return s(l,p);Bh=!0;try{var b=s(l);return b}finally{if(Bh=!1,(We!==null||Pi!==null)&&(Hf(),We&&(l=We,s=Pi,Pi=We=null,Un(l),s)))for(l=0;l<s.length;l++)Un(s[l])}}function Lh(s,l){var p=s.stateNode;if(p===null)return null;var b=p[Wi]||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"),Lm=!1;if(ts)try{var Oh={};Object.defineProperty(Oh,"passive",{get:function(){Lm=!0}}),window.addEventListener("test",Oh,Oh),window.removeEventListener("test",Oh,Oh)}catch{Lm=!1}var Ws=null,Om=null,nf=null;function a_(){if(nf)return nf;var s,l=Om,p=l.length,b,w="value"in Ws?Ws.value:Ws.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 nf=w.slice(s,1<b?1-b:void 0)}function af(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 sf(){return!0}function s_(){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 U in s)s.hasOwnProperty(U)&&(p=s[U],this[U]=p?p(S):S[U]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?sf:s_,this.isPropagationStopped=s_,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=sf)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=sf)},persist:function(){},isPersistent:sf}),l}var Go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},of=cn(Go),Rh=g({},Go,{view:0,detail:0}),BD=cn(Rh),Rm,jm,jh,lf=g({},Rh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fm,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!==jh&&(jh&&s.type==="mousemove"?(Rm=s.screenX-jh.screenX,jm=s.screenY-jh.screenY):jm=Rm=0,jh=s),Rm)},movementY:function(s){return"movementY"in s?s.movementY:jm}}),o_=cn(lf),LD=g({},lf,{dataTransfer:0}),OD=cn(LD),RD=g({},Rh,{relatedTarget:0}),Dm=cn(RD),jD=g({},Go,{animationName:0,elapsedTime:0,pseudoElement:0}),DD=cn(jD),FD=g({},Go,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),ID=cn(FD),$D=g({},Go,{data:0}),l_=cn($D),zD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PD={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"},qD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UD(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=qD[s])?!!l[s]:!1}function Fm(){return UD}var HD=g({},Rh,{key:function(s){if(s.key){var l=zD[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=af(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?PD[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fm,charCode:function(s){return s.type==="keypress"?af(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?af(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),WD=cn(HD),GD=g({},lf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),c_=cn(GD),YD=g({},Rh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fm}),KD=cn(YD),VD=g({},Go,{propertyName:0,elapsedTime:0,pseudoElement:0}),XD=cn(VD),ZD=g({},lf,{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}),QD=cn(ZD),JD=g({},Go,{newState:0,oldState:0}),tF=cn(JD),eF=[9,13,27,32],Im=ts&&"CompositionEvent"in window,Dh=null;ts&&"documentMode"in document&&(Dh=document.documentMode);var iF=ts&&"TextEvent"in window&&!Dh,h_=ts&&(!Im||Dh&&8<Dh&&11>=Dh),u_=" ",d_=!1;function f_(s,l){switch(s){case"keyup":return eF.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function p_(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Xl=!1;function rF(s,l){switch(s){case"compositionend":return p_(l);case"keypress":return l.which!==32?null:(d_=!0,u_);case"textInput":return s=l.data,s===u_&&d_?null:s;default:return null}}function nF(s,l){if(Xl)return s==="compositionend"||!Im&&f_(s,l)?(s=a_(),nf=Om=Ws=null,Xl=!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 h_&&l.locale!=="ko"?null:l.data;default:return null}}var aF={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 g_(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!aF[s.type]:l==="textarea"}function m_(s,l,p,b){We?Pi?Pi.push(b):Pi=[b]:We=b,l=Zf(l,"onChange"),0<l.length&&(p=new of("onChange","change",null,p,b),s.push({event:p,listeners:l}))}var Fh=null,Ih=null;function sF(s){Qw(s,0)}function cf(s){var l=ln(s);if(qs(l))return s}function y_(s,l){if(s==="change")return l}var b_=!1;if(ts){var $m;if(ts){var zm="oninput"in document;if(!zm){var x_=document.createElement("div");x_.setAttribute("oninput","return;"),zm=typeof x_.oninput=="function"}$m=zm}else $m=!1;b_=$m&&(!document.documentMode||9<document.documentMode)}function v_(){Fh&&(Fh.detachEvent("onpropertychange",C_),Ih=Fh=null)}function C_(s){if(s.propertyName==="value"&&cf(Ih)){var l=[];m_(l,Ih,s,Ee(s)),rf(sF,l)}}function oF(s,l,p){s==="focusin"?(v_(),Fh=l,Ih=p,Fh.attachEvent("onpropertychange",C_)):s==="focusout"&&v_()}function lF(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return cf(Ih)}function cF(s,l){if(s==="click")return cf(l)}function hF(s,l){if(s==="input"||s==="change")return cf(l)}function uF(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Tn=typeof Object.is=="function"?Object.is:uF;function $h(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 __(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function k_(s,l){var p=__(s);s=0;for(var b;p;){if(p.nodeType===3){if(b=s+p.textContent.length,s<=l&&b>=l)return{node:p,offset:l-s};s=b}t:{for(;p;){if(p.nextSibling){p=p.nextSibling;break t}p=p.parentNode}p=void 0}p=__(p)}}function w_(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?w_(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function S_(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 Pm(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 dF=ts&&"documentMode"in document&&11>=document.documentMode,Zl=null,qm=null,zh=null,Um=!1;function T_(s,l,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Um||Zl==null||Zl!==Ja(b)||(b=Zl,"selectionStart"in b&&Pm(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}),zh&&$h(zh,b)||(zh=b,b=Zf(qm,"onSelect"),0<b.length&&(l=new of("onSelect","select",null,l,p),s.push({event:l,listeners:b}),l.target=Zl)))}function Yo(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Ql={animationend:Yo("Animation","AnimationEnd"),animationiteration:Yo("Animation","AnimationIteration"),animationstart:Yo("Animation","AnimationStart"),transitionrun:Yo("Transition","TransitionRun"),transitionstart:Yo("Transition","TransitionStart"),transitioncancel:Yo("Transition","TransitionCancel"),transitionend:Yo("Transition","TransitionEnd")},Hm={},E_={};ts&&(E_=document.createElement("div").style,"AnimationEvent"in window||(delete Ql.animationend.animation,delete Ql.animationiteration.animation,delete Ql.animationstart.animation),"TransitionEvent"in window||delete Ql.transitionend.transition);function Ko(s){if(Hm[s])return Hm[s];if(!Ql[s])return s;var l=Ql[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in E_)return Hm[s]=l[p];return s}var N_=Ko("animationend"),A_=Ko("animationiteration"),M_=Ko("animationstart"),fF=Ko("transitionrun"),pF=Ko("transitionstart"),gF=Ko("transitioncancel"),B_=Ko("transitionend"),L_=new Map,Wm="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(" ");Wm.push("scrollEnd");function ca(s,l){L_.set(s,l),kt(l,[s])}var hf=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=[],Jl=0,Gm=0;function uf(){for(var s=Jl,l=Gm=Jl=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&&O_(p,w,S)}}function df(s,l,p,b){Hn[Jl++]=s,Hn[Jl++]=l,Hn[Jl++]=p,Hn[Jl++]=b,Gm|=b,s.lanes|=b,s=s.alternate,s!==null&&(s.lanes|=b)}function Ym(s,l,p,b){return df(s,l,p,b),ff(s)}function Vo(s,l){return df(s,null,null,l),ff(s)}function O_(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 ff(s){if(50<lu)throw lu=0,ib=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var tc={};function mF(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 mF(s,l,p,b)}function Km(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 R_(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 pf(s,l,p,b,w,S){var R=0;if(b=s,typeof s=="function")Km(s)&&(R=1);else if(typeof s=="string")R=C4(s,p,at.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case I:return s=En(31,p,l,w),s.elementType=I,s.lanes=S,s;case C:return Xo(p.children,w,S,l);case _:R=8,w|=24;break;case k:return s=En(12,p,l,w|2),s.elementType=k,s.lanes=S,s;case B:return s=En(13,p,l,w),s.elementType=B,s.lanes=S,s;case L:return s=En(19,p,l,w),s.elementType=L,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 A:R=11;break t;case N:R=14;break t;case M:R=16,b=null;break t}R=29,p=Error(n(130,s===null?"null":typeof s,"")),b=null}return l=En(R,p,l,w),l.elementType=s,l.type=b,l.lanes=S,l}function Xo(s,l,p,b){return s=En(7,s,b,l),s.lanes=p,s}function Vm(s,l,p){return s=En(6,s,null,l),s.lanes=p,s}function j_(s){var l=En(18,null,null,0);return l.stateNode=s,l}function Xm(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 D_=new WeakMap;function Wn(s,l){if(typeof s=="object"&&s!==null){var p=D_.get(s);return p!==void 0?p:(l={value:s,source:l,stack:ye(l)},D_.set(s,l),l)}return{value:s,source:l,stack:ye(l)}}var ec=[],ic=0,gf=null,Ph=0,Gn=[],Yn=0,Gs=null,Na=1,Aa="";function is(s,l){ec[ic++]=Ph,ec[ic++]=gf,gf=s,Ph=l}function F_(s,l,p){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Gs,Gs=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 Zm(s){s.return!==null&&(is(s,1),F_(s,1,0))}function Qm(s){for(;s===gf;)gf=ec[--ic],ec[ic]=null,Ph=ec[--ic],ec[ic]=null;for(;s===Gs;)Gs=Gn[--Yn],Gn[Yn]=null,Aa=Gn[--Yn],Gn[Yn]=null,Na=Gn[--Yn],Gn[Yn]=null}function I_(s,l){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Gs,Na=l.id,Aa=l.overflow,Gs=s}var Nr=null,Ei=null,Xe=!1,Ys=null,Kn=!1,Jm=Error(n(519));function Ks(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qh(Wn(l,s)),Jm}function $_(s){var l=s.stateNode,p=s.type,b=s.memoizedProps;switch(l[ki]=s,l[Wi]=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<hu.length;p++)qe(hu[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||iS(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||Ks(s,!0)}function z_(s){for(Nr=s.return;Nr;)switch(Nr.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Nr=Nr.return}}function rc(s){if(s!==Nr)return!1;if(!Xe)return z_(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")||yb(s.type,s.memoizedProps)),p=!p),p&&Ei&&Ks(s),z_(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Ei=uS(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Ei=uS(s)}else l===27?(l=Ei,lo(s.type)?(s=_b,_b=null,Ei=s):Ei=l):Ei=Nr?Xn(s.stateNode.nextSibling):null;return!0}function Zo(){Ei=Nr=null,Xe=!1}function ty(){var s=Ys;return s!==null&&(fn===null?fn=s:fn.push.apply(fn,s),Ys=null),s}function qh(s){Ys===null?Ys=[s]:Ys.push(s)}var ey=H(null),Qo=null,rs=null;function Vs(s,l,p){ht(ey,l._currentValue),l._currentValue=p}function ns(s){s._currentValue=ey.current,J(ey)}function iy(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 ry(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 U=S;S=w;for(var et=0;et<l.length;et++)if(U.context===l[et]){S.lanes|=p,U=S.alternate,U!==null&&(U.lanes|=p),iy(S.return,p,s),b||(R=null);break t}S=U.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),iy(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 nc(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 U=w.type;Tn(w.pendingProps.value,R.value)||(s!==null?s.push(U):s=[U])}}else if(w===Z.current){if(R=w.alternate,R===null)throw Error(n(387));R.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(gu):s=[gu])}w=w.return}s!==null&&ry(l,s,p,b),l.flags|=262144}function mf(s){for(s=s.firstContext;s!==null;){if(!Tn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Jo(s){Qo=s,rs=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Ar(s){return P_(Qo,s)}function yf(s,l){return Qo===null&&Jo(s),P_(s,l)}function P_(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 yF=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()})}},bF=i.unstable_scheduleCallback,xF=i.unstable_NormalPriority,sr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ny(){return{controller:new yF,data:new Map,refCount:0}}function Uh(s){s.refCount--,s.refCount===0&&bF(xF,function(){s.controller.abort()})}var Hh=null,ay=0,ac=0,sc=null;function vF(s,l){if(Hh===null){var p=Hh=[];ay=0,ac=lb(),sc={status:"pending",value:void 0,then:function(b){p.push(b)}}}return ay++,l.then(q_,q_),l}function q_(){if(--ay===0&&Hh!==null){sc!==null&&(sc.status="fulfilled");var s=Hh;Hh=null,ac=0,sc=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function CF(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 U_=D.S;D.S=function(s,l){Tw=fe(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&vF(s,l),U_!==null&&U_(s,l)};var tl=H(null);function sy(){var s=tl.current;return s!==null?s:wi.pooledCache}function bf(s,l){l===null?ht(tl,tl.current):ht(tl,l.pool)}function H_(){var s=sy();return s===null?null:{parent:sr._currentValue,pool:s}}var oc=Error(n(460)),oy=Error(n(474)),xf=Error(n(542)),vf={then:function(){}};function W_(s){return s=s.status,s==="fulfilled"||s==="rejected"}function G_(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,K_(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,K_(s),s}throw il=l,oc}}function el(s){try{var l=s._init;return l(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(il=p,oc):p}}var il=null;function Y_(){if(il===null)throw Error(n(459));var s=il;return il=null,s}function K_(s){if(s===oc||s===xf)throw Error(n(483))}var lc=null,Wh=0;function Cf(s){var l=Wh;return Wh+=1,lc===null&&(lc=[]),G_(lc,s,l)}function Gh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function _f(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 V_(s){function l(dt,st){if(s){var pt=dt.deletions;pt===null?(dt.deletions=[st],dt.flags|=16):pt.push(st)}}function p(dt,st){if(!s)return null;for(;st!==null;)l(dt,st),st=st.sibling;return null}function b(dt){for(var st=new Map;dt!==null;)dt.key!==null?st.set(dt.key,dt):st.set(dt.index,dt),dt=dt.sibling;return st}function w(dt,st){return dt=es(dt,st),dt.index=0,dt.sibling=null,dt}function S(dt,st,pt){return dt.index=pt,s?(pt=dt.alternate,pt!==null?(pt=pt.index,pt<st?(dt.flags|=67108866,st):pt):(dt.flags|=67108866,st)):(dt.flags|=1048576,st)}function R(dt){return s&&dt.alternate===null&&(dt.flags|=67108866),dt}function U(dt,st,pt,Tt){return st===null||st.tag!==6?(st=Vm(pt,dt.mode,Tt),st.return=dt,st):(st=w(st,pt),st.return=dt,st)}function et(dt,st,pt,Tt){var ce=pt.type;return ce===C?St(dt,st,pt.props.children,Tt,pt.key):st!==null&&(st.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===M&&el(ce)===st.type)?(st=w(st,pt.props),Gh(st,pt),st.return=dt,st):(st=pf(pt.type,pt.key,pt.props,null,dt.mode,Tt),Gh(st,pt),st.return=dt,st)}function gt(dt,st,pt,Tt){return st===null||st.tag!==4||st.stateNode.containerInfo!==pt.containerInfo||st.stateNode.implementation!==pt.implementation?(st=Xm(pt,dt.mode,Tt),st.return=dt,st):(st=w(st,pt.children||[]),st.return=dt,st)}function St(dt,st,pt,Tt,ce){return st===null||st.tag!==7?(st=Xo(pt,dt.mode,Tt,ce),st.return=dt,st):(st=w(st,pt),st.return=dt,st)}function Et(dt,st,pt){if(typeof st=="string"&&st!==""||typeof st=="number"||typeof st=="bigint")return st=Vm(""+st,dt.mode,pt),st.return=dt,st;if(typeof st=="object"&&st!==null){switch(st.$$typeof){case y:return pt=pf(st.type,st.key,st.props,null,dt.mode,pt),Gh(pt,st),pt.return=dt,pt;case v:return st=Xm(st,dt.mode,pt),st.return=dt,st;case M:return st=el(st),Et(dt,st,pt)}if(G(st)||W(st))return st=Xo(st,dt.mode,pt,null),st.return=dt,st;if(typeof st.then=="function")return Et(dt,Cf(st),pt);if(st.$$typeof===E)return Et(dt,yf(dt,st),pt);_f(dt,st)}return null}function yt(dt,st,pt,Tt){var ce=st!==null?st.key:null;if(typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint")return ce!==null?null:U(dt,st,""+pt,Tt);if(typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case y:return pt.key===ce?et(dt,st,pt,Tt):null;case v:return pt.key===ce?gt(dt,st,pt,Tt):null;case M:return pt=el(pt),yt(dt,st,pt,Tt)}if(G(pt)||W(pt))return ce!==null?null:St(dt,st,pt,Tt,null);if(typeof pt.then=="function")return yt(dt,st,Cf(pt),Tt);if(pt.$$typeof===E)return yt(dt,st,yf(dt,pt),Tt);_f(dt,pt)}return null}function xt(dt,st,pt,Tt,ce){if(typeof Tt=="string"&&Tt!==""||typeof Tt=="number"||typeof Tt=="bigint")return dt=dt.get(pt)||null,U(st,dt,""+Tt,ce);if(typeof Tt=="object"&&Tt!==null){switch(Tt.$$typeof){case y:return dt=dt.get(Tt.key===null?pt:Tt.key)||null,et(st,dt,Tt,ce);case v:return dt=dt.get(Tt.key===null?pt:Tt.key)||null,gt(st,dt,Tt,ce);case M:return Tt=el(Tt),xt(dt,st,pt,Tt,ce)}if(G(Tt)||W(Tt))return dt=dt.get(pt)||null,St(st,dt,Tt,ce,null);if(typeof Tt.then=="function")return xt(dt,st,pt,Cf(Tt),ce);if(Tt.$$typeof===E)return xt(dt,st,pt,yf(st,Tt),ce);_f(st,Tt)}return null}function Vt(dt,st,pt,Tt){for(var ce=null,ti=null,ee=st,Oe=st=0,Ye=null;ee!==null&&Oe<pt.length;Oe++){ee.index>Oe?(Ye=ee,ee=null):Ye=ee.sibling;var ei=yt(dt,ee,pt[Oe],Tt);if(ei===null){ee===null&&(ee=Ye);break}s&&ee&&ei.alternate===null&&l(dt,ee),st=S(ei,st,Oe),ti===null?ce=ei:ti.sibling=ei,ti=ei,ee=Ye}if(Oe===pt.length)return p(dt,ee),Xe&&is(dt,Oe),ce;if(ee===null){for(;Oe<pt.length;Oe++)ee=Et(dt,pt[Oe],Tt),ee!==null&&(st=S(ee,st,Oe),ti===null?ce=ee:ti.sibling=ee,ti=ee);return Xe&&is(dt,Oe),ce}for(ee=b(ee);Oe<pt.length;Oe++)Ye=xt(ee,dt,Oe,pt[Oe],Tt),Ye!==null&&(s&&Ye.alternate!==null&&ee.delete(Ye.key===null?Oe:Ye.key),st=S(Ye,st,Oe),ti===null?ce=Ye:ti.sibling=Ye,ti=Ye);return s&&ee.forEach(function(po){return l(dt,po)}),Xe&&is(dt,Oe),ce}function ge(dt,st,pt,Tt){if(pt==null)throw Error(n(151));for(var ce=null,ti=null,ee=st,Oe=st=0,Ye=null,ei=pt.next();ee!==null&&!ei.done;Oe++,ei=pt.next()){ee.index>Oe?(Ye=ee,ee=null):Ye=ee.sibling;var po=yt(dt,ee,ei.value,Tt);if(po===null){ee===null&&(ee=Ye);break}s&&ee&&po.alternate===null&&l(dt,ee),st=S(po,st,Oe),ti===null?ce=po:ti.sibling=po,ti=po,ee=Ye}if(ei.done)return p(dt,ee),Xe&&is(dt,Oe),ce;if(ee===null){for(;!ei.done;Oe++,ei=pt.next())ei=Et(dt,ei.value,Tt),ei!==null&&(st=S(ei,st,Oe),ti===null?ce=ei:ti.sibling=ei,ti=ei);return Xe&&is(dt,Oe),ce}for(ee=b(ee);!ei.done;Oe++,ei=pt.next())ei=xt(ee,dt,Oe,ei.value,Tt),ei!==null&&(s&&ei.alternate!==null&&ee.delete(ei.key===null?Oe:ei.key),st=S(ei,st,Oe),ti===null?ce=ei:ti.sibling=ei,ti=ei);return s&&ee.forEach(function(L4){return l(dt,L4)}),Xe&&is(dt,Oe),ce}function vi(dt,st,pt,Tt){if(typeof pt=="object"&&pt!==null&&pt.type===C&&pt.key===null&&(pt=pt.props.children),typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case y:t:{for(var ce=pt.key;st!==null;){if(st.key===ce){if(ce=pt.type,ce===C){if(st.tag===7){p(dt,st.sibling),Tt=w(st,pt.props.children),Tt.return=dt,dt=Tt;break t}}else if(st.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===M&&el(ce)===st.type){p(dt,st.sibling),Tt=w(st,pt.props),Gh(Tt,pt),Tt.return=dt,dt=Tt;break t}p(dt,st);break}else l(dt,st);st=st.sibling}pt.type===C?(Tt=Xo(pt.props.children,dt.mode,Tt,pt.key),Tt.return=dt,dt=Tt):(Tt=pf(pt.type,pt.key,pt.props,null,dt.mode,Tt),Gh(Tt,pt),Tt.return=dt,dt=Tt)}return R(dt);case v:t:{for(ce=pt.key;st!==null;){if(st.key===ce)if(st.tag===4&&st.stateNode.containerInfo===pt.containerInfo&&st.stateNode.implementation===pt.implementation){p(dt,st.sibling),Tt=w(st,pt.children||[]),Tt.return=dt,dt=Tt;break t}else{p(dt,st);break}else l(dt,st);st=st.sibling}Tt=Xm(pt,dt.mode,Tt),Tt.return=dt,dt=Tt}return R(dt);case M:return pt=el(pt),vi(dt,st,pt,Tt)}if(G(pt))return Vt(dt,st,pt,Tt);if(W(pt)){if(ce=W(pt),typeof ce!="function")throw Error(n(150));return pt=ce.call(pt),ge(dt,st,pt,Tt)}if(typeof pt.then=="function")return vi(dt,st,Cf(pt),Tt);if(pt.$$typeof===E)return vi(dt,st,yf(dt,pt),Tt);_f(dt,pt)}return typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint"?(pt=""+pt,st!==null&&st.tag===6?(p(dt,st.sibling),Tt=w(st,pt),Tt.return=dt,dt=Tt):(p(dt,st),Tt=Vm(pt,dt.mode,Tt),Tt.return=dt,dt=Tt),R(dt)):p(dt,st)}return function(dt,st,pt,Tt){try{Wh=0;var ce=vi(dt,st,pt,Tt);return lc=null,ce}catch(ee){if(ee===oc||ee===xf)throw ee;var ti=En(29,ee,null,dt.mode);return ti.lanes=Tt,ti.return=dt,ti}finally{}}}var rl=V_(!0),X_=V_(!1),Xs=!1;function ly(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cy(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 Zs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Qs(s,l,p){var b=s.updateQueue;if(b===null)return null;if(b=b.shared,(ai&2)!==0){var w=b.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),b.pending=l,l=ff(s),O_(s,null,p),l}return df(s,b,l,p),ff(s)}function Yh(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 hy(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 uy=!1;function Kh(){if(uy){var s=sc;if(s!==null)throw s}}function Vh(s,l,p,b){uy=!1;var w=s.updateQueue;Xs=!1;var S=w.firstBaseUpdate,R=w.lastBaseUpdate,U=w.shared.pending;if(U!==null){w.shared.pending=null;var et=U,gt=et.next;et.next=null,R===null?S=gt:R.next=gt,R=et;var St=s.alternate;St!==null&&(St=St.updateQueue,U=St.lastBaseUpdate,U!==R&&(U===null?St.firstBaseUpdate=gt:U.next=gt,St.lastBaseUpdate=et))}if(S!==null){var Et=w.baseState;R=0,St=gt=et=null,U=S;do{var yt=U.lane&-536870913,xt=yt!==U.lane;if(xt?(Ge&yt)===yt:(b&yt)===yt){yt!==0&&yt===ac&&(uy=!0),St!==null&&(St=St.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});t:{var Vt=s,ge=U;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:Xs=!0}}yt=U.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:U.tag,payload:U.payload,callback:U.callback,next:null},St===null?(gt=St=xt,et=Et):St=St.next=xt,R|=yt;if(U=U.next,U===null){if(U=w.shared.pending,U===null)break;xt=U,U=xt.next,xt.next=null,w.lastBaseUpdate=xt,w.shared.pending=null}}while(!0);St===null&&(et=Et),w.baseState=et,w.firstBaseUpdate=gt,w.lastBaseUpdate=St,S===null&&(w.shared.lanes=0),ro|=R,s.lanes=R,s.memoizedState=Et}}function Z_(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function Q_(s,l){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)Z_(p[s],l)}var cc=H(null),kf=H(0);function J_(s,l){s=fs,ht(kf,s),ht(cc,l),fs=s|l.baseLanes}function dy(){ht(kf,fs),ht(cc,cc.current)}function fy(){fs=kf.current,J(cc),J(kf)}var Nn=H(null),Vn=null;function Js(s){var l=s.alternate;ht(Ji,Ji.current&1),ht(Nn,s),Vn===null&&(l===null||cc.current!==null||l.memoizedState!==null)&&(Vn=s)}function py(s){ht(Ji,Ji.current),ht(Nn,s),Vn===null&&(Vn=s)}function tk(s){s.tag===22?(ht(Ji,Ji.current),ht(Nn,s),Vn===null&&(Vn=s)):to()}function to(){ht(Ji,Ji.current),ht(Nn,Nn.current)}function An(s){J(Nn),Vn===s&&(Vn=null),J(Ji)}var Ji=H(0);function wf(s){for(var l=s;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||vb(p)||Cb(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,or=null,Sf=!1,hc=!1,nl=!1,Tf=0,Xh=0,uc=null,_F=0;function Yi(){throw Error(n(321))}function gy(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 my(s,l,p,b,w,S){return as=S,Me=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,D.H=s===null||s.memoizedState===null?Fk:By,nl=!1,S=p(b,w),nl=!1,hc&&(S=ik(l,p,b,w)),ek(s),S}function ek(s){D.H=Jh;var l=bi!==null&&bi.next!==null;if(as=0,or=bi=Me=null,Sf=!1,Xh=0,uc=null,l)throw Error(n(300));s===null||lr||(s=s.dependencies,s!==null&&mf(s)&&(lr=!0))}function ik(s,l,p,b){Me=s;var w=0;do{if(hc&&(uc=null),Xh=0,hc=!1,25<=w)throw Error(n(301));if(w+=1,or=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)}D.H=Ik,S=l(p,b)}while(hc);return S}function kF(){var s=D.H,l=s.useState()[0];return l=typeof l.then=="function"?Zh(l):l,s=s.useState()[0],(bi!==null?bi.memoizedState:null)!==s&&(Me.flags|=1024),l}function yy(){var s=Tf!==0;return Tf=0,s}function by(s,l,p){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~p}function xy(s){if(Sf){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Sf=!1}as=0,or=bi=Me=null,hc=!1,Xh=Tf=0,uc=null}function Kr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return or===null?Me.memoizedState=or=s:or=or.next=s,or}function tr(){if(bi===null){var s=Me.alternate;s=s!==null?s.memoizedState:null}else s=bi.next;var l=or===null?Me.memoizedState:or.next;if(l!==null)or=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},or===null?Me.memoizedState=or=s:or=or.next=s}return or}function Ef(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zh(s){var l=Xh;return Xh+=1,uc===null&&(uc=[]),s=G_(uc,s,l),l=Me,(or===null?l.memoizedState:or.next)===null&&(l=l.alternate,D.H=l===null||l.memoizedState===null?Fk:By),s}function Nf(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Zh(s);if(s.$$typeof===E)return Ar(s)}throw Error(n(438,String(s)))}function vy(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=Ef(),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]=j;return l.index++,p}function ss(s,l){return typeof l=="function"?l(s):l}function Af(s){var l=tr();return Cy(l,bi,s)}function Cy(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 U=R=null,et=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)et!==null&&(et=et.next={lane:0,revertLane:0,gesture:null,action:gt.action,hasEagerState:gt.hasEagerState,eagerState:gt.eagerState,next:null}),Et===ac&&(St=!0);else if((as&yt)===yt){gt=gt.next,yt===ac&&(St=!0);continue}else Et={lane:0,revertLane:gt.revertLane,gesture:null,action:gt.action,hasEagerState:gt.hasEagerState,eagerState:gt.eagerState,next:null},et===null?(U=et=Et,R=S):et=et.next=Et,Me.lanes|=yt,ro|=yt;Et=gt.action,nl&&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},et===null?(U=et=yt,R=S):et=et.next=yt,Me.lanes|=Et,ro|=Et;gt=gt.next}while(gt!==null&>!==l);if(et===null?R=S:et.next=U,!Tn(S,s.memoizedState)&&(lr=!0,St&&(p=sc,p!==null)))throw p;s.memoizedState=S,s.baseState=R,s.baseQueue=et,b.lastRenderedState=S}return w===null&&(b.lanes=0),[s.memoizedState,b.dispatch]}function _y(s){var l=tr(),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)||(lr=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),p.lastRenderedState=S}return[S,b]}function rk(s,l,p){var b=Me,w=tr(),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,lr=!0),w=w.queue,Sy(sk.bind(null,b,w,s),[s]),w.getSnapshot!==l||R||or!==null&&or.memoizedState.tag&1){if(b.flags|=2048,dc(9,{destroy:void 0},ak.bind(null,b,w,p,l),null),wi===null)throw Error(n(349));S||(as&127)!==0||nk(b,l,p)}return p}function nk(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=Me.updateQueue,l===null?(l=Ef(),Me.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function ak(s,l,p,b){l.value=p,l.getSnapshot=b,ok(l)&&lk(s)}function sk(s,l,p){return p(function(){ok(l)&&lk(s)})}function ok(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!Tn(s,p)}catch{return!0}}function lk(s){var l=Vo(s,2);l!==null&&pn(l,s,2)}function ky(s){var l=Kr();if(typeof s=="function"){var p=s;if(s=p(),nl){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 ck(s,l,p,b){return s.baseState=p,Cy(s,bi,typeof b=="function"?b:ss)}function wF(s,l,p,b,w){if(Lf(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)}};D.T!==null?p(!0):S.isTransition=!1,b(S),p=l.pending,p===null?(S.next=l.pending=S,hk(l,S)):(S.next=p.next,l.pending=p.next=S)}}function hk(s,l){var p=l.action,b=l.payload,w=s.state;if(l.isTransition){var S=D.T,R={};D.T=R;try{var U=p(w,b),et=D.S;et!==null&&et(R,U),uk(s,l,U)}catch(gt){wy(s,l,gt)}finally{S!==null&&R.types!==null&&(S.types=R.types),D.T=S}}else try{S=p(w,b),uk(s,l,S)}catch(gt){wy(s,l,gt)}}function uk(s,l,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(b){dk(s,l,b)},function(b){return wy(s,l,b)}):dk(s,l,p)}function dk(s,l,p){l.status="fulfilled",l.value=p,fk(l),s.state=p,l=s.pending,l!==null&&(p=l.next,p===l?s.pending=null:(p=p.next,l.next=p,hk(s,p)))}function wy(s,l,p){var b=s.pending;if(s.pending=null,b!==null){b=b.next;do l.status="rejected",l.reason=p,fk(l),l=l.next;while(l!==b)}s.action=null}function fk(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function pk(s,l){return l}function gk(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}}Ks(b)}b=!1}b&&(l=p[0])}}return p=Kr(),p.memoizedState=p.baseState=l,b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pk,lastRenderedState:l},p.queue=b,p=Rk.bind(null,Me,b),b.dispatch=p,b=ky(!1),S=My.bind(null,Me,!1,b.queue),b=Kr(),w={state:l,dispatch:null,action:s,pending:null},b.queue=w,p=wF.bind(null,Me,w,S,p),w.dispatch=p,b.memoizedState=s,[l,p,!1]}function mk(s){var l=tr();return yk(l,bi,s)}function yk(s,l,p){if(l=Cy(s,l,pk)[0],s=Af(ss)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var b=Zh(l)}catch(R){throw R===oc?xf:R}else b=l;l=tr();var w=l.queue,S=w.dispatch;return p!==l.memoizedState&&(Me.flags|=2048,dc(9,{destroy:void 0},SF.bind(null,w,p),null)),[b,S,s]}function SF(s,l){s.action=l}function bk(s){var l=tr(),p=bi;if(p!==null)return yk(l,p,s);tr(),l=l.memoizedState,p=tr();var b=p.queue.dispatch;return p.memoizedState=s,[l,b,!1]}function dc(s,l,p,b){return s={tag:s,create:p,deps:b,inst:l,next:null},l=Me.updateQueue,l===null&&(l=Ef(),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 xk(){return tr().memoizedState}function Mf(s,l,p,b){var w=Kr();Me.flags|=s,w.memoizedState=dc(1|l,{destroy:void 0},p,b===void 0?null:b)}function Bf(s,l,p,b){var w=tr();b=b===void 0?null:b;var S=w.memoizedState.inst;bi!==null&&b!==null&&gy(b,bi.memoizedState.deps)?w.memoizedState=dc(l,S,p,b):(Me.flags|=s,w.memoizedState=dc(1|l,S,p,b))}function vk(s,l){Mf(8390656,8,s,l)}function Sy(s,l){Bf(2048,8,s,l)}function TF(s){Me.flags|=4;var l=Me.updateQueue;if(l===null)l=Ef(),Me.updateQueue=l,l.events=[s];else{var p=l.events;p===null?l.events=[s]:p.push(s)}}function Ck(s){var l=tr().memoizedState;return TF({ref:l,nextImpl:s}),function(){if((ai&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function _k(s,l){return Bf(4,2,s,l)}function kk(s,l){return Bf(4,4,s,l)}function wk(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 Sk(s,l,p){p=p!=null?p.concat([s]):null,Bf(4,4,wk.bind(null,l,s),p)}function Ty(){}function Tk(s,l){var p=tr();l=l===void 0?null:l;var b=p.memoizedState;return l!==null&&gy(l,b[1])?b[0]:(p.memoizedState=[s,l],s)}function Ek(s,l){var p=tr();l=l===void 0?null:l;var b=p.memoizedState;if(l!==null&&gy(l,b[1]))return b[0];if(b=s(),nl){Ke(!0);try{s()}finally{Ke(!1)}}return p.memoizedState=[b,l],b}function Ey(s,l,p){return p===void 0||(as&1073741824)!==0&&(Ge&261930)===0?s.memoizedState=l:(s.memoizedState=p,s=Nw(),Me.lanes|=s,ro|=s,p)}function Nk(s,l,p,b){return Tn(p,l)?p:cc.current!==null?(s=Ey(s,p,b),Tn(s,l)||(lr=!0),s):(as&42)===0||(as&1073741824)!==0&&(Ge&261930)===0?(lr=!0,s.memoizedState=p):(s=Nw(),Me.lanes|=s,ro|=s,l)}function Ak(s,l,p,b,w){var S=F.p;F.p=S!==0&&8>S?S:8;var R=D.T,U={};D.T=U,My(s,!1,l,p);try{var et=w(),gt=D.S;if(gt!==null&>(U,et),et!==null&&typeof et=="object"&&typeof et.then=="function"){var St=CF(et,b);Qh(s,l,St,Ln(s))}else Qh(s,l,b,Ln(s))}catch(Et){Qh(s,l,{then:function(){},status:"rejected",reason:Et},Ln())}finally{F.p=S,R!==null&&U.types!==null&&(R.types=U.types),D.T=R}}function EF(){}function Ny(s,l,p,b){if(s.tag!==5)throw Error(n(476));var w=Mk(s).queue;Ak(s,w,l,q,p===null?EF:function(){return Bk(s),p(b)})}function Mk(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:q},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 Bk(s){var l=Mk(s);l.next===null&&(l=s.alternate.memoizedState),Qh(s,l.next.queue,{},Ln())}function Ay(){return Ar(gu)}function Lk(){return tr().memoizedState}function Ok(){return tr().memoizedState}function NF(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var p=Ln();s=Zs(p);var b=Qs(l,s,p);b!==null&&(pn(b,l,p),Yh(b,l,p)),l={cache:ny()},s.payload=l;return}l=l.return}}function AF(s,l,p){var b=Ln();p={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Lf(s)?jk(l,p):(p=Ym(s,l,p,b),p!==null&&(pn(p,s,b),Dk(p,l,b)))}function Rk(s,l,p){var b=Ln();Qh(s,l,p,b)}function Qh(s,l,p,b){var w={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Lf(s))jk(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,U=S(R,p);if(w.hasEagerState=!0,w.eagerState=U,Tn(U,R))return df(s,l,w,0),wi===null&&uf(),!1}catch{}finally{}if(p=Ym(s,l,w,b),p!==null)return pn(p,s,b),Dk(p,l,b),!0}return!1}function My(s,l,p,b){if(b={lane:2,revertLane:lb(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Lf(s)){if(l)throw Error(n(479))}else l=Ym(s,p,b,2),l!==null&&pn(l,s,2)}function Lf(s){var l=s.alternate;return s===Me||l!==null&&l===Me}function jk(s,l){hc=Sf=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function Dk(s,l,p){if((p&4194048)!==0){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,le(s,p)}}var Jh={readContext:Ar,use:Nf,useCallback:Yi,useContext:Yi,useEffect:Yi,useImperativeHandle:Yi,useLayoutEffect:Yi,useInsertionEffect:Yi,useMemo:Yi,useReducer:Yi,useRef:Yi,useState:Yi,useDebugValue:Yi,useDeferredValue:Yi,useTransition:Yi,useSyncExternalStore:Yi,useId:Yi,useHostTransitionStatus:Yi,useFormState:Yi,useActionState:Yi,useOptimistic:Yi,useMemoCache:Yi,useCacheRefresh:Yi};Jh.useEffectEvent=Yi;var Fk={readContext:Ar,use:Nf,useCallback:function(s,l){return Kr().memoizedState=[s,l===void 0?null:l],s},useContext:Ar,useEffect:vk,useImperativeHandle:function(s,l,p){p=p!=null?p.concat([s]):null,Mf(4194308,4,wk.bind(null,l,s),p)},useLayoutEffect:function(s,l){return Mf(4194308,4,s,l)},useInsertionEffect:function(s,l){Mf(4,2,s,l)},useMemo:function(s,l){var p=Kr();l=l===void 0?null:l;var b=s();if(nl){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(nl){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=AF.bind(null,Me,s),[b.memoizedState,s]},useRef:function(s){var l=Kr();return s={current:s},l.memoizedState=s},useState:function(s){s=ky(s);var l=s.queue,p=Rk.bind(null,Me,l);return l.dispatch=p,[s.memoizedState,p]},useDebugValue:Ty,useDeferredValue:function(s,l){var p=Kr();return Ey(p,s,l)},useTransition:function(){var s=ky(!1);return s=Ak.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||nk(b,l,p)}w.memoizedState=p;var S={value:p,getSnapshot:l};return w.queue=S,vk(sk.bind(null,b,S,s),[s]),b.flags|=2048,dc(9,{destroy:void 0},ak.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=Tf++,0<p&&(l+="H"+p.toString(32)),l+="_"}else p=_F++,l="_"+l+"r_"+p.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Ay,useFormState:gk,useActionState:gk,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=My.bind(null,Me,!0,p),p.dispatch=l,[s,l]},useMemoCache:vy,useCacheRefresh:function(){return Kr().memoizedState=NF.bind(null,Me)},useEffectEvent:function(s){var l=Kr(),p={impl:s};return l.memoizedState=p,function(){if((ai&2)!==0)throw Error(n(440));return p.impl.apply(void 0,arguments)}}},By={readContext:Ar,use:Nf,useCallback:Tk,useContext:Ar,useEffect:Sy,useImperativeHandle:Sk,useInsertionEffect:_k,useLayoutEffect:kk,useMemo:Ek,useReducer:Af,useRef:xk,useState:function(){return Af(ss)},useDebugValue:Ty,useDeferredValue:function(s,l){var p=tr();return Nk(p,bi.memoizedState,s,l)},useTransition:function(){var s=Af(ss)[0],l=tr().memoizedState;return[typeof s=="boolean"?s:Zh(s),l]},useSyncExternalStore:rk,useId:Lk,useHostTransitionStatus:Ay,useFormState:mk,useActionState:mk,useOptimistic:function(s,l){var p=tr();return ck(p,bi,s,l)},useMemoCache:vy,useCacheRefresh:Ok};By.useEffectEvent=Ck;var Ik={readContext:Ar,use:Nf,useCallback:Tk,useContext:Ar,useEffect:Sy,useImperativeHandle:Sk,useInsertionEffect:_k,useLayoutEffect:kk,useMemo:Ek,useReducer:_y,useRef:xk,useState:function(){return _y(ss)},useDebugValue:Ty,useDeferredValue:function(s,l){var p=tr();return bi===null?Ey(p,s,l):Nk(p,bi.memoizedState,s,l)},useTransition:function(){var s=_y(ss)[0],l=tr().memoizedState;return[typeof s=="boolean"?s:Zh(s),l]},useSyncExternalStore:rk,useId:Lk,useHostTransitionStatus:Ay,useFormState:bk,useActionState:bk,useOptimistic:function(s,l){var p=tr();return bi!==null?ck(p,bi,s,l):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:vy,useCacheRefresh:Ok};Ik.useEffectEvent=Ck;function Ly(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 Oy={enqueueSetState:function(s,l,p){s=s._reactInternals;var b=Ln(),w=Zs(b);w.payload=l,p!=null&&(w.callback=p),l=Qs(s,w,b),l!==null&&(pn(l,s,b),Yh(l,s,b))},enqueueReplaceState:function(s,l,p){s=s._reactInternals;var b=Ln(),w=Zs(b);w.tag=1,w.payload=l,p!=null&&(w.callback=p),l=Qs(s,w,b),l!==null&&(pn(l,s,b),Yh(l,s,b))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var p=Ln(),b=Zs(p);b.tag=2,l!=null&&(b.callback=l),l=Qs(s,b,p),l!==null&&(pn(l,s,p),Yh(l,s,p))}};function $k(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?!$h(p,b)||!$h(w,S):!0}function zk(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&&Oy.enqueueReplaceState(l,l.state,null)}function al(s,l){var p=l;if("ref"in l){p={};for(var b in l)b!=="ref"&&(p[b]=l[b])}if(s=s.defaultProps){p===l&&(p=g({},p));for(var w in s)p[w]===void 0&&(p[w]=s[w])}return p}function Pk(s){hf(s)}function qk(s){console.error(s)}function Uk(s){hf(s)}function Of(s,l){try{var p=s.onUncaughtError;p(l.value,{componentStack:l.stack})}catch(b){setTimeout(function(){throw b})}}function Hk(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 Ry(s,l,p){return p=Zs(p),p.tag=3,p.payload={element:null},p.callback=function(){Of(s,l)},p}function Wk(s){return s=Zs(s),s.tag=3,s}function Gk(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(){Hk(l,p,b)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(s.callback=function(){Hk(l,p,b),typeof w!="function"&&(no===null?no=new Set([this]):no.add(this));var U=b.stack;this.componentDidCatch(b.value,{componentStack:U!==null?U:""})})}function MF(s,l,p,b,w){if(p.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){if(l=p.alternate,l!==null&&nc(l,p,w,!0),p=Nn.current,p!==null){switch(p.tag){case 31:case 13:return Vn===null?Wf():p.alternate===null&&Ki===0&&(Ki=3),p.flags&=-257,p.flags|=65536,p.lanes=w,b===vf?p.flags|=16384:(l=p.updateQueue,l===null?p.updateQueue=new Set([b]):l.add(b),ab(s,b,w)),!1;case 22:return p.flags|=65536,b===vf?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)),ab(s,b,w)),!1}throw Error(n(435,p.tag))}return ab(s,b,w),Wf(),!1}if(Xe)return l=Nn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,b!==Jm&&(s=Error(n(422),{cause:b}),qh(Wn(s,p)))):(b!==Jm&&(l=Error(n(423),{cause:b}),qh(Wn(l,p))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,b=Wn(b,p),w=Ry(s.stateNode,b,w),hy(s,w),Ki!==4&&(Ki=2)),!1;var S=Error(n(520),{cause:b});if(S=Wn(S,p),ou===null?ou=[S]:ou.push(S),Ki!==4&&(Ki=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=Ry(p.stateNode,b,s),hy(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"&&(no===null||!no.has(S))))return p.flags|=65536,w&=-w,p.lanes|=w,w=Wk(w),Gk(w,s,p,b),hy(p,w),!1}p=p.return}while(p!==null);return!1}var jy=Error(n(461)),lr=!1;function Mr(s,l,p,b){l.child=s===null?X_(l,null,p,b):rl(l,s.child,p,b)}function Yk(s,l,p,b,w){p=p.render;var S=l.ref;if("ref"in b){var R={};for(var U in b)U!=="ref"&&(R[U]=b[U])}else R=b;return Jo(l),b=my(s,l,p,R,S,w),U=yy(),s!==null&&!lr?(by(s,l,w),os(s,l,w)):(Xe&&U&&Zm(l),l.flags|=1,Mr(s,l,b,w),l.child)}function Kk(s,l,p,b,w){if(s===null){var S=p.type;return typeof S=="function"&&!Km(S)&&S.defaultProps===void 0&&p.compare===null?(l.tag=15,l.type=S,Vk(s,l,S,b,w)):(s=pf(p.type,null,b,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!Uy(s,w)){var R=S.memoizedProps;if(p=p.compare,p=p!==null?p:$h,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 Vk(s,l,p,b,w){if(s!==null){var S=s.memoizedProps;if($h(S,b)&&s.ref===l.ref)if(lr=!1,l.pendingProps=b=S,Uy(s,w))(s.flags&131072)!==0&&(lr=!0);else return l.lanes=s.lanes,os(s,l,w)}return Dy(s,l,p,b,w)}function Xk(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 Zk(s,l,S,p,b)}if((p&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&bf(l,S!==null?S.cachePool:null),S!==null?J_(l,S):dy(),tk(l);else return b=l.lanes=536870912,Zk(s,l,S!==null?S.baseLanes|p:p,p,b)}else S!==null?(bf(l,S.cachePool),J_(l,S),to(),l.memoizedState=null):(s!==null&&bf(l,null),dy(),to());return Mr(s,l,w,p),l.child}function tu(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Zk(s,l,p,b,w){var S=sy();return S=S===null?null:{parent:sr._currentValue,pool:S},l.memoizedState={baseLanes:p,cachePool:S},s!==null&&bf(l,null),dy(),tk(l),s!==null&&nc(s,l,b,!0),l.childLanes=w,null}function Rf(s,l){return l=Df({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function Qk(s,l,p){return rl(l,s.child,null,p),s=Rf(l,l.pendingProps),s.flags|=2,An(l),l.memoizedState=null,s}function BF(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=Rf(l,b),l.lanes=536870912,tu(null,s);if(py(l),(s=Ei)?(s=hS(s,Kn),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Gs!==null?{id:Na,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=j_(s),p.return=l,l.child=p,Nr=l,Ei=null)):s=null,s===null)throw Ks(l);return l.lanes=536870912,null}return Rf(l,b)}var S=s.memoizedState;if(S!==null){var R=S.dehydrated;if(py(l),w)if(l.flags&256)l.flags&=-257,l=Qk(s,l,p);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(lr||nc(s,l,p,!1),w=(p&s.childLanes)!==0,lr||w){if(b=wi,b!==null&&(R=oi(b,p),R!==0&&R!==S.retryLane))throw S.retryLane=R,Vo(s,R),pn(b,s,R),jy;Wf(),l=Qk(s,l,p)}else s=S.treeContext,Ei=Xn(R.nextSibling),Nr=l,Xe=!0,Ys=null,Kn=!1,s!==null&&I_(l,s),l=Rf(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 jf(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 Dy(s,l,p,b,w){return Jo(l),p=my(s,l,p,b,void 0,w),b=yy(),s!==null&&!lr?(by(s,l,w),os(s,l,w)):(Xe&&b&&Zm(l),l.flags|=1,Mr(s,l,p,w),l.child)}function Jk(s,l,p,b,w,S){return Jo(l),l.updateQueue=null,p=ik(l,b,p,w),ek(s),b=yy(),s!==null&&!lr?(by(s,l,S),os(s,l,S)):(Xe&&b&&Zm(l),l.flags|=1,Mr(s,l,p,S),l.child)}function tw(s,l,p,b,w){if(Jo(l),l.stateNode===null){var S=tc,R=p.contextType;typeof R=="object"&&R!==null&&(S=Ar(R)),S=new p(b,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Oy,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=b,S.state=l.memoizedState,S.refs={},ly(l),R=p.contextType,S.context=typeof R=="object"&&R!==null?Ar(R):tc,S.state=l.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Ly(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&&Oy.enqueueReplaceState(S,S.state,null),Vh(l,b,S,w),Kh(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!0}else if(s===null){S=l.stateNode;var U=l.memoizedProps,et=al(p,U);S.props=et;var gt=S.context,St=p.contextType;R=tc,typeof St=="object"&&St!==null&&(R=Ar(St));var Et=p.getDerivedStateFromProps;St=typeof Et=="function"||typeof S.getSnapshotBeforeUpdate=="function",U=l.pendingProps!==U,St||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(U||gt!==R)&&zk(l,S,b,R),Xs=!1;var yt=l.memoizedState;S.state=yt,Vh(l,b,S,w),Kh(),gt=l.memoizedState,U||yt!==gt||Xs?(typeof Et=="function"&&(Ly(l,p,Et,b),gt=l.memoizedState),(et=Xs||$k(l,p,et,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=et):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{S=l.stateNode,cy(s,l),R=l.memoizedProps,St=al(p,R),S.props=St,Et=l.pendingProps,yt=S.context,gt=p.contextType,et=tc,typeof gt=="object"&>!==null&&(et=Ar(gt)),U=p.getDerivedStateFromProps,(gt=typeof U=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==Et||yt!==et)&&zk(l,S,b,et),Xs=!1,yt=l.memoizedState,S.state=yt,Vh(l,b,S,w),Kh();var xt=l.memoizedState;R!==Et||yt!==xt||Xs||s!==null&&s.dependencies!==null&&mf(s.dependencies)?(typeof U=="function"&&(Ly(l,p,U,b),xt=l.memoizedState),(St=Xs||$k(l,p,St,b,yt,xt,et)||s!==null&&s.dependencies!==null&&mf(s.dependencies))?(gt||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(b,xt,et),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(b,xt,et)),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=et,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,jf(s,l),b=(l.flags&128)!==0,S||b?(S=l.stateNode,p=b&&typeof p.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&b?(l.child=rl(l,s.child,null,w),l.child=rl(l,null,p,w)):Mr(s,l,p,w),l.memoizedState=S.state,s=l.child):s=os(s,l,w),s}function ew(s,l,p,b){return Zo(),l.flags|=256,Mr(s,l,p,b),l.child}var Fy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Iy(s){return{baseLanes:s,cachePool:H_()}}function $y(s,l,p){return s=s!==null?s.childLanes&~p:0,l&&(s|=Bn),s}function iw(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:(Ji.current&2)!==0),R&&(w=!0,l.flags&=-129),R=(l.flags&32)!==0,l.flags&=-33,s===null){if(Xe){if(w?Js(l):to(),(s=Ei)?(s=hS(s,Kn),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Gs!==null?{id:Na,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=j_(s),p.return=l,l.child=p,Nr=l,Ei=null)):s=null,s===null)throw Ks(l);return Cb(s)?l.lanes=32:l.lanes=536870912,null}var U=b.children;return b=b.fallback,w?(to(),w=l.mode,U=Df({mode:"hidden",children:U},w),b=Xo(b,w,p,null),U.return=l,b.return=l,U.sibling=b,l.child=U,b=l.child,b.memoizedState=Iy(p),b.childLanes=$y(s,R,p),l.memoizedState=Fy,tu(null,b)):(Js(l),zy(l,U))}var et=s.memoizedState;if(et!==null&&(U=et.dehydrated,U!==null)){if(S)l.flags&256?(Js(l),l.flags&=-257,l=Py(s,l,p)):l.memoizedState!==null?(to(),l.child=s.child,l.flags|=128,l=null):(to(),U=b.fallback,w=l.mode,b=Df({mode:"visible",children:b.children},w),U=Xo(U,w,p,null),U.flags|=2,b.return=l,U.return=l,b.sibling=U,l.child=b,rl(l,s.child,null,p),b=l.child,b.memoizedState=Iy(p),b.childLanes=$y(s,R,p),l.memoizedState=Fy,l=tu(null,b));else if(Js(l),Cb(U)){if(R=U.nextSibling&&U.nextSibling.dataset,R)var gt=R.dgst;R=gt,b=Error(n(419)),b.stack="",b.digest=R,qh({value:b,source:null,stack:null}),l=Py(s,l,p)}else if(lr||nc(s,l,p,!1),R=(p&s.childLanes)!==0,lr||R){if(R=wi,R!==null&&(b=oi(R,p),b!==0&&b!==et.retryLane))throw et.retryLane=b,Vo(s,b),pn(R,s,b),jy;vb(U)||Wf(),l=Py(s,l,p)}else vb(U)?(l.flags|=192,l.child=s.child,l=null):(s=et.treeContext,Ei=Xn(U.nextSibling),Nr=l,Xe=!0,Ys=null,Kn=!1,s!==null&&I_(l,s),l=zy(l,b.children),l.flags|=4096);return l}return w?(to(),U=b.fallback,w=l.mode,et=s.child,gt=et.sibling,b=es(et,{mode:"hidden",children:b.children}),b.subtreeFlags=et.subtreeFlags&65011712,gt!==null?U=es(gt,U):(U=Xo(U,w,p,null),U.flags|=2),U.return=l,b.return=l,b.sibling=U,l.child=b,tu(null,b),b=l.child,U=s.child.memoizedState,U===null?U=Iy(p):(w=U.cachePool,w!==null?(et=sr._currentValue,w=w.parent!==et?{parent:et,pool:et}:w):w=H_(),U={baseLanes:U.baseLanes|p,cachePool:w}),b.memoizedState=U,b.childLanes=$y(s,R,p),l.memoizedState=Fy,tu(s.child,b)):(Js(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 zy(s,l){return l=Df({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Df(s,l){return s=En(22,s,null,l),s.lanes=0,s}function Py(s,l,p){return rl(l,s.child,null,p),s=zy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function rw(s,l,p){s.lanes|=l;var b=s.alternate;b!==null&&(b.lanes|=l),iy(s.return,l,p)}function qy(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 nw(s,l,p){var b=l.pendingProps,w=b.revealOrder,S=b.tail;b=b.children;var R=Ji.current,U=(R&2)!==0;if(U?(R=R&1|2,l.flags|=128):R&=1,ht(Ji,R),Mr(s,l,b,p),b=Xe?Ph:0,!U&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&rw(s,p,l);else if(s.tag===19)rw(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&&wf(s)===null&&(w=p),p=p.sibling;p=w,p===null?(w=l.child,l.child=null):(w=p.sibling,p.sibling=null),qy(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&&wf(s)===null){l.child=w;break}s=w.sibling,w.sibling=p,p=w,w=s}qy(l,!0,p,null,S,b);break;case"together":qy(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),ro|=l.lanes,(p&l.childLanes)===0)if(s!==null){if(nc(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 Uy(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&mf(s)))}function LF(s,l,p){switch(l.tag){case 3:Q(l,l.stateNode.containerInfo),Vs(l,sr,s.memoizedState.cache),Zo();break;case 27:case 5:ot(l);break;case 4:Q(l,l.stateNode.containerInfo);break;case 10:Vs(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,py(l),null;break;case 13:var b=l.memoizedState;if(b!==null)return b.dehydrated!==null?(Js(l),l.flags|=128,null):(p&l.child.childLanes)!==0?iw(s,l,p):(Js(l),s=os(s,l,p),s!==null?s.sibling:null);Js(l);break;case 19:var w=(s.flags&128)!==0;if(b=(p&l.childLanes)!==0,b||(nc(s,l,p,!1),b=(p&l.childLanes)!==0),w){if(b)return nw(s,l,p);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),ht(Ji,Ji.current),b)break;return null;case 22:return l.lanes=0,Xk(s,l,p,l.pendingProps);case 24:Vs(l,sr,s.memoizedState.cache)}return os(s,l,p)}function aw(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps)lr=!0;else{if(!Uy(s,p)&&(l.flags&128)===0)return lr=!1,LF(s,l,p);lr=(s.flags&131072)!==0}else lr=!1,Xe&&(l.flags&1048576)!==0&&F_(l,Ph,l.index);switch(l.lanes=0,l.tag){case 16:t:{var b=l.pendingProps;if(s=el(l.elementType),l.type=s,typeof s=="function")Km(s)?(b=al(s,b),l.tag=1,l=tw(null,l,s,b,p)):(l.tag=0,l=Dy(null,l,s,b,p));else{if(s!=null){var w=s.$$typeof;if(w===A){l.tag=11,l=Yk(null,l,s,b,p);break t}else if(w===N){l.tag=14,l=Kk(null,l,s,b,p);break t}}throw l=z(s)||s,Error(n(306,l,""))}}return l;case 0:return Dy(s,l,l.type,l.pendingProps,p);case 1:return b=l.type,w=al(b,l.pendingProps),tw(s,l,b,w,p);case 3:t:{if(Q(l,l.stateNode.containerInfo),s===null)throw Error(n(387));b=l.pendingProps;var S=l.memoizedState;w=S.element,cy(s,l),Vh(l,b,null,p);var R=l.memoizedState;if(b=R.cache,Vs(l,sr,b),b!==S.cache&&ry(l,[sr],p,!0),Kh(),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=ew(s,l,b,p);break t}else if(b!==w){w=Wn(Error(n(424)),l),qh(w),l=ew(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),Nr=l,Xe=!0,Ys=null,Kn=!0,p=X_(l,null,b,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Zo(),b===w){l=os(s,l,p);break t}Mr(s,l,b,p)}l=l.child}return l;case 26:return jf(s,l),s===null?(p=mS(l.type,null,l.pendingProps,null))?l.memoizedState=p:Xe||(p=l.type,s=l.pendingProps,b=Qf(ct.current).createElement(p),b[ki]=l,b[Wi]=s,Br(b,p,s),li(b),l.stateNode=b):l.memoizedState=mS(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return ot(l),s===null&&Xe&&(b=l.stateNode=fS(l.type,l.pendingProps,ct.current),Nr=l,Kn=!0,w=Ei,lo(l.type)?(_b=w,Ei=Xn(b.firstChild)):Ei=w),Mr(s,l,l.pendingProps.children,p),jf(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Xe&&((w=b=Ei)&&(b=l4(b,l.type,l.pendingProps,Kn),b!==null?(l.stateNode=b,Nr=l,Ei=Xn(b.firstChild),Kn=!1,w=!0):w=!1),w||Ks(l)),ot(l),w=l.type,S=l.pendingProps,R=s!==null?s.memoizedProps:null,b=S.children,yb(w,S)?b=null:R!==null&&yb(w,R)&&(l.flags|=32),l.memoizedState!==null&&(w=my(s,l,kF,null,null,p),gu._currentValue=w),jf(s,l),Mr(s,l,b,p),l.child;case 6:return s===null&&Xe&&((s=p=Ei)&&(p=c4(p,l.pendingProps,Kn),p!==null?(l.stateNode=p,Nr=l,Ei=null,s=!0):s=!1),s||Ks(l)),null;case 13:return iw(s,l,p);case 4:return Q(l,l.stateNode.containerInfo),b=l.pendingProps,s===null?l.child=rl(l,null,b,p):Mr(s,l,b,p),l.child;case 11:return Yk(s,l,l.type,l.pendingProps,p);case 7:return Mr(s,l,l.pendingProps,p),l.child;case 8:return Mr(s,l,l.pendingProps.children,p),l.child;case 12:return Mr(s,l,l.pendingProps.children,p),l.child;case 10:return b=l.pendingProps,Vs(l,l.type,b.value),Mr(s,l,b.children,p),l.child;case 9:return w=l.type._context,b=l.pendingProps.children,Jo(l),w=Ar(w),b=b(w),l.flags|=1,Mr(s,l,b,p),l.child;case 14:return Kk(s,l,l.type,l.pendingProps,p);case 15:return Vk(s,l,l.type,l.pendingProps,p);case 19:return nw(s,l,p);case 31:return BF(s,l,p);case 22:return Xk(s,l,p,l.pendingProps);case 24:return Jo(l),b=Ar(sr),s===null?(w=sy(),w===null&&(w=wi,S=ny(),w.pooledCache=S,S.refCount++,S!==null&&(w.pooledCacheLanes|=p),w=S),l.memoizedState={parent:b,cache:w},ly(l),Vs(l,sr,w)):((s.lanes&p)!==0&&(cy(s,l),Vh(l,null,null,p),Kh()),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),Vs(l,sr,b)):(b=S.cache,Vs(l,sr,b),b!==w.cache&&ry(l,[sr],p,!0))),Mr(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 Hy(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(Lw())s.flags|=8192;else throw il=vf,oy}else s.flags&=-16777217}function sw(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!CS(l))if(Lw())s.flags|=8192;else throw il=vf,oy}function Ff(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?he():536870912,s.lanes|=l,mc|=l)}function eu(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 OF(s,l,p){var b=l.pendingProps;switch(Qm(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(sr),tt(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(rc(l)?ls(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ty())),Ni(l),null;case 26:var w=l.type,S=l.memoizedState;return s===null?(ls(l),S!==null?(Ni(l),sw(l,S)):(Ni(l),Hy(l,w,null,b,p))):S?S!==s.memoizedState?(ls(l),Ni(l),sw(l,S)):(Ni(l),l.flags&=-16777217):(s=s.memoizedProps,s!==b&&ls(l),Ni(l),Hy(l,w,s,b,p)),null;case 27:if(Ct(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=at.current,rc(l)?$_(l):(s=fS(w,b,p),l.stateNode=s,ls(l))}return Ni(l),null;case 5:if(Ct(l),w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==b&&ls(l);else{if(!b){if(l.stateNode===null)throw Error(n(166));return Ni(l),null}if(S=at.current,rc(l))$_(l);else{var R=Qf(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[Wi]=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(Br(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),Hy(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,rc(l)){if(s=l.stateNode,p=l.memoizedProps,b=null,w=Nr,w!==null)switch(w.tag){case 27:case 5:b=w.memoizedProps}s[ki]=l,s=!!(s.nodeValue===p||b!==null&&b.suppressHydrationWarning===!0||iS(s.nodeValue,p)),s||Ks(l,!0)}else s=Qf(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=rc(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 Zo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ni(l),s=!1}else p=ty(),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=rc(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 Zo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ni(l),w=!1}else w=ty(),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),Ff(l,l.updateQueue),Ni(l),null);case 4:return tt(),s===null&&db(l.stateNode.containerInfo),Ni(l),null;case 10:return ns(l.type),Ni(l),null;case 19:if(J(Ji),b=l.memoizedState,b===null)return Ni(l),null;if(w=(l.flags&128)!==0,S=b.rendering,S===null)if(w)eu(b,!1);else{if(Ki!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=wf(s),S!==null){for(l.flags|=128,eu(b,!1),s=S.updateQueue,l.updateQueue=s,Ff(l,s),l.subtreeFlags=0,s=p,p=l.child;p!==null;)R_(p,s),p=p.sibling;return ht(Ji,Ji.current&1|2),Xe&&is(l,b.treeForkCount),l.child}s=s.sibling}b.tail!==null&&fe()>qf&&(l.flags|=128,w=!0,eu(b,!1),l.lanes=4194304)}else{if(!w)if(s=wf(S),s!==null){if(l.flags|=128,w=!0,s=s.updateQueue,l.updateQueue=s,Ff(l,s),eu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!Xe)return Ni(l),null}else 2*fe()-b.renderingStartTime>qf&&p!==536870912&&(l.flags|=128,w=!0,eu(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=Ji.current,ht(Ji,w?p&1|2:p&1),Xe&&is(l,b.treeForkCount),s):(Ni(l),null);case 22:case 23:return An(l),fy(),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&&Ff(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&&J(tl),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ns(sr),Ni(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function RF(s,l){switch(Qm(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ns(sr),tt(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ct(l),null;case 31:if(l.memoizedState!==null){if(An(l),l.alternate===null)throw Error(n(340));Zo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(An(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Zo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return J(Ji),null;case 4:return tt(),null;case 10:return ns(l.type),null;case 22:case 23:return An(l),fy(),s!==null&&J(tl),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return ns(sr),null;case 25:return null;default:return null}}function ow(s,l){switch(Qm(l),l.tag){case 3:ns(sr),tt();break;case 26:case 27:case 5:Ct(l);break;case 4:tt();break;case 31:l.memoizedState!==null&&An(l);break;case 13:An(l);break;case 19:J(Ji);break;case 10:ns(l.type);break;case 22:case 23:An(l),fy(),s!==null&&J(tl);break;case 24:ns(sr)}}function iu(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(U){yi(l,l.return,U)}}function eo(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,U=R.destroy;if(U!==void 0){R.destroy=void 0,w=l;var et=p,gt=U;try{gt()}catch(St){yi(w,et,St)}}}b=b.next}while(b!==S)}}catch(St){yi(l,l.return,St)}}function lw(s){var l=s.updateQueue;if(l!==null){var p=s.stateNode;try{Q_(l,p)}catch(b){yi(s,s.return,b)}}}function cw(s,l,p){p.props=al(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(b){yi(s,l,b)}}function ru(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 hw(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 Wy(s,l,p){try{var b=s.stateNode;i4(b,s.type,p,l),b[Wi]=l}catch(w){yi(s,s.return,w)}}function uw(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&lo(s.type)||s.tag===4}function Gy(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||uw(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&&lo(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 Yy(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&&lo(s.type)&&(p=s.stateNode,l=null),s=s.child,s!==null))for(Yy(s,l,p),s=s.sibling;s!==null;)Yy(s,l,p),s=s.sibling}function If(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&&lo(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(If(s,l,p),s=s.sibling;s!==null;)If(s,l,p),s=s.sibling}function dw(s){var l=s.stateNode,p=s.memoizedProps;try{for(var b=s.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);Br(l,b,p),l[ki]=s,l[Wi]=p}catch(S){yi(s,s.return,S)}}var cs=!1,cr=!1,Ky=!1,fw=typeof WeakSet=="function"?WeakSet:Set,_r=null;function jF(s,l){if(s=s.containerInfo,gb=ap,s=S_(s),Pm(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,U=-1,et=-1,gt=0,St=0,Et=s,yt=null;e:for(;;){for(var xt;Et!==p||w!==0&&Et.nodeType!==3||(U=R+w),Et!==S||b!==0&&Et.nodeType!==3||(et=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&&(U=R),yt===S&&++St===b&&(et=R),(xt=Et.nextSibling)!==null)break;Et=yt,yt=Et.parentNode}Et=xt}p=U===-1||et===-1?null:{start:U,end:et}}else p=null}p=p||{start:0,end:0}}else p=null;for(mb={focusedElem:s,selectionRange:p},ap=!1,_r=l;_r!==null;)if(l=_r,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,_r=s;else for(;_r!==null;){switch(l=_r,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=al(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)xb(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":xb(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,_r=s;break}_r=l.return}}function pw(s,l,p){var b=p.flags;switch(p.tag){case 0:case 11:case 15:us(s,p),b&4&&iu(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=al(p.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(R){yi(p,p.return,R)}}b&64&&lw(p),b&512&&ru(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{Q_(s,l)}catch(R){yi(p,p.return,R)}}break;case 27:l===null&&b&4&&dw(p);case 26:case 5:us(s,p),l===null&&b&4&&hw(p),b&512&&ru(p,p.return);break;case 12:us(s,p);break;case 31:us(s,p),b&4&&yw(s,p);break;case 13:us(s,p),b&4&&bw(s,p),b&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=HF.bind(null,p),h4(s,p))));break;case 22:if(b=p.memoizedState!==null||cs,!b){l=l!==null&&l.memoizedState!==null||cr,w=cs;var S=cr;cs=b,(cr=l)&&!S?ds(s,p,(p.subtreeFlags&8772)!==0):us(s,p),cs=w,cr=S}break;case 30:break;default:us(s,p)}}function gw(s){var l=s.alternate;l!==null&&(s.alternate=null,gw(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;)mw(s,l,p),p=p.sibling}function mw(s,l,p){if(je&&typeof je.onCommitFiberUnmount=="function")try{je.onCommitFiberUnmount($i,p)}catch{}switch(p.tag){case 26:cr||Ma(p,l),hs(s,l,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:cr||Ma(p,l);var b=Ri,w=hn;lo(p.type)&&(Ri=p.stateNode,hn=!1),hs(s,l,p),du(p.stateNode),Ri=b,hn=w;break;case 5:cr||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,lS(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),wc(s)):lS(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:eo(2,p,l),cr||eo(4,p,l),hs(s,l,p);break;case 1:cr||(Ma(p,l),b=p.stateNode,typeof b.componentWillUnmount=="function"&&cw(p,l,b)),hs(s,l,p);break;case 21:hs(s,l,p);break;case 22:cr=(b=cr)||p.memoizedState!==null,hs(s,l,p),cr=b;break;default:hs(s,l,p)}}function yw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{wc(s)}catch(p){yi(l,l.return,p)}}}function bw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{wc(s)}catch(p){yi(l,l.return,p)}}function DF(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new fw),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new fw),l;default:throw Error(n(435,s.tag))}}function $f(s,l){var p=DF(s);l.forEach(function(b){if(!p.has(b)){p.add(b);var w=WF.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,U=R;t:for(;U!==null;){switch(U.tag){case 27:if(lo(U.type)){Ri=U.stateNode,hn=!1;break t}break;case 5:Ri=U.stateNode,hn=!1;break t;case 3:case 4:Ri=U.stateNode.containerInfo,hn=!0;break t}U=U.return}if(Ri===null)throw Error(n(160));mw(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;)xw(l,s),l=l.sibling}var ha=null;function xw(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&&(eo(3,s,s.return),iu(3,s),eo(5,s,s.return));break;case 1:un(l,s),dn(s),b&512&&(cr||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&&(cr||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"))),Br(S,b,p),S[ki]=s,li(S),b=S;break t;case"link":var R=xS("link","href",w).get(b+(p.href||""));if(R){for(var U=0;U<R.length;U++)if(S=R[U],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(U,1);break e}}S=w.createElement(b),Br(S,b,p),w.head.appendChild(S);break;case"meta":if(R=xS("meta","content",w).get(b+(p.content||""))){for(U=0;U<R.length;U++)if(S=R[U],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(U,1);break e}}S=w.createElement(b),Br(S,b,p),w.head.appendChild(S);break;default:throw Error(n(468,b))}S[ki]=s,li(S),b=S}s.stateNode=b}else vS(w,s.type,s.stateNode);else s.stateNode=bS(w,b,s.memoizedProps);else S!==b?(S===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):S.count--,b===null?vS(w,s.type,s.stateNode):bS(w,b,s.memoizedProps)):b===null&&s.stateNode!==null&&Wy(s,s.memoizedProps,p.memoizedProps)}break;case 27:un(l,s),dn(s),b&512&&(cr||p===null||Ma(p,p.return)),p!==null&&b&4&&Wy(s,s.memoizedProps,p.memoizedProps);break;case 5:if(un(l,s),dn(s),b&512&&(cr||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,Wy(s,w,p!==null?p.memoizedProps:w)),b&1024&&(Ky=!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(ep=null,w=ha,ha=Jf(l.containerInfo),un(l,s),ha=w,dn(s),b&4&&p!==null&&p.memoizedState.isDehydrated)try{wc(l.containerInfo)}catch(Vt){yi(s,s.return,Vt)}Ky&&(Ky=!1,vw(s));break;case 4:b=ha,ha=Jf(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,$f(s,b)));break;case 13:un(l,s),dn(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Pf=fe()),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,$f(s,b)));break;case 22:w=s.memoizedState!==null;var et=p!==null&&p.memoizedState!==null,gt=cs,St=cr;if(cs=gt||w,cr=St||et,un(l,s),cr=St,cs=gt,dn(s),b&8192)t:for(l=s.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(p===null||et||cs||cr||sl(s)),p=null,l=s;;){if(l.tag===5||l.tag===26){if(p===null){et=p=l;try{if(S=et.stateNode,w)R=S.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{U=et.stateNode;var Et=et.memoizedProps.style,yt=Et!=null&&Et.hasOwnProperty("display")?Et.display:null;U.style.display=yt==null||typeof yt=="boolean"?"":(""+yt).trim()}}catch(Vt){yi(et,et.return,Vt)}}}else if(l.tag===6){if(p===null){et=l;try{et.stateNode.nodeValue=w?"":et.memoizedProps}catch(Vt){yi(et,et.return,Vt)}}}else if(l.tag===18){if(p===null){et=l;try{var xt=et.stateNode;w?cS(xt,!0):cS(et.stateNode,!1)}catch(Vt){yi(et,et.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,$f(s,p))));break;case 19:un(l,s),dn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,$f(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(uw(b)){p=b;break}b=b.return}if(p==null)throw Error(n(160));switch(p.tag){case 27:var w=p.stateNode,S=Gy(s);If(s,S,w);break;case 5:var R=p.stateNode;p.flags&32&&($t(R,""),p.flags&=-33);var U=Gy(s);If(s,U,R);break;case 3:case 4:var et=p.stateNode.containerInfo,gt=Gy(s);Yy(s,gt,et);break;default:throw Error(n(161))}}catch(St){yi(s,s.return,St)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function vw(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;vw(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;)pw(s,l.alternate,l),l=l.sibling}function sl(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:eo(4,l,l.return),sl(l);break;case 1:Ma(l,l.return);var p=l.stateNode;typeof p.componentWillUnmount=="function"&&cw(l,l.return,p),sl(l);break;case 27:du(l.stateNode);case 26:case 5:Ma(l,l.return),sl(l);break;case 22:l.memoizedState===null&&sl(l);break;case 30:sl(l);break;default:sl(l)}s=s.sibling}}function ds(s,l,p){for(p=p&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var b=l.alternate,w=s,S=l,R=S.flags;switch(S.tag){case 0:case 11:case 15:ds(w,S,p),iu(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 U=b.stateNode;try{var et=w.shared.hiddenCallbacks;if(et!==null)for(w.shared.hiddenCallbacks=null,w=0;w<et.length;w++)Z_(et[w],U)}catch(gt){yi(b,b.return,gt)}}p&&R&64&&lw(S),ru(S,S.return);break;case 27:dw(S);case 26:case 5:ds(w,S,p),p&&b===null&&R&4&&hw(S),ru(S,S.return);break;case 12:ds(w,S,p);break;case 31:ds(w,S,p),p&&R&4&&yw(w,S);break;case 13:ds(w,S,p),p&&R&4&&bw(w,S);break;case 22:S.memoizedState===null&&ds(w,S,p),ru(S,S.return);break;case 30:break;default:ds(w,S,p)}l=l.sibling}}function Vy(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&&Uh(p))}function Xy(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Uh(s))}function ua(s,l,p,b){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Cw(s,l,p,b),l=l.sibling}function Cw(s,l,p,b){var w=l.flags;switch(l.tag){case 0:case 11:case 15:ua(s,l,p,b),w&2048&&iu(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&&Uh(s)));break;case 12:if(w&2048){ua(s,l,p,b),s=l.stateNode;try{var S=l.memoizedProps,R=S.id,U=S.onPostCommit;typeof U=="function"&&U(R,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(et){yi(l,l.return,et)}}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):nu(s,l):S._visibility&2?ua(s,l,p,b):(S._visibility|=2,fc(s,l,p,b,(l.subtreeFlags&10256)!==0||!1)),w&2048&&Vy(R,l);break;case 24:ua(s,l,p,b),w&2048&&Xy(l.alternate,l);break;default:ua(s,l,p,b)}}function fc(s,l,p,b,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,R=l,U=p,et=b,gt=R.flags;switch(R.tag){case 0:case 11:case 15:fc(S,R,U,et,w),iu(8,R);break;case 23:break;case 22:var St=R.stateNode;R.memoizedState!==null?St._visibility&2?fc(S,R,U,et,w):nu(S,R):(St._visibility|=2,fc(S,R,U,et,w)),w&>&2048&&Vy(R.alternate,R);break;case 24:fc(S,R,U,et,w),w&>&2048&&Xy(R.alternate,R);break;default:fc(S,R,U,et,w)}l=l.sibling}}function nu(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:nu(p,b),w&2048&&Vy(b.alternate,b);break;case 24:nu(p,b),w&2048&&Xy(b.alternate,b);break;default:nu(p,b)}l=l.sibling}}var au=8192;function pc(s,l,p){if(s.subtreeFlags&au)for(s=s.child;s!==null;)_w(s,l,p),s=s.sibling}function _w(s,l,p){switch(s.tag){case 26:pc(s,l,p),s.flags&au&&s.memoizedState!==null&&_4(p,ha,s.memoizedState,s.memoizedProps);break;case 5:pc(s,l,p);break;case 3:case 4:var b=ha;ha=Jf(s.stateNode.containerInfo),pc(s,l,p),ha=b;break;case 22:s.memoizedState===null&&(b=s.alternate,b!==null&&b.memoizedState!==null?(b=au,au=16777216,pc(s,l,p),au=b):pc(s,l,p));break;default:pc(s,l,p)}}function kw(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 su(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];_r=b,Sw(b,s)}kw(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ww(s),s=s.sibling}function ww(s){switch(s.tag){case 0:case 11:case 15:su(s),s.flags&2048&&eo(9,s,s.return);break;case 3:su(s);break;case 12:su(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,zf(s)):su(s);break;default:su(s)}}function zf(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];_r=b,Sw(b,s)}kw(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:eo(8,l,l.return),zf(l);break;case 22:p=l.stateNode,p._visibility&2&&(p._visibility&=-3,zf(l));break;default:zf(l)}s=s.sibling}}function Sw(s,l){for(;_r!==null;){var p=_r;switch(p.tag){case 0:case 11:case 15:eo(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:Uh(p.memoizedState.cache)}if(b=p.child,b!==null)b.return=p,_r=b;else t:for(p=s;_r!==null;){b=_r;var w=b.sibling,S=b.return;if(gw(b),b===p){_r=null;break t}if(w!==null){w.return=S,_r=w;break t}_r=S}}}var FF={getCacheForType:function(s){var l=Ar(sr),p=l.data.get(s);return p===void 0&&(p=s(),l.data.set(s,p)),p},cacheSignal:function(){return Ar(sr).controller.signal}},IF=typeof WeakMap=="function"?WeakMap:Map,ai=0,wi=null,Pe=null,Ge=0,mi=0,Mn=null,io=!1,gc=!1,Zy=!1,fs=0,Ki=0,ro=0,ol=0,Qy=0,Bn=0,mc=0,ou=null,fn=null,Jy=!1,Pf=0,Tw=0,qf=1/0,Uf=null,no=null,gr=0,ao=null,yc=null,ps=0,tb=0,eb=null,Ew=null,lu=0,ib=null;function Ln(){return(ai&2)!==0&&Ge!==0?Ge&-Ge:D.T!==null?lb():Gr()}function Nw(){if(Bn===0)if((Ge&536870912)===0||Xe){var s=rr;rr<<=1,(rr&3932160)===0&&(rr=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)&&(bc(s,0),so(s,Ge,Bn,!1)),pe(s,p),((ai&2)===0||s!==wi)&&(s===wi&&((ai&2)===0&&(ol|=p),Ki===4&&so(s,Ge,Bn,!1)),Ba(s))}function Aw(s,l,p){if((ai&6)!==0)throw Error(n(327));var b=!p&&(l&127)===0&&(l&s.expiredLanes)===0||wt(s,l),w=b?PF(s,l):nb(s,l,!0),S=b;do{if(w===0){gc&&!b&&so(s,l,0,!1);break}else{if(p=s.current.alternate,S&&!$F(p)){w=nb(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 U=s;w=ou;var et=U.current.memoizedState.isDehydrated;if(et&&(bc(U,R).flags|=256),R=nb(U,R,!1),R!==2){if(Zy&&!et){U.errorRecoveryDisabledLanes|=S,ol|=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){bc(s,0),so(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:so(b,l,Bn,!io);break t;case 2:fn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(w=Pf+300-fe(),10<w)){if(so(b,l,Bn,!io),it(b,0,!0)!==0)break t;ps=l,b.timeoutHandle=sS(Mw.bind(null,b,p,fn,Uf,Jy,l,Bn,ol,mc,io,S,"Throttled",-0,0),w);break t}Mw(b,p,fn,Uf,Jy,l,Bn,ol,mc,io,S,null,-0,0)}}break}while(!0);Ba(s)}function Mw(s,l,p,b,w,S,R,U,et,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},_w(l,S,Et);var Vt=(S&62914560)===S?Pf-fe():(S&4194048)===S?Tw-fe():0;if(Vt=k4(Et,Vt),Vt!==null){ps=S,s.cancelPendingCommit=Vt(Iw.bind(null,s,l,S,p,b,w,R,U,et,St,Et,null,yt,xt)),so(s,S,R,!gt);return}}Iw(s,l,S,p,b,w,R,U,et)}function $F(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 so(s,l,p,b){l&=~Qy,l&=~ol,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 Hf(){return(ai&6)===0?(cu(0),!1):!0}function rb(){if(Pe!==null){if(mi===0)var s=Pe.return;else s=Pe,rs=Qo=null,xy(s),lc=null,Wh=0,s=Pe;for(;s!==null;)ow(s.alternate,s),s=s.return;Pe=null}}function bc(s,l){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,a4(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),ps=0,rb(),wi=s,Pe=p=es(s.current,null),Ge=l,mi=0,Mn=null,io=!1,gc=wt(s,l),Zy=!1,mc=Bn=Qy=ol=ro=Ki=0,fn=ou=null,Jy=!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,uf(),p}function Bw(s,l){Me=null,D.H=Jh,l===oc||l===xf?(l=Y_(),mi=3):l===oy?(l=Y_(),mi=4):mi=l===jy?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Mn=l,Pe===null&&(Ki=1,Of(s,Wn(l,s.current)))}function Lw(){var s=Nn.current;return s===null?!0:(Ge&4194048)===Ge?Vn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?s===Vn:!1}function Ow(){var s=D.H;return D.H=Jh,s===null?Jh:s}function Rw(){var s=D.A;return D.A=FF,s}function Wf(){Ki=4,io||(Ge&4194048)!==Ge&&Nn.current!==null||(gc=!0),(ro&134217727)===0&&(ol&134217727)===0||wi===null||so(wi,Ge,Bn,!1)}function nb(s,l,p){var b=ai;ai|=2;var w=Ow(),S=Rw();(wi!==s||Ge!==l)&&(Uf=null,bc(s,l)),l=!1;var R=Ki;t:do try{if(mi!==0&&Pe!==null){var U=Pe,et=Mn;switch(mi){case 8:rb(),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,xc(s,U,et,gt),p&&gc){R=0;break t}break;default:gt=mi,mi=0,Mn=null,xc(s,U,et,gt)}}zF(),R=Ki;break}catch(St){Bw(s,St)}while(!0);return l&&s.shellSuspendCounter++,rs=Qo=null,ai=b,D.H=w,D.A=S,Pe===null&&(wi=null,Ge=0,uf()),R}function zF(){for(;Pe!==null;)jw(Pe)}function PF(s,l){var p=ai;ai|=2;var b=Ow(),w=Rw();wi!==s||Ge!==l?(Uf=null,qf=fe()+500,bc(s,l)):gc=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,xc(s,l,S,1);break;case 2:case 9:if(W_(S)){mi=0,Mn=null,Dw(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:W_(S)?(mi=0,Mn=null,Dw(l)):(mi=0,Mn=null,xc(s,l,S,7));break;case 5:var R=null;switch(Pe.tag){case 26:R=Pe.memoizedState;case 5:case 27:var U=Pe;if(R?CS(R):U.stateNode.complete){mi=0,Mn=null;var et=U.sibling;if(et!==null)Pe=et;else{var gt=U.return;gt!==null?(Pe=gt,Gf(gt)):Pe=null}break e}}mi=0,Mn=null,xc(s,l,S,5);break;case 6:mi=0,Mn=null,xc(s,l,S,6);break;case 8:rb(),Ki=6;break t;default:throw Error(n(462))}}qF();break}catch(St){Bw(s,St)}while(!0);return rs=Qo=null,D.H=b,D.A=w,ai=p,Pe!==null?0:(wi=null,Ge=0,uf(),Ki)}function qF(){for(;Pe!==null&&!Li();)jw(Pe)}function jw(s){var l=aw(s.alternate,s,fs);s.memoizedProps=s.pendingProps,l===null?Gf(s):Pe=l}function Dw(s){var l=s,p=l.alternate;switch(l.tag){case 15:case 0:l=Jk(p,l,l.pendingProps,l.type,void 0,Ge);break;case 11:l=Jk(p,l,l.pendingProps,l.type.render,l.ref,Ge);break;case 5:xy(l);default:ow(p,l),l=Pe=R_(l,fs),l=aw(p,l,fs)}s.memoizedProps=s.pendingProps,l===null?Gf(s):Pe=l}function xc(s,l,p,b){rs=Qo=null,xy(l),lc=null,Wh=0;var w=l.return;try{if(MF(s,w,l,p,Ge)){Ki=1,Of(s,Wn(p,s.current)),Pe=null;return}}catch(S){if(w!==null)throw Pe=w,S;Ki=1,Of(s,Wn(p,s.current)),Pe=null;return}l.flags&32768?(Xe||b===1?s=!0:gc||(Ge&536870912)!==0?s=!1:(io=s=!0,(b===2||b===9||b===3||b===6)&&(b=Nn.current,b!==null&&b.tag===13&&(b.flags|=16384))),Fw(l,s)):Gf(l)}function Gf(s){var l=s;do{if((l.flags&32768)!==0){Fw(l,io);return}s=l.return;var p=OF(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);Ki===0&&(Ki=5)}function Fw(s,l){do{var p=RF(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);Ki=6,Pe=null}function Iw(s,l,p,b,w,S,R,U,et){s.cancelPendingCommit=null;do Yf();while(gr!==0);if((ai&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Gm,Wt(s,p,S,R,U,et),s===wi&&(Pe=wi=null,Ge=0),yc=l,ao=s,ps=p,tb=S,eb=w,Ew=b,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,GF(Fe,function(){return Uw(),null})):(s.callbackNode=null,s.callbackPriority=0),b=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||b){b=D.T,D.T=null,w=F.p,F.p=2,R=ai,ai|=4;try{jF(s,l,p)}finally{ai=R,F.p=w,D.T=b}}gr=1,$w(),zw(),Pw()}}function $w(){if(gr===1){gr=0;var s=ao,l=yc,p=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||p){p=D.T,D.T=null;var b=F.p;F.p=2;var w=ai;ai|=4;try{xw(l,s);var S=mb,R=S_(s.containerInfo),U=S.focusedElem,et=S.selectionRange;if(R!==U&&U&&U.ownerDocument&&w_(U.ownerDocument.documentElement,U)){if(et!==null&&Pm(U)){var gt=et.start,St=et.end;if(St===void 0&&(St=gt),"selectionStart"in U)U.selectionStart=gt,U.selectionEnd=Math.min(St,U.value.length);else{var Et=U.ownerDocument||document,yt=Et&&Et.defaultView||window;if(yt.getSelection){var xt=yt.getSelection(),Vt=U.textContent.length,ge=Math.min(et.start,Vt),vi=et.end===void 0?ge:Math.min(et.end,Vt);!xt.extend&&ge>vi&&(R=vi,vi=ge,ge=R);var dt=k_(U,ge),st=k_(U,vi);if(dt&&st&&(xt.rangeCount!==1||xt.anchorNode!==dt.node||xt.anchorOffset!==dt.offset||xt.focusNode!==st.node||xt.focusOffset!==st.offset)){var pt=Et.createRange();pt.setStart(dt.node,dt.offset),xt.removeAllRanges(),ge>vi?(xt.addRange(pt),xt.extend(st.node,st.offset)):(pt.setEnd(st.node,st.offset),xt.addRange(pt))}}}}for(Et=[],xt=U;xt=xt.parentNode;)xt.nodeType===1&&Et.push({element:xt,left:xt.scrollLeft,top:xt.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<Et.length;U++){var Tt=Et[U];Tt.element.scrollLeft=Tt.left,Tt.element.scrollTop=Tt.top}}ap=!!gb,mb=gb=null}finally{ai=w,F.p=b,D.T=p}}s.current=l,gr=2}}function zw(){if(gr===2){gr=0;var s=ao,l=yc,p=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||p){p=D.T,D.T=null;var b=F.p;F.p=2;var w=ai;ai|=4;try{pw(s,l.alternate,l)}finally{ai=w,F.p=b,D.T=p}}gr=3}}function Pw(){if(gr===4||gr===3){gr=0,Ti();var s=ao,l=yc,p=ps,b=Ew;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?gr=5:(gr=0,yc=ao=null,qw(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(no=null),on(p),l=l.stateNode,je&&typeof je.onCommitFiberRoot=="function")try{je.onCommitFiberRoot($i,l,void 0,(l.current.flags&128)===128)}catch{}if(b!==null){l=D.T,w=F.p,F.p=2,D.T=null;try{for(var S=s.onRecoverableError,R=0;R<b.length;R++){var U=b[R];S(U.value,{componentStack:U.stack})}}finally{D.T=l,F.p=w}}(ps&3)!==0&&Yf(),Ba(s),w=s.pendingLanes,(p&261930)!==0&&(w&42)!==0?s===ib?lu++:(lu=0,ib=s):lu=0,cu(0)}}function qw(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Uh(l)))}function Yf(){return $w(),zw(),Pw(),Uw()}function Uw(){if(gr!==5)return!1;var s=ao,l=tb;tb=0;var p=on(ps),b=D.T,w=F.p;try{F.p=32>p?32:p,D.T=null,p=eb,eb=null;var S=ao,R=ps;if(gr=0,yc=ao=null,ps=0,(ai&6)!==0)throw Error(n(331));var U=ai;if(ai|=4,ww(S.current),Cw(S,S.current,R,p),ai=U,cu(0,!1),je&&typeof je.onPostCommitFiberRoot=="function")try{je.onPostCommitFiberRoot($i,S)}catch{}return!0}finally{F.p=w,D.T=b,qw(s,l)}}function Hw(s,l,p){l=Wn(p,l),l=Ry(s.stateNode,l,2),s=Qs(s,l,2),s!==null&&(pe(s,2),Ba(s))}function yi(s,l,p){if(s.tag===3)Hw(s,s,p);else for(;l!==null;){if(l.tag===3){Hw(l,s,p);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(no===null||!no.has(b))){s=Wn(p,s),p=Wk(2),b=Qs(l,p,2),b!==null&&(Gk(p,b,l,s),pe(b,2),Ba(b));break}}l=l.return}}function ab(s,l,p){var b=s.pingCache;if(b===null){b=s.pingCache=new IF;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)||(Zy=!0,w.add(p),s=UF.bind(null,s,l,p),l.then(s,s))}function UF(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&&(Ki===4||Ki===3&&(Ge&62914560)===Ge&&300>fe()-Pf?(ai&2)===0&&bc(s,0):Qy|=p,mc===Ge&&(mc=0)),Ba(s)}function Ww(s,l){l===0&&(l=he()),s=Vo(s,l),s!==null&&(pe(s,l),Ba(s))}function HF(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),Ww(s,p)}function WF(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),Ww(s,p)}function GF(s,l){return ve(s,l)}var Kf=null,vc=null,sb=!1,Vf=!1,ob=!1,oo=0;function Ba(s){s!==vc&&s.next===null&&(vc===null?Kf=vc=s:vc=vc.next=s),Vf=!0,sb||(sb=!0,KF())}function cu(s,l){if(!ob&&Vf){ob=!0;do for(var p=!1,b=Kf;b!==null;){if(s!==0){var w=b.pendingLanes;if(w===0)var S=0;else{var R=b.suspendedLanes,U=b.pingedLanes;S=(1<<31-Be(42|s)+1)-1,S&=w&~(R&~U),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(p=!0,Vw(b,S))}else S=Ge,S=it(b,b===wi?S:0,b.cancelPendingCommit!==null||b.timeoutHandle!==-1),(S&3)===0||wt(b,S)||(p=!0,Vw(b,S));b=b.next}while(p);ob=!1}}function YF(){Gw()}function Gw(){Vf=sb=!1;var s=0;oo!==0&&n4()&&(s=oo);for(var l=fe(),p=null,b=Kf;b!==null;){var w=b.next,S=Yw(b,l);S===0?(b.next=null,p===null?Kf=w:p.next=w,w===null&&(vc=p)):(p=b,(s!==0||(S&3)!==0)&&(Vf=!0)),b=w}gr!==0&&gr!==5||cu(s),oo!==0&&(oo=0)}function Yw(s,l){for(var p=s.suspendedLanes,b=s.pingedLanes,w=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var R=31-Be(S),U=1<<R,et=w[R];et===-1?((U&p)===0||(U&b)!==0)&&(w[R]=jt(U,l)):et<=l&&(s.expiredLanes|=U),S&=~U}if(l=wi,p=Ge,p=it(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=Kw.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 Kw(s,l){if(gr!==0&&gr!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(Yf()&&s.callbackNode!==p)return null;var b=Ge;return b=it(s,s===wi?b:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b===0?null:(Aw(s,b,l),Yw(s,fe()),s.callbackNode!=null&&s.callbackNode===p?Kw.bind(null,s):null)}function Vw(s,l){if(Yf())return null;Aw(s,l,!0)}function KF(){s4(function(){(ai&6)!==0?ve($e,YF):Gw()})}function lb(){if(oo===0){var s=ac;s===0&&(s=Ae,Ae<<=1,(Ae&261888)===0&&(Ae=256)),oo=s}return oo}function Xw(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Hs(""+s)}function Zw(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 VF(s,l,p,b,w){if(l==="submit"&&p&&p.stateNode===w){var S=Xw((w[Wi]||null).action),R=b.submitter;R&&(l=(l=R[Wi]||null)?Xw(l.formAction):R.getAttribute("formAction"),l!==null&&(S=l,R=null));var U=new of("action","action",null,b,w);s.push({event:U,listeners:[{instance:null,listener:function(){if(b.defaultPrevented){if(oo!==0){var et=R?Zw(w,R):new FormData(w);Ny(p,{pending:!0,data:et,method:w.method,action:S},null,et)}}else typeof S=="function"&&(U.preventDefault(),et=R?Zw(w,R):new FormData(w),Ny(p,{pending:!0,data:et,method:w.method,action:S},S,et))},currentTarget:w}]})}}for(var cb=0;cb<Wm.length;cb++){var hb=Wm[cb],XF=hb.toLowerCase(),ZF=hb[0].toUpperCase()+hb.slice(1);ca(XF,"on"+ZF)}ca(N_,"onAnimationEnd"),ca(A_,"onAnimationIteration"),ca(M_,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(fF,"onTransitionRun"),ca(pF,"onTransitionStart"),ca(gF,"onTransitionCancel"),ca(B_,"onTransitionEnd"),ft("onMouseEnter",["mouseout","mouseover"]),ft("onMouseLeave",["mouseout","mouseover"]),ft("onPointerEnter",["pointerout","pointerover"]),ft("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 hu="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(" "),QF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hu));function Qw(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 U=b[R],et=U.instance,gt=U.currentTarget;if(U=U.listener,et!==S&&w.isPropagationStopped())break t;S=U,w.currentTarget=gt;try{S(w)}catch(St){hf(St)}w.currentTarget=null,S=et}else for(R=0;R<b.length;R++){if(U=b[R],et=U.instance,gt=U.currentTarget,U=U.listener,et!==S&&w.isPropagationStopped())break t;S=U,w.currentTarget=gt;try{S(w)}catch(St){hf(St)}w.currentTarget=null,S=et}}}}function qe(s,l){var p=l[In];p===void 0&&(p=l[In]=new Set);var b=s+"__bubble";p.has(b)||(Jw(l,s,2,!1),p.add(b))}function ub(s,l,p){var b=0;l&&(b|=4),Jw(p,s,b,l)}var Xf="_reactListening"+Math.random().toString(36).slice(2);function db(s){if(!s[Xf]){s[Xf]=!0,Kt.forEach(function(p){p!=="selectionchange"&&(QF.has(p)||ub(p,!1,s),ub(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Xf]||(l[Xf]=!0,ub("selectionchange",!1,l))}}function Jw(s,l,p,b){switch(NS(l)){case 2:var w=T4;break;case 8:w=E4;break;default:w=Eb}p=w.bind(null,l,p,s),w=void 0,!Lm||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 fb(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 U=b.stateNode.containerInfo;if(U===w)break;if(R===4)for(R=b.return;R!==null;){var et=R.tag;if((et===3||et===4)&&R.stateNode.containerInfo===w)return;R=R.return}for(;U!==null;){if(R=fr(U),R===null)return;if(et=R.tag,et===5||et===6||et===26||et===27){b=S=R;continue t}U=U.parentNode}}b=b.return}rf(function(){var gt=S,St=Ee(p),Et=[];t:{var yt=L_.get(s);if(yt!==void 0){var xt=of,Vt=s;switch(s){case"keypress":if(af(p)===0)break t;case"keydown":case"keyup":xt=WD;break;case"focusin":Vt="focus",xt=Dm;break;case"focusout":Vt="blur",xt=Dm;break;case"beforeblur":case"afterblur":xt=Dm;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=o_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xt=OD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xt=KD;break;case N_:case A_:case M_:xt=DD;break;case B_:xt=XD;break;case"scroll":case"scrollend":xt=BD;break;case"wheel":xt=QD;break;case"copy":case"cut":case"paste":xt=ID;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xt=c_;break;case"toggle":case"beforetoggle":xt=tF}var ge=(l&4)!==0,vi=!ge&&(s==="scroll"||s==="scrollend"),dt=ge?yt!==null?yt+"Capture":null:yt;ge=[];for(var st=gt,pt;st!==null;){var Tt=st;if(pt=Tt.stateNode,Tt=Tt.tag,Tt!==5&&Tt!==26&&Tt!==27||pt===null||dt===null||(Tt=Lh(st,dt),Tt!=null&&ge.push(uu(st,Tt,pt))),vi)break;st=st.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!==te&&(Vt=p.relatedTarget||p.fromElement)&&(fr(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?fr(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=o_,Tt="onMouseLeave",dt="onMouseEnter",st="mouse",(s==="pointerout"||s==="pointerover")&&(ge=c_,Tt="onPointerLeave",dt="onPointerEnter",st="pointer"),vi=xt==null?yt:ln(xt),pt=Vt==null?yt:ln(Vt),yt=new ge(Tt,st+"leave",xt,p,St),yt.target=vi,yt.relatedTarget=pt,Tt=null,fr(St)===gt&&(ge=new ge(dt,st+"enter",Vt,p,St),ge.target=pt,ge.relatedTarget=vi,Tt=ge),vi=Tt,xt&&Vt)e:{for(ge=JF,dt=xt,st=Vt,pt=0,Tt=dt;Tt;Tt=ge(Tt))pt++;Tt=0;for(var ce=st;ce;ce=ge(ce))Tt++;for(;0<pt-Tt;)dt=ge(dt),pt--;for(;0<Tt-pt;)st=ge(st),Tt--;for(;pt--;){if(dt===st||st!==null&&dt===st.alternate){ge=dt;break e}dt=ge(dt),st=ge(st)}ge=null}else ge=null;xt!==null&&tS(Et,yt,xt,ge,!1),Vt!==null&&vi!==null&&tS(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=y_;else if(g_(yt))if(b_)ti=hF;else{ti=lF;var ee=oF}else xt=yt.nodeName,!xt||xt.toLowerCase()!=="input"||yt.type!=="checkbox"&&yt.type!=="radio"?gt&&Dr(gt.elementType)&&(ti=y_):ti=cF;if(ti&&(ti=ti(s,gt))){m_(Et,ti,p,St);break t}ee&&ee(s,yt,gt),s==="focusout"&>&&yt.type==="number"&>.memoizedProps.value!=null&&Bt(yt,"number",yt.value)}switch(ee=gt?ln(gt):window,s){case"focusin":(g_(ee)||ee.contentEditable==="true")&&(Zl=ee,qm=gt,zh=null);break;case"focusout":zh=qm=Zl=null;break;case"mousedown":Um=!0;break;case"contextmenu":case"mouseup":case"dragend":Um=!1,T_(Et,p,St);break;case"selectionchange":if(dF)break;case"keydown":case"keyup":T_(Et,p,St)}var Oe;if(Im)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 Xl?f_(s,p)&&(Ye="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(Ye="onCompositionStart");Ye&&(h_&&p.locale!=="ko"&&(Xl||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Xl&&(Oe=a_()):(Ws=St,Om="value"in Ws?Ws.value:Ws.textContent,Xl=!0)),ee=Zf(gt,Ye),0<ee.length&&(Ye=new l_(Ye,s,null,p,St),Et.push({event:Ye,listeners:ee}),Oe?Ye.data=Oe:(Oe=p_(p),Oe!==null&&(Ye.data=Oe)))),(Oe=iF?rF(s,p):nF(s,p))&&(Ye=Zf(gt,"onBeforeInput"),0<Ye.length&&(ee=new l_("onBeforeInput","beforeinput",null,p,St),Et.push({event:ee,listeners:Ye}),ee.data=Oe)),VF(Et,s,gt,p,St)}Qw(Et,l)})}function uu(s,l,p){return{instance:s,listener:l,currentTarget:p}}function Zf(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=Lh(s,p),w!=null&&b.unshift(uu(s,w,S)),w=Lh(s,l),w!=null&&b.push(uu(s,w,S))),s.tag===3)return b;s=s.return}return[]}function JF(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function tS(s,l,p,b,w){for(var S=l._reactName,R=[];p!==null&&p!==b;){var U=p,et=U.alternate,gt=U.stateNode;if(U=U.tag,et!==null&&et===b)break;U!==5&&U!==26&&U!==27||gt===null||(et=gt,w?(gt=Lh(p,S),gt!=null&&R.unshift(uu(p,gt,et))):w||(gt=Lh(p,S),gt!=null&&R.push(uu(p,gt,et)))),p=p.return}R.length!==0&&s.push({event:l,listeners:R})}var t4=/\r\n?/g,e4=/\u0000|\uFFFD/g;function eS(s){return(typeof s=="string"?s:""+s).replace(t4,`
|
|
50
|
+
`).replace(e4,"")}function iS(s,l){return l=eS(l),eS(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=Hs(""+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=Hs(""+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=Hs(""+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),ci(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":ci(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,ci(s,p,b))}}function pb(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[Wi]||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,""):ci(s,p,b)}}}function Br(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 U=S=R=w=null,et=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":et=St;break;case"defaultChecked":gt=St;break;case"value":S=St;break;case"defaultValue":U=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,U,et,gt,R,w,!1);return;case"select":qe("invalid",s),b=R=S=null;for(w in p)if(p.hasOwnProperty(w)&&(U=p[w],U!=null))switch(w){case"value":S=U;break;case"defaultValue":R=U;break;case"multiple":b=U;default:xi(s,l,w,U,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)&&(U=p[R],U!=null))switch(R){case"value":b=U;break;case"defaultValue":w=U;break;case"children":S=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(n(91));break;default:xi(s,l,R,U,p,null)}Le(s,b,w,S);return;case"option":for(et in p)if(p.hasOwnProperty(et)&&(b=p[et],b!=null))switch(et){case"selected":s.selected=b&&typeof b!="function"&&typeof b!="symbol";break;default:xi(s,l,et,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<hu.length;b++)qe(hu[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&&pb(s,l,St,b,p,void 0));return}}for(U in p)p.hasOwnProperty(U)&&(b=p[U],b!=null&&xi(s,l,U,b,p,null))}function i4(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,U=null,et=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":et=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":U=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,U,et,gt,St,S,w);return;case"select":xt=R=U=yt=null;for(S in p)if(et=p[S],p.hasOwnProperty(S)&&et!=null)switch(S){case"value":break;case"multiple":xt=et;default:b.hasOwnProperty(S)||xi(s,l,S,null,b,et)}for(w in b)if(S=b[w],et=p[w],b.hasOwnProperty(w)&&(S!=null||et!=null))switch(w){case"value":yt=S;break;case"defaultValue":U=S;break;case"multiple":R=S;default:S!==et&&xi(s,l,w,S,b,et)}l=U,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(U in p)if(w=p[U],p.hasOwnProperty(U)&&w!=null&&!b.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:xi(s,l,U,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(et in b)if(yt=b[et],xt=p[et],b.hasOwnProperty(et)&&yt!==xt&&(yt!=null||xt!=null))switch(et){case"selected":s.selected=yt&&typeof yt!="function"&&typeof yt!="symbol";break;default:xi(s,l,et,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)&&pb(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||pb(s,l,St,yt,b,xt);return}}for(var dt in p)yt=p[dt],p.hasOwnProperty(dt)&&yt!=null&&!b.hasOwnProperty(dt)&&xi(s,l,dt,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 rS(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function r4(){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,U=w.duration;if(S&&U&&rS(R)){for(R=0,U=w.responseEnd,b+=1;b<p.length;b++){var et=p[b],gt=et.startTime;if(gt>U)break;var St=et.transferSize,Et=et.initiatorType;St&&rS(Et)&&(et=et.responseEnd,R+=St*(et<U?1:(U-gt)/(et-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 gb=null,mb=null;function Qf(s){return s.nodeType===9?s:s.ownerDocument}function nS(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 aS(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 yb(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 bb=null;function n4(){var s=window.event;return s&&s.type==="popstate"?s===bb?!1:(bb=s,!0):(bb=null,!1)}var sS=typeof setTimeout=="function"?setTimeout:void 0,a4=typeof clearTimeout=="function"?clearTimeout:void 0,oS=typeof Promise=="function"?Promise:void 0,s4=typeof queueMicrotask=="function"?queueMicrotask:typeof oS<"u"?function(s){return oS.resolve(null).then(s).catch(o4)}:sS;function o4(s){setTimeout(function(){throw s})}function lo(s){return s==="head"}function lS(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),wc(l);return}b--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")b++;else if(p==="html")du(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,du(p);for(var S=p.firstChild;S;){var R=S.nextSibling,U=S.nodeName;S[$n]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&S.rel.toLowerCase()==="stylesheet"||p.removeChild(S),S=R}}else p==="body"&&du(s.ownerDocument.body);p=w}while(p);wc(l)}function cS(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 xb(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":xb(p),Ea(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function l4(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 c4(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 hS(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 vb(s){return s.data==="$?"||s.data==="$~"}function Cb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function h4(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 _b=null;function uS(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 dS(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 fS(s,l,p){switch(l=Qf(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 du(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Ea(s)}var Zn=new Map,pS=new Set;function Jf(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var gs=F.d;F.d={f:u4,r:d4,D:f4,C:p4,L:g4,m:m4,X:b4,S:y4,M:x4};function u4(){var s=gs.f(),l=Hf();return s||l}function d4(s){var l=Yr(s);l!==null&&l.tag===5&&l.type==="form"?Bk(l):gs.r(s)}var Cc=typeof document>"u"?null:document;function gS(s,l,p){var b=Cc;if(b&&typeof l=="string"&&l){var w=Er(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof p=="string"&&(w+='[crossorigin="'+p+'"]'),pS.has(w)||(pS.add(w),s={rel:s,crossOrigin:p,href:l},b.querySelector(w)===null&&(l=b.createElement("link"),Br(l,"link",s),li(l),b.head.appendChild(l)))}}function f4(s){gs.D(s),gS("dns-prefetch",s,null)}function p4(s,l){gs.C(s,l),gS("preconnect",s,l)}function g4(s,l,p){gs.L(s,l,p);var b=Cc;if(b&&s&&l){var w='link[rel="preload"][as="'+Er(l)+'"]';l==="image"&&p&&p.imageSrcSet?(w+='[imagesrcset="'+Er(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(w+='[imagesizes="'+Er(p.imageSizes)+'"]')):w+='[href="'+Er(s)+'"]';var S=w;switch(l){case"style":S=_c(s);break;case"script":S=kc(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(fu(S))||l==="script"&&b.querySelector(pu(S))||(l=b.createElement("link"),Br(l,"link",s),li(l),b.head.appendChild(l)))}}function m4(s,l){gs.m(s,l);var p=Cc;if(p&&s){var b=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+Er(b)+'"][href="'+Er(s)+'"]',S=w;switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=kc(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(pu(S)))return}b=p.createElement("link"),Br(b,"link",s),li(b),p.head.appendChild(b)}}}function y4(s,l,p){gs.S(s,l,p);var b=Cc;if(b&&s){var w=pr(b).hoistableStyles,S=_c(s);l=l||"default";var R=w.get(S);if(!R){var U={loading:0,preload:null};if(R=b.querySelector(fu(S)))U.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},p),(p=Zn.get(S))&&kb(s,p);var et=R=b.createElement("link");li(et),Br(et,"link",s),et._p=new Promise(function(gt,St){et.onload=gt,et.onerror=St}),et.addEventListener("load",function(){U.loading|=1}),et.addEventListener("error",function(){U.loading|=2}),U.loading|=4,tp(R,l,b)}R={type:"stylesheet",instance:R,count:1,state:U},w.set(S,R)}}}function b4(s,l){gs.X(s,l);var p=Cc;if(p&&s){var b=pr(p).hoistableScripts,w=kc(s),S=b.get(w);S||(S=p.querySelector(pu(w)),S||(s=g({src:s,async:!0},l),(l=Zn.get(w))&&wb(s,l),S=p.createElement("script"),li(S),Br(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function x4(s,l){gs.M(s,l);var p=Cc;if(p&&s){var b=pr(p).hoistableScripts,w=kc(s),S=b.get(w);S||(S=p.querySelector(pu(w)),S||(s=g({src:s,async:!0,type:"module"},l),(l=Zn.get(w))&&wb(s,l),S=p.createElement("script"),li(S),Br(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function mS(s,l,p,b){var w=(w=ct.current)?Jf(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=pr(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=pr(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(fu(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||v4(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=kc(p),p=pr(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="'+Er(s)+'"'}function fu(s){return'link[rel="stylesheet"]['+s+"]"}function yS(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function v4(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}),Br(l,"link",p),li(l),s.head.appendChild(l))}function kc(s){return'[src="'+Er(s)+'"]'}function pu(s){return"script[async]"+s}function bS(s,l,p){if(l.count++,l.instance===null)switch(l.type){case"style":var b=s.querySelector('style[data-href~="'+Er(p.href)+'"]');if(b)return l.instance=b,li(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"),li(b),Br(b,"style",w),tp(b,p.precedence,s),l.instance=b;case"stylesheet":w=_c(p.href);var S=s.querySelector(fu(w));if(S)return l.state.loading|=4,l.instance=S,li(S),S;b=yS(p),(w=Zn.get(w))&&kb(b,w),S=(s.ownerDocument||s).createElement("link"),li(S);var R=S;return R._p=new Promise(function(U,et){R.onload=U,R.onerror=et}),Br(S,"link",b),l.state.loading|=4,tp(S,p.precedence,s),l.instance=S;case"script":return S=kc(p.src),(w=s.querySelector(pu(S)))?(l.instance=w,li(w),w):(b=p,(w=Zn.get(S))&&(b=g({},p),wb(b,w)),s=s.ownerDocument||s,w=s.createElement("script"),li(w),Br(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,tp(b,p.precedence,s));return l.instance}function tp(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 U=b[R];if(U.dataset.precedence===l)S=U;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 kb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function wb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var ep=null;function xS(s,l,p){if(ep===null){var b=new Map,w=ep=new Map;w.set(p,b)}else w=ep,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 U=b.get(R);U?U.push(S):b.set(R,[S])}}return b}function vS(s,l,p){s=s.ownerDocument||s,s.head.insertBefore(p,l==="title"?s.querySelector("head > title"):null)}function C4(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 CS(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function _4(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(fu(w));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=ip.bind(s),l.then(s,s)),p.state.loading|=4,p.instance=S,li(S);return}S=l.ownerDocument||l,b=yS(b),(w=Zn.get(w))&&kb(b,w),S=S.createElement("link"),li(S);var R=S;R._p=new Promise(function(U,et){R.onload=U,R.onerror=et}),Br(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=ip.bind(s),l.addEventListener("load",p),l.addEventListener("error",p))}}var Sb=0;function k4(s,l){return s.stylesheets&&s.count===0&&np(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var b=setTimeout(function(){if(s.stylesheets&&np(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&Sb===0&&(Sb=62500*r4());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&np(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>Sb?50:800)+l);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(b),clearTimeout(w)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var rp=null;function np(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,rp=new Map,l.forEach(w4,s),rp=null,ip.call(s))}function w4(s,l){if(!(l.state.loading&4)){var p=rp.get(s);if(p)var b=p.get(null);else{p=new Map,rp.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=ip.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 gu={$$typeof:E,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function S4(s,l,p,b,w,S,R,U,et){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=si(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=si(0),this.hiddenUpdates=si(null),this.identifierPrefix=b,this.onUncaughtError=w,this.onCaughtError=S,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=et,this.incompleteTransitions=new Map}function _S(s,l,p,b,w,S,R,U,et,gt,St,Et){return s=new S4(s,l,p,R,et,gt,St,Et,U),l=1,S===!0&&(l|=24),S=En(3,null,null,l),s.current=S,S.stateNode=s,l=ny(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:b,isDehydrated:p,cache:l},ly(S),s}function kS(s){return s?(s=tc,s):tc}function wS(s,l,p,b,w,S){w=kS(w),b.context===null?b.context=w:b.pendingContext=w,b=Zs(l),b.payload={element:p},S=S===void 0?null:S,S!==null&&(b.callback=S),p=Qs(s,b,l),p!==null&&(pn(p,s,l),Yh(p,s,l))}function SS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function Tb(s,l){SS(s,l),(s=s.alternate)&&SS(s,l)}function TS(s){if(s.tag===13||s.tag===31){var l=Vo(s,67108864);l!==null&&pn(l,s,67108864),Tb(s,67108864)}}function ES(s){if(s.tag===13||s.tag===31){var l=Ln();l=gi(l);var p=Vo(s,l);p!==null&&pn(p,s,l),Tb(s,l)}}var ap=!0;function T4(s,l,p,b){var w=D.T;D.T=null;var S=F.p;try{F.p=2,Eb(s,l,p,b)}finally{F.p=S,D.T=w}}function E4(s,l,p,b){var w=D.T;D.T=null;var S=F.p;try{F.p=8,Eb(s,l,p,b)}finally{F.p=S,D.T=w}}function Eb(s,l,p,b){if(ap){var w=Nb(b);if(w===null)fb(s,l,b,sp,p),AS(s,b);else if(A4(w,s,l,p,b))b.stopPropagation();else if(AS(s,b),l&4&&-1<N4.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=Hi(S.pendingLanes);if(R!==0){var U=S;for(U.pendingLanes|=2,U.entangledLanes|=2;R;){var et=1<<31-Be(R);U.entanglements[1]|=et,R&=~et}Ba(S),(ai&6)===0&&(qf=fe()+500,cu(0))}}break;case 31:case 13:U=Vo(S,2),U!==null&&pn(U,S,2),Hf(),Tb(S,2)}if(S=Nb(b),S===null&&fb(s,l,b,sp,p),S===w)break;w=S}w!==null&&b.stopPropagation()}else fb(s,l,b,null,p)}}function Nb(s){return s=Ee(s),Ab(s)}var sp=null;function Ab(s){if(sp=null,s=fr(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 sp=s,null}function NS(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(Ci()){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 Mb=!1,co=null,ho=null,uo=null,mu=new Map,yu=new Map,fo=[],N4="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 AS(s,l){switch(s){case"focusin":case"focusout":co=null;break;case"dragenter":case"dragleave":ho=null;break;case"mouseover":case"mouseout":uo=null;break;case"pointerover":case"pointerout":mu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":yu.delete(l.pointerId)}}function bu(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&&TS(l)),s):(s.eventSystemFlags|=b,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function A4(s,l,p,b,w){switch(l){case"focusin":return co=bu(co,s,l,p,b,w),!0;case"dragenter":return ho=bu(ho,s,l,p,b,w),!0;case"mouseover":return uo=bu(uo,s,l,p,b,w),!0;case"pointerover":var S=w.pointerId;return mu.set(S,bu(mu.get(S)||null,s,l,p,b,w)),!0;case"gotpointercapture":return S=w.pointerId,yu.set(S,bu(yu.get(S)||null,s,l,p,b,w)),!0}return!1}function MS(s){var l=fr(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,nr(s.priority,function(){ES(p)});return}}else if(l===31){if(l=h(p),l!==null){s.blockedOn=l,nr(s.priority,function(){ES(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 op(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=Nb(s.nativeEvent);if(p===null){p=s.nativeEvent;var b=new p.constructor(p.type,p);te=b,p.target.dispatchEvent(b),te=null}else return l=Yr(p),l!==null&&TS(l),s.blockedOn=p,!1;l.shift()}return!0}function BS(s,l,p){op(s)&&p.delete(l)}function M4(){Mb=!1,co!==null&&op(co)&&(co=null),ho!==null&&op(ho)&&(ho=null),uo!==null&&op(uo)&&(uo=null),mu.forEach(BS),yu.forEach(BS)}function lp(s,l){s.blockedOn===l&&(s.blockedOn=null,Mb||(Mb=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,M4)))}var cp=null;function LS(s){cp!==s&&(cp=s,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){cp===s&&(cp=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(Ab(b||p)===null)continue;break}var S=Yr(p);S!==null&&(s.splice(l,3),l-=3,Ny(S,{pending:!0,data:w,method:p.method,action:b},b,w))}}))}function wc(s){function l(et){return lp(et,s)}co!==null&&lp(co,s),ho!==null&&lp(ho,s),uo!==null&&lp(uo,s),mu.forEach(l),yu.forEach(l);for(var p=0;p<fo.length;p++){var b=fo[p];b.blockedOn===s&&(b.blockedOn=null)}for(;0<fo.length&&(p=fo[0],p.blockedOn===null);)MS(p),p.blockedOn===null&&fo.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[Wi]||null;if(typeof S=="function")R||LS(p);else if(R){var U=null;if(S&&S.hasAttribute("formAction")){if(w=S,R=S[Wi]||null)U=R.formAction;else if(Ab(w)!==null)continue}else U=R.action;typeof U=="function"?p[b+1]=U:(p.splice(b,3),b-=3),LS(p)}}}function OS(){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 Bb(s){this._internalRoot=s}hp.prototype.render=Bb.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var p=l.current,b=Ln();wS(p,b,s,l,null,null)},hp.prototype.unmount=Bb.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;wS(s.current,2,null,s,null,null),Hf(),l[kn]=null}};function hp(s){this._internalRoot=s}hp.prototype.unstable_scheduleHydration=function(s){if(s){var l=Gr();s={blockedOn:null,target:s,priority:l};for(var p=0;p<fo.length&&l!==0&&l<fo[p].priority;p++);fo.splice(p,0,s),p===0&&MS(s)}};var RS=e.version;if(RS!=="19.2.4")throw Error(n(527,RS,"19.2.4"));F.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 B4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var up=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!up.isDisabled&&up.supportsFiber)try{$i=up.inject(B4),je=up}catch{}}return vu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var p=!1,b="",w=Pk,S=qk,R=Uk;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=_S(s,1,!1,null,null,p,b,null,w,S,R,OS),s[kn]=l.current,db(s),new Bb(l)},vu.hydrateRoot=function(s,l,p){if(!a(s))throw Error(n(299));var b=!1,w="",S=Pk,R=qk,U=Uk,et=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&&(U=p.onRecoverableError),p.formState!==void 0&&(et=p.formState)),l=_S(s,1,!0,l,p??null,b,w,et,S,R,U,OS),l.context=kS(null),p=l.current,b=Ln(),b=gi(b),w=Zs(b),w.callback=null,Qs(p,w,b),p=b,l.current.lanes=p,pe(l,p),Ba(l),s[kn]=l.current,db(s),new hp(l)},vu.version="19.2.4",vu}var WS;function H4(){if(WS)return jb.exports;WS=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(),jb.exports=U4(),jb.exports}var W4=H4(),Sh=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(){}},G4={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},Co,v1,HA,Y4=(HA=class{constructor(){oe(this,Co,G4);oe(this,v1,!1)}setTimeoutProvider(i){Ht(this,Co,i)}setTimeout(i,e){return rt(this,Co).setTimeout(i,e)}clearTimeout(i){rt(this,Co).clearTimeout(i)}setInterval(i,e){return rt(this,Co).setInterval(i,e)}clearInterval(i){rt(this,Co).clearInterval(i)}},Co=new WeakMap,v1=new WeakMap,HA),ml=new Y4;function K4(i){setTimeout(i,0)}var Ol=typeof window>"u"||"Deno"in globalThis;function Zr(){}function V4(i,e){return typeof i=="function"?i(e):i}function Sx(i){return typeof i=="number"&&i>=0&&i!==1/0}function iM(i,e){return Math.max(i+(e||0)-Date.now(),0)}function Lo(i,e){return typeof i=="function"?i(e):i}function ra(i,e){return typeof i=="function"?i(e):i}function GS(i,e){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=i;if(c){if(n){if(e.queryHash!==_1(c,e.options))return!1}else if(!md(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 YS(i,e){const{exact:r,status:n,predicate:a,mutationKey:o}=i;if(o){if(!e.options.mutationKey)return!1;if(r){if(Rl(e.options.mutationKey)!==Rl(o))return!1}else if(!md(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function _1(i,e){return((e==null?void 0:e.queryKeyHashFn)||Rl)(i)}function Rl(i){return JSON.stringify(i,(e,r)=>Tx(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function md(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(r=>md(i[r],e[r])):!1}var X4=Object.prototype.hasOwnProperty;function rM(i,e,r=0){if(i===e)return i;if(r>500)return e;const n=KS(i)&&KS(e);if(!n&&!(Tx(i)&&Tx(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:X4.call(i,g))&&d++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[g]=y;continue}const v=rM(x,y,r+1);u[g]=v,v===x&&d++}return o===h&&d===o?i:u}function rg(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 KS(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function Tx(i){if(!VS(i))return!1;const e=i.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!VS(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function VS(i){return Object.prototype.toString.call(i)==="[object Object]"}function Z4(i){return new Promise(e=>{ml.setTimeout(e,i)})}function Ex(i,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(i,e):r.structuralSharing!==!1?rM(i,e):e}function Q4(i,e,r=0){const n=[...i,e];return r&&n.length>r?n.slice(1):n}function J4(i,e,r=0){const n=[e,...i];return r&&n.length>r?n.slice(0,-1):n}var k1=Symbol();function nM(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===k1?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function w1(i,e){return typeof i=="function"?i(...e):!!i}function tI(i,e,r){let n=!1,a;return Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),i}var Cl,_o,Wc,WA,eI=(WA=class extends Sh{constructor(){super();oe(this,Cl);oe(this,_o);oe(this,Wc);Ht(this,Wc,e=>{if(!Ol&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){rt(this,_o)||this.setEventListener(rt(this,Wc))}onUnsubscribe(){var e;this.hasListeners()||((e=rt(this,_o))==null||e.call(this),Ht(this,_o,void 0))}setEventListener(e){var r;Ht(this,Wc,e),(r=rt(this,_o))==null||r.call(this),Ht(this,_o,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){rt(this,Cl)!==e&&(Ht(this,Cl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof rt(this,Cl)=="boolean"?rt(this,Cl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Cl=new WeakMap,_o=new WeakMap,Wc=new WeakMap,WA),S1=new eI;function Nx(){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 iI=K4;function rI(){let i=[],e=0,r=h=>{h()},n=h=>{h()},a=iI;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 yr=rI(),Gc,ko,Yc,GA,nI=(GA=class extends Sh{constructor(){super();oe(this,Gc,!0);oe(this,ko);oe(this,Yc);Ht(this,Yc,e=>{if(!Ol&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){rt(this,ko)||this.setEventListener(rt(this,Yc))}onUnsubscribe(){var e;this.hasListeners()||((e=rt(this,ko))==null||e.call(this),Ht(this,ko,void 0))}setEventListener(e){var r;Ht(this,Yc,e),(r=rt(this,ko))==null||r.call(this),Ht(this,ko,e(this.setOnline.bind(this)))}setOnline(e){rt(this,Gc)!==e&&(Ht(this,Gc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return rt(this,Gc)}},Gc=new WeakMap,ko=new WeakMap,Yc=new WeakMap,GA),ng=new nI;function aI(i){return Math.min(1e3*2**i,3e4)}function aM(i){return(i??"online")==="online"?ng.isOnline():!0}var Ax=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function sM(i){let e=!1,r=0,n;const a=Nx(),o=()=>a.status!=="pending",c=C=>{var _;if(!o()){const k=new Ax(C);x(k),(_=i.onCancel)==null||_.call(i,k)}},h=()=>{e=!0},u=()=>{e=!1},d=()=>S1.isFocused()&&(i.networkMode==="always"||ng.isOnline())&&i.canRun(),f=()=>aM(i.networkMode)&&i.canRun(),g=C=>{o()||(n==null||n(),a.resolve(C))},x=C=>{o()||(n==null||n(),a.reject(C))},y=()=>new Promise(C=>{var _;n=k=>{(o()||d())&&C(k)},(_=i.onPause)==null||_.call(i)}).then(()=>{var C;n=void 0,o()||(C=i.onContinue)==null||C.call(i)}),v=()=>{if(o())return;let C;const _=r===0?i.initialPromise:void 0;try{C=_??i.fn()}catch(k){C=Promise.reject(k)}Promise.resolve(C).then(g).catch(k=>{var L;if(o())return;const T=i.retry??(Ol?0:3),E=i.retryDelay??aI,A=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++,(L=i.onFail)==null||L.call(i,r,k),Z4(A).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,YA,oM=(YA=class{constructor(){oe(this,_l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sx(this.gcTime)&&Ht(this,_l,ml.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(Ol?1/0:300*1e3))}clearGcTimeout(){rt(this,_l)&&(ml.clearTimeout(rt(this,_l)),Ht(this,_l,void 0))}},_l=new WeakMap,YA),kl,Kc,ia,wl,kr,Od,Sl,fa,Cs,KA,sI=(KA=class extends oM{constructor(e){super();oe(this,fa);oe(this,kl);oe(this,Kc);oe(this,ia);oe(this,wl);oe(this,kr);oe(this,Od);oe(this,Sl);Ht(this,Sl,!1),Ht(this,Od,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ht(this,wl,e.client),Ht(this,ia,rt(this,wl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ht(this,kl,ZS(this.options)),this.state=e.state??rt(this,kl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=rt(this,kr))==null?void 0:e.promise}setOptions(e){if(this.options={...rt(this,Od),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=ZS(this.options);r.data!==void 0&&(this.setState(XS(r.data,r.dataUpdatedAt)),Ht(this,kl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&rt(this,ia).remove(this)}setData(e,r){const n=Ex(this.state.data,e,this.options);return De(this,fa,Cs).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){De(this,fa,Cs).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,a;const r=(n=rt(this,kr))==null?void 0:n.promise;return(a=rt(this,kr))==null||a.cancel(e),r?r.then(Zr).catch(Zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(rt(this,kl))}isActive(){return this.observers.some(e=>ra(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Lo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!iM(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=rt(this,kr))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=rt(this,kr))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),rt(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||(rt(this,kr)&&(rt(this,Sl)?rt(this,kr).cancel({revert:!0}):rt(this,kr).cancelRetry()),this.scheduleGc()),rt(this,ia).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,fa,Cs).call(this,{type:"invalidate"})}async fetch(e,r){var u,d,f,g,x,y,v,C,_,k,T,E;if(this.state.fetchStatus!=="idle"&&((u=rt(this,kr))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(rt(this,kr))return rt(this,kr).continueRetry(),rt(this,kr).promise}if(e&&this.setOptions(e),!this.options.queryFn){const A=this.observers.find(B=>B.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Ht(this,Sl,!0),n.signal)})},o=()=>{const A=nM(this.options,r),L=(()=>{const N={client:rt(this,wl),queryKey:this.queryKey,meta:this.meta};return a(N),N})();return Ht(this,Sl,!1),this.options.persister?this.options.persister(A,L,this):A(L)},h=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:rt(this,wl),state:this.state,fetchFn:o};return a(A),A})();(d=this.options.behavior)==null||d.onFetch(h,this),Ht(this,Kc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=h.fetchOptions)==null?void 0:f.meta))&&De(this,fa,Cs).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Ht(this,kr,sM({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,onCancel:A=>{A instanceof Ax&&A.revert&&this.setState({...rt(this,Kc),fetchStatus:"idle"}),n.abort()},onFail:(A,B)=>{De(this,fa,Cs).call(this,{type:"failed",failureCount:A,error:B})},onPause:()=>{De(this,fa,Cs).call(this,{type:"pause"})},onContinue:()=>{De(this,fa,Cs).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const A=await rt(this,kr).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(y=(x=rt(this,ia).config).onSuccess)==null||y.call(x,A,this),(C=(v=rt(this,ia).config).onSettled)==null||C.call(v,A,this.state.error,this),A}catch(A){if(A instanceof Ax){if(A.silent)return rt(this,kr).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw De(this,fa,Cs).call(this,{type:"error",error:A}),(k=(_=rt(this,ia).config).onError)==null||k.call(_,A,this),(E=(T=rt(this,ia).config).onSettled)==null||E.call(T,this.state.data,A,this),A}finally{this.scheduleGc()}}},kl=new WeakMap,Kc=new WeakMap,ia=new WeakMap,wl=new WeakMap,kr=new WeakMap,Od=new WeakMap,Sl=new WeakMap,fa=new WeakSet,Cs=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...lM(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...XS(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ht(this,Kc,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),yr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),rt(this,ia).notify({query:this,type:"updated",action:e})})},KA);function lM(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aM(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function XS(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ZS(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,Rd,Xr,Tl,Vc,Ss,wo,jd,Xc,Zc,El,Nl,So,Qc,di,Gu,Mx,Bx,Lx,Ox,Rx,jx,Dx,cM,VA,oI=(VA=class extends Sh{constructor(e,r){super();oe(this,di);oe(this,mn);oe(this,Ze);oe(this,Rd);oe(this,Xr);oe(this,Tl);oe(this,Vc);oe(this,Ss);oe(this,wo);oe(this,jd);oe(this,Xc);oe(this,Zc);oe(this,El);oe(this,Nl);oe(this,So);oe(this,Qc,new Set);this.options=r,Ht(this,mn,e),Ht(this,wo,null),Ht(this,Ss,Nx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(rt(this,Ze).addObserver(this),QS(rt(this,Ze),this.options)?De(this,di,Gu).call(this):this.updateResult(),De(this,di,Ox).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fx(rt(this,Ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fx(rt(this,Ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,di,Rx).call(this),De(this,di,jx).call(this),rt(this,Ze).removeObserver(this)}setOptions(e){const r=this.options,n=rt(this,Ze);if(this.options=rt(this,mn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ra(this.options.enabled,rt(this,Ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,di,Dx).call(this),rt(this,Ze).setOptions(this.options),r._defaulted&&!rg(this.options,r)&&rt(this,mn).getQueryCache().notify({type:"observerOptionsUpdated",query:rt(this,Ze),observer:this});const a=this.hasListeners();a&&JS(rt(this,Ze),n,this.options,r)&&De(this,di,Gu).call(this),this.updateResult(),a&&(rt(this,Ze)!==n||ra(this.options.enabled,rt(this,Ze))!==ra(r.enabled,rt(this,Ze))||Lo(this.options.staleTime,rt(this,Ze))!==Lo(r.staleTime,rt(this,Ze)))&&De(this,di,Mx).call(this);const o=De(this,di,Bx).call(this);a&&(rt(this,Ze)!==n||ra(this.options.enabled,rt(this,Ze))!==ra(r.enabled,rt(this,Ze))||o!==rt(this,So))&&De(this,di,Lx).call(this,o)}getOptimisticResult(e){const r=rt(this,mn).getQueryCache().build(rt(this,mn),e),n=this.createResult(r,e);return cI(this,n)&&(Ht(this,Xr,n),Ht(this,Vc,this.options),Ht(this,Tl,rt(this,Ze).state)),n}getCurrentResult(){return rt(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&&rt(this,Ss).status==="pending"&&rt(this,Ss).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){rt(this,Qc).add(e)}getCurrentQuery(){return rt(this,Ze)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=rt(this,mn).defaultQueryOptions(e),n=rt(this,mn).getQueryCache().build(rt(this,mn),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return De(this,di,Gu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),rt(this,Xr)))}createResult(e,r){var I;const n=rt(this,Ze),a=this.options,o=rt(this,Xr),c=rt(this,Tl),h=rt(this,Vc),d=e!==n?e.state:rt(this,Rd),{state:f}=e;let g={...f},x=!1,y;if(r._optimisticResults){const j=this.hasListeners(),P=!j&&QS(e,r),W=j&&JS(e,n,r,a);(P||W)&&(g={...g,...lM(f.data,e.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:C,status:_}=g;y=g.data;let k=!1;if(r.placeholderData!==void 0&&y===void 0&&_==="pending"){let j;o!=null&&o.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?(j=o.data,k=!0):j=typeof r.placeholderData=="function"?r.placeholderData((I=rt(this,Zc))==null?void 0:I.state.data,rt(this,Zc)):r.placeholderData,j!==void 0&&(_="success",y=Ex(o==null?void 0:o.data,j,r),x=!0)}if(r.select&&y!==void 0&&!k)if(o&&y===(c==null?void 0:c.data)&&r.select===rt(this,jd))y=rt(this,Xc);else try{Ht(this,jd,r.select),y=r.select(y),y=Ex(o==null?void 0:o.data,y,r),Ht(this,Xc,y),Ht(this,wo,null)}catch(j){Ht(this,wo,j)}rt(this,wo)&&(v=rt(this,wo),y=rt(this,Xc),C=Date.now(),_="error");const T=g.fetchStatus==="fetching",E=_==="pending",A=_==="error",B=E&&T,L=y!==void 0,M={status:_,fetchStatus:g.fetchStatus,isPending:E,isSuccess:_==="success",isError:A,isInitialLoading:B,isLoading:B,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:T,isRefetching:T&&!E,isLoadingError:A&&!L,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:A&&L,isStale:T1(e,r),refetch:this.refetch,promise:rt(this,Ss),isEnabled:ra(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const j=M.data!==void 0,P=M.status==="error"&&!j,W=G=>{P?G.reject(M.error):j&&G.resolve(M.data)},K=()=>{const G=Ht(this,Ss,M.promise=Nx());W(G)},z=rt(this,Ss);switch(z.status){case"pending":e.queryHash===n.queryHash&&W(z);break;case"fulfilled":(P||M.data!==z.value)&&K();break;case"rejected":(!P||M.error!==z.reason)&&K();break}}return M}updateResult(){const e=rt(this,Xr),r=this.createResult(rt(this,Ze),this.options);if(Ht(this,Tl,rt(this,Ze).state),Ht(this,Vc,this.options),rt(this,Tl).data!==void 0&&Ht(this,Zc,rt(this,Ze)),rg(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&&!rt(this,Qc).size)return!0;const c=new Set(o??rt(this,Qc));return this.options.throwOnError&&c.add("error"),Object.keys(rt(this,Xr)).some(h=>{const u=h;return rt(this,Xr)[u]!==e[u]&&c.has(u)})};De(this,di,cM).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,di,Ox).call(this)}},mn=new WeakMap,Ze=new WeakMap,Rd=new WeakMap,Xr=new WeakMap,Tl=new WeakMap,Vc=new WeakMap,Ss=new WeakMap,wo=new WeakMap,jd=new WeakMap,Xc=new WeakMap,Zc=new WeakMap,El=new WeakMap,Nl=new WeakMap,So=new WeakMap,Qc=new WeakMap,di=new WeakSet,Gu=function(e){De(this,di,Dx).call(this);let r=rt(this,Ze).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Zr)),r},Mx=function(){De(this,di,Rx).call(this);const e=Lo(this.options.staleTime,rt(this,Ze));if(Ol||rt(this,Xr).isStale||!Sx(e))return;const n=iM(rt(this,Xr).dataUpdatedAt,e)+1;Ht(this,El,ml.setTimeout(()=>{rt(this,Xr).isStale||this.updateResult()},n))},Bx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(rt(this,Ze)):this.options.refetchInterval)??!1},Lx=function(e){De(this,di,jx).call(this),Ht(this,So,e),!(Ol||ra(this.options.enabled,rt(this,Ze))===!1||!Sx(rt(this,So))||rt(this,So)===0)&&Ht(this,Nl,ml.setInterval(()=>{(this.options.refetchIntervalInBackground||S1.isFocused())&&De(this,di,Gu).call(this)},rt(this,So)))},Ox=function(){De(this,di,Mx).call(this),De(this,di,Lx).call(this,De(this,di,Bx).call(this))},Rx=function(){rt(this,El)&&(ml.clearTimeout(rt(this,El)),Ht(this,El,void 0))},jx=function(){rt(this,Nl)&&(ml.clearInterval(rt(this,Nl)),Ht(this,Nl,void 0))},Dx=function(){const e=rt(this,mn).getQueryCache().build(rt(this,mn),this.options);if(e===rt(this,Ze))return;const r=rt(this,Ze);Ht(this,Ze,e),Ht(this,Rd,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},cM=function(e){yr.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(rt(this,Xr))}),rt(this,mn).getQueryCache().notify({query:rt(this,Ze),type:"observerResultsUpdated"})})},VA);function lI(i,e){return ra(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function QS(i,e){return lI(i,e)||i.state.data!==void 0&&Fx(i,e,e.refetchOnMount)}function Fx(i,e,r){if(ra(e.enabled,i)!==!1&&Lo(e.staleTime,i)!=="static"){const n=typeof r=="function"?r(i):r;return n==="always"||n!==!1&&T1(i,e)}return!1}function JS(i,e,r,n){return(i!==e||ra(n.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&T1(i,r)}function T1(i,e){return ra(e.enabled,i)!==!1&&i.isStaleByTime(Lo(e.staleTime,i))}function cI(i,e){return!rg(i.getCurrentResult(),e)}function t2(i){return{onFetch:(e,r)=>{var f,g,x,y,v;const n=e.options,a=(x=(g=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],c=((v=e.state.data)==null?void 0:v.pageParams)||[];let h={pages:[],pageParams:[]},u=0;const d=async()=>{let C=!1;const _=E=>{tI(E,()=>e.signal,()=>C=!0)},k=nM(e.options,e.fetchOptions),T=async(E,A,B)=>{if(C)return Promise.reject();if(A==null&&E.pages.length)return Promise.resolve(E);const N=(()=>{const P={client:e.client,queryKey:e.queryKey,pageParam:A,direction:B?"backward":"forward",meta:e.options.meta};return _(P),P})(),M=await k(N),{maxPages:I}=e.options,j=B?J4:Q4;return{pages:j(E.pages,M,I),pageParams:j(E.pageParams,A,I)}};if(a&&o.length){const E=a==="backward",A=E?hI:e2,B={pages:o,pageParams:c},L=A(n,B);h=await T(B,L,E)}else{const E=i??o.length;do{const A=u===0?c[0]??n.initialPageParam:e2(n,h);if(u>0&&A==null)break;h=await T(h,A),u++}while(u<E)}return h};e.options.persister?e.fetchFn=()=>{var C,_;return(_=(C=e.options).persister)==null?void 0:_.call(C,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=d}}}function e2(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 hI(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 Dd,Pa,qr,Al,qa,yo,XA,uI=(XA=class extends oM{constructor(e){super();oe(this,qa);oe(this,Dd);oe(this,Pa);oe(this,qr);oe(this,Al);Ht(this,Dd,e.client),this.mutationId=e.mutationId,Ht(this,qr,e.mutationCache),Ht(this,Pa,[]),this.state=e.state||hM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){rt(this,Pa).includes(e)||(rt(this,Pa).push(e),this.clearGcTimeout(),rt(this,qr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ht(this,Pa,rt(this,Pa).filter(r=>r!==e)),this.scheduleGc(),rt(this,qr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){rt(this,Pa).length||(this.state.status==="pending"?this.scheduleGc():rt(this,qr).remove(this))}continue(){var e;return((e=rt(this,Al))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,h,u,d,f,g,x,y,v,C,_,k,T,E,A,B,L,N;const r=()=>{De(this,qa,yo).call(this,{type:"continue"})},n={client:rt(this,Dd),meta:this.options.meta,mutationKey:this.options.mutationKey};Ht(this,Al,sM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,I)=>{De(this,qa,yo).call(this,{type:"failed",failureCount:M,error:I})},onPause:()=>{De(this,qa,yo).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>rt(this,qr).canRun(this)}));const a=this.state.status==="pending",o=!rt(this,Al).canStart();try{if(a)r();else{De(this,qa,yo).call(this,{type:"pending",variables:e,isPaused:o}),rt(this,qr).config.onMutate&&await rt(this,qr).config.onMutate(e,this,n);const I=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));I!==this.state.context&&De(this,qa,yo).call(this,{type:"pending",context:I,variables:e,isPaused:o})}const M=await rt(this,Al).start();return await((d=(u=rt(this,qr).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=rt(this,qr).config).onSettled)==null?void 0:y.call(x,M,null,this.state.variables,this.state.context,this,n)),await((C=(v=this.options).onSettled)==null?void 0:C.call(v,M,null,e,this.state.context,n)),De(this,qa,yo).call(this,{type:"success",data:M}),M}catch(M){try{await((k=(_=rt(this,qr).config).onError)==null?void 0:k.call(_,M,e,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((E=(T=this.options).onError)==null?void 0:E.call(T,M,e,this.state.context,n))}catch(I){Promise.reject(I)}try{await((B=(A=rt(this,qr).config).onSettled)==null?void 0:B.call(A,void 0,M,this.state.variables,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((N=(L=this.options).onSettled)==null?void 0:N.call(L,void 0,M,e,this.state.context,n))}catch(I){Promise.reject(I)}throw De(this,qa,yo).call(this,{type:"error",error:M}),M}finally{rt(this,qr).runNext(this)}}},Dd=new WeakMap,Pa=new WeakMap,qr=new WeakMap,Al=new WeakMap,qa=new WeakSet,yo=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),yr.batch(()=>{rt(this,Pa).forEach(n=>{n.onMutationUpdate(e)}),rt(this,qr).notify({mutation:this,type:"updated",action:e})})},XA);function hM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ts,pa,Fd,ZA,dI=(ZA=class extends Sh{constructor(e={}){super();oe(this,Ts);oe(this,pa);oe(this,Fd);this.config=e,Ht(this,Ts,new Set),Ht(this,pa,new Map),Ht(this,Fd,0)}build(e,r,n){const a=new uI({client:e,mutationCache:this,mutationId:++dp(this,Fd)._,options:e.defaultMutationOptions(r),state:n});return this.add(a),a}add(e){rt(this,Ts).add(e);const r=fp(e);if(typeof r=="string"){const n=rt(this,pa).get(r);n?n.push(e):rt(this,pa).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(rt(this,Ts).delete(e)){const r=fp(e);if(typeof r=="string"){const n=rt(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&&rt(this,pa).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=fp(e);if(typeof r=="string"){const n=rt(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=fp(e);if(typeof r=="string"){const a=(n=rt(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(){yr.batch(()=>{rt(this,Ts).forEach(e=>{this.notify({type:"removed",mutation:e})}),rt(this,Ts).clear(),rt(this,pa).clear()})}getAll(){return Array.from(rt(this,Ts))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>YS(r,n))}findAll(e={}){return this.getAll().filter(r=>YS(e,r))}notify(e){yr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return yr.batch(()=>Promise.all(e.map(r=>r.continue().catch(Zr))))}},Ts=new WeakMap,pa=new WeakMap,Fd=new WeakMap,ZA);function fp(i){var e;return(e=i.options.scope)==null?void 0:e.id}var Es,To,yn,Ns,js,zp,Ix,QA,fI=(QA=class extends Sh{constructor(r,n){super();oe(this,js);oe(this,Es);oe(this,To);oe(this,yn);oe(this,Ns);Ht(this,Es,r),this.setOptions(n),this.bindMethods(),De(this,js,zp).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=rt(this,Es).defaultMutationOptions(r),rg(this.options,n)||rt(this,Es).getMutationCache().notify({type:"observerOptionsUpdated",mutation:rt(this,yn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Rl(n.mutationKey)!==Rl(this.options.mutationKey)?this.reset():((a=rt(this,yn))==null?void 0:a.state.status)==="pending"&&rt(this,yn).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=rt(this,yn))==null||r.removeObserver(this)}onMutationUpdate(r){De(this,js,zp).call(this),De(this,js,Ix).call(this,r)}getCurrentResult(){return rt(this,To)}reset(){var r;(r=rt(this,yn))==null||r.removeObserver(this),Ht(this,yn,void 0),De(this,js,zp).call(this),De(this,js,Ix).call(this)}mutate(r,n){var a;return Ht(this,Ns,n),(a=rt(this,yn))==null||a.removeObserver(this),Ht(this,yn,rt(this,Es).getMutationCache().build(rt(this,Es),this.options)),rt(this,yn).addObserver(this),rt(this,yn).execute(r)}},Es=new WeakMap,To=new WeakMap,yn=new WeakMap,Ns=new WeakMap,js=new WeakSet,zp=function(){var n;const r=((n=rt(this,yn))==null?void 0:n.state)??hM();Ht(this,To,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Ix=function(r){yr.batch(()=>{var n,a,o,c,h,u,d,f;if(rt(this,Ns)&&this.hasListeners()){const g=rt(this,To).variables,x=rt(this,To).context,y={client:rt(this,Es),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(a=(n=rt(this,Ns)).onSuccess)==null||a.call(n,r.data,g,x,y)}catch(v){Promise.reject(v)}try{(c=(o=rt(this,Ns)).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=rt(this,Ns)).onError)==null||u.call(h,r.error,g,x,y)}catch(v){Promise.reject(v)}try{(f=(d=rt(this,Ns)).onSettled)==null||f.call(d,void 0,r.error,g,x,y)}catch(v){Promise.reject(v)}}}this.listeners.forEach(g=>{g(rt(this,To))})})},QA),Ua,JA,pI=(JA=class extends Sh{constructor(e={}){super();oe(this,Ua);this.config=e,Ht(this,Ua,new Map)}build(e,r,n){const a=r.queryKey,o=r.queryHash??_1(a,r);let c=this.get(o);return c||(c=new sI({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){rt(this,Ua).has(e.queryHash)||(rt(this,Ua).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=rt(this,Ua).get(e.queryHash);r&&(e.destroy(),r===e&&rt(this,Ua).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){yr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return rt(this,Ua).get(e)}getAll(){return[...rt(this,Ua).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>GS(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>GS(e,n)):r}notify(e){yr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){yr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){yr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ua=new WeakMap,JA),Zi,Eo,No,Jc,th,Ao,eh,ih,tM,gI=(tM=class{constructor(i={}){oe(this,Zi);oe(this,Eo);oe(this,No);oe(this,Jc);oe(this,th);oe(this,Ao);oe(this,eh);oe(this,ih);Ht(this,Zi,i.queryCache||new pI),Ht(this,Eo,i.mutationCache||new dI),Ht(this,No,i.defaultOptions||{}),Ht(this,Jc,new Map),Ht(this,th,new Map),Ht(this,Ao,0)}mount(){dp(this,Ao)._++,rt(this,Ao)===1&&(Ht(this,eh,S1.subscribe(async i=>{i&&(await this.resumePausedMutations(),rt(this,Zi).onFocus())})),Ht(this,ih,ng.subscribe(async i=>{i&&(await this.resumePausedMutations(),rt(this,Zi).onOnline())})))}unmount(){var i,e;dp(this,Ao)._--,rt(this,Ao)===0&&((i=rt(this,eh))==null||i.call(this),Ht(this,eh,void 0),(e=rt(this,ih))==null||e.call(this),Ht(this,ih,void 0))}isFetching(i){return rt(this,Zi).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return rt(this,Eo).findAll({...i,status:"pending"}).length}getQueryData(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=rt(this,Zi).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),r=rt(this,Zi).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(i):(i.revalidateIfStale&&r.isStaleByTime(Lo(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(i){return rt(this,Zi).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=rt(this,Zi).get(n.queryHash),o=a==null?void 0:a.state.data,c=V4(e,o);if(c!==void 0)return rt(this,Zi).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(i,e,r){return yr.batch(()=>rt(this,Zi).findAll(i).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=rt(this,Zi).get(e.queryHash))==null?void 0:r.state}removeQueries(i){const e=rt(this,Zi);yr.batch(()=>{e.findAll(i).forEach(r=>{e.remove(r)})})}resetQueries(i,e){const r=rt(this,Zi);return yr.batch(()=>(r.findAll(i).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...i},e)))}cancelQueries(i,e={}){const r={revert:!0,...e},n=yr.batch(()=>rt(this,Zi).findAll(i).map(a=>a.cancel(r)));return Promise.all(n).then(Zr).catch(Zr)}invalidateQueries(i,e={}){return yr.batch(()=>(rt(this,Zi).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=yr.batch(()=>rt(this,Zi).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=rt(this,Zi).build(this,e);return r.isStaleByTime(Lo(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(Zr).catch(Zr)}fetchInfiniteQuery(i){return i.behavior=t2(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(Zr).catch(Zr)}ensureInfiniteQueryData(i){return i.behavior=t2(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return ng.isOnline()?rt(this,Eo).resumePausedMutations():Promise.resolve()}getQueryCache(){return rt(this,Zi)}getMutationCache(){return rt(this,Eo)}getDefaultOptions(){return rt(this,No)}setDefaultOptions(i){Ht(this,No,i)}setQueryDefaults(i,e){rt(this,Jc).set(Rl(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...rt(this,Jc).values()],r={};return e.forEach(n=>{md(i,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(i,e){rt(this,th).set(Rl(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...rt(this,th).values()],r={};return e.forEach(n=>{md(i,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(i){if(i._defaulted)return i;const e={...rt(this,No).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=_1(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===k1&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...rt(this,No).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){rt(this,Zi).clear(),rt(this,Eo).clear()}},Zi=new WeakMap,Eo=new WeakMap,No=new WeakMap,Jc=new WeakMap,th=new WeakMap,Ao=new WeakMap,eh=new WeakMap,ih=new WeakMap,tM),uM=Y.createContext(void 0),Ui=i=>{const e=Y.useContext(uM);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},i2=({client:i,children:e})=>(Y.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),m.jsx(uM.Provider,{value:i,children:e})),dM=Y.createContext(!1),mI=()=>Y.useContext(dM);dM.Provider;function yI(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var bI=Y.createContext(yI()),xI=()=>Y.useContext(bI),vI=(i,e,r)=>{const n=r!=null&&r.state.error&&typeof i.throwOnError=="function"?w1(i.throwOnError,[r.state.error,r]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},CI=i=>{Y.useEffect(()=>{i.clearReset()},[i])},_I=({result:i,errorResetBoundary:e,throwOnError:r,query:n,suspense:a})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(a&&i.data===void 0||w1(r,[i.error,n])),kI=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))}},wI=(i,e)=>i.isLoading&&i.isFetching&&!e,SI=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,r2=(i,e,r)=>e.fetchOptimistic(i).catch(()=>{r.clearReset()});function TI(i,e,r){var x,y,v,C;const n=mI(),a=xI(),o=Ui(),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",kI(c),vI(c,a,h),CI(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(_=>{const k=g?d.subscribe(yr.batchCalls(_)):Zr;return d.updateResult(),k},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Y.useEffect(()=>{d.setOptions(c)},[c,d]),SI(c,f))throw r2(c,d,a);if(_I({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw f.error;if((C=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||C.call(v,c,f),c.experimental_prefetchInRender&&!Ol&&wI(f,n)){const _=u?r2(c,d,a):h==null?void 0:h.promise;_==null||_.catch(Zr).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?f:d.trackResult(f)}function ri(i,e){return TI(i,oI)}function ir(i,e){const r=Ui(),[n]=Y.useState(()=>new fI(r,i));Y.useEffect(()=>{n.setOptions(i)},[n,i]);const a=Y.useSyncExternalStore(Y.useCallback(c=>n.subscribe(yr.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=Y.useCallback((c,h)=>{n.mutate(c,h).catch(Zr)},[n]);if(a.error&&w1(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const EI="/api";let $x=null;function fM(i){$x=i}class NI{async request(e,r){const n={"Content-Type":"application/json",...r==null?void 0:r.headers};$x&&(n["X-Dreamcontext-Vault"]=$x);const a=await fetch(`${EI}${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 Xt=new NI;function AI(){return ri({queryKey:["launcher-defaults"],queryFn:()=>Xt.get("/launcher/defaults"),staleTime:1/0})}function MI(){const i=Ui();return ir({mutationFn:e=>Xt.post("/launcher/scaffold",e),onSuccess:()=>{i.invalidateQueries({queryKey:["vaults"]})}})}function BI(){return ri({queryKey:["launcher-catalog"],queryFn:()=>Xt.get("/launcher/catalog"),staleTime:1/0})}async function LI(i){return Xt.get(`/launcher/detect?path=${encodeURIComponent(i)}`)}function OI(){return ri({queryKey:["launcher-status"],queryFn:()=>Xt.get("/launcher/status")})}function pM(){const i=Ui();return ir({mutationFn:e=>Xt.post("/launcher/update",{name:e}),onSuccess:()=>{i.invalidateQueries({queryKey:["launcher-status"]}),i.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function RI(){const i=Ui();return ir({mutationFn:e=>Xt.post("/launcher/unregister",{name:e}),onSuccess:()=>{i.invalidateQueries({queryKey:["vaults"]}),i.invalidateQueries({queryKey:["launcher-status"]}),i.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function jI(){return ri({queryKey:["launcher-federation-graph"],queryFn:()=>Xt.get("/launcher/federation-graph")})}function DI(){const i=Ui();return ir({mutationFn:e=>Xt.post("/launcher/connection",e),onSuccess:()=>{i.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function FI(){const i=Ui();return ir({mutationFn:e=>Xt.post("/launcher/connection/remove",e),onSuccess:()=>{i.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function II(){const i=Ui();return ir({mutationFn:e=>Xt.post("/launcher/shareable",e),onSuccess:()=>{i.invalidateQueries({queryKey:["launcher-federation-graph"]}),i.invalidateQueries({queryKey:["launcher-status"]})}})}const $I="modulepreload",zI=function(i){return"/"+i},n2={},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=zI(d),d in n2)return;n2[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":$I,f||(x.as="script"),x.crossOrigin="",x.href=d,u&&x.setAttribute("nonce",u),document.head.appendChild(x),f)return new Promise((y,v)=>{x.addEventListener("load",y),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return a.then(c=>{for(const h of c||[])h.status==="rejected"&&o(h.reason);return e().catch(o)})};function Po(){return!!window.__TAURI_INTERNALS__}async function PI(){if(Po()){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 qI(i){if(Po()){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")}const UI=["name","description","targetUser","stack","priority","platforms","packs","review"],HI=["path","description","targetUser","stack","priority","platforms","packs","review"],WI=["path","platforms","packs","review"],$b={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 GI({onClose:i,onReady:e}){const r=AI(),n=BI(),a=MI(),[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,A]=Y.useState(""),[B,L]=Y.useState(""),[N,M]=Y.useState(""),[I,j]=Y.useState(""),[P,W]=Y.useState(""),[K,z]=Y.useState(""),[G,D]=Y.useState(["claude"]),[F,q]=Y.useState([]),[X,nt]=Y.useState(!1),H=Y.useRef(null);function J(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)&&A(r.data.defaultParent)},[o,E,r.data]);const ht=o==="existing"?X?WI:HI:UI,at=ht[h];Y.useEffect(()=>{var zt;(zt=H.current)==null||zt.focus()},[at,o]);function vt(zt){c(zt),u(0),f(null)}async function ct(zt){f(null);const ye=await PI();if(ye){if(zt==="parent"){A(ye);return}L(ye);try{const Ne=await LI(ye);T(Ne.name),!P&&Ne.stack&&W(Ne.stack),nt(Ne.hasContext),u(1)}catch(Ne){f(Ne instanceof Error?Ne.message:String(Ne))}}}const Z=Y.useMemo(()=>at==="name"?k.trim().length>0&&E.trim().length>0:at==="path"?B.trim().length>0:!0,[at,k,E,B]);function Q(){f(null),h<ht.length-1&&u(zt=>zt+1)}function tt(){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=N.trim()||void 0,zt.targetUser=I.trim()||void 0,zt.stack=P.trim()||void 0,zt.priority=K.trim()||void 0,zt.platforms=G.length>0?G:void 0,zt.packs=F.length>0?F: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 Ct="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(Ct),_(!0),setTimeout(()=>_(!1),1500)}catch{f("Could not copy to clipboard.")}}function Dt(zt,ye,Ne){return m.jsx("input",{ref:H,type:"text",className:"wiz-input",value:zt,placeholder:Ne,onChange:ve=>ye(ve.target.value),onKeyDown:ve=>{ve.key==="Enter"&&Z&&Q()}})}function qt(){var Ti,fe,Ci;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:Ct}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:At,children:C?"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:()=>vt("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:()=>vt("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(at==="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(at==="name")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:$b.name.label}),m.jsx("p",{className:"wiz-hint",children:$b.name.hint}),Dt(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=>A($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(at==="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}),N.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Description"}),m.jsx("dd",{children:N.trim()})]}),I.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"For"}),m.jsx("dd",{children:I.trim()})]}),P.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Stack"}),m.jsx("dd",{children:P.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:(G.length>0?G:["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(", ")}),F.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Skill packs"}),m.jsx("dd",{children:F.join(", ")})]})]})]});if(at==="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=G.includes(Ue.id);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${Fe?" wiz-select-on":""}`,onClick:()=>J(G,D,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)})}),G.length===0&&m.jsx("p",{className:"wiz-hint wiz-preview",children:"Nothing selected — defaults to Claude."})]})}if(at==="packs"){const $e=((Ci=n.data)==null?void 0:Ci.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=F.includes(Ue.name);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${Fe?" wiz-select-on":""}`,onClick:()=>J(F,q,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=$b[at],Ne={description:[N,M,"A persistent brain for AI agents…"],targetUser:[I,j,"Developers"],stack:[P,W,"TypeScript, React, Node…"],priority:[K,z,"Initial setup"]},[ve,pi,Li]=Ne[at];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:ye.label}),m.jsx("p",{className:"wiz-hint",children:ye.hint}),Dt(ve,pi,Li)]})}const Rt=at==="review",Gt=o!==null&&at!=="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:tt,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:Q,disabled:!Z,children:"Next"})]})]})})}function YI(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 KI(i,e,r){return e=i$(e),e in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function a2(i,e){return ZI(i)||YI(i,e)||gM(i,e)||t$()}function VI(i){return XI(i)||QI(i)||gM(i)||JI()}function XI(i){if(Array.isArray(i))return zx(i)}function ZI(i){if(Array.isArray(i))return i}function QI(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function gM(i,e){if(i){if(typeof i=="string")return zx(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 zx(i,e)}}function zx(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 JI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
51
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
52
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e$(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 i$(i){var e=e$(i,"string");return typeof e=="symbol"?e:String(e)}var r$=function(e,r){var n=new Set(r);return Object.assign.apply(Object,[{}].concat(VI(Object.entries(e).filter(function(a){var o=a2(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=a2(a,2),c=o[0],h=o[1];return KI({},c,h)}))))};function Px(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 n$(i){if(Array.isArray(i))return i}function a$(i){if(Array.isArray(i))return Px(i)}function s$(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function o$(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 l$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
53
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
54
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h$(i,e){return n$(i)||o$(i,e)||mM(i,e)||l$()}function s2(i){return a$(i)||s$(i)||mM(i)||c$()}function mM(i,e){if(i){if(typeof i=="string")return Px(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)?Px(i,e):void 0}}function u$(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 _=Object.fromEntries(d.filter(function(k){return f.hasOwnProperty(k)}).map(function(k){return[k,f[k]]}));return i(_)},[]);o2(function(){y(o(x.current))},Y.useLayoutEffect),o2(function(){return y._destructor instanceof Function?y._destructor:void 0});var v=Y.useCallback(function(_){for(var k=arguments.length,T=new Array(k>1?k-1:0),E=1;E<k;E++)T[E-1]=arguments[E];return y[_]instanceof Function?y[_].apply(y,T):void 0},[y]),C=Y.useRef({});return Object.keys(r$(f,[].concat(s2(h),s2(d)))).filter(function(_){return C.current[_]!==f[_]}).forEach(function(_){return v(_,f[_])}),C.current=f,Y.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(_){return[_,function(){for(var k=arguments.length,T=new Array(k),E=0;E<k;E++)T[E]=arguments[E];return v.apply(void 0,[_].concat(T))}]}))},[v]),eM.createElement(n,{ref:x})})}function o2(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=h$(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 qx="http://www.w3.org/1999/xhtml";const l2={svg:"http://www.w3.org/2000/svg",xhtml:qx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qg(i){var e=i+="",r=e.indexOf(":");return r>=0&&(e=i.slice(0,r))!=="xmlns"&&(i=i.slice(r+1)),l2.hasOwnProperty(e)?{space:l2[e],local:i}:i}function d$(i){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===qx&&e.documentElement.namespaceURI===qx?e.createElement(i):e.createElementNS(r,i)}}function f$(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function yM(i){var e=Qg(i);return(e.local?f$:d$)(e)}function p$(){}function E1(i){return i==null?p$:function(){return this.querySelector(i)}}function g$(i){typeof i!="function"&&(i=E1(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 m$(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function y$(){return[]}function bM(i){return i==null?y$:function(){return this.querySelectorAll(i)}}function b$(i){return function(){return m$(i.apply(this,arguments))}}function x$(i){typeof i=="function"?i=b$(i):i=bM(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 xM(i){return function(){return this.matches(i)}}function vM(i){return function(e){return e.matches(i)}}var v$=Array.prototype.find;function C$(i){return function(){return v$.call(this.children,i)}}function _$(){return this.firstElementChild}function k$(i){return this.select(i==null?_$:C$(typeof i=="function"?i:vM(i)))}var w$=Array.prototype.filter;function S$(){return Array.from(this.children)}function T$(i){return function(){return w$.call(this.children,i)}}function E$(i){return this.selectAll(i==null?S$:T$(typeof i=="function"?i:vM(i)))}function N$(i){typeof i!="function"&&(i=xM(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 CM(i){return new Array(i.length)}function A$(){return new Fn(this._enter||this._groups.map(CM),this._parents)}function ag(i,e){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=e}ag.prototype={constructor:ag,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 M$(i){return function(){return i}}function B$(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 ag(i,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function L$(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 ag(i,o[h]);for(h=0;h<f;++h)(u=e[h])&&d.get(x[h])===u&&(a[h]=u)}function O$(i){return i.__data__}function R$(i,e){if(!arguments.length)return Array.from(this,O$);var r=e?L$:B$,n=this._parents,a=this._groups;typeof i!="function"&&(i=M$(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=j$(i.call(f,f&&f.__data__,d,n)),v=y.length,C=h[d]=new Array(v),_=c[d]=new Array(v),k=u[d]=new Array(x);r(f,g,C,_,k,y,e);for(var T=0,E=0,A,B;T<v;++T)if(A=C[T]){for(T>=E&&(E=T+1);!(B=_[E])&&++E<v;);A._next=B||null}}return c=new Fn(c,n),c._enter=h,c._exit=u,c}function j$(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function D$(){return new Fn(this._exit||this._groups.map(CM),this._parents)}function F$(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 I$(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 $$(){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 z$(i){i||(i=P$);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 P$(i,e){return i<e?-1:i>e?1:i>=e?0:NaN}function q$(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function U$(){return Array.from(this)}function H$(){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 W$(){let i=0;for(const e of this)++i;return i}function G$(){return!this.node()}function Y$(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 K$(i){return function(){this.removeAttribute(i)}}function V$(i){return function(){this.removeAttributeNS(i.space,i.local)}}function X$(i,e){return function(){this.setAttribute(i,e)}}function Z$(i,e){return function(){this.setAttributeNS(i.space,i.local,e)}}function Q$(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(i):this.setAttribute(i,r)}}function J$(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 t6(i,e){var r=Qg(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?V$:K$:typeof e=="function"?r.local?J$:Q$:r.local?Z$:X$)(r,e))}function _M(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function e6(i){return function(){this.style.removeProperty(i)}}function i6(i,e,r){return function(){this.style.setProperty(i,e,r)}}function r6(i,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(i):this.style.setProperty(i,n,r)}}function n6(i,e,r){return arguments.length>1?this.each((e==null?e6:typeof e=="function"?r6:i6)(i,e,r??"")):yh(this.node(),i)}function yh(i,e){return i.style.getPropertyValue(e)||_M(i).getComputedStyle(i,null).getPropertyValue(e)}function a6(i){return function(){delete this[i]}}function s6(i,e){return function(){this[i]=e}}function o6(i,e){return function(){var r=e.apply(this,arguments);r==null?delete this[i]:this[i]=r}}function l6(i,e){return arguments.length>1?this.each((e==null?a6:typeof e=="function"?o6:s6)(i,e)):this.node()[i]}function kM(i){return i.trim().split(/^|\s+/)}function N1(i){return i.classList||new wM(i)}function wM(i){this._node=i,this._names=kM(i.getAttribute("class")||"")}wM.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 SM(i,e){for(var r=N1(i),n=-1,a=e.length;++n<a;)r.add(e[n])}function TM(i,e){for(var r=N1(i),n=-1,a=e.length;++n<a;)r.remove(e[n])}function c6(i){return function(){SM(this,i)}}function h6(i){return function(){TM(this,i)}}function u6(i,e){return function(){(e.apply(this,arguments)?SM:TM)(this,i)}}function d6(i,e){var r=kM(i+"");if(arguments.length<2){for(var n=N1(this.node()),a=-1,o=r.length;++a<o;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?u6:e?c6:h6)(r,e))}function f6(){this.textContent=""}function p6(i){return function(){this.textContent=i}}function g6(i){return function(){var e=i.apply(this,arguments);this.textContent=e??""}}function m6(i){return arguments.length?this.each(i==null?f6:(typeof i=="function"?g6:p6)(i)):this.node().textContent}function y6(){this.innerHTML=""}function b6(i){return function(){this.innerHTML=i}}function x6(i){return function(){var e=i.apply(this,arguments);this.innerHTML=e??""}}function v6(i){return arguments.length?this.each(i==null?y6:(typeof i=="function"?x6:b6)(i)):this.node().innerHTML}function C6(){this.nextSibling&&this.parentNode.appendChild(this)}function _6(){return this.each(C6)}function k6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function w6(){return this.each(k6)}function S6(i){var e=typeof i=="function"?i:yM(i);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function T6(){return null}function E6(i,e){var r=typeof i=="function"?i:yM(i),n=e==null?T6:typeof e=="function"?e:E1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function N6(){var i=this.parentNode;i&&i.removeChild(this)}function A6(){return this.each(N6)}function M6(){var i=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function B6(){var i=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function L6(i){return this.select(i?B6:M6)}function O6(i){return arguments.length?this.property("__data__",i):this.node().__data__}function R6(i){return function(e){i.call(this,e,this.__data__)}}function j6(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 D6(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 F6(i,e,r){return function(){var n=this.__on,a,o=R6(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 I6(i,e,r){var n=j6(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?F6:D6,a=0;a<o;++a)this.each(h(n[a],e,r));return this}function EM(i,e,r){var n=_M(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 $6(i,e){return function(){return EM(this,i,e)}}function z6(i,e){return function(){return EM(this,i,e.apply(this,arguments))}}function P6(i,e){return this.each((typeof e=="function"?z6:$6)(i,e))}function*q6(){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 NM=[null];function Fn(i,e){this._groups=i,this._parents=e}function $d(){return new Fn([[document.documentElement]],NM)}function U6(){return this}Fn.prototype=$d.prototype={constructor:Fn,select:g$,selectAll:x$,selectChild:k$,selectChildren:E$,filter:N$,data:R$,enter:A$,exit:D$,join:F$,merge:I$,selection:U6,order:$$,sort:z$,call:q$,nodes:U$,node:H$,size:W$,empty:G$,each:Y$,attr:t6,style:n6,property:l6,classed:d6,text:m6,html:v6,raise:_6,lower:w6,append:S6,insert:E6,remove:A6,clone:L6,datum:O6,on:I6,dispatch:P6,[Symbol.iterator]:q6};function ue(i){return typeof i=="string"?new Fn([[document.querySelector(i)]],[document.documentElement]):new Fn([[i]],NM)}function H6(i){let e;for(;e=i.sourceEvent;)i=e;return i}function $a(i,e){if(i=H6(i),e===void 0&&(e=i.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=i.clientX,n.y=i.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[i.clientX-a.left-e.clientLeft,i.clientY-a.top-e.clientTop]}}return[i.pageX,i.pageY]}var W6={value:()=>{}};function zd(){for(var i=0,e=arguments.length,r={},n;i<e;++i){if(!(n=arguments[i]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Pp(r)}function Pp(i){this._=i}function G6(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}})}Pp.prototype=zd.prototype={constructor:Pp,on:function(i,e){var r=this._,n=G6(i+"",r),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(i=n[o]).type)&&(a=Y6(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]=c2(r[a],i.name,e);else if(e==null)for(a in r)r[a]=c2(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 Pp(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 Y6(i,e){for(var r=0,n=i.length,a;r<n;++r)if((a=i[r]).name===e)return a.value}function c2(i,e,r){for(var n=0,a=i.length;n<a;++n)if(i[n].name===e){i[n]=W6,i=i.slice(0,n).concat(i.slice(n+1));break}return r!=null&&i.push({name:e,value:r}),i}const K6={passive:!1},yd={capture:!0,passive:!1};function zb(i){i.stopImmediatePropagation()}function Pc(i){i.preventDefault(),i.stopImmediatePropagation()}function AM(i){var e=i.document.documentElement,r=ue(i).on("dragstart.drag",Pc,yd);"onselectstart"in e?r.on("selectstart.drag",Pc,yd):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function MM(i,e){var r=i.document.documentElement,n=ue(i).on("dragstart.drag",null);e&&(n.on("click.drag",Pc,yd),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 Ux(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}})}Ux.prototype.on=function(){var i=this._.on.apply(this._,arguments);return i===this._?this:i};function V6(i){return!i.ctrlKey&&!i.button}function X6(){return this.parentNode}function Z6(i,e){return e??{x:i.x,y:i.y}}function Q6(){return navigator.maxTouchPoints||"ontouchstart"in this}function J6(){var i=V6,e=X6,r=Z6,n=Q6,a={},o=zd("start","drag","end"),c=0,h,u,d,f,g=0;function x(A){A.on("mousedown.drag",y).filter(n).on("touchstart.drag",_).on("touchmove.drag",k,K6).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(A,B){if(!(f||!i.call(this,A,B))){var L=E(this,e.call(this,A,B),A,B,"mouse");L&&(ue(A.view).on("mousemove.drag",v,yd).on("mouseup.drag",C,yd),AM(A.view),zb(A),d=!1,h=A.clientX,u=A.clientY,L("start",A))}}function v(A){if(Pc(A),!d){var B=A.clientX-h,L=A.clientY-u;d=B*B+L*L>g}a.mouse("drag",A)}function C(A){ue(A.view).on("mousemove.drag mouseup.drag",null),MM(A.view,d),Pc(A),a.mouse("end",A)}function _(A,B){if(i.call(this,A,B)){var L=A.changedTouches,N=e.call(this,A,B),M=L.length,I,j;for(I=0;I<M;++I)(j=E(this,N,A,B,L[I].identifier,L[I]))&&(zb(A),j("start",A,L[I]))}}function k(A){var B=A.changedTouches,L=B.length,N,M;for(N=0;N<L;++N)(M=a[B[N].identifier])&&(Pc(A),M("drag",A,B[N]))}function T(A){var B=A.changedTouches,L=B.length,N,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),N=0;N<L;++N)(M=a[B[N].identifier])&&(zb(A),M("end",A,B[N]))}function E(A,B,L,N,M,I){var j=o.copy(),P=$a(I||L,B),W,K,z;if((z=r.call(A,new Ux("beforestart",{sourceEvent:L,target:x,identifier:M,active:c,x:P[0],y:P[1],dx:0,dy:0,dispatch:j}),N))!=null)return W=z.x-P[0]||0,K=z.y-P[1]||0,function G(D,F,q){var X=P,nt;switch(D){case"start":a[M]=G,nt=c++;break;case"end":delete a[M],--c;case"drag":P=$a(q||F,B),nt=c;break}j.call(D,A,new Ux(D,{sourceEvent:F,subject:z,target:x,identifier:M,active:nt,x:P[0]+W,y:P[1]+K,dx:P[0]-X[0],dy:P[1]-X[1],dispatch:j}),N)}}return x.filter=function(A){return arguments.length?(i=typeof A=="function"?A:pp(!!A),x):i},x.container=function(A){return arguments.length?(e=typeof A=="function"?A:pp(A),x):e},x.subject=function(A){return arguments.length?(r=typeof A=="function"?A:pp(A),x):r},x.touchable=function(A){return arguments.length?(n=typeof A=="function"?A:pp(!!A),x):n},x.on=function(){var A=o.on.apply(o,arguments);return A===o?x:A},x.clickDistance=function(A){return arguments.length?(g=(A=+A)*A,x):Math.sqrt(g)},x}function A1(i,e,r){i.prototype=e.prototype=r,r.constructor=i}function BM(i,e){var r=Object.create(i.prototype);for(var n in e)r[n]=e[n];return r}function Pd(){}var bd=.7,sg=1/bd,qc="\\s*([+-]?\\d+)\\s*",xd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tz=/^#([0-9a-f]{3,8})$/,ez=new RegExp(`^rgb\\(${qc},${qc},${qc}\\)$`),iz=new RegExp(`^rgb\\(${Wa},${Wa},${Wa}\\)$`),rz=new RegExp(`^rgba\\(${qc},${qc},${qc},${xd}\\)$`),nz=new RegExp(`^rgba\\(${Wa},${Wa},${Wa},${xd}\\)$`),az=new RegExp(`^hsl\\(${xd},${Wa},${Wa}\\)$`),sz=new RegExp(`^hsla\\(${xd},${Wa},${Wa},${xd}\\)$`),h2={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};A1(Pd,vd,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:u2,formatHex:u2,formatHex8:oz,formatHsl:lz,formatRgb:d2,toString:d2});function u2(){return this.rgb().formatHex()}function oz(){return this.rgb().formatHex8()}function lz(){return LM(this).formatHsl()}function d2(){return this.rgb().formatRgb()}function vd(i){var e,r;return i=(i+"").trim().toLowerCase(),(e=tz.exec(i))?(r=e[1].length,e=parseInt(e[1],16),r===6?f2(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=ez.exec(i))?new vn(e[1],e[2],e[3],1):(e=iz.exec(i))?new vn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=rz.exec(i))?gp(e[1],e[2],e[3],e[4]):(e=nz.exec(i))?gp(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=az.exec(i))?m2(e[1],e[2]/100,e[3]/100,1):(e=sz.exec(i))?m2(e[1],e[2]/100,e[3]/100,e[4]):h2.hasOwnProperty(i)?f2(h2[i]):i==="transparent"?new vn(NaN,NaN,NaN,0):null}function f2(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 cz(i){return i instanceof Pd||(i=vd(i)),i?(i=i.rgb(),new vn(i.r,i.g,i.b,i.opacity)):new vn}function Hx(i,e,r,n){return arguments.length===1?cz(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}A1(vn,Hx,BM(Pd,{brighter(i){return i=i==null?sg:Math.pow(sg,i),new vn(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?bd:Math.pow(bd,i),new vn(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new vn(Ml(this.r),Ml(this.g),Ml(this.b),og(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:p2,formatHex:p2,formatHex8:hz,formatRgb:g2,toString:g2}));function p2(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}`}function hz(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}${yl((isNaN(this.opacity)?1:this.opacity)*255)}`}function g2(){const i=og(this.opacity);return`${i===1?"rgb(":"rgba("}${Ml(this.r)}, ${Ml(this.g)}, ${Ml(this.b)}${i===1?")":`, ${i})`}`}function og(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function Ml(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function yl(i){return i=Ml(i),(i<16?"0":"")+i.toString(16)}function m2(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 LM(i){if(i instanceof ya)return new ya(i.h,i.s,i.l,i.opacity);if(i instanceof Pd||(i=vd(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 uz(i,e,r,n){return arguments.length===1?LM(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}A1(ya,uz,BM(Pd,{brighter(i){return i=i==null?sg:Math.pow(sg,i),new ya(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?bd:Math.pow(bd,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(Pb(i>=240?i-240:i+120,a,n),Pb(i,a,n),Pb(i<120?i+240:i-120,a,n),this.opacity)},clamp(){return new ya(y2(this.h),mp(this.s),mp(this.l),og(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=og(this.opacity);return`${i===1?"hsl(":"hsla("}${y2(this.h)}, ${mp(this.s)*100}%, ${mp(this.l)*100}%${i===1?")":`, ${i})`}`}}));function y2(i){return i=(i||0)%360,i<0?i+360:i}function mp(i){return Math.max(0,Math.min(1,i||0))}function Pb(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 M1=i=>()=>i;function OM(i,e){return function(r){return i+r*e}}function dz(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 Fot(i,e){var r=e-i;return r?OM(i,r>180||r<-180?r-360*Math.round(r/360):r):M1(isNaN(i)?e:i)}function fz(i){return(i=+i)==1?RM:function(e,r){return r-e?dz(e,r,i):M1(isNaN(e)?r:e)}}function RM(i,e){var r=e-i;return r?OM(i,r):M1(isNaN(i)?e:i)}const b2=(function i(e){var r=fz(e);function n(a,o){var c=r((a=Hx(a)).r,(o=Hx(o)).r),h=r(a.g,o.g),u=r(a.b,o.b),d=RM(a.opacity,o.opacity);return function(f){return a.r=c(f),a.g=h(f),a.b=u(f),a.opacity=d(f),a+""}}return n.gamma=i,n})(1);function xo(i,e){return i=+i,e=+e,function(r){return i*(1-r)+e*r}}var Wx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qb=new RegExp(Wx.source,"g");function pz(i){return function(){return i}}function gz(i){return function(e){return i(e)+""}}function mz(i,e){var r=Wx.lastIndex=qb.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(i=i+"",e=e+"";(n=Wx.exec(i))&&(a=qb.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),h[c]?h[c]+=o:h[++c]=o),(n=n[0])===(a=a[0])?h[c]?h[c]+=a:h[++c]=a:(h[++c]=null,u.push({i:c,x:xo(n,a)})),r=qb.lastIndex;return r<e.length&&(o=e.slice(r),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?gz(u[0].x):pz(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 x2=180/Math.PI,Gx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jM(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)*x2,skewX:Math.atan(u)*x2,scaleX:c,scaleY:h}}var yp;function yz(i){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return e.isIdentity?Gx:jM(e.a,e.b,e.c,e.d,e.e,e.f)}function bz(i){return i==null||(yp||(yp=document.createElementNS("http://www.w3.org/2000/svg","g")),yp.setAttribute("transform",i),!(i=yp.transform.baseVal.consolidate()))?Gx:(i=i.matrix,jM(i.a,i.b,i.c,i.d,i.e,i.f))}function DM(i,e,r,n){function a(d){return d.length?d.pop()+" ":""}function o(d,f,g,x,y,v){if(d!==g||f!==x){var C=y.push("translate(",null,e,null,r);v.push({i:C-4,x:xo(d,g)},{i:C-2,x:xo(f,x)})}else(g||x)&&y.push("translate("+g+e+x+r)}function c(d,f,g,x){d!==f?(d-f>180?f+=360:f-d>180&&(d+=360),x.push({i:g.push(a(g)+"rotate(",null,n)-2,x:xo(d,f)})):f&&g.push(a(g)+"rotate("+f+n)}function h(d,f,g,x){d!==f?x.push({i:g.push(a(g)+"skewX(",null,n)-2,x:xo(d,f)}):f&&g.push(a(g)+"skewX("+f+n)}function u(d,f,g,x,y,v){if(d!==g||f!==x){var C=y.push(a(y)+"scale(",null,",",null,")");v.push({i:C-4,x:xo(d,g)},{i:C-2,x:xo(f,x)})}else(g!==1||x!==1)&&y.push(a(y)+"scale("+g+","+x+")")}return function(d,f){var g=[],x=[];return d=i(d),f=i(f),o(d.translateX,d.translateY,f.translateX,f.translateY,g,x),c(d.rotate,f.rotate,g,x),h(d.skewX,f.skewX,g,x),u(d.scaleX,d.scaleY,f.scaleX,f.scaleY,g,x),d=f=null,function(y){for(var v=-1,C=x.length,_;++v<C;)g[(_=x[v]).i]=_.x(y);return g.join("")}}}var xz=DM(yz,"px, ","px)","deg)"),vz=DM(bz,", ",")",")"),Cz=1e-12;function v2(i){return((i=Math.exp(i))+1/i)/2}function _z(i){return((i=Math.exp(i))-1/i)/2}function kz(i){return((i=Math.exp(2*i))-1)/(i+1)}const wz=(function i(e,r,n){function a(o,c){var h=o[0],u=o[1],d=o[2],f=c[0],g=c[1],x=c[2],y=f-h,v=g-u,C=y*y+v*v,_,k;if(C<Cz)k=Math.log(x/d)/e,_=function(N){return[h+N*y,u+N*v,d*Math.exp(e*N*k)]};else{var T=Math.sqrt(C),E=(x*x-d*d+n*C)/(2*d*r*T),A=(x*x-d*d-n*C)/(2*x*r*T),B=Math.log(Math.sqrt(E*E+1)-E),L=Math.log(Math.sqrt(A*A+1)-A);k=(L-B)/e,_=function(N){var M=N*k,I=v2(B),j=d/(r*T)*(I*kz(e*M+B)-_z(B));return[h+j*y,u+j*v,d*I/v2(e*M+B)]}}return _.duration=k*1e3*e/Math.SQRT2,_}return a.rho=function(o){var c=Math.max(.001,+o),h=c*c,u=h*h;return i(c,h,u)},a})(Math.SQRT2,2,4);var bh=0,Yu=0,Cu=0,FM=1e3,lg,Ku,cg=0,jl=0,Jg=0,Cd=typeof performance=="object"&&performance.now?performance:Date,IM=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function B1(){return jl||(IM(Sz),jl=Cd.now()+Jg)}function Sz(){jl=0}function hg(){this._call=this._time=this._next=null}hg.prototype=L1.prototype={constructor:hg,restart:function(i,e,r){if(typeof i!="function")throw new TypeError("callback is not a function");r=(r==null?B1():+r)+(e==null?0:+e),!this._next&&Ku!==this&&(Ku?Ku._next=this:lg=this,Ku=this),this._call=i,this._time=r,Yx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Yx())}};function L1(i,e,r){var n=new hg;return n.restart(i,e,r),n}function Tz(){B1(),++bh;for(var i=lg,e;i;)(e=jl-i._time)>=0&&i._call.call(void 0,e),i=i._next;--bh}function C2(){jl=(cg=Cd.now())+Jg,bh=Yu=0;try{Tz()}finally{bh=0,Nz(),jl=0}}function Ez(){var i=Cd.now(),e=i-cg;e>FM&&(Jg-=e,cg=i)}function Nz(){for(var i,e=lg,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:lg=r);Ku=i,Yx(n)}function Yx(i){if(!bh){Yu&&(Yu=clearTimeout(Yu));var e=i-jl;e>24?(i<1/0&&(Yu=setTimeout(C2,i-Cd.now()-Jg)),Cu&&(Cu=clearInterval(Cu))):(Cu||(cg=Cd.now(),Cu=setInterval(Ez,FM)),bh=1,IM(C2))}}function _2(i,e,r){var n=new hg;return e=e==null?0:+e,n.restart(a=>{n.stop(),i(a+e)},e,r),n}var Az=zd("start","end","cancel","interrupt"),Mz=[],$M=0,k2=1,Kx=2,qp=3,w2=4,Vx=5,Up=6;function tm(i,e,r,n,a,o){var c=i.__transition;if(!c)i.__transition={};else if(r in c)return;Bz(i,r,{name:e,index:n,group:a,on:Az,tween:Mz,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:$M})}function O1(i,e){var r=wa(i,e);if(r.state>$M)throw new Error("too late; already scheduled");return r}function Xa(i,e){var r=wa(i,e);if(r.state>qp)throw new Error("too late; already running");return r}function wa(i,e){var r=i.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Bz(i,e,r){var n=i.__transition,a;n[e]=r,r.timer=L1(o,0,r.time);function o(d){r.state=k2,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!==k2)return u();for(f in n)if(y=n[f],y.name===r.name){if(y.state===qp)return _2(c);y.state===w2?(y.state=Up,y.timer.stop(),y.on.call("interrupt",i,i.__data__,y.index,y.group),delete n[f]):+f<e&&(y.state=Up,y.timer.stop(),y.on.call("cancel",i,i.__data__,y.index,y.group),delete n[f])}if(_2(function(){r.state===qp&&(r.state=w2,r.timer.restart(h,r.delay,r.time),h(d))}),r.state=Kx,r.on.call("start",i,i.__data__,r.index,r.group),r.state===Kx){for(r.state=qp,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=Vx,1),g=-1,x=a.length;++g<x;)a[g].call(i,f);r.state===Vx&&(r.on.call("end",i,i.__data__,r.index,r.group),u())}function u(){r.state=Up,r.timer.stop(),delete n[e];for(var d in n)return;delete i.__transition}}function Hp(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>Kx&&n.state<Vx,n.state=Up,n.timer.stop(),n.on.call(a?"interrupt":"cancel",i,i.__data__,n.index,n.group),delete r[c]}o&&delete i.__transition}}function Lz(i){return this.each(function(){Hp(this,i)})}function Oz(i,e){var r,n;return function(){var a=Xa(this,i),o=a.tween;if(o!==r){n=r=o;for(var c=0,h=n.length;c<h;++c)if(n[c].name===e){n=n.slice(),n.splice(c,1);break}}a.tween=n}}function Rz(i,e,r){var n,a;if(typeof r!="function")throw new Error;return function(){var o=Xa(this,i),c=o.tween;if(c!==n){a=(n=c).slice();for(var h={name:e,value:r},u=0,d=a.length;u<d;++u)if(a[u].name===e){a[u]=h;break}u===d&&a.push(h)}o.tween=a}}function jz(i,e){var r=this._id;if(i+="",arguments.length<2){for(var n=wa(this.node(),r).tween,a=0,o=n.length,c;a<o;++a)if((c=n[a]).name===i)return c.value;return null}return this.each((e==null?Oz:Rz)(r,i,e))}function R1(i,e,r){var n=i._id;return i.each(function(){var a=Xa(this,n);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return wa(a,n).value[e]}}function zM(i,e){var r;return(typeof e=="number"?xo:e instanceof vd?b2:(r=vd(e))?(e=r,b2):mz)(i,e)}function Dz(i){return function(){this.removeAttribute(i)}}function Fz(i){return function(){this.removeAttributeNS(i.space,i.local)}}function Iz(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 $z(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 zz(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 Pz(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 qz(i,e){var r=Qg(i),n=r==="transform"?vz:zM;return this.attrTween(i,typeof e=="function"?(r.local?Pz:zz)(r,n,R1(this,"attr."+i,e)):e==null?(r.local?Fz:Dz)(r):(r.local?$z:Iz)(r,n,e))}function Uz(i,e){return function(r){this.setAttribute(i,e.call(this,r))}}function Hz(i,e){return function(r){this.setAttributeNS(i.space,i.local,e.call(this,r))}}function Wz(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&Hz(i,o)),r}return a._value=e,a}function Gz(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&Uz(i,o)),r}return a._value=e,a}function Yz(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=Qg(i);return this.tween(r,(n.local?Wz:Gz)(n,e))}function Kz(i,e){return function(){O1(this,i).delay=+e.apply(this,arguments)}}function Vz(i,e){return e=+e,function(){O1(this,i).delay=e}}function Xz(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?Kz:Vz)(e,i)):wa(this.node(),e).delay}function Zz(i,e){return function(){Xa(this,i).duration=+e.apply(this,arguments)}}function Qz(i,e){return e=+e,function(){Xa(this,i).duration=e}}function Jz(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?Zz:Qz)(e,i)):wa(this.node(),e).duration}function t8(i,e){if(typeof e!="function")throw new Error;return function(){Xa(this,i).ease=e}}function e8(i){var e=this._id;return arguments.length?this.each(t8(e,i)):wa(this.node(),e).ease}function i8(i,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Xa(this,i).ease=r}}function r8(i){if(typeof i!="function")throw new Error;return this.each(i8(this._id,i))}function n8(i){typeof i!="function"&&(i=xM(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 a8(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 s8(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 o8(i,e,r){var n,a,o=s8(e)?O1:Xa;return function(){var c=o(this,i),h=c.on;h!==n&&(a=(n=h).copy()).on(e,r),c.on=a}}function l8(i,e){var r=this._id;return arguments.length<2?wa(this.node(),r).on.on(i):this.each(o8(r,i,e))}function c8(i){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==i)return;e&&e.removeChild(this)}}function h8(){return this.on("end.remove",c8(this._id))}function u8(i){var e=this._name,r=this._id;typeof i!="function"&&(i=E1(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,tm(d[x],e,r,x,d,wa(f,r)));return new Ds(o,this._parents,e,r)}function d8(i){var e=this._name,r=this._id;typeof i!="function"&&(i=bM(i));for(var n=this._groups,a=n.length,o=[],c=[],h=0;h<a;++h)for(var u=n[h],d=u.length,f,g=0;g<d;++g)if(f=u[g]){for(var x=i.call(f,f.__data__,g,u),y,v=wa(f,r),C=0,_=x.length;C<_;++C)(y=x[C])&&tm(y,e,r,C,x,v);o.push(x),c.push(f)}return new Ds(o,c,e,r)}var f8=$d.prototype.constructor;function p8(){return new f8(this._groups,this._parents)}function g8(i,e){var r,n,a;return function(){var o=yh(this,i),c=(this.style.removeProperty(i),yh(this,i));return o===c?null:o===r&&c===n?a:a=e(r=o,n=c)}}function PM(i){return function(){this.style.removeProperty(i)}}function m8(i,e,r){var n,a=r+"",o;return function(){var c=yh(this,i);return c===a?null:c===n?o:o=e(n=c,r)}}function y8(i,e,r){var n,a,o;return function(){var c=yh(this,i),h=r(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(i),yh(this,i))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function b8(i,e){var r,n,a,o="style."+e,c="end."+o,h;return function(){var u=Xa(this,i),d=u.on,f=u.value[o]==null?h||(h=PM(e)):void 0;(d!==r||a!==f)&&(n=(r=d).copy()).on(c,a=f),u.on=n}}function x8(i,e,r){var n=(i+="")=="transform"?xz:zM;return e==null?this.styleTween(i,g8(i,n)).on("end.style."+i,PM(i)):typeof e=="function"?this.styleTween(i,y8(i,n,R1(this,"style."+i,e))).each(b8(this._id,i)):this.styleTween(i,m8(i,n,e),r).on("end.style."+i,null)}function v8(i,e,r){return function(n){this.style.setProperty(i,e.call(this,n),r)}}function C8(i,e,r){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&v8(i,c,r)),n}return o._value=e,o}function _8(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,C8(i,e,r??""))}function k8(i){return function(){this.textContent=i}}function w8(i){return function(){var e=i(this);this.textContent=e??""}}function S8(i){return this.tween("text",typeof i=="function"?w8(R1(this,"text",i)):k8(i==null?"":i+""))}function T8(i){return function(e){this.textContent=i.call(this,e)}}function E8(i){var e,r;function n(){var a=i.apply(this,arguments);return a!==r&&(e=(r=a)&&T8(a)),e}return n._value=i,n}function N8(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,E8(i))}function A8(){for(var i=this._name,e=this._id,r=qM(),n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,d=0;d<h;++d)if(u=c[d]){var f=wa(u,e);tm(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 M8(){var i,e,r=this,n=r._id,a=r.size();return new Promise(function(o,c){var h={value:c},u={value:function(){--a===0&&o()}};r.each(function(){var d=Xa(this,n),f=d.on;f!==i&&(e=(i=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(u)),d.on=e}),a===0&&o()})}var B8=0;function Ds(i,e,r,n){this._groups=i,this._parents=e,this._name=r,this._id=n}function qM(){return++B8}var ms=$d.prototype;Ds.prototype={constructor:Ds,select:u8,selectAll:d8,selectChild:ms.selectChild,selectChildren:ms.selectChildren,filter:n8,merge:a8,selection:p8,transition:A8,call:ms.call,nodes:ms.nodes,node:ms.node,size:ms.size,empty:ms.empty,each:ms.each,on:l8,attr:qz,attrTween:Yz,style:x8,styleTween:_8,text:S8,textTween:N8,remove:h8,tween:jz,delay:Xz,duration:Jz,ease:e8,easeVarying:r8,end:M8,[Symbol.iterator]:ms[Symbol.iterator]};function L8(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var O8={time:null,delay:0,duration:250,ease:L8};function R8(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 j8(i){var e,r;i instanceof Ds?(e=i._id,i=i._name):(e=qM(),(r=O8).time=B1(),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])&&tm(u,i,e,d,c,r||R8(u,e));return new Ds(n,this._parents,i,e)}$d.prototype.interrupt=Lz;$d.prototype.transition=j8;const bp=i=>()=>i;function D8(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 As(i,e,r){this.k=i,this.x=e,this.y=r}As.prototype={constructor:As,scale:function(i){return i===1?this:new As(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new As(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 j1=new As(1,0,0);Fa.prototype=As.prototype;function Fa(i){for(;!i.__zoom;)if(!(i=i.parentNode))return j1;return i.__zoom}function Ub(i){i.stopImmediatePropagation()}function _u(i){i.preventDefault(),i.stopImmediatePropagation()}function F8(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function I8(){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 S2(){return this.__zoom||j1}function $8(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function z8(){return navigator.maxTouchPoints||"ontouchstart"in this}function P8(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 q8(){var i=F8,e=I8,r=P8,n=$8,a=z8,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=wz,d=zd("start","zoom","end"),f,g,x,y=500,v=150,C=0,_=10;function k(z){z.property("__zoom",S2).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",j).filter(a).on("touchstart.zoom",P).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",K).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(z,G,D,F){var q=z.selection?z.selection():z;q.property("__zoom",S2),z!==q?B(z,G,D,F):q.interrupt().each(function(){L(this,arguments).event(F).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},k.scaleBy=function(z,G,D,F){k.scaleTo(z,function(){var q=this.__zoom.k,X=typeof G=="function"?G.apply(this,arguments):G;return q*X},D,F)},k.scaleTo=function(z,G,D,F){k.transform(z,function(){var q=e.apply(this,arguments),X=this.__zoom,nt=D==null?A(q):typeof D=="function"?D.apply(this,arguments):D,H=X.invert(nt),J=typeof G=="function"?G.apply(this,arguments):G;return r(E(T(X,J),nt,H),q,c)},D,F)},k.translateBy=function(z,G,D,F){k.transform(z,function(){return r(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof D=="function"?D.apply(this,arguments):D),e.apply(this,arguments),c)},null,F)},k.translateTo=function(z,G,D,F,q){k.transform(z,function(){var X=e.apply(this,arguments),nt=this.__zoom,H=F==null?A(X):typeof F=="function"?F.apply(this,arguments):F;return r(j1.translate(H[0],H[1]).scale(nt.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof D=="function"?-D.apply(this,arguments):-D),X,c)},F,q)};function T(z,G){return G=Math.max(o[0],Math.min(o[1],G)),G===z.k?z:new As(G,z.x,z.y)}function E(z,G,D){var F=G[0]-D[0]*z.k,q=G[1]-D[1]*z.k;return F===z.x&&q===z.y?z:new As(z.k,F,q)}function A(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function B(z,G,D,F){z.on("start.zoom",function(){L(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){L(this,arguments).event(F).end()}).tween("zoom",function(){var q=this,X=arguments,nt=L(q,X).event(F),H=e.apply(q,X),J=D==null?A(H):typeof D=="function"?D.apply(q,X):D,ht=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),at=q.__zoom,vt=typeof G=="function"?G.apply(q,X):G,ct=u(at.invert(J).concat(ht/at.k),vt.invert(J).concat(ht/vt.k));return function(Z){if(Z===1)Z=vt;else{var Q=ct(Z),tt=ht/Q[2];Z=new As(tt,J[0]-Q[0]*tt,J[1]-Q[1]*tt)}nt.zoom(null,Z)}})}function L(z,G,D){return!D&&z.__zooming||new N(z,G)}function N(z,G){this.that=z,this.args=G,this.active=0,this.sourceEvent=null,this.extent=e.apply(z,G),this.taps=0}N.prototype={event:function(z){return z&&(this.sourceEvent=z),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(z,G){return this.mouse&&z!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&z!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&z!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(z){var G=ue(this.that).datum();d.call(z,this.that,new D8(z,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),G)}};function M(z,...G){if(!i.apply(this,arguments))return;var D=L(this,G).event(z),F=this.__zoom,q=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,n.apply(this,arguments)))),X=$a(z);if(D.wheel)(D.mouse[0][0]!==X[0]||D.mouse[0][1]!==X[1])&&(D.mouse[1]=F.invert(D.mouse[0]=X)),clearTimeout(D.wheel);else{if(F.k===q)return;D.mouse=[X,F.invert(X)],Hp(this),D.start()}_u(z),D.wheel=setTimeout(nt,v),D.zoom("mouse",r(E(T(F,q),D.mouse[0],D.mouse[1]),D.extent,c));function nt(){D.wheel=null,D.end()}}function I(z,...G){if(x||!i.apply(this,arguments))return;var D=z.currentTarget,F=L(this,G,!0).event(z),q=ue(z.view).on("mousemove.zoom",J,!0).on("mouseup.zoom",ht,!0),X=$a(z,D),nt=z.clientX,H=z.clientY;AM(z.view),Ub(z),F.mouse=[X,this.__zoom.invert(X)],Hp(this),F.start();function J(at){if(_u(at),!F.moved){var vt=at.clientX-nt,ct=at.clientY-H;F.moved=vt*vt+ct*ct>C}F.event(at).zoom("mouse",r(E(F.that.__zoom,F.mouse[0]=$a(at,D),F.mouse[1]),F.extent,c))}function ht(at){q.on("mousemove.zoom mouseup.zoom",null),MM(at.view,F.moved),_u(at),F.event(at).end()}}function j(z,...G){if(i.apply(this,arguments)){var D=this.__zoom,F=$a(z.changedTouches?z.changedTouches[0]:z,this),q=D.invert(F),X=D.k*(z.shiftKey?.5:2),nt=r(E(T(D,X),F,q),e.apply(this,G),c);_u(z),h>0?ue(this).transition().duration(h).call(B,nt,F,z):ue(this).call(k.transform,nt,F,z)}}function P(z,...G){if(i.apply(this,arguments)){var D=z.touches,F=D.length,q=L(this,G,z.changedTouches.length===F).event(z),X,nt,H,J;for(Ub(z),nt=0;nt<F;++nt)H=D[nt],J=$a(H,this),J=[J,this.__zoom.invert(J),H.identifier],q.touch0?!q.touch1&&q.touch0[2]!==J[2]&&(q.touch1=J,q.taps=0):(q.touch0=J,X=!0,q.taps=1+!!f);f&&(f=clearTimeout(f)),X&&(q.taps<2&&(g=J[0],f=setTimeout(function(){f=null},y)),Hp(this),q.start())}}function W(z,...G){if(this.__zooming){var D=L(this,G).event(z),F=z.changedTouches,q=F.length,X,nt,H,J;for(_u(z),X=0;X<q;++X)nt=F[X],H=$a(nt,this),D.touch0&&D.touch0[2]===nt.identifier?D.touch0[0]=H:D.touch1&&D.touch1[2]===nt.identifier&&(D.touch1[0]=H);if(nt=D.that.__zoom,D.touch1){var ht=D.touch0[0],at=D.touch0[1],vt=D.touch1[0],ct=D.touch1[1],Z=(Z=vt[0]-ht[0])*Z+(Z=vt[1]-ht[1])*Z,Q=(Q=ct[0]-at[0])*Q+(Q=ct[1]-at[1])*Q;nt=T(nt,Math.sqrt(Z/Q)),H=[(ht[0]+vt[0])/2,(ht[1]+vt[1])/2],J=[(at[0]+ct[0])/2,(at[1]+ct[1])/2]}else if(D.touch0)H=D.touch0[0],J=D.touch0[1];else return;D.zoom("touch",r(E(nt,H,J),D.extent,c))}}function K(z,...G){if(this.__zooming){var D=L(this,G).event(z),F=z.changedTouches,q=F.length,X,nt;for(Ub(z),x&&clearTimeout(x),x=setTimeout(function(){x=null},y),X=0;X<q;++X)nt=F[X],D.touch0&&D.touch0[2]===nt.identifier?delete D.touch0:D.touch1&&D.touch1[2]===nt.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(nt=$a(nt,this),Math.hypot(g[0]-nt[0],g[1]-nt[1])<_)){var H=ue(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return k.wheelDelta=function(z){return arguments.length?(n=typeof z=="function"?z:bp(+z),k):n},k.filter=function(z){return arguments.length?(i=typeof z=="function"?z:bp(!!z),k):i},k.touchable=function(z){return arguments.length?(a=typeof z=="function"?z:bp(!!z),k):a},k.extent=function(z){return arguments.length?(e=typeof z=="function"?z:bp([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),k):e},k.scaleExtent=function(z){return arguments.length?(o[0]=+z[0],o[1]=+z[1],k):[o[0],o[1]]},k.translateExtent=function(z){return arguments.length?(c[0][0]=+z[0][0],c[1][0]=+z[1][0],c[0][1]=+z[0][1],c[1][1]=+z[1][1],k):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},k.constrain=function(z){return arguments.length?(r=z,k):r},k.duration=function(z){return arguments.length?(h=+z,k):h},k.interpolate=function(z){return arguments.length?(u=z,k):u},k.on=function(){var z=d.on.apply(d,arguments);return z===d?k:z},k.clickDistance=function(z){return arguments.length?(C=(z=+z)*z,k):Math.sqrt(C)},k.tapDistance=function(z){return arguments.length?(_=+z,k):_},k}class T2 extends Map{constructor(e,r=W8){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(E2(this,e))}has(e){return super.has(E2(this,e))}set(e,r){return super.set(U8(this,e),r)}delete(e){return super.delete(H8(this,e))}}function E2({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):r}function U8({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):(i.set(n,r),r)}function H8({_intern:i,_key:e},r){const n=e(r);return i.has(n)&&(r=i.get(n),i.delete(n)),r}function W8(i){return i!==null&&typeof i=="object"?i.valueOf():i}function N2(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 A2(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 G8(i,e){let r=0;for(let n of i)(n=+n)&&(r+=n);return r}var UM=typeof global=="object"&&global&&global.Object===Object&&global,Y8=typeof self=="object"&&self&&self.Object===Object&&self,Sa=UM||Y8||Function("return this")(),ug=Sa.Symbol,HM=Object.prototype,K8=HM.hasOwnProperty,V8=HM.toString,ku=ug?ug.toStringTag:void 0;function X8(i){var e=K8.call(i,ku),r=i[ku];try{i[ku]=void 0;var n=!0}catch{}var a=V8.call(i);return n&&(e?i[ku]=r:delete i[ku]),a}var Z8=Object.prototype,Q8=Z8.toString;function J8(i){return Q8.call(i)}var tP="[object Null]",eP="[object Undefined]",M2=ug?ug.toStringTag:void 0;function Wl(i){return i==null?i===void 0?eP:tP:M2&&M2 in Object(i)?X8(i):J8(i)}function Th(i){return i!=null&&typeof i=="object"}var iP="[object Symbol]";function rP(i){return typeof i=="symbol"||Th(i)&&Wl(i)==iP}var dg=Array.isArray,nP=/\s/;function aP(i){for(var e=i.length;e--&&nP.test(i.charAt(e)););return e}var sP=/^\s+/;function oP(i){return i&&i.slice(0,aP(i)+1).replace(sP,"")}function _a(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var B2=NaN,lP=/^[-+]0x[0-9a-f]+$/i,cP=/^0b[01]+$/i,hP=/^0o[0-7]+$/i,uP=parseInt;function L2(i){if(typeof i=="number")return i;if(rP(i))return B2;if(_a(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=_a(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=oP(i);var r=cP.test(i);return r||hP.test(i)?uP(i.slice(2),r?2:8):lP.test(i)?B2:+i}function WM(i){return i}var dP="[object AsyncFunction]",fP="[object Function]",pP="[object GeneratorFunction]",gP="[object Proxy]";function D1(i){if(!_a(i))return!1;var e=Wl(i);return e==fP||e==pP||e==dP||e==gP}var Hb=Sa["__core-js_shared__"],O2=(function(){var i=/[^.]+$/.exec(Hb&&Hb.keys&&Hb.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function mP(i){return!!O2&&O2 in i}var yP=Function.prototype,bP=yP.toString;function Gl(i){if(i!=null){try{return bP.call(i)}catch{}try{return i+""}catch{}}return""}var xP=/[\\^$.*+?()[\]{}|]/g,vP=/^\[object .+?Constructor\]$/,CP=Function.prototype,_P=Object.prototype,kP=CP.toString,wP=_P.hasOwnProperty,SP=RegExp("^"+kP.call(wP).replace(xP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TP(i){if(!_a(i)||mP(i))return!1;var e=D1(i)?SP:vP;return e.test(Gl(i))}function EP(i,e){return i==null?void 0:i[e]}function Yl(i,e){var r=EP(i,e);return TP(r)?r:void 0}var Xx=Yl(Sa,"WeakMap"),R2=Object.create,NP=(function(){function i(){}return function(e){if(!_a(e))return{};if(R2)return R2(e);i.prototype=e;var r=new i;return i.prototype=void 0,r}})();function AP(i,e,r){switch(r.length){case 0:return i.call(e);case 1:return i.call(e,r[0]);case 2:return i.call(e,r[0],r[1]);case 3:return i.call(e,r[0],r[1],r[2])}return i.apply(e,r)}function MP(i,e){var r=-1,n=i.length;for(e||(e=Array(n));++r<n;)e[r]=i[r];return e}var BP=800,LP=16,OP=Date.now;function RP(i){var e=0,r=0;return function(){var n=OP(),a=LP-(n-r);if(r=n,a>0){if(++e>=BP)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}function jP(i){return function(){return i}}var fg=(function(){try{var i=Yl(Object,"defineProperty");return i({},"",{}),i}catch{}})(),DP=fg?function(i,e){return fg(i,"toString",{configurable:!0,enumerable:!1,value:jP(e),writable:!0})}:WM,FP=RP(DP),IP=9007199254740991,$P=/^(?:0|[1-9]\d*)$/;function GM(i,e){var r=typeof i;return e=e??IP,!!e&&(r=="number"||r!="symbol"&&$P.test(i))&&i>-1&&i%1==0&&i<e}function F1(i,e,r){e=="__proto__"&&fg?fg(i,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[e]=r}function em(i,e){return i===e||i!==i&&e!==e}var zP=Object.prototype,PP=zP.hasOwnProperty;function qP(i,e,r){var n=i[e];(!(PP.call(i,e)&&em(n,r))||r===void 0&&!(e in i))&&F1(i,e,r)}function UP(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?F1(r,h,u):qP(r,h,u)}return r}var j2=Math.max;function HP(i,e,r){return e=j2(e===void 0?i.length-1:e,0),function(){for(var n=arguments,a=-1,o=j2(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),AP(i,this,h)}}function WP(i,e){return FP(HP(i,e,WM),i+"")}var GP=9007199254740991;function YM(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=GP}function im(i){return i!=null&&YM(i.length)&&!D1(i)}function YP(i,e,r){if(!_a(r))return!1;var n=typeof e;return(n=="number"?im(r)&&GM(e,r.length):n=="string"&&e in r)?em(r[e],i):!1}function KP(i){return WP(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&&YP(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 VP=Object.prototype;function rm(i){var e=i&&i.constructor,r=typeof e=="function"&&e.prototype||VP;return i===r}function XP(i,e){for(var r=-1,n=Array(i);++r<i;)n[r]=e(r);return n}var ZP="[object Arguments]";function D2(i){return Th(i)&&Wl(i)==ZP}var KM=Object.prototype,QP=KM.hasOwnProperty,JP=KM.propertyIsEnumerable,pg=D2((function(){return arguments})())?D2:function(i){return Th(i)&&QP.call(i,"callee")&&!JP.call(i,"callee")};function tq(){return!1}var VM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,F2=VM&&typeof module=="object"&&module&&!module.nodeType&&module,eq=F2&&F2.exports===VM,I2=eq?Sa.Buffer:void 0,iq=I2?I2.isBuffer:void 0,I1=iq||tq,rq="[object Arguments]",nq="[object Array]",aq="[object Boolean]",sq="[object Date]",oq="[object Error]",lq="[object Function]",cq="[object Map]",hq="[object Number]",uq="[object Object]",dq="[object RegExp]",fq="[object Set]",pq="[object String]",gq="[object WeakMap]",mq="[object ArrayBuffer]",yq="[object DataView]",bq="[object Float32Array]",xq="[object Float64Array]",vq="[object Int8Array]",Cq="[object Int16Array]",_q="[object Int32Array]",kq="[object Uint8Array]",wq="[object Uint8ClampedArray]",Sq="[object Uint16Array]",Tq="[object Uint32Array]",Mi={};Mi[bq]=Mi[xq]=Mi[vq]=Mi[Cq]=Mi[_q]=Mi[kq]=Mi[wq]=Mi[Sq]=Mi[Tq]=!0;Mi[rq]=Mi[nq]=Mi[mq]=Mi[aq]=Mi[yq]=Mi[sq]=Mi[oq]=Mi[lq]=Mi[cq]=Mi[hq]=Mi[uq]=Mi[dq]=Mi[fq]=Mi[pq]=Mi[gq]=!1;function Eq(i){return Th(i)&&YM(i.length)&&!!Mi[Wl(i)]}function Nq(i){return function(e){return i(e)}}var XM=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nd=XM&&typeof module=="object"&&module&&!module.nodeType&&module,Aq=nd&&nd.exports===XM,Wb=Aq&&UM.process,$2=(function(){try{var i=nd&&nd.require&&nd.require("util").types;return i||Wb&&Wb.binding&&Wb.binding("util")}catch{}})(),z2=$2&&$2.isTypedArray,$1=z2?Nq(z2):Eq,Mq=Object.prototype,Bq=Mq.hasOwnProperty;function Lq(i,e){var r=dg(i),n=!r&&pg(i),a=!r&&!n&&I1(i),o=!r&&!n&&!a&&$1(i),c=r||n||a||o,h=c?XP(i.length,String):[],u=h.length;for(var d in i)(e||Bq.call(i,d))&&!(c&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||GM(d,u)))&&h.push(d);return h}function ZM(i,e){return function(r){return i(e(r))}}var Oq=ZM(Object.keys,Object),Rq=Object.prototype,jq=Rq.hasOwnProperty;function Dq(i){if(!rm(i))return Oq(i);var e=[];for(var r in Object(i))jq.call(i,r)&&r!="constructor"&&e.push(r);return e}function Fq(i){var e=[];if(i!=null)for(var r in Object(i))e.push(r);return e}var Iq=Object.prototype,$q=Iq.hasOwnProperty;function zq(i){if(!_a(i))return Fq(i);var e=rm(i),r=[];for(var n in i)n=="constructor"&&(e||!$q.call(i,n))||r.push(n);return r}function QM(i){return im(i)?Lq(i,!0):zq(i)}var _d=Yl(Object,"create");function Pq(){this.__data__=_d?_d(null):{},this.size=0}function qq(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var Uq="__lodash_hash_undefined__",Hq=Object.prototype,Wq=Hq.hasOwnProperty;function Gq(i){var e=this.__data__;if(_d){var r=e[i];return r===Uq?void 0:r}return Wq.call(e,i)?e[i]:void 0}var Yq=Object.prototype,Kq=Yq.hasOwnProperty;function Vq(i){var e=this.__data__;return _d?e[i]!==void 0:Kq.call(e,i)}var Xq="__lodash_hash_undefined__";function Zq(i,e){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=_d&&e===void 0?Xq:e,this}function Dl(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}Dl.prototype.clear=Pq;Dl.prototype.delete=qq;Dl.prototype.get=Gq;Dl.prototype.has=Vq;Dl.prototype.set=Zq;function Qq(){this.__data__=[],this.size=0}function nm(i,e){for(var r=i.length;r--;)if(em(i[r][0],e))return r;return-1}var Jq=Array.prototype,t9=Jq.splice;function e9(i){var e=this.__data__,r=nm(e,i);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():t9.call(e,r,1),--this.size,!0}function i9(i){var e=this.__data__,r=nm(e,i);return r<0?void 0:e[r][1]}function r9(i){return nm(this.__data__,i)>-1}function n9(i,e){var r=this.__data__,n=nm(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=Qq;Is.prototype.delete=e9;Is.prototype.get=i9;Is.prototype.has=r9;Is.prototype.set=n9;var kd=Yl(Sa,"Map");function a9(){this.size=0,this.__data__={hash:new Dl,map:new(kd||Is),string:new Dl}}function s9(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function am(i,e){var r=i.__data__;return s9(e)?r[typeof e=="string"?"string":"hash"]:r.map}function o9(i){var e=am(this,i).delete(i);return this.size-=e?1:0,e}function l9(i){return am(this,i).get(i)}function c9(i){return am(this,i).has(i)}function h9(i,e){var r=am(this,i),n=r.size;return r.set(i,e),this.size+=r.size==n?0:1,this}function qo(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}qo.prototype.clear=a9;qo.prototype.delete=o9;qo.prototype.get=l9;qo.prototype.has=c9;qo.prototype.set=h9;var u9="Expected a function";function qd(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(u9);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(qd.Cache||qo),r}qd.Cache=qo;var JM=ZM(Object.getPrototypeOf,Object),d9="[object Object]",f9=Function.prototype,p9=Object.prototype,tB=f9.toString,g9=p9.hasOwnProperty,m9=tB.call(Object);function y9(i){if(!Th(i)||Wl(i)!=d9)return!1;var e=JM(i);if(e===null)return!0;var r=g9.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&tB.call(r)==m9}function b9(){this.__data__=new Is,this.size=0}function x9(i){var e=this.__data__,r=e.delete(i);return this.size=e.size,r}function v9(i){return this.__data__.get(i)}function C9(i){return this.__data__.has(i)}var _9=200;function k9(i,e){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!kd||n.length<_9-1)return n.push([i,e]),this.size=++r.size,this;r=this.__data__=new qo(n)}return r.set(i,e),this.size=r.size,this}function Eh(i){var e=this.__data__=new Is(i);this.size=e.size}Eh.prototype.clear=b9;Eh.prototype.delete=x9;Eh.prototype.get=v9;Eh.prototype.has=C9;Eh.prototype.set=k9;var eB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,P2=eB&&typeof module=="object"&&module&&!module.nodeType&&module,w9=P2&&P2.exports===eB,q2=w9?Sa.Buffer:void 0,U2=q2?q2.allocUnsafe:void 0;function S9(i,e){if(e)return i.slice();var r=i.length,n=U2?U2(r):new i.constructor(r);return i.copy(n),n}var Zx=Yl(Sa,"DataView"),Qx=Yl(Sa,"Promise"),Jx=Yl(Sa,"Set"),H2="[object Map]",T9="[object Object]",W2="[object Promise]",G2="[object Set]",Y2="[object WeakMap]",K2="[object DataView]",E9=Gl(Zx),N9=Gl(kd),A9=Gl(Qx),M9=Gl(Jx),B9=Gl(Xx),dl=Wl;(Zx&&dl(new Zx(new ArrayBuffer(1)))!=K2||kd&&dl(new kd)!=H2||Qx&&dl(Qx.resolve())!=W2||Jx&&dl(new Jx)!=G2||Xx&&dl(new Xx)!=Y2)&&(dl=function(i){var e=Wl(i),r=e==T9?i.constructor:void 0,n=r?Gl(r):"";if(n)switch(n){case E9:return K2;case N9:return H2;case A9:return W2;case M9:return G2;case B9:return Y2}return e});var V2=Sa.Uint8Array;function L9(i){var e=new i.constructor(i.byteLength);return new V2(e).set(new V2(i)),e}function O9(i,e){var r=e?L9(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}function R9(i){return typeof i.constructor=="function"&&!rm(i)?NP(JM(i)):{}}function j9(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 D9=j9(),Gb=function(){return Sa.Date.now()},F9="Expected a function",I9=Math.max,$9=Math.min;function iB(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(F9);e=L2(e)||0,_a(r)&&(f=!!r.leading,g="maxWait"in r,o=g?I9(L2(r.maxWait)||0,e):o,x="trailing"in r?!!r.trailing:x);function y(L){var N=n,M=a;return n=a=void 0,d=L,c=i.apply(M,N),c}function v(L){return d=L,h=setTimeout(k,e),f?y(L):c}function C(L){var N=L-u,M=L-d,I=e-N;return g?$9(I,o-M):I}function _(L){var N=L-u,M=L-d;return u===void 0||N>=e||N<0||g&&M>=o}function k(){var L=Gb();if(_(L))return T(L);h=setTimeout(k,C(L))}function T(L){return h=void 0,x&&n?y(L):(n=a=void 0,c)}function E(){h!==void 0&&clearTimeout(h),d=0,n=u=a=h=void 0}function A(){return h===void 0?c:T(Gb())}function B(){var L=Gb(),N=_(L);if(n=arguments,a=this,u=L,N){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=A,B}function tv(i,e,r){(r!==void 0&&!em(i[e],r)||r===void 0&&!(e in i))&&F1(i,e,r)}function z9(i){return Th(i)&&im(i)}function ev(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}function P9(i){return UP(i,QM(i))}function q9(i,e,r,n,a,o,c){var h=ev(i,r),u=ev(e,r),d=c.get(u);if(d){tv(i,r,d);return}var f=o?o(h,u,r+"",i,e,c):void 0,g=f===void 0;if(g){var x=dg(u),y=!x&&I1(u),v=!x&&!y&&$1(u);f=u,x||y||v?dg(h)?f=h:z9(h)?f=MP(h):y?(g=!1,f=S9(u,!0)):v?(g=!1,f=O9(u,!0)):f=[]:y9(u)||pg(u)?(f=h,pg(h)?f=P9(h):(!_a(h)||D1(h))&&(f=R9(u))):g=!1}g&&(c.set(u,f),a(f,u,n,o,c),c.delete(u)),tv(i,r,f)}function rB(i,e,r,n,a){i!==e&&D9(e,function(o,c){if(a||(a=new Eh),_a(o))q9(i,e,c,r,rB,n,a);else{var h=n?n(ev(i,c),o,c+"",i,e,a):void 0;h===void 0&&(h=o),tv(i,c,h)}},QM)}var U9="[object Map]",H9="[object Set]",W9=Object.prototype,G9=W9.hasOwnProperty;function X2(i){if(i==null)return!0;if(im(i)&&(dg(i)||typeof i=="string"||typeof i.splice=="function"||I1(i)||$1(i)||pg(i)))return!i.length;var e=dl(i);if(e==U9||e==H9)return!i.size;if(rm(i))return!Dq(i).length;for(var r in i)if(G9.call(i,r))return!1;return!0}var Y9=KP(function(i,e,r){rB(i,e,r)}),K9="Expected a function";function V9(i,e,r){var n=!0,a=!0;if(typeof i!="function")throw new TypeError(K9);return _a(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),iB(i,e,{leading:n,maxWait:e,trailing:a})}var Bl=Object.freeze({Linear:Object.freeze({None:function(i){return i},In:function(i){return i},Out:function(i){return i},InOut:function(i){return i}}),Quadratic:Object.freeze({In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}}),Cubic:Object.freeze({In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}}),Quartic:Object.freeze({In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}}),Quintic:Object.freeze({In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}}),Sinusoidal:Object.freeze({In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}}),Exponential:Object.freeze({In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}}),Circular:Object.freeze({In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}}),Elastic:Object.freeze({In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(i){var e=1.70158;return i===1?1:i*i*((e+1)*i-e)},Out:function(i){var e=1.70158;return i===0?0:--i*i*((e+1)*i+e)+1},InOut:function(i){var e=2.5949095;return(i*=2)<1?.5*(i*i*((e+1)*i-e)):.5*((i-=2)*i*((e+1)*i+e)+2)}}),Bounce:Object.freeze({In:function(i){return 1-Bl.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?Bl.Bounce.In(i*2)*.5:Bl.Bounce.Out(i*2-1)*.5+.5}}),generatePow:function(i){return i===void 0&&(i=4),i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(e){return Math.pow(e,i)},Out:function(e){return 1-Math.pow(1-e,i)},InOut:function(e){return e<.5?Math.pow(e*2,i)/2:(1-Math.pow(2-e*2,i))/2+.5}}}}),Vu=function(){return performance.now()},nB=(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=Vu()),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})(),iv={Linear:function(i,e){var r=i.length-1,n=r*e,a=Math.floor(n),o=iv.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}}},aB=(function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i})(),rv=new nB,Z2=(function(){function i(e,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Bl.Linear.None,this._interpolationFunction=iv.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=aB.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=rv,rv.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=Vu()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},i.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},i.prototype._setupProperties=function(e,r,n,a,o){for(var c in n){var h=e[c],u=Array.isArray(h),d=u?"array":typeof h,f=!u&&Array.isArray(n[c]);if(!(d==="undefined"||d==="function")){if(f){var g=n[c];if(g.length===0)continue;for(var x=[h],y=0,v=g.length;y<v;y+=1){var C=this._handleRelativeValue(h,g[y]);if(isNaN(C)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}x.push(C)}f&&(n[c]=x)}if((d==="object"||u)&&h&&!f){r[c]=u?[]:{};var _=h;for(var k in _)r[c][k]=_[k];a[c]=u?[]:{};var g=n[c];if(!this._isDynamic){var T={};for(var k in g)T[k]=g[k];n[c]=g=T}this._setupProperties(_,r[c],g,a[c],o)}else(typeof r[c]>"u"||o)&&(r[c]=h),u||(r[c]*=1),f?a[c]=n[c].slice().reverse():a[c]=r[c]||0}}},i.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},i.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},i.prototype.pause=function(e){return e===void 0&&(e=Vu()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},i.prototype.resume=function(e){return e===void 0&&(e=Vu()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},i.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},i.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},i.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},i.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},i.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},i.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},i.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},i.prototype.easing=function(e){return e===void 0&&(e=Bl.Linear.None),this._easingFunction=e,this},i.prototype.interpolation=function(e){return e===void 0&&(e=iv.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=Vu()),r===void 0&&(r=i.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var c=e-this._startTime,h=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),u=this._duration+this._repeat*h,d=function(){if(n._duration===0||c>u)return 1;var C=Math.trunc(c/h),_=c-C*h,k=Math.min(_/n._duration,1);return k===0&&c===n._duration?1:k},f=d(),g=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||c>=this._duration)if(this._repeat>0){var x=Math.min(Math.trunc((c-this._duration)/h)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=x);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=h*x,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,v=this._chainedTweens.length;y<v;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},i.prototype._updateProperties=function(e,r,n,a){for(var o in n)if(r[o]!==void 0){var c=r[o]||0,h=n[o],u=Array.isArray(e[o]),d=Array.isArray(h),f=!u&&d;f?e[o]=this._interpolationFunction(h,a):typeof h=="object"&&h?this._updateProperties(e[o],c,h,a):(h=this._handleRelativeValue(c,h),typeof h=="number"&&(e[o]=c+(h-c)*a))}},i.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},i.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],n=this._valuesEnd[e];typeof n=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(n):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},i.autoStartOnUpdate=!1,i})();aB.nextId;var Ga=rv;Ga.getAll.bind(Ga);Ga.removeAll.bind(Ga);Ga.add.bind(Ga);Ga.remove.bind(Ga);Ga.update.bind(Ga);function Q2(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 X9(i){if(Array.isArray(i))return i}function Z9(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Q9(i,e,r){return Object.defineProperty(i,"prototype",{writable:!1}),i}function J9(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 t7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
55
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e7(i,e){return X9(i)||J9(i,e)||i7(i,e)||t7()}function i7(i,e){if(i){if(typeof i=="string")return Q2(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)?Q2(i,e):void 0}}var r7=Q9(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;Z9(this,i),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function z1(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 r7(v,a[v])});return function v(){for(var C=arguments.length,_=new Array(C),k=0;k<C;k++)_[k]=arguments[k];var T=!!(this instanceof v&&this.constructor),E=T?_.shift():void 0,A=_[0],B=A===void 0?{}:A,L=Object.assign({},r instanceof Function?r(B):r,{initialised:!1}),N={};function M(P){return I(P,B),j(),M}var I=function(W,K){f.call(M,W,L,K),L.initialised=!0},j=iB(function(){L.initialised&&(x.call(M,L,N),N={})},1);return y.forEach(function(P){M[P.name]=W(P);function W(K){var z=K.name,G=K.triggerUpdate,D=G===void 0?!1:G,F=K.onChange,q=F===void 0?function(H,J){}:F,X=K.defaultVal,nt=X===void 0?null:X;return function(H){var J=L[z];if(!arguments.length)return J;var ht=H===void 0?nt:H;return L[z]=ht,q.call(M,ht,L,J),!N.hasOwnProperty(z)&&(N[z]=J),D&&j(),M}}}),Object.keys(c).forEach(function(P){M[P]=function(){for(var W,K=arguments.length,z=new Array(K),G=0;G<K;G++)z[G]=arguments[G];return(W=c[P]).call.apply(W,[M,L].concat(z))}}),Object.entries(u).forEach(function(P){var W=e7(P,2),K=W[0],z=W[1];return M[K]=M[z]}),M.resetProps=function(){return y.forEach(function(P){M[P.name](P.defaultVal)}),M},M.resetProps(),L._rerender=j,T&&E&&M(E),M}}var hi=(function(i){return typeof i=="function"?i:typeof i=="string"?function(e){return e[i]}:function(e){return i}});function gg(i){"@babel/helpers - typeof";return gg=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},gg(i)}var n7=/^\s+/,a7=/\s+$/;function ae(i,e){if(i=i||"",e=e||{},i instanceof ae)return i;if(!(this instanceof ae))return new ae(i,e);var r=s7(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}ae.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=sB(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=tT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=tT(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=J2(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=J2(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 eT(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return h7(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(Di(this._r,255)*100)+"%",g:Math.round(Di(this._g,255)*100)+"%",b:Math.round(Di(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Di(this._r,255)*100)+"%, "+Math.round(Di(this._g,255)*100)+"%, "+Math.round(Di(this._b,255)*100)+"%)":"rgba("+Math.round(Di(this._r,255)*100)+"%, "+Math.round(Di(this._g,255)*100)+"%, "+Math.round(Di(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:_7[eT(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+iT(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=ae(e);n="#"+iT(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 ae(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(p7,arguments)},brighten:function(){return this._applyModification(g7,arguments)},darken:function(){return this._applyModification(m7,arguments)},desaturate:function(){return this._applyModification(u7,arguments)},saturate:function(){return this._applyModification(d7,arguments)},greyscale:function(){return this._applyModification(f7,arguments)},spin:function(){return this._applyModification(y7,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(v7,arguments)},complement:function(){return this._applyCombination(b7,arguments)},monochromatic:function(){return this._applyCombination(C7,arguments)},splitcomplement:function(){return this._applyCombination(x7,arguments)},triad:function(){return this._applyCombination(rT,[3])},tetrad:function(){return this._applyCombination(rT,[4])}};ae.fromRatio=function(i,e){if(gg(i)=="object"){var r={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?r[n]=i[n]:r[n]=Xu(i[n]));i=r}return ae(i,e)};function s7(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=T7(i)),gg(i)=="object"&&(ys(i.r)&&ys(i.g)&&ys(i.b)?(e=o7(i.r,i.g,i.b),c=!0,h=String(i.r).substr(-1)==="%"?"prgb":"rgb"):ys(i.h)&&ys(i.s)&&ys(i.v)?(n=Xu(i.s),a=Xu(i.v),e=c7(i.h,n,a),c=!0,h="hsv"):ys(i.h)&&ys(i.s)&&ys(i.l)&&(n=Xu(i.s),o=Xu(i.l),e=l7(i.h,n,o),c=!0,h="hsl"),i.hasOwnProperty("a")&&(r=i.a)),r=sB(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 o7(i,e,r){return{r:Di(i,255)*255,g:Di(e,255)*255,b:Di(r,255)*255}}function J2(i,e,r){i=Di(i,255),e=Di(e,255),r=Di(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 l7(i,e,r){var n,a,o;i=Di(i,360),e=Di(e,100),r=Di(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 tT(i,e,r){i=Di(i,255),e=Di(e,255),r=Di(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 c7(i,e,r){i=Di(i,360)*6,e=Di(e,100),r=Di(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 eT(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 h7(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(oB(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 iT(i,e,r,n){var a=[xa(oB(n)),xa(Math.round(i).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(r).toString(16))];return a.join("")}ae.equals=function(i,e){return!i||!e?!1:ae(i).toRgbString()==ae(e).toRgbString()};ae.random=function(){return ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function u7(i,e){e=e===0?0:e||10;var r=ae(i).toHsl();return r.s-=e/100,r.s=sm(r.s),ae(r)}function d7(i,e){e=e===0?0:e||10;var r=ae(i).toHsl();return r.s+=e/100,r.s=sm(r.s),ae(r)}function f7(i){return ae(i).desaturate(100)}function p7(i,e){e=e===0?0:e||10;var r=ae(i).toHsl();return r.l+=e/100,r.l=sm(r.l),ae(r)}function g7(i,e){e=e===0?0:e||10;var r=ae(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)))),ae(r)}function m7(i,e){e=e===0?0:e||10;var r=ae(i).toHsl();return r.l-=e/100,r.l=sm(r.l),ae(r)}function y7(i,e){var r=ae(i).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,ae(r)}function b7(i){var e=ae(i).toHsl();return e.h=(e.h+180)%360,ae(e)}function rT(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ae(i).toHsl(),n=[ae(i)],a=360/e,o=1;o<e;o++)n.push(ae({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function x7(i){var e=ae(i).toHsl(),r=e.h;return[ae(i),ae({h:(r+72)%360,s:e.s,l:e.l}),ae({h:(r+216)%360,s:e.s,l:e.l})]}function v7(i,e,r){e=e||6,r=r||30;var n=ae(i).toHsl(),a=360/r,o=[ae(i)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(ae(n));return o}function C7(i,e){e=e||6;for(var r=ae(i).toHsv(),n=r.h,a=r.s,o=r.v,c=[],h=1/e;e--;)c.push(ae({h:n,s:a,v:o})),o=(o+h)%1;return c}ae.mix=function(i,e,r){r=r===0?0:r||50;var n=ae(i).toRgb(),a=ae(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 ae(c)};ae.readability=function(i,e){var r=ae(i),n=ae(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};ae.isReadable=function(i,e,r){var n=ae.readability(i,e),a,o;switch(o=!1,a=E7(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};ae.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=ae.readability(i,e[d]),o>a&&(a=o,n=ae(e[d]));return ae.isReadable(i,n,{level:h,size:u})||!c?n:(r.includeFallbackColors=!1,ae.mostReadable(i,["#fff","#000"],r))};var nv=ae.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"},_7=ae.hexNames=k7(nv);function k7(i){var e={};for(var r in i)i.hasOwnProperty(r)&&(e[i[r]]=r);return e}function sB(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Di(i,e){w7(i)&&(i="100%");var r=S7(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 sm(i){return Math.min(1,Math.max(0,i))}function jn(i){return parseInt(i,16)}function w7(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function S7(i){return typeof i=="string"&&i.indexOf("%")!=-1}function xa(i){return i.length==1?"0"+i:""+i}function Xu(i){return i<=1&&(i=i*100+"%"),i}function oB(i){return Math.round(parseFloat(i)*255).toString(16)}function nT(i){return jn(i)/255}var da=(function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+i+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function ys(i){return!!da.CSS_UNIT.exec(i)}function T7(i){i=i.replace(n7,"").replace(a7,"").toLowerCase();var e=!1;if(nv[i])i=nv[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=da.rgb.exec(i))?{r:r[1],g:r[2],b:r[3]}:(r=da.rgba.exec(i))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=da.hsl.exec(i))?{h:r[1],s:r[2],l:r[3]}:(r=da.hsla.exec(i))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=da.hsv.exec(i))?{h:r[1],s:r[2],v:r[3]}:(r=da.hsva.exec(i))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=da.hex8.exec(i))?{r:jn(r[1]),g:jn(r[2]),b:jn(r[3]),a:nT(r[4]),format:e?"name":"hex8"}:(r=da.hex6.exec(i))?{r:jn(r[1]),g:jn(r[2]),b:jn(r[3]),format:e?"name":"hex"}:(r=da.hex4.exec(i))?{r:jn(r[1]+""+r[1]),g:jn(r[2]+""+r[2]),b:jn(r[3]+""+r[3]),a:nT(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=da.hex3.exec(i))?{r:jn(r[1]+""+r[1]),g:jn(r[2]+""+r[2]),b:jn(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function E7(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 av(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 N7(i){if(Array.isArray(i))return av(i)}function lB(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 A7(i,e){if(e.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function M7(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(i,e){return i.get(lB(i,e))}function aT(i,e,r){A7(i,e),e.set(i,r)}function sT(i,e,r){return i.set(lB(i,e),r),r}function B7(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,F7(n.key),n)}}function L7(i,e,r){return e&&B7(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function O7(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function R7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
56
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j7(i){return N7(i)||O7(i)||I7(i)||R7()}function D7(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 F7(i){var e=D7(i,"string");return typeof e=="symbol"?e:e+""}function I7(i,e){if(i){if(typeof i=="string")return av(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)?av(i,e):void 0}}var $7=123,z7=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},cB=function(e,r,n){return(e<<16)+(r<<8)+n},P7=function(e){var r=ae(e).toRgb(),n=r.r,a=r.g,o=r.b;return cB(n,a,o)},oT=function(e,r){return e*$7%Math.pow(2,r)},ll=new WeakMap,bs=new WeakMap,q7=(function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;M7(this,i),aT(this,ll,void 0),aT(this,bs,void 0),sT(bs,this,e),this.reset()}return L7(i,[{key:"reset",value:function(){sT(ll,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Qn(ll,this).length>=Math.pow(2,24-Qn(bs,this)))return null;var n=Qn(ll,this).length,a=oT(n,Qn(bs,this)),o=z7(n+(a<<24-Qn(bs,this)));return Qn(ll,this).push(r),o}},{key:"lookup",value:function(r){if(!r)return null;var n=typeof r=="string"?P7(r):cB.apply(void 0,j7(r));if(!n)return null;var a=n&Math.pow(2,24-Qn(bs,this))-1,o=n>>24-Qn(bs,this)&Math.pow(2,Qn(bs,this))-1;return oT(a,Qn(bs,this))!==o||a>=Qn(ll,this).length?null:Qn(ll,this)[a]}}])})(),Ud,Fi,hB,uB,vo,lT,dB,fB,Yb,Wp,ad,pB,P1,sv,ov,mg={},yg=[],U7=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,om=Array.isArray;function Ha(i,e){for(var r in e)i[r]=e[r];return i}function q1(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function H7(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?Ud.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 sd(i,c,n,a,null)}function sd(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??++hB,__i:-1,__u:0};return a==null&&Fi.vnode!=null&&Fi.vnode(o),o}function lm(i){return i.children}function Gp(i,e){this.props=i,this.context=e}function xh(i,e){if(e==null)return i.__?xh(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"?xh(i):null}function W7(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),U1(i.__P,o,e,i.__n,i.__P.namespaceURI,32&e.__u?[r]:null,n,r??xh(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,bB(n,o,a),e.__e=e.__=null,o.__e!=r&&gB(o)}}function gB(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}),gB(i)}function cT(i){(!i.__d&&(i.__d=!0)&&vo.push(i)&&!bg.__r++||lT!=Fi.debounceRendering)&&((lT=Fi.debounceRendering)||dB)(bg)}function bg(){try{for(var i,e=1;vo.length;)vo.length>e&&vo.sort(fB),i=vo.shift(),e=vo.length,W7(i)}finally{vo.length=bg.__r=0}}function mB(i,e,r,n,a,o,c,h,u,d,f){var g,x,y,v,C,_,k,T=n&&n.__k||yg,E=e.length;for(u=G7(r,e,T,u,E),g=0;g<E;g++)(y=r.__k[g])!=null&&(x=y.__i!=-1&&T[y.__i]||mg,y.__i=g,_=U1(i,y,x,a,o,c,h,u,d,f),v=y.__e,y.ref&&x.ref!=y.ref&&(x.ref&&H1(x.ref,null,y),f.push(y.ref,y.__c||v,y)),C==null&&v!=null&&(C=v),(k=!!(4&y.__u))||x.__k===y.__k?(u=yB(y,u,i,k),k&&x.__e&&(x.__e=null)):typeof y.type=="function"&&_!==void 0?u=_:v&&(u=v.nextSibling),y.__u&=-7);return r.__e=C,u}function G7(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]=sd(null,c,null,null,null):om(c)?c=i.__k[o]=sd(lm,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=i.__k[o]=sd(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=Y7(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=xh(h)),vB(h,h));return n}function yB(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=yB(a[o],e,r,n));return e}i.__e!=e&&(n&&(e&&i.type&&!e.parentNode&&(e=xh(i)),r.insertBefore(i.__e,e||null)),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Y7(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 hT(i,e,r){e[0]=="-"?i.setProperty(e,r??""):i[e]=r==null?"":typeof r!="number"||U7.test(e)?r:r+"px"}function xp(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||hT(i.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||hT(i.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(pB,"$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[ad]=n[ad]:(r[ad]=P1,i.addEventListener(e,o?ov:sv,o)):i.removeEventListener(e,o?ov:sv,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 uT(i){return function(e){if(this.l){var r=this.l[e.type+i];if(e[Wp]==null)e[Wp]=P1++;else if(e[Wp]<r[ad])return;return r(Fi.event?Fi.event(e):e)}}}function U1(i,e,r,n,a,o,c,h,u,d){var f,g,x,y,v,C,_,k,T,E,A,B,L,N,M,I=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),o=[h=e.__e=r.__e]),(f=Fi.__b)&&f(e);t:if(typeof I=="function")try{if(k=e.props,T=I.prototype&&I.prototype.render,E=(f=I.contextType)&&n[f.__c],A=f?E?E.props.value:f.__:n,r.__c?_=(g=e.__c=r.__c).__=g.__E:(T?e.__c=g=new I(k,A):(e.__c=g=new Gp(k,A),g.constructor=I,g.render=V7),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&&I.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Ha({},g.__s)),Ha(g.__s,I.getDerivedStateFromProps(k,g.__s))),y=g.props,v=g.state,g.__v=e,x)T&&I.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&I.getDerivedStateFromProps==null&&k!==y&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(k,A),e.__v==r.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(k,g.__s,A)===!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(j){j&&(j.__=e)}),yg.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(k,g.__s,A),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(y,v,C)})}if(g.context=A,g.props=k,g.__P=i,g.__e=!1,B=Fi.__r,L=0,T)g.state=g.__s,g.__d=!1,B&&B(e),f=g.render(g.props,g.state,g.context),yg.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&&++L<25);g.state=g.__s,g.getChildContext!=null&&(n=Ha(Ha({},n),g.getChildContext())),T&&!x&&g.getSnapshotBeforeUpdate!=null&&(C=g.getSnapshotBeforeUpdate(y,v)),N=f!=null&&f.type===lm&&f.key==null?xB(f.props.children):f,h=mB(i,om(N)?N:[N],e,r,n,a,o,c,h,u,d),g.base=e.__e,e.__u&=-161,g.__h.length&&c.push(g),_&&(g.__E=g.__=null)}catch(j){if(e.__v=null,u||o!=null)if(j.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--;)q1(o[M]);lv(e)}else e.__e=r.__e,e.__k=r.__k,j.then||lv(e);Fi.__e(j,e,r)}else o==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):h=e.__e=K7(r.__e,e,r,n,a,o,c,u,d);return(f=Fi.diffed)&&f(e),128&e.__u?void 0:h}function lv(i){i&&(i.__c&&(i.__c.__e=!0),i.__k&&i.__k.some(lv))}function bB(i,e,r){for(var n=0;n<r.length;n++)H1(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 xB(i){return typeof i!="object"||i==null||i.__b>0?i:om(i)?i.map(xB):Ha({},i)}function K7(i,e,r,n,a,o,c,h,u){var d,f,g,x,y,v,C,_=r.props||mg,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)_===k||h&&i.data==k||(i.data=k);else{if(o=o&&Ud.call(i.childNodes),!h&&o!=null)for(_={},d=0;d<i.attributes.length;d++)_[(y=i.attributes[d]).name]=y.value;for(d in _)y=_[d],d=="dangerouslySetInnerHTML"?g=y:d=="children"||d in k||d=="value"&&"defaultValue"in k||d=="checked"&&"defaultChecked"in k||xp(i,d,null,y,a);for(d in k)y=k[d],d=="children"?x=y:d=="dangerouslySetInnerHTML"?f=y:d=="value"?v=y:d=="checked"?C=y:h&&typeof y!="function"||_[d]===y||xp(i,d,y,_[d],a);if(f)h||g&&(f.__html==g.__html||f.__html==i.innerHTML)||(i.innerHTML=f.__html),e.__k=[];else if(g&&(i.innerHTML=""),mB(e.type=="template"?i.content:i,om(x)?x:[x],e,r,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:r.__k&&xh(r,0),h,u),o!=null)for(d=o.length;d--;)q1(o[d]);h||(d="value",T=="progress"&&v==null?i.removeAttribute("value"):v!=null&&(v!==i[d]||T=="progress"&&!v||T=="option"&&v!=_[d])&&xp(i,d,v,_[d],a),d="checked",C!=null&&C!=i[d]&&xp(i,d,C,_[d],a))}return i}function H1(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 vB(i,e,r){var n,a;if(Fi.unmount&&Fi.unmount(i),(n=i.ref)&&(n.current&&n.current!=i.__e||H1(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]&&vB(n[a],e,r||typeof i.type!="function");r||q1(i.__e),i.__c=i.__=i.__e=void 0}function V7(i,e,r){return this.constructor(i,r)}function X7(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=[],U1(e,i=e.__k=H7(lm,null,[i]),a||mg,mg,e.namespaceURI,a?null:e.firstChild?Ud.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),bB(o,i,c)}function CB(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?Ud.call(arguments,2):r),sd(i.type,h,n||i.key,a||i.ref,null)}Ud=yg.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}},hB=0,uB=function(i){return i!=null&&i.constructor===void 0},Gp.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),cT(this))},Gp.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),cT(this))},Gp.prototype.render=lm,vo=[],dB=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fB=function(i,e){return i.__v.__b-e.__v.__b},bg.__r=0,Yb=Math.random().toString(8),Wp="__d"+Yb,ad="__a"+Yb,pB=/(PointerCapture)$|Capture$/i,P1=0,sv=uT(!1),ov=uT(!0);function dT(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 Z7(i){if(Array.isArray(i))return i}function Q7(i,e,r){return(e=nU(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function J7(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 tU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fT(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 eU(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fT(Object(r),!0).forEach(function(n){Q7(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):fT(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function iU(i,e){return Z7(i)||J7(i,e)||aU(i,e)||tU()}function rU(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 nU(i){var e=rU(i,"string");return typeof e=="symbol"?e:e+""}function xg(i){"@babel/helpers - typeof";return xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xg(i)}function aU(i,e){if(i){if(typeof i=="string")return dT(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)?dT(i,e):void 0}}var cv=function(e){if(xg(e)!=="object")return e;var r=CB(e);if(r.props){var n;r.props=eU({},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(cv):cv(r.props.children))}return r},sU=function(e){return uB(CB(e))},oU=function(e,r){delete r.__k,X7(cv(e),r)};function lU(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 cU=`.float-tooltip-kap {
|
|
58
|
+
position: absolute;
|
|
59
|
+
width: max-content; /* prevent shrinking near right edge */
|
|
60
|
+
max-width: max(50%, 150px);
|
|
61
|
+
padding: 3px 5px;
|
|
62
|
+
border-radius: 3px;
|
|
63
|
+
font: 12px sans-serif;
|
|
64
|
+
color: #eee;
|
|
65
|
+
background: rgba(0,0,0,0.6);
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
}
|
|
68
|
+
`;lU(cU);var hU=z1({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&&xg(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=iU(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):sU(e.content)?(e.tooltipEl.text(""),oU(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 uU(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 dU(i){const e=+this._x.call(null,i);return _B(this.cover(e),e,i)}function _B(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 fU(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)_B(this,r[o],i[o]);return this}function pU(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 gU(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function mU(i){return arguments.length?this.cover(+i[0][0]).cover(+i[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Ls(i,e,r){this.node=i,this.x0=e,this.x1=r}function yU(i,e){var r,n=this._x0,a,o,c=this._x1,h=[],u=this._root,d,f;for(u&&h.push(new Ls(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 Ls(u[1],g,o),new Ls(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 bU(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 xU(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function vU(){return this._root}function CU(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function _U(i){var e=[],r,n=this._root,a,o,c;for(n&&e.push(new Ls(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 Ls(a,h,c)),(a=n[0])&&e.push(new Ls(a,o,h))}return this}function kU(i){var e=[],r=[],n;for(this._root&&e.push(new Ls(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 Ls(o,c,u)),(o=a[1])&&e.push(new Ls(o,u,h))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.x1);return this}function wU(i){return i[0]}function SU(i){return arguments.length?(this._x=i,this):this._x}function W1(i,e){var r=new G1(e??wU,NaN,NaN);return i==null?r:r.addAll(i)}function G1(i,e,r){this._x=i,this._x0=e,this._x1=r,this._root=void 0}function pT(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Cn=W1.prototype=G1.prototype;Cn.copy=function(){var i=new G1(this._x,this._x0,this._x1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=pT(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]=pT(n));return i};Cn.add=dU;Cn.addAll=fU;Cn.cover=pU;Cn.data=gU;Cn.extent=mU;Cn.find=yU;Cn.remove=bU;Cn.removeAll=xU;Cn.root=vU;Cn.size=CU;Cn.visit=_U;Cn.visitAfter=kU;Cn.x=SU;function TU(i){const e=+this._x.call(null,i),r=+this._y.call(null,i);return kB(this.cover(e,r),e,r,i)}function kB(i,e,r,n){if(isNaN(e)||isNaN(r))return i;var a,o=i._root,c={data:n},h=i._x0,u=i._y0,d=i._x1,f=i._y1,g,x,y,v,C,_,k,T;if(!o)return i._root=c,i;for(;o.length;)if((C=e>=(g=(h+d)/2))?h=g:d=g,(_=r>=(x=(u+f)/2))?u=x:f=x,a=o,!(o=o[k=_<<1|C]))return a[k]=c,i;if(y=+i._x.call(null,o.data),v=+i._y.call(null,o.data),e===y&&r===v)return c.next=o,a?a[k]=c:i._root=c,i;do a=a?a[k]=new Array(4):i._root=new Array(4),(C=e>=(g=(h+d)/2))?h=g:d=g,(_=r>=(x=(u+f)/2))?u=x:f=x;while((k=_<<1|C)===(T=(v>=x)<<1|y>=g));return a[T]=o,a[k]=c,i}function EU(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)kB(this,c[r],h[r],i[r]);return this}function NU(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 AU(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function MU(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 BU(i,e,r){var n,a=this._x0,o=this._y0,c,h,u,d,f=this._x1,g=this._y1,x=[],y=this._root,v,C;for(y&&x.push(new Qr(y,a,o,f,g)),r==null?r=1/0:(a=i-r,o=e-r,f=i+r,g=e+r,r*=r);v=x.pop();)if(!(!(y=v.node)||(c=v.x0)>f||(h=v.y0)>g||(u=v.x1)<a||(d=v.y1)<o))if(y.length){var _=(c+u)/2,k=(h+d)/2;x.push(new Qr(y[3],_,k,u,d),new Qr(y[2],c,k,_,d),new Qr(y[1],_,h,u,k),new Qr(y[0],c,h,_,k)),(C=(e>=k)<<1|i>=_)&&(v=x[x.length-1],x[x.length-1]=x[x.length-1-C],x[x.length-1-C]=v)}else{var T=i-+this._x.call(null,y.data),E=e-+this._y.call(null,y.data),A=T*T+E*E;if(A<r){var B=Math.sqrt(r=A);a=i-B,o=e-B,f=i+B,g=e+B,n=y.data}}return n}function LU(i){if(isNaN(f=+this._x.call(null,i))||isNaN(g=+this._y.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._y0,u=this._x1,d=this._y1,f,g,x,y,v,C,_,k;if(!r)return this;if(r.length)for(;;){if((v=f>=(x=(c+u)/2))?c=x:u=x,(C=g>=(y=(h+d)/2))?h=y:d=y,e=r,!(r=r[_=C<<1|v]))return this;if(!r.length)break;(e[_+1&3]||e[_+2&3]||e[_+3&3])&&(n=e,k=_)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[_]=o:delete e[_],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[k]=r:this._root=r),this):(this._root=o,this)}function OU(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function RU(){return this._root}function jU(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function DU(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 FU(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 IU(i){return i[0]}function $U(i){return arguments.length?(this._x=i,this):this._x}function zU(i){return i[1]}function PU(i){return arguments.length?(this._y=i,this):this._y}function Y1(i,e,r){var n=new K1(e??IU,r??zU,NaN,NaN,NaN,NaN);return i==null?n:n.addAll(i)}function K1(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 gT(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var sn=Y1.prototype=K1.prototype;sn.copy=function(){var i=new K1(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=gT(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]=gT(n));return i};sn.add=TU;sn.addAll=EU;sn.cover=NU;sn.data=AU;sn.extent=MU;sn.find=BU;sn.remove=LU;sn.removeAll=OU;sn.root=RU;sn.size=jU;sn.visit=DU;sn.visitAfter=FU;sn.x=$U;sn.y=PU;function qU(i){const e=+this._x.call(null,i),r=+this._y.call(null,i),n=+this._z.call(null,i);return wB(this.cover(e,r,n),e,r,n,i)}function wB(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,A,B,L,N,M;if(!c)return i._root=h,i;for(;c.length;)if((A=e>=(v=(u+g)/2))?u=v:g=v,(B=r>=(C=(d+x)/2))?d=C:x=C,(L=n>=(_=(f+y)/2))?f=_:y=_,o=c,!(c=c[N=L<<2|B<<1|A]))return o[N]=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[N]=h:i._root=h,i;do o=o?o[N]=new Array(8):i._root=new Array(8),(A=e>=(v=(u+g)/2))?u=v:g=v,(B=r>=(C=(d+x)/2))?d=C:x=C,(L=n>=(_=(f+y)/2))?f=_:y=_;while((N=L<<2|B<<1|A)===(M=(E>=_)<<2|(T>=C)<<1|k>=v));return o[M]=c,o[N]=h,i}function UU(i){Array.isArray(i)||(i=Array.from(i));const e=i.length,r=new Float64Array(e),n=new Float64Array(e),a=new Float64Array(e);let o=1/0,c=1/0,h=1/0,u=-1/0,d=-1/0,f=-1/0;for(let g=0,x,y,v,C;g<e;++g)isNaN(y=+this._x.call(null,x=i[g]))||isNaN(v=+this._y.call(null,x))||isNaN(C=+this._z.call(null,x))||(r[g]=y,n[g]=v,a[g]=C,y<o&&(o=y),y>u&&(u=y),v<c&&(c=v),v>d&&(d=v),C<h&&(h=C),C>f&&(f=C));if(o>u||c>d||h>f)return this;this.cover(o,c,h).cover(u,d,f);for(let g=0;g<e;++g)wB(this,r[g],n[g],a[g],i[g]);return this}function HU(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 WU(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function GU(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 YU(i,e,r,n){var a,o=this._x0,c=this._y0,h=this._z0,u,d,f,g,x,y,v=this._x1,C=this._y1,_=this._z1,k=[],T=this._root,E,A;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,C=e+n,_=r+n,n*=n);E=k.pop();)if(!(!(T=E.node)||(u=E.x0)>v||(d=E.y0)>C||(f=E.z0)>_||(g=E.x1)<o||(x=E.y1)<c||(y=E.z1)<h))if(T.length){var B=(u+g)/2,L=(d+x)/2,N=(f+y)/2;k.push(new Si(T[7],B,L,N,g,x,y),new Si(T[6],u,L,N,B,x,y),new Si(T[5],B,d,N,g,L,y),new Si(T[4],u,d,N,B,L,y),new Si(T[3],B,L,f,g,x,N),new Si(T[2],u,L,f,B,x,N),new Si(T[1],B,d,f,g,L,N),new Si(T[0],u,d,f,B,L,N)),(A=(r>=N)<<2|(e>=L)<<1|i>=B)&&(E=k[k.length-1],k[k.length-1]=k[k.length-1-A],k[k.length-1-A]=E)}else{var M=i-+this._x.call(null,T.data),I=e-+this._y.call(null,T.data),j=r-+this._z.call(null,T.data),P=M*M+I*I+j*j;if(P<n){var W=Math.sqrt(n=P);o=i-W,c=e-W,h=r-W,v=i+W,C=e+W,_=r+W,a=T.data}}return a}const KU=(i,e,r,n,a,o)=>Math.sqrt((i-n)**2+(e-a)**2+(r-o)**2);function VU(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;KU(i,e,r,this._x(T),this._y(T),this._z(T))<=n&&a.push(T)}while(g=g.next);return x>u||y>d||v>f||C<o||_<c||k<h}),a}function XU(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,A,B,L;if(!r)return this;if(r.length)for(;;){if((T=x>=(C=(c+d)/2))?c=C:d=C,(E=y>=(_=(h+f)/2))?h=_:f=_,(A=v>=(k=(u+g)/2))?u=k:g=k,e=r,!(r=r[B=A<<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,L=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[L]=r:this._root=r),this):(this._root=o,this)}function ZU(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function QU(){return this._root}function JU(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function tH(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 eH(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 iH(i){return i[0]}function rH(i){return arguments.length?(this._x=i,this):this._x}function nH(i){return i[1]}function aH(i){return arguments.length?(this._y=i,this):this._y}function sH(i){return i[2]}function oH(i){return arguments.length?(this._z=i,this):this._z}function V1(i,e,r,n){var a=new X1(e??iH,r??nH,n??sH,NaN,NaN,NaN,NaN,NaN,NaN);return i==null?a:a.addAll(i)}function X1(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 mT(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var jr=V1.prototype=X1.prototype;jr.copy=function(){var i=new X1(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=mT(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]=mT(n));return i};jr.add=qU;jr.addAll=UU;jr.cover=HU;jr.data=WU;jr.extent=GU;jr.find=YU;jr.findAllWithinRadius=VU;jr.remove=XU;jr.removeAll=ZU;jr.root=QU;jr.size=JU;jr.visit=tH;jr.visitAfter=eH;jr.x=rH;jr.y=aH;jr.z=oH;function vr(i){return function(){return i}}function na(i){return(i()-.5)*1e-6}function Kb(i){return i.x+i.vx}function yT(i){return i.y+i.vy}function lH(i){return i.z+i.vz}function cH(i){var e,r,n,a,o=1,c=1;typeof i!="function"&&(i=vr(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?W1(e,Kb):r===2?Y1(e,Kb,yT):r===3?V1(e,Kb,yT,lH):null).visitAfter(u),f=0;f<g;++f)y=e[f],k=n[y.index],T=k*k,v=y.x+y.vx,r>1&&(C=y.y+y.vy),r>2&&(_=y.z+y.vz),x.visit(A);function A(B,L,N,M,I,j,P){var W=[L,N,M,I,j,P],K=W[0],z=W[1],G=W[2],D=W[r],F=W[r+1],q=W[r+2],X=B.data,nt=B.r,H=k+nt;if(X){if(X.index>y.index){var J=v-X.x-X.vx,ht=r>1?C-X.y-X.vy:0,at=r>2?_-X.z-X.vz:0,vt=J*J+ht*ht+at*at;vt<H*H&&(J===0&&(J=na(a),vt+=J*J),r>1&&ht===0&&(ht=na(a),vt+=ht*ht),r>2&&at===0&&(at=na(a),vt+=at*at),vt=(H-(vt=Math.sqrt(vt)))/vt*o,y.vx+=(J*=vt)*(H=(nt*=nt)/(T+nt)),r>1&&(y.vy+=(ht*=vt)*H),r>2&&(y.vz+=(at*=vt)*H),X.vx-=J*(H=1-H),r>1&&(X.vy-=ht*H),r>2&&(X.vz-=at*H))}return}return K>v+H||D<v-H||r>1&&(z>C+H||F<C-H)||r>2&&(G>_+H||q<_-H)}}function u(f){if(f.data)return f.r=n[f.data.index];for(var g=f.r=0;g<Math.pow(2,r);++g)f[g]&&f[g].r>f.r&&(f.r=f[g].r)}function d(){if(e){var f,g=e.length,x;for(n=new Array(g),f=0;f<g;++f)x=e[f],n[x.index]=+i(x,f,e)}}return h.initialize=function(f,...g){e=f,a=g.find(x=>typeof x=="function")||Math.random,r=g.find(x=>[1,2,3].includes(x))||2,d()},h.iterations=function(f){return arguments.length?(c=+f,h):c},h.strength=function(f){return arguments.length?(o=+f,h):o},h.radius=function(f){return arguments.length?(i=typeof f=="function"?f:vr(+f),d(),h):i},h}function hH(i){return i.index}function bT(i,e){var r=i.get(e);if(!r)throw new Error("node not found: "+e);return r}function uH(i){var e=hH,r=x,n,a=vr(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 A=0,B,L,N,M=0,I=0,j=0,P,W;A<E;++A)B=i[A],L=B.source,N=B.target,M=N.x+N.vx-L.x-L.vx||na(f),h>1&&(I=N.y+N.vy-L.y-L.vy||na(f)),h>2&&(j=N.z+N.vz-L.z-L.vz||na(f)),P=Math.sqrt(M*M+I*I+j*j),P=(P-o[A])/P*k*n[A],M*=P,I*=P,j*=P,N.vx-=M*(W=d[A]),h>1&&(N.vy-=I*W),h>2&&(N.vz-=j*W),L.vx+=M*(W=1-W),h>1&&(L.vy+=I*W),h>2&&(L.vz+=j*W)}function v(){if(c){var k,T=c.length,E=i.length,A=new Map(c.map((L,N)=>[e(L,N,c),L])),B;for(k=0,u=new Array(T);k<E;++k)B=i[k],B.index=k,typeof B.source!="object"&&(B.source=bT(A,B.source)),typeof B.target!="object"&&(B.target=bT(A,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),C(),o=new Array(E),_()}}function C(){if(c)for(var k=0,T=i.length;k<T;++k)n[k]=+r(i[k],k,i)}function _(){if(c)for(var k=0,T=i.length;k<T;++k)o[k]=+a(i[k],k,i)}return y.initialize=function(k,...T){c=k,f=T.find(E=>typeof E=="function")||Math.random,h=T.find(E=>[1,2,3].includes(E))||2,v()},y.links=function(k){return arguments.length?(i=k,v(),y):i},y.id=function(k){return arguments.length?(e=k,y):e},y.iterations=function(k){return arguments.length?(g=+k,y):g},y.strength=function(k){return arguments.length?(r=typeof k=="function"?k:vr(+k),C(),y):r},y.distance=function(k){return arguments.length?(a=typeof k=="function"?k:vr(+k),_(),y):a},y}const dH=1664525,fH=1013904223,xT=4294967296;function pH(){let i=1;return()=>(i=(dH*i+fH)%xT)/xT}var vT=3;function Vb(i){return i.x}function CT(i){return i.y}function gH(i){return i.z}var mH=10,yH=Math.PI*(3-Math.sqrt(5)),bH=Math.PI*20/(9+Math.sqrt(221));function xH(i,e){e=e||2;var r=Math.min(vT,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=L1(y),g=zd("tick","end"),x=pH();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,A;k===void 0&&(k=1);for(var B=0;B<k;++B)for(a+=(h-a)*c,d.forEach(function(L){L(a)}),T=0;T<E;++T)A=i[T],A.fx==null?A.x+=A.vx*=u:(A.x=A.fx,A.vx=0),r>1&&(A.fy==null?A.y+=A.vy*=u:(A.y=A.fy,A.vy=0)),r>2&&(A.fz==null?A.z+=A.vz*=u:(A.z=A.fz,A.vz=0));return n}function C(){for(var k=0,T=i.length,E;k<T;++k){if(E=i[k],E.index=k,E.fx!=null&&(E.x=E.fx),E.fy!=null&&(E.y=E.fy),E.fz!=null&&(E.z=E.fz),isNaN(E.x)||r>1&&isNaN(E.y)||r>2&&isNaN(E.z)){var A=mH*(r>2?Math.cbrt(.5+k):r>1?Math.sqrt(.5+k):k),B=k*yH,L=k*bH;r===1?E.x=A:r===2?(E.x=A*Math.cos(B),E.y=A*Math.sin(B)):(E.x=A*Math.sin(B)*Math.cos(L),E.y=A*Math.cos(B),E.z=A*Math.sin(B)*Math.sin(L))}(isNaN(E.vx)||r>1&&isNaN(E.vy)||r>2&&isNaN(E.vz))&&(E.vx=0,r>1&&(E.vy=0),r>2&&(E.vz=0))}}function _(k){return k.initialize&&k.initialize(i,x,r),k}return C(),n={tick:v,restart:function(){return f.restart(y),n},stop:function(){return f.stop(),n},numDimensions:function(k){return arguments.length?(r=Math.min(vT,Math.max(1,Math.round(k))),d.forEach(_),n):r},nodes:function(k){return arguments.length?(i=k,C(),d.forEach(_),n):i},alpha:function(k){return arguments.length?(a=+k,n):a},alphaMin:function(k){return arguments.length?(o=+k,n):o},alphaDecay:function(k){return arguments.length?(c=+k,n):+c},alphaTarget:function(k){return arguments.length?(h=+k,n):h},velocityDecay:function(k){return arguments.length?(u=1-k,n):1-u},randomSource:function(k){return arguments.length?(x=k,d.forEach(_),n):x},force:function(k,T){return arguments.length>1?(T==null?d.delete(k):d.set(k,_(T)),n):d.get(k)},find:function(){var k=Array.prototype.slice.call(arguments),T=k.shift()||0,E=(r>1?k.shift():null)||0,A=(r>2?k.shift():null)||0,B=k.shift()||1/0,L=0,N=i.length,M,I,j,P,W,K;for(B*=B,L=0;L<N;++L)W=i[L],M=T-W.x,I=E-(W.y||0),j=A-(W.z||0),P=M*M+I*I+j*j,P<B&&(K=W,B=P);return K},on:function(k,T){return arguments.length>1?(g.on(k,T),n):g.on(k)}}}function vH(){var i,e,r,n,a,o=vr(-30),c,h=1,u=1/0,d=.81;function f(v){var C,_=i.length,k=(e===1?W1(i,Vb):e===2?Y1(i,Vb,CT):e===3?V1(i,Vb,CT,gH):null).visitAfter(x);for(a=v,C=0;C<_;++C)r=i[C],k.visit(y)}function g(){if(i){var v,C=i.length,_;for(c=new Array(C),v=0;v<C;++v)_=i[v],c[_.index]=+o(_,v,i)}}function x(v){var C=0,_,k,T=0,E,A,B,L,N=v.length;if(N){for(E=A=B=L=0;L<N;++L)(_=v[L])&&(k=Math.abs(_.value))&&(C+=_.value,T+=k,E+=k*(_.x||0),A+=k*(_.y||0),B+=k*(_.z||0));C*=Math.sqrt(4/N),v.x=E/T,e>1&&(v.y=A/T),e>2&&(v.z=B/T)}else{_=v,_.x=_.data.x,e>1&&(_.y=_.data.y),e>2&&(_.z=_.data.z);do C+=c[_.data.index];while(_=_.next)}v.value=C}function y(v,C,_,k,T){if(!v.value)return!0;var E=[_,k,T][e-1],A=v.x-r.x,B=e>1?v.y-r.y:0,L=e>2?v.z-r.z:0,N=E-C,M=A*A+B*B+L*L;if(N*N/d<M)return M<u&&(A===0&&(A=na(n),M+=A*A),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&L===0&&(L=na(n),M+=L*L),M<h&&(M=Math.sqrt(h*M)),r.vx+=A*v.value*a/M,e>1&&(r.vy+=B*v.value*a/M),e>2&&(r.vz+=L*v.value*a/M)),!0;if(v.length||M>=u)return;(v.data!==r||v.next)&&(A===0&&(A=na(n),M+=A*A),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&L===0&&(L=na(n),M+=L*L),M<h&&(M=Math.sqrt(h*M)));do v.data!==r&&(N=c[v.data.index]*a/M,r.vx+=A*N,e>1&&(r.vy+=B*N),e>2&&(r.vz+=L*N));while(v=v.next)}return f.initialize=function(v,...C){i=v,n=C.find(_=>typeof _=="function")||Math.random,e=C.find(_=>[1,2,3].includes(_))||2,g()},f.strength=function(v){return arguments.length?(o=typeof v=="function"?v:vr(+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 CH(i,e,r,n){var a,o,c=vr(.1),h,u;typeof i!="function"&&(i=vr(+i)),e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function d(g){for(var x=0,y=a.length;x<y;++x){var v=a[x],C=v.x-e||1e-6,_=(v.y||0)-r||1e-6,k=(v.z||0)-n||1e-6,T=Math.sqrt(C*C+_*_+k*k),E=(u[x]-T)*h[x]*g/T;v.vx+=C*E,o>1&&(v.vy+=_*E),o>2&&(v.vz+=k*E)}}function f(){if(a){var g,x=a.length;for(h=new Array(x),u=new Array(x),g=0;g<x;++g)u[g]=+i(a[g],g,a),h[g]=isNaN(u[g])?0:+c(a[g],g,a)}}return d.initialize=function(g,...x){a=g,o=x.find(y=>[1,2,3].includes(y))||2,f()},d.strength=function(g){return arguments.length?(c=typeof g=="function"?g:vr(+g),f(),d):c},d.radius=function(g){return arguments.length?(i=typeof g=="function"?g:vr(+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 _H(i){var e=vr(.1),r,n,a;typeof i!="function"&&(i=vr(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:vr(+h),c(),o):e},o.x=function(h){return arguments.length?(i=typeof h=="function"?h:vr(+h),c(),o):i},o}function kH(i){var e=vr(.1),r,n,a;typeof i!="function"&&(i=vr(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:vr(+h),c(),o):e},o.y=function(h){return arguments.length?(i=typeof h=="function"?h:vr(+h),c(),o):i},o}const{abs:wu,cos:xs,sin:Sc,acos:wH,atan2:Su,sqrt:go,pow:ea}=Math;function Tu(i){return i<0?-ea(-i,1/3):ea(i,1/3)}const SB=Math.PI,vp=2*SB,mo=SB/2,SH=1e-6,Xb=Number.MAX_SAFE_INTEGER||9007199254740991,Zb=Number.MIN_SAFE_INTEGER||-9007199254740991,TH={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),go(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],TH],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 wu(i-e)<=(r||SH)},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 Su(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 go(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 wu(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=Xb,r=Xb,n=Zb,a=Zb;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=Xb,a=Zb,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=-Su(e.p2.y-n,e.p2.x-r),o=function(c){return{x:(c.x-r)*xs(a)-(c.y-n)*Sc(a),y:(c.x-r)*Sc(a)+(c.y-n)*xs(a)}};return i.map(o)},roots:function(i,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=i.length-1,n=Ot.align(i,e),a=function(N){return 0<=N&&N<=1};if(r===2){const N=n[0].y,M=n[1].y,I=n[2].y,j=N-2*M+I;if(j!==0){const P=-go(M*M-N*I),W=-N+M,K=-(P+W)/j,z=-(-P+W)/j;return[K,z].filter(a)}else if(M!==I&&j===0)return[(2*M-I)/(2*M-2*I)].filter(a);return[]}const o=n[0].y,c=n[1].y,h=n[2].y,u=n[3].y;let d=-o+3*c-3*h+u,f=3*o-6*c+3*h,g=-3*o+3*c,x=o;if(Ot.approximately(d,0)){if(Ot.approximately(f,0))return Ot.approximately(g,0)?[]:[-x/g].filter(a);const N=go(g*g-4*f*x),M=2*f;return[(N-g)/M,(-g-N)/M].filter(a)}f/=d,g/=d,x/=d;const y=(3*g-f*f)/3,v=y/3,C=(2*f*f*f-9*f*g+27*x)/27,_=C/2,k=_*_+v*v*v;let T,E,A,B,L;if(k<0){const N=-y/3,M=N*N*N,I=go(M),j=-C/(2*I),P=j<-1?-1:j>1?1:j,W=wH(P),K=Tu(I),z=2*K;return A=z*xs(W/3)-f/3,B=z*xs((W+vp)/3)-f/3,L=z*xs((W+2*vp)/3)-f/3,[A,B,L].filter(a)}else{if(k===0)return T=_<0?Tu(-_):-Tu(_),A=2*T-f/3,B=-T-f/3,[A,B].filter(a);{const N=go(k);return T=Tu(-_+N),E=Tu(_+N),[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=-go(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=go(ea(g.y*x.z-x.y*g.z,2)+ea(g.z*x.x-x.z*g.x,2)+ea(g.x*x.y-x.x*g.y,2)),c=ea(y+g.z*g.z,3/2)):(o=g.x*x.y-g.y*x.x,c=ea(y,3/2)),o===0||c===0)return{k:0,r:0};if(d=o/c,f=c/o,!a){const v=Ot.curvature(i-.001,e,r,n,!0).k,C=Ot.curvature(i+.001,e,r,n,!0).k;u=(C-d+(d-v))/2,h=(wu(C-d)+wu(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,wu(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*xs(mo)-a*Sc(mo),u=n*Sc(mo)+a*xs(mo),d=o*xs(mo)-c*Sc(mo),f=o*Sc(mo)+c*xs(mo),g=(i.x+e.x)/2,x=(i.y+e.y)/2,y=(e.x+r.x)/2,v=(e.y+r.y)/2,C=g+h,_=x+u,k=y+d,T=v+f,E=Ot.lli8(g,x,C,_,y,v,k,T),A=Ot.dist(E,i);let B=Su(i.y-E.y,i.x-E.x),L=Su(e.y-E.y,e.x-E.x),N=Su(r.y-E.y,r.x-E.x),M;return B<N?((B>L||L>N)&&(B+=vp),B>N&&(M=N,N=B,B=M)):N<L&&L<B?(M=N,N=B,B=M):N+=vp,E.s=B,E.e=N,E.r=A,E},numberSort:function(i,e){return i-e}};class od{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 od(r)}}const{abs:Eu,min:_T,max:kT,cos:EH,sin:NH,acos:AH,sqrt:Nu}=Math,MH=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(C){typeof v[C]<"u"&&y.push(v[C])})}),r=y}let a=!1;const o=r.length;if(n){if(n>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const c=this._3d=!a&&(o===9||o===12)||e&&e[0]&&typeof e[0].z<"u",h=this.points=[];for(let y=0,v=c?3:2;y<o;y+=v){var u={x:r[y],y:r[y+1]};c&&(u.z=r[y+2]),h.push(u)}const d=this.order=h.length-1,f=this.dims=["x","y"];c&&f.push("z"),this.dimlen=f.length;const g=Ot.align(h,{p1:h[0],p2:h[d]}),x=Ot.dist(h[0],h[d]);this._linear=g.reduce((y,v)=>y+Eu(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,C={x:r.x-g,y:r.y-x},_={x:r.x+y,y:r.y+v},k=c.A,T={x:k.x+(C.x-k.x)/(1-a),y:k.y+(C.y-k.y)/(1-a)},E={x:k.x+(_.x-k.x)/a,y:k.y+(_.y-k.y)/a},A={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,A,B,n)}static getUtils(){return Ot}getUtils(){return Ai.getUtils()}static get PolyBezier(){return od}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=Nu(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=Nu(r.x*r.x+r.y*r.y+r.z*r.z),o=Nu(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=Nu(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),Eu(AH(n))<MH/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,Eu(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 C=Nu(y.x*y.x+y.y*y.y);y.x/=C,y.y/=C,d[g+1]={x:x.x+v*y.x,y:x.y+v*y.y}}}),new 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),L=this.points[0],N=this.points[this.points.length-1];let M,I,j;n===void 0&&(n=e,a=r),M={x:L.x+B.x*e,y:L.y+B.y*e},j={x:N.x+B.x*n,y:N.y+B.y*n},I={x:(M.x+j.x)/2,y:(M.y+j.y)/2};const P=[M,I,j];M={x:L.x-B.x*r,y:L.y-B.y*r},j={x:N.x-B.x*a,y:N.y-B.y*a},I={x:(M.x+j.x)/2,y:(M.y+j.y)/2};const W=[j,I,M],K=Ot.makeline(W[2],P[0]),z=Ot.makeline(P[2],W[0]),G=[K,new Ai(P),z,new Ai(W)];return new od(G)}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,L,N,M,I){return function(j){const P=M/N,W=(M+I)/N,K=L-B;return Ot.map(j,0,1,B+P*K,B+W*K)}}o.forEach(function(B){const L=B.length();x?(h.push(B.scale(y(e,n,g,f,L))),u.push(B.scale(y(-r,-a,g,f,L)))):(h.push(B.scale(e)),u.push(B.scale(-r))),f+=L}),u=u.map(function(B){return d=B.points,d[3]?B.points=[d[3],d[2],d[1],d[0]]:B.points=[d[2],d[1],d[0]],B}).reverse();const v=h[0].points[0],C=h[c-1].points[h[c-1].points.length-1],_=u[c-1].points[u[c-1].points.length-1],k=u[0].points[0],T=Ot.makeline(_,v),E=Ot.makeline(C,k),A=[T].concat(h).concat([E]).concat(u);return new od(A)}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=_T(e.p1.x,e.p2.x),n=_T(e.p1.y,e.p2.y),a=kT(e.p1.x,e.p2.x),o=kT(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 Eu(d-u)+Eu(f-u)}_iterate(e,r){let n=0,a=1,o;do{o=0,a=1;let c=this.get(n),h,u,d,f,g=!1,x=!1,y,v=a,C=1;do if(x=g,f=d,v=(n+a)/2,h=this.get(v),u=this.get(a),d=Ot.getccenter(c,h,u),d.interval={start:n,end:a},g=this._error(d,c,n,a)<=e,y=x&&!g,y||(C=a),g){if(a>=1){if(d.interval.end=C=1,f=d,a>1){let k={x:d.x+d.r*EH(d.e),y:d.y+d.r*NH(d.e)};d.e+=Ot.angle({x:d.x,y:d.y},k,this.get(1))}break}a=a+(a-n)/2}else a=v;while(!y&&o++<100);if(o>=100)break;f=f||d,r.push(f),n=C}while(a<1);return r}}function hv(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 BH(i){if(Array.isArray(i))return i}function LH(i){if(Array.isArray(i))return hv(i)}function OH(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function RH(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 jH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
69
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
70
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FH(i,e){if(i==null)return{};var r,n,a=IH(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 IH(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 $H(i,e){return BH(i)||RH(i,e)||TB(i,e)||jH()}function zH(i){return LH(i)||OH(i)||TB(i)||DH()}function PH(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 qH(i){var e=PH(i,"string");return typeof e=="symbol"?e:e+""}function TB(i,e){if(i){if(typeof i=="string")return hv(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)?hv(i,e):void 0}}var UH=(function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(e instanceof Array?e.length?e:[void 0]:[e]).map(function(h){return{keyAccessor:h,isProp:!(h instanceof Function)}}),o=i.reduce(function(h,u){var d=h,f=u;return a.forEach(function(g,x){var y=g.keyAccessor,v=g.isProp,C;if(v){var _=f,k=_[y],T=FH(_,[y].map(qH));C=k,f=T}else C=y(f,x);x+1<a.length?(d.hasOwnProperty(C)||(d[C]={}),d=d[C]):r?(d.hasOwnProperty(C)||(d[C]=[]),d[C].push(f)):d[C]=f}),h},{});r instanceof Function&&(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===a.length?Object.keys(u).forEach(function(f){return u[f]=r(u[f])}):Object.values(u).forEach(function(f){return h(f,d+1)})})(o);var c=o;return n&&(c=[],(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===a.length?c.push({keys:d,vals:u}):Object.entries(u).forEach(function(f){var g=$H(f,2),x=g[0],y=g[1];return h(y,[].concat(zH(d),[x]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function HH(i,e){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(e).domain(i);break}return this}const wT=Symbol("implicit");function EB(){var i=new T2,e=[],r=[],n=wT;function a(o){let c=i.get(o);if(c===void 0){if(n!==wT)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 T2;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 EB(e,r).unknown(n)},HH.apply(a,arguments),a}function WH(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 GH=WH("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function YH(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 KH=`.force-graph-container canvas {
|
|
71
|
+
display: block;
|
|
72
|
+
user-select: none;
|
|
73
|
+
outline: none;
|
|
74
|
+
-webkit-tap-highlight-color: transparent;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.force-graph-container .clickable {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.force-graph-container .grabbable {
|
|
82
|
+
cursor: move;
|
|
83
|
+
cursor: grab;
|
|
84
|
+
cursor: -moz-grab;
|
|
85
|
+
cursor: -webkit-grab;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.force-graph-container .grabbable:active {
|
|
89
|
+
cursor: grabbing;
|
|
90
|
+
cursor: -moz-grabbing;
|
|
91
|
+
cursor: -webkit-grabbing;
|
|
92
|
+
}
|
|
93
|
+
`;YH(KH);function uv(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 VH(i){if(Array.isArray(i))return i}function XH(i){if(Array.isArray(i))return uv(i)}function ST(i,e,r){if(NB())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 wd(i,e,r){return(e=iW(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function NB(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NB=function(){return!!i})()}function ZH(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function QH(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 JH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TT(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 Tc(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TT(Object(r),!0).forEach(function(n){wd(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):TT(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function ld(i,e){return VH(i)||QH(i,e)||AB(i,e)||JH()}function aa(i){return XH(i)||ZH(i)||AB(i)||tW()}function eW(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 iW(i){var e=eW(i,"string");return typeof e=="symbol"?e:e+""}function dv(i){"@babel/helpers - typeof";return dv=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},dv(i)}function AB(i,e){if(i){if(typeof i=="string")return uv(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)?uv(i,e):void 0}}var rW=EB(GH);function ET(i,e,r){!e||typeof r!="string"||i.filter(function(n){return!n[r]}).forEach(function(n){n[r]=rW(e(n))})}function nW(i,e){var r=i.nodes,n=i.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,c=o===void 0?function(){return!0}:o,h=a.onLoopError,u=h===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:h,d={};r.forEach(function(y){return d[e(y)]={data:y,out:[],depth:-1,skip:!c(y)}}),n.forEach(function(y){var v=y.source,C=y.target,_=A(v),k=A(C);if(!d.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!d.hasOwnProperty(k))throw"Missing target node with id: ".concat(k);var T=d[_],E=d[k];T.out.push(E);function A(B){return dv(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=ld(y,2),C=v[1];return!C.skip}).map(function(y){var v=ld(y,2),C=v[0],_=v[1];return wd({},C,_.depth)}))));return g;function x(y){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var A=y[k];if(v.indexOf(A)!==-1){var B=[].concat(aa(v.slice(v.indexOf(A))),[A]).map(function(L){return e(L.data)});return f.some(function(L){return L.length===B.length&&L.every(function(N,M){return N===B[M]})})||(f.push(B),u(B)),1}C>A.depth&&(A.depth=C,x(A.out,[].concat(aa(v),[A]),C+(A.skip?0:1)))},k=0,T=y.length;k<T;k++)_()}}var aW=2,Ir=function(e,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},NT=function(e,r){if(!r.isShadow){var n=hi(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=z1({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,r){r.engineRunning=!1,NT(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:NT},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=hi(e.nodeVisibility),u=hi(e.nodeVal),d=hi(e.nodeColor),f=hi(e.nodeCanvasObjectMode),g=e.ctx,x=e.isShadow/e.globalScale,y=e.graphData.nodes.filter(h);g.save(),y.forEach(function(v){var C=f(v);if(e.nodeCanvasObject&&(C==="before"||C==="replace")&&(e.nodeCanvasObject(v,g,e.globalScale),C==="replace")){g.restore();return}var _=Math.sqrt(Math.max(0,u(v)||1))*e.nodeRelSize+x;g.beginPath(),g.arc(v.x,v.y,_,0,2*Math.PI,!1),g.fillStyle=d(v)||"rgba(31, 120, 180, 0.92)",g.fill(),e.nodeCanvasObject&&C==="after"&&e.nodeCanvasObject(v,e.ctx,e.globalScale)}),g.restore()}function a(){var h=hi(e.linkVisibility),u=hi(e.linkColor),d=hi(e.linkWidth),f=hi(e.linkLineDash),g=hi(e.linkCurvature),x=hi(e.linkCanvasObjectMode),y=e.ctx,v=e.isShadow*2,C=e.graphData.links.filter(h);C.forEach(L);var _=[],k=[],T=C;if(e.linkCanvasObject){var E=[],A=[];C.forEach(function(N){return({before:_,after:k,replace:E}[x(N)]||A).push(N)}),T=[].concat(aa(_),k,A),_=_.concat(E)}y.save(),_.forEach(function(N){return e.linkCanvasObject(N,y,e.globalScale)}),y.restore();var B=UH(T,[u,d,f]);y.save(),Object.entries(B).forEach(function(N){var M=ld(N,2),I=M[0],j=M[1],P=!I||I==="undefined"?"rgba(0,0,0,0.15)":I;Object.entries(j).forEach(function(W){var K=ld(W,2),z=K[0],G=K[1],D=(z||1)/e.globalScale+v;Object.entries(G).forEach(function(F){var q=ld(F,2);q[0];var X=q[1],nt=f(X[0]);y.beginPath(),X.forEach(function(H){var J=H.source,ht=H.target;if(!(!J||!ht||!J.hasOwnProperty("x")||!ht.hasOwnProperty("x"))){y.moveTo(J.x,J.y);var at=H.__controlPoints;at?y[at.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,aa(at).concat([ht.x,ht.y])):y.lineTo(ht.x,ht.y)}}),y.strokeStyle=P,y.lineWidth=D,y.setLineDash(nt||[]),y.stroke()})})}),y.restore(),y.save(),k.forEach(function(N){return e.linkCanvasObject(N,y,e.globalScale)}),y.restore();function L(N){var M=g(N);if(!M){N.__controlPoints=null;return}var I=N.source,j=N.target;if(!(!I||!j||!I.hasOwnProperty("x")||!j.hasOwnProperty("x"))){var P=Math.sqrt(Math.pow(j.x-I.x,2)+Math.pow(j.y-I.y,2));if(P>0){var W=Math.atan2(j.y-I.y,j.x-I.x),K=P*M,z={x:(I.x+j.x)/2+K*Math.cos(W-Math.PI/2),y:(I.y+j.y)/2+K*Math.sin(W-Math.PI/2)};N.__controlPoints=[z.x,z.y]}else{var G=M*70;N.__controlPoints=[j.x,j.y-G,j.x+G,j.y]}}}}function o(){var h=1.6,u=.2,d=hi(e.linkDirectionalArrowLength),f=hi(e.linkDirectionalArrowRelPos),g=hi(e.linkVisibility),x=hi(e.linkDirectionalArrowColor||e.linkColor),y=hi(e.nodeVal),v=e.ctx;v.save(),e.graphData.links.filter(g).forEach(function(C){var _=d(C);if(!(!_||_<0)){var k=C.source,T=C.target;if(!(!k||!T||!k.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var E=Math.sqrt(Math.max(0,y(k)||1))*e.nodeRelSize,A=Math.sqrt(Math.max(0,y(T)||1))*e.nodeRelSize,B=Math.min(1,Math.max(0,f(C))),L=x(C)||"rgba(0,0,0,0.28)",N=_/h/2,M=C.__controlPoints&&ST(Ai,[k.x,k.y].concat(aa(C.__controlPoints),[T.x,T.y])),I=M?function(D){return M.get(D)}:function(D){return{x:k.x+(T.x-k.x)*D||0,y:k.y+(T.y-k.y)*D||0}},j=M?M.length():Math.sqrt(Math.pow(T.x-k.x,2)+Math.pow(T.y-k.y,2)),P=E+_+(j-E-A-_)*B,W=I(P/j),K=I((P-_)/j),z=I((P-_*(1-u))/j),G=Math.atan2(W.y-K.y,W.x-K.x)-Math.PI/2;v.beginPath(),v.moveTo(W.x,W.y),v.lineTo(K.x+N*Math.cos(G),K.y+N*Math.sin(G)),v.lineTo(z.x,z.y),v.lineTo(K.x-N*Math.cos(G),K.y-N*Math.sin(G)),v.fillStyle=L,v.fill()}}}),v.restore()}function c(){var h=hi(e.linkDirectionalParticles),u=hi(e.linkDirectionalParticleSpeed),d=hi(e.linkDirectionalParticleOffset),f=hi(e.linkDirectionalParticleWidth),g=hi(e.linkVisibility),x=hi(e.linkDirectionalParticleColor||e.linkColor),y=e.ctx;y.save(),e.graphData.links.filter(g).forEach(function(v){var C=h(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var _=v.source,k=v.target;if(!(!_||!k||!_.hasOwnProperty("x")||!k.hasOwnProperty("x"))){var T=u(v),E=Math.abs(d(v)),A=v.__photons||[],B=Math.max(0,f(v)/2)/Math.sqrt(e.globalScale),L=x(v)||"rgba(0,0,0,0.28)";y.fillStyle=L;var N=v.__controlPoints?ST(Ai,[_.x,_.y].concat(aa(v.__controlPoints),[k.x,k.y])):null,M=0,I=!1;A.forEach(function(j){var P=!!j.__singleHop;if(j.hasOwnProperty("__progressRatio")||(j.__progressRatio=P?T<0?1:0:(M+E)/C),!P&&M++,j.__progressRatio+=T,j.__progressRatio>=1||j.__progressRatio<0)if(!P)j.__progressRatio=j.__progressRatio%1,j.__progressRatio<0&&j.__progressRatio++;else{I=!0;return}var W=j.__progressRatio,K=N?N.get(W):{x:_.x+(k.x-_.x)*W||0,y:_.y+(k.y-_.y)*W||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(K.x,K.y,v,y,e.globalScale):(y.beginPath(),y.arc(K.x,K.y,B,0,2*Math.PI,!1),y.fill())}),I&&(v.__photons=v.__photons.filter(function(j){return!j.__singleHop||j.__progressRatio<=1&&j.__progressRatio>=0}))}}}),y.restore()}},emitParticle:function(e,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:xH().force("link",uH()).force("charge",vH()).force("center",uU()).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&&ET(e.graphData.nodes,hi(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&ET(e.graphData.links,hi(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&&nW(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)*aW*(["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?CH(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 MB(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 sW=800,oW=4,lW=5,BB=MB("forceGraph",vg),cW=MB(["forceGraph","shadowGraph"],vg),hW=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 wd({},i,BB.linkProp(i))})).concat(aa(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(i){return wd({},i,cW.linkProp(i))})))),uW=Object.assign.apply(Object,aa(["d3Force","d3ReheatSimulation","emitParticle"].map(function(i){return wd({},i,BB.linkMethod(i))})));function Qb(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 LB(i){var e=window.devicePixelRatio;i.setTransform(e,0,0,e,0,0)}function AT(i,e,r){i.save(),LB(i),i.clearRect(0,0,e,r),i.restore()}var dW=z1({props:Tc({width:{default:window.innerWidth,onChange:function(e,r){return Qb(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,r){return Qb(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}},hW),aliases:{stopAnimation:"pauseAnimation"},methods:Tc({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 Z2(c()).to(o,a).easing(Bl.Quadratic.Out).onUpdate(h).onComplete(function(){e.tweenGroup.remove(this)}).start()):h(o),this}return c();function c(){var u=Fa(e.canvas);return{x:(e.width/2-u.x)/u.k,y:(e.height/2-u.y)/u.k}}function h(u){var d=u.x,f=u.y;e.zoom.translateTo(e.zoom.__baseElem,d===void 0?c().x:d,f===void 0?c().y:f),e.needsRedraw=!0}},zoom:function(e,r,n){if(!e.canvas)return null;if(r!==void 0)return n?e.tweenGroup.add(new Z2({k:a()}).to({k:r},n).easing(Bl.Quadratic.Out).onUpdate(function(c){var h=c.k;return o(h)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):o(r),this;return a();function a(){return Fa(e.canvas).k}function o(c){e.zoom.scaleTo(e.zoom.__baseElem,c),e.needsRedraw=!0}},zoomToFit:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];var h=this.getGraphBbox.apply(this,o);if(h){var u={x:(h.x[0]+h.x[1])/2,y:(h.y[0]+h.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(e.width-n*2)/(h.x[1]-h.x[0]),(e.height-n*2)/(h.y[1]-h.y[0])));this.centerAt(u.x,u.y,r),this.zoom(d,r)}return this},getGraphBbox:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=hi(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:[A2(o,function(c){return c.x-c.r}),N2(o,function(c){return c.x+c.r})],y:[A2(o,function(c){return c.y-c.r}),N2(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:[]})}},uW),stateInit:function(){return{lastSetZoom:1,zoom:q8(),forceGraph:new vg,shadowGraph:new vg().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new q7,tweenGroup:new nB}},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(J6().subject(function(){if(!r.enableNodeDrag)return null;var f=u();return f&&f.type==="Node"?f.d:null}).on("start",function(f){var g=f.subject;g.__initialDragPos={x:g.x,y:g.y,fx:g.fx,fy:g.fy},f.active||(g.fx=g.x,g.fy=g.y),r.canvas.classList.add("grabbable")}).on("drag",function(f){var g=f.subject,x=g.__initialDragPos,y=f,v=Fa(r.canvas).k,C={x:x.x+(y.x-x.x)/v-g.x,y:x.y+(y.y-x.y)/v-g.y};["x","y"].forEach(function(_){return g["f".concat(_)]=g[_]=x[_]+(y[_]-x[_])/v}),!(!g.__dragged&&lW>=Math.sqrt(G8(["x","y"].map(function(_){return Math.pow(f[_]-x[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,g.__dragged=!0,r.onNodeDrag(g,C))}).on("end",function(f){var g=f.subject,x=g.__initialDragPos,y={x:g.x-x.x,y:g.y-x.y};x.fx===void 0&&(g.fx=void 0),x.fy===void 0&&(g.fy=void 0),delete g.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,r.onNodeDragEnd(g,y))})),r.zoom(r.zoom.__baseElem=ue(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||hi(r.enableZoomInteraction)(f))&&(f.type==="wheel"||hi(r.enablePanInteraction)(f))}).on("zoom",function(f){var g=f.transform;[o,c].forEach(function(x){LB(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Tc(Tc({},g),n.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Tc(Tc({},f.transform),n.centerAt()))}),Qb(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=oW/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new hU(a),["pointermove","pointerdown"].forEach(function(f){return a.addEventListener(f,function(g){f==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=g),!r.isPointerDragging&&g.type==="pointermove"&&r.onBackgroundClick&&(g.pressure>0||r.isPointerPressed)&&(g.pointerType==="mouse"||g.movementX===void 0||[g.movementX,g.movementY].some(function(v){return Math.abs(v)>1}))&&(r.isPointerDragging=!0);var x=y(a);h.x=g.pageX-x.left,h.y=g.pageY-x.top;function y(v){var C=v.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,k=window.pageYOffset||document.documentElement.scrollTop;return{top:C.top+k,left:C.left+_}}},{passive:!0})}),a.addEventListener("pointerup",function(f){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var g=[f,r.pointerDownEvent];requestAnimationFrame(function(){if(f.button===0)if(r.hoverObj){var x=r["on".concat(r.hoverObj.type,"Click")];x&&x.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,g);if(f.button===2)if(r.hoverObj){var y=r["on".concat(r.hoverObj.type,"RightClick")];y&&y.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(f){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(f.preventDefault(),!1)}),r.forceGraph(o),r.shadowGraph(c);var d=V9(function(){AT(c,r.width,r.height),r.shadowGraph.linkWidth(function(g){return hi(r.linkWidth)(g)+r.linkHoverPrecision});var f=Fa(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},sW);r.flushShadowCanvas=d.flush,(this._animationCycle=function f(){var g=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(E){return E.__photons&&E.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var x=r.isPointerDragging?null:u();if(x!==r.hoverObj){var y=r.hoverObj,v=y?y.type:null,C=x?x.type:null;if(v&&v!==C){var _=r["on".concat(v,"Hover")];_&&_(null,y.d)}if(C){var k=r["on".concat(C,"Hover")];k&&k(x.d,v===C?y.d:null)}r.tooltip.content(x&&hi(r["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),r.canvas.classList[(x&&r["on".concat(C,"Click")]||!x&&r.onBackgroundClick)&&hi(r.showPointerCursor)(x==null?void 0:x.d)?"add":"remove"]("clickable"),r.hoverObj=x}g&&d()}if(g){AT(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){}}),Jb={exports:{}},t0,MT;function fW(){if(MT)return t0;MT=1;var i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return t0=i,t0}var e0,BT;function pW(){if(BT)return e0;BT=1;var i=fW();function e(){}function r(){}return r.resetWarningCache=e,e0=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},e0}var LT;function gW(){return LT||(LT=1,Jb.exports=pW()()),Jb.exports}var mW=gW();const lt=Id(mW),cm={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},OB={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},Z1={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])},yW=Object.assign({},cm,OB,{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({},cm,OB,Z1,{enableNavigationControls:lt.bool,controlType:lt.oneOf(["trackball","orbit","fly"]),rendererConfig:lt.object,extraRenderers:lt.arrayOf(lt.shape({render:lt.func.isRequired}))});Object.assign({},cm,Z1,{nodeDesc:lt.oneOfType([lt.string,lt.func]),linkDesc:lt.oneOfType([lt.string,lt.func])});Object.assign({},cm,Z1,{markerAttrs:lt.object,yOffset:lt.number,glScale:lt.number});const hm=u$(dW,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});hm.displayName="ForceGraph2D";hm.propTypes=yW;const ws={ok:"#34d399",stale:"#fbbf24",gone:"#f87171",current:"#8b5cf6"};function OT(i){return i.exists?i.needsUpdate?ws.stale:ws.ok:ws.gone}function RT(i){return typeof i=="string"?i:i.id}function bW(){const{data:i,isLoading:e,isError:r,error:n}=jI(),a=DI(),o=FI(),c=II(),h=pM(),u=Y.useRef(void 0),d=Y.useRef(null),[f,g]=Y.useState({w:0,h:0}),[x,y]=Y.useState(!0),[v,C]=Y.useState(null),[_,k]=Y.useState(null),T=Y.useRef(null),E=Y.useRef(null),[A,B]=Y.useState(null);Y.useEffect(()=>{const F=d.current;if(!F)return;const q=new ResizeObserver(()=>{g({w:F.clientWidth,h:F.clientHeight})});return q.observe(F),g({w:F.clientWidth,h:F.clientHeight}),()=>q.disconnect()},[]);const L=Y.useMemo(()=>{const F=((i==null?void 0:i.nodes)??[]).map(ht=>({...ht,id:ht.name})),q=(i==null?void 0:i.edges)??[],X=new Set(F.map(ht=>ht.id)),nt=(ht,at)=>q.some(vt=>vt.source===ht&&vt.target===at),H=[],J=new Set;for(const ht of q){if(!X.has(ht.source)||!X.has(ht.target))continue;const at=[ht.source,ht.target].sort().join("\0");if(J.has(at))continue;J.add(at);const vt=nt(ht.target,ht.source);H.push({source:ht.source,target:ht.target,twoWay:vt,active:ht.active})}return{nodes:F,links:H}},[i]),N=Y.useMemo(()=>{const F=new Map;for(const q of L.nodes)F.set(q.id,q);return F},[L]);function M(F,q){const X=u.current;if(!X)return null;let nt=null,H=24;for(const J of L.nodes){if(J.x==null||J.y==null)continue;const ht=X.graph2ScreenCoords(J.x,J.y),at=Math.hypot(ht.x-F,ht.y-q);at<H&&(H=at,nt=J)}return nt}function I(F){var X;const q=(X=d.current)==null?void 0:X.getBoundingClientRect();return{x:F.clientX-((q==null?void 0:q.left)??0),y:F.clientY-((q==null?void 0:q.top)??0)}}function j(F){var H,J;if(!x)return;const{x:q,y:X}=I(F),nt=M(q,X);nt&&(T.current=nt,E.current={x:q,y:X},(J=(H=F.target).setPointerCapture)==null||J.call(H,F.pointerId))}function P(F){if(!x||!T.current)return;const{x:q,y:X}=I(F);E.current={x:q,y:X};const nt=M(q,X);B(nt&&nt.id!==T.current.id?nt.id:null)}function W(F){if(!x)return;const q=T.current;if(T.current=null,E.current=null,B(null),!q)return;const{x:X,y:nt}=I(F),H=M(X,nt);!H||H.id===q.id||(k(null),a.mutate({from:q.id,to:H.id},{onSuccess:()=>{H.shareable||(k(`“${q.name}” now reads “${H.name}”, but “${H.name}” isn't shared yet — click it to enable sharing so the link goes live.`),C(H))},onError:J=>k(J instanceof Error?J.message:"Failed to connect.")}))}function K(F){const q=T.current,X=u.current;if(!q||!E.current||!X||q.x==null||q.y==null)return;const nt=X.screen2GraphCoords(E.current.x,E.current.y);F.save(),F.strokeStyle=ws.current,F.lineWidth=1.5,F.setLineDash([4,4]),F.beginPath(),F.moveTo(q.x,q.y),F.lineTo(nt.x,nt.y),F.stroke(),F.restore()}function z(F){x||(C(F),k(null))}function G(F){var J,ht;const q=RT(F.source),X=RT(F.target),nt=((J=N.get(q))==null?void 0:J.name)??q,H=((ht=N.get(X))==null?void 0:ht.name)??X;window.confirm(`Remove the link “${nt}” → “${H}”?`)&&(o.mutate({from:q,to:X}),F.twoWay&&o.mutate({from:X,to:q}))}const D=(i==null?void 0:i.nodes)??[];return m.jsxs("div",{className:"lgraph",children:[m.jsxs("div",{className:"lgraph-toolbar",children:[m.jsx("button",{type:"button",className:`lgraph-mode${x?" lgraph-mode--on":""}`,onClick:()=>y(F=>!F),children:x?"🔌 Connect mode: ON":"Connect mode: OFF"}),m.jsx("span",{className:"lgraph-hint",children:x?"Drag from one project onto another to make it read that project. Drag both ways for a two-way sync.":"Click a project for details. Click a link to remove it. Turn on Connect mode to draw new links."}),m.jsxs("span",{className:"lgraph-legend",children:[m.jsx("i",{className:"lgdot",style:{background:ws.ok}})," up to date",m.jsx("i",{className:"lgdot",style:{background:ws.stale}})," needs update",m.jsx("i",{className:"lgdot",style:{background:ws.gone}})," folder gone"]})]}),_&&m.jsx("div",{className:"lgraph-note",children:_}),m.jsxs("div",{className:"lgraph-canvas",ref:d,onPointerDown:j,onPointerMove:P,onPointerUp:W,children:[e&&m.jsx("div",{className:"lgraph-status",children:"Loading network…"}),r&&m.jsx("div",{className:"lgraph-status lgraph-status--err",children:n instanceof Error?n.message:"Failed to load the network."}),!e&&!r&&D.length<2&&m.jsx("div",{className:"lgraph-status",children:"Add at least two projects to start drawing relationships between them."}),f.w>0&&D.length>=2&&m.jsx(hm,{ref:u,graphData:L,width:f.w,height:f.h,backgroundColor:"#0e0e12",nodeId:"id",nodeRelSize:5,nodeVal:()=>6,nodeColor:F=>OT(F),enablePanInteraction:!x,enableZoomInteraction:!x,enableNodeDrag:!x,linkColor:F=>F.active?"rgba(139,92,246,0.55)":"rgba(150,150,165,0.30)",linkWidth:F=>F.active?2:1,linkCurvature:F=>F.twoWay?.25:0,linkDirectionalArrowLength:6,linkDirectionalArrowRelPos:.92,linkDirectionalArrowColor:F=>F.active?"rgba(139,92,246,0.8)":"rgba(150,150,165,0.5)",linkDirectionalParticles:F=>F.active?3:0,linkDirectionalParticleSpeed:.006,linkDirectionalParticleWidth:3,linkDirectionalParticleColor:()=>ws.current,onNodeClick:F=>z(F),onLinkClick:F=>G(F),onRenderFramePost:K,cooldownTicks:120,onEngineStop:()=>{var F,q;return(q=(F=u.current)==null?void 0:F.zoomToFit)==null?void 0:q.call(F,500,60)},nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(F,q,X)=>{F.shareable&&(q.beginPath(),q.arc(F.x??0,F.y??0,6+2.5,0,2*Math.PI),q.strokeStyle="rgba(139,92,246,0.7)",q.lineWidth=1.2,q.stroke()),A===F.id&&(q.beginPath(),q.arc(F.x??0,F.y??0,11,0,2*Math.PI),q.strokeStyle=ws.current,q.lineWidth=2,q.stroke());const H=Math.max(9,12/Math.max(X,.8));q.font=`${H}px -apple-system, BlinkMacSystemFont, sans-serif`,q.textAlign="center",q.textBaseline="top",q.fillStyle="rgba(235,240,250,0.92)",q.fillText(F.name,F.x??0,(F.y??0)+6+3)}})]}),v&&m.jsxs("div",{className:"lgraph-detail",children:[m.jsxs("div",{className:"lgraph-detail-head",children:[m.jsx("span",{className:"lgdot",style:{background:OT(v)}}),m.jsx("strong",{children:v.name}),m.jsx("button",{className:"lgraph-x",onClick:()=>C(null),"aria-label":"Close",children:"✕"})]}),m.jsx("div",{className:"lgraph-detail-path",children:v.path}),m.jsxs("div",{className:"lgraph-detail-row",children:[m.jsx("span",{children:v.exists?v.needsUpdate?`Behind: v${v.setupVersion} → v${v.latestVersion}`:`Up to date (v${v.setupVersion})`:"Folder is gone."}),v.exists&&v.needsUpdate&&m.jsx("button",{className:"lgraph-btn",disabled:h.isPending,onClick:()=>h.mutate(v.name),children:h.isPending?"Updating…":"Update"})]}),m.jsxs("label",{className:"lgraph-detail-row lgraph-share",children:[m.jsx("input",{type:"checkbox",checked:v.shareable,disabled:!v.exists||c.isPending,onChange:F=>c.mutate({name:v.name,shareable:F.target.checked},{onSuccess:()=>C({...v,shareable:F.target.checked})})}),m.jsx("span",{children:"Shared — let other projects read this one"})]})]})]})}function xW(){const{data:i,isLoading:e,isError:r,error:n}=OI(),a=pM(),o=RI(),[c,h]=Y.useState(""),[u,d]=Y.useState(null),[f,g]=Y.useState(!1),[x,y]=Y.useState("cards"),v=(i==null?void 0:i.vaults)??[],[C,_]=Y.useState(!1);Y.useEffect(()=>{!C&&v.length>=2&&y("graph")},[v.length,C]);const k=Y.useMemo(()=>{const L=c.trim().toLowerCase();return L?v.filter(N=>N.name.toLowerCase().includes(L)||N.path.toLowerCase().includes(L)):v},[v,c]);async function T(L){d(null);try{await qI(L)}catch(N){d(N instanceof Error?N.message:String(N))}}function E(L){d(null),a.mutate(L,{onError:N=>d(N instanceof Error?N.message:String(N))})}function A(L){const N=L.exists?`Remove “${L.name}” from the launcher? (the folder stays on disk)`:`“${L.name}” folder is gone. Remove it from the launcher?`;window.confirm(N)&&(d(null),o.mutate(L.name,{onError:M=>d(M instanceof Error?M.message:String(M))}))}function B(L){_(!0),y(L)}return m.jsxs("div",{className:"launcher",children:[m.jsxs("header",{className:"launcher-bar",children:[m.jsx("h1",{className:"launcher-title",children:"Launcher · all projects"}),m.jsxs("div",{className:"launcher-actions",children:[v.length>=2&&m.jsxs("div",{className:"launcher-viewtoggle",role:"group","aria-label":"View",children:[m.jsx("button",{type:"button",className:`launcher-btn${x==="cards"?" launcher-btn-active":""}`,onClick:()=>B("cards"),children:"Cards"}),m.jsx("button",{type:"button",className:`launcher-btn${x==="graph"?" launcher-btn-active":""}`,onClick:()=>B("graph"),children:"Network"})]}),x==="cards"&&m.jsx("input",{type:"search",className:"launcher-search",placeholder:"Search projects…",value:c,onChange:L=>h(L.target.value),"aria-label":"Search projects"}),m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-primary",onClick:()=>g(!0),children:"+ Add Project"})]})]}),u&&m.jsx("div",{className:"launcher-error",children:u}),e&&m.jsx("div",{className:"launcher-status",children:"Loading vaults…"}),r&&m.jsx("div",{className:"launcher-error",children:n instanceof Error?n.message:"Failed to load vaults."}),!e&&!r&&x==="graph"&&m.jsx(bW,{}),!e&&!r&&x==="cards"&&m.jsxs(m.Fragment,{children:[k.length===0&&m.jsx("div",{className:"launcher-empty",children:v.length===0?"No projects yet. Use “+ Add Project” to create one or set up an existing folder.":"No projects match your search."}),m.jsx("div",{className:"launcher-grid",children:k.map(L=>{const N=L.exists?L.needsUpdate?"launcher-card-dot--stale":"launcher-card-dot--ok":"launcher-card-dot--gone";return m.jsxs("div",{className:`launcher-card${L.exists?"":" launcher-card--gone"}`,children:[m.jsxs("div",{className:"launcher-card-head",children:[m.jsx("span",{className:`launcher-card-dot ${N}`,title:L.exists?L.needsUpdate?`Update available: v${L.setupVersion} → v${L.latestVersion}`:"Up to date":"Folder is gone","aria-hidden":!0}),m.jsx("span",{className:"launcher-card-name",children:L.name})]}),m.jsx("div",{className:"launcher-card-path",children:L.path}),!L.exists&&m.jsx("div",{className:"launcher-card-warn",children:"Folder no longer exists on disk."}),L.exists&&L.needsUpdate&&m.jsxs("div",{className:"launcher-card-warn launcher-card-warn--stale",children:["Skills out of date — v",L.setupVersion," → v",L.latestVersion,"."]}),m.jsxs("div",{className:"launcher-card-actions",children:[L.exists&&m.jsx("button",{type:"button",className:"launcher-card-open launcher-link-btn",onClick:()=>T(L.name),children:"Open →"}),L.exists&&L.needsUpdate&&m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-update",disabled:a.isPending,onClick:()=>E(L.name),children:a.isPending&&a.variables===L.name?"Updating…":"Update"}),m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-remove",disabled:o.isPending,onClick:()=>A(L),children:"Remove"})]})]},L.name)})})]}),f&&m.jsx(GI,{onClose:()=>g(!1),onReady:async L=>{g(!1),await T(L)}})]})}function Q1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Kl=Q1();function RB(i){Kl=i}var cd={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")},vW=/^(?:[ \t]*(?:\n|$))+/,CW=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_W=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Hd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kW=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,J1=/(?:[*+-]|\d{1,9}[.)])/,jB=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,DB=fi(jB).replace(/bull/g,J1).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(),wW=fi(jB).replace(/bull/g,J1).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(),tC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,SW=/^[^\n]+/,eC=/(?!\s*\])(?:\\.|[^\[\]\\])+/,TW=fi(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",eC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),EW=fi(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,J1).getRegex(),um="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",iC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,NW=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",iC).replace("tag",um).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),FB=fi(tC).replace("hr",Hd).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",um).getRegex(),AW=fi(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",FB).getRegex(),rC={blockquote:AW,code:CW,def:TW,fences:_W,heading:kW,hr:Hd,html:NW,lheading:DB,list:EW,newline:vW,paragraph:FB,table:cd,text:SW},jT=fi("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Hd).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",um).getRegex(),MW={...rC,lheading:wW,table:jT,paragraph:fi(tC).replace("hr",Hd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jT).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",um).getRegex()},BW={...rC,html:fi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",iC).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:cd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fi(tC).replace("hr",Hd).replace("heading",` *#{1,6} *[^
|
|
96
|
+
]`).replace("lheading",DB).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},LW=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OW=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,IB=/^( {2,}|\\)\n(?!\s*$)/,RW=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dm=/[\p{P}\p{S}]/u,nC=/[\s\p{P}\p{S}]/u,$B=/[^\s\p{P}\p{S}]/u,jW=fi(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,nC).getRegex(),zB=/(?!~)[\p{P}\p{S}]/u,DW=/(?!~)[\s\p{P}\p{S}]/u,FW=/(?:[^\s\p{P}\p{S}]|~)/u,IW=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,PB=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$W=fi(PB,"u").replace(/punct/g,dm).getRegex(),zW=fi(PB,"u").replace(/punct/g,zB).getRegex(),qB="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",PW=fi(qB,"gu").replace(/notPunctSpace/g,$B).replace(/punctSpace/g,nC).replace(/punct/g,dm).getRegex(),qW=fi(qB,"gu").replace(/notPunctSpace/g,FW).replace(/punctSpace/g,DW).replace(/punct/g,zB).getRegex(),UW=fi("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$B).replace(/punctSpace/g,nC).replace(/punct/g,dm).getRegex(),HW=fi(/\\(punct)/,"gu").replace(/punct/g,dm).getRegex(),WW=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(),GW=fi(iC).replace("(?:-->|$)","-->").getRegex(),YW=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",GW).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cg=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,KW=fi(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Cg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),UB=fi(/^!?\[(label)\]\[(ref)\]/).replace("label",Cg).replace("ref",eC).getRegex(),HB=fi(/^!?\[(ref)\](?:\[\])?/).replace("ref",eC).getRegex(),VW=fi("reflink|nolink(?!\\()","g").replace("reflink",UB).replace("nolink",HB).getRegex(),aC={_backpedal:cd,anyPunctuation:HW,autolink:WW,blockSkip:IW,br:IB,code:OW,del:cd,emStrongLDelim:$W,emStrongRDelimAst:PW,emStrongRDelimUnd:UW,escape:LW,link:KW,nolink:HB,punctuation:jW,reflink:UB,reflinkSearch:VW,tag:YW,text:RW,url:cd},XW={...aC,link:fi(/^!?\[(label)\]\((.*?)\)/).replace("label",Cg).getRegex(),reflink:fi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cg).getRegex()},fv={...aC,emStrongRDelimAst:qW,emStrongLDelim:zW,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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ZW={...fv,br:fi(IB).replace("{2,}","*").getRegex(),text:fi(fv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Cp={normal:rC,gfm:MW,pedantic:BW},Au={normal:aC,gfm:fv,breaks:ZW,pedantic:XW},QW={"&":"&","<":"<",">":">",'"':""","'":"'"},DT=i=>QW[i];function Oa(i,e){if(e){if(Jr.escapeTest.test(i))return i.replace(Jr.escapeReplace,DT)}else if(Jr.escapeTestNoEncode.test(i))return i.replace(Jr.escapeReplaceNoEncode,DT);return i}function FT(i){try{i=encodeURI(i).replace(Jr.percentDecode,"%")}catch{return null}return i}function IT(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 Mu(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 JW(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 $T(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 tG(i,e,r){const n=i.match(r.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
|
|
97
|
+
`).map(o=>{const c=o.match(r.other.beginningSpace);if(c===null)return o;const[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
98
|
+
`)}var _g=class{constructor(i){se(this,"options");se(this,"rules");se(this,"lexer");this.options=i||Kl}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:Mu(r,`
|
|
99
|
+
`)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const r=e[0],n=tG(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=Mu(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:Mu(e[0],`
|
|
100
|
+
`)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let r=Mu(e[0],`
|
|
101
|
+
`).split(`
|
|
102
|
+
`),n="",a="";const o=[];for(;r.length>0;){let c=!1;const h=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))h.push(r[u]),c=!0;else if(!c)h.push(r[u]);else break;r=r.slice(u);const d=h.join(`
|
|
103
|
+
`),f=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
104
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
105
|
+
${d}`:d,a=a?`${a}
|
|
106
|
+
${f}`:f;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=g,r.length===0)break;const x=o.at(-1);if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){const y=x,v=y.raw+`
|
|
107
|
+
`+r.join(`
|
|
108
|
+
`),C=this.blockquote(v);o[o.length-1]=C,n=n.substring(0,n.length-y.raw.length)+C.raw,a=a.substring(0,a.length-y.text.length)+C.text;break}else if((x==null?void 0:x.type)==="list"){const y=x,v=y.raw+`
|
|
109
|
+
`+r.join(`
|
|
110
|
+
`),C=this.list(v);o[o.length-1]=C,n=n.substring(0,n.length-x.raw.length)+C.raw,a=a.substring(0,a.length-y.raw.length)+C.raw,r=v.substring(o.at(-1).raw.length).split(`
|
|
111
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(i){let e=this.rules.block.list.exec(i);if(e){let r=e[1].trim();const n=r.length>1,a={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=this.rules.other.listItemRegex(r);let c=!1;for(;i;){let u=!1,d="",f="";if(!(e=o.exec(i))||this.rules.block.hr.test(i))break;d=e[0],i=i.substring(d.length);let g=e[2].split(`
|
|
112
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),x=i.split(`
|
|
113
|
+
`,1)[0],y=!g.trim(),v=0;if(this.options.pedantic?(v=2,f=g.trimStart()):y?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,f=g.slice(v),v+=e[1].length),y&&this.rules.other.blankLine.test(x)&&(d+=x+`
|
|
114
|
+
`,i=i.substring(x.length+1),u=!0),!u){const k=this.rules.other.nextBulletRegex(v),T=this.rules.other.hrRegex(v),E=this.rules.other.fencesBeginRegex(v),A=this.rules.other.headingBeginRegex(v),B=this.rules.other.htmlBeginRegex(v);for(;i;){const L=i.split(`
|
|
115
|
+
`,1)[0];let N;if(x=L,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),N=x):N=x.replace(this.rules.other.tabCharGlobal," "),E.test(x)||A.test(x)||B.test(x)||k.test(x)||T.test(x))break;if(N.search(this.rules.other.nonSpaceChar)>=v||!x.trim())f+=`
|
|
116
|
+
`+N.slice(v);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(g)||A.test(g)||T.test(g))break;f+=`
|
|
117
|
+
`+x}!y&&!x.trim()&&(y=!0),d+=L+`
|
|
118
|
+
`,i=i.substring(L.length+1),g=N.slice(v)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let C=null,_;this.options.gfm&&(C=this.rules.other.listIsTask.exec(f),C&&(_=C[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!C,checked:_,loose:!1,text:f,tokens:[]}),a.raw+=d}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const d=a.items[u].tokens.filter(g=>g.type==="space"),f=d.length>0&&d.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=f}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(i){const e=this.rules.block.html.exec(i);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(i){const e=this.rules.block.def.exec(i);if(e){const r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:a}}}table(i){var c;const e=this.rules.block.table.exec(i);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const r=IT(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
119
|
+
`):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const h of n)this.rules.other.tableAlignRight.test(h)?o.align.push("right"):this.rules.other.tableAlignCenter.test(h)?o.align.push("center"):this.rules.other.tableAlignLeft.test(h)?o.align.push("left"):o.align.push(null);for(let h=0;h<r.length;h++)o.header.push({text:r[h],tokens:this.lexer.inline(r[h]),header:!0,align:o.align[h]});for(const h of a)o.rows.push(IT(h,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(i){const e=this.rules.block.lheading.exec(i);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(i){const e=this.rules.block.paragraph.exec(i);if(e){const r=e[1].charAt(e[1].length-1)===`
|
|
120
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(i){const e=this.rules.block.text.exec(i);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(i){const e=this.rules.inline.escape.exec(i);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(i){const e=this.rules.inline.tag.exec(i);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(i){const e=this.rules.inline.link.exec(i);if(e){const r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=Mu(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=JW(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)),$T(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 $T(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}}}},Ms=class pv{constructor(e){se(this,"tokens");se(this,"options");se(this,"state");se(this,"tokenizer");se(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Kl,this.options.tokenizer=this.options.tokenizer||new _g,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:Cp.normal,inline:Au.normal};this.options.pedantic?(r.block=Cp.pedantic,r.inline=Au.pedantic):this.options.gfm&&(r.block=Cp.gfm,this.options.breaks?r.inline=Au.breaks:r.inline=Au.gfm),this.tokenizer.rules=r}static get rules(){return{block:Cp,inline:Au}}static lex(e,r){return new pv(r).lex(e)}static lexInline(e,r){return new pv(r).inlineTokens(e)}lex(e){e=e.replace(Jr.carriageReturn,`
|
|
121
|
+
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(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+=`
|
|
122
|
+
`:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
123
|
+
`+h.raw,d.text+=`
|
|
124
|
+
`+h.text,this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
125
|
+
`+h.raw,d.text+=`
|
|
126
|
+
`+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const f=e.slice(1);let g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},f),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){const d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
|
|
127
|
+
`+h.raw,d.text+=`
|
|
128
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
129
|
+
`+h.raw,d.text+=`
|
|
130
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var h,u,d;let n=e,a=null;if(this.tokens.links){const f=Object.keys(this.tokens.links);if(f.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)f.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,c="";for(;e;){o||(c=""),o=!1;let f;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(x=>(f=x.call({lexer:this},e,r))?(e=e.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(f.raw.length);const x=r.at(-1);f.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=f.raw,x.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(e,n,c)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(e)){e=e.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(e))){e=e.substring(f.raw.length),r.push(f);continue}let g=e;if((d=this.options.extensions)!=null&&d.startInline){let x=1/0;const y=e.slice(1);let v;this.options.extensions.startInline.forEach(C=>{v=C.call({lexer:this},y),typeof v=="number"&&v>=0&&(x=Math.min(x,v))}),x<1/0&&x>=0&&(g=e.substring(0,x+1))}if(f=this.tokenizer.inlineText(g)){e=e.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(c=f.raw.slice(-1)),o=!0;const x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=f.raw,x.text+=f.text):r.push(f);continue}if(e){const x="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},kg=class{constructor(i){se(this,"options");se(this,"parser");this.options=i||Kl}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,"")+`
|
|
131
|
+
`;return n?'<pre><code class="language-'+Oa(n)+'">'+(r?a:Oa(a,!0))+`</code></pre>
|
|
132
|
+
`:"<pre><code>"+(r?a:Oa(a,!0))+`</code></pre>
|
|
133
|
+
`}blockquote({tokens:i}){return`<blockquote>
|
|
134
|
+
${this.parser.parse(i)}</blockquote>
|
|
135
|
+
`}html({text:i}){return i}heading({tokens:i,depth:e}){return`<h${e}>${this.parser.parseInline(i)}</h${e}>
|
|
136
|
+
`}hr(i){return`<hr>
|
|
137
|
+
`}list(i){const e=i.ordered,r=i.start;let n="";for(let c=0;c<i.items.length;c++){const h=i.items[c];n+=this.listitem(h)}const a=e?"ol":"ul",o=e&&r!==1?' start="'+r+'"':"";return"<"+a+o+`>
|
|
138
|
+
`+n+"</"+a+`>
|
|
139
|
+
`}listitem(i){var r;let e="";if(i.task){const n=this.checkbox({checked:!!i.checked});i.loose?((r=i.tokens[0])==null?void 0:r.type)==="paragraph"?(i.tokens[0].text=n+" "+i.tokens[0].text,i.tokens[0].tokens&&i.tokens[0].tokens.length>0&&i.tokens[0].tokens[0].type==="text"&&(i.tokens[0].tokens[0].text=n+" "+Oa(i.tokens[0].tokens[0].text),i.tokens[0].tokens[0].escaped=!0)):i.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(i.tokens,!!i.loose),`<li>${e}</li>
|
|
140
|
+
`}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
|
|
141
|
+
`}table(i){let e="",r="";for(let a=0;a<i.header.length;a++)r+=this.tablecell(i.header[a]);e+=this.tablerow({text:r});let n="";for(let a=0;a<i.rows.length;a++){const o=i.rows[a];r="";for(let c=0;c<o.length;c++)r+=this.tablecell(o[c]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
142
|
+
<thead>
|
|
143
|
+
`+e+`</thead>
|
|
144
|
+
`+n+`</table>
|
|
145
|
+
`}tablerow({text:i}){return`<tr>
|
|
146
|
+
${i}</tr>
|
|
147
|
+
`}tablecell(i){const e=this.parser.parseInline(i.tokens),r=i.header?"th":"td";return(i.align?`<${r} align="${i.align}">`:`<${r}>`)+e+`</${r}>
|
|
148
|
+
`}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Oa(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:e,tokens:r}){const n=this.parser.parseInline(r),a=FT(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=FT(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)}},sC=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""}},Bs=class gv{constructor(e){se(this,"options");se(this,"renderer");se(this,"textRenderer");this.options=e||Kl,this.options.renderer=this.options.renderer||new kg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sC}static parse(e,r){return new gv(r).parse(e)}static parseInline(e,r){return new gv(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const d=h,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=f||"";continue}}const u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,f=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],f+=`
|
|
149
|
+
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):n+=f;continue}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=d||"";continue}}const u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},wx,Yp=(wx=class{constructor(i){se(this,"options");se(this,"block");this.options=i||Kl}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?Ms.lex:Ms.lexInline}provideParser(){return this.block?Bs.parse:Bs.parseInline}},se(wx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),wx),eG=class{constructor(...i){se(this,"defaults",Q1());se(this,"options",this.setOptions);se(this,"parse",this.parseMarkdown(!0));se(this,"parseInline",this.parseMarkdown(!1));se(this,"Parser",Bs);se(this,"Renderer",kg);se(this,"TextRenderer",sC);se(this,"Lexer",Ms);se(this,"Tokenizer",_g);se(this,"Hooks",Yp);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 kg(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 _g(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 Yp;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];Yp.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 Ms.lex(i,e??this.defaults)}parser(i,e){return Bs.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?Ms.lex:Ms.lexInline,u=o.hooks?o.hooks.provideParser():i?Bs.parse:Bs.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(d=>h(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>u(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let d=h(r,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let f=u(d,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(d){return c(d)}}}onError(i,e){return r=>{if(r.message+=`
|
|
150
|
+
Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+Oa(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Fl=new eG;function we(i,e){return Fl.parse(i,e)}we.options=we.setOptions=function(i){return Fl.setOptions(i),we.defaults=Fl.defaults,RB(we.defaults),we};we.getDefaults=Q1;we.defaults=Kl;we.use=function(...i){return Fl.use(...i),we.defaults=Fl.defaults,RB(we.defaults),we};we.walkTokens=function(i,e){return Fl.walkTokens(i,e)};we.parseInline=Fl.parseInline;we.Parser=Bs;we.parser=Bs.parse;we.Renderer=kg;we.TextRenderer=sC;we.Lexer=Ms;we.lexer=Ms.lex;we.Tokenizer=_g;we.Hooks=Yp;we.parse=we;we.options;we.setOptions;we.use;we.walkTokens;we.parseInline;Bs.parse;Ms.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 zT(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 iG(i){if(Array.isArray(i))return i}function rG(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 nG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
151
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aG(i,e){return iG(i)||rG(i,e)||sG(i,e)||nG()}function sG(i,e){if(i){if(typeof i=="string")return zT(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)?zT(i,e):void 0}}const WB=Object.entries,PT=Object.setPrototypeOf,oG=Object.isFrozen,lG=Object.getPrototypeOf,cG=Object.getOwnPropertyDescriptor;let rn=Object.freeze,sa=Object.seal,Rc=Object.create,GB=typeof Reflect<"u"&&Reflect,mv=GB.apply,yv=GB.construct;rn||(rn=function(e){return e});sa||(sa=function(e){return e});mv||(mv=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)});yv||(yv=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 Ec=ur(Array.prototype.forEach),hG=ur(Array.prototype.lastIndexOf),qT=ur(Array.prototype.pop),Nc=ur(Array.prototype.push),uG=ur(Array.prototype.splice),Vr=Array.isArray,Zu=ur(String.prototype.toLowerCase),i0=ur(String.prototype.toString),UT=ur(String.prototype.match),Ac=ur(String.prototype.replace),HT=ur(String.prototype.indexOf),dG=ur(String.prototype.trim),fG=ur(Number.prototype.toString),pG=ur(Boolean.prototype.toString),WT=typeof BigInt>"u"?null:ur(BigInt.prototype.toString),GT=typeof Symbol>"u"?null:ur(Symbol.prototype.toString),Xi=ur(Object.prototype.hasOwnProperty),Bu=ur(Object.prototype.toString),Lr=ur(RegExp.prototype.test),Lu=gG(TypeError);function ur(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 mv(i,e,n)}}function gG(i){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return yv(i,r)}}function Re(i,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zu;if(PT&&PT(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&&(oG(e)||(e[n]=o),a=o)}i[a]=!0}return i}function mG(i){for(let e=0;e<i.length;e++)Xi(i,e)||(i[e]=null);return i}function zr(i){const e=Rc(null);for(const n of WB(i)){var r=aG(n,2);const a=r[0],o=r[1];Xi(i,a)&&(Vr(o)?e[a]=mG(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=zr(o):e[a]=o)}return e}function yG(i){switch(typeof i){case"string":return i;case"number":return fG(i);case"boolean":return pG(i);case"bigint":return WT?WT(i):"0";case"symbol":return GT?GT(i):"Symbol()";case"undefined":return Bu(i);case"function":case"object":{if(i===null)return Bu(i);const e=i,r=Ra(e,"toString");if(typeof r=="function"){const n=r(e);return typeof n=="string"?n:Bu(n)}return Bu(i)}default:return Bu(i)}}function Ra(i,e){for(;i!==null;){const n=cG(i,e);if(n){if(n.get)return ur(n.get);if(typeof n.value=="function")return ur(n.value)}i=lG(i)}function r(){return null}return r}function bG(i){try{return Lr(i,""),!0}catch{return!1}}const YT=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"]),r0=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"]),n0=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"]),xG=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"]),a0=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"]),vG=rn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),KT=rn(["#text"]),VT=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"]),s0=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"]),XT=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"]),_p=rn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),CG=sa(/{{[\w\W]*|^[\w\W]*}}/g),_G=sa(/<%[\w\W]*|^[\w\W]*%>/g),kG=sa(/\${[\w\W]*/g),wG=sa(/^data-[\-\w.\u00B7-\uFFFF]+$/),SG=sa(/^aria-[\-\w]+$/),ZT=sa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TG=sa(/^(?:\w+script|data):/i),EG=sa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),NG=sa(/^html$/i),AG=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},MG=function(){return typeof window>"u"?null:window},BG=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}},QT=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function YB(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:MG();const e=Kt=>YB(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"),C=Ra(x,"nextSibling"),_=Ra(x,"childNodes"),k=Ra(x,"parentNode"),T=Ra(x,"shadowRoot"),E=Ra(x,"attributes"),A=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 L,N="";const M=r,I=M.implementation,j=M.createNodeIterator,P=M.createDocumentFragment,W=M.getElementsByTagName,K=n.importNode;let z=QT();e.isSupported=typeof WB=="function"&&typeof k=="function"&&I&&I.createHTMLDocument!==void 0;const G=CG,D=_G,F=kG,q=wG,X=SG,nt=TG,H=EG,J=AG;let ht=ZT,at=null;const vt=Re({},[...YT,...r0,...n0,...a0,...KT]);let ct=null;const Z=Re({},[...VT,...s0,...XT,..._p]);let Q=Object.seal(Rc(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}})),tt=null,ot=null;const Ct=Object.seal(Rc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let At=!0,Dt=!0,qt=!1,Rt=!0,Gt=!1,zt=!0,ye=!1,Ne=!1,ve=!1,pi=!1,Li=!1,Ti=!1,fe=!0,Ci=!1;const $e="user-content-";let Ue=!0,Fe=!1,Ii={},Oi=null;const Cr=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 _n=null;const $i=Re({},["audio","video","img","source","image","track"]);let je=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",dr="http://www.w3.org/2000/svg",_i="http://www.w3.org/1999/xhtml";let Qi=_i,Ae=!1,rr=null;const Sr=Re({},[Be,dr,_i],i0);let Hi=Re({},["mi","mo","mn","ms","mtext"]),it=Re({},["annotation-xml"]);const wt=Re({},["title","style","font","a","script"]);let jt=null;const he=["application/xhtml+xml","text/html"],si="text/html";let pe=null,Wt=null;const Pt=r.createElement("form"),le=function(V){return V instanceof RegExp||V instanceof Function},oi=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Wt&&Wt===V)return;(!V||typeof V!="object")&&(V={}),V=zr(V),jt=he.indexOf(V.PARSER_MEDIA_TYPE)===-1?si:V.PARSER_MEDIA_TYPE,pe=jt==="application/xhtml+xml"?i0:Zu,at=Xi(V,"ALLOWED_TAGS")&&Vr(V.ALLOWED_TAGS)?Re({},V.ALLOWED_TAGS,pe):vt,ct=Xi(V,"ALLOWED_ATTR")&&Vr(V.ALLOWED_ATTR)?Re({},V.ALLOWED_ATTR,pe):Z,rr=Xi(V,"ALLOWED_NAMESPACES")&&Vr(V.ALLOWED_NAMESPACES)?Re({},V.ALLOWED_NAMESPACES,i0):Sr,je=Xi(V,"ADD_URI_SAFE_ATTR")&&Vr(V.ADD_URI_SAFE_ATTR)?Re(zr(Ke),V.ADD_URI_SAFE_ATTR,pe):Ke,_n=Xi(V,"ADD_DATA_URI_TAGS")&&Vr(V.ADD_DATA_URI_TAGS)?Re(zr($i),V.ADD_DATA_URI_TAGS,pe):$i,Oi=Xi(V,"FORBID_CONTENTS")&&Vr(V.FORBID_CONTENTS)?Re({},V.FORBID_CONTENTS,pe):Cr,tt=Xi(V,"FORBID_TAGS")&&Vr(V.FORBID_TAGS)?Re({},V.FORBID_TAGS,pe):zr({}),ot=Xi(V,"FORBID_ATTR")&&Vr(V.FORBID_ATTR)?Re({},V.FORBID_ATTR,pe):zr({}),Ii=Xi(V,"USE_PROFILES")?V.USE_PROFILES&&typeof V.USE_PROFILES=="object"?zr(V.USE_PROFILES):V.USE_PROFILES:!1,At=V.ALLOW_ARIA_ATTR!==!1,Dt=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,Ci=V.SANITIZE_NAMED_PROPS||!1,Ue=V.KEEP_CONTENT!==!1,Fe=V.IN_PLACE||!1,ht=bG(V.ALLOWED_URI_REGEXP)?V.ALLOWED_URI_REGEXP:ZT,Qi=typeof V.NAMESPACE=="string"?V.NAMESPACE:_i,Hi=Xi(V,"MATHML_TEXT_INTEGRATION_POINTS")&&V.MATHML_TEXT_INTEGRATION_POINTS&&typeof V.MATHML_TEXT_INTEGRATION_POINTS=="object"?zr(V.MATHML_TEXT_INTEGRATION_POINTS):Re({},["mi","mo","mn","ms","mtext"]),it=Xi(V,"HTML_INTEGRATION_POINTS")&&V.HTML_INTEGRATION_POINTS&&typeof V.HTML_INTEGRATION_POINTS=="object"?zr(V.HTML_INTEGRATION_POINTS):Re({},["annotation-xml"]);const kt=Xi(V,"CUSTOM_ELEMENT_HANDLING")&&V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING=="object"?zr(V.CUSTOM_ELEMENT_HANDLING):Rc(null);if(Q=Rc(null),Xi(kt,"tagNameCheck")&&le(kt.tagNameCheck)&&(Q.tagNameCheck=kt.tagNameCheck),Xi(kt,"attributeNameCheck")&&le(kt.attributeNameCheck)&&(Q.attributeNameCheck=kt.attributeNameCheck),Xi(kt,"allowCustomizedBuiltInElements")&&typeof kt.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=kt.allowCustomizedBuiltInElements),Gt&&(Dt=!1),Li&&(pi=!0),Ii&&(at=Re({},KT),ct=Rc(null),Ii.html===!0&&(Re(at,YT),Re(ct,VT)),Ii.svg===!0&&(Re(at,r0),Re(ct,s0),Re(ct,_p)),Ii.svgFilters===!0&&(Re(at,n0),Re(ct,s0),Re(ct,_p)),Ii.mathMl===!0&&(Re(at,a0),Re(ct,XT),Re(ct,_p))),Ct.tagCheck=null,Ct.attributeCheck=null,Xi(V,"ADD_TAGS")&&(typeof V.ADD_TAGS=="function"?Ct.tagCheck=V.ADD_TAGS:Vr(V.ADD_TAGS)&&(at===vt&&(at=zr(at)),Re(at,V.ADD_TAGS,pe))),Xi(V,"ADD_ATTR")&&(typeof V.ADD_ATTR=="function"?Ct.attributeCheck=V.ADD_ATTR:Vr(V.ADD_ATTR)&&(ct===Z&&(ct=zr(ct)),Re(ct,V.ADD_ATTR,pe))),Xi(V,"ADD_URI_SAFE_ATTR")&&Vr(V.ADD_URI_SAFE_ATTR)&&Re(je,V.ADD_URI_SAFE_ATTR,pe),Xi(V,"FORBID_CONTENTS")&&Vr(V.FORBID_CONTENTS)&&(Oi===Cr&&(Oi=zr(Oi)),Re(Oi,V.FORBID_CONTENTS,pe)),Xi(V,"ADD_FORBID_CONTENTS")&&Vr(V.ADD_FORBID_CONTENTS)&&(Oi===Cr&&(Oi=zr(Oi)),Re(Oi,V.ADD_FORBID_CONTENTS,pe)),Ue&&(at["#text"]=!0),ye&&Re(at,["html","head","body"]),at.table&&(Re(at,["tbody"]),delete tt.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw Lu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Lu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=V.TRUSTED_TYPES_POLICY,N=L.createHTML("")}else L===void 0&&(L=BG(g,a)),L!==null&&typeof N=="string"&&(N=L.createHTML(""));(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&at===vt&&(at=zr(at)),z.uponSanitizeAttribute.length>0&&ct===Z&&(ct=zr(ct)),rn&&rn(V),Wt=V},gi=Re({},[...r0,...n0,...xG]),on=Re({},[...a0,...vG]),Gr=function(V){let kt=k(V);(!kt||!kt.tagName)&&(kt={namespaceURI:Qi,tagName:"template"});const ft=Zu(V.tagName),Lt=Zu(kt.tagName);return rr[V.namespaceURI]?V.namespaceURI===dr?kt.namespaceURI===_i?ft==="svg":kt.namespaceURI===Be?ft==="svg"&&(Lt==="annotation-xml"||Hi[Lt]):!!gi[ft]:V.namespaceURI===Be?kt.namespaceURI===_i?ft==="math":kt.namespaceURI===dr?ft==="math"&&it[Lt]:!!on[ft]:V.namespaceURI===_i?kt.namespaceURI===dr&&!it[Lt]||kt.namespaceURI===Be&&!Hi[Lt]?!1:!on[ft]&&(wt[ft]||!gi[ft]):!!(jt==="application/xhtml+xml"&&rr[V.namespaceURI]):!1},nr=function(V){Nc(e.removed,{element:V});try{k(V).removeChild(V)}catch{v(V)}},ar=function(V,kt){try{Nc(e.removed,{attribute:kt.getAttributeNode(V),from:kt})}catch{Nc(e.removed,{attribute:null,from:kt})}if(kt.removeAttribute(V),V==="is")if(pi||Li)try{nr(kt)}catch{}else try{kt.setAttribute(V,"")}catch{}},ki=function(V){let kt=null,ft=null;if(ve)V="<remove></remove>"+V;else{const re=UT(V,/^[\r\n\t ]+/);ft=re&&re[0]}jt==="application/xhtml+xml"&&Qi===_i&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const Lt=L?L.createHTML(V):V;if(Qi===_i)try{kt=new f().parseFromString(Lt,jt)}catch{}if(!kt||!kt.documentElement){kt=I.createDocument(Qi,"template",null);try{kt.documentElement.innerHTML=Ae?N:Lt}catch{}}const It=kt.body||kt.documentElement;return V&&ft&&It.insertBefore(r.createTextNode(ft),It.childNodes[0]||null),Qi===_i?W.call(kt,ye?"html":"body")[0]:ye?kt.documentElement:It},Wi=function(V){return j.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=j.call(V.ownerDocument||V,V,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let ft=kt.nextNode();for(;ft;){let Lt=ft.data;Ec([G,D,F],It=>{Lt=Ac(Lt,It," ")}),ft.data=Lt,ft=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!==A(V)||V.childNodes!==_(V)},wn=function(V){if(!A||typeof V!="object"||V===null)return!1;try{return A(V)===La.documentFragment}catch{return!1}},Sn=function(V){if(!A||typeof V!="object"||V===null)return!1;try{return typeof A(V)=="number"}catch{return!1}};function Tr(Kt,V,kt){Ec(Kt,ft=>{ft.call(e,V,kt,Wt)})}const $n=function(V){let kt=null;if(Tr(z.beforeSanitizeElements,V,null),In(V))return nr(V),!0;const ft=pe(V.nodeName);if(Tr(z.uponSanitizeElement,V,{tagName:ft,allowedTags:at}),zt&&V.hasChildNodes()&&!Sn(V.firstElementChild)&&Lr(/<[/\w!]/g,V.innerHTML)&&Lr(/<[/\w!]/g,V.textContent)||zt&&V.namespaceURI===_i&&ft==="style"&&Sn(V.firstElementChild)||V.nodeType===La.progressingInstruction||zt&&V.nodeType===La.comment&&Lr(/<[/\w]/g,V.data))return nr(V),!0;if(tt[ft]||!(Ct.tagCheck instanceof Function&&Ct.tagCheck(ft))&&!at[ft]){if(!tt[ft]&&Yr(ft)&&(Q.tagNameCheck instanceof RegExp&&Lr(Q.tagNameCheck,ft)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(ft)))return!1;if(Ue&&!Oi[ft]){const It=k(V),re=_(V);if(re&&It){const ze=re.length;for(let ci=ze-1;ci>=0;--ci){const Ve=y(re[ci],!0);It.insertBefore(Ve,C(V))}}}return nr(V),!0}return(A?A(V):V.nodeType)===La.element&&!Gr(V)||(ft==="noscript"||ft==="noembed"||ft==="noframes")&&Lr(/<\/no(script|embed|frames)/i,V.innerHTML)?(nr(V),!0):(Gt&&V.nodeType===La.text&&(kt=V.textContent,Ec([G,D,F],It=>{kt=Ac(kt,It," ")}),V.textContent!==kt&&(Nc(e.removed,{element:V.cloneNode()}),V.textContent=kt)),Tr(z.afterSanitizeElements,V,null),!1)},Ea=function(V,kt,ft){if(ot[kt]||fe&&(kt==="id"||kt==="name")&&(ft in r||ft in Pt))return!1;const Lt=ct[kt]||Ct.attributeCheck instanceof Function&&Ct.attributeCheck(kt,V);if(!(Dt&&!ot[kt]&&Lr(q,kt))){if(!(At&&Lr(X,kt))){if(!Lt||ot[kt]){if(!(Yr(V)&&(Q.tagNameCheck instanceof RegExp&&Lr(Q.tagNameCheck,V)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(V))&&(Q.attributeNameCheck instanceof RegExp&&Lr(Q.attributeNameCheck,kt)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(kt,V))||kt==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&Lr(Q.tagNameCheck,ft)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(ft))))return!1}else if(!je[kt]){if(!Lr(ht,Ac(ft,H,""))){if(!((kt==="src"||kt==="xlink:href"||kt==="href")&&V!=="script"&&HT(ft,"data:")===0&&_n[V])){if(!(qt&&!Lr(nt,Ac(ft,H,"")))){if(ft)return!1}}}}}}return!0},fr=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!fr[Zu(V)]&&Lr(J,V)},ln=function(V){Tr(z.beforeSanitizeAttributes,V,null);const kt=V.attributes;if(!kt||In(V))return;const ft={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ct,forceKeepAttr:void 0};let Lt=kt.length;for(;Lt--;){const It=kt[Lt],re=It.name,ze=It.namespaceURI,ci=It.value,Ve=pe(re),zi=ci;let _e=re==="value"?zi:dG(zi);if(ft.attrName=Ve,ft.attrValue=_e,ft.keepAttr=!0,ft.forceKeepAttr=void 0,Tr(z.uponSanitizeAttribute,V,ft),_e=ft.attrValue,Ci&&(Ve==="id"||Ve==="name")&&HT(_e,$e)!==0&&(ar(re,V),_e=$e+_e),zt&&Lr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_e)){ar(re,V);continue}if(Ve==="attributename"&&UT(_e,"href")){ar(re,V);continue}if(ft.forceKeepAttr)continue;if(!ft.keepAttr){ar(re,V);continue}if(!Rt&&Lr(/\/>/i,_e)){ar(re,V);continue}Gt&&Ec([G,D,F],zn=>{_e=Ac(_e,zn," ")});const Gi=pe(V.nodeName);if(!Ea(Gi,Ve,_e)){ar(re,V);continue}if(L&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ze)switch(g.getAttributeType(Gi,Ve)){case"TrustedHTML":{_e=L.createHTML(_e);break}case"TrustedScriptURL":{_e=L.createScriptURL(_e);break}}if(_e!==zi)try{ze?V.setAttributeNS(ze,re,_e):V.setAttribute(re,_e),In(V)?nr(V):qT(e.removed)}catch{ar(re,V)}}Tr(z.afterSanitizeAttributes,V,null)},pr=function(V){let kt=null;const ft=Wi(V);for(Tr(z.beforeSanitizeShadowDOM,V,null);kt=ft.nextNode();)if(Tr(z.uponSanitizeShadowNode,kt,null),$n(kt),ln(kt),wn(kt.content)&&pr(kt.content),(A?A(kt):kt.nodeType)===La.element){const It=T?T(kt):kt.shadowRoot;wn(It)&&(li(It),pr(It))}Tr(z.afterSanitizeShadowDOM,V,null)},li=function(V){const kt=A?A(V):V.nodeType;if(kt===La.element){const It=T?T(V):V.shadowRoot;wn(It)&&(li(It),pr(It))}const ft=_?_(V):V.childNodes;if(!ft)return;const Lt=[];Ec(ft,It=>{Nc(Lt,It)});for(const It of Lt)li(It);if(kt===La.element){const It=B?B(V):null;if(typeof It=="string"&&pe(It)==="template"){const re=V.content;wn(re)&&li(re)}}};return e.sanitize=function(Kt){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=null,ft=null,Lt=null,It=null;if(Ae=!Kt,Ae&&(Kt="<!-->"),typeof Kt!="string"&&!Sn(Kt)&&(Kt=yG(Kt),typeof Kt!="string"))throw Lu("dirty is not a string, aborting");if(!e.isSupported)return Kt;if(Ne||oi(V),e.removed=[],typeof Kt=="string"&&(Fe=!1),Fe){const ci=B?B(Kt):Kt.nodeName;if(typeof ci=="string"){const Ve=pe(ci);if(!at[Ve]||tt[Ve])throw Lu("root node is forbidden and cannot be sanitized in-place")}if(In(Kt))throw Lu("root node is clobbered and cannot be sanitized in-place");li(Kt)}else if(Sn(Kt))kt=ki("<!---->"),ft=kt.ownerDocument.importNode(Kt,!0),ft.nodeType===La.element&&ft.nodeName==="BODY"||ft.nodeName==="HTML"?kt=ft:kt.appendChild(ft),li(ft);else{if(!pi&&!Gt&&!ye&&Kt.indexOf("<")===-1)return L&&Ti?L.createHTML(Kt):Kt;if(kt=ki(Kt),!kt)return pi?null:Ti?N:""}kt&&ve&&nr(kt.firstChild);const re=Wi(Fe?Kt:kt);for(;Lt=re.nextNode();)$n(Lt),ln(Lt),wn(Lt.content)&&pr(Lt.content);if(Fe)return Gt&&kn(Kt),Kt;if(pi){if(Gt&&kn(kt),Li)for(It=P.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&&at["!doctype"]&&kt.ownerDocument&&kt.ownerDocument.doctype&&kt.ownerDocument.doctype.name&&Lr(NG,kt.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+kt.ownerDocument.doctype.name+`>
|
|
152
|
+
`+ze),Gt&&Ec([G,D,F],ci=>{ze=Ac(ze,ci," ")}),L&&Ti?L.createHTML(ze):ze},e.setConfig=function(){let Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oi(Kt),Ne=!0},e.clearConfig=function(){Wt=null,Ne=!1},e.isValidAttribute=function(Kt,V,kt){Wt||oi({});const ft=pe(Kt),Lt=pe(V);return Ea(ft,Lt,kt)},e.addHook=function(Kt,V){typeof V=="function"&&Nc(z[Kt],V)},e.removeHook=function(Kt,V){if(V!==void 0){const kt=hG(z[Kt],V);return kt===-1?void 0:uG(z[Kt],kt,1)[0]}return qT(z[Kt])},e.removeHooks=function(Kt){z[Kt]=[]},e.removeAllHooks=function(){z=QT()},e}var Do=YB();const KB="sleepy:config:v1",VB=KB,bv="sleepy",JT=420,LG=520,xv={enabled:!1,hotkey:"Alt+Cmd+S"};function oC(){try{const i=localStorage.getItem(VB);if(i){const e=JSON.parse(i);return{enabled:!!e.enabled,hotkey:typeof e.hotkey=="string"&&e.hotkey.trim()?e.hotkey:xv.hotkey}}}catch{}return{...xv}}function XB(i){try{localStorage.setItem(VB,JSON.stringify(i))}catch{}}function OG(i){XB(i),Xt.post("/launcher/sleepy-config",i).catch(()=>{})}async function RG(){try{const i=await Xt.get("/launcher/sleepy-config"),e={enabled:!!i.enabled,hotkey:typeof i.hotkey=="string"&&i.hotkey.trim()?i.hotkey:xv.hotkey};return XB(e),e}catch{return oC()}}async function jG(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 DG(){if(!Po())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(bv);if(e){await e.close();return}const{x:r,y:n}=await jG(JT),a=new i(bv,{url:`${window.location.origin}/?capture=1`,width:JT,height:LG,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 FG(){if(!Po())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(bv);e&&await e.close()}async function tE(){if(Po())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 FG()}}async function IG(i){if(!Po())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 vv(i){if(Po())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"&&DG()})}catch(e){console.warn("[sleepy] hotkey registration failed:",e)}}we.setOptions({gfm:!0,breaks:!0});function $G(i){return Do.sanitize(we.parse(i))}const eE="sleepy:lastVault",zG=120;function PG(i){return i>=10?"sleeps":i>=8?"sleepy":"idle"}function qG(){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,C]=Y.useState("idle"),_=Y.useRef(null),k=Y.useRef(null),T=Y.useRef(!1),E=Y.useRef(!1);function A(I){I&&(I.style.height="auto",I.style.height=`${Math.min(I.scrollHeight,zG)}px`)}Y.useEffect(()=>{const I=document.documentElement,j=I.style.background,P=document.body.style.background;return I.style.background="transparent",document.body.style.background="transparent",()=>{I.style.background=j,document.body.style.background=P}},[]),Y.useEffect(()=>{Xt.get("/vaults").then(I=>{var z;const j=I.vaults.filter(G=>G.exists!==!1),P=j.length>0?j:I.vaults;e(P);const W=localStorage.getItem(eE),K=W&&P.some(G=>G.name===W)?W:((z=P[0])==null?void 0:z.name)??"";n(K)}).catch(()=>h("error"))},[]),Y.useEffect(()=>{if(!r)return;fM(r);let I=!1;return Xt.get("/sleep").then(j=>{I||C(PG(typeof j.debt=="number"?j.debt:0))}).catch(()=>{I||C("idle")}),()=>{I=!0}},[r]),Y.useEffect(()=>{var j;(j=_.current)==null||j.focus();const I=P=>{P.key==="Escape"&&(P.preventDefault(),tE())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[]),Y.useEffect(()=>{let I=!1,j=!1,P=()=>{};return IG(W=>{if(W){I=!0;return}I&&!T.current&&!E.current&&tE()}).then(W=>{j?W():P=W}),()=>{j=!0,P()}},[]),Y.useEffect(()=>()=>{k.current&&window.clearTimeout(k.current)},[]);function B(I,j){k.current&&window.clearTimeout(k.current);let P=0;const W=j==="sleep"?750:150;let K=0;const z=async()=>{P+=1;try{const G=await Xt.get(`/launcher/capture/status?id=${encodeURIComponent(I)}`);K=G.state==="unknown"?K+1:0,y({state:G.state,output:G.output,mode:j}),(G.state==="running"||G.state==="unknown")&&P<W&&K<3&&(k.current=window.setTimeout(()=>void z(),1200))}catch{y({state:"error",output:"Lost contact with the run.",mode:j})}};k.current=window.setTimeout(()=>void z(),600)}async function L(){var P;const I=a.trim(),j=f;if(!(j!=="sleep"&&!I||!r||c==="saving")){h("saving"),d(""),y(null);try{const W=await Xt.post("/launcher/capture",{vault:r,text:I,mode:j});localStorage.setItem(eE,r),o(""),h(j==="learn"?"saved":"idle"),_.current&&(_.current.style.height="auto"),(P=_.current)==null||P.focus(),W.captureId&&(y({state:"running",output:"",mode:j}),B(W.captureId,j)),window.setTimeout(()=>h("idle"),1400)}catch(W){d(W instanceof Error?W.message:"Capture failed"),h("error"),window.setTimeout(()=>h("idle"),5e3)}}}const N=(x==null?void 0:x.mode)==="sleep"&&(x.state==="running"||x.state==="unknown");E.current=N;const M=N?"sleeps":v;return m.jsxs("div",{className:"cap-root",children:[m.jsx("div",{className:"cap-notch","data-tauri-drag-region":!0,children:m.jsx("img",{className:"cap-char",src:`/api/sleepy/anim?mode=${M}`,alt:"",draggable:!1},M)}),m.jsxs("div",{className:`cap-bar cap-${c}`,children:[m.jsxs("div",{className:"cap-bar-head",children:[m.jsxs("div",{className:"cap-vault-wrap",children:[m.jsxs("select",{className:"cap-vault",value:r,onFocus:()=>{T.current=!0},onBlur:()=>{T.current=!1},onChange:I=>n(I.target.value),"aria-label":"Project",children:[i.length===0&&m.jsx("option",{value:"",children:"No projects"}),i.map(I=>m.jsx("option",{value:I.name,children:I.name},I.name))]}),m.jsx("span",{className:"cap-chev","aria-hidden":!0,children:"⌄"})]}),m.jsx("span",{className:`cap-status cap-status-${c}`,"aria-hidden":!0,children:c==="saving"?"saving…":c==="saved"?"captured ✓":c==="error"?"failed":""}),m.jsx("div",{className:"cap-mode-toggle",role:"radiogroup","aria-label":"Mode",children:["ask","learn","sleep"].map(I=>m.jsx("button",{type:"button",className:`cap-mode-opt ${f===I?"is-active":""}`,role:"radio","aria-checked":f===I,disabled:N,onClick:()=>g(I),children:I==="learn"?"Learn":I==="ask"?"Ask":"Sleep"},I))})]}),f==="sleep"?m.jsx("button",{type:"button",className:"cap-sleep-btn",disabled:N||!r,onClick:()=>void L(),children:N?"Sleeping…":`💤 Sleep — consolidate ${r||"project"}`}):m.jsx("textarea",{ref:_,className:"cap-input",placeholder:f==="ask"?"Ask one question about this project…":"Capture a thought or command…",rows:1,value:a,onChange:I=>{o(I.target.value),A(I.target)},onKeyDown:I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),L())}}),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:$G(x.output)}}))]})]})]})}const ZB=Y.createContext(null);function QB(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function iE(i){return i==="system"?QB():i}function rE({children:i}){const[e,r]=Y.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=Y.useState(()=>iE(e)),o=c=>{r(c),localStorage.setItem("dreamcontext-theme",c)};return Y.useEffect(()=>{const c=iE(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=QB();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),m.jsx(ZB.Provider,{value:{theme:e,resolved:n,setTheme:o},children:i})}function Wd(){const i=Y.useContext(ZB);if(!i)throw new Error("useTheme must be used within ThemeProvider");return i}const UG={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.intro.title":"What is cross-project federation?","federation.intro.body":"Federation lets your projects share knowledge with each other. Connect two projects and one can “read” the other — its agent can recall decisions, changelog and knowledge from across the link. It’s off by default: nothing is shared until you opt in.","federation.intro.step1":"1. Turn on Sharing below so other projects are allowed to read this one.","federation.intro.step2":"2. Add a connection to a peer and choose the direction — read it, share to it, or both.","federation.intro.step3":"3. Incoming knowledge lands in the digest inbox and is folded in on the next sleep cycle.","federation.sharing":"Sharing","federation.shareable.label":"Let other projects read this one","federation.shareable.hint":"When on, projects you’ve connected may pull this project’s knowledge into their recall. Off = private (the default). This only controls who may READ you — it never stops you reading others.","federation.vaults":"Registered vaults","federation.vaults.empty":"No vaults registered. Run `dreamcontext vaults discover --register` to add sibling projects.","federation.current":"This project","federation.connections":"Connections","federation.connections.empty":"No connections yet. Add a peer below to read or share knowledge across projects.","federation.stale":"Stale","federation.remove":"Remove","federation.direction":"Direction","federation.direction.out":"⮞ Share to","federation.direction.in":"⮜ Read from","federation.direction.both":"⇄ Two-way","federation.direction.out.hint":"Your knowledge flows to this peer, and your recall can reach into theirs.","federation.direction.in.hint":"Accept this peer’s digests into your inbox.","federation.direction.both.hint":"Read from and share to this peer.","federation.topics.placeholder":"topics (comma-separated, blank = all)","federation.topics.label":"Limit to topics","federation.add":"Add a connection","federation.add.pick":"Pick a vault…","federation.add.none":"Every registered vault is already connected (or none are available to add).","federation.connect":"Connect","federation.error.pick_vault":"Pick a vault to connect to.","federation.inbox":"Digest inbox","federation.inbox.pending":"Pending","federation.inbox.consumed":"Consumed","federation.inbox.empty":"Inbox is empty — no peer digests waiting. The next sleep cycle drains it.","federation.inbox.quarantined":"Quarantined (incompatible schema — left in place)","federation.inbox.from":"from","federation.preview":"Preview sync","federation.preview.running":"Previewing…","federation.preview.hint":"Dry-run: computes the digests that would be pushed to consenting peers. Writes nothing.","federation.preview.none":"No out/both connections to preview.","federation.preview.stale":"unreachable (stale)","federation.preview.noconsent":"no consent (peer must link in/both back)","federation.preview.nodelta":"no new entries since last sync","federation.preview.entries":"entries would be pushed","packs.title":"Skill Packs","packs.section.packs":"Packs","packs.section.standalone":"Standalone Skills","packs.detail.base":"Base Skill","packs.detail.subskills":"Sub-Skills","packs.detail.agents":"Related Agents","packs.detail.close":"Close","packs.action.install":"Install","packs.action.remove":"Remove","packs.action.installing":"Installing…","packs.action.removing":"Removing…","packs.action.error":"Action failed","update.available":"Update available","update.title":"Update Available","update.dismiss":"Dismiss","update.managePacks":"Manage packs →","taxonomy.title":"Taxonomy","common.loading":"Loading...","common.error":"Error","common.empty":"Nothing here yet.","common.close":"Close"}},JB=Y.createContext(null);function HG({children:i}){const[e,r]=Y.useState("en"),n=a=>{var o;return((o=UG[e])==null?void 0:o[a])??a};return m.jsx(JB.Provider,{value:{locale:e,setLocale:r,t:n},children:i})}function Bi(){const i=Y.useContext(JB);if(!i)throw new Error("useI18n must be used within I18nProvider");return i}const tL=Y.createContext({projectId:"",contextRoot:""});function WG(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 GG({children:i}){const[e,r]=Y.useState({kind:"loading"});return Y.useEffect(()=>{Xt.get("/health").then(n=>{r({kind:"ready",value:{contextRoot:n.contextRoot,projectId:WG(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(tL.Provider,{value:e.value,children:i})}function eL(){return Y.useContext(tL)}function iL(i){return i<=3?"Alert":i<=6?"Drowsy":i<=9?"Sleepy":"Must Sleep"}function rL(i){return i<=3?"alert":i<=6?"drowsy":i<=9?"sleepy":"must_sleep"}function nL(){return ri({queryKey:["sleep"],queryFn:()=>Xt.get("/sleep")})}function YG(){return ri({queryKey:["version-check"],queryFn:()=>Xt.get("/version-check")})}var Kp={exports:{}},KG=Kp.exports,nE;function VG(){return nE||(nE=1,(function(i,e){(function(r,n){i.exports=n()})(KG,(function(){var r=1e3,n=6e4,a=36e5,o="millisecond",c="second",h="minute",u="hour",d="day",f="week",g="month",x="quarter",y="year",v="date",C="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var G=["th","st","nd","rd"],D=z%100;return"["+z+(G[(D-20)%10]||G[D]||G[0])+"]"}},E=function(z,G,D){var F=String(z);return!F||F.length>=G?z:""+Array(G+1-F.length).join(D)+z},A={s:E,z:function(z){var G=-z.utcOffset(),D=Math.abs(G),F=Math.floor(D/60),q=D%60;return(G<=0?"+":"-")+E(F,2,"0")+":"+E(q,2,"0")},m:function z(G,D){if(G.date()<D.date())return-z(D,G);var F=12*(D.year()-G.year())+(D.month()-G.month()),q=G.clone().add(F,g),X=D-q<0,nt=G.clone().add(F+(X?-1:1),g);return+(-(F+(D-q)/(X?q-nt:nt-q))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:g,y,w:f,d,D:v,h:u,m:h,s:c,ms:o,Q:x}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},B="en",L={};L[B]=T;var N="$isDayjsObject",M=function(z){return z instanceof W||!(!z||!z[N])},I=function z(G,D,F){var q;if(!G)return B;if(typeof G=="string"){var X=G.toLowerCase();L[X]&&(q=X),D&&(L[X]=D,q=X);var nt=G.split("-");if(!q&&nt.length>1)return z(nt[0])}else{var H=G.name;L[H]=G,q=H}return!F&&q&&(B=q),q||!F&&B},j=function(z,G){if(M(z))return z.clone();var D=typeof G=="object"?G:{};return D.date=z,D.args=arguments,new W(D)},P=A;P.l=I,P.i=M,P.w=function(z,G){return j(z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var W=(function(){function z(D){this.$L=I(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[N]=!0}var G=z.prototype;return G.parse=function(D){this.$d=(function(F){var q=F.date,X=F.utc;if(q===null)return new Date(NaN);if(P.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var nt=q.match(_);if(nt){var H=nt[2]-1||0,J=(nt[7]||"0").substring(0,3);return X?new Date(Date.UTC(nt[1],H,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,J)):new Date(nt[1],H,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,J)}}return new Date(q)})(D),this.init()},G.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},G.$utils=function(){return P},G.isValid=function(){return this.$d.toString()!==C},G.isSame=function(D,F){var q=j(D);return this.startOf(F)<=q&&q<=this.endOf(F)},G.isAfter=function(D,F){return j(D)<this.startOf(F)},G.isBefore=function(D,F){return this.endOf(F)<j(D)},G.$g=function(D,F,q){return P.u(D)?this[F]:this.set(q,D)},G.unix=function(){return Math.floor(this.valueOf()/1e3)},G.valueOf=function(){return this.$d.getTime()},G.startOf=function(D,F){var q=this,X=!!P.u(F)||F,nt=P.p(D),H=function(tt,ot){var Ct=P.w(q.$u?Date.UTC(q.$y,ot,tt):new Date(q.$y,ot,tt),q);return X?Ct:Ct.endOf(d)},J=function(tt,ot){return P.w(q.toDate()[tt].apply(q.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(ot)),q)},ht=this.$W,at=this.$M,vt=this.$D,ct="set"+(this.$u?"UTC":"");switch(nt){case y:return X?H(1,0):H(31,11);case g:return X?H(1,at):H(0,at+1);case f:var Z=this.$locale().weekStart||0,Q=(ht<Z?ht+7:ht)-Z;return H(X?vt-Q:vt+(6-Q),at);case d:case v:return J(ct+"Hours",0);case u:return J(ct+"Minutes",1);case h:return J(ct+"Seconds",2);case c:return J(ct+"Milliseconds",3);default:return this.clone()}},G.endOf=function(D){return this.startOf(D,!1)},G.$set=function(D,F){var q,X=P.p(D),nt="set"+(this.$u?"UTC":""),H=(q={},q[d]=nt+"Date",q[v]=nt+"Date",q[g]=nt+"Month",q[y]=nt+"FullYear",q[u]=nt+"Hours",q[h]=nt+"Minutes",q[c]=nt+"Seconds",q[o]=nt+"Milliseconds",q)[X],J=X===d?this.$D+(F-this.$W):F;if(X===g||X===y){var ht=this.clone().set(v,1);ht.$d[H](J),ht.init(),this.$d=ht.set(v,Math.min(this.$D,ht.daysInMonth())).$d}else H&&this.$d[H](J);return this.init(),this},G.set=function(D,F){return this.clone().$set(D,F)},G.get=function(D){return this[P.p(D)]()},G.add=function(D,F){var q,X=this;D=Number(D);var nt=P.p(F),H=function(at){var vt=j(X);return P.w(vt.date(vt.date()+Math.round(at*D)),X)};if(nt===g)return this.set(g,this.$M+D);if(nt===y)return this.set(y,this.$y+D);if(nt===d)return H(1);if(nt===f)return H(7);var J=(q={},q[h]=n,q[u]=a,q[c]=r,q)[nt]||1,ht=this.$d.getTime()+D*J;return P.w(ht,this)},G.subtract=function(D,F){return this.add(-1*D,F)},G.format=function(D){var F=this,q=this.$locale();if(!this.isValid())return q.invalidDate||C;var X=D||"YYYY-MM-DDTHH:mm:ssZ",nt=P.z(this),H=this.$H,J=this.$m,ht=this.$M,at=q.weekdays,vt=q.months,ct=q.meridiem,Z=function(ot,Ct,At,Dt){return ot&&(ot[Ct]||ot(F,X))||At[Ct].slice(0,Dt)},Q=function(ot){return P.s(H%12||12,ot,"0")},tt=ct||function(ot,Ct,At){var Dt=ot<12?"AM":"PM";return At?Dt.toLowerCase():Dt};return X.replace(k,(function(ot,Ct){return Ct||(function(At){switch(At){case"YY":return String(F.$y).slice(-2);case"YYYY":return P.s(F.$y,4,"0");case"M":return ht+1;case"MM":return P.s(ht+1,2,"0");case"MMM":return Z(q.monthsShort,ht,vt,3);case"MMMM":return Z(vt,ht);case"D":return F.$D;case"DD":return P.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Z(q.weekdaysMin,F.$W,at,2);case"ddd":return Z(q.weekdaysShort,F.$W,at,3);case"dddd":return at[F.$W];case"H":return String(H);case"HH":return P.s(H,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return tt(H,J,!0);case"A":return tt(H,J,!1);case"m":return String(J);case"mm":return P.s(J,2,"0");case"s":return String(F.$s);case"ss":return P.s(F.$s,2,"0");case"SSS":return P.s(F.$ms,3,"0");case"Z":return nt}return null})(ot)||nt.replace(":","")}))},G.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},G.diff=function(D,F,q){var X,nt=this,H=P.p(F),J=j(D),ht=(J.utcOffset()-this.utcOffset())*n,at=this-J,vt=function(){return P.m(nt,J)};switch(H){case y:X=vt()/12;break;case g:X=vt();break;case x:X=vt()/3;break;case f:X=(at-ht)/6048e5;break;case d:X=(at-ht)/864e5;break;case u:X=at/a;break;case h:X=at/n;break;case c:X=at/r;break;default:X=at}return q?X:P.a(X)},G.daysInMonth=function(){return this.endOf(g).$D},G.$locale=function(){return L[this.$L]},G.locale=function(D,F){if(!D)return this.$L;var q=this.clone(),X=I(D,F,!0);return X&&(q.$L=X),q},G.clone=function(){return P.w(this.$d,this)},G.toDate=function(){return new Date(this.valueOf())},G.toJSON=function(){return this.isValid()?this.toISOString():null},G.toISOString=function(){return this.$d.toISOString()},G.toString=function(){return this.$d.toUTCString()},z})(),K=W.prototype;return j.prototype=K,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",g],["$y",y],["$D",v]].forEach((function(z){K[z[1]]=function(G){return this.$g(G,z[0],z[1])}})),j.extend=function(z,G){return z.$i||(z(G,W,j),z.$i=!0),j},j.locale=I,j.isDayjs=M,j.unix=function(z){return j(1e3*z)},j.en=L[B],j.Ls=L,j.p={},j}))})(Kp)),Kp.exports}var XG=VG();const ZG=Id(XG);var aL=Object.defineProperty,O=(i,e)=>aL(i,"name",{value:e,configurable:!0}),QG=(i,e)=>{for(var r in e)aL(i,r,{get:e[r],enumerable:!0})},vs={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Nt={trace:O((...i)=>{},"trace"),debug:O((...i)=>{},"debug"),info:O((...i)=>{},"info"),warn:O((...i)=>{},"warn"),error:O((...i)=>{},"error"),fatal:O((...i)=>{},"fatal")},lC=O(function(i="fatal"){let e=vs.fatal;typeof i=="string"?i.toLowerCase()in vs&&(e=vs[i]):typeof i=="number"&&(e=i),Nt.trace=()=>{},Nt.debug=()=>{},Nt.info=()=>{},Nt.warn=()=>{},Nt.error=()=>{},Nt.fatal=()=>{},e<=vs.fatal&&(Nt.fatal=console.error?console.error.bind(console,Jn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Jn("FATAL"))),e<=vs.error&&(Nt.error=console.error?console.error.bind(console,Jn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Jn("ERROR"))),e<=vs.warn&&(Nt.warn=console.warn?console.warn.bind(console,Jn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Jn("WARN"))),e<=vs.info&&(Nt.info=console.info?console.info.bind(console,Jn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Jn("INFO"))),e<=vs.debug&&(Nt.debug=console.debug?console.debug.bind(console,Jn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jn("DEBUG"))),e<=vs.trace&&(Nt.trace=console.debug?console.debug.bind(console,Jn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jn("TRACE")))},"setLogLevel"),Jn=O(i=>`%c${ZG().format("ss.SSS")} : ${i} : `,"format");const Vp={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 Vp.hue2rgb(o,a,i+1/3)*255;case"g":return Vp.hue2rgb(o,a,i)*255;case"b":return Vp.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}}},JG={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},tY={dec2hex:i=>{const e=Math.round(i).toString(16);return e.length>1?e:`0${e}`}},ke={channel:Vp,lang:JG,unit:tY},bo={};for(let i=0;i<=255;i++)bo[i]=ke.unit.dec2hex(i);const Pr={ALL:0,RGB:1,HSL:2};class eY{constructor(){this.type=Pr.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=Pr.ALL}is(e){return this.type===e}}class iY{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new eY}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Pr.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(Pr.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(Pr.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(Pr.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(Pr.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(Pr.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(Pr.RGB)&&r!==void 0?r:(this._ensureRGB(),ke.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Pr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Pr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Pr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Pr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Pr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Pr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const fm=new iY({r:0,g:0,b:0,a:0},"transparent"),Uc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const e=i.match(Uc.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 fm.set({r:(n>>u*(d+3)&f)*h,g:(n>>u*(d+2)&f)*h,b:(n>>u*(d+1)&f)*h,a:o?(n&f)*h/255:1},i)},stringify:i=>{const{r:e,g:r,b:n,a}=i;return a<1?`#${bo[Math.round(e)]}${bo[Math.round(r)]}${bo[Math.round(n)]}${bo[Math.round(a*255)]}`:`#${bo[Math.round(e)]}${bo[Math.round(r)]}${bo[Math.round(n)]}`}},bl={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:i=>{const e=i.match(bl.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return 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(bl.re);if(!r)return;const[,n,a,o,c,h]=r;return fm.set({h:bl._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)}%)`}},hd={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=hd.colors[i];if(e)return Uc.parse(e)},stringify:i=>{const e=Uc.stringify(i);for(const r in hd.colors)if(hd.colors[r]===e)return r}},Qu={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(Qu.re);if(!r)return;const[,n,a,o,c,h,u,d,f]=r;return fm.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)})`}},Ya={format:{keyword:hd,hex:Uc,rgb:Qu,rgba:Qu,hsl:bl,hsla:bl},parse:i=>{if(typeof i!="string")return i;const e=Uc.parse(i)||Qu.parse(i)||bl.parse(i)||hd.parse(i);if(e)return e;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(Pr.HSL)||i.data.r===void 0?bl.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?Qu.stringify(i):Uc.stringify(i)},sL=(i,e)=>{const r=Ya.parse(i);for(const n in e)r[n]=ke.channel.clamp[n](e[n]);return Ya.stringify(r)},Oo=(i,e,r=0,n=1)=>{if(typeof i!="number")return sL(i,{a:e});const a=fm.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 Ya.stringify(a)},rY=i=>{const{r:e,g:r,b:n}=Ya.parse(i),a=.2126*ke.channel.toLinear(e)+.7152*ke.channel.toLinear(r)+.0722*ke.channel.toLinear(n);return ke.lang.round(a)},nY=i=>rY(i)>=.5,Ta=i=>!nY(i),oL=(i,e,r)=>{const n=Ya.parse(i),a=n[e],o=ke.channel.clamp[e](a+r);return a!==o&&(n[e]=o),Ya.stringify(n)},_t=(i,e)=>oL(i,"l",e),bt=(i,e)=>oL(i,"l",-e),$=(i,e)=>{const r=Ya.parse(i),n={};for(const a in e)e[a]&&(n[a]=r[a]+e[a]);return sL(i,n)},aY=(i,e,r=50)=>{const{r:n,g:a,b:o,a:c}=Ya.parse(i),{r:h,g:u,b:d,a:f}=Ya.parse(e),g=r/100,x=g*2-1,y=c-f,C=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,_=1-C,k=n*C+h*_,T=a*C+u*_,E=o*C+d*_,A=c*g+f*(1-g);return Oo(k,T,E,A)},ut=(i,e=100)=>{const r=Ya.parse(i);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,aY(r,i,e)};var lL=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ud=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sY=/\s*%%.*\n/gm,rh,cL=(rh=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},O(rh,"UnknownDiagramError"),rh),Il={},cC=O(function(i,e){i=i.replace(lL,"").replace(ud,"").replace(sY,`
|
|
153
|
+
`);for(const[r,{detector:n}]of Object.entries(Il))if(n(i,e))return r;throw new cL(`No diagram type detected matching given configuration for text: ${i}`)},"detectType"),Cv=O((...i)=>{for(const{id:e,detector:r,loader:n}of i)hL(e,r,n)},"registerLazyLoadedDiagrams"),hL=O((i,e,r)=>{Il[i]&&Nt.warn(`Detector with key ${i} already exists. Overwriting.`),Il[i]={detector:e,loader:r},Nt.debug(`Detector with key ${i} added${r?" with loader":""}`)},"addDetector"),oY=O(i=>Il[i].loader,"getDiagramLoader"),_v=O((i,e,{depth:r=2,clobber:n=!1}={})=>{const a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(i)?(e.forEach(o=>_v(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]=_v(i[o],e[o],{depth:r-1,clobber:n})):(n||typeof i[o]!="object"&&typeof e[o]!="object")&&(i[o]=e[o])}),i)},"assignWithDepth"),br=_v,Za="#ffffff",Qa="#f2f2f2",xe=O((i,e)=>e?$(i,{s:-40,l:10}):$(i,{s:-40,l:-10}),"mkBorder"),nh,lY=(nh=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,A,B,L,N;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||ut(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||_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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.darkMode)for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=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]||ut(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]||$(this.mainBkg,{h:180,s:-15,l:e*(5+M*3)}),this["surfacePeer"+M]=this["surfacePeer"+M]||$(this.mainBkg,{h:180,s:-15,l:e*(8+M*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??$(this.primaryColor,{l:-30}),this.venn2=this.venn2??$(this.secondaryColor,{l:-30}),this.venn3=this.venn3??$(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??$(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??$(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??$(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??$(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??$(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((d=this.radar)==null?void 0:d.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.xyChart)==null?void 0:C.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((N=this.xyChart)==null?void 0:N.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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(nh,"Theme"),nh),cY=O(i=>{const e=new lY;return e.calculate(i),e},"getThemeVariables"),ah,hY=(ah=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ut("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Oo(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=bt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=bt(this.sectionBkgColor,10),this.taskBorderColor=Oo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oo(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||_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,A,B,L;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=ut(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330});for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||ut(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScalePeer"+N]=this["cScalePeer"+N]||_t(this["cScale"+N],10);for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||$(this.mainBkg,{h:30,s:-30,l:-(-10+N*4)}),this["surfacePeer"+N]=this["surfacePeer"+N]||$(this.mainBkg,{h:30,s:-30,l:-(-7+N*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["pie"+N]=this["cScale"+N];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 N=0;N<8;N++)this["venn"+(N+1)]=this["venn"+(N+1)]??_t(this["cScale"+N],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((L=this.radar)==null?void 0:L.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||$(this.primaryColor,{h:-30}),20),this.git4=_t(this.pie5||$(this.primaryColor,{h:-60}),20),this.git5=_t(this.pie6||$(this.primaryColor,{h:-90}),10),this.git6=_t(this.pie7||$(this.primaryColor,{h:60}),10),this.git7=_t(this.pie8||$(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_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]})}},O(ah,"Theme"),ah),uY=O(i=>{const e=new hY;return e.calculate(i),e},"getThemeVariables"),sh,dY=(sh=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=$(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=xe(this.primaryColor,this.darkMode),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=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=Oo(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var e,r,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,E,A,B,L;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||bt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||bt(this.tertiaryColor,40);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=bt(this["cScale"+N],10),this["cScalePeer"+N]=this["cScalePeer"+N]||bt(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||$(this["cScale"+N],{h:180});for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||$(this.mainBkg,{h:30,l:-(5+N*5)}),this["surfacePeer"+N]=this["surfacePeer"+N]||$(this.mainBkg,{h:30,l:-(7+N*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ut(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ut(this.labelTextColor);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||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=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||$(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-30}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||$(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||$(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??$(this.primaryColor,{l:-30}),this.venn2=this.venn2??$(this.secondaryColor,{l:-30}),this.venn3=this.venn3??$(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??$(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??$(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??$(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??$(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??$(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((L=this.xyChart)==null?void 0:L.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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(ut(this.git0),25),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(sh,"Theme"),sh),fY=O(i=>{const e=new dY;return e.calculate(i),e},"getThemeVariables"),oh,pY=(oh=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=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.primaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var e,r,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,E,A,B,L;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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||bt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||bt(this.tertiaryColor,40);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=bt(this["cScale"+N],10),this["cScalePeer"+N]=this["cScalePeer"+N]||bt(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||$(this["cScale"+N],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||$(this.mainBkg,{h:30,s:-30,l:-(5+N*5)}),this["surfacePeer"+N]=this["surfacePeer"+N]||$(this.mainBkg,{h:30,s:-30,l:-(8+N*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=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||$(this.primaryColor,{l:-30}),this.pie5=this.pie5||$(this.secondaryColor,{l:-30}),this.pie6=this.pie6||$(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||$(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??$(this.primaryColor,{l:-30}),this.venn2=this.venn2??$(this.secondaryColor,{l:-30}),this.venn3=this.venn3??$(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??$(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??$(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??$(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??$(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??$(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((L=this.xyChart)==null?void 0:L.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(oh,"Theme"),oh),gY=O(i=>{const e=new pY;return e.calculate(i),e},"getThemeVariables"),lh,mY=(lh=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=_t(this.contrast,55),this.background="#ffffff",this.tertiaryColor=$(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=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||_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,A,B,L;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 N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||ut(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this.darkMode?this["cScalePeer"+N]=this["cScalePeer"+N]||_t(this["cScale"+N],10):this["cScalePeer"+N]=this["cScalePeer"+N]||bt(this["cScale"+N],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||$(this.mainBkg,{l:-(5+N*5)}),this["surfacePeer"+N]=this["surfacePeer"+N]||$(this.mainBkg,{l:-(8+N*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=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128});for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["pie"+N]=this["cScale"+N];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 N=0;N<8;N++)this["venn"+(N+1)]=this["venn"+(N+1)]??this["cScale"+N];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((L=this.radar)==null?void 0:L.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||$(this.primaryColor,{h:-30}),this.git4=this.pie5||$(this.primaryColor,{h:-60}),this.git5=this.pie6||$(this.primaryColor,{h:-90}),this.git6=this.pie7||$(this.primaryColor,{h:60}),this.git7=this.pie8||$(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(lh,"Theme"),lh),yY=O(i=>{const e=new mY;return e.calculate(i),e},"getThemeVariables"),ch,bY=(ch=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,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||ut(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=$(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||_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||$(e,{h:30}),this.cScale4=this.cScale4||$(e,{h:60}),this.cScale5=this.cScale5||$(e,{h:90}),this.cScale6=this.cScale6||$(e,{h:120}),this.cScale7=this.cScale7||$(e,{h:150}),this.cScale8=this.cScale8||$(e,{h:210,l:150}),this.cScale9=this.cScale9||$(e,{h:270}),this.cScale10=this.cScale10||$(e,{h:300}),this.cScale11=this.cScale11||$(e,{h:330}),this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=bt(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=bt(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ut(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||bt(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(r,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(r,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(r,{l:-10}),this.pie6=this.pie6||$(n,{l:-10}),this.pie7=this.pie7||$(e,{h:60,l:-10}),this.pie8=this.pie8||$(e,{h:-60,l:-10}),this.pie9=this.pie9||$(e,{h:120,l:0}),this.pie10=this.pie10||$(e,{h:60,l:-20}),this.pie11=this.pie11||$(e,{h:-60,l:-20}),this.pie12=this.pie12||$(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||$(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?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||$(e,{h:-30}),this.git4=this.git4||$(e,{h:-60}),this.git5=this.git5||$(e,{h:-90}),this.git6=this.git6||$(e,{h:60}),this.git7=this.git7||$(e,{h:120}),this.darkMode?(this.git0=_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(ch,"Theme"),ch),xY=O(i=>{const e=new bY;return e.calculate(i),e},"getThemeVariables"),hh,vY=(hh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ut("#323D47"),10),this.border1="#ccc",this.border2=Oo(255,255,255,.25),this.arrowheadColor=ut(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,n,a,o,c,h,u,d,f,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||ut(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||_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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=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]||ut(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]||$(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(hh,"Theme"),hh),CY=O(i=>{const e=new vY;return e.calculate(i),e},"getThemeVariables"),uh,_Y=(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("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,c,h,u,d,f,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||ut(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=$(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||_t(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=this.mainBkg;if(this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=bt(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=bt(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ut(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||bt(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(r,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(r,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(r,{l:-10}),this.pie6=this.pie6||$(n,{l:-10}),this.pie7=this.pie7||$(e,{h:60,l:-10}),this.pie8=this.pie8||$(e,{h:-60,l:-10}),this.pie9=this.pie9||$(e,{h:120,l:0}),this.pie10=this.pie10||$(e,{h:60,l:-20}),this.pie11=this.pie11||$(e,{h:-60,l:-20}),this.pie12=this.pie12||$(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||$(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?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||$(e,{h:-30}),this.git4=this.git4||$(e,{h:-60}),this.git5=this.git5||$(e,{h:-90}),this.git6=this.git6||$(e,{h:60}),this.git7=this.git7||$(e,{h:120}),this.darkMode?(this.git0=_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(uh,"Theme"),uh),kY=O(i=>{const e=new _Y;return e.calculate(i),e},"getThemeVariables"),dh,wY=(dh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ut("#323D47"),10),this.border1="#ccc",this.border2=Oo(255,255,255,.25),this.arrowheadColor=ut(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,n,a,o,c,h,u,d,f,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||ut(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||_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||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=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]||ut(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]||$(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(dh,"Theme"),dh),SY=O(i=>{const e=new wY;return e.calculate(i),e},"getThemeVariables"),fh,TY=(fh=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,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||ut(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=$(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||_t(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||ut(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||_t(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||bt(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||$(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(r,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(r,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(r,{l:-10}),this.pie6=this.pie6||$(n,{l:-10}),this.pie7=this.pie7||$(e,{h:60,l:-10}),this.pie8=this.pie8||$(e,{h:-60,l:-10}),this.pie9=this.pie9||$(e,{h:120,l:0}),this.pie10=this.pie10||$(e,{h:60,l:-20}),this.pie11=this.pie11||$(e,{h:-60,l:-20}),this.pie12=this.pie12||$(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||$(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?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||$(e,{h:-30}),this.git4=this.git4||$(e,{h:-60}),this.git5=this.git5||$(e,{h:-90}),this.git6=this.git6||$(e,{h:60}),this.git7=this.git7||$(e,{h:120}),this.darkMode?(this.git0=_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(fh,"Theme"),fh),EY=O(i=>{const e=new TY;return e.calculate(i),e},"getThemeVariables"),ph,NY=(ph=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=_t(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=xe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=xe(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=_t(ut("#323D47"),10),this.border1="#ccc",this.border2=Oo(255,255,255,.25),this.arrowheadColor=ut(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,n,a,o,c,h,u,d,f,g,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||ut(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||_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]||ut(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]||$(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||$(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||$(this.primaryColor,{h:64}),this.fillType3=this.fillType3||$(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||$(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||$(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||$(this.primaryColor,{h:128}),this.fillType7=this.fillType7||$(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||$(this.primaryColor,{l:-10}),this.pie5=this.pie5||$(this.secondaryColor,{l:-10}),this.pie6=this.pie6||$(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||$(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||$(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||$(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||$(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||$(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||$(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?_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||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=_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||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},O(ph,"Theme"),ph),AY=O(i=>{const e=new NY;return e.calculate(i),e},"getThemeVariables"),Os={base:{getThemeVariables:cY},dark:{getThemeVariables:uY},default:{getThemeVariables:fY},forest:{getThemeVariables:gY},neutral:{getThemeVariables:yY},neo:{getThemeVariables:xY},"neo-dark":{getThemeVariables:CY},redux:{getThemeVariables:kY},"redux-dark":{getThemeVariables:SY},"redux-color":{getThemeVariables:EY},"redux-dark-color":{getThemeVariables:AY}},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},uL={...On,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Os.default.getThemeVariables(),sequence:{...On.sequence,messageFont:O(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:O(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:O(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:O(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...On.flowchart,inheritDir:!1},external_personFont:O(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:O(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:O(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:O(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:O(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:O(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:O(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:O(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:O(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:O(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:O(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:O(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:O(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:O(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:O(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:O(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:O(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:O(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:O(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:O(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:O(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}},dL=O((i,e="")=>Object.keys(i).reduce((r,n)=>Array.isArray(i[n])?r:typeof i[n]=="object"&&i[n]!==null?[...r,e+n,...dL(i[n],"")]:[...r,e+n],[]),"keyify"),MY=new Set(dL(uL,"")),fL=uL,wg=O(i=>{if(Nt.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(e=>wg(e));return}for(const e of Object.keys(i)){if(Nt.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!MY.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),wg(i[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(Nt.debug("sanitizing css option",e),i[e]=BY(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"),BY=O(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"),vh=Object.freeze(fL),$s=O(i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),"evaluate"),bn=br({},vh),Sg,$l=[],dd=br({},vh),pm=O((i,e)=>{let r=br({},i),n={};for(const a of e)mL(a),n=br(n,a);if(r=br(r,n),n.theme&&n.theme in Os){const a=br({},Sg),o=br(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in Os&&(r.themeVariables=Os[r.theme].getThemeVariables(o))}return dd=r,bL(dd),dd},"updateCurrentConfig"),LY=O(i=>(bn=br({},vh),bn=br(bn,i),i.theme&&Os[i.theme]&&(bn.themeVariables=Os[i.theme].getThemeVariables(i.themeVariables)),pm(bn,$l),bn),"setSiteConfig"),OY=O(i=>{Sg=br({},i)},"saveConfigFromInitialize"),RY=O(i=>(bn=br(bn,i),pm(bn,$l),bn),"updateSiteConfig"),pL=O(()=>br({},bn),"getSiteConfig"),gL=O(i=>(bL(i),br(dd,i),qi()),"setConfig"),qi=O(()=>br({},dd),"getConfig"),mL=O(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"&&mL(i[e])}))},"sanitize"),jY=O(i=>{var e;wg(i),i.fontFamily&&!((e=i.themeVariables)!=null&&e.fontFamily)&&(i.themeVariables={...i.themeVariables,fontFamily:i.fontFamily}),$l.push(i),pm(bn,$l)},"addDirective"),Tg=O((i=bn)=>{$l=[],pm(i,$l)},"reset"),DY={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."},aE={},yL=O(i=>{aE[i]||(Nt.warn(DY[i]),aE[i]=!0)},"issueWarning"),bL=O(i=>{i&&(i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&yL("LAZY_LOAD_DEPRECATED")},"checkConfig"),Iot=O(()=>{let i={};Sg&&(i=br(i,Sg));for(const e of $l)i=br(i,e);return i},"getUserDefinedConfig"),nn=O(i=>{var e,r;return((e=i.flowchart)==null?void 0:e.htmlLabels)!=null&&yL("FLOWCHART_HTML_LABELS_DEPRECATED"),$s(i.htmlLabels??((r=i.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Gd=/<br\s*\/?>/gi,FY=O(i=>i?CL(i).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),IY=(()=>{let i=!1;return()=>{i||(xL(),i=!0)}})();function xL(){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"))})}O(xL,"setupDompurifyHooks");var vL=O(i=>(IY(),Do.sanitize(i)),"removeScript"),sE=O((i,e)=>{if(nn(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?i=vL(i):r!=="loose"&&(i=CL(i),i=i.replace(/</g,"<").replace(/>/g,">"),i=i.replace(/=/g,"="),i=qY(i))}return i},"sanitizeMore"),ka=O((i,e)=>i&&(e.dompurifyConfig?i=Do.sanitize(sE(i,e),e.dompurifyConfig).toString():i=Do.sanitize(sE(i,e),{FORBID_TAGS:["style"]}).toString(),i),"sanitizeText"),$Y=O((i,e)=>typeof i=="string"?ka(i,e):i.flat().map(r=>ka(r,e)),"sanitizeTextOrArray"),zY=O(i=>Gd.test(i),"hasBreaks"),PY=O(i=>i.split(Gd),"splitBreaks"),qY=O(i=>i.replace(/#br#/g,"<br/>"),"placeholderToBreak"),CL=O(i=>i.replace(Gd,"#br#"),"breakToPlaceholder"),UY=O(i=>{let e="";return i&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),HY=O(function(...i){const e=i.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),WY=O(function(...i){const e=i.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),oE=O(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];GY(o,c)&&(a=o+","+c,n++,r.pop())}r.push(YY(a))}return r.join("")},"parseGenericTypes"),kv=O((i,e)=>Math.max(0,i.split(e).length-1),"countOccurrence"),GY=O((i,e)=>{const r=kv(i,"~"),n=kv(e,"~");return r===1&&n===1},"shouldCombineSets"),YY=O(i=>{const e=kv(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"),lE=O(()=>window.MathMLElement!==void 0,"isMathMLSupported"),wv=/\$\$(.*)\$\$/g,Sd=O(i=>{var e;return(((e=i.match(wv))==null?void 0:e.length)??0)>0},"hasKatex"),$ot=O(async(i,e)=>{const r=document.createElement("div");r.innerHTML=await _L(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"),KY=O(async(i,e)=>{if(!Sd(i))return i;if(!(lE()||e.legacyMathML||e.forceLegacyMathML))return i.replace(wv,"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||!lE()&&e.legacyMathML?"htmlAndMathml":"mathml";return i.split(Gd).map(a=>Sd(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(wv,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),_L=O(async(i,e)=>ka(await KY(i,e),e),"renderKatexSanitized"),Yd={getRows:FY,sanitizeText:ka,sanitizeTextOrArray:$Y,hasBreaks:zY,splitBreaks:PY,lineBreakRegex:Gd,removeScript:vL,getUrl:UY,evaluate:$s,getMax:HY,getMin:WY},VY=O(function(i,e){for(let r of e)i.attr(r[0],r[1])},"d3Attrs"),XY=O(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"),kL=O(function(i,e,r,n){const a=XY(e,r,n);VY(i,a)},"configureSvgSize"),ZY=O(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}`),kL(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"),Xp={},QY=O((i,e,r,n)=>{let a="";return i in Xp&&Xp[i]?a=Xp[i]({...r,svgId:n}):Nt.warn(`No theme found for ${i}`),` & {
|
|
154
|
+
font-family: ${r.fontFamily};
|
|
155
|
+
font-size: ${r.fontSize};
|
|
156
|
+
fill: ${r.textColor}
|
|
157
|
+
}
|
|
158
|
+
@keyframes edge-animation-frame {
|
|
159
|
+
from {
|
|
160
|
+
stroke-dashoffset: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
@keyframes dash {
|
|
164
|
+
to {
|
|
165
|
+
stroke-dashoffset: 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
& .edge-animation-slow {
|
|
169
|
+
stroke-dasharray: 9,5 !important;
|
|
170
|
+
stroke-dashoffset: 900;
|
|
171
|
+
animation: dash 50s linear infinite;
|
|
172
|
+
stroke-linecap: round;
|
|
173
|
+
}
|
|
174
|
+
& .edge-animation-fast {
|
|
175
|
+
stroke-dasharray: 9,5 !important;
|
|
176
|
+
stroke-dashoffset: 900;
|
|
177
|
+
animation: dash 20s linear infinite;
|
|
178
|
+
stroke-linecap: round;
|
|
179
|
+
}
|
|
180
|
+
/* Classes common for multiple diagrams */
|
|
181
|
+
|
|
182
|
+
& .error-icon {
|
|
183
|
+
fill: ${r.errorBkgColor};
|
|
184
|
+
}
|
|
185
|
+
& .error-text {
|
|
186
|
+
fill: ${r.errorTextColor};
|
|
187
|
+
stroke: ${r.errorTextColor};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
& .edge-thickness-normal {
|
|
191
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
192
|
+
}
|
|
193
|
+
& .edge-thickness-thick {
|
|
194
|
+
stroke-width: 3.5px
|
|
195
|
+
}
|
|
196
|
+
& .edge-pattern-solid {
|
|
197
|
+
stroke-dasharray: 0;
|
|
198
|
+
}
|
|
199
|
+
& .edge-thickness-invisible {
|
|
200
|
+
stroke-width: 0;
|
|
201
|
+
fill: none;
|
|
202
|
+
}
|
|
203
|
+
& .edge-pattern-dashed{
|
|
204
|
+
stroke-dasharray: 3;
|
|
205
|
+
}
|
|
206
|
+
.edge-pattern-dotted {
|
|
207
|
+
stroke-dasharray: 2;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
& .marker {
|
|
211
|
+
fill: ${r.lineColor};
|
|
212
|
+
stroke: ${r.lineColor};
|
|
213
|
+
}
|
|
214
|
+
& .marker.cross {
|
|
215
|
+
stroke: ${r.lineColor};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
& svg {
|
|
219
|
+
font-family: ${r.fontFamily};
|
|
220
|
+
font-size: ${r.fontSize};
|
|
221
|
+
}
|
|
222
|
+
& p {
|
|
223
|
+
margin: 0
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
${a}
|
|
227
|
+
.node .neo-node {
|
|
228
|
+
stroke: ${r.nodeBorder};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
232
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
233
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
[data-look="neo"].node path {
|
|
238
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
239
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
[data-look="neo"].node .outer-path {
|
|
243
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
[data-look="neo"].node .neo-line path {
|
|
247
|
+
stroke: ${r.nodeBorder};
|
|
248
|
+
filter: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-look="neo"].node circle{
|
|
252
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
253
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
[data-look="neo"].node circle .state-start{
|
|
257
|
+
fill: #000000;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
[data-look="neo"].icon-shape .icon {
|
|
261
|
+
fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
262
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
266
|
+
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
|
267
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
${e}
|
|
271
|
+
`},"getStyles"),JY=O((i,e)=>{e!==void 0&&(Xp[i]=e)},"addStylesForDiagram"),tK=QY,wL={};QG(wL,{clear:()=>eK,getAccDescription:()=>aK,getAccTitle:()=>rK,getDiagramTitle:()=>oK,setAccDescription:()=>nK,setAccTitle:()=>iK,setDiagramTitle:()=>sK});var hC="",uC="",dC="",fC=O(i=>ka(i,qi()),"sanitizeText"),eK=O(()=>{hC="",dC="",uC=""},"clear"),iK=O(i=>{hC=fC(i).replace(/^\s+/g,"")},"setAccTitle"),rK=O(()=>hC,"getAccTitle"),nK=O(i=>{dC=fC(i).replace(/\n\s+/g,`
|
|
272
|
+
`)},"setAccDescription"),aK=O(()=>dC,"getAccDescription"),sK=O(i=>{uC=fC(i)},"setDiagramTitle"),oK=O(()=>uC,"getDiagramTitle"),cE=Nt,lK=lC,ii=qi,zot=gL,Pot=vh,pC=O(i=>ka(i,ii()),"sanitizeText"),cK=ZY,hK=O(()=>wL,"getCommonDb"),Eg={},Ng=O((i,e,r)=>{var n;Eg[i]&&cE.warn(`Diagram with id ${i} already registered. Overwriting.`),Eg[i]=e,r&&hL(i,r),JY(i,e.styles),(n=e.injectUtils)==null||n.call(e,cE,lK,ii,pC,cK,hK(),()=>{})},"registerDiagram"),Sv=O(i=>{if(i in Eg)return Eg[i];throw new uK(i)},"getDiagram"),gh,uK=(gh=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},O(gh,"DiagramNotFoundError"),gh);const Tv=Math.PI,Ev=2*Tv,fl=1e-6,dK=Ev-fl;function SL(i){this._+=i[0];for(let e=1,r=i.length;e<r;++e)this._+=arguments[e]+i[e]}function fK(i){let e=Math.floor(i);if(!(e>=0))throw new Error(`invalid digits: ${i}`);if(e>15)return SL;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 pK{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?SL:fK(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,o,c){this._append`C${+e},${+r},${+n},${+a},${this._x1=+o},${this._y1=+c}`}arcTo(e,r,n,a,o){if(e=+e,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,h=this._y1,u=n-e,d=a-r,f=c-e,g=h-r,x=f*f+g*g;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(x>fl)if(!(Math.abs(g*u-d*f)>fl)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let y=n-c,v=a-h,C=u*u+d*d,_=y*y+v*v,k=Math.sqrt(C),T=Math.sqrt(x),E=o*Math.tan((Tv-Math.acos((C+x-_)/(2*k*T)))/2),A=E/T,B=E/k;Math.abs(A-1)>fl&&this._append`L${e+A*f},${r+A*g}`,this._append`A${o},${o},0,0,${+(g*y>f*v)},${this._x1=e+B*u},${this._y1=r+B*d}`}}arc(e,r,n,a,o,c){if(e=+e,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let h=n*Math.cos(a),u=n*Math.sin(a),d=e+h,f=r+u,g=1^c,x=c?a-o:o-a;this._x1===null?this._append`M${d},${f}`:(Math.abs(this._x1-d)>fl||Math.abs(this._y1-f)>fl)&&this._append`L${d},${f}`,n&&(x<0&&(x=x%Ev+Ev),x>dK?this._append`A${n},${n},0,1,${g},${e-h},${r-u}A${n},${n},0,1,${g},${this._x1=d},${this._y1=f}`:x>fl&&this._append`A${n},${n},0,${+(x>=Tv)},${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 Mc(i){return function(){return i}}const qot=Math.abs,Uot=Math.atan2,Hot=Math.cos,Wot=Math.max,Got=Math.min,Yot=Math.sin,Kot=Math.sqrt,hE=1e-12,gC=Math.PI,uE=gC/2,Vot=2*gC;function Xot(i){return i>1?0:i<-1?gC:Math.acos(i)}function Zot(i){return i>=1?uE:i<=-1?-uE:Math.asin(i)}function gK(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 pK(e)}function mK(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function TL(i){this._context=i}TL.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 fd(i){return new TL(i)}function yK(i){return i[0]}function bK(i){return i[1]}function xK(i,e){var r=Mc(!0),n=null,a=fd,o=null,c=gK(h);i=typeof i=="function"?i:i===void 0?yK:Mc(i),e=typeof e=="function"?e:e===void 0?bK:Mc(e);function h(u){var d,f=(u=mK(u)).length,g,x=!1,y;for(n==null&&(o=a(y=c())),d=0;d<=f;++d)!(d<f&&r(g=u[d],d,u))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+i(g,d,u),+e(g,d,u));if(y)return o=null,y+""||null}return h.x=function(u){return arguments.length?(i=typeof u=="function"?u:Mc(+u),h):i},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:Mc(+u),h):e},h.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Mc(!!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 EL{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 NL(i){return new EL(i,!0)}function AL(i){return new EL(i,!1)}function Fo(){}function Ag(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 gm(i){this._context=i}gm.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:Ag(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:Ag(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function Nv(i){return new gm(i)}function ML(i){this._context=i}ML.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x2=i,this._y2=e;break;case 1:this._point=2,this._x3=i,this._y3=e;break;case 2:this._point=3,this._x4=i,this._y4=e,this._context.moveTo((this._x0+4*this._x1+i)/6,(this._y0+4*this._y1+e)/6);break;default:Ag(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function vK(i){return new ML(i)}function BL(i){this._context=i}BL.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:Ag(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function CK(i){return new BL(i)}function LL(i,e){this._basis=new gm(i),this._beta=e}LL.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 _K=(function i(e){function r(n){return e===1?new gm(n):new LL(n,e)}return r.beta=function(n){return i(+n)},r})(.85);function Mg(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 mC(i,e){this._context=i,this._k=(1-e)/6}mC.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:Mg(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:Mg(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 OL=(function i(e){function r(n){return new mC(n,e)}return r.tension=function(n){return i(+n)},r})(0);function yC(i,e){this._context=i,this._k=(1-e)/6}yC.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:Mg(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 kK=(function i(e){function r(n){return new yC(n,e)}return r.tension=function(n){return i(+n)},r})(0);function bC(i,e){this._context=i,this._k=(1-e)/6}bC.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:Mg(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 wK=(function i(e){function r(n){return new bC(n,e)}return r.tension=function(n){return i(+n)},r})(0);function xC(i,e,r){var n=i._x1,a=i._y1,o=i._x2,c=i._y2;if(i._l01_a>hE){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>hE){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 RL(i,e){this._context=i,this._alpha=e}RL.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:xC(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 jL=(function i(e){function r(n){return e?new RL(n,e):new mC(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function DL(i,e){this._context=i,this._alpha=e}DL.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:xC(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 SK=(function i(e){function r(n){return e?new DL(n,e):new yC(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function FL(i,e){this._context=i,this._alpha=e}FL.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:xC(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 TK=(function i(e){function r(n){return e?new FL(n,e):new bC(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function IL(i){this._context=i}IL.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(i,e){i=+i,e=+e,this._point?this._context.lineTo(i,e):(this._point=1,this._context.moveTo(i,e))}};function EK(i){return new IL(i)}function dE(i){return i<0?-1:1}function fE(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(dE(o)+dE(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function pE(i,e){var r=i._x1-i._x0;return r?(3*(i._y1-i._y0)/r-e)/2:e}function o0(i,e,r){var n=i._x0,a=i._y0,o=i._x1,c=i._y1,h=(o-n)/3;i._context.bezierCurveTo(n+h,a+h*e,o-h,c-h*r,o,c)}function Bg(i){this._context=i}Bg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:o0(this,this._t0,pE(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,o0(this,pE(this,r=fE(this,i,e)),r);break;default:o0(this,this._t0,r=fE(this,i,e));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e,this._t0=r}}};function $L(i){this._context=new zL(i)}($L.prototype=Object.create(Bg.prototype)).point=function(i,e){Bg.prototype.point.call(this,e,i)};function zL(i){this._context=i}zL.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 PL(i){return new Bg(i)}function qL(i){return new $L(i)}function UL(i){this._context=i}UL.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=gE(i),a=gE(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 gE(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 HL(i){return new UL(i)}function mm(i,e){this._context=i,this._t=e}mm.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 WL(i){return new mm(i,.5)}function GL(i){return new mm(i,0)}function YL(i){return new mm(i,1)}var NK=O(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 vC(i){return typeof i>"u"||i===null}O(vC,"isNothing");function KL(i){return typeof i=="object"&&i!==null}O(KL,"isObject");function VL(i){return Array.isArray(i)?i:vC(i)?[]:[i]}O(VL,"toArray");function XL(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}O(XL,"extend");function ZL(i,e){var r="",n;for(n=0;n<e;n+=1)r+=i;return r}O(ZL,"repeat");function QL(i){return i===0&&Number.NEGATIVE_INFINITY===1/i}O(QL,"isNegativeZero");var AK=vC,MK=KL,BK=VL,LK=ZL,OK=QL,RK=XL,xr={isNothing:AK,isObject:MK,toArray:BK,repeat:LK,isNegativeZero:OK,extend:RK};function CC(i,e){var r="",n=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(r+='in "'+i.mark.name+'" '),r+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!e&&i.mark.snippet&&(r+=`
|
|
273
|
+
|
|
274
|
+
`+i.mark.snippet),n+" "+r):n}O(CC,"formatError");function Ch(i,e){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=e,this.message=CC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}O(Ch,"YAMLException$1");Ch.prototype=Object.create(Error.prototype);Ch.prototype.constructor=Ch;Ch.prototype.toString=O(function(e){return this.name+": "+CC(this,e)},"toString");var xn=Ch;function Zp(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}}O(Zp,"getLine");function Qp(i,e){return xr.repeat(" ",e-i.length)+i}O(Qp,"padStart");function JL(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=Zp(i.buffer,n[c-u],a[c-u],i.position-(n[c]-n[c-u]),g),h=xr.repeat(" ",e.indent)+Qp((i.line-u+1).toString(),f)+" | "+d.str+`
|
|
275
|
+
`+h;for(d=Zp(i.buffer,n[c],a[c],i.position,g),h+=xr.repeat(" ",e.indent)+Qp((i.line+1).toString(),f)+" | "+d.str+`
|
|
276
|
+
`,h+=xr.repeat("-",e.indent+f+3+d.pos)+`^
|
|
277
|
+
`,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)d=Zp(i.buffer,n[c+u],a[c+u],i.position-(n[c]-n[c+u]),g),h+=xr.repeat(" ",e.indent)+Qp((i.line+u+1).toString(),f)+" | "+d.str+`
|
|
278
|
+
`;return h.replace(/\n$/,"")}O(JL,"makeSnippet");var jK=JL,DK=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],FK=["scalar","sequence","mapping"];function tO(i){var e={};return i!==null&&Object.keys(i).forEach(function(r){i[r].forEach(function(n){e[String(n)]=r})}),e}O(tO,"compileStyleAliases");function eO(i,e){if(e=e||{},Object.keys(e).forEach(function(r){if(DK.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=tO(e.styleAliases||null),FK.indexOf(this.kind)===-1)throw new xn('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}O(eO,"Type$1");var Hr=eO;function Av(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}O(Av,"compileList");function iO(){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(O(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return i}O(iO,"compileMap");function Lg(i){return this.extend(i)}O(Lg,"Schema$1");Lg.prototype.extend=O(function(e){var r=[],n=[];if(e instanceof Hr)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 Hr))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 Hr))throw new xn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Lg.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=Av(a,"implicit"),a.compiledExplicit=Av(a,"explicit"),a.compiledTypeMap=iO(a.compiledImplicit,a.compiledExplicit),a},"extend");var IK=Lg,$K=new Hr("tag:yaml.org,2002:str",{kind:"scalar",construct:O(function(i){return i!==null?i:""},"construct")}),zK=new Hr("tag:yaml.org,2002:seq",{kind:"sequence",construct:O(function(i){return i!==null?i:[]},"construct")}),PK=new Hr("tag:yaml.org,2002:map",{kind:"mapping",construct:O(function(i){return i!==null?i:{}},"construct")}),qK=new IK({explicit:[$K,zK,PK]});function rO(i){if(i===null)return!0;var e=i.length;return e===1&&i==="~"||e===4&&(i==="null"||i==="Null"||i==="NULL")}O(rO,"resolveYamlNull");function nO(){return null}O(nO,"constructYamlNull");function aO(i){return i===null}O(aO,"isNull");var UK=new Hr("tag:yaml.org,2002:null",{kind:"scalar",resolve:rO,construct:nO,predicate:aO,represent:{canonical:O(function(){return"~"},"canonical"),lowercase:O(function(){return"null"},"lowercase"),uppercase:O(function(){return"NULL"},"uppercase"),camelcase:O(function(){return"Null"},"camelcase"),empty:O(function(){return""},"empty")},defaultStyle:"lowercase"});function sO(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")}O(sO,"resolveYamlBoolean");function oO(i){return i==="true"||i==="True"||i==="TRUE"}O(oO,"constructYamlBoolean");function lO(i){return Object.prototype.toString.call(i)==="[object Boolean]"}O(lO,"isBoolean");var HK=new Hr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:sO,construct:oO,predicate:lO,represent:{lowercase:O(function(i){return i?"true":"false"},"lowercase"),uppercase:O(function(i){return i?"TRUE":"FALSE"},"uppercase"),camelcase:O(function(i){return i?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function cO(i){return 48<=i&&i<=57||65<=i&&i<=70||97<=i&&i<=102}O(cO,"isHexCode");function hO(i){return 48<=i&&i<=55}O(hO,"isOctCode");function uO(i){return 48<=i&&i<=57}O(uO,"isDecCode");function dO(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(!cO(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!hO(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=i[r],a!=="_"){if(!uO(i.charCodeAt(r)))return!1;n=!0}return!(!n||a==="_")}O(dO,"resolveYamlInteger");function fO(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)}O(fO,"constructYamlInteger");function pO(i){return Object.prototype.toString.call(i)==="[object Number]"&&i%1===0&&!xr.isNegativeZero(i)}O(pO,"isInteger");var WK=new Hr("tag:yaml.org,2002:int",{kind:"scalar",resolve:dO,construct:fO,predicate:pO,represent:{binary:O(function(i){return i>=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},"binary"),octal:O(function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},"octal"),decimal:O(function(i){return i.toString(10)},"decimal"),hexadecimal:O(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"]}}),GK=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function gO(i){return!(i===null||!GK.test(i)||i[i.length-1]==="_")}O(gO,"resolveYamlFloat");function mO(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)}O(mO,"constructYamlFloat");var YK=/^[-+]?[0-9]+e/;function yO(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(xr.isNegativeZero(i))return"-0.0";return r=i.toString(10),YK.test(r)?r.replace("e",".e"):r}O(yO,"representYamlFloat");function bO(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||xr.isNegativeZero(i))}O(bO,"isFloat");var KK=new Hr("tag:yaml.org,2002:float",{kind:"scalar",resolve:gO,construct:mO,predicate:bO,represent:yO,defaultStyle:"lowercase"}),xO=qK.extend({implicit:[UK,HK,WK,KK]}),VK=xO,vO=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),CO=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 _O(i){return i===null?!1:vO.exec(i)!==null||CO.exec(i)!==null}O(_O,"resolveYamlTimestamp");function kO(i){var e,r,n,a,o,c,h,u=0,d=null,f,g,x;if(e=vO.exec(i),e===null&&(e=CO.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}O(kO,"constructYamlTimestamp");function wO(i){return i.toISOString()}O(wO,"representYamlTimestamp");var XK=new Hr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_O,construct:kO,instanceOf:Date,represent:wO});function SO(i){return i==="<<"||i===null}O(SO,"resolveYamlMerge");var ZK=new Hr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:SO}),_C=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
279
|
+
\r`;function TO(i){if(i===null)return!1;var e,r,n=0,a=i.length,o=_C;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}O(TO,"resolveYamlBinary");function EO(i){var e,r,n=i.replace(/[\r\n=]/g,""),a=n.length,o=_C,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)}O(EO,"constructYamlBinary");function NO(i){var e="",r=0,n,a,o=i.length,c=_C;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}O(NO,"representYamlBinary");function AO(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}O(AO,"isBinary");var QK=new Hr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:TO,construct:EO,predicate:AO,represent:NO}),JK=Object.prototype.hasOwnProperty,tV=Object.prototype.toString;function MO(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,tV.call(a)!=="[object Object]")return!1;for(o in a)if(JK.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}O(MO,"resolveYamlOmap");function BO(i){return i!==null?i:[]}O(BO,"constructYamlOmap");var eV=new Hr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:MO,construct:BO}),iV=Object.prototype.toString;function LO(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],iV.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}O(LO,"resolveYamlPairs");function OO(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}O(OO,"constructYamlPairs");var rV=new Hr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:LO,construct:OO}),nV=Object.prototype.hasOwnProperty;function RO(i){if(i===null)return!0;var e,r=i;for(e in r)if(nV.call(r,e)&&r[e]!==null)return!1;return!0}O(RO,"resolveYamlSet");function jO(i){return i!==null?i:{}}O(jO,"constructYamlSet");var aV=new Hr("tag:yaml.org,2002:set",{kind:"mapping",resolve:RO,construct:jO}),DO=VK.extend({implicit:[XK,ZK],explicit:[QK,eV,rV,aV]}),Io=Object.prototype.hasOwnProperty,Og=1,FO=2,IO=3,Rg=4,l0=1,sV=2,mE=3,oV=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lV=/[\x85\u2028\u2029]/,cV=/[,\[\]\{\}]/,$O=/^(?:!|!!|![a-z\-]+!)$/i,zO=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Mv(i){return Object.prototype.toString.call(i)}O(Mv,"_class");function va(i){return i===10||i===13}O(va,"is_EOL");function Ro(i){return i===9||i===32}O(Ro,"is_WHITE_SPACE");function tn(i){return i===9||i===32||i===10||i===13}O(tn,"is_WS_OR_EOL");function xl(i){return i===44||i===91||i===93||i===123||i===125}O(xl,"is_FLOW_INDICATOR");function PO(i){var e;return 48<=i&&i<=57?i-48:(e=i|32,97<=e&&e<=102?e-97+10:-1)}O(PO,"fromHexCode");function qO(i){return i===120?2:i===117?4:i===85?8:0}O(qO,"escapedHexLen");function UO(i){return 48<=i&&i<=57?i-48:-1}O(UO,"fromDecimalCode");function Bv(i){return i===48?"\0":i===97?"\x07":i===98?"\b":i===116||i===9?" ":i===110?`
|
|
280
|
+
`:i===118?"\v":i===102?"\f":i===114?"\r":i===101?"\x1B":i===32?" ":i===34?'"':i===47?"/":i===92?"\\":i===78?"
":i===95?" ":i===76?"\u2028":i===80?"\u2029":""}O(Bv,"simpleEscapeSequence");function HO(i){return i<=65535?String.fromCharCode(i):String.fromCharCode((i-65536>>10)+55296,(i-65536&1023)+56320)}O(HO,"charFromCodepoint");function kC(i,e,r){e==="__proto__"?Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):i[e]=r}O(kC,"setProperty");var WO=new Array(256),GO=new Array(256);for(cl=0;cl<256;cl++)WO[cl]=Bv(cl)?1:0,GO[cl]=Bv(cl);var cl;function YO(i,e){this.input=i,this.filename=e.filename||null,this.schema=e.schema||DO,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=[]}O(YO,"State$1");function wC(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=jK(r),new xn(e,r)}O(wC,"generateError");function ne(i,e){throw wC(i,e)}O(ne,"throwError");function Td(i,e){i.onWarning&&i.onWarning.call(null,wC(i,e))}O(Td,"throwWarning");var yE={YAML:O(function(e,r,n){var a,o,c;e.version!==null&&ne(e,"duplication of %YAML directive"),n.length!==1&&ne(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&ne(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&ne(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Td(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:O(function(e,r,n){var a,o;n.length!==2&&ne(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],$O.test(a)||ne(e,"ill-formed tag handle (first argument) of the TAG directive"),Io.call(e.tagMap,a)&&ne(e,'there is a previously declared suffix for "'+a+'" tag handle'),zO.test(o)||ne(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ne(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function Rs(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||ne(i,"expected valid JSON character");else oV.test(h)&&ne(i,"the stream contains non-printable characters");i.result+=h}}O(Rs,"captureSegment");function Lv(i,e,r,n){var a,o,c,h;for(xr.isObject(r)||ne(i,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,h=a.length;c<h;c+=1)o=a[c],Io.call(e,o)||(kC(e,o,r[o]),n[o]=!0)}O(Lv,"mergeMappings");function vl(i,e,r,n,a,o,c,h,u){var d,f;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,f=a.length;d<f;d+=1)Array.isArray(a[d])&&ne(i,"nested arrays are not supported inside keys"),typeof a=="object"&&Mv(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Mv(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)Lv(i,e,o[d],r);else Lv(i,e,o,r);else!i.json&&!Io.call(r,a)&&Io.call(e,a)&&(i.line=c||i.line,i.lineStart=h||i.lineStart,i.position=u||i.position,ne(i,"duplicated mapping key")),kC(e,a,o),delete r[a];return e}O(vl,"storeMappingPair");function ym(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++):ne(i,"a line break is expected"),i.line+=1,i.lineStart=i.position,i.firstTabInLine=-1}O(ym,"readLineBreak");function er(i,e,r){for(var n=0,a=i.input.charCodeAt(i.position);a!==0;){for(;Ro(a);)a===9&&i.firstTabInLine===-1&&(i.firstTabInLine=i.position),a=i.input.charCodeAt(++i.position);if(e&&a===35)do a=i.input.charCodeAt(++i.position);while(a!==10&&a!==13&&a!==0);if(va(a))for(ym(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&&Td(i,"deficient indentation"),n}O(er,"skipSeparationSpace");function Kd(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)))}O(Kd,"testDocumentSeparator");function bm(i,e){e===1?i.result+=" ":e>1&&(i.result+=xr.repeat(`
|
|
281
|
+
`,e-1))}O(bm,"writeFoldedLines");function KO(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)||xl(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(a=i.input.charCodeAt(i.position+1),tn(a)||r&&xl(a)))return!1;for(i.kind="scalar",i.result="",o=c=i.position,h=!1;y!==0;){if(y===58){if(a=i.input.charCodeAt(i.position+1),tn(a)||r&&xl(a))break}else if(y===35){if(n=i.input.charCodeAt(i.position-1),tn(n))break}else{if(i.position===i.lineStart&&Kd(i)||r&&xl(y))break;if(va(y))if(u=i.line,d=i.lineStart,f=i.lineIndent,er(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&&(Rs(i,o,c,!1),bm(i,i.line-u),o=c=i.position,h=!1),Ro(y)||(c=i.position+1),y=i.input.charCodeAt(++i.position)}return Rs(i,o,c,!1),i.result?!0:(i.kind=g,i.result=x,!1)}O(KO,"readPlainScalar");function VO(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(Rs(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)?(Rs(i,n,a,!0),bm(i,er(i,!1,e)),n=a=i.position):i.position===i.lineStart&&Kd(i)?ne(i,"unexpected end of the document within a single quoted scalar"):(i.position++,a=i.position);ne(i,"unexpected end of the stream within a single quoted scalar")}O(VO,"readSingleQuotedScalar");function XO(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 Rs(i,r,i.position,!0),i.position++,!0;if(h===92){if(Rs(i,r,i.position,!0),h=i.input.charCodeAt(++i.position),va(h))er(i,!1,e);else if(h<256&&WO[h])i.result+=GO[h],i.position++;else if((c=qO(h))>0){for(a=c,o=0;a>0;a--)h=i.input.charCodeAt(++i.position),(c=PO(h))>=0?o=(o<<4)+c:ne(i,"expected hexadecimal character");i.result+=HO(o),i.position++}else ne(i,"unknown escape sequence");r=n=i.position}else va(h)?(Rs(i,r,n,!0),bm(i,er(i,!1,e)),r=n=i.position):i.position===i.lineStart&&Kd(i)?ne(i,"unexpected end of the document within a double quoted scalar"):(i.position++,n=i.position)}ne(i,"unexpected end of the stream within a double quoted scalar")}O(XO,"readDoubleQuotedScalar");function ZO(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(er(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&&ne(i,"expected the node content, but found ','"):ne(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++,er(i,!0,e))),n=i.line,a=i.lineStart,o=i.position,zl(i,e,Og,!1,!0),_=i.tag,C=i.result,er(i,!0,e),T=i.input.charCodeAt(i.position),(x||i.line===n)&&T===58&&(g=!0,T=i.input.charCodeAt(++i.position),er(i,!0,e),zl(i,e,Og,!1,!0),k=i.result),y?vl(i,h,v,_,C,k,n,a,o):g?h.push(vl(i,null,v,_,C,k,n,a,o)):h.push(C),er(i,!0,e),T=i.input.charCodeAt(i.position),T===44?(r=!0,T=i.input.charCodeAt(++i.position)):r=!1}ne(i,"unexpected end of the stream within a flow collection")}O(ZO,"readFlowCollection");function QO(i,e){var r,n,a=l0,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)l0===a?a=g===43?mE:sV:ne(i,"repeat of a chomping mode identifier");else if((f=UO(g))>=0)f===0?ne(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?ne(i,"repeat of an indentation width identifier"):(h=e+f-1,c=!0);else break;if(Ro(g)){do g=i.input.charCodeAt(++i.position);while(Ro(g));if(g===35)do g=i.input.charCodeAt(++i.position);while(!va(g)&&g!==0)}for(;g!==0;){for(ym(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===mE?i.result+=xr.repeat(`
|
|
282
|
+
`,o?1+u:u):a===l0&&o&&(i.result+=`
|
|
283
|
+
`);break}for(n?Ro(g)?(d=!0,i.result+=xr.repeat(`
|
|
284
|
+
`,o?1+u:u)):d?(d=!1,i.result+=xr.repeat(`
|
|
285
|
+
`,u+1)):u===0?o&&(i.result+=" "):i.result+=xr.repeat(`
|
|
286
|
+
`,u):i.result+=xr.repeat(`
|
|
287
|
+
`,o?1+u:u),o=!0,c=!0,u=0,r=i.position;!va(g)&&g!==0;)g=i.input.charCodeAt(++i.position);Rs(i,r,i.position,!1)}return!0}O(QO,"readBlockScalar");function Ov(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,ne(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++,er(i,!0,-1)&&i.lineIndent<=e){o.push(null),u=i.input.charCodeAt(i.position);continue}if(r=i.line,zl(i,e,IO,!1,!0),o.push(i.result),er(i,!0,-1),u=i.input.charCodeAt(i.position),(i.line===r||i.lineIndent>e)&&u!==0)ne(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}O(Ov,"readBlockSequence");function JO(i,e,r){var n,a,o,c,h,u,d=i.tag,f=i.anchor,g={},x=Object.create(null),y=null,v=null,C=null,_=!1,k=!1,T;if(i.firstTabInLine!==-1)return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=g),T=i.input.charCodeAt(i.position);T!==0;){if(!_&&i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,ne(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?(_&&(vl(i,g,x,y,v,null,c,h,u),y=v=C=null),k=!0,_=!0,a=!0):_?(_=!1,a=!0):ne(i,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),i.position+=1,T=n;else{if(c=i.line,h=i.lineStart,u=i.position,!zl(i,r,FO,!1,!0))break;if(i.line===o){for(T=i.input.charCodeAt(i.position);Ro(T);)T=i.input.charCodeAt(++i.position);if(T===58)T=i.input.charCodeAt(++i.position),tn(T)||ne(i,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(vl(i,g,x,y,v,null,c,h,u),y=v=C=null),k=!0,_=!1,a=!1,y=i.tag,v=i.result;else if(k)ne(i,"can not read an implicit mapping pair; a colon is missed");else return i.tag=d,i.anchor=f,!0}else if(k)ne(i,"can not read a block mapping entry; a multiline key may not be an implicit key");else return i.tag=d,i.anchor=f,!0}if((i.line===o||i.lineIndent>e)&&(_&&(c=i.line,h=i.lineStart,u=i.position),zl(i,e,Rg,!0,a)&&(_?v=i.result:C=i.result),_||(vl(i,g,x,y,v,C,c,h,u),y=v=C=null),er(i,!0,-1),T=i.input.charCodeAt(i.position)),(i.line===o||i.lineIndent>e)&&T!==0)ne(i,"bad indentation of a mapping entry");else if(i.lineIndent<e)break}return _&&vl(i,g,x,y,v,null,c,h,u),k&&(i.tag=d,i.anchor=f,i.kind="mapping",i.result=g),k}O(JO,"readBlockMapping");function tR(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&&ne(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)):ne(i,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!tn(c);)c===33&&(n?ne(i,"tag suffix cannot contain exclamation marks"):(a=i.input.slice(e-1,i.position+1),$O.test(a)||ne(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),cV.test(o)&&ne(i,"tag suffix cannot contain flow indicator characters")}o&&!zO.test(o)&&ne(i,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ne(i,"tag name is malformed: "+o)}return r?i.tag=o:Io.call(i.tagMap,a)?i.tag=i.tagMap[a]+o:a==="!"?i.tag="!"+o:a==="!!"?i.tag="tag:yaml.org,2002:"+o:ne(i,'undeclared tag handle "'+a+'"'),!0}O(tR,"readTagProperty");function eR(i){var e,r;if(r=i.input.charCodeAt(i.position),r!==38)return!1;for(i.anchor!==null&&ne(i,"duplication of an anchor property"),r=i.input.charCodeAt(++i.position),e=i.position;r!==0&&!tn(r)&&!xl(r);)r=i.input.charCodeAt(++i.position);return i.position===e&&ne(i,"name of an anchor node must contain at least one character"),i.anchor=i.input.slice(e,i.position),!0}O(eR,"readAnchorProperty");function iR(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)&&!xl(n);)n=i.input.charCodeAt(++i.position);return i.position===e&&ne(i,"name of an alias node must contain at least one character"),r=i.input.slice(e,i.position),Io.call(i.anchorMap,r)||ne(i,'unidentified alias "'+r+'"'),i.result=i.anchorMap[r],er(i,!0,-1),!0}O(iR,"readAlias");function zl(i,e,r,n,a){var o,c,h,u=1,d=!1,f=!1,g,x,y,v,C,_;if(i.listener!==null&&i.listener("open",i),i.tag=null,i.anchor=null,i.kind=null,i.result=null,o=c=h=Rg===r||IO===r,n&&er(i,!0,-1)&&(d=!0,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)),u===1)for(;tR(i)||eR(i);)er(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||Rg===r)&&(Og===r||FO===r?C=e:C=e+1,_=i.position-i.lineStart,u===1?h&&(Ov(i,_)||JO(i,_,C))||ZO(i,C)?f=!0:(c&&QO(i,C)||VO(i,C)||XO(i,C)?f=!0:iR(i)?(f=!0,(i.tag!==null||i.anchor!==null)&&ne(i,"alias node should not have any properties")):KO(i,C,Og===r)&&(f=!0,i.tag===null&&(i.tag="?")),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):u===0&&(f=h&&Ov(i,_))),i.tag===null)i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);else if(i.tag==="?"){for(i.result!==null&&i.kind!=="scalar"&&ne(i,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+i.kind+'"'),g=0,x=i.implicitTypes.length;g<x;g+=1)if(v=i.implicitTypes[g],v.resolve(i.result)){i.result=v.construct(i.result),i.tag=v.tag,i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);break}}else if(i.tag!=="!"){if(Io.call(i.typeMap[i.kind||"fallback"],i.tag))v=i.typeMap[i.kind||"fallback"][i.tag];else for(v=null,y=i.typeMap.multi[i.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(i.tag.slice(0,y[g].tag.length)===y[g].tag){v=y[g];break}v||ne(i,"unknown tag !<"+i.tag+">"),i.result!==null&&v.kind!==i.kind&&ne(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)):ne(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}O(zl,"composeNode");function rR(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&&(er(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&&ne(i,"directive name must not be less than one character in length");c!==0;){for(;Ro(c);)c=i.input.charCodeAt(++i.position);if(c===35){do c=i.input.charCodeAt(++i.position);while(c!==0&&!va(c));break}if(va(c))break;for(r=i.position;c!==0&&!tn(c);)c=i.input.charCodeAt(++i.position);a.push(i.input.slice(r,i.position))}c!==0&&ym(i),Io.call(yE,n)?yE[n](i,n,a):Td(i,'unknown document directive "'+n+'"')}if(er(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,er(i,!0,-1)):o&&ne(i,"directives end mark is expected"),zl(i,i.lineIndent-1,Rg,!1,!0),er(i,!0,-1),i.checkLineBreaks&&lV.test(i.input.slice(e,i.position))&&Td(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&Kd(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,er(i,!0,-1));return}if(i.position<i.length-1)ne(i,"end of the stream or a document separator is expected");else return}O(rR,"readDocument");function SC(i,e){i=String(i),e=e||{},i.length!==0&&(i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
288
|
+
`),i.charCodeAt(0)===65279&&(i=i.slice(1)));var r=new YO(i,e),n=i.indexOf("\0");for(n!==-1&&(r.position=n,ne(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;)rR(r);return r.documents}O(SC,"loadDocuments");function hV(i,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=SC(i,r);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}O(hV,"loadAll$1");function nR(i,e){var r=SC(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")}}O(nR,"load$1");var uV=nR,dV={load:uV},aR=Object.prototype.toString,sR=Object.prototype.hasOwnProperty,TC=65279,fV=9,Ed=10,pV=13,gV=32,mV=33,yV=34,Rv=35,bV=37,xV=38,vV=39,CV=42,oR=44,_V=45,jg=58,kV=61,wV=62,SV=63,TV=64,lR=91,cR=93,EV=96,hR=123,NV=124,uR=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 AV=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],MV=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function dR(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&&sR.call(u.styleAliases,h)&&(h=u.styleAliases[h]),r[c]=h;return r}O(dR,"compileStyleMap");function fR(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+xr.repeat("0",n-e.length)+e}O(fR,"encodeHex");var BV=1,Nd=2;function pR(i){this.schema=i.schema||DO,this.indent=Math.max(1,i.indent||2),this.noArrayIndent=i.noArrayIndent||!1,this.skipInvalid=i.skipInvalid||!1,this.flowLevel=xr.isNothing(i.flowLevel)?-1:i.flowLevel,this.styleMap=dR(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==='"'?Nd:BV,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}O(pR,"State");function jv(i,e){for(var r=xr.repeat(" ",e),n=0,a=-1,o="",c,h=i.length;n<h;)a=i.indexOf(`
|
|
289
|
+
`,n),a===-1?(c=i.slice(n),n=h):(c=i.slice(n,a+1),n=a+1),c.length&&c!==`
|
|
290
|
+
`&&(o+=r),o+=c;return o}O(jv,"indentString");function Dg(i,e){return`
|
|
291
|
+
`+xr.repeat(" ",i.indent*e)}O(Dg,"generateNextLine");function gR(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}O(gR,"testImplicitResolving");function Ad(i){return i===gV||i===fV}O(Ad,"isWhitespace");function _h(i){return 32<=i&&i<=126||161<=i&&i<=55295&&i!==8232&&i!==8233||57344<=i&&i<=65533&&i!==TC||65536<=i&&i<=1114111}O(_h,"isPrintable");function Dv(i){return _h(i)&&i!==TC&&i!==pV&&i!==Ed}O(Dv,"isNsCharOrWhitespace");function Fv(i,e,r){var n=Dv(i),a=n&&!Ad(i);return(r?n:n&&i!==oR&&i!==lR&&i!==cR&&i!==hR&&i!==uR)&&i!==Rv&&!(e===jg&&!a)||Dv(e)&&!Ad(e)&&i===Rv||e===jg&&a}O(Fv,"isPlainSafe");function mR(i){return _h(i)&&i!==TC&&!Ad(i)&&i!==_V&&i!==SV&&i!==jg&&i!==oR&&i!==lR&&i!==cR&&i!==hR&&i!==uR&&i!==Rv&&i!==xV&&i!==CV&&i!==mV&&i!==NV&&i!==kV&&i!==wV&&i!==vV&&i!==yV&&i!==bV&&i!==TV&&i!==EV}O(mR,"isPlainSafeFirst");function yR(i){return!Ad(i)&&i!==jg}O(yR,"isPlainSafeLast");function $c(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}O($c,"codePointAt");function EC(i){var e=/^\n* /;return e.test(i)}O(EC,"needIndentIndicator");var bR=1,Iv=2,xR=3,vR=4,jc=5;function CR(i,e,r,n,a,o,c,h){var u,d=0,f=null,g=!1,x=!1,y=n!==-1,v=-1,C=mR($c(i,0))&&yR($c(i,i.length-1));if(e||c)for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=$c(i,u),!_h(d))return jc;C=C&&Fv(d,f,h),f=d}else{for(u=0;u<i.length;d>=65536?u+=2:u++){if(d=$c(i,u),d===Ed)g=!0,y&&(x=x||u-v-1>n&&i[v+1]!==" ",v=u);else if(!_h(d))return jc;C=C&&Fv(d,f,h),f=d}x=x||y&&u-v-1>n&&i[v+1]!==" "}return!g&&!x?C&&!c&&!a(i)?bR:o===Nd?jc:Iv:r>9&&EC(i)?jc:c?o===Nd?jc:Iv:x?vR:xR}O(CR,"chooseScalarStyle");function _R(i,e,r,n,a){i.dump=(function(){if(e.length===0)return i.quotingType===Nd?'""':"''";if(!i.noCompatMode&&(AV.indexOf(e)!==-1||MV.test(e)))return i.quotingType===Nd?'"'+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 gR(i,d)}switch(O(u,"testAmbiguity"),CR(e,h,i.indent,c,u,i.quotingType,i.forceQuotes&&!n,a)){case bR:return e;case Iv:return"'"+e.replace(/'/g,"''")+"'";case xR:return"|"+$v(e,i.indent)+zv(jv(e,o));case vR:return">"+$v(e,i.indent)+zv(jv(kR(e,c),o));case jc:return'"'+wR(e)+'"';default:throw new xn("impossible error: invalid scalar style")}})()}O(_R,"writeScalar");function $v(i,e){var r=EC(i)?String(e):"",n=i[i.length-1]===`
|
|
292
|
+
`,a=n&&(i[i.length-2]===`
|
|
293
|
+
`||i===`
|
|
294
|
+
`),o=a?"+":n?"":"-";return r+o+`
|
|
295
|
+
`}O($v,"blockHeader");function zv(i){return i[i.length-1]===`
|
|
296
|
+
`?i.slice(0,-1):i}O(zv,"dropEndingNewline");function kR(i,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var d=i.indexOf(`
|
|
297
|
+
`);return d=d!==-1?d:i.length,r.lastIndex=d,Pv(i.slice(0,d),e)})(),a=i[0]===`
|
|
298
|
+
`||i[0]===" ",o,c;c=r.exec(i);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
|
|
299
|
+
`:"")+Pv(u,e),a=o}return n}O(kR,"foldString");function Pv(i,e){if(i===""||i[0]===" ")return i;for(var r=/ [^ ]/g,n,a=0,o,c=0,h=0,u="";n=r.exec(i);)h=n.index,h-a>e&&(o=c>a?c:h,u+=`
|
|
300
|
+
`+i.slice(a,o),a=o+1),c=h;return u+=`
|
|
301
|
+
`,i.length-a>e&&c>a?u+=i.slice(a,c)+`
|
|
302
|
+
`+i.slice(c+1):u+=i.slice(a),u.slice(1)}O(Pv,"foldLine");function wR(i){for(var e="",r=0,n,a=0;a<i.length;r>=65536?a+=2:a++)r=$c(i,a),n=Wr[r],!n&&_h(r)?(e+=i[a],r>=65536&&(e+=i[a+1])):e+=n||fR(r);return e}O(wR,"escapeString");function SR(i,e,r){var n="",a=i.tag,o,c,h;for(o=0,c=r.length;o<c;o+=1)h=r[o],i.replacer&&(h=i.replacer.call(r,String(o),h)),(Ka(i,e,h,!1,!1)||typeof h>"u"&&Ka(i,e,null,!1,!1))&&(n!==""&&(n+=","+(i.condenseFlow?"":" ")),n+=i.dump);i.tag=a,i.dump="["+n+"]"}O(SR,"writeFlowSequence");function qv(i,e,r,n){var a="",o=i.tag,c,h,u;for(c=0,h=r.length;c<h;c+=1)u=r[c],i.replacer&&(u=i.replacer.call(r,String(c),u)),(Ka(i,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Ka(i,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=Dg(i,e)),i.dump&&Ed===i.dump.charCodeAt(0)?a+="-":a+="- ",a+=i.dump);i.tag=o,i.dump=a||"[]"}O(qv,"writeBlockSequence");function TR(i,e,r){var n="",a=i.tag,o=Object.keys(r),c,h,u,d,f;for(c=0,h=o.length;c<h;c+=1)f="",n!==""&&(f+=", "),i.condenseFlow&&(f+='"'),u=o[c],d=r[u],i.replacer&&(d=i.replacer.call(r,u,d)),Ka(i,e,u,!1,!1)&&(i.dump.length>1024&&(f+="? "),f+=i.dump+(i.condenseFlow?'"':"")+":"+(i.condenseFlow?"":" "),Ka(i,e,d,!1,!1)&&(f+=i.dump,n+=f));i.tag=a,i.dump="{"+n+"}"}O(TR,"writeFlowMapping");function ER(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+=Dg(i,e)),d=c[h],f=r[d],i.replacer&&(f=i.replacer.call(r,d,f)),Ka(i,e+1,d,!0,!0,!0)&&(g=i.tag!==null&&i.tag!=="?"||i.dump&&i.dump.length>1024,g&&(i.dump&&Ed===i.dump.charCodeAt(0)?x+="?":x+="? "),x+=i.dump,g&&(x+=Dg(i,e)),Ka(i,e+1,f,!0,g)&&(i.dump&&Ed===i.dump.charCodeAt(0)?x+=":":x+=": ",x+=i.dump,a+=x));i.tag=o,i.dump=a||"{}"}O(ER,"writeBlockMapping");function Uv(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,aR.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(sR.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}O(Uv,"detectType");function Ka(i,e,r,n,a,o,c){i.tag=null,i.dump=r,Uv(i,r,!1)||Uv(i,r,!0);var h=aR.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?(ER(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(TR(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?qv(i,e-1,i.dump,a):qv(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(SR(i,e,i.dump),x&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object String]")i.tag!=="?"&&_R(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}O(Ka,"writeNode");function NR(i,e){var r=[],n=[],a,o;for(Fg(i,r,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(o)}O(NR,"getDuplicateReferences");function Fg(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)Fg(i[a],e,r);else for(n=Object.keys(i),a=0,o=n.length;a<o;a+=1)Fg(i[n[a]],e,r)}O(Fg,"inspectNode");function LV(i,e){e=e||{};var r=new pR(e);r.noRefs||NR(i,r);var n=i;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ka(r,0,n,!0,!0)?r.dump+`
|
|
303
|
+
`:""}O(LV,"dump$1");function OV(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.")}}O(OV,"renamed");var RV=xO,jV=dV.load;/*! Bundled license information:
|
|
304
|
+
|
|
305
|
+
js-yaml/dist/js-yaml.mjs:
|
|
306
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
307
|
+
*/var Ou=O((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"),Ur={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},bE={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ju(i,e){if(i===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};i=ji(i),e=ji(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}}O(Ju,"calculateDeltaAndAngle");var ji=O(i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,"pointTransformer"),DV=O(i=>({x:O(function(e,r,n){let a=0;const o=ji(n[0]).x<ji(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ur,i.arrowTypeStart)){const{angle:y,deltaX:v}=Ju(n[0],n[1]);a=Ur[i.arrowTypeStart]*Math.cos(y)*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ur,i.arrowTypeEnd)){const{angle:y,deltaX:v}=Ju(n[n.length-1],n[n.length-2]);a=Ur[i.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(ji(e).x-ji(n[n.length-1]).x),h=Math.abs(ji(e).y-ji(n[n.length-1]).y),u=Math.abs(ji(e).x-ji(n[0]).x),d=Math.abs(ji(e).y-ji(n[0]).y),f=Ur[i.arrowTypeStart],g=Ur[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 ji(e).x+a},"x"),y:O(function(e,r,n){let a=0;const o=ji(n[0]).y<ji(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ur,i.arrowTypeStart)){const{angle:y,deltaY:v}=Ju(n[0],n[1]);a=Ur[i.arrowTypeStart]*Math.abs(Math.sin(y))*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ur,i.arrowTypeEnd)){const{angle:y,deltaY:v}=Ju(n[n.length-1],n[n.length-2]);a=Ur[i.arrowTypeEnd]*Math.abs(Math.sin(y))*(v>=0?1:-1)}const c=Math.abs(ji(e).y-ji(n[n.length-1]).y),h=Math.abs(ji(e).x-ji(n[n.length-1]).x),u=Math.abs(ji(e).y-ji(n[0]).y),d=Math.abs(ji(e).x-ji(n[0]).x),f=Ur[i.arrowTypeStart],g=Ur[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 ji(e).y+a},"y")}),"getLineFunctionsWithOffset"),kp={},mr={},xE;function FV(){return xE||(xE=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.BLANK_URL=mr.relativeFirstCharacters=mr.whitespaceEscapeCharsRegex=mr.urlSchemeRegex=mr.ctrlCharactersRegex=mr.htmlCtrlEntityRegex=mr.htmlEntitiesRegex=mr.invalidProtocolRegex=void 0,mr.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,mr.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,mr.htmlCtrlEntityRegex=/&(newline|tab);/gi,mr.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,mr.urlSchemeRegex=/^.+(:|:)/gim,mr.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,mr.relativeFirstCharacters=[".","/"],mr.BLANK_URL="about:blank"),mr}var vE;function IV(){if(vE)return kp;vE=1,Object.defineProperty(kp,"__esModule",{value:!0}),kp.sanitizeUrl=o;var i=FV();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 kp}var $V=IV(),zV="",PV={curveBasis:Nv,curveBasisClosed:vK,curveBasisOpen:CK,curveBumpX:NL,curveBumpY:AL,curveBundle:_K,curveCardinalClosed:kK,curveCardinalOpen:wK,curveCardinal:OL,curveCatmullRomClosed:SK,curveCatmullRomOpen:TK,curveCatmullRom:jL,curveLinear:fd,curveLinearClosed:EK,curveMonotoneX:PL,curveMonotoneY:qL,curveNatural:HL,curveStep:WL,curveStepAfter:YL,curveStepBefore:GL},qV=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,UV=O(function(i,e){const r=AR(i,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const c=r.map(h=>h.args);wg(c),n=br(n,[...c])}else n=r.args;if(!n)return;let a=cC(i,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),AR=O(function(i,e=null){var r,n;try{const a=new RegExp(`[%]{2}(?![{]${qV.source})(?=[}][%]{2}).*
|
|
308
|
+
`,"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=ud.exec(i))!==null;)if(o.index===ud.lastIndex&&ud.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"),HV=O(function(i){return i.replace(ud,"")},"removeDirectives"),WV=O(function(i,e){for(const[r,n]of e.entries())if(n.match(i))return r;return-1},"isSubstringInArray");function NC(i,e){if(!i)return e;const r=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return PV[r]??e}O(NC,"interpolateToCurve");function MR(i,e){const r=i.trim();if(r)return e.securityLevel!=="loose"?$V.sanitizeUrl(r):r}O(MR,"formatUrl");var GV=O((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 AC(i,e){return!i||!e?0:Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}O(AC,"distance");function BR(i){let e,r=0;i.forEach(a=>{r+=AC(a,e),e=a});const n=r/2;return MC(i,n)}O(BR,"traverseEdge");function LR(i){return i.length===1?i[0]:BR(i)}O(LR,"calcLabelPosition");var CE=O((i,e=2)=>{const r=Math.pow(10,e);return Math.round(i*r)/r},"roundNumber"),MC=O((i,e)=>{let r,n=e;for(const a of i){if(r){const o=AC(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:CE((1-c)*r.x+c*a.x,5),y:CE((1-c)*r.y+c*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),YV=O((i,e,r)=>{Nt.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const a=MC(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 OR(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=MC(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}O(OR,"calcTerminalLabelPosition");function RR(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}}O(RR,"getStylesFromArray");var _E=0,KV=O(()=>(_E++,"id-"+Math.random().toString(36).substr(2,12)+"-"+_E),"generateId");function jR(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}O(jR,"makeRandomHex");var VV=O(i=>jR(i.length),"random"),XV=O(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"),ZV=O(function(i,e){const r=e.text.replace(Yd.lineBreakRegex," "),[,n]=xm(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"),QV=qd((i,e,r)=>{if(!i||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Yd.lineBreakRegex.test(i)))return i;const n=i.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=Fs(`${c} `,r),d=Fs(o,r);if(u>e){const{hyphenatedStrings:x,remainingWord:y}=JV(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}`),JV=qd((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(Fs(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 DR(i,e){return BC(i,e).height}O(DR,"calculateTextHeight");function Fs(i,e){return BC(i,e).width}O(Fs,"calculateTextWidth");var BC=qd((i,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!i)return{width:0,height:0};const[,o]=xm(r),c=["sans-serif",n],h=i.split(Yd.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 C of h){const _=XV();_.text=C||zV;const k=ZV(f,_).style("font-size",o).style("font-weight",a).style("font-family",x),T=(k._groups||k)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,T.width)),y=Math.round(T.height),v.height+=y,v.lineHeight=Math.round(Math.max(v.lineHeight,y))}u.push(v)}f.remove();const g=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[g]},(i,e)=>`${i}${e.fontSize}${e.fontWeight}${e.fontFamily}`),mh,tX=(mh=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},O(mh,"InitIDGenerator"),mh),wp,eX=O(function(i){return wp=wp||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),wp.innerHTML=i,unescape(wp.textContent)},"entityDecode");function LC(i){return"str"in i}O(LC,"isDetailedError");var iX=O((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"),xm=O(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 OC(i,e){return Y9({},i,e)}O(OC,"cleanAndMerge");var ba={assignWithDepth:br,wrapLabel:QV,calculateTextHeight:DR,calculateTextWidth:Fs,calculateTextDimensions:BC,cleanAndMerge:OC,detectInit:UV,detectDirective:AR,isSubstringInArray:WV,interpolateToCurve:NC,calcLabelPosition:LR,calcCardinalityPosition:YV,calcTerminalLabelPosition:OR,formatUrl:MR,getStylesFromArray:RR,generateId:KV,random:VV,runFunc:GV,entityDecode:eX,insertTitle:iX,isLabelCoordinateInPath:FR,parseFontSize:xm,InitIDGenerator:tX},rX=O(function(i){let e=i;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),Pl=O(function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Qot=O((i,e,{counter:r=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${i}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function wr(i){return i??null}O(wr,"handleUndefinedAttr");function FR(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())}O(FR,"isLabelCoordinateInPath");var RC=O(({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 IR(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=fL.fontSize]=xm(h),f=d*u+"px";a.style.minWidth=f,a.style.maxWidth=f}else a.style.width="100%";o(a)}O(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}O(IR,"configureLabelImages");var nX=O(i=>{const{handDrawnSeed:e}=ii();return{fill:i,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:i,seed:e}},"solidStateFill"),Nh=O(i=>{const e=aX([...i.cssCompiledStyles||[],...i.cssStyles||[],...i.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),aX=O(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"),$R=O(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"),Jt=O(i=>{const{stylesArray:e}=Nh(i),r=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];$R(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"),Qt=O((i,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=ii(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:c}=Nh(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:sX(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),sX=O(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 oX=Object.freeze({left:0,top:0,width:16,height:16}),Ig=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),zR=Object.freeze({...oX,...Ig}),lX=Object.freeze({...zR,body:"",hidden:!1}),cX=Object.freeze({width:null,height:null}),hX=Object.freeze({...cX,...Ig}),uX=(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 c0(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 c0(h)?h:null}if(r&&n===""){const h={provider:n,prefix:"",name:o};return c0(h,r)?h:null}return null},c0=(i,e)=>i?!!((e&&i.prefix===""||i.prefix)&&i.name):!1;function dX(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 kE(i,e){const r=dX(i,e);for(const n in lX)n in Ig?n in i&&!(n in r)&&(r[n]=Ig[n]):n in e?r[n]=e[n]:n in i&&(r[n]=i[n]);return r}function fX(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 wE(i,e,r){const n=i.icons,a=i.aliases||Object.create(null);let o={};function c(h){o=kE(n[h]||a[h],o)}return c(e),r.forEach(c),kE(i,o)}function pX(i,e){if(i.icons[e])return wE(i,e,[]);const r=fX(i,[e])[e];return r?wE(i,e,r):null}const gX=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mX=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function SE(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(gX);if(n===null||!n.length)return i;const a=[];let o=n.shift(),c=mX.test(o);for(;;){if(c){const h=parseFloat(o);isNaN(h)?a.push(o):a.push(Math.ceil(h*e*r)/r)}else a.push(o);if(o=n.shift(),o===void 0)return a.join("");c=!c}}function yX(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 bX(i,e){return i?"<defs>"+i+"</defs>"+e:e}function xX(i,e,r){const n=yX(i);return bX(n.defs,e+n.content+r)}const vX=i=>i==="unset"||i==="undefined"||i==="none";function CX(i,e){const r={...zR,...i},n={...hX,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(C=>{const _=[],k=C.hFlip,T=C.vFlip;let E=C.rotate;k?T?E+=2:(_.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),_.push("scale(-1 1)"),a.top=a.left=0):T&&(_.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),_.push("scale(1 -1)"),a.top=a.left=0);let A;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:A=a.height/2+a.top,_.unshift("rotate(90 "+A.toString()+" "+A.toString()+")");break;case 2:_.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:A=a.width/2+a.left,_.unshift("rotate(-90 "+A.toString()+" "+A.toString()+")");break}E%2===1&&(a.left!==a.top&&(A=a.left,a.left=a.top,a.top=A),a.width!==a.height&&(A=a.width,a.width=a.height,a.height=A)),_.length&&(o=xX(o,'<g transform="'+_.join(" ")+'">',"</g>"))});const c=n.width,h=n.height,u=a.width,d=a.height;let f,g;c===null?(g=h===null?"1em":h==="auto"?d:h,f=SE(g,u/d)):(f=c==="auto"?u:c,g=h===null?SE(f,d/u):h==="auto"?d:h);const x={},y=(C,_)=>{vX(_)||(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 _X=/\sid="(\S+)"/g,TE=new Map;function kX(i){i=i.replace(/[0-9]+$/,"")||"a";const e=TE.get(i)||0;return TE.set(i,e+1),e?`${i}${e}`:i}function wX(i){const e=[];let r;for(;r=_X.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=kX(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 SX(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 jC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vl=jC();function PR(i){Vl=i}var pd={exec:()=>null};function ni(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 TX=(()=>{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")},EX=/^(?:[ \t]*(?:\n|$))+/,NX=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AX=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,MX=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,DC=/(?:[*+-]|\d{1,9}[.)])/,qR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,UR=ni(qR).replace(/bull/g,DC).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(),BX=ni(qR).replace(/bull/g,DC).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(),FC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,LX=/^[^\n]+/,IC=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,OX=ni(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",IC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),RX=ni(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,DC).getRegex(),vm="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",$C=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jX=ni("^ {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",$C).replace("tag",vm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),HR=ni(FC).replace("hr",Vd).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",vm).getRegex(),DX=ni(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",HR).getRegex(),zC={blockquote:DX,code:NX,def:OX,fences:AX,heading:MX,hr:Vd,html:jX,lheading:UR,list:RX,newline:EX,paragraph:HR,table:pd,text:LX},EE=ni("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vd).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",vm).getRegex(),FX={...zC,lheading:BX,table:EE,paragraph:ni(FC).replace("hr",Vd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",EE).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",vm).getRegex()},IX={...zC,html:ni(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$C).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:pd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ni(FC).replace("hr",Vd).replace("heading",` *#{1,6} *[^
|
|
309
|
+
]`).replace("lheading",UR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$X=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zX=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,WR=/^( {2,}|\\)\n(?!\s*$)/,PX=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Cm=/[\p{P}\p{S}]/u,PC=/[\s\p{P}\p{S}]/u,GR=/[^\s\p{P}\p{S}]/u,qX=ni(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,PC).getRegex(),YR=/(?!~)[\p{P}\p{S}]/u,UX=/(?!~)[\s\p{P}\p{S}]/u,HX=/(?:[^\s\p{P}\p{S}]|~)/u,WX=ni(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",TX?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),KR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,GX=ni(KR,"u").replace(/punct/g,Cm).getRegex(),YX=ni(KR,"u").replace(/punct/g,YR).getRegex(),VR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",KX=ni(VR,"gu").replace(/notPunctSpace/g,GR).replace(/punctSpace/g,PC).replace(/punct/g,Cm).getRegex(),VX=ni(VR,"gu").replace(/notPunctSpace/g,HX).replace(/punctSpace/g,UX).replace(/punct/g,YR).getRegex(),XX=ni("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,GR).replace(/punctSpace/g,PC).replace(/punct/g,Cm).getRegex(),ZX=ni(/\\(punct)/,"gu").replace(/punct/g,Cm).getRegex(),QX=ni(/^<(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(),JX=ni($C).replace("(?:-->|$)","-->").getRegex(),tZ=ni("^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",JX).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$g=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,eZ=ni(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$g).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),XR=ni(/^!?\[(label)\]\[(ref)\]/).replace("label",$g).replace("ref",IC).getRegex(),ZR=ni(/^!?\[(ref)\](?:\[\])?/).replace("ref",IC).getRegex(),iZ=ni("reflink|nolink(?!\\()","g").replace("reflink",XR).replace("nolink",ZR).getRegex(),NE=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,qC={_backpedal:pd,anyPunctuation:ZX,autolink:QX,blockSkip:WX,br:WR,code:zX,del:pd,emStrongLDelim:GX,emStrongRDelimAst:KX,emStrongRDelimUnd:XX,escape:$X,link:eZ,nolink:ZR,punctuation:qX,reflink:XR,reflinkSearch:iZ,tag:tZ,text:PX,url:pd},rZ={...qC,link:ni(/^!?\[(label)\]\((.*?)\)/).replace("label",$g).getRegex(),reflink:ni(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$g).getRegex()},Hv={...qC,emStrongRDelimAst:VX,emStrongLDelim:YX,url:ni(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",NE).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:ni(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",NE).getRegex()},nZ={...Hv,br:ni(WR).replace("{2,}","*").getRegex(),text:ni(Hv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sp={normal:zC,gfm:FX,pedantic:IX},Ru={normal:qC,gfm:Hv,breaks:nZ,pedantic:rZ},aZ={"&":"&","<":"<",">":">",'"':""","'":"'"},AE=i=>aZ[i];function ja(i,e){if(e){if(en.escapeTest.test(i))return i.replace(en.escapeReplace,AE)}else if(en.escapeTestNoEncode.test(i))return i.replace(en.escapeReplaceNoEncode,AE);return i}function ME(i){try{i=encodeURI(i).replace(en.percentDecode,"%")}catch{return null}return i}function BE(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 ju(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 sZ(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 LE(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 oZ(i,e,r){let n=i.match(r.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
|
|
310
|
+
`).map(o=>{let c=o.match(r.other.beginningSpace);if(c===null)return o;let[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
311
|
+
`)}var zg=class{constructor(e){se(this,"options");se(this,"rules");se(this,"lexer");this.options=e||Vl}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:ju(n,`
|
|
312
|
+
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],a=oZ(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=ju(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:ju(r[0],`
|
|
313
|
+
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=ju(r[0],`
|
|
314
|
+
`).split(`
|
|
315
|
+
`),a="",o="",c=[];for(;n.length>0;){let h=!1,u=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))u.push(n[d]),h=!0;else if(!h)u.push(n[d]);else break;n=n.slice(d);let f=u.join(`
|
|
316
|
+
`),g=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
317
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
318
|
+
${f}`:f,o=o?`${o}
|
|
319
|
+
${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,n.length===0)break;let y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let v=y,C=v.raw+`
|
|
320
|
+
`+n.join(`
|
|
321
|
+
`),_=this.blockquote(C);c[c.length-1]=_,a=a.substring(0,a.length-v.raw.length)+_.raw,o=o.substring(0,o.length-v.text.length)+_.text;break}else if((y==null?void 0:y.type)==="list"){let v=y,C=v.raw+`
|
|
322
|
+
`+n.join(`
|
|
323
|
+
`),_=this.list(C);c[c.length-1]=_,a=a.substring(0,a.length-y.raw.length)+_.raw,o=o.substring(0,o.length-v.raw.length)+_.raw,n=C.substring(c.at(-1).raw.length).split(`
|
|
324
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:c,text:o}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),a=n.length>1,o={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let c=this.rules.other.listItemRegex(n),h=!1;for(;e;){let d=!1,f="",g="";if(!(r=c.exec(e))||this.rules.block.hr.test(e))break;f=r[0],e=e.substring(f.length);let x=r[2].split(`
|
|
325
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),y=e.split(`
|
|
326
|
+
`,1)[0],v=!x.trim(),C=0;if(this.options.pedantic?(C=2,g=x.trimStart()):v?C=r[1].length+1:(C=r[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=r[1].length),v&&this.rules.other.blankLine.test(y)&&(f+=y+`
|
|
327
|
+
`,e=e.substring(y.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(C),E=this.rules.other.hrRegex(C),A=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),L=this.rules.other.htmlBeginRegex(C);for(;e;){let N=e.split(`
|
|
328
|
+
`,1)[0],M;if(y=N,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),M=y):M=y.replace(this.rules.other.tabCharGlobal," "),A.test(y)||B.test(y)||L.test(y)||T.test(y)||E.test(y))break;if(M.search(this.rules.other.nonSpaceChar)>=C||!y.trim())g+=`
|
|
329
|
+
`+M.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(x)||B.test(x)||E.test(x))break;g+=`
|
|
330
|
+
`+y}!v&&!y.trim()&&(v=!0),f+=N+`
|
|
331
|
+
`,e=e.substring(N.length+1),x=M.slice(C)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(h=!0));let _=null,k;this.options.gfm&&(_=this.rules.other.listIsTask.exec(g),_&&(k=_[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!_,checked:k,loose:!1,text:g,tokens:[]}),o.raw+=f}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter(x=>x.type==="space"),g=f.length>0&&f.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=g}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:a,title:o}}}table(e){var h;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=BE(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=r[3])!=null&&h.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
332
|
+
`):[],c={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<n.length;u++)c.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:c.align[u]});for(let u of o)c.rows.push(BE(u,c.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[f]})));return c}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
|
|
333
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let c=ju(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=sZ(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)),LE(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 LE(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 Wv{constructor(e){se(this,"tokens");se(this,"options");se(this,"state");se(this,"tokenizer");se(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Vl,this.options.tokenizer=this.options.tokenizer||new zg,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:Sp.normal,inline:Ru.normal};this.options.pedantic?(r.block=Sp.pedantic,r.inline=Ru.pedantic):this.options.gfm&&(r.block=Sp.gfm,this.options.breaks?r.inline=Ru.breaks:r.inline=Ru.gfm),this.tokenizer.rules=r}static get rules(){return{block:Sp,inline:Ru}}static lex(e,r){return new Wv(r).lex(e)}static lexInline(e,r){return new Wv(r).inlineTokens(e)}lex(e){e=e.replace(en.carriageReturn,`
|
|
334
|
+
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(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+=`
|
|
335
|
+
`:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
336
|
+
`)?"":`
|
|
337
|
+
`)+h.raw,d.text+=`
|
|
338
|
+
`+h.text,this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
339
|
+
`)?"":`
|
|
340
|
+
`)+h.raw,d.text+=`
|
|
341
|
+
`+h.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},r.push(h));continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0,f=e.slice(1),g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},f),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
|
|
342
|
+
`)?"":`
|
|
343
|
+
`)+h.raw,d.text+=`
|
|
344
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
|
345
|
+
`)?"":`
|
|
346
|
+
`)+h.raw,d.text+=`
|
|
347
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(h);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,d,f,g,x;let n=e,a=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)y.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=a[2]?a[2].length:0,n=n.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((d=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:d.call({lexer:this},n))??n;let c=!1,h="";for(;e;){c||(h=""),c=!1;let y;if((g=(f=this.options.extensions)==null?void 0:f.inline)!=null&&g.some(C=>(y=C.call({lexer:this},e,r))?(e=e.substring(y.raw.length),r.push(y),!0):!1))continue;if(y=this.tokenizer.escape(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.tag(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.link(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(y.raw.length);let C=r.at(-1);y.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(y=this.tokenizer.emStrong(e,n,h)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.codespan(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.br(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.del(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.autolink(e)){e=e.substring(y.raw.length),r.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(e))){e=e.substring(y.raw.length),r.push(y);continue}let v=e;if((x=this.options.extensions)!=null&&x.startInline){let C=1/0,_=e.slice(1),k;this.options.extensions.startInline.forEach(T=>{k=T.call({lexer:this},_),typeof k=="number"&&k>=0&&(C=Math.min(C,k))}),C<1/0&&C>=0&&(v=e.substring(0,C+1))}if(y=this.tokenizer.inlineText(v)){e=e.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(h=y.raw.slice(-1)),c=!0;let C=r.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(e){let C="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return r}},Pg=class{constructor(e){se(this,"options");se(this,"parser");this.options=e||Vl}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,"")+`
|
|
348
|
+
`;return a?'<pre><code class="language-'+ja(a)+'">'+(n?o:ja(o,!0))+`</code></pre>
|
|
349
|
+
`:"<pre><code>"+(n?o:ja(o,!0))+`</code></pre>
|
|
350
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
351
|
+
${this.parser.parse(e)}</blockquote>
|
|
352
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
353
|
+
`}hr(e){return`<hr>
|
|
354
|
+
`}list(e){let r=e.ordered,n=e.start,a="";for(let h=0;h<e.items.length;h++){let u=e.items[h];a+=this.listitem(u)}let o=r?"ol":"ul",c=r&&n!==1?' start="'+n+'"':"";return"<"+o+c+`>
|
|
355
|
+
`+a+"</"+o+`>
|
|
356
|
+
`}listitem(e){var n;let r="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+ja(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
|
|
357
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
358
|
+
`}table(e){let r="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);r+=this.tablerow({text:n});let a="";for(let o=0;o<e.rows.length;o++){let c=e.rows[o];n="";for(let h=0;h<c.length;h++)n+=this.tablecell(c[h]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
359
|
+
<thead>
|
|
360
|
+
`+r+`</thead>
|
|
361
|
+
`+a+`</table>
|
|
362
|
+
`}tablerow({text:e}){return`<tr>
|
|
363
|
+
${e}</tr>
|
|
364
|
+
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
365
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ja(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let a=this.parser.parseInline(n),o=ME(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return r&&(c+=' title="'+ja(r)+'"'),c+=">"+a+"</a>",c}image({href:e,title:r,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let o=ME(e);if(o===null)return ja(n);e=o;let c=`<img src="${e}" alt="${n}"`;return r&&(c+=` title="${ja(r)}"`),c+=">",c}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ja(e.text)}},UC=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 Gv{constructor(e){se(this,"options");se(this,"renderer");se(this,"textRenderer");this.options=e||Vl,this.options.renderer=this.options.renderer||new Pg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new UC}static parse(e,r){return new Gv(r).parse(e)}static parseInline(e,r){return new Gv(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let d=h,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){n+=f||"";continue}}let u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,f=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],f+=`
|
|
366
|
+
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):n+=f;continue}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=d||"";continue}}let u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},$p,td=($p=class{constructor(e){se(this,"options");se(this,"block");this.options=e||Vl}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}},se($p,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),se($p,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),$p),lZ=class{constructor(...e){se(this,"defaults",jC());se(this,"options",this.setOptions);se(this,"parse",this.parseMarkdown(!0));se(this,"parseInline",this.parseMarkdown(!1));se(this,"Parser",ma);se(this,"Renderer",Pg);se(this,"TextRenderer",UC);se(this,"Lexer",ga);se(this,"Tokenizer",zg);se(this,"Hooks",td);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 Pg(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 zg(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 td;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];td.passThroughHooks.has(c)?o[h]=f=>{if(this.defaults.async&&td.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(o,f);return d.call(o,x)})();let g=u.call(o,f);return d.call(o,g)}:o[h]=(...f)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(o,f);return x===!1&&(x=await d.apply(o,f)),x})();let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}a.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,c=n.walkTokens;a.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),o&&(u=u.concat(o.call(this,h))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return ga.lex(e,r??this.defaults)}parser(e,r){return ma.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(r):r,u=await(o.hooks?await o.hooks.provideLexer():e?ga.lex:ga.lexInline)(h,o),d=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():e?ma.parse:ma.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let h=(o.hooks?o.hooks.provideLexer():e?ga.lex:ga.lexInline)(r,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():e?ma.parse:ma.parseInline)(h,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(e,r){return n=>{if(n.message+=`
|
|
367
|
+
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+ja(n.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(n);throw n}}},ql=new lZ;function ui(i,e){return ql.parse(i,e)}ui.options=ui.setOptions=function(i){return ql.setOptions(i),ui.defaults=ql.defaults,PR(ui.defaults),ui};ui.getDefaults=jC;ui.defaults=Vl;ui.use=function(...i){return ql.use(...i),ui.defaults=ql.defaults,PR(ui.defaults),ui};ui.walkTokens=function(i,e){return ql.walkTokens(i,e)};ui.parseInline=ql.parseInline;ui.Parser=ma;ui.parser=ma.parse;ui.Renderer=Pg;ui.TextRenderer=UC;ui.Lexer=ga;ui.lexer=ga.lex;ui.Tokenizer=zg;ui.Hooks=td;ui.parse=ui;ui.options;ui.setOptions;ui.use;ui.walkTokens;ui.parseInline;ma.parse;ga.lex;function QR(i){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof i=="string"?[i]:i);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var a=n.reduce(function(h,u){var d=u.match(/\n([\t ]+|(?!\s).)/g);return d?h.concat(d.map(function(f){var g,x;return(x=(g=f.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&x!==void 0?x:0})):h},[]);if(a.length){var o=new RegExp(`
|
|
368
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");n=n.map(function(h){return h.replace(o,`
|
|
369
|
+
`)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return e.forEach(function(h,u){var d=c.match(/(?:^|\n)( *)$/),f=d?d[1]:"",g=h;typeof h=="string"&&h.includes(`
|
|
370
|
+
`)&&(g=String(h).split(`
|
|
371
|
+
`).map(function(x,y){return y===0?x:""+f+x}).join(`
|
|
372
|
+
`)),c+=g+n[u+1]}),c}var cZ={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},Yv=new Map,JR=new Map,hZ=O(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)JR.set(e.name,e.loader);else if("icons"in e)Yv.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"),t3=O(async(i,e)=>{const r=uX(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=Yv.get(n);if(!a){const c=JR.get(n);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await c(),prefix:n},Yv.set(n,a)}catch(h){throw Nt.error(h),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=pX(a,r.name);if(!o)throw new Error(`Icon not found: ${i}`);return o},"getRegisteredIconData"),uZ=O(async i=>{try{return await t3(i),!0}catch{return!1}},"isIconAvailable"),Xd=O(async(i,e,r)=>{let n;try{n=await t3(i,e==null?void 0:e.fallbackPrefix)}catch(c){Nt.error(c),n=cZ}const a=CX(n,e),o=SX(wX(a.body),{...a.attributes,...r});return ka(o,qi())},"getIconSVG");function e3(i,{markdownAutoWrap:e}){const n=i.replace(/<br\/>/g,`
|
|
373
|
+
`).replace(/\n{2,}/g,`
|
|
374
|
+
`);return QR(n)}O(e3,"preprocessMarkdown");function i3(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"})))??[]})}O(i3,"nonMarkdownToLines");function r3(i,e={}){const r=e3(i,e),n=ui.lexer(r),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
|
|
375
|
+
`).forEach((f,g)=>{g!==0&&(o++,a.push([])),f.split(" ").forEach(x=>{x=x.replace(/'/g,"'"),x&&a[o].push({content:x,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(d=>{c(d,h.type)}):h.type==="html"&&a[o].push({content:h.text,type:"normal"})}return O(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}O(r3,"markdownToLines");function n3(i){return i?`<p>${i.replace(/\\n|\n/g,"<br />")}</p>`:""}O(n3,"nonMarkdownToHTML");function a3(i,{markdownAutoWrap:e}={}){const r=ui.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 O(n,"output"),r.map(n).join("")}O(a3,"markdownToHTML");function s3(i){return Intl.Segmenter?[...new Intl.Segmenter().segment(i)].map(e=>e.segment):[...i]}O(s3,"splitTextToChars");function o3(i,e){const r=s3(e.content);return HC(i,[],r,e.type)}O(o3,"splitWordToFitWidth");function HC(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}])?HC(i,c,o,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}O(HC,"splitWordToFitWidthRecursion");function l3(i,e){if(i.some(({content:r})=>r.includes(`
|
|
376
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return qg(i,e)}O(l3,"splitLineToFitWidth");function qg(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 qg(i,e,r,c);if(n.length>0)r.push(n),i.unshift(o);else if(o.content){const[h,u]=o3(e,o);r.push([h]),u.content&&i.unshift(u)}return qg(i,e,r)}O(qg,"splitLineToFitWidthRecursion");function Kv(i,e){e&&i.attr("style",e)}O(Kv,"applyStyle");var OE=16384;async function c3(i,e,r,n,a=!1,o=qi()){const c=i.append("foreignObject");c.attr("width",`${Math.min(10*r,OE)}px`),c.attr("height",`${Math.min(10*r,OE)}px`);const h=c.append("xhtml:div"),u=Sd(e.label)?await _L(e.label.replace(Yd.lineBreakRegex,`
|
|
377
|
+
`),o):ka(e.label,o),d=e.isNode?"nodeLabel":"edgeLabel",f=h.append("span");f.html(u),Kv(f,e.labelStyle),f.attr("class",`${d} ${n}`),Kv(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===r&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px"),g=h.node().getBoundingClientRect()),c.node()}O(c3,"addHtmlSpan");function _m(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}O(_m,"createTspan");function h3(i,e,r){const n=i.append("text"),a=_m(n,1,e);km(a,r);const o=a.node().getComputedTextLength();return n.remove(),o}O(h3,"computeWidthOfText");function dZ(i,e,r){var c;const n=i.append("text"),a=_m(n,1,e);km(a,[{content:r,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}O(dZ,"computeDimensionOfText");function u3(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=O(y=>h3(c,1.1,y)<=i,"checkWidth"),x=g(f)?[f]:l3(f,g);for(const y of x){const v=_m(u,d,1.1,a);km(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()}O(u3,"createFormattedText");function Vv(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}})}O(Vv,"decodeHTMLEntities");function km(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(Vv(r.content)):a.text(" "+Vv(r.content))})}O(km,"updateTextContentAndStyles");async function d3(i,e={}){const r=[];i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(r.push((async()=>{const h=`${o}:${c}`;return await uZ(h)?await Xd(h,void 0,{class:"label-icon"}):`<i class='${ka(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(r);return i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}O(d3,"replaceIconSubstring");var zs=O(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?a3(e,f):n3(e),x=await d3(Pl(g),f),y=e.replace(/\\\\/g,"\\"),v={isNode:h,label:Sd(e)?y:x,labelStyle:r.replace("fill:","color:")};return await c3(i,v,u,a,d,f)}else{const g=Pl(e.replace(/<br\s*\/?>/g,"<br/>")),x=c?r3(g.replace("<br>","<br/>"),f):i3(g),y=u3(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 C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ue(y).select("text").attr("style",C)}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 h0(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 fZ(i,e){return i[0]===e[0]&&i[1]===e[1]}function pZ(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)h0(d,h,a);const u=(function(d,f,g){const x=[];for(const T of d){const E=[...T];fZ(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 A=T[E],B=T[E+1];if(A[1]!==B[1]){const L=Math.min(A[1],B[1]);v.push({ymin:L,ymax:Math.max(A[1],B[1]),x:L===A[1]?A[0]:B[0],islope:(B[0]-A[0])/(B[1]-A[1])})}}if(v.sort(((T,E)=>T.ymin<E.ymin?-1:T.ymin>E.ymin?1:T.x<E.x?-1:T.x>E.x?1:T.ymax===E.ymax?0:(T.ymax-E.ymax)/Math.abs(T.ymax-E.ymax))),!v.length)return y;let C=[],_=v[0].ymin,k=0;for(;C.length||v.length;){if(v.length){let T=-1;for(let E=0;E<v.length&&!(v[E].ymin>_);E++)T=E;v.splice(0,T+1).forEach((E=>{C.push({s:_,edge:E})}))}if(C=C.filter((T=>!(T.edge.ymax<=_))),C.sort(((T,E)=>T.edge.x===E.edge.x?0:(T.edge.x-E.edge.x)/Math.abs(T.edge.x-E.edge.x))),(g!==1||k%f==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const E=T+1;if(E>=C.length)break;const A=C[T].edge,B=C[E].edge;y.push([[Math.round(A.x),_],[Math.round(B.x),_]])}_+=g,C.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),k++}return y})(c,o,n);if(a){for(const d of c)h0(d,h,-a);(function(d,f,g){const x=[];d.forEach((y=>x.push(...y))),h0(x,f,g)})(u,h,-a)}return u}function Zd(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),pZ(i,a,n,o||1)}class WC{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Zd(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 wm(i){const e=i[0],r=i[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class gZ extends WC{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const a=Zd(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)wm([d,f])&&c.push([[d[0]-h,d[1]+u],[...f]],[[d[0]+h,d[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(c,r)}}}class mZ extends WC{fillPolygons(e,r){const n=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(e,a);return n.ops=n.ops.concat(o.ops),n}}class yZ{constructor(e){this.helper=e}fillPolygons(e,r){const n=Zd(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=wm(h),d=u/a,f=Math.ceil(d)-1,g=u-f*a,x=(h[0][0]+h[1][0])/2-a/4,y=Math.min(h[0][1],h[1][1]);for(let v=0;v<f;v++){const C=y+g+v*a,_=x-c+2*Math.random()*c,k=C-c+2*Math.random()*c,T=this.helper.ellipse(_,k,o,o,r);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}}class bZ{constructor(e){this.helper=e}fillPolygons(e,r){const n=Zd(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=wm(c),u=Math.floor(h/(n+a)),d=(h+a-u*(n+a))/2;let f=c[0],g=c[1];f[0]>g[0]&&(f=c[1],g=c[0]);const x=Math.atan((g[1]-f[1])/(g[0]-f[0]));for(let y=0;y<u;y++){const v=y*(n+a),C=v+n,_=[f[0]+v*Math.cos(x)+d*Math.cos(x),f[1]+v*Math.sin(x)+d*Math.sin(x)],k=[f[0]+C*Math.cos(x)+d*Math.cos(x),f[1]+C*Math.sin(x)+d*Math.sin(x)];o.push(...this.helper.doubleLineOps(_[0],_[1],k[0],k[1],r))}})),o}}class xZ{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=Zd(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=wm(o),h=Math.round(c/(2*r));let u=o[0],d=o[1];u[0]>d[0]&&(u=o[1],d=o[0]);const f=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let g=0;g<h;g++){const x=2*g*r,y=2*(g+1)*r,v=Math.sqrt(2*Math.pow(r,2)),C=[u[0]+x*Math.cos(f),u[1]+x*Math.sin(f)],_=[u[0]+y*Math.cos(f),u[1]+y*Math.sin(f)],k=[C[0]+v*Math.cos(f+Math.PI/4),C[1]+v*Math.sin(f+Math.PI/4)];a.push(...this.helper.doubleLineOps(C[0],C[1],k[0],k[1],n),...this.helper.doubleLineOps(k[0],k[1],_[0],_[1],n))}})),a}}const gn={};class vZ{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const CZ=0,u0=1,RE=2,Tp={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 d0(i,e){return i.type===e}function GC(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:CZ,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:u0,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:RE,text:""},h})(i);let n="BOD",a=0,o=r[a];for(;!d0(o,RE);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return GC("M0,0"+i);a++,c=Tp[o.text],n=o.text}else d0(o,u0)?c=Tp[n]:(a++,c=Tp[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(!d0(d,u0))throw new Error("Param not a number: "+n+","+d.text);h[h.length]=+d.text}if(typeof Tp[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 f3(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 p3(i){const e=[];let r="",n=0,a=0,o=0,c=0,h=0,u=0;for(const{key:d,data:f}of i){switch(d){case"M":e.push({key:"M",data:[...f]}),[n,a]=f,[o,c]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],a=f[5],h=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,a]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,a]});break;case"V":a=f[0],e.push({key:"L",data:[n,a]});break;case"S":{let g=0,x=0;r==="C"||r==="S"?(g=n+(n-h),x=a+(a-u)):(g=n,x=a),e.push({key:"C",data:[g,x,...f]}),h=f[0],u=f[1],n=f[2],a=f[3];break}case"T":{const[g,x]=f;let y=0,v=0;r==="Q"||r==="T"?(y=n+(n-h),v=a+(a-u)):(y=n,v=a);const C=n+2*(y-n)/3,_=a+2*(v-a)/3,k=g+2*(y-g)/3,T=x+2*(v-x)/3;e.push({key:"C",data:[C,_,k,T,g,x]}),h=y,u=v,n=g,a=x;break}case"Q":{const[g,x,y,v]=f,C=n+2*(g-n)/3,_=a+2*(x-a)/3,k=y+2*(g-y)/3,T=v+2*(x-v)/3;e.push({key:"C",data:[C,_,k,T,y,v]}),h=g,u=x,n=y,a=v;break}case"A":{const g=Math.abs(f[0]),x=Math.abs(f[1]),y=f[2],v=f[3],C=f[4],_=f[5],k=f[6];g===0||x===0?(e.push({key:"C",data:[n,a,_,k,_,k]}),n=_,a=k):(n!==_||a!==k)&&(g3(n,a,_,k,g,x,y,v,C).forEach((function(T){e.push({key:"C",data:T})})),n=_,a=k);break}case"Z":e.push({key:"Z",data:[]}),n=o,a=c}r=d}return e}function Du(i,e,r){return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function g3(i,e,r,n,a,o,c,h,u,d){const f=(g=c,Math.PI*g/180);var g;let x=[],y=0,v=0,C=0,_=0;if(d)[y,v,C,_]=d;else{[i,e]=Du(i,e,-f),[r,n]=Du(r,n,-f);const K=(i-r)/2,z=(e-n)/2;let G=K*K/(a*a)+z*z/(o*o);G>1&&(G=Math.sqrt(G),a*=G,o*=G);const D=a*a,F=o*o,q=D*F-D*z*z-F*K*K,X=D*z*z+F*K*K,nt=(h===u?-1:1)*Math.sqrt(Math.abs(q/X));C=nt*a*z/o+(i+r)/2,_=nt*-o*K/a+(e+n)/2,y=Math.asin(parseFloat(((e-_)/o).toFixed(9))),v=Math.asin(parseFloat(((n-_)/o).toFixed(9))),i<C&&(y=Math.PI-y),r<C&&(v=Math.PI-v),y<0&&(y=2*Math.PI+y),v<0&&(v=2*Math.PI+v),u&&y>v&&(y-=2*Math.PI),!u&&v>y&&(v-=2*Math.PI)}let k=v-y;if(Math.abs(k)>120*Math.PI/180){const K=v,z=r,G=n;v=u&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=g3(r=C+a*Math.cos(v),n=_+o*Math.sin(v),z,G,a,o,c,0,u,[v,K,C,_])}k=v-y;const T=Math.cos(y),E=Math.sin(y),A=Math.cos(v),B=Math.sin(v),L=Math.tan(k/4),N=4/3*a*L,M=4/3*o*L,I=[i,e],j=[i+N*E,e-M*T],P=[r+N*B,n-M*A],W=[r,n];if(j[0]=2*I[0]-j[0],j[1]=2*I[1]-j[1],d)return[j,P,W].concat(x);{x=[j,P,W].concat(x);const K=[];for(let z=0;z<x.length;z+=3){const G=Du(x[z][0],x[z][1],f),D=Du(x[z+1][0],x[z+1][1],f),F=Du(x[z+2][0],x[z+2][1],f);K.push([G[0],G[1],D[0],D[1],F[0],F[1]])}return K}}const _Z={randOffset:function(i,e){return be(i,e)},randOffsetWithRange:function(i,e,r){return Ug(i,e,r)},ellipse:function(i,e,r,n,a){const o=y3(r,n,a);return Xv(i,e,a,o).opset},doubleLineOps:function(i,e,r,n,a){return $o(i,e,r,n,a,!0)}};function m3(i,e,r,n,a){return{type:"path",ops:$o(i,e,r,n,a)}}function Jp(i,e,r){const n=(i||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...$o(i[o][0],i[o][1],i[o+1][0],i[o+1][1],r));return e&&a.push(...$o(i[n-1][0],i[n-1][1],i[0][0],i[0][1],r)),{type:"path",ops:a}}return n===2?m3(i[0][0],i[0][1],i[1][0],i[1][1],r):{type:"path",ops:[]}}function kZ(i,e,r,n,a){return(function(o,c){return Jp(o,!0,c)})([[i,e],[i+r,e],[i+r,e+n],[i,e+n]],a)}function jE(i,e){if(i.length){const r=typeof i[0][0]=="number"?[i]:i,n=Ep(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Ep(r[0],1.5*(1+.22*e.roughness),IE(e));for(let o=1;o<r.length;o++){const c=r[o];if(c.length){const h=Ep(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:Ep(c,1.5*(1+.22*e.roughness),IE(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 y3(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 Xv(i,e,r,n){const[a,o]=$E(n.increment,i,e,n.rx,n.ry,1,n.increment*Ug(.1,Ug(.4,1,r),r),r);let c=Hg(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[h]=$E(n.increment,i,e,n.rx,n.ry,1.5,0,r),u=Hg(h,null,r);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function DE(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 C=2*Math.PI/u.curveStepCount,_=Math.min(C/2,(v-y)/2),k=zE(_,d,f,g,x,y,v,1,u);if(!u.disableMultiStroke){const T=zE(_,d,f,g,x,y,v,1.5,u);k.push(...T)}return c&&(h?k.push(...$o(d,f,d+g*Math.cos(y),f+x*Math.sin(y),u),...$o(d,f,d+g*Math.cos(v),f+x*Math.sin(v),u)):k.push({op:"lineTo",data:[d,f]},{op:"lineTo",data:[d+g*Math.cos(y),f+x*Math.sin(y)]})),{type:"path",ops:k}}function FE(i,e){const r=p3(f3(GC(i))),n=[];let a=[0,0],o=[0,0];for(const{key:c,data:h}of r)switch(c){case"M":o=[h[0],h[1]],a=[h[0],h[1]];break;case"L":n.push(...$o(o[0],o[1],h[0],h[1],e)),o=[h[0],h[1]];break;case"C":{const[u,d,f,g,x,y]=h;n.push(...wZ(u,d,f,g,x,y,o,e)),o=[x,y];break}case"Z":n.push(...$o(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function f0(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 Bc(i,e){return(function(r,n){let a=r.fillStyle||"hachure";if(!gn[a])switch(a){case"zigzag":gn[a]||(gn[a]=new gZ(n));break;case"cross-hatch":gn[a]||(gn[a]=new mZ(n));break;case"dots":gn[a]||(gn[a]=new yZ(n));break;case"dashed":gn[a]||(gn[a]=new bZ(n));break;case"zigzag-line":gn[a]||(gn[a]=new xZ(n));break;default:a="hachure",gn[a]||(gn[a]=new WC(n))}return gn[a]})(e,_Z).fillPolygons(i,e)}function IE(i){const e=Object.assign({},i);return e.randomizer=void 0,i.seed&&(e.seed=i.seed+1),e}function b3(i){return i.randomizer||(i.randomizer=new vZ(i.seed||0)),i.randomizer.next()}function Ug(i,e,r,n=1){return r.roughness*n*(b3(r)*(e-i)+i)}function be(i,e,r=1){return Ug(-i,i,e,r)}function $o(i,e,r,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=Zv(i,e,r,n,a,!0,!1);if(c)return h;const u=Zv(i,e,r,n,a,!0,!0);return h.concat(u)}function Zv(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*b3(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?C.push({op:"move",data:[i+(T?0:_()),e+(T?0:_())]}):C.push({op:"move",data:[i+(T?0:be(f,a,d)),e+(T?0:be(f,a,d))]}),c?C.push({op:"bcurveTo",data:[y+i+(r-i)*x+_(),v+e+(n-e)*x+_(),y+i+2*(r-i)*x+_(),v+e+2*(n-e)*x+_(),r+(T?0:_()),n+(T?0:_())]}):C.push({op:"bcurveTo",data:[y+i+(r-i)*x+k(),v+e+(n-e)*x+k(),y+i+2*(r-i)*x+k(),v+e+2*(n-e)*x+k(),r+(T?0:k()),n+(T?0:k())]}),C}function Ep(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 Hg(n,null,r)}function Hg(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(...Zv(i[0][0],i[0][1],i[1][0],i[1][1],r,!0,!0));return a}function $E(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 zE(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)]),Hg(f,null,u)}function wZ(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 Fu(i){return[...i]}function PE(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(Fu(i[0]),Fu(i[1]),Fu(i[2]),Fu(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(Fu(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 tg(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)}function SZ(i,e,r){const n=tg(e,r);if(n===0)return tg(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)),tg(i,pl(e,r,a))}function pl(i,e,r){return[i[0]+(e[0]-i[0])*r,i[1]+(e[1]-i[1])*r]}function Qv(i,e,r,n){const a=n||[];if((function(h,u){const d=h[u+0],f=h[u+1],g=h[u+2],x=h[u+3];let y=3*f[0]-2*d[0]-x[0];y*=y;let v=3*f[1]-2*d[1]-x[1];v*=v;let C=3*g[0]-2*x[0]-d[0];C*=C;let _=3*g[1]-2*x[1]-d[1];return _*=_,y<C&&(y=C),v<_&&(v=_),y+v})(i,e)<r){const h=i[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(tg(o,c))>1&&a.push(h)):a.push(h),a.push(i[e+3])}else{const u=i[e+0],d=i[e+1],f=i[e+2],g=i[e+3],x=pl(u,d,.5),y=pl(d,f,.5),v=pl(f,g,.5),C=pl(x,y,.5),_=pl(y,v,.5),k=pl(C,_,.5);Qv([u,x,C,k],0,r,a),Qv([k,_,v,g],0,r,a)}var o,c;return a}function TZ(i,e){return Wg(i,0,i.length,e)}function Wg(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=SZ(i[f],c,h);g>u&&(u=g,d=f)}return Math.sqrt(u)>n?(Wg(i,e,d+1,n,o),Wg(i,d,r,n,o)):(o.length||o.push(c),o.push(h)),o}function p0(i,e=.15,r){const n=[],a=(i.length-1)/3;for(let o=0;o<a;o++)Qv(i,3*o,e,n);return r&&r>0?Wg(n,0,n.length,r):n}const Rn="none";class Gg{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",[m3(e,r,n,a,c)],c)}rectangle(e,r,n,a,o){const c=this._o(o),h=[],u=kZ(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(f0([d],c)):h.push(Bc([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=y3(n,a,c),d=Xv(e,r,c,u);if(c.fill)if(c.fillStyle==="solid"){const f=Xv(e,r,c,u).opset;f.type="fillPath",h.push(f)}else h.push(Bc([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",[Jp(e,!1,n)],n)}arc(e,r,n,a,o,c,h=!1,u){const d=this._o(u),f=[],g=DE(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=DE(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,A=y;let B=Math.abs(v/2),L=Math.abs(C/2);B+=be(.01*B,T),L+=be(.01*L,T);let N=_,M=k;for(;N<0;)N+=2*Math.PI,M+=2*Math.PI;M-N>2*Math.PI&&(N=0,M=2*Math.PI);const I=(M-N)/T.curveStepCount,j=[];for(let P=N;P<=M;P+=I)j.push([E+B*Math.cos(P),A+L*Math.sin(P)]);return j.push([E+B*Math.cos(M),A+L*Math.sin(M)]),j.push([E,A]),Bc([j],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=jE(e,n);if(n.fill&&n.fill!==Rn)if(n.fillStyle==="solid"){const c=jE(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(...p0(PE([d[0],d[0],d[1],d[2]]),10,(1+n.roughness)/2)):c.push(...p0(PE(d),10,(1+n.roughness)/2))}c.length&&a.push(Bc([c],n))}return n.stroke!==Rn&&a.push(o),this._d("curve",a,n)}polygon(e,r){const n=this._o(r),a=[],o=Jp(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(f0([e],n)):a.push(Bc([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=p3(f3(GC(f))),v=[];let C=[],_=[0,0],k=[];const T=()=>{k.length>=4&&C.push(...p0(k,g)),k=[]},E=()=>{T(),C.length&&(v.push(C),C=[])};for(const{key:B,data:L}of y)switch(B){case"M":E(),_=[L[0],L[1]],C.push(_);break;case"L":T(),C.push([L[0],L[1]]);break;case"C":if(!k.length){const N=C.length?C[C.length-1]:_;k.push([N[0],N[1]])}k.push([L[0],L[1]]),k.push([L[2],L[3]]),k.push([L[4],L[5]]);break;case"Z":T(),C.push([_[0],_[1]])}if(E(),!x)return v;const A=[];for(const B of v){const L=TZ(B,x);L.length&&A.push(L)}return A})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),d=FE(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const f=FE(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(f0(u,n));else a.push(Bc(u,n));return c&&(h?u.forEach((f=>{a.push(Jp(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 EZ{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Gg(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 Np="http://www.w3.org/2000/svg";class NZ{constructor(e,r){this.svg=e,this.gen=new Gg(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Np,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of r){let u=null;switch(h.type){case"path":u=a.createElementNS(Np,"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(Np,"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(Np,"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 Zt={canvas:(i,e)=>new EZ(i,e),svg:(i,e)=>new NZ(i,e),generator:i=>new Gg(i),newSeed:()=>Gg.newSeed()},me=O(async(i,e,r)=>{var y,v;let n;const a=e.useHtmlLabels||$s((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",wr(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 zs(c,ka(Pl(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 C=f.children[0],_=ue(f);await IR(C,h),g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height)}return a?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:x,label:c}},"labelHelper"),g0=O(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 zs(a,ka(Pl(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"),ie=O((i,e)=>{const r=e.node().getBBox();i.width=r.width,i.height=r.height},"updateNodeBounds"),de=O((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(" ")}O(Qe,"createPathFromPoints");function zo(i,e,r,n,a,o){const c=[],u=r-i,d=n-e,f=u/o,g=2*Math.PI/f,x=e+d/2;for(let y=0;y<=50;y++){const v=y/50,C=i+v*u,_=x+a*Math.sin(g*(C-i));c.push({x:C,y:_})}return c}O(zo,"generateFullSineWavePoints");function Md(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}O(Md,"generateCirclePoints");function Jv(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=O((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}O(Jv,"mergePaths");var AZ=O((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"),Ah=AZ,MZ=O(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 zs(i,o,{style:r,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Mo=MZ,Uo=O((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"),x3=O(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}=Jt(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 zs(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}):v=await Mo(y,e.label,e.labelStyle||"",!1,!0);let C=v.getBBox();if(nn(r)){const N=v.children[0],M=ue(v);C=N.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-_/2,E=e.y-k/2;Nt.trace("Data ",e,JSON.stringify(e));let A;if(e.look==="handDrawn"){const N=Zt.svg(g),M=Qt(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),I=N.path(Uo(T,E,_,k,0),M);A=g.insert(()=>(Nt.debug("Rough node insert CXC",I),I),":first-child"),A.select("path:nth-child(2)").attr("style",d.join(";")),A.select("path").attr("style",f.join(";").replace("fill","stroke"))}else A=g.insert("rect",":first-child"),A.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",E).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:B}=RC(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+B})`),h){const N=y.select("span");N&&N.attr("style",h)}const L=A.node().getBBox();return e.offsetX=0,e.width=L.width,e.height=L.height,e.offsetY=C.height-e.padding/2,e.intersect=function(N){return Ah(e,N)},{cluster:g,labelBBox:C}},"rect"),BZ=O((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 Ah(e,h)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),LZ=O(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 Mo(g,e.label,e.labelStyle,void 0,!0);let v=y.getBBox();if(nn(r)){const I=y.children[0],j=ue(y);v=I.getBoundingClientRect(),j.attr("width",v.width),j.attr("height",v.height)}const C=0*e.padding,_=C/2,k=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+C;e.width<=v.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+C,E=e.height+C-v.height-6,A=e.x-k/2,B=e.y-T/2;e.width=k;const L=e.y-e.height/2-_+v.height+2;let N;if(e.look==="handDrawn"){const I=e.cssClasses.includes("statediagram-cluster-alt"),j=Zt.svg(d),P=e.rx||e.ry?j.path(Uo(A,B,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):j.rectangle(A,B,k,T,{seed:a});N=d.insert(()=>P,":first-child");const W=j.rectangle(A,L,k,E,{fill:I?o:c,fillStyle:I?"hachure":"solid",stroke:u,seed:a});N=d.insert(()=>P,":first-child"),x=d.insert(()=>W)}else N=f.insert("rect",":first-child"),N.attr("class","outer").attr("x",A).attr("y",B).attr("width",k).attr("height",T).attr("data-look",e.look),x.attr("class","inner").attr("x",A).attr("y",L).attr("width",k).attr("height",E);g.attr("transform",`translate(${e.x-v.width/2}, ${B+1-(nn(r)?0:3)})`);const M=N.node().getBBox();return e.height=M.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(I){return Ah(e,I)},{cluster:d,labelBBox:v}},"roundedWithTitle"),OZ=O(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}=Jt(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 zs(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let C=v.getBBox();if(nn(r)){const N=v.children[0],M=ue(v);C=N.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-_/2,E=e.y-k/2;Nt.trace("Data ",e,JSON.stringify(e));let A;if(e.look==="handDrawn"){const N=Zt.svg(g),M=Qt(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),I=N.path(Uo(T,E,_,k,e.rx),M);A=g.insert(()=>(Nt.debug("Rough node insert CXC",I),I),":first-child"),A.select("path:nth-child(2)").attr("style",d.join(";")),A.select("path").attr("style",f.join(";").replace("fill","stroke"))}else A=g.insert("rect",":first-child"),A.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",E).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:B}=RC(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+B})`),h){const N=y.select("span");N&&N.attr("style",h)}const L=A.node().getBBox();return e.offsetX=0,e.width=L.width,e.height=L.height,e.offsetY=C.height-e.padding/2,e.intersect=function(N){return Ah(e,N)},{cluster:g,labelBBox:C}},"kanbanSection"),RZ=O((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 _=Zt.svg(c).rectangle(g,x,d,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});y=c.insert(()=>_,":first-child")}else{y=h.insert("rect",":first-child");let C="outer";e.look,C="divider",y.attr("class",C).attr("x",g).attr("y",x).attr("width",d).attr("height",f).attr("data-look",e.look)}const v=y.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(C){return Ah(e,C)},{cluster:c,labelBBox:{}}},"divider"),jZ=x3,DZ={rect:x3,squareRect:jZ,roundedWithTitle:LZ,noteGroup:BZ,divider:RZ,kanbanSection:OZ},v3=new Map,FZ=O(async(i,e)=>{const r=e.shape||"rect",n=await DZ[r](i,e);return v3.set(e.id,n),n},"insertCluster"),nlt=O(()=>{v3=new Map},"clear");function C3(i,e){return i.intersect(e)}O(C3,"intersectNode");var IZ=C3;function _3(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}}O(_3,"intersectEllipse");var k3=_3;function w3(i,e,r){return k3(i,e,e,r)}O(w3,"intersectCircle");var $Z=w3;function S3(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&&t1(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&&t1(y,v))return;const C=a*g-f*o;if(C===0)return;const _=Math.abs(C/2);let k=o*x-g*c;const T=k<0?(k-_)/C:(k+_)/C;k=f*c-a*x;const E=k<0?(k-_)/C:(k+_)/C;return{x:T,y:E}}}O(S3,"intersectLine");function t1(i,e){return i*e>0}O(t1,"sameSign");var zZ=S3;function T3(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=zZ(i,r,{x:u+g.x,y:d+g.y},{x:u+x.x,y:d+x.y});y&&o.push(y)}return o.length?(o.length>1&&o.sort(function(f,g){let x=f.x-r.x,y=f.y-r.y,v=Math.sqrt(x*x+y*y),C=g.x-r.x,_=g.y-r.y,k=Math.sqrt(C*C+_*_);return v<k?-1:v===k?0:1}),o[0]):i}O(T3,"intersectPolygon");var PZ=T3,Yt={node:IZ,circle:$Z,ellipse:k3,polygon:PZ,rect:Ah};function E3(i,e){const{labelStyles:r}=Jt(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=Zt.svg(o),d=Qt(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",wr(h)),ie(e,g),e.intersect=function(x){return Nt.info("Circle intersect",e,c,x),Yt.circle(e,c,x)},o}O(E3,"anchor");function e1(i,e,r,n,a,o,c){const u=(i+r)/2,d=(e+n)/2,f=Math.atan2(n-e,r-i),g=(r-i)/2,x=(n-e)/2,y=g/a,v=x/o,C=Math.sqrt(y**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const _=Math.sqrt(1-C**2),k=u+_*o*Math.sin(f)*(c?-1:1),T=d-_*a*Math.cos(f)*(c?-1:1),E=Math.atan2((e-T)/o,(i-k)/a);let 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 L=[];for(let N=0;N<20;N++){const M=N/19,I=E+M*B,j=k+a*Math.cos(I),P=T+o*Math.sin(I);L.push({x:j,y:P})}return L}O(e1,"generateArcPoints");function N3(i,e,r){const[n,a]=[e,r].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(i/n/2)**2))}O(N3,"calculateArcSagitta");async function A3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=O(I=>I+c,"calcTotalHeight"),u=O(I=>{const j=I/2;return[j/(2.5+I/50),j]},"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=N3(g,x,y),_=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+v-v,k=g,{cssStyles:T}=e,E=[{x:_/2,y:-k/2},{x:-_/2,y:-k/2},...e1(-_/2,-k/2,-_/2,k/2,x,y,!1),{x:_/2,y:k/2},...e1(_/2,k/2,_/2,-k/2,x,y,!0)],A=Zt.svg(d),B=Qt(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=Qe(E),N=A.path(L,B),M=d.insert(()=>N,":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)`),ie(e,M),e.intersect=function(I){return Yt.polygon(e,E,I)},d}O(A3,"bowTieRect");function Ps(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+")")}O(Ps,"insertPolygonShape");var Ap=12;async function M3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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+Ap),f=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,x=d,y=-f,v=0,C=[{x:g+Ap,y},{x,y},{x,y:v},{x:g,y:v},{x:g,y:y+Ap},{x:g+Ap,y}];let _;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=Zt.svg(h),E=Qt(e,{}),A=Qe(C),B=T.path(A,E);_=h.insert(()=>B,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),k&&_.attr("style",k)}else _=Ps(h,d,f,C);return n&&_.attr("style",n),ie(e,_),e.intersect=function(T){return Yt.polygon(e,C,T)},h}O(M3,"card");function B3(i,e){const{nodeStyles:r}=Jt(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=Zt.svg(n),u=Qt(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}O(B3,"choice");async function YC(i,e,r){const{labelStyles:n,nodeStyles:a}=Jt(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=Zt.svg(o),v=Qt(e,{}),C=y.circle(0,0,f*2,v);g=o.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",wr(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 ie(e,g),e.calcIntersect=function(y,v){const C=y.width/2;return Yt.circle(y,C,v)},e.intersect=function(y){return Nt.info("Circle intersect",e,f,y),Yt.circle(e,f,y)},o}O(YC,"circle");function L3(i){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=i*2,a={x:n/2*e,y:n/2*r},o={x:-(n/2)*e,y:n/2*r},c={x:-(n/2)*e,y:-(n/2)*r},h={x:n/2*e,y:-(n/2)*r};return`M ${o.x},${o.y} L ${h.x},${h.y}
|
|
378
|
+
M ${a.x},${a.y} L ${c.x},${c.y}`}O(L3,"createLine");function O3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(a),u=Qt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,o*2,u),f=L3(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),ie(e,x),e.intersect=function(y){return Nt.info("crossedCircle intersect",e,{radius:o,point:y}),Yt.circle(e,o,y)},a}O(O3,"crossedCircle");function _s(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*f,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}O(_s,"generateCirclePoints");async function R3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=[..._s(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},..._s(d/2+g*2,-g,g,20,-180,-270),..._s(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},..._s(d/2,f/2,g,20,0,90)],v=[{x:d/2,y:-f/2-g},{x:-d/2,y:-f/2-g},..._s(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},..._s(d/2+d*.1,-g,g,20,-180,-270),..._s(d/2+d*.1,g,g,20,-90,-180),{x:-d/2-g,y:f/2},..._s(d/2,f/2,g,20,0,90),{x:-d/2,y:f/2+g},{x:d/2,y:f/2+g}],C=Zt.svg(a),_=Qt(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=Qe(y).replace("Z",""),E=C.path(T,_),A=Qe(v),B=C.path(A,{..._}),L=a.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>E,":first-child"),L.attr("class","text"),x&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.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))})`),ie(e,L),e.intersect=function(N){return Yt.polygon(e,v,N)},a}O(R3,"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}O(ks,"generateCirclePoints");async function j3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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}],C=Zt.svg(a),_=Qt(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=Qe(y).replace("Z",""),E=C.path(T,_),A=Qe(v),B=C.path(A,{..._}),L=a.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>E,":first-child"),L.attr("class","text"),x&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.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))})`),ie(e,L),e.intersect=function(N){return Yt.polygon(e,v,N)},a}O(j3,"curlyBraceRight");function Or(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}O(Or,"generateCirclePoints");async function D3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=[...Or(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},...Or(d/2+g*2,-g,g,20,-180,-270),...Or(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},...Or(d/2,f/2,g,20,0,90)],v=[...Or(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Or(-d/2-g/2,-g,g,20,0,90),...Or(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Or(-d/2+g+g/2,f/2,g,30,-180,-270)],C=[{x:d/2,y:-f/2-g},{x:-d/2,y:-f/2-g},...Or(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},...Or(d/2+g*2,-g,g,20,-180,-270),...Or(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:f/2},...Or(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},...Or(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Or(-d/2-g/2,-g,g,20,0,90),...Or(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Or(-d/2+g+g/2,f/2,g,30,-180,-270)],_=Zt.svg(a),k=Qt(e,{fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=Qe(y).replace("Z",""),A=_.path(E,k),L=Qe(v).replace("Z",""),N=_.path(L,k),M=Qe(C),I=_.path(M,{...k}),j=a.insert("g",":first-child");return j.insert(()=>I,":first-child").attr("stroke-opacity",0),j.insert(()=>A,":first-child"),j.insert(()=>N,":first-child"),j.attr("class","text"),x&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),j.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))})`),ie(e,j),e.intersect=function(P){return Yt.polygon(e,C,P)},a}O(D3,"curlyBraces");async function F3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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,C=Zt.svg(d),_=Qt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=g,T=x,E=k-y,A=T/4,B=[{x:E,y:0},{x:A,y:0},{x:0,y:T/2},{x:A,y:T},{x:E,y:T},...Md(-E,-T/2,y,50,270,90)],L=Qe(B),N=C.path(L,_),M=d.insert(()=>N,":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})`),ie(e,M),e.intersect=function(I){return Yt.polygon(e,B,I)},d}O(F3,"curvedTrapezoid");var qZ=O((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"),UZ=O((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"),HZ=O((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),qE=8,UE=8;async function I3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?24:a,c=e.look==="neo"?24:a;if(e.width||e.height){const _=e.width??0;e.width=(e.width??0)-c,e.width<UE&&(e.width=UE);const T=_/2/(2.5+_/50);e.height=(e.height??0)-o-T*3,e.height<qE&&(e.height=qE)}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:C}=e;if(e.look==="handDrawn"){const _=Zt.svg(h),k=UZ(0,0,f,y,g,x),T=HZ(0,x,f,y,g,x),E=Qt(e,{}),A=_.path(k,E),B=_.path(T,Qt(e,{fill:"none"}));v=h.insert(()=>B,":first-child"),v=h.insert(()=>A,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const _=qZ(0,0,f,y,g,x);v=h.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",wr(C)).attr("style",n)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),ie(e,v),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(_){const k=Yt.rect(e,_),T=k.x-(e.x??0);if(g!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(k.y-(e.y??0))>(e.height??0)/2-x)){let E=x*x*(1-T*T/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,_.y-(e.y??0)>0&&(E=-E),k.y+=E}return k},h}O(I3,"cylinder");async function $3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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,C=Zt.svg(c),_=Qt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],T=C.polygon(k.map(A=>[A.x,A.y]),_),E=c.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${x+(e.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(e.padding??0)/2-(h.y-(h.top??0))})`),ie(e,E),e.intersect=function(A){return Yt.rect(e,A)},c}O($3,"dividedRectangle");async function z3(i,e){var y,v;const{labelStyles:r,nodeStyles:n}=Jt(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 C=Zt.svg(h),_=Qt(e,{roughness:.2,strokeWidth:2.5}),k=Qt(e,{roughness:.2,strokeWidth:1.5}),T=C.circle(0,0,d*2,_),E=C.circle(0,0,f*2,k);g=h.insert("g",":first-child"),g.attr("class",wr(e.cssClasses)).attr("style",wr(x)),(y=g.node())==null||y.appendChild(T),(v=g.node())==null||v.appendChild(E)}else{g=h.insert("g",":first-child");const C=g.insert("circle",":first-child"),_=g.insert("circle");g.attr("class","basic label-container").attr("style",n),C.attr("class","outer-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0),_.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return ie(e,g),e.intersect=function(C){return Nt.info("DoubleCircle intersect",e,d,C),Yt.circle(e,d,C)},h}O(z3,"doublecircle");function P3(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=Jt(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=Zt.svg(o),{nodeBorder:d}=r,f=Qt(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),ie(e,x),e.intersect=function(y){return Nt.info("filledCircle intersect",e,{radius:c,point:y}),Yt.circle(e,c,y)},o}O(P3,"filledCircle");var HE=10,WE=10;async function q3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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<HE&&(e.height=HE),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<WE&&(e.width=WE));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=Zt.svg(c),C=Qt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=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,ie(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}O(q3,"flippedTriangle");function U3(i,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=Jt(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=Zt.svg(c),y=Qt(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=x.rectangle(f,g,u,d,y),C=c.insert(()=>v,":first-child");h&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",h),o&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",o),ie(e,C);const _=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=_/2||0,e.height+=_/2||0),e.intersect=function(k){return Yt.rect(e,k)},c}O(U3,"forkJoin");async function H3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(u),C=Qt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-f/2,y:-g/2},{x:f/2-x,y:-g/2},...Md(-f/2+x,0,x,50,90,270),{x:f/2-x,y:g/2},{x:-f/2,y:g/2}],k=Qe(_),T=v.path(k,C),E=u.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),ie(e,E),e.intersect=function(A){return Nt.info("Pill intersect",e,{radius:x,point:A}),Yt.polygon(e,_,A)},u}O(H3,"halfRoundedRectangle");var WZ=O((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 W3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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,C=[{x:y,y:0},{x:v-y,y:0},{x:v,y:-x/2},{x:v-y,y:-x},{x:y,y:-x},{x:0,y:-x/2}];let _;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=Zt.svg(f),E=Qt(e,{}),A=WZ(0,0,v,x,y),B=T.path(A,E);_=f.insert(()=>B,":first-child").attr("transform",`translate(${-v/2}, ${x/2})`),k&&_.attr("style",k)}else _=Ps(f,v,x,C);return n&&_.attr("style",n),e.width=v,e.height=x,ie(e,_),e.intersect=function(T){return Yt.polygon(e,C,T)},f}O(W3,"hexagon");async function G3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(a),d=Qt(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})`),ie(e,y),e.intersect=function(v){return Nt.info("Pill intersect",e,{points:f}),Yt.polygon(e,f,v)},a}O(G3,"hourglass");async function Y3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Jt(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:C}=r,{stylesMap:_}=Nh(e),k=-v/2,T=-y/2,E=e.label?8:0,A=Zt.svg(d),B=Qt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=A.rectangle(k,T,v,y,B),N=Math.max(v,f.width),M=y+f.height+E,I=A.rectangle(-N/2,-M/2,N,M,{...B,fill:"transparent",stroke:"none"}),j=d.insert(()=>L,":first-child"),P=d.insert(()=>I);if(e.icon){const W=d.append("g");W.html(`<g>${await Xd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const K=W.node().getBBox(),z=K.width,G=K.height,D=K.x,F=K.y;W.attr("transform",`translate(${-z/2-D},${x?f.height/2+E/2-G/2-F:-f.height/2-E/2-G/2-F})`),W.attr("style",`color: ${_.get("stroke")??C};`)}return g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${x?-M/2:M/2-f.height})`),j.attr("transform",`translate(0,${x?f.height/2+E/2:-f.height/2-E/2})`),ie(e,P),e.intersect=function(W){if(Nt.info("iconSquare intersect",e,W),!e.label)return Yt.rect(e,W);const K=e.x??0,z=e.y??0,G=e.height??0;let D=[];return x?D=[{x:K-f.width/2,y:z-G/2},{x:K+f.width/2,y:z-G/2},{x:K+f.width/2,y:z-G/2+f.height+E},{x:K+v/2,y:z-G/2+f.height+E},{x:K+v/2,y:z+G/2},{x:K-v/2,y:z+G/2},{x:K-v/2,y:z-G/2+f.height+E},{x:K-f.width/2,y:z-G/2+f.height+E}]:D=[{x:K-v/2,y:z-G/2},{x:K+v/2,y:z-G/2},{x:K+v/2,y:z-G/2+y},{x:K+f.width/2,y:z-G/2+y},{x:K+f.width/2/2,y:z+G/2},{x:K-f.width/2,y:z+G/2},{x:K-f.width/2,y:z-G/2+y},{x:K-v/2,y:z-G/2+y}],Yt.polygon(e,D,W)},d}O(Y3,"icon");async function K3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Jt(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:C,mainBkg:_}=r,{stylesMap:k}=Nh(e),T=Zt.svg(d),E=Qt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const A=k.get("fill");E.stroke=A??_;const B=d.append("g");e.icon&&B.html(`<g>${await Xd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),N=L.width,M=L.height,I=L.x,j=L.y,P=Math.max(N,M)*Math.SQRT2+x*2,W=T.circle(0,0,P,E),K=Math.max(P,f.width),z=P+f.height+y,G=T.rectangle(-K/2,-z/2,K,z,{...E,fill:"transparent",stroke:"none"}),D=d.insert(()=>W,":first-child"),F=d.insert(()=>G);return B.attr("transform",`translate(${-N/2-I},${v?f.height/2+y/2-M/2-j:-f.height/2-y/2-M/2-j})`),B.attr("style",`color: ${k.get("stroke")??C};`),g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-z/2:z/2-f.height})`),D.attr("transform",`translate(0,${v?f.height/2+y/2:-f.height/2-y/2})`),ie(e,F),e.intersect=function(q){return Nt.info("iconSquare intersect",e,q),Yt.rect(e,q)},d}O(K3,"iconCircle");async function V3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Jt(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,C=h+g*2,{nodeBorder:_,mainBkg:k}=r,{stylesMap:T}=Nh(e),E=-C/2,A=-v/2,B=e.label?8:0,L=Zt.svg(d),N=Qt(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const M=T.get("fill");N.stroke=M??k;const I=L.path(Uo(E,A,C,v,5),N),j=Math.max(C,f.width),P=v+f.height+B,W=L.rectangle(-j/2,-P/2,j,P,{...N,fill:"transparent",stroke:"none"}),K=d.insert(()=>I,":first-child").attr("class","icon-shape2"),z=d.insert(()=>W);if(e.icon){const G=d.append("g");G.html(`<g>${await Xd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=G.node().getBBox(),F=D.width,q=D.height,X=D.x,nt=D.y;G.attr("transform",`translate(${-F/2-X},${y?f.height/2+B/2-q/2-nt:-f.height/2-B/2-q/2-nt})`),G.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-P/2:P/2-f.height})`),K.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),ie(e,z),e.intersect=function(G){if(Nt.info("iconSquare intersect",e,G),!e.label)return Yt.rect(e,G);const D=e.x??0,F=e.y??0,q=e.height??0;let X=[];return y?X=[{x:D-f.width/2,y:F-q/2},{x:D+f.width/2,y:F-q/2},{x:D+f.width/2,y:F-q/2+f.height+B},{x:D+C/2,y:F-q/2+f.height+B},{x:D+C/2,y:F+q/2},{x:D-C/2,y:F+q/2},{x:D-C/2,y:F-q/2+f.height+B},{x:D-f.width/2,y:F-q/2+f.height+B}]:X=[{x:D-C/2,y:F-q/2},{x:D+C/2,y:F-q/2},{x:D+C/2,y:F-q/2+v},{x:D+f.width/2,y:F-q/2+v},{x:D+f.width/2/2,y:F+q/2},{x:D-f.width/2,y:F+q/2},{x:D-f.width/2,y:F-q/2+v},{x:D-C/2,y:F-q/2+v}],Yt.polygon(e,X,G)},d}O(V3,"iconRounded");async function X3(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=Jt(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,C=h+g*2,{nodeBorder:_,mainBkg:k}=r,{stylesMap:T}=Nh(e),E=-C/2,A=-v/2,B=e.label?8:0,L=Zt.svg(d),N=Qt(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const M=T.get("fill");N.stroke=M??k;const I=L.path(Uo(E,A,C,v,.1),N),j=Math.max(C,f.width),P=v+f.height+B,W=L.rectangle(-j/2,-P/2,j,P,{...N,fill:"transparent",stroke:"none"}),K=d.insert(()=>I,":first-child"),z=d.insert(()=>W);if(e.icon){const G=d.append("g");G.html(`<g>${await Xd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=G.node().getBBox(),F=D.width,q=D.height,X=D.x,nt=D.y;G.attr("transform",`translate(${-F/2-X},${y?f.height/2+B/2-q/2-nt:-f.height/2-B/2-q/2-nt})`),G.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-P/2:P/2-f.height})`),K.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),ie(e,z),e.intersect=function(G){if(Nt.info("iconSquare intersect",e,G),!e.label)return Yt.rect(e,G);const D=e.x??0,F=e.y??0,q=e.height??0;let X=[];return y?X=[{x:D-f.width/2,y:F-q/2},{x:D+f.width/2,y:F-q/2},{x:D+f.width/2,y:F-q/2+f.height+B},{x:D+C/2,y:F-q/2+f.height+B},{x:D+C/2,y:F+q/2},{x:D-C/2,y:F+q/2},{x:D-C/2,y:F-q/2+f.height+B},{x:D-f.width/2,y:F-q/2+f.height+B}]:X=[{x:D-C/2,y:F-q/2},{x:D+C/2,y:F-q/2},{x:D+C/2,y:F-q/2+v},{x:D+f.width/2,y:F-q/2+v},{x:D+f.width/2/2,y:F+q/2},{x:D-f.width/2,y:F+q/2},{x:D-f.width/2,y:F-q/2+v},{x:D-C/2,y:F-q/2+v}],Yt.polygon(e,X,G)},d}O(X3,"iconSquare");async function Z3(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}=Jt(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",C=-d/2,_=-f/2,k=e.label?8:0,T=Zt.svg(g),E=Qt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const A=T.rectangle(C,_,d,f,E),B=Math.max(d,x.width),L=f+x.height+k,N=T.rectangle(-B/2,-L/2,B,L,{...E,fill:"none",stroke:"none"}),M=g.insert(()=>A,":first-child"),I=g.insert(()=>N);if(e.img){const j=g.append("image");j.attr("href",e.img),j.attr("width",d),j.attr("height",f),j.attr("preserveAspectRatio","none"),j.attr("transform",`translate(${-d/2},${v?L/2-f:-L/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})`),ie(e,I),e.intersect=function(j){if(Nt.info("iconSquare intersect",e,j),!e.label)return Yt.rect(e,j);const P=e.x??0,W=e.y??0,K=e.height??0;let z=[];return v?z=[{x:P-x.width/2,y:W-K/2},{x:P+x.width/2,y:W-K/2},{x:P+x.width/2,y:W-K/2+x.height+k},{x:P+d/2,y:W-K/2+x.height+k},{x:P+d/2,y:W+K/2},{x:P-d/2,y:W+K/2},{x:P-d/2,y:W-K/2+x.height+k},{x:P-x.width/2,y:W-K/2+x.height+k}]:z=[{x:P-d/2,y:W-K/2},{x:P+d/2,y:W-K/2},{x:P+d/2,y:W-K/2+f},{x:P+x.width/2,y:W-K/2+f},{x:P+x.width/2/2,y:W+K/2},{x:P-x.width/2,y:W+K/2},{x:P-x.width/2,y:W-K/2+f},{x:P-d/2,y:W-K/2+f}],Yt.polygon(e,z,j)},g}O(Z3,"imageSquare");async function Q3(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(h),C=Qt(e,{}),_=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=Ps(h,d,f,g);return n&&x.attr("style",n),e.width=d,e.height=f,ie(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}O(Q3,"inv_trapezoid");async function Qd(i,e,r){const{labelStyles:n,nodeStyles:a}=Jt(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 C=Zt.svg(o),_=Qt(e,{}),k=x||y?C.path(Uo(d,f,h,u,x||0),_):C.rectangle(d,f,h,u,_);g=o.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",wr(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",wr(x)).attr("ry",wr(y)).attr("x",d).attr("y",f).attr("width",h).attr("height",u);return ie(e,g),e.calcIntersect=function(C,_){return Yt.rect(C,_)},e.intersect=function(C){return Yt.rect(e,C)},o}O(Qd,"drawRect");async function J3(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))})`),ie(e,o),e.intersect=function(u){return Yt.rect(e,u)},r}O(J3,"labelRect");async function t5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(h),C=Qt(e,{}),_=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=Ps(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,ie(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}O(t5,"lean_left");async function e5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(h),C=Qt(e,{}),_=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=Ps(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,ie(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}O(e5,"lean_right");function i5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(a),g=Qt(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})`),ie(e,v),e.intersect=function(C){return Nt.info("lightningBolt intersect",e,C),Yt.polygon(e,d,C)},a}O(i5,"lightningBolt");var GZ=O((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"),YZ=O((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"),KZ=O((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),GE=10,YE=10;async function r5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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<YE&&(e.width=YE);const E=k/2/(2.5+k/50);e.height=(e.height??0)-c-E*3,e.height<GE&&(e.height=GE)}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 C;const{cssStyles:_}=e;if(e.look==="handDrawn"){const k=Zt.svg(h),T=YZ(0,0,f,y,g,x,v),E=KZ(0,x,f,y,g,x),A=Qt(e,{}),B=k.path(T,A),L=k.path(E,A);h.insert(()=>L,":first-child").attr("class","line"),C=h.insert(()=>B,":first-child"),C.attr("class","basic label-container"),_&&C.attr("style",_)}else{const k=GZ(0,0,f,y,g,x,v);C=h.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",wr(_)).attr("style",n)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),ie(e,C),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),e.intersect=function(k){const T=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 A=x*x*(1-E*E/(g*g));A>0&&(A=Math.sqrt(A)),A=x-A,k.y-(e.y??0)>0&&(A=-A),T.y+=A}return T},h}O(r5,"linedCylinder");async function n5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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 A=e.width;e.width=(A??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,C=Zt.svg(h),_=Qt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:-f/2-f/2*.1,y:-y/2},{x:-f/2-f/2*.1,y:y/2},...zo(-f/2-f/2*.1,y/2,f/2+f/2*.1,y/2,x,.8),{x:f/2+f/2*.1,y:-y/2},{x:-f/2-f/2*.1,y:-y/2},{x:-f/2,y:-y/2},{x:-f/2,y:y/2*1.1},{x:-f/2,y:-y/2}],T=C.polygon(k.map(A=>[A.x,A.y]),_),E=h.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-x/2})`),d.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*.1/2-(u.x-(u.left??0))},${-g/2+(e.padding??0)-x/2-(u.y-(u.top??0))})`),ie(e,E),e.intersect=function(A){return Yt.polygon(e,k,A)},h}O(n5,"linedWaveEdgedRect");async function a5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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,C=-y/2,_=-v/2,{cssStyles:k}=e,T=Zt.svg(u),E=Qt(e,{}),A=[{x:C-h,y:_+h},{x:C-h,y:_+v+h},{x:C+y-h,y:_+v+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_+v-h},{x:C+y+h,y:_+v-h},{x:C+y+h,y:_-h},{x:C+h,y:_-h},{x:C+h,y:_},{x:C,y:_},{x:C,y:_+h}],B=[{x:C,y:_+h},{x:C+y-h,y:_+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_},{x:C,y:_}];e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const L=Qe(A);let N=T.path(L,E);const M=Qe(B);let I=T.path(M,E);e.look!=="handDrawn"&&(N=Jv(N),I=Jv(I));const j=u.insert("g",":first-child");return j.insert(()=>N),j.insert(()=>I),j.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",k),n&&e.look!=="handDrawn"&&j.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))})`),ie(e,j),e.intersect=function(P){return Yt.polygon(e,A,P)},u}O(a5,"multiRect");async function s5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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),C=-g/2,_=-v/2,k=10,{cssStyles:T}=e,E=zo(C-k,_+v+k,C+g-k,_+v+k,y,.8),A=E==null?void 0:E[E.length-1],B=[{x:C-k,y:_+k},{x:C-k,y:_+v+k},...E,{x:C+g-k,y:A.y-k},{x:C+g,y:A.y-k},{x:C+g,y:A.y-2*k},{x:C+g+k,y:A.y-2*k},{x:C+g+k,y:_-k},{x:C+k,y:_-k},{x:C+k,y:_},{x:C,y:_},{x:C,y:_+k}],L=[{x:C,y:_+k},{x:C+g-k,y:_+k},{x:C+g-k,y:A.y-k},{x:C+g,y:A.y-k},{x:C+g,y:_},{x:C,y:_}],N=Zt.svg(a),M=Qt(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const I=Qe(B),j=N.path(I,M),P=Qe(L),W=N.path(P,M),K=a.insert(()=>j,":first-child");return K.insert(()=>W),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))})`),ie(e,K),e.intersect=function(z){return Yt.polygon(e,B,z)},a}O(s5,"multiWaveEdgedRectangle");async function o5(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=Jt(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=Zt.svg(c),C=Qt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=v.rectangle(g,x,d,f,C),k=c.insert(()=>_,":first-child");return k.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),y&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",y),a&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",a),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ie(e,k),e.intersect=function(T){return Yt.rect(e,T)},c}O(o5,"note");var VZ=O((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 l5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(a),v=Qt(e,{}),C=VZ(0,0,u),_=y.path(C,v);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),x&&g.attr("style",x)}else g=Ps(a,u,u,f),g.attr("transform",`translate(${-u/2+d}, ${u/2})`);return n&&g.attr("style",n),ie(e,g),e.calcIntersect=function(y,v){const C=y.width,_=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],k=Yt.polygon(y,_,v);return{x:k.x-.5,y:k.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}O(l5,"question");async function c5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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,C=[{x:x+v,y},{x,y:0},{x:x+v,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:_}=e,k=Zt.svg(h),T=Qt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=Qe(C),A=k.path(E,T),B=h.insert(()=>A,":first-child");return B.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${-v/2},0)`),d.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),ie(e,B),e.intersect=function(L){return Yt.polygon(e,C,L)},h}O(c5,"rect_left_inv_arrow");async function h5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const o=i.insert("g").attr("class",a).attr("id",e.domId||e.id),c=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",n),u=e.description,d=e.label,f=await Mo(h,d,e.labelStyle,!0,!0);let g={width:0,height:0};if(nn(ii())){const M=f.children[0],I=ue(f);g=M.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}Nt.info("Text 2",u);const x=u||[],y=f.getBBox(),v=await Mo(h,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),C=v.children[0],_=ue(v);g=C.getBoundingClientRect(),_.attr("width",g.width),_.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),A=-g.width/2-k,B=-g.height/2-k;let L,N;if(e.look==="handDrawn"){const M=Zt.svg(o),I=Qt(e,{}),j=M.path(Uo(A,B,T,E,e.rx||0),I),P=M.line(-g.width/2-k,-g.height/2-k+y.height+k,g.width/2+k,-g.height/2-k+y.height+k,I);N=o.insert(()=>(Nt.debug("Rough node insert CXC",j),P),":first-child"),L=o.insert(()=>(Nt.debug("Rough node insert CXC",j),j),":first-child")}else L=c.insert("rect",":first-child"),N=c.insert("line"),L.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)),N.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 ie(e,L),e.intersect=function(M){return Yt.rect(e,M)},o}O(h5,"rectWithTitle");async function u5(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 Qd(i,e,a)}O(u5,"roundedRect");var hl=8;async function d5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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"?hl:hl*2),f=((e==null?void 0:e.height)??h.height)+o*2,g=d-hl,x=f,y=hl-d/2,v=-f/2,{cssStyles:C}=e,_=Zt.svg(c),k=Qt(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x:y,y:v},{x:y+g,y:v},{x:y+g,y:v+x},{x:y-hl,y:v+x},{x:y-hl,y:v},{x:y,y:v},{x:y,y:v+x}],E=_.polygon(T.map(B=>[B.x,B.y]),k),A=c.insert(()=>E,":first-child");return A.attr("class","basic label-container outer-path").attr("style",wr(C)),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),C&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),u.attr("transform",`translate(${hl/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ie(e,A),e.intersect=function(B){return Yt.rect(e,B)},c}O(d5,"shadedProcess");async function f5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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,C=-y/2,{cssStyles:_}=e,k=Zt.svg(h),T=Qt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=[{x:v,y:C},{x:v,y:C+y},{x:v+x,y:C+y},{x:v+x,y:C-y/2}],A=Qe(E),B=k.path(A,T),L=h.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&L.selectChildren("path").attr("style",_),n&&e.look!=="handDrawn"&&L.selectChildren("path").attr("style",n),L.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))})`),ie(e,L),e.intersect=function(N){return Yt.polygon(e,E,N)},h}O(f5,"slopedRect");async function p5(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 Qd(i,e,o)}O(p5,"squareRect");async function g5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(h),v=Qt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-f/2+g,y:-d/2},{x:f/2-g,y:-d/2},...Md(-f/2+g,0,g,50,90,270),{x:f/2-g,y:d/2},...Md(f/2-g,0,g,50,270,450)],_=Qe(C),k=y.path(_,v),T=h.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",x),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),ie(e,T),e.intersect=function(E){return Yt.polygon(e,C,E)},h}O(g5,"stadium");async function m5(i,e){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Qd(i,e,r)}O(m5,"state");function y5(i,e,{config:{themeVariables:r}}){var T,E;const{labelStyles:n,nodeStyles:a}=Jt(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=Zt.svg(f),x=Qt(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),v=h??u,C=(e.width??0)*5/14,_=g.circle(0,0,C,{...x,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),k=f.insert(()=>y,":first-child");if(k.insert(()=>_),e.look!=="handDrawn"&&k.attr("class","outer-path"),o&&k.selectAll("path").attr("style",o),a&&k.selectAll("path").attr("style",a),e.width<25&&d&&e.look!=="handDrawn"){const A=((E=(T=i.node())==null?void 0:T.ownerSVGElement)==null?void 0:E.id)??"",B=A?`${A}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${B})`)}return ie(e,k),e.intersect=function(A){return Yt.circle(e,(e.width??0)/2,A)},f}O(y5,"stateEnd");function b5(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=Zt.svg(o).circle(0,0,e.width,nX(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 ie(e,c),e.intersect=function(d){return Yt.circle(e,(e.width??7)/2,d)},o}O(b5,"stateStart");var Lc=8;async function x5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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*Lc+o,f=((e==null?void 0:e.height)??u.height)+c,g=d-2*Lc,x=f,y=-d/2,v=-f/2,C=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){const _=Zt.svg(h),k=Qt(e,{}),T=_.rectangle(y,v,g+16,x,k),E=_.line(y+Lc,v,y+Lc,v+x,k),A=_.line(y+Lc+g,v,y+Lc+g,v+x,k);h.insert(()=>E,":first-child"),h.insert(()=>A,":first-child");const B=h.insert(()=>T,":first-child"),{cssStyles:L}=e;B.attr("class","basic label-container").attr("style",wr(L)),ie(e,B)}else{const _=Ps(h,g,x,C);n&&_.attr("style",n),ie(e,_)}return e.intersect=function(_){return Yt.polygon(e,C,_)},h}O(x5,"subroutine");var m0=.2;async function v5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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-m0*(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=m0*d,g=m0*d,y=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2+f-f,v=d,C=-y/2,_=-v/2,{cssStyles:k}=e,T=Zt.svg(h),E=Qt(e,{}),A=[{x:C-f/2,y:_},{x:C+y+f/2,y:_},{x:C+y+f/2,y:_+v},{x:C-f/2,y:_+v}],B=[{x:C+y-f/2,y:_+v},{x:C+y+f/2,y:_+v},{x:C+y+f/2,y:_+v-g}];e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const L=Qe(A),N=T.path(L,E),M=Qe(B),I=T.path(M,{...E,fillStyle:"solid"}),j=h.insert(()=>I,":first-child");return j.insert(()=>N,":first-child"),j.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",k),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),ie(e,j),e.intersect=function(P){return Yt.polygon(e,A,P)},h}O(v5,"taggedRect");async function C5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(a),C=Qt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-h/2-h/2*.1,y:x/2},...zo(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,d,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],k=-h/2+h/2*.1,T=-x/2-g*.4,E=[{x:k+h-f,y:(T+u)*1.3},{x:k+h,y:T+u-g},{x:k+h,y:(T+u)*.9},...zo(k+h,(T+u)*1.25,k+h-f,(T+u)*1.3,-u*.02,.5)],A=Qe(_),B=v.path(A,C),L=Qe(E),N=v.path(L,{...C,fillStyle:"solid"}),M=a.insert(()=>N,":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))})`),ie(e,M),e.intersect=function(I){return Yt.polygon(e,_,I)},a}O(C5,"taggedWaveEdgedRectangle");async function _5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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),ie(e,f),e.intersect=function(g){return Yt.rect(e,g)},a}O(_5,"text");var XZ=O((i,e,r,n,a,o)=>`M${i},${e}
|
|
379
|
+
a${a},${o} 0,0,1 0,${-n}
|
|
380
|
+
l${r},0
|
|
381
|
+
a${a},${o} 0,0,1 0,${n}
|
|
382
|
+
M${r},${-n}
|
|
383
|
+
a${a},${o} 0,0,0 0,${n}
|
|
384
|
+
l${-r},0`,"createCylinderPathD"),ZZ=O((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"),QZ=O((i,e,r,n,a,o)=>[`M${i+r/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),KE=5,VE=10;async function k5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?12:a/2;if(e.width||e.height){const C=e.height??0;e.height=(e.height??0)-o,e.height<KE&&(e.height=KE);const k=C/2/(2.5+C/50);e.width=(e.width??0)-o-k*3,e.width<VE&&(e.width=VE)}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 C=Zt.svg(c),_=ZZ(0,0,x,d,g,f),k=QZ(0,0,x,d,g,f),T=C.path(_,Qt(e,{})),E=C.path(k,Qt(e,{fill:"none"}));v=c.insert(()=>E,":first-child"),v=c.insert(()=>T,":first-child"),v.attr("class","basic label-container"),y&&v.attr("style",y)}else{const C=XZ(0,0,x,d,g,f);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",wr(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))})`),ie(e,v),e.intersect=function(C){const _=Yt.rect(e,C),k=_.y-(e.y??0);if(f!=0&&(Math.abs(k)<(e.height??0)/2||Math.abs(k)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-g)){let T=g*g*(1-k*k/(f*f));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,C.x-(e.x??0)>0&&(T=-T),_.x+=T}return _},c}O(k5,"tiltedCylinder");async function w5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(h),C=Qt(e,{}),_=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=Ps(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,ie(e,x),e.intersect=function(v){return Yt.polygon(e,g,v)},h}O(w5,"trapezoid");async function S5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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=Zt.svg(d),C=Qt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-g/2*.8,y:-x/2},{x:g/2*.8,y:-x/2},{x:g/2,y:-x/2*.6},{x:g/2,y:x/2},{x:-g/2,y:x/2},{x:-g/2,y:-x/2*.6}],k=Qe(_),T=v.path(k,C),E=d.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),ie(e,E),e.intersect=function(A){return Yt.polygon(e,_,A)},d}O(S5,"trapezoidalPentagon");var XE=10,ZE=10;async function T5(i,e){var A;const{labelStyles:r,nodeStyles:n}=Jt(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<ZE&&(e.width=ZE),e.height=(e==null?void 0:e.height)??0,e.height<XE&&(e.height=XE));const{shapeSvg:c,bbox:h,label:u}=await me(i,e,de(e)),d=$s((A=ii().flowchart)==null?void 0:A.htmlLabels),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+o,g=e!=null&&e.height?e==null?void 0:e.height:f+h.height,x=g,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:v}=e,C=Zt.svg(c),_=Qt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=Qe(y),T=C.path(k,_),E=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),e.width=f,e.height=g,ie(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}O(T5,"triangle");async function E5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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:C}=e,k=14-g,T=k>0?k/2:0,E=Zt.svg(u),A=Qt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const B=[{x:-g/2-T,y:v/2},...zo(-g/2-T,v/2,g/2+T,v/2,y,.8),{x:g/2+T,y:-v/2},{x:-g/2-T,y:-v/2}],L=Qe(B),N=E.path(L,A),M=u.insert(()=>N,":first-child");return M.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(0,${-y/2})`),f.attr("transform",`translate(${-g/2+(e.padding??0)-(d.x-(d.left??0))},${-x/2+(e.padding??0)-y-(d.y-(d.top??0))})`),ie(e,M),e.intersect=function(I){return Yt.polygon(e,B,I)},u}O(E5,"waveEdgedRectangle");async function N5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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 A=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-A*(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=Zt.svg(h),C=Qt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-d/2,y:x/2},...zo(-d/2,x/2,d/2,x/2,g,1),{x:d/2,y:-x/2},...zo(d/2,-x/2,-d/2,-x/2,g,-1)],k=Qe(_),T=v.path(k,C),E=h.insert(()=>T,":first-child");return E.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),ie(e,E),e.intersect=function(A){return Yt.polygon(e,_,A)},h}O(N5,"waveRectangle");var Vi=10;async function A5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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-Vi,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-Vi,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+Vi,f=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+Vi,g=d-Vi,x=f-Vi,y=-g/2,v=-x/2,{cssStyles:C}=e,_=Zt.svg(c),k=Qt(e,{}),T=[{x:y-Vi,y:v-Vi},{x:y-Vi,y:v+x},{x:y+g,y:v+x},{x:y+g,y:v-Vi}],E=`M${y-Vi},${v-Vi} L${y+g},${v-Vi} L${y+g},${v+x} L${y-Vi},${v+x} L${y-Vi},${v-Vi}
|
|
385
|
+
M${y-Vi},${v} L${y+g},${v}
|
|
386
|
+
M${y},${v-Vi} L${y},${v+x}`;e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const A=_.path(E,k),B=c.insert(()=>A,":first-child");return B.attr("transform",`translate(${Vi/2}, ${Vi/2})`),B.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+Vi/2-(h.x-(h.left??0))}, ${-(h.height/2)+Vi/2-(h.y-(h.top??0))})`),ie(e,B),e.intersect=function(L){return Yt.polygon(e,T,L)},c}O(A5,"windowPane");var QE=new Set(["redux-color","redux-dark-color"]),JZ=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function KC(i,e){var ct,Z,Q,tt;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:Ct}=ot,At={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await KC(i,At)}const d=qi();e.useHtmlLabels=d.htmlLabels;let f=((ct=d.er)==null?void 0:ct.diagramPadding)??10,g=((Z=d.er)==null?void 0:Z.entityPadding)??6;const{cssStyles:x}=e,{labelStyles:y,nodeStyles:v}=Jt(e);if(r.attributes.length===0&&e.label){const ot={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5};Fs(e.label,d)+ot.labelPaddingX*2<d.er.minEntityWidth&&(e.width=d.er.minEntityWidth);const Ct=await Qd(i,e,ot);if(n!=null&&QE.has(n)){const At=r.colorIndex??0;Ct.attr("data-color-id",`color-${At%u.length}`)}if(!$s(d.htmlLabels)){const At=Ct.select("text"),Dt=(Q=At.node())==null?void 0:Q.getBBox();At.attr("transform",`translate(${-Dt.width/2}, 0)`)}return Ct}d.htmlLabels||(f*=1.25,g*=1.25);let C=de(e);C||(C="node default");const _=i.insert("g").attr("class",C).attr("id",e.domId||e.id),k=await Dc(_,e.label??"",d,0,0,["name"],y);k.height+=g;let T=0;const E=[],A=[];let B=0,L=0,N=0,M=0,I=!0,j=!0;for(const ot of r.attributes){const Ct=await Dc(_,ot.type,d,0,T,["attribute-type"],y);B=Math.max(B,Ct.width+f);const At=await Dc(_,ot.name,d,0,T,["attribute-name"],y);L=Math.max(L,At.width+f);const Dt=await Dc(_,ot.keys.join(),d,0,T,["attribute-keys"],y);N=Math.max(N,Dt.width+f);const qt=await Dc(_,ot.comment,d,0,T,["attribute-comment"],y);M=Math.max(M,qt.width+f);const Rt=Math.max(Ct.height,At.height,Dt.height,qt.height)+g;A.push({yOffset:T,rowHeight:Rt}),T+=Rt}let P=4;N<=f&&(I=!1,N=0,P--),M<=f&&(j=!1,M=0,P--);const W=_.node().getBBox();if(k.width+f*2-(B+L+N+M)>0){const ot=k.width+f*2-(B+L+N+M);B+=ot/P,L+=ot/P,N>0&&(N+=ot/P),M>0&&(M+=ot/P)}const K=B+L+N+M,z=Zt.svg(_),G=Qt(e,{});e.look!=="handDrawn"&&(G.roughness=0,G.fillStyle="solid");let D=0;A.length>0&&(D=A.reduce((ot,Ct)=>ot+((Ct==null?void 0:Ct.rowHeight)??0),0));const F=Math.max(W.width+f*2,(e==null?void 0:e.width)||0,K),q=Math.max((D??0)+k.height,(e==null?void 0:e.height)||0),X=-F/2,nt=-q/2;if(_.selectAll("g:not(:first-child)").each((ot,Ct,At)=>{const Dt=ue(At[Ct]),qt=Dt.attr("transform");let Rt=0,Gt=0;if(qt){const ye=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(qt);ye&&(Rt=parseFloat(ye[1]),Gt=parseFloat(ye[2]),Dt.attr("class").includes("attribute-name")?Rt+=B:Dt.attr("class").includes("attribute-keys")?Rt+=B+L:Dt.attr("class").includes("attribute-comment")&&(Rt+=B+L+N))}Dt.attr("transform",`translate(${X+f/2+Rt}, ${Gt+nt+k.height+g/2})`)}),_.select(".name").attr("transform","translate("+-k.width/2+", "+(nt+g/2)+")"),n!=null&&QE.has(n)){const ot=r.colorIndex??0;_.attr("data-color-id",`color-${ot%u.length}`)}const H=z.rectangle(X,nt,F,q,G),J=_.insert(()=>H,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(const[ot,Ct]of A.entries()){const Dt=(ot+1)%2===0&&Ct.yOffset!==0,qt=z.rectangle(X,k.height+nt+(Ct==null?void 0:Ct.yOffset),F,Ct==null?void 0:Ct.rowHeight,{...G,fill:Dt?o:c,stroke:h});_.insert(()=>qt,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Dt?"even":"odd"}`)}const ht=1e-4;let at=Fc(X,k.height+nt,F+X,k.height+nt,ht),vt=z.polygon(at.map(ot=>[ot.x,ot.y]),G);if(_.insert(()=>vt).attr("class","divider"),at=Fc(B+X,k.height+nt,B+X,q+nt,ht),vt=z.polygon(at.map(ot=>[ot.x,ot.y]),G),_.insert(()=>vt).attr("class","divider"),I){const ot=B+L+X;at=Fc(ot,k.height+nt,ot,q+nt,ht),vt=z.polygon(at.map(Ct=>[Ct.x,Ct.y]),G),_.insert(()=>vt).attr("class","divider")}if(j){const ot=B+L+N+X;at=Fc(ot,k.height+nt,ot,q+nt,ht),vt=z.polygon(at.map(Ct=>[Ct.x,Ct.y]),G),_.insert(()=>vt).attr("class","divider")}for(const ot of E){const Ct=k.height+nt+ot;at=Fc(X,Ct,F+X,Ct,ht),vt=z.polygon(at.map(At=>[At.x,At.y]),G),_.insert(()=>vt).attr("class","divider")}if(ie(e,J),v&&e.look!=="handDrawn")if(n!=null&&JZ.has(n))_.selectAll("path").attr("style",v);else{const ot=v.split(";"),Ct=(tt=ot==null?void 0:ot.filter(At=>At.includes("stroke")))==null?void 0:tt.map(At=>`${At}`).join("; ");_.selectAll("path").attr("style",Ct??""),_.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(ot){return Yt.rect(e,ot)},_}O(KC,"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!==oE(e)&&(e=oE(e),e=e.replaceAll("<","<").replaceAll(">",">"));const u=h.node().appendChild(await zs(h,e,{width:Fs(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($s(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}O(Dc,"addText");function Fc(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}]}O(Fc,"lineToPolygon");async function M5(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 ed(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await ed(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();x=v.height,d=c.insert("g").attr("class","members-group text");let C=0;for(const T of e.members){const E=await ed(d,T,C,[T.parseClassifier()]);C+=E+o}y=d.node().getBBox().height,y<=0&&(y=a/2),f=c.insert("g").attr("class","methods-group text");let _=0;for(const T of e.methods){const E=await ed(f,T,_,[T.parseClassifier()]);_+=E+o}let k=c.node().getBBox();if(h!==null){const T=h.node().getBBox();h.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),k=c.node().getBBox(),d.attr("transform",`translate(0, ${g+x+a*2})`),k=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+(y?y+a*4:a*2)})`),k=c.node().getBBox(),{shapeSvg:c,bbox:k}}O(M5,"textHelper");async function ed(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:$s(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),Sd(h)&&(c=!0);const u=await zs(a,pC(Pl(h)),{width:Fs(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(C=>new Promise(_=>{function k(){var T;if(C.style.display="flex",C.style.flexDirection="column",v){const E=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,B=parseInt(E,10)*5+"px";C.style.minWidth=B,C.style.maxWidth=B}else C.style.width="100%";_(C)}O(k,"setupImage"),setTimeout(()=>{C.complete&&k()}),C.addEventListener("error",k),C.addEventListener("load",k)})))}d=g.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}else{n.includes("font-weight: bolder")&&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}O(ed,"addText");async function B5(i,e){var z,G;const r=ii(),{themeVariables:n}=r,{useGradient:a}=n,o=r.class.padding??12,c=o,h=e.useHtmlLabels??$s(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:d,bbox:f}=await M5(i,e,r,h,c),{labelStyles:g,nodeStyles:x}=Jt(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=((z=u.styles)==null?void 0:z.join(";"))||x||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((G=r.class)!=null&&G.hideEmptyMembersBox),C=Zt.svg(d),_=Qt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=Math.max(e.width??0,f.width);let T=Math.max(e.height??0,f.height);const E=(e.height??0)>f.height;u.members.length===0&&u.methods.length===0?T+=c:u.members.length>0&&u.methods.length===0&&(T+=c*2);const A=-k/2,B=-T/2;let L=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;E&&(L=o*2);const N=C.rectangle(A-o,B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0),k+2*o,T+2*o+L,_),M=d.insert(()=>N,":first-child");M.attr("class","basic label-container outer-path");const I=M.node().getBBox(),j=d.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,P=d.select(".label-group").node().getBBox().height-(v?o/2:0)||0,W=d.select(".members-group").node().getBBox().height-(v?o/2:0)||0,K=(j+P+B+o-(B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each((D,F,q)=>{var at,vt;const X=ue(q[F]),nt=X.attr("transform");let H=0;if(nt){const Z=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(nt);Z&&(H=parseFloat(Z[2]))}let J=H+B+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(X.attr("class").includes("methods-group")){const ct=Math.max(W,c/2);E?J=Math.max(K,j+P+ct+B+c*2+o)+c*2:J=j+P+ct+B+c*4+o}u.members.length===0&&u.methods.length===0&&((at=r.class)!=null&&at.hideEmptyMembersBox)&&(u.annotations.length>0?J=H-c:J=H),h||(J-=4);let ht=A;(X.attr("class").includes("label-group")||X.attr("class").includes("annotation-group"))&&(ht=-((vt=X.node())==null?void 0:vt.getBBox().width)/2||0,d.selectAll("text").each(function(ct,Z,Q){window.getComputedStyle(Q[Z]).textAnchor==="middle"&&(ht=0)})),X.attr("transform",`translate(${ht}, ${J})`)}),u.members.length>0||u.methods.length>0||v){const D=j+P+B+o,F=C.line(I.x,D,I.x+I.width,D+.001,_);d.insert(()=>F).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(v||u.members.length>0||u.methods.length>0){const D=j+P+W+B+c*2+o,F=C.line(I.x,E?Math.max(K,D):D,I.x+I.width,(E?Math.max(K,D):D)+.001,_);d.insert(()=>F).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 D=RegExp(/color\s*:\s*([^;]*)/),F=D.exec(y);if(F){const q=F[0].replace("color","fill");d.selectAll("tspan").attr("style",q)}else if(g){const q=D.exec(g);if(q){const X=q[0].replace("color","fill");d.selectAll("tspan").attr("style",X)}}}return ie(e,M),e.intersect=function(D){return Yt.rect(e,D)},d}O(B5,"classBox");async function L5(i,e){var I,j;const{labelStyles:r,nodeStyles:n}=Jt(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 Da(y,`<<${a.type}>>`,0,e.labelStyle):v=await Da(y,"<<Element>>",0,e.labelStyle);let C=v;const _=await Da(y,a.name,C,e.labelStyle+"; font-weight: bold;");if(C+=_+h,u){const P=await Da(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,C,e.labelStyle);C+=P;const W=await Da(y,`${a.text?`Text: ${a.text}`:""}`,C,e.labelStyle);C+=W;const K=await Da(y,`${a.risk?`Risk: ${a.risk}`:""}`,C,e.labelStyle);C+=K,await Da(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,C,e.labelStyle)}else{const P=await Da(y,`${o.type?`Type: ${o.type}`:""}`,C,e.labelStyle);C+=P,await Da(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,e.labelStyle)}const k=(((I=y.node())==null?void 0:I.getBBox().width)??200)+c,T=(((j=y.node())==null?void 0:j.getBBox().height)??200)+c,E=-k/2,A=-T/2,B=Zt.svg(y),L=Qt(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const N=B.rectangle(E,A,k,T,L),M=y.insert(()=>N,":first-child");if(M.attr("class","basic label-container outer-path").attr("style",n),g!=null&&g.length){const P=e.colorIndex??0;y.attr("data-color-id",`color-${P%g.length}`)}if(y.selectAll(".label").each((P,W,K)=>{const z=ue(K[W]),G=z.attr("transform");let D=0,F=0;if(G){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(G);H&&(D=parseFloat(H[1]),F=parseFloat(H[2]))}const q=F-T/2;let X=E+c/2;(W===0||W===1)&&(X=D),z.attr("transform",`translate(${X}, ${q+c})`)}),C>v+_+h){const P=A+v+_+h;let W;if(e.look==="neo"){const G=[[E,P],[E+k,P],[E+k,P+.001],[E,P+.001]];W=B.polygon(G,L)}else W=B.line(E,P,E+k,P,L);y.insert(()=>W).attr("class","divider")}return ie(e,M),e.intersect=function(P){return Yt.rect(e,P)},n&&e.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}O(L5,"requirementBox");async function Da(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 zs(a,pC(Pl(e)),{width:Fs(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}O(Da,"addText");var tQ=O(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 O5(i,e,{config:r}){var W,K;const{labelStyles:n,nodeStyles:a}=Jt(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&&((W=r==null?void 0:r.kanban)!=null&&W.ticketBaseUrl)&&(g=(K=r==null?void 0:r.kanban)==null?void 0:K.ticketBaseUrl.replace("#TICKET#",e.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let v,C;x?{label:v,bbox:C}=await g0(x,"ticket"in e&&e.ticket||"",y):{label:v,bbox:C}=await g0(h,"ticket"in e&&e.ticket||"",y);const{label:_,bbox:k}=await g0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,E=(e==null?void 0:e.width)||0,A=Math.max(C.height,k.height)/2,B=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+A,L=-E/2,N=-B/2;d.attr("transform","translate("+(f-E/2)+", "+(-A-u.height/2)+")"),v.attr("transform","translate("+(f-E/2)+", "+(-A+u.height/2)+")"),_.attr("transform","translate("+(f+E/2-k.width-2*o)+", "+(-A+u.height/2)+")");let M;const{rx:I,ry:j}=e,{cssStyles:P}=e;if(e.look==="handDrawn"){const z=Zt.svg(h),G=Qt(e,{}),D=I||j?z.path(Uo(L,N,E,B,I||0),G):z.rectangle(L,N,E,B,G);M=h.insert(()=>D,":first-child"),M.attr("class","basic label-container").attr("style",P||null)}else{M=h.insert("rect",":first-child"),M.attr("class","basic label-container __APA__").attr("style",a).attr("rx",I??5).attr("ry",j??5).attr("x",L).attr("y",N).attr("width",E).attr("height",B);const z="priority"in e&&e.priority;if(z){const G=h.append("line"),D=L+2,F=N+Math.floor((I??0)/2),q=N+B-Math.floor((I??0)/2);G.attr("x1",D).attr("y1",F).attr("x2",D).attr("y2",q).attr("stroke-width","4").attr("stroke",tQ(z))}}return ie(e,M),e.height=B,e.intersect=function(z){return Yt.rect(e,z)},h}O(O5,"kanbanItem");async function R5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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),C=Math.max(d,y);h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let _;const k=`M0 0
|
|
387
|
+
a${f},${f} 1 0,0 ${v*.25},${-1*C*.1}
|
|
388
|
+
a${f},${f} 1 0,0 ${v*.25},0
|
|
389
|
+
a${f},${f} 1 0,0 ${v*.25},0
|
|
390
|
+
a${f},${f} 1 0,0 ${v*.25},${C*.1}
|
|
391
|
+
|
|
392
|
+
a${f},${f} 1 0,0 ${v*.15},${C*.33}
|
|
393
|
+
a${f*.8},${f*.8} 1 0,0 0,${C*.34}
|
|
394
|
+
a${f},${f} 1 0,0 ${-1*v*.15},${C*.33}
|
|
395
|
+
|
|
396
|
+
a${f},${f} 1 0,0 ${-1*v*.25},${C*.15}
|
|
397
|
+
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
398
|
+
a${f},${f} 1 0,0 ${-1*v*.25},0
|
|
399
|
+
a${f},${f} 1 0,0 ${-1*v*.25},${-1*C*.15}
|
|
400
|
+
|
|
401
|
+
a${f},${f} 1 0,0 ${-1*v*.1},${-1*C*.33}
|
|
402
|
+
a${f*.8},${f*.8} 1 0,0 0,${-1*C*.34}
|
|
403
|
+
a${f},${f} 1 0,0 ${v*.1},${-1*C*.33}
|
|
404
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const T=Zt.svg(a),E=Qt(e,{}),A=T.path(k,E);_=a.insert(()=>A,":first-child"),_.attr("class","basic label-container").attr("style",wr(g))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",k);return _.attr("transform",`translate(${-v/2}, ${-C/2})`),ie(e,_),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}O(R5,"bang");async function j5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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 C;const _=`M0 0
|
|
405
|
+
a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
|
|
406
|
+
a${x},${x} 1 0,1 ${u*.4},${-1*u*.1}
|
|
407
|
+
a${g},${g} 1 0,1 ${u*.35},${u*.2}
|
|
408
|
+
|
|
409
|
+
a${f},${f} 1 0,1 ${u*.15},${d*.35}
|
|
410
|
+
a${y},${y} 1 0,1 ${-1*u*.15},${d*.65}
|
|
411
|
+
|
|
412
|
+
a${g},${f} 1 0,1 ${-1*u*.25},${u*.15}
|
|
413
|
+
a${x},${x} 1 0,1 ${-1*u*.5},0
|
|
414
|
+
a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
415
|
+
|
|
416
|
+
a${f},${f} 1 0,1 ${-1*u*.1},${-1*d*.35}
|
|
417
|
+
a${y},${y} 1 0,1 ${u*.1},${-1*d*.65}
|
|
418
|
+
H0 V0 Z`;if(e.look==="handDrawn"){const k=Zt.svg(a),T=Qt(e,{}),E=k.path(_,T);C=a.insert(()=>E,":first-child"),C.attr("class","basic label-container").attr("style",wr(v))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",_);return h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),C.attr("transform",`translate(${-u/2}, ${-d/2})`),ie(e,C),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}O(j5,"cloud");async function D5(i,e){const{labelStyles:r,nodeStyles:n}=Jt(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"?`
|
|
419
|
+
M${-u/2} ${d/2-f}
|
|
420
|
+
v${-d+2*f}
|
|
421
|
+
q0,-${f} ${f},-${f}
|
|
422
|
+
h${u-2*f}
|
|
423
|
+
q${f},0 ${f},${f}
|
|
424
|
+
v${d-f}
|
|
425
|
+
H${-u/2}
|
|
426
|
+
Z
|
|
427
|
+
`:`
|
|
428
|
+
M${-u/2} ${d/2-f}
|
|
429
|
+
v${-d+2*f}
|
|
430
|
+
q0,-${f} ${f},-${f}
|
|
431
|
+
h${u-2*f}
|
|
432
|
+
q${f},0 ${f},${f}
|
|
433
|
+
v${d-2*f}
|
|
434
|
+
q0,${f} ${-f},${f}
|
|
435
|
+
h${-(u-2*f)}
|
|
436
|
+
q${-f},0 ${-f},${-f}
|
|
437
|
+
Z
|
|
438
|
+
`;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",g);return a.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",d/2).attr("x2",u/2).attr("y2",d/2),h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>h.node()),ie(e,x),e.calcIntersect=function(y,v){return Yt.rect(y,v)},e.intersect=function(y){return Yt.rect(e,y)},a}O(D5,"defaultMindmapNode");async function F5(i,e){const r={padding:e.padding??0};return YC(i,e,r)}O(F5,"mindmapCircle");var eQ=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:p5},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:u5},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:g5},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:x5},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:I3},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:YC},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:R5},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:j5},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:l5},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:W3},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:e5},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:t5},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:w5},{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:Q3},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:z3},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:_5},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:M3},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:d5},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:b5},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:y5},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:U3},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:G3},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:R3},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:j3},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:D3},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:i5},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:E5},{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:k5},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:r5},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:F3},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:$3},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:T5},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:A5},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:P3},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:S5},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:q3},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:f5},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:s5},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:a5},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:A3},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:O3},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:C5},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:v5},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:N5},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:c5},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:n5}],iQ=O(()=>{const e=[...Object.entries({state:m5,choice:B3,note:o5,rectWithTitle:h5,labelRect:J3,iconSquare:X3,iconCircle:K3,icon:Y3,iconRounded:V3,imageSquare:Z3,anchor:E3,kanbanItem:O5,mindmapCircle:F5,defaultMindmapNode:D5,classBox:B5,erBox:KC,requirementBox:L5}),...eQ.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),I5=iQ();function rQ(i){return i in I5}O(rQ,"isValidShape");var Sm=new Map;async function $5(i,e,r){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?I5[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",wr(e.look)),e.tooltip&&a.attr("title",e.tooltip),Sm.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}O($5,"insertNode");var alt=O((i,e)=>{Sm.set(e.id,i)},"setNodeElem"),slt=O(()=>{Sm.clear()},"clear"),olt=O(i=>{const e=Sm.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"),nQ=O((i,e,r,n,a,o=!1,c)=>{e.arrowTypeStart&&JE(i,"start",e.arrowTypeStart,r,n,a,o,c),e.arrowTypeEnd&&JE(i,"end",e.arrowTypeEnd,r,n,a,o,c)},"addEdgeMarkers"),aQ={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}},sQ=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],JE=O((i,e,r,n,a,o,c=!1,h)=>{var v;const u=aQ[r],d=u&&sQ.includes(u.type);if(!u){Nt.warn(`Unknown arrow type: ${r}`);return}const f=u.type,y=`${a}_${o}-${f}${e==="start"?"Start":"End"}${c&&d?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),_=`${y}_${C}`;if(!document.getElementById(_)){const k=document.getElementById(y);if(k){const T=k.cloneNode(!0);T.id=_,T.querySelectorAll("path, circle, line").forEach(A=>{A.setAttribute("stroke",h),u.fill&&A.setAttribute("fill",h)}),(v=k.parentNode)==null||v.appendChild(T)}}i.attr(`marker-${e}`,`url(${n}#${_})`)}else i.attr(`marker-${e}`,`url(${n}#${y})`)},"addEdgeMarker"),oQ=O(i=>{var e,r;return typeof i=="string"?i:(r=(e=ii())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Yg=new Map,Rr=new Map,llt=O(()=>{Yg.clear(),Rr.clear()},"clear"),Iu=O(i=>i?typeof i=="string"?i:i.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),lQ=O(async(i,e)=>{const r=ii();let n=nn(r);const{labelStyles:a}=Jt(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 zs(i,e.label,{style:Iu(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",Ou(g,n)),Yg.set(e.id,o),e.width=f.width,e.height=f.height;let x;if(e.startLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.startLabelLeft,Iu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ue(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ou(_,n)),Rr.get(e.id)||Rr.set(e.id,{}),Rr.get(e.id).startLeft=y,id(x,e.startLabelLeft)}if(e.startLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.startLabelRight,Iu(e.labelStyle)||"",!1,!1);x=C,v.node().appendChild(C);let _=C.getBBox();if(n){const k=C.children[0],T=ue(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ou(_,n)),Rr.get(e.id)||Rr.set(e.id,{}),Rr.get(e.id).startRight=y,id(x,e.startLabelRight)}if(e.endLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.endLabelLeft,Iu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ue(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ou(_,n)),y.node().appendChild(C),Rr.get(e.id)||Rr.set(e.id,{}),Rr.get(e.id).endLeft=y,id(x,e.endLabelLeft)}if(e.endLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.endLabelRight,Iu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=ue(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ou(_,n)),y.node().appendChild(C),Rr.get(e.id)||Rr.set(e.id,{}),Rr.get(e.id).endRight=y,id(x,e.endLabelRight)}return d},"insertEdgeLabel");function id(i,e){nn(ii())&&i&&(i.style.width=e.length*9+"px",i.style.height="12px")}O(id,"setTerminalWidth");var cQ=O((i,e)=>{Nt.debug("Moving label abc88 ",i.id,i.label,Yg.get(i.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=ii(),{subGraphTitleTotalMargin:a}=RC(n);if(i.label){const o=Yg.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=Rr.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=Rr.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=Rr.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=Rr.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"),hQ=O((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"),uQ=O((i,e,r)=>{Nt.debug(`intersection calc abc89:
|
|
439
|
+
outsidePoint: ${JSON.stringify(e)}
|
|
440
|
+
insidePoint : ${JSON.stringify(r)}
|
|
441
|
+
node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const n=i.x,a=i.y,o=Math.abs(n-r.x),c=i.width/2;let h=r.x<e.x?c-o:c+o;const u=i.height/2,d=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*c>Math.abs(n-e.x)*u){let g=r.y<e.y?e.y-u-a:a-u-e.y;h=f*g/d;const x={x:r.x<e.x?r.x+h:r.x-f+h,y:r.y<e.y?r.y+d-g:r.y-d+g};return h===0&&(x.x=e.x,x.y=e.y),f===0&&(x.x=e.x),d===0&&(x.y=e.y),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"),tN=O((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),!hQ(e,o)&&!a){const c=uQ(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 z5(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}}O(z5,"extractCornerPoints");var eN=O(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"),dQ=O(function(i){const{cornerPointPositions:e}=z5(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=eN(a,c,5),u=eN(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"),fQ=O((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"),pQ=O(function(i,e,r,n,a,o,c,h=!1){var F;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 q in e.cssCompiledStyles)$R(q)||y.push(e.cssCompiledStyles[q]);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=tN(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=tN(d.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let C=d.filter(q=>!Number.isNaN(q.y));const _=oQ(e.curve);_!=="rounded"&&(C=dQ(C));let k=fd;switch(_){case"linear":k=fd;break;case"basis":k=Nv;break;case"cardinal":k=OL;break;case"bumpX":k=NL;break;case"bumpY":k=AL;break;case"catmullRom":k=jL;break;case"monotoneX":k=PL;break;case"monotoneY":k=qL;break;case"natural":k=HL;break;case"step":k=WL;break;case"stepAfter":k=YL;break;case"stepBefore":k=GL;break;case"rounded":k=fd;break;default:k=Nv}const{x:T,y:E}=DV(e),A=xK().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 L,N=_==="rounded"?P5(q5(C,e),5):A(C);const M=Array.isArray(e.style)?e.style:[e.style];let I=M.find(q=>q==null?void 0:q.startsWith("stroke:")),j="";e.animate&&(j="edge-animation-fast"),e.animation&&(j="edge-animation-"+e.animation);let P=!1;if(e.look==="handDrawn"){const q=Zt.svg(i);Object.assign([],C);const X=q.path(N,{roughness:.3,seed:u});B+=" transition",L=ue(X).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",M?M.reduce((H,J)=>H+";"+J,""):"");let nt=L.attr("d");L.attr("d",nt),i.node().appendChild(L.node())}else{const q=y.join(";"),X=M?M.reduce((vt,ct)=>vt+ct+";",""):"",nt=(q?q+";"+X+";":X)+";"+(M?M.reduce((vt,ct)=>vt+";"+ct,""):"");L=i.append("path").attr("d",N).attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",nt),I=(F=nt.match(/stroke:([^;]+)/))==null?void 0:F[1],P=e.animate===!0||!!e.animation||q.includes("animation");const H=L.node(),J=typeof H.getTotalLength=="function"?H.getTotalLength():0,ht=bE[e.arrowTypeStart]||0,at=bE[e.arrowTypeEnd]||0;if(e.look==="neo"&&!P){const ct=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?fQ(J,ht,at):`0 ${ht} ${J-ht-at} ${at}`}; stroke-dashoffset: 0;`;L.attr("style",ct+L.attr("style"))}}L.attr("data-edge",!0),L.attr("data-et","edge"),L.attr("data-id",e.id),L.attr("data-points",v),L.attr("data-look",wr(e.look)),e.showPoints&&C.forEach(q=>{i.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",q.x).attr("cy",q.y)});let W="";(ii().flowchart.arrowMarkerAbsolute||ii().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Nt.info("arrowTypeStart",e.arrowTypeStart),Nt.info("arrowTypeEnd",e.arrowTypeEnd);const K=!P&&(e==null?void 0:e.look)==="neo";nQ(L,e,W,c,n,K,I);const z=Math.floor(d.length/2),G=d[z];ba.isLabelCoordinateInPath(G,L.attr("d"))||(f=!0);let D={};return f&&(D.updatedPath=d),D.originalPath=e.points,D},"insertEdge");function P5(i,e){if(i.length<2)return"";let r="";const n=i.length,a=1e-5;for(let o=0;o<n;o++){const c=i[o],h=i[o-1],u=i[o+1];if(o===0)r+=`M${c.x},${c.y}`;else if(o===n-1)r+=`L${c.x},${c.y}`;else{const d=c.x-h.x,f=c.y-h.y,g=u.x-c.x,x=u.y-c.y,y=Math.hypot(d,f),v=Math.hypot(g,x);if(y<a||v<a){r+=`L${c.x},${c.y}`;continue}const C=d/y,_=f/y,k=g/v,T=x/v,E=C*k+_*T,A=Math.max(-1,Math.min(1,E)),B=Math.acos(A);if(B<a||Math.abs(Math.PI-B)<a){r+=`L${c.x},${c.y}`;continue}const L=Math.min(e/Math.sin(B/2),y/2,v/2),N=c.x-C*L,M=c.y-_*L,I=c.x+k*L,j=c.y+T*L;r+=`L${N},${M}`,r+=`Q${c.x},${c.y} ${I},${j}`}}return r}O(P5,"generateRoundedPath");function i1(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}}O(i1,"calculateDeltaAndAngle");function q5(i,e){const r=i.map(a=>({...a}));if(i.length>=2&&Ur[e.arrowTypeStart]){const a=Ur[e.arrowTypeStart],o=i[0],c=i[1],{angle:h}=i1(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&&Ur[e.arrowTypeEnd]){const a=Ur[e.arrowTypeEnd],o=i[n-1],c=i[n-2],{angle:h}=i1(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}O(q5,"applyMarkerOffsetsToPoints");var gQ=O((i,e,r,n)=>{e.forEach(a=>{IQ[a](i,r,n)})},"insertMarkers"),mQ=O((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"),yQ=O((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"),bQ=O((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"),xQ=O((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"),vQ=O((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"),CQ=O((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"),_Q=O((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"),kQ=O((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"),wQ=O((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"),SQ=O((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"),TQ=O((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"),EQ=O((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"),NQ=O((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"),AQ=O((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"),MQ=O((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"),BQ=O((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"),LQ=O((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"),OQ=O((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"),RQ=O((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
442
|
+
L20,10
|
|
443
|
+
M20,10
|
|
444
|
+
L0,20`)},"requirement_arrow"),jQ=O((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
|
|
445
|
+
L20,10
|
|
446
|
+
M20,10
|
|
447
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),DQ=O((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"),FQ=O((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"),IQ={extension:mQ,composition:yQ,aggregation:bQ,dependency:xQ,lollipop:vQ,point:CQ,circle:_Q,cross:kQ,barb:wQ,barbNeo:SQ,only_one:TQ,zero_or_one:EQ,one_or_more:NQ,zero_or_more:AQ,only_one_neo:MQ,zero_or_one_neo:BQ,one_or_more_neo:LQ,zero_or_more_neo:OQ,requirement_arrow:RQ,requirement_contains:DQ,requirement_arrow_neo:jQ,requirement_contains_neo:FQ},$Q=gQ,zQ={common:Yd,getConfig:qi,insertCluster:FZ,insertEdge:pQ,insertEdgeLabel:lQ,insertMarkers:$Q,insertNode:$5,interpolateToCurve:NC,labelHelper:me,log:Nt,positionEdgeLabel:cQ},Bd={},U5=O(i=>{for(const e of i)Bd[e.name]=e},"registerLayoutLoaders"),PQ=O(()=>{U5([{name:"dagre",loader:O(async()=>await Te(()=>import("./dagre-KV5264BT-B_bjkEDQ.js"),__vite__mapDeps([5,6,7,8,9,10])),"loader")},{name:"cose-bilkent",loader:O(async()=>await Te(()=>import("./cose-bilkent-S5V4N54A-D0hUzBCj.js"),__vite__mapDeps([11,12])),"loader")}])},"registerDefaultLayoutLoaders");PQ();var clt=O(async(i,e)=>{if(!(i.layoutAlgorithm in Bd))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=Bd[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,zQ,{algorithm:r.algorithm})},"render"),hlt=O((i="",{fallback:e="dagre"}={})=>{if(i in Bd)return i;if(e in Bd)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",W5="rule",G5="decl",qQ="@import",UQ="@namespace",HQ="@keyframes",WQ="@layer",GQ=Math.abs,gd=String.fromCharCode;function Y5(i){return i.trim()}function r1(i,e,r){return i.replace(e,r)}function Hc(i,e){return i.charCodeAt(e)|0}function kh(i,e,r){return i.slice(e,r)}function za(i){return i.length}function YQ(i){return i.length}function Mp(i,e){return e.push(i),i}var Tm=1,wh=1,K5=0,oa=0,hr=0,Mh="";function VC(i,e,r,n,a,o,c,h){return{value:i,root:e,parent:r,type:n,props:a,children:o,line:Tm,column:wh,length:c,return:"",siblings:h}}function KQ(){return hr}function VQ(){return hr=oa>0?Hc(Mh,--oa):0,wh--,hr===10&&(wh=1,Tm--),hr}function Ca(){return hr=oa<K5?Hc(Mh,oa++):0,wh++,hr===10&&(wh=1,Tm++),hr}function Bo(){return Hc(Mh,oa)}function eg(){return oa}function Em(i,e){return kh(Mh,i,e)}function Ld(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 XQ(i){return Tm=wh=1,K5=za(Mh=i),oa=0,[]}function ZQ(i){return Mh="",i}function y0(i){return Y5(Em(oa-1,n1(i===91?i+2:i===40?i+1:i)))}function QQ(i){for(;(hr=Bo())&&hr<33;)Ca();return Ld(i)>2||Ld(hr)>3?"":" "}function JQ(i,e){for(;--e&&Ca()&&!(hr<48||hr>102||hr>57&&hr<65||hr>70&&hr<97););return Em(i,eg()+(e<6&&Bo()==32&&Ca()==32))}function n1(i){for(;Ca();)switch(hr){case i:return oa;case 34:case 39:i!==34&&i!==39&&n1(hr);break;case 40:i===41&&n1(i);break;case 92:Ca();break}return oa}function tJ(i,e){for(;Ca()&&i+hr!==57;)if(i+hr===84&&Bo()===47)break;return"/*"+Em(e,oa-1)+"*"+gd(i===47?i:Ca())}function eJ(i){for(;!Ld(Bo());)Ca();return Em(i,oa)}function iJ(i){return ZQ(ig("",null,null,null,[""],i=XQ(i),0,[0],i))}function ig(i,e,r,n,a,o,c,h,u){for(var d=0,f=0,g=c,x=0,y=0,v=0,C=1,_=1,k=1,T=0,E=0,A="",B=a,L=o,N=n,M=A;_;)switch(v=E,E=Ca()){case 40:v!=108&&Hc(M,g-1)==58?(T++,M+="("):M+=y0(E);break;case 41:T--,M+=")";break;case 34:case 39:case 91:M+=y0(E);break;case 9:case 10:case 13:case 32:if(T>0){M+=gd(E);break}M+=QQ(v);break;case 92:M+=JQ(eg()-1,7);continue;case 47:switch(Bo()){case 42:case 47:Mp(rJ(tJ(Ca(),eg()),e,r,u),u),(Ld(v||1)==5||Ld(Bo()||1)==5)&&za(M)&&kh(M,-1,void 0)!==" "&&(M+=" ");break;default:M+="/"}break;case 123*C:h[d++]=za(M)*k;case 125*C:case 59:case 0:if(T>0&&E){M+=gd(E);break}switch(E){case 0:case 125:_=0;case 59+f:k==-1&&(M=r1(M,/\f/g,"")),y>0&&(za(M)-g||C===0)&&Mp(y>32?rN(M+";",n,r,g-1,u):rN(r1(M," ","")+";",n,r,g-2,u),u);break;case 59:M+=";";default:if(Mp(N=iN(M,e,r,d,f,a,h,A,B=[],L=[],g,o),o),E===123)if(f===0)ig(M,e,N,N,B,o,g,h,L);else{switch(x){case 99:if(Hc(M,3)===110)break;case 108:if(Hc(M,2)===97)break;default:f=0;case 100:case 109:case 115:}f?ig(i,N,N,n&&Mp(iN(i,N,N,0,0,a,h,A,a,B=[],g,L),L),a,L,g,h,n?B:L):ig(M,N,N,N,[""],L,0,h,L)}}d=f=y=0,C=k=1,A=M="",g=c;break;case 58:g=1+za(M),y=v;default:if(C<1){if(E==123)--C;else if(E==125&&C++==0&&VQ()==125)continue}switch(M+=gd(E),E*C){case 38:k=f>0?1:(M+="\f",-1);break;case 44:if(T>0)break;h[d++]=(za(M)-1)*k,k=1;break;case 64:Bo()===45&&(M+=y0(Ca())),x=Bo(),f=g=za(A=M+=eJ(eg())),E++;break;case 45:v===45&&za(M)==2&&(C=0)}}return o}function iN(i,e,r,n,a,o,c,h,u,d,f,g){for(var x=a-1,y=a===0?o:[""],v=YQ(y),C=0,_=0,k=0;C<n;++C)for(var T=0,E=kh(i,x+1,x=GQ(_=c[C])),A=i;T<v;++T)(A=Y5(_>0?y[T]+" "+E:r1(E,/&\f/g,y[T])))&&(u[k++]=A);return VC(i,e,r,a===0?W5:h,u,d,f,g)}function rJ(i,e,r,n){return VC(i,e,r,H5,gd(KQ()),kh(i,2,-2),0,n)}function rN(i,e,r,n,a){return VC(i,e,r,G5,kh(i,0,n),kh(i,n+1,-1),n,a)}function a1(i,e){for(var r="",n=0;n<i.length;n++)r+=e(i[n],n,i,e)||"";return r}function nJ(i,e,r,n){switch(i.type){case WQ:if(i.children.length)break;case qQ:case UQ:case G5:return i.return=i.return||i.value;case H5:return"";case HQ:return i.return=i.value+"{"+a1(i.children,n)+"}";case W5:if(!za(i.value=i.props.join(",")))return""}return za(r=a1(i.children,n))?i.return=i.value+"{"+r+"}":""}var V5="c4",aJ=O(i=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),sJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-DtQKYrmP.js");return{diagram:e}},__vite__mapDeps([13,14]));return{id:V5,diagram:i}},"loader"),oJ={id:V5,detector:aJ,loader:sJ},lJ=oJ,X5="flowchart",cJ=O((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"),hJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-azQUtREP.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:X5,diagram:i}},"loader"),uJ={id:X5,detector:cJ,loader:hJ},dJ=uJ,Z5="flowchart-v2",fJ=O((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"),pJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-azQUtREP.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:Z5,diagram:i}},"loader"),gJ={id:Z5,detector:fJ,loader:pJ},mJ=gJ,Q5="er",yJ=O(i=>/^\s*erDiagram/.test(i),"detector"),bJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-CYxdxNcb.js");return{diagram:e}},__vite__mapDeps([20,17,18,19]));return{id:Q5,diagram:i}},"loader"),xJ={id:Q5,detector:yJ,loader:bJ},vJ=xJ,J5="gitGraph",CJ=O(i=>/^\s*gitGraph/.test(i),"detector"),_J=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-Dz87wo6e.js");return{diagram:e}},__vite__mapDeps([21,22,23,24,9,7]));return{id:J5,diagram:i}},"loader"),kJ={id:J5,detector:CJ,loader:_J},wJ=kJ,tj="gantt",SJ=O(i=>/^\s*gantt/.test(i),"detector"),TJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-DjXmGcb4.js");return{diagram:e}},__vite__mapDeps([25,26,27]));return{id:tj,diagram:i}},"loader"),EJ={id:tj,detector:SJ,loader:TJ},NJ=EJ,ej="info",AJ=O(i=>/^\s*info/.test(i),"detector"),MJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-zG-8q9HR.js");return{diagram:e}},__vite__mapDeps([28,24,9,7]));return{id:ej,diagram:i}},"loader"),BJ={id:ej,detector:AJ,loader:MJ},ij="pie",LJ=O(i=>/^\s*pie/.test(i),"detector"),OJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-q-J8tI3B.js");return{diagram:e}},__vite__mapDeps([29,22,24,9,7,30]));return{id:ij,diagram:i}},"loader"),RJ={id:ij,detector:LJ,loader:OJ},rj="quadrantChart",jJ=O(i=>/^\s*quadrantChart/.test(i),"detector"),DJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-CGbfFson.js");return{diagram:e}},__vite__mapDeps([31,26,27]));return{id:rj,diagram:i}},"loader"),FJ={id:rj,detector:jJ,loader:DJ},IJ=FJ,nj="xychart",$J=O(i=>/^\s*xychart(-beta)?/.test(i),"detector"),zJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-BIFYd4_d.js");return{diagram:e}},__vite__mapDeps([32,26,27]));return{id:nj,diagram:i}},"loader"),PJ={id:nj,detector:$J,loader:zJ},qJ=PJ,aj="requirement",UJ=O(i=>/^\s*requirement(Diagram)?/.test(i),"detector"),HJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-ThxVmoCe.js");return{diagram:e}},__vite__mapDeps([33,17,18]));return{id:aj,diagram:i}},"loader"),WJ={id:aj,detector:UJ,loader:HJ},GJ=WJ,sj="sequence",YJ=O(i=>/^\s*sequenceDiagram/.test(i),"detector"),KJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-JrhjN3MG.js");return{diagram:e}},__vite__mapDeps([34,14,23]));return{id:sj,diagram:i}},"loader"),VJ={id:sj,detector:YJ,loader:KJ},XJ=VJ,oj="class",ZJ=O((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"),QJ=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-Dpt9qwZI.js");return{diagram:e}},__vite__mapDeps([35,36,16,14,17,18]));return{id:oj,diagram:i}},"loader"),JJ={id:oj,detector:ZJ,loader:QJ},ttt=JJ,lj="classDiagram",ett=O((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"),itt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-Dpt9qwZI.js");return{diagram:e}},__vite__mapDeps([37,36,16,14,17,18]));return{id:lj,diagram:i}},"loader"),rtt={id:lj,detector:ett,loader:itt},ntt=rtt,cj="state",att=O((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"),stt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-BzOtZESp.js");return{diagram:e}},__vite__mapDeps([38,39,17,18,6,7,8,9]));return{id:cj,diagram:i}},"loader"),ott={id:cj,detector:att,loader:stt},ltt=ott,hj="stateDiagram",ctt=O((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"),htt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-CjcHIbj7.js");return{diagram:e}},__vite__mapDeps([40,39,17,18]));return{id:hj,diagram:i}},"loader"),utt={id:hj,detector:ctt,loader:htt},dtt=utt,uj="journey",ftt=O(i=>/^\s*journey/.test(i),"detector"),ptt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-f8lbDQ22.js");return{diagram:e}},__vite__mapDeps([41,16,14,30]));return{id:uj,diagram:i}},"loader"),gtt={id:uj,detector:ftt,loader:ptt},mtt=gtt,ytt=O((i,e,r)=>{Nt.debug(`rendering svg for syntax error
|
|
448
|
+
`);const n=NK(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),kL(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"),dj={draw:ytt},btt=dj,xtt={db:{},renderer:dj,parser:{parse:O(()=>{},"parse")}},vtt=xtt,fj="flowchart-elk",Ctt=O((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"),_tt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-azQUtREP.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:fj,diagram:i}},"loader"),ktt={id:fj,detector:Ctt,loader:_tt},wtt=ktt,pj="timeline",Stt=O(i=>/^\s*timeline/.test(i),"detector"),Ttt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-Gwb0w7bX.js");return{diagram:e}},__vite__mapDeps([42,30]));return{id:pj,diagram:i}},"loader"),Ett={id:pj,detector:Stt,loader:Ttt},Ntt=Ett,gj="mindmap",Att=O(i=>/^\s*mindmap/.test(i),"detector"),Mtt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-Ch2AO4mc.js");return{diagram:e}},__vite__mapDeps([43,17,18]));return{id:gj,diagram:i}},"loader"),Btt={id:gj,detector:Att,loader:Mtt},Ltt=Btt,mj="kanban",Ott=O(i=>/^\s*kanban/.test(i),"detector"),Rtt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-BJtF1llZ.js");return{diagram:e}},__vite__mapDeps([44,16]));return{id:mj,diagram:i}},"loader"),jtt={id:mj,detector:Ott,loader:Rtt},Dtt=jtt,yj="sankey",Ftt=O(i=>/^\s*sankey(-beta)?/.test(i),"detector"),Itt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-BvEv917s.js");return{diagram:e}},[]);return{id:yj,diagram:i}},"loader"),$tt={id:yj,detector:Ftt,loader:Itt},ztt=$tt,bj="packet",Ptt=O(i=>/^\s*packet(-beta)?/.test(i),"detector"),qtt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-BdHifyqU.js");return{diagram:e}},__vite__mapDeps([45,22,24,9,7]));return{id:bj,diagram:i}},"loader"),Utt={id:bj,detector:Ptt,loader:qtt},xj="radar",Htt=O(i=>/^\s*radar-beta/.test(i),"detector"),Wtt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-DdVsHQ-l.js");return{diagram:e}},__vite__mapDeps([46,22,24,9,7]));return{id:xj,diagram:i}},"loader"),Gtt={id:xj,detector:Htt,loader:Wtt},vj="block",Ytt=O(i=>/^\s*block(-beta)?/.test(i),"detector"),Ktt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-BmPhQEp6.js");return{diagram:e}},__vite__mapDeps([47,16,10,6,7,19]));return{id:vj,diagram:i}},"loader"),Vtt={id:vj,detector:Ytt,loader:Ktt},Xtt=Vtt,Cj="treeView",Ztt=O(i=>/^\s*treeView-beta/.test(i),"detector"),Qtt=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-B63uEoiS.js");return{diagram:e}},__vite__mapDeps([48,22,23,24,9,7]));return{id:Cj,diagram:i}},"loader"),Jtt={id:Cj,detector:Ztt,loader:Qtt},tet=Jtt,_j="architecture",eet=O(i=>/^\s*architecture/.test(i),"detector"),iet=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-BhtWTFvf.js");return{diagram:e}},__vite__mapDeps([49,22,24,9,7,12]));return{id:_j,diagram:i}},"loader"),ret={id:_j,detector:eet,loader:iet},net=ret,kj="ishikawa",aet=O(i=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),set=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-5OzPmL1c.js");return{diagram:e}},[]);return{id:kj,diagram:i}},"loader"),oet={id:kj,detector:aet,loader:set},wj="venn",cet=O(i=>/^\s*venn-beta/.test(i),"detector"),het=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-y2S0dZjp.js");return{diagram:e}},[]);return{id:wj,diagram:i}},"loader"),uet={id:wj,detector:cet,loader:het},det=uet,Sj="treemap",fet=O(i=>/^\s*treemap/.test(i),"detector"),pet=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-DShdwm3D.js");return{diagram:e}},__vite__mapDeps([50,18,22,24,9,7,27]));return{id:Sj,diagram:i}},"loader"),get={id:Sj,detector:fet,loader:pet},Tj="wardley-beta",met=O(i=>/^\s*wardley-beta/i.test(i),"detector"),yet=O(async()=>{const{diagram:i}=await Te(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-Sljri5hz.js");return{diagram:e}},__vite__mapDeps([51,22,24,9,7]));return{id:Tj,diagram:i}},"loader"),bet={id:Tj,detector:met,loader:yet},xet=bet,nN=!1,Nm=O(()=>{nN||(nN=!0,Ng("error",vtt,i=>i.toLowerCase().trim()==="error"),Ng("---",{db:{clear:O(()=>{},"clear")},styles:{},renderer:{draw:O(()=>{},"draw")},parser:{parse:O(()=>{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:O(()=>null,"init")},i=>i.toLowerCase().trimStart().startsWith("---")),Cv(wtt,Ltt,net),Cv(lJ,Dtt,ntt,ttt,vJ,NJ,BJ,RJ,GJ,XJ,mJ,dJ,Ntt,wJ,dtt,ltt,mtt,IJ,ztt,Utt,qJ,Xtt,tet,Gtt,oet,get,det,xet))},"addDiagrams"),vet=O(async()=>{Nt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Il).map(async([r,{detector:n,loader:a}])=>{if(a)try{Sv(r)}catch{try{const{diagram:o,id:c}=await a();Ng(c,o,n)}catch(o){throw Nt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Il[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){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"),Cet="graphics-document document";function Ej(i,e){i.attr("role",Cet),e!==""&&i.attr("aria-roledescription",e)}O(Ej,"setA11yDiagramInfo");function Nj(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)}}}O(Nj,"addSVGa11yTitleDescription");var Ll,s1=(Ll=class{constructor(e,r,n,a,o){this.type=e,this.text=r,this.db=n,this.parser=a,this.renderer=o}static async fromText(e,r={}){var d,f;const n=qi(),a=cC(e,n);e=rX(e)+`
|
|
449
|
+
`;try{Sv(a)}catch{const g=oY(a);if(!g)throw new cL(`Diagram ${a} not found.`);const{id:x,diagram:y}=await g();Ng(x,y)}const{db:o,parser:c,renderer:h,init:u}=Sv(a);return c.parser&&(c.parser.yy=o),(d=o.clear)==null||d.call(o),u==null||u(n),r.title&&((f=o.setDiagramTitle)==null||f.call(o,r.title)),await c.parse(e),new Ll(a,e,o,c,h)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},O(Ll,"Diagram"),Ll),aN=[],_et=O(()=>{aN.forEach(i=>{i()}),aN=[]},"attachFunctions"),ket=O(i=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Aj(i){const e=i.match(lL);if(!e)return{text:i,metadata:{}};let r=jV(e[1],{schema:RV})??{};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}}O(Aj,"extractFrontMatter");var wet=O(i=>i.replace(/\r\n?/g,`
|
|
450
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Tet=O(i=>{const{text:e,metadata:r}=Aj(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"),Eet=O(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:HV(i),directive:e}},"processDirectives");function XC(i){const e=wet(i),r=Tet(e),n=Eet(r.text),a=OC(r.config,n.directive);return i=ket(n.text),{code:i,title:r.title,config:a}}O(XC,"preprocessDiagram");function Mj(i){const e=new TextEncoder().encode(i),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}O(Mj,"toBase64");var Net=5e4,Aet="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Met="sandbox",Bet="loose",Let="http://www.w3.org/2000/svg",Oet="http://www.w3.org/1999/xlink",Ret="http://www.w3.org/1999/xhtml",jet="100%",Det="100%",Fet="border:0;margin:0;",Iet="margin:0",$et="allow-top-navigation-by-user-activation allow-popups",zet='The "iframe" tag is not supported by your browser.',Pet=["foreignobject"],qet=["dominant-baseline"];function ZC(i){const e=XC(i);return Tg(),jY(e.config??{}),e}O(ZC,"processAndSetConfigs");async function Bj(i,e){Nm();try{const{code:r,config:n}=ZC(i);return{diagramType:(await Oj(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}O(Bj,"parse");var sN=O((i,e,r=[])=>`
|
|
451
|
+
.${i} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Uet=O((i,e=new Map)=>{let r="";if(i.themeCSS!==void 0&&(r+=`
|
|
452
|
+
${i.themeCSS}`),i.fontFamily!==void 0&&(r+=`
|
|
453
|
+
:root { --mermaid-font-family: ${i.fontFamily}}`),i.altFontFamily!==void 0&&(r+=`
|
|
454
|
+
:root { --mermaid-alt-font-family: ${i.altFontFamily}}`),e instanceof Map){const c=nn(i)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{X2(h.styles)||c.forEach(u=>{r+=sN(h.id,u,h.styles)}),X2(h.textStyles)||(r+=sN(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),Het=O((i,e,r,n)=>{const a=Uet(i,r),o=tK(e,a,{...i.themeVariables,theme:i.theme,look:i.look},n);return a1(iJ(`${n}{${o}}`),nJ)},"createUserStyles"),Wet=O((i="",e,r)=>{let n=i;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Pl(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),Get=O((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":Det,n=Mj(`<body style="${Iet}">${i}</body>`);return`<iframe style="width:${jet};height:${r};${Fet}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${$et}">
|
|
455
|
+
${zet}
|
|
456
|
+
</iframe>`},"putIntoIFrame"),oN=O((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",Let);return a&&c.attr("xmlns:xlink",a),c.append("g"),i},"appendDivSvgG");function o1(i,e){return i.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}O(o1,"sandboxedIframe");var Yet=O((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"),Ket=O(async function(i,e,r){var W,K,z,G,D,F;Nm();const n=ZC(e);e=n.code;const a=qi();Nt.debug(a),e.length>((a==null?void 0:a.maxTextSize)??Net)&&(e=Aet);const o="#"+i,c="i"+i,h="#"+c,u="d"+i,d="#"+u,f=O(()=>{const X=ue(x?h:d).node();X&&"remove"in X&&X.remove()},"removeTempElements");let g=ue("body");const x=a.securityLevel===Met,y=a.securityLevel===Bet,v=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),x){const q=o1(ue(r),c);g=ue(q.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ue(r);oN(g,i,u,`font-family: ${v}`,Oet)}else{if(Yet(document,i,u,c),x){const q=o1(ue("body"),c);g=ue(q.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ue("body");oN(g,i,u)}let C,_;try{C=await s1.fromText(e,{title:n.title})}catch(q){if(a.suppressErrorRendering)throw f(),q;C=await s1.fromText("error"),_=q}const k=g.select(d).node(),T=C.type,E=k.firstChild,A=E.firstChild,B=(K=(W=C.renderer).getClasses)==null?void 0:K.call(W,e,C),L=Het(a,T,B,o),N=document.createElement("style");N.innerHTML=L,E.insertBefore(N,A);try{await C.renderer.draw(e,i,"11.14.0",C)}catch(q){throw a.suppressErrorRendering?f():btt.draw(e,i,"11.14.0"),q}const M=g.select(`${d} svg`),I=(G=(z=C.db).getAccTitle)==null?void 0:G.call(z),j=(F=(D=C.db).getAccDescription)==null?void 0:F.call(D);Rj(T,M,I,j),g.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",Ret);let P=g.select(d).node().innerHTML;if(Nt.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),P=Wet(P,x,$s(a.arrowMarkerAbsolute)),x){const q=g.select(d+" svg").node();P=Get(P,q)}else y||(P=Do.sanitize(P,{ADD_TAGS:Pet,ADD_ATTR:qet,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(_et(),_)throw _;return f(),{diagramType:T,svg:P,bindFunctions:C.db.bindFunctions}},"render");function Lj(i={}){var n;const e=br({},i);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),OY(e),e!=null&&e.theme&&e.theme in Os?e.themeVariables=Os[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Os.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?LY(e):pL();lC(r.logLevel),Nm()}O(Lj,"initialize");var Oj=O((i,e={})=>{const{code:r}=XC(i);return s1.fromText(r,e)},"getDiagramFromText");function Rj(i,e,r,n){Ej(e,i),Nj(e,r,n,e.attr("id"))}O(Rj,"addA11yInfo");var Ul=Object.freeze({render:Ket,parse:Bj,getDiagramFromText:Oj,initialize:Lj,getConfig:qi,setConfig:gL,getSiteConfig:pL,updateSiteConfig:RY,reset:O(()=>{Tg()},"reset"),globalReset:O(()=>{Tg(vh)},"globalReset"),defaultConfig:vh});lC(qi().logLevel);Tg(qi());var Vet=O((i,e,r)=>{Nt.warn(i),LC(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"),jj=O(async function(i={querySelector:".mermaid"}){try{await Xet(i)}catch(e){if(LC(e)&&Nt.error(e.str),Dn.parseError&&Dn.parseError(e),!i.suppressErrors)throw Nt.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Xet=O(async function({postRenderCallback:i,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Ul.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)),Ul.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const o=new ba.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let c;const h=[];for(const u of Array.from(a)){if(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=QR(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 $j(d,c,u);u.innerHTML=g,i&&await i(d),x&&x(u)}catch(g){Vet(g,h,Dn.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),Dj=O(function(i){Ul.initialize(i)},"initialize"),Zet=O(async function(i,e,r){Nt.warn("mermaid.init is deprecated. Please use run instead."),i&&Dj(i);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await jj(n)},"init"),Qet=O(async(i,{lazyLoad:e=!0}={})=>{Nm(),Cv(...i),e===!1&&await vet()},"registerExternalDiagrams"),Fj=O(function(){if(Dn.startOnLoad){const{startOnLoad:i}=Ul.getConfig();i&&Dn.run().catch(e=>Nt.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Fj,!1);var Jet=O(function(i){Dn.parseError=i},"setParseErrorHandler"),Kg=[],b0=!1,Ij=O(async()=>{if(!b0){for(b0=!0;Kg.length>0;){const i=Kg.shift();if(i)try{await i()}catch(e){Nt.error("Error executing queue",e)}}b0=!1}},"executeQueue"),tit=O(async(i,e)=>new Promise((r,n)=>{const a=O(()=>new Promise((o,c)=>{Ul.parse(i,e).then(h=>{o(h),r(h)},h=>{var u;Nt.error("Error parsing",h),(u=Dn.parseError)==null||u.call(Dn,h),c(h),n(h)})}),"performCall");Kg.push(a),Ij().catch(n)}),"parse"),$j=O((i,e,r)=>new Promise((n,a)=>{const o=O(()=>new Promise((c,h)=>{Ul.render(i,e,r).then(u=>{c(u),n(u)},u=>{var d;Nt.error("Error parsing",u),(d=Dn.parseError)==null||d.call(Dn,u),h(u),a(u)})}),"performCall");Kg.push(o),Ij().catch(a)}),"render"),eit=O(()=>Object.keys(Il).map(i=>({id:i})),"getRegisteredDiagramsMetadata"),Dn={startOnLoad:!0,mermaidAPI:Ul,parse:tit,render:$j,init:Zet,run:jj,registerExternalDiagrams:Qet,registerLayoutLoaders:U5,initialize:Dj,parseError:void 0,contentLoaded:Fj,setParseErrorHandler:Jet,detectType:cC,registerIconPacks:hZ,getRegisteredDiagramsMetadata:eit},QC=Dn;/*! Check if previously processed *//*!
|
|
457
|
+
* Wait for document loaded before starting the execution
|
|
458
|
+
*/let lN=null;function iit(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 zj(i){lN!==i&&(QC.initialize(iit(i)),lN=i)}function rit(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 Pj(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(rit);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 nit(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 QC.render(u,h);f.innerHTML=g;const x=f.querySelector("svg");x&&(x.removeAttribute("height"),x.style.maxWidth="100%",x.style.height="auto",Pj(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 ait(i,e,r,n="mmd"){Y.useEffect(()=>{const a=i.current;if(!a||!e)return;zj(r);let o=!1;return queueMicrotask(()=>{o||nit(a,n)}),()=>{o=!0}},[i,e,r,n])}var x0,cN;function sit(){if(cN)return x0;cN=1;function i(it){return it instanceof Map?it.clear=it.delete=it.set=function(){throw new Error("map is read-only")}:it instanceof Set&&(it.add=it.clear=it.delete=function(){throw new Error("set is read-only")}),Object.freeze(it),Object.getOwnPropertyNames(it).forEach(wt=>{const jt=it[wt],he=typeof jt;(he==="object"||he==="function")&&!Object.isFrozen(jt)&&i(jt)}),it}class e{constructor(wt){wt.data===void 0&&(wt.data={}),this.data=wt.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(it){return it.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function n(it,...wt){const jt=Object.create(null);for(const he in it)jt[he]=it[he];return wt.forEach(function(he){for(const si in he)jt[si]=he[si]}),jt}const a="</span>",o=it=>!!it.scope,c=(it,{prefix:wt})=>{if(it.startsWith("language:"))return it.replace("language:","language-");if(it.includes(".")){const jt=it.split(".");return[`${wt}${jt.shift()}`,...jt.map((he,si)=>`${he}${"_".repeat(si+1)}`)].join(" ")}return`${wt}${it}`};class h{constructor(wt,jt){this.buffer="",this.classPrefix=jt.classPrefix,wt.walk(this)}addText(wt){this.buffer+=r(wt)}openNode(wt){if(!o(wt))return;const jt=c(wt.scope,{prefix:this.classPrefix});this.span(jt)}closeNode(wt){o(wt)&&(this.buffer+=a)}value(){return this.buffer}span(wt){this.buffer+=`<span class="${wt}">`}}const u=(it={})=>{const wt={children:[]};return Object.assign(wt,it),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 jt=u({scope:wt});this.add(jt),this.stack.push(jt)}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,jt){return typeof jt=="string"?wt.addText(jt):jt.children&&(wt.openNode(jt),jt.children.forEach(he=>this._walk(wt,he)),wt.closeNode(jt)),wt}static _collapse(wt){typeof wt!="string"&&wt.children&&(wt.children.every(jt=>typeof jt=="string")?wt.children=[wt.children.join("")]:wt.children.forEach(jt=>{d._collapse(jt)}))}}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,jt){const he=wt.root;jt&&(he.scope=`language:${jt}`),this.add(he)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(it){return it?typeof it=="string"?it:it.source:null}function x(it){return C("(?=",it,")")}function y(it){return C("(?:",it,")*")}function v(it){return C("(?:",it,")?")}function C(...it){return it.map(jt=>g(jt)).join("")}function _(it){const wt=it[it.length-1];return typeof wt=="object"&&wt.constructor===Object?(it.splice(it.length-1,1),wt):{}}function k(...it){return"("+(_(it).capture?"":"?:")+it.map(he=>g(he)).join("|")+")"}function T(it){return new RegExp(it.toString()+"|").exec("").length-1}function E(it,wt){const jt=it&&it.exec(wt);return jt&&jt.index===0}const A=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B(it,{joinWith:wt}){let jt=0;return it.map(he=>{jt+=1;const si=jt;let pe=g(he),Wt="";for(;pe.length>0;){const Pt=A.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])+si):(Wt+=Pt[0],Pt[0]==="("&&jt++)}return Wt}).map(he=>`(${he})`).join(wt)}const L=/\b\B/,N="[a-zA-Z]\\w*",M="[a-zA-Z_]\\w*",I="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",W="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",K=(it={})=>{const wt=/^#![ ]*\//;return it.binary&&(it.begin=C(wt,/.*\b/,it.binary,/\b.*/)),n({scope:"meta",begin:wt,end:/$/,relevance:0,"on:begin":(jt,he)=>{jt.index!==0&&he.ignoreMatch()}},it)},z={begin:"\\\\[\\s\\S]",relevance:0},G={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},D={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},F={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/},q=function(it,wt,jt={}){const he=n({scope:"comment",begin:it,end:wt,contains:[]},jt);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 si=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:C(/[ ]+/,"(",si,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),he},X=q("//","$"),nt=q("/\\*","\\*/"),H=q("#","$"),J={scope:"number",begin:I,relevance:0},ht={scope:"number",begin:j,relevance:0},at={scope:"number",begin:P,relevance:0},vt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[z,{begin:/\[/,end:/\]/,relevance:0,contains:[z]}]},ct={scope:"title",begin:N,relevance:0},Z={scope:"title",begin:M,relevance:0},Q={begin:"\\.\\s*"+M,relevance:0};var ot=Object.freeze({__proto__:null,APOS_STRING_MODE:G,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:at,BINARY_NUMBER_RE:P,COMMENT:q,C_BLOCK_COMMENT_MODE:nt,C_LINE_COMMENT_MODE:X,C_NUMBER_MODE:ht,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(it){return Object.assign(it,{"on:begin":(wt,jt)=>{jt.data._beginMatch=wt[1]},"on:end":(wt,jt)=>{jt.data._beginMatch!==wt[1]&&jt.ignoreMatch()}})},HASH_COMMENT_MODE:H,IDENT_RE:N,MATCH_NOTHING_RE:L,METHOD_GUARD:Q,NUMBER_MODE:J,NUMBER_RE:I,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:D,REGEXP_MODE:vt,RE_STARTERS_RE:W,SHEBANG:K,TITLE_MODE:ct,UNDERSCORE_IDENT_RE:M,UNDERSCORE_TITLE_MODE:Z});function Ct(it,wt){it.input[it.index-1]==="."&&wt.ignoreMatch()}function At(it,wt){it.className!==void 0&&(it.scope=it.className,delete it.className)}function Dt(it,wt){wt&&it.beginKeywords&&(it.begin="\\b("+it.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",it.__beforeBegin=Ct,it.keywords=it.keywords||it.beginKeywords,delete it.beginKeywords,it.relevance===void 0&&(it.relevance=0))}function qt(it,wt){Array.isArray(it.illegal)&&(it.illegal=k(...it.illegal))}function Rt(it,wt){if(it.match){if(it.begin||it.end)throw new Error("begin & end are not supported with match");it.begin=it.match,delete it.match}}function Gt(it,wt){it.relevance===void 0&&(it.relevance=1)}const zt=(it,wt)=>{if(!it.beforeMatch)return;if(it.starts)throw new Error("beforeMatch cannot be used with starts");const jt=Object.assign({},it);Object.keys(it).forEach(he=>{delete it[he]}),it.keywords=jt.keywords,it.begin=C(jt.beforeMatch,x(jt.begin)),it.starts={relevance:0,contains:[Object.assign(jt,{endsParent:!0})]},it.relevance=0,delete jt.beforeMatch},ye=["of","and","for","in","not","or","if","then","parent","list","value"],Ne="keyword";function ve(it,wt,jt=Ne){const he=Object.create(null);return typeof it=="string"?si(jt,it.split(" ")):Array.isArray(it)?si(jt,it):Object.keys(it).forEach(function(pe){Object.assign(he,ve(it[pe],wt,pe))}),he;function si(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(it,wt){return wt?Number(wt):Li(it)?0:1}function Li(it){return ye.includes(it.toLowerCase())}const Ti={},fe=it=>{console.error(it)},Ci=(it,...wt)=>{console.log(`WARN: ${it}`,...wt)},$e=(it,wt)=>{Ti[`${it}/${wt}`]||(console.log(`Deprecated as of ${it}. ${wt}`),Ti[`${it}/${wt}`]=!0)},Ue=new Error;function Fe(it,wt,{key:jt}){let he=0;const si=it[jt],pe={},Wt={};for(let Pt=1;Pt<=wt.length;Pt++)Wt[Pt+he]=si[Pt],pe[Pt+he]=!0,he+=T(wt[Pt-1]);it[jt]=Wt,it[jt]._emit=pe,it[jt]._multi=!0}function Ii(it){if(Array.isArray(it.begin)){if(it.skip||it.excludeBegin||it.returnBegin)throw fe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ue;if(typeof it.beginScope!="object"||it.beginScope===null)throw fe("beginScope must be object"),Ue;Fe(it,it.begin,{key:"beginScope"}),it.begin=B(it.begin,{joinWith:""})}}function Oi(it){if(Array.isArray(it.end)){if(it.skip||it.excludeEnd||it.returnEnd)throw fe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ue;if(typeof it.endScope!="object"||it.endScope===null)throw fe("endScope must be object"),Ue;Fe(it,it.end,{key:"endScope"}),it.end=B(it.end,{joinWith:""})}}function Cr(it){it.scope&&typeof it.scope=="object"&&it.scope!==null&&(it.beginScope=it.scope,delete it.scope)}function _n(it){Cr(it),typeof it.beginScope=="string"&&(it.beginScope={_wrap:it.beginScope}),typeof it.endScope=="string"&&(it.endScope={_wrap:it.endScope}),Ii(it),Oi(it)}function $i(it){function wt(Wt,Pt){return new RegExp(g(Wt),"m"+(it.case_insensitive?"i":"")+(it.unicodeRegex?"u":"")+(Pt?"g":""))}class jt{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 oi=le.findIndex((on,Gr)=>Gr>0&&on!==void 0),gi=this.matchIndexes[oi];return le.splice(0,oi),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 jt;return this.rules.slice(Pt).forEach(([oi,gi])=>le.addRule(oi,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 oi=le.exec(Pt);if(this.resumingScanAtSamePosition()&&!(oi&&oi.index===this.lastIndex)){const gi=this.getMatcher(0);gi.lastIndex=this.lastIndex+1,oi=gi.exec(Pt)}return oi&&(this.regexIndex+=oi.position+1,this.regexIndex===this.count&&this.considerAll()),oi}}function si(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,_n,zt].forEach(gi=>gi(Wt,Pt)),it.compilerExtensions.forEach(gi=>gi(Wt,Pt)),Wt.__beforeBegin=null,[Dt,qt,Gt].forEach(gi=>gi(Wt,Pt)),Wt.isCompiled=!0;let oi=null;return typeof Wt.keywords=="object"&&Wt.keywords.$pattern&&(Wt.keywords=Object.assign({},Wt.keywords),oi=Wt.keywords.$pattern,delete Wt.keywords.$pattern),oi=oi||/\w+/,Wt.keywords&&(Wt.keywords=ve(Wt.keywords,it.case_insensitive)),le.keywordPatternRe=wt(oi,!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=si(le),le}if(it.compilerExtensions||(it.compilerExtensions=[]),it.contains&&it.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return it.classNameAliases=n(it.classNameAliases||{}),pe(it)}function je(it){return it?it.endsWithParent||je(it.starts):!1}function Ke(it){return it.variants&&!it.cachedVariants&&(it.cachedVariants=it.variants.map(function(wt){return n(it,{variants:null},wt)})),it.cachedVariants?it.cachedVariants:je(it)?n(it,{starts:it.starts?n(it.starts):null}):Object.isFrozen(it)?n(it):it}var Be="11.11.1";class dr extends Error{constructor(wt,jt){super(wt),this.name="HTMLInjectionError",this.html=jt}}const _i=r,Qi=n,Ae=Symbol("nomatch"),rr=7,Sr=function(it){const wt=Object.create(null),jt=Object.create(null),he=[];let si=!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(ft){return Pt.noHighlightRe.test(ft)}function oi(ft){let Lt=ft.className+" ";Lt+=ft.parentNode?ft.parentNode.className:"";const It=Pt.languageDetectRe.exec(Lt);if(It){const re=fr(It[1]);return re||(Ci(pe.replace("{}",It[1])),Ci("Falling back to no-highlight mode for this block.",ft)),re?It[1]:"no-highlight"}return Lt.split(/\s+/).find(re=>le(re)||fr(re))}function gi(ft,Lt,It){let re="",ze="";typeof Lt=="object"?(re=ft,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.
|
|
459
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),ze=ft,re=Lt),It===void 0&&(It=!0);const ci={code:re,language:ze};V("before:highlight",ci);const Ve=ci.result?ci.result:on(ci.language,ci.code,It);return Ve.code=ci.code,V("after:highlight",Ve),Ve}function on(ft,Lt,It,re){const ze=Object.create(null);function ci(Ft,te){return Ft.keywords[te]}function Ve(){if(!$t.keywords){Ie.addText(He);return}let Ft=0;$t.keywordPatternRe.lastIndex=0;let te=$t.keywordPatternRe.exec(He),Ee="";for(;te;){Ee+=He.substring(Ft,te.index);const We=Mt.case_insensitive?te[0].toLowerCase():te[0],Pi=ci($t,We);if(Pi){const[Un,Bh]=Pi;if(Ie.addText(Ee),Ee="",ze[We]=(ze[We]||0)+1,ze[We]<=rr&&(Dr+=Bh),Un.startsWith("_"))Ee+=te[0];else{const rf=Mt.classNameAliases[Un]||Un;Gi(te[0],rf)}}else Ee+=te[0];Ft=$t.keywordPatternRe.lastIndex,te=$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=nr(He,$t.subLanguage.length?$t.subLanguage:null);$t.relevance>0&&(Dr+=Ft.relevance),Ie.__addSublanguage(Ft._emitter,Ft.language)}function _e(){$t.subLanguage!=null?zi():Ve(),He=""}function Gi(Ft,te){Ft!==""&&(Ie.startScope(te),Ie.addText(Ft),Ie.endScope())}function zn(Ft,te){let Ee=1;const We=te.length-1;for(;Ee<=We;){if(!Ft._emit[Ee]){Ee++;continue}const Pi=Mt.classNameAliases[Ft[Ee]]||Ft[Ee],Un=te[Ee];Pi?Gi(Un,Pi):(He=Un,Ve(),He=""),Ee++}}function la(Ft,te){return Ft.scope&&typeof Ft.scope=="string"&&Ie.openNode(Mt.classNameAliases[Ft.scope]||Ft.scope),Ft.beginScope&&(Ft.beginScope._wrap?(Gi(He,Mt.classNameAliases[Ft.beginScope._wrap]||Ft.beginScope._wrap),He=""):Ft.beginScope._multi&&(zn(Ft.beginScope,te),He="")),$t=Object.create(Ft,{parent:{value:$t}}),$t}function qs(Ft,te,Ee){let We=E(Ft.endRe,Ee);if(We){if(Ft["on:end"]){const Pi=new e(Ft);Ft["on:end"](te,Pi),Pi.isMatchIgnored&&(We=!1)}if(We){for(;Ft.endsParent&&Ft.parent;)Ft=Ft.parent;return Ft}}if(Ft.endsWithParent)return qs(Ft.parent,te,Ee)}function Ja(Ft){return $t.matcher.regexIndex===0?(He+=Ft[0],1):(Hs=!0,0)}function Wo(Ft){const te=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(te);return Ee.skip?He+=te:(Ee.excludeBegin&&(He+=te),_e(),!Ee.returnBegin&&!Ee.excludeBegin&&(He=te)),la(Ee,Ft),Ee.returnBegin?0:te.length}function Er(Ft){const te=Ft[0],Ee=Lt.substring(Ft.index),We=qs($t,Ft,Ee);if(!We)return Ae;const Pi=$t;$t.endScope&&$t.endScope._wrap?(_e(),Gi(te,$t.endScope._wrap)):$t.endScope&&$t.endScope._multi?(_e(),zn($t.endScope,Ft)):Pi.skip?He+=te:(Pi.returnEnd||Pi.excludeEnd||(He+=te),_e(),Pi.excludeEnd&&(He=te));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:te.length}function Pn(){const Ft=[];for(let te=$t;te!==Mt;te=te.parent)te.scope&&Ft.unshift(te.scope);Ft.forEach(te=>Ie.openNode(te))}let mt={};function Bt(Ft,te){const Ee=te&&te[0];if(He+=Ft,Ee==null)return _e(),0;if(mt.type==="begin"&&te.type==="end"&&mt.index===te.index&&Ee===""){if(He+=Lt.slice(te.index,te.index+1),!si){const We=new Error(`0 width match regex (${ft})`);throw We.languageName=ft,We.badRule=mt.rule,We}return 1}if(mt=te,te.type==="begin")return Wo(te);if(te.type==="illegal"&&!It){const We=new Error('Illegal lexeme "'+Ee+'" for mode "'+($t.scope||"<unnamed>")+'"');throw We.mode=$t,We}else if(te.type==="end"){const We=Er(te);if(We!==Ae)return We}if(te.type==="illegal"&&Ee==="")return He+=`
|
|
460
|
+
`,1;if(Us>1e5&&Us>te.index*3)throw new Error("potential infinite loop, way more iterations than matches");return He+=Ee,Ee.length}const Mt=fr(ft);if(!Mt)throw fe(pe.replace("{}",ft)),new Error('Unknown language: "'+ft+'"');const Ut=$i(Mt);let Le="",$t=re||Ut;const Je={},Ie=new Pt.__emitter(Pt);Pn();let He="",Dr=0,qn=0,Us=0,Hs=!1;try{if(Mt.__emitTokens)Mt.__emitTokens(Lt,Ie);else{for($t.matcher.considerAll();;){Us++,Hs?Hs=!1:$t.matcher.considerAll(),$t.matcher.lastIndex=qn;const Ft=$t.matcher.exec(Lt);if(!Ft)break;const te=Lt.substring(qn,Ft.index),Ee=Bt(te,Ft);qn=Ft.index+Ee}Bt(Lt.substring(qn))}return Ie.finalize(),Le=Ie.toHTML(),{language:ft,value:Le,relevance:Dr,illegal:!1,_emitter:Ie,_top:$t}}catch(Ft){if(Ft.message&&Ft.message.includes("Illegal"))return{language:ft,value:_i(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(si)return{language:ft,value:_i(Lt),illegal:!1,relevance:0,errorRaised:Ft,_emitter:Ie,_top:$t};throw Ft}}function Gr(ft){const Lt={value:_i(ft),illegal:!1,relevance:0,_top:Wt,_emitter:new Pt.__emitter(Pt)};return Lt._emitter.addText(ft),Lt}function nr(ft,Lt){Lt=Lt||Pt.languages||Object.keys(wt);const It=Gr(ft),re=Lt.filter(fr).filter(ln).map(_e=>on(_e,ft,!1));re.unshift(It);const ze=re.sort((_e,Gi)=>{if(_e.relevance!==Gi.relevance)return Gi.relevance-_e.relevance;if(_e.language&&Gi.language){if(fr(_e.language).supersetOf===Gi.language)return 1;if(fr(Gi.language).supersetOf===_e.language)return-1}return 0}),[ci,Ve]=ze,zi=ci;return zi.secondBest=Ve,zi}function ar(ft,Lt,It){const re=Lt&&jt[Lt]||It;ft.classList.add("hljs"),ft.classList.add(`language-${re}`)}function ki(ft){let Lt=null;const It=oi(ft);if(le(It))return;if(V("before:highlightElement",{el:ft,language:It}),ft.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ft);return}if(ft.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(ft)),Pt.throwUnescapedHTML))throw new dr("One of your code blocks includes unescaped HTML.",ft.innerHTML);Lt=ft;const re=Lt.textContent,ze=It?gi(re,{language:It,ignoreIllegals:!0}):nr(re);ft.innerHTML=ze.value,ft.dataset.highlighted="yes",ar(ft,It,ze.language),ft.result={language:ze.language,re:ze.relevance,relevance:ze.relevance},ze.secondBest&&(ft.secondBest={language:ze.secondBest.language,relevance:ze.secondBest.relevance}),V("after:highlightElement",{el:ft,result:ze,text:re})}function Wi(ft){Pt=Qi(Pt,ft)}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 ft(){Sn()}if(document.readyState==="loading"){wn||window.addEventListener("DOMContentLoaded",ft,!1),wn=!0;return}document.querySelectorAll(Pt.cssSelector).forEach(ki)}function Tr(ft,Lt){let It=null;try{It=Lt(it)}catch(re){if(fe("Language definition for '{}' could not be registered.".replace("{}",ft)),si)fe(re);else throw re;It=Wt}It.name||(It.name=ft),wt[ft]=It,It.rawDefinition=Lt.bind(null,it),It.aliases&&Yr(It.aliases,{languageName:ft})}function $n(ft){delete wt[ft];for(const Lt of Object.keys(jt))jt[Lt]===ft&&delete jt[Lt]}function Ea(){return Object.keys(wt)}function fr(ft){return ft=(ft||"").toLowerCase(),wt[ft]||wt[jt[ft]]}function Yr(ft,{languageName:Lt}){typeof ft=="string"&&(ft=[ft]),ft.forEach(It=>{jt[It.toLowerCase()]=Lt})}function ln(ft){const Lt=fr(ft);return Lt&&!Lt.disableAutodetect}function pr(ft){ft["before:highlightBlock"]&&!ft["before:highlightElement"]&&(ft["before:highlightElement"]=Lt=>{ft["before:highlightBlock"](Object.assign({block:Lt.el},Lt))}),ft["after:highlightBlock"]&&!ft["after:highlightElement"]&&(ft["after:highlightElement"]=Lt=>{ft["after:highlightBlock"](Object.assign({block:Lt.el},Lt))})}function li(ft){pr(ft),he.push(ft)}function Kt(ft){const Lt=he.indexOf(ft);Lt!==-1&&he.splice(Lt,1)}function V(ft,Lt){const It=ft;he.forEach(function(re){re[It]&&re[It](Lt)})}function kt(ft){return $e("10.7.0","highlightBlock will be removed entirely in v12.0"),$e("10.7.0","Please use highlightElement now."),ki(ft)}Object.assign(it,{highlight:gi,highlightAuto:nr,highlightAll:Sn,highlightElement:ki,highlightBlock:kt,configure:Wi,initHighlighting:kn,initHighlightingOnLoad:In,registerLanguage:Tr,unregisterLanguage:$n,listLanguages:Ea,getLanguage:fr,registerAliases:Yr,autoDetection:ln,inherit:Qi,addPlugin:li,removePlugin:Kt}),it.debugMode=function(){si=!1},it.safeMode=function(){si=!0},it.versionString=Be,it.regex={concat:C,lookahead:x,either:k,optional:v,anyNumberOfTimes:y};for(const ft in ot)typeof ot[ft]=="object"&&i(ot[ft]);return Object.assign(it,ot),it},Hi=Sr({});return Hi.newInstance=()=>Sr({}),x0=Hi,Hi.HighlightJS=Hi,Hi.default=Hi,x0}var v0,hN;function oit(){if(hN)return v0;hN=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 v0=i,v0}var C0,uN;function lit(){if(uN)return C0;uN=1;function i(e){const r=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:r.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},c=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),h={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(u);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},g={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),C={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},_=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],T={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["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"],L=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:_,literal:k,built_in:[...E,...A,"set","shopt",...B,...L]},contains:[v,e.SHEBANG(),C,x,c,h,T,u,d,f,g,n]}}return C0=i,C0}var _0,dN;function cit(){if(dN)return _0;dN=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},A={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,A,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 _0=i,_0}var k0,fN;function hit(){if(fN)return k0;fN=1;function i(e){const r=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",h="(?!struct)("+a+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:r.optional(o)+e.IDENT_RE,relevance:0},v=r.optional(o)+e.IDENT_RE+"\\s*\\(",C=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],B={type:_,keyword:C,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},L={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},N=[L,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:N.concat([{begin:/\(/,end:/\)/,keywords:B,contains:N.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:B,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:B,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:B,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,I,L,N,[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 k0=i,k0}var w0,pN;function uit(){if(pN)return w0;pN=1;function i(e){const r=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],c=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],h={keyword:o.concat(c),built_in:r,literal:a},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:h},v=e.inherit(y,{illegal:/\n/}),C={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},_={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},k=e.inherit(_,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});y.contains=[_,C,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],v.contains=[k,C,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[f,_,C,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},A=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:"("+A+"\\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 w0=i,w0}var S0,gN;function dit(){if(gN)return S0;gN=1;const i=d=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:d.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:d.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...r],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(d){const f=d.regex,g=i(d),x={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},y="and or not only",v=/@-?\w[\w]*(-\w+)*/,C="[a-zA-Z-][a-zA-Z0-9_-]*",_=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[g.BLOCK_COMMENT,x,g.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+C,relevance:0},g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[g.BLOCK_COMMENT,g.HEXCOLOR,g.IMPORTANT,g.CSS_NUMBER_MODE,..._,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[..._,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},g.FUNCTION_DISPATCH]},{begin:f.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:v},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:y,attribute:a.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},..._,g.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b"}]}}return S0=u,S0}var T0,mN;function fit(){if(mN)return T0;mN=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 T0=i,T0}var E0,yN;function pit(){if(yN)return E0;yN=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 E0=i,E0}var N0,bN;function git(){if(bN)return N0;bN=1;function i(e){const r=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=r.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=r.concat(a,/(::\w+)*/),h={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[u]}),e.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:h},x={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:r.concat(/<<[-~]?'?/,r.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",C={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:h}]},N=[x,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:h},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:h},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:n}],relevance:0},C,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:h},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);g.contains=N,_.contains=N;const P=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:h,contains:N}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:h,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(P).concat(f).concat(N)}}return N0=i,N0}var A0,xN;function mit(){if(xN)return A0;xN=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 A0=i,A0}var M0,vN;function yit(){if(vN)return M0;vN=1;function i(e){const r=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:r.concat(n,r.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return M0=i,M0}var B0,CN;function bit(){if(CN)return B0;CN=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 L0,_N;function xit(){if(_N)return L0;_N=1;var i="[0-9](_*[0-9])*",e=`\\.(${i})`,r="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${i})((${e})|\\.)?|(${e}))[eE][+-]?(${i})[fFdD]?\\b`},{begin:`\\b(${i})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${i})[fFdD]\\b`},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?(${i})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(c,h,u){return u===-1?"":c.replace(h,d=>a(c,h,u-1))}function o(c){const h=c.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",d=u+a("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),v={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},C={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},_={className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:v,illegal:/<\/|#/,contains:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[c.BACKSLASH_ESCAPE]},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[h.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[_,c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+d+"\\s+)",c.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:v,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[C,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,n,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},n,C]}}return L0=o,L0}var O0,kN;function vit(){if(kN)return O0;kN=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=(Z,{after:Q})=>{const tt="</"+Z[0].slice(1);return Z.input.indexOf(tt,Q)!==-1},x=i,y={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,C={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{const tt=Z[0].length+Z.index,ot=Z.input[tt];if(ot==="<"||ot===","){Q.ignoreMatch();return}ot===">"&&(g(Z,{after:tt})||Q.ignoreMatch());let Ct;const At=Z.input.substring(tt);if(Ct=At.match(/^\s*=/)){Q.ignoreMatch();return}if((Ct=At.match(/^\s+extends\s+/))&&Ct.index===0){Q.ignoreMatch();return}}},_={$pattern:i,keyword:e,literal:r,built_in:h,"variable.language":c},k="[0-9](_?[0-9])*",T=`\\.(${k})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",A={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:_,contains:[]},L={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"xml"}},N={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"css"}},M={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"graphql"}},I={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,B]},P={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]},W=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,L,N,M,I,{match:/\$\d+/},A];B.contains=W.concat({begin:/\{/,end:/\}/,keywords:_,contains:["self"].concat(W)});const K=[].concat(P,B.contains),z=K.concat([{begin:/(\s*)\(/,end:/\)/,keywords:_,contains:["self"].concat(K)}]),G={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:z},D={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"}}]},F={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]}},q={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},X={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[G],illegal:/%/},nt={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function H(Z){return f.concat("(?!",Z.join("|"),")")}const J={match:f.concat(/\b/,H([...o,"super","import"].map(Z=>`${Z}\\s*\\(`)),x,f.lookahead(/\s*\(/)),className:"title.function",relevance:0},ht={begin:f.concat(/\./,f.lookahead(f.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},at={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},G]},vt="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",ct={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(vt)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[G]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:_,exports:{PARAMS_CONTAINS:z,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),q,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,L,N,M,I,P,{match:/\$\d+/},A,F,{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:[P,d.REGEXP_MODE,{className:"function",begin:vt,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:z}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:y.begin,end:y.end},{match:v},{begin:C.begin,"on:begin":C.isTrulyOpeningTag,end:C.end}],subLanguage:"xml",contains:[{begin:C.begin,end:C.end,skip:!0,contains:["self"]}]}]},X,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[G,d.inherit(d.TITLE_MODE,{begin:x,className:"title.function"})]},{match:/\.\.\./,relevance:0},ht,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[G]},J,nt,D,at,{match:/\$[(.]/}]}}return O0=u,O0}var R0,wN;function Cit(){if(wN)return R0;wN=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 R0=i,R0}var j0,SN;function _it(){if(SN)return j0;SN=1;var i="[0-9](_*[0-9])*",e=`\\.(${i})`,r="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${i})((${e})|\\.)?|(${e}))[eE][+-]?(${i})[fFdD]?\\b`},{begin:`\\b(${i})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${i})[fFdD]\\b`},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?(${i})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(o){const c={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},h={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:o.UNDERSCORE_IDENT_RE+"@"},d={className:"subst",begin:/\$\{/,end:/\}/,contains:[o.C_NUMBER_MODE]},f={className:"variable",begin:"\\$"+o.UNDERSCORE_IDENT_RE},g={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[f,d]},{begin:"'",end:"'",illegal:/\n/,contains:[o.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[o.BACKSLASH_ESCAPE,f,d]}]};d.contains.push(g);const x={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+o.UNDERSCORE_IDENT_RE+")?"},y={className:"meta",begin:"@"+o.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[o.inherit(g,{className:"string"}),"self"]}]},v=n,C=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),_={variants:[{className:"type",begin:o.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},k=_;return k.variants[1].contains=[_],_.variants[1].contains=[k],{name:"Kotlin",aliases:["kt","kts"],keywords:c,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),o.C_LINE_COMMENT_MODE,C,h,u,x,y,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:o.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[o.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[_,o.C_LINE_COMMENT_MODE,C],relevance:0},o.C_LINE_COMMENT_MODE,C,x,y,g,o.C_NUMBER_MODE]},C]},{begin:[/class|interface|trait/,/\s+/,o.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},o.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},x,y]},g,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
461
|
+
`},v]}}return j0=a,j0}var D0,TN;function kit(){if(TN)return D0;TN=1;const i=f=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:f.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:f.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...r],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=o.concat(c).sort().reverse();function d(f){const g=i(f),x=u,y="and or not only",v="[\\w-]+",C="("+v+"|@\\{"+v+"\\})",_=[],k=[],T=function(K){return{className:"string",begin:"~?"+K+".*?"+K}},E=function(K,z,G){return{className:K,begin:z,relevance:G}},A={$pattern:/[a-z-]+/,keyword:y,attribute:a.join(" ")},B={begin:"\\(",end:"\\)",contains:k,keywords:A,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 L=k.concat({begin:/\{/,end:/\}/,contains:_}),N={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(k)},M={begin:C+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:k}}]},I={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:A,returnEnd:!0,contains:k,relevance:0}},j={className:"variable",variants:[{begin:"@"+v+"\\s*:",relevance:15},{begin:"@"+v}],starts:{end:"[;}]",returnEnd:!0,contains:L}},P={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:C,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,N,E("keyword","all\\b"),E("variable","@\\{"+v+"\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},g.CSS_NUMBER_MODE,E("selector-tag",C,0),E("selector-id","#"+C),E("selector-class","\\."+C,0),E("selector-tag","&",0),g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:L},{begin:"!important"},g.FUNCTION_DISPATCH]},W={begin:v+`:(:)?(${x.join("|")})`,returnBegin:!0,contains:[P]};return _.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,I,j,W,M,P,N,g.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:_}}return D0=d,D0}var F0,EN;function wit(){if(EN)return F0;EN=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 F0=i,F0}var I0,NN;function Sit(){if(NN)return I0;NN=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 I0=i,I0}var $0,AN;function Tit(){if(AN)return $0;AN=1;function i(e){const r=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},h={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:r.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,c,d],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(_,k,T="\\1")=>{const E=T==="\\1"?T:r.concat(T,k);return r.concat(r.concat("(?:",_,")"),k,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,T,a)},v=(_,k,T)=>r.concat(r.concat("(?:",_,")"),k,/(?:\\.|[^\\\/])*?/,T,a),C=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),h,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",r.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",r.either(...x,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=C,h.contains=C,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:C}}return $0=i,$0}var z0,MN;function Eit(){if(MN)return z0;MN=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 z0=i,z0}var P0,BN;function Nit(){if(BN)return P0;BN=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":(G,D)=>{D.data._beginMatch=G[1]||G[2]},"on:end":(G,D)=>{D.data._beginMatch!==G[1]&&D.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
462
|
+
]`,C={scope:"string",variants:[g,f,x,y]},_={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},k=["false","null","true"],T=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],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:(G=>{const D=[];return G.forEach(F=>{D.push(F),F.toLowerCase()===F?D.push(F.toUpperCase()):D.push(F.toLowerCase())}),D})(k),built_in:E},L=G=>G.map(D=>D.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,r.concat(v,"+"),r.concat("(?!",L(E).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},M=r.concat(a,"\\b(?!\\()"),I={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,r.concat(/::/,r.lookahead(/(?!class\b)/)),M],scope:{1:"title.class",3:"variable.constant"}},{match:[o,r.concat("::",r.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},j={scope:"attr",match:r.concat(a,r.lookahead(":"),r.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:B,contains:[j,h,I,e.C_BLOCK_COMMENT_MODE,C,_,N]},W={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",L(T).join("\\b|"),"|",L(E).join("\\b|"),"\\b)"),a,r.concat(v,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(W);const K=[j,I,e.C_BLOCK_COMMENT_MODE,C,_,N],z={begin:r.concat(/#\[\s*\\?/,r.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:B,contains:[z,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},h,W,I,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:B,contains:["self",z,h,I,e.C_BLOCK_COMMENT_MODE,C,_]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},C,_]}}return P0=i,P0}var q0,LN;function Ait(){if(LN)return q0;LN=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 q0=i,q0}var U0,ON;function Mit(){if(ON)return U0;ON=1;function i(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return U0=i,U0}var H0,RN;function Bit(){if(RN)return H0;RN=1;function i(e){const r=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},g={begin:/\{\{/,relevance:0},x={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,g,f]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",v=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,C=`\\b|${a.join("|")}`,_={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${C})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${C})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${C})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${C})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${C})`},{begin:`\\b(${y})[jJ](?=${C})`}]},k={className:"comment",begin:r.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},T={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",d,_,x,e.HASH_COMMENT_MODE]}]};return f.contains=[x,_,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[d,_,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[T]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[_,T,x]}]}}return H0=i,H0}var W0,jN;function Lit(){if(jN)return W0;jN=1;function i(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return W0=i,W0}var G0,DN;function Oit(){if(DN)return G0;DN=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 G0=i,G0}var Y0,FN;function Rit(){if(FN)return Y0;FN=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 Y0=i,Y0}var K0,IN;function jit(){if(IN)return K0;IN=1;const i=d=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:d.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:d.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...r],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(d){const f=i(d),g=c,x=o,y="@[a-z-]+",v="and or not only",_={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,f.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+x.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+g.join("|")+")"},_,{begin:/\(/,end:/\)/,contains:[f.CSS_NUMBER_MODE]},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[f.BLOCK_COMMENT,_,f.HEXCOLOR,f.CSS_NUMBER_MODE,d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,f.IMPORTANT,f.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:y,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:v,attribute:a.join(" ")},contains:[{begin:y,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},_,d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,f.HEXCOLOR,f.CSS_NUMBER_MODE]},f.FUNCTION_DISPATCH]}}return K0=u,K0}var V0,$N;function Dit(){if($N)return V0;$N=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 V0=i,V0}var X0,zN;function Fit(){if(zN)return X0;zN=1;function i(e){const r=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],h=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,C=[...f,...d].filter(L=>!g.includes(L)),_={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(L){return r.concat(/\b/,r.either(...L.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:E(y),relevance:0};function B(L,{exceptions:N,when:M}={}){const I=M;return N=N||[],L.map(j=>j.match(/\|\d+$/)||N.includes(j)?j:I(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:B(C,{when:L=>L.length<3}),literal:c,type:u,built_in:x},contains:[{scope:"type",match:E(h)},A,T,_,a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}return X0=i,X0}var Z0,PN;function Iit(){if(PN)return Z0;PN=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(j=>i(j)).join("")}function n(M){const I=M[M.length-1];return typeof I=="object"&&I.constructor===Object?(M.splice(M.length-1,1),I):{}}function a(...M){return"("+(n(M).capture?"":"?:")+M.map(P=>i(P)).join("|")+")"}const o=M=>r(/\b/,M,/\w$/.test(M)?/\b/:/\B/),c=["Protocol","Type"].map(o),h=["init","self"].map(o),u=["Any","Self"],d=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],f=["false","nil","true"],g=["assignment","associativity","higherThan","left","lowerThan","none","right"],x=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],y=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],v=a(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),C=a(v,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_=r(v,C,"*"),k=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),T=a(k,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),E=r(k,T,"*"),A=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"],L=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function N(M){const I={match:/\s+/,relevance:0},j=M.COMMENT("/\\*","\\*/",{contains:["self"]}),P=[M.C_LINE_COMMENT_MODE,j],W={match:[/\./,a(...c,...h)],className:{2:"keyword"}},K={match:r(/\./,a(...d)),relevance:0},z=d.filter(Ae=>typeof Ae=="string").concat(["_|0"]),G=d.filter(Ae=>typeof Ae!="string").concat(u).map(o),D={variants:[{className:"keyword",match:a(...G,...h)}]},F={$pattern:a(/\b\w+/,/#\w+/),keyword:z.concat(x),literal:f},q=[W,K,D],X={match:r(/\./,a(...y)),relevance:0},nt={className:"built_in",match:r(/\b/,a(...y),/(?=\()/)},H=[X,nt],J={match:/->/,relevance:0},ht={className:"operator",relevance:0,variants:[{match:_},{match:`\\.(\\.|${C})+`}]},at=[J,ht],vt="([0-9]_*)+",ct="([0-9a-fA-F]_*)+",Z={className:"number",relevance:0,variants:[{match:`\\b(${vt})(\\.(${vt}))?([eE][+-]?(${vt}))?\\b`},{match:`\\b0x(${ct})(\\.(${ct}))?([pP][+-]?(${vt}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Q=(Ae="")=>({className:"subst",variants:[{match:r(/\\/,Ae,/[0\\tnr"']/)},{match:r(/\\/,Ae,/u\{[0-9a-fA-F]{1,8}\}/)}]}),tt=(Ae="")=>({className:"subst",match:r(/\\/,Ae,/[\t ]*(?:[\r\n]|\r\n)/)}),ot=(Ae="")=>({className:"subst",label:"interpol",begin:r(/\\/,Ae,/\(/),end:/\)/}),Ct=(Ae="")=>({begin:r(Ae,/"""/),end:r(/"""/,Ae),contains:[Q(Ae),tt(Ae),ot(Ae)]}),At=(Ae="")=>({begin:r(Ae,/"/),end:r(/"/,Ae),contains:[Q(Ae),ot(Ae)]}),Dt={className:"string",variants:[Ct(),Ct("#"),Ct("##"),Ct("###"),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 rr=r(Ae,/\//),Sr=r(/\//,Ae);return{begin:rr,end:Sr,contains:[...qt,{scope:"comment",begin:`#(?!.*${Sr})`,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:L,contains:[...at,Z,Dt]}]}},Ti={scope:"keyword",match:r(/@/,a(...B),e(a(/\(/,/\s+/)))},fe={scope:"meta",match:r(/@/,E)},Ci=[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:A,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:r(/\s+&\s+/,e(A)),relevance:0}]},Ue={begin:/</,end:/>/,keywords:F,contains:[...P,...q,...Ci,J,$e]};$e.contains.push(Ue);const Fe={match:r(E,/\s*:/),keywords:"_|0",relevance:0},Ii={begin:/\(/,end:/\)/,relevance:0,keywords:F,contains:["self",Fe,...P,zt,...q,...H,...at,Z,Dt,...pi,...Ci,$e]},Oi={begin:/</,end:/>/,keywords:"repeat each",contains:[...P,$e]},Cr={begin:a(e(r(E,/\s*:/)),e(r(E,/\s+/,E,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:E}]},_n={begin:/\(/,end:/\)/,keywords:F,contains:[Cr,...P,...q,...at,Z,Dt,...Ci,$e,Ii],endsParent:!0,illegal:/["']/},$i={match:[/(func|macro)/,/\s+/,a(ye.match,E,_)],className:{1:"keyword",3:"title.function"},contains:[Oi,_n,I],illegal:[/\[/,/%/]},je={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Oi,_n,I],illegal:/\[|%/},Ke={match:[/operator/,/\s+/,_],className:{1:"keyword",3:"title"}},Be={begin:[/precedencegroup/,/\s+/,A],className:{1:"keyword",3:"title"},contains:[$e],keywords:[...g,...f],end:/}/},dr={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},_i={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Qi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,E,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:F,contains:[Oi,...q,{begin:/:/,end:/\{/,keywords:F,contains:[{scope:"title.class.inherited",match:A},...q],relevance:0}]};for(const Ae of Dt.variants){const rr=Ae.contains.find(Hi=>Hi.label==="interpol");rr.keywords=F;const Sr=[...q,...H,...at,Z,Dt,...pi];rr.contains=[...Sr,{begin:/\(/,end:/\)/,contains:["self",...Sr]}]}return{name:"Swift",keywords:F,contains:[...P,$i,je,dr,_i,Qi,Ke,Be,{beginKeywords:"import",end:/$/,contains:[...P],relevance:0},zt,...q,...H,...at,Z,Dt,...pi,...Ci,$e,Ii]}}return Z0=N,Z0}var Q0,qN;function $it(){if(qN)return Q0;qN=1;function i(e){const r="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},h={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},u=e.inherit(h,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:r,relevance:0},C={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},_={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},k=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:r,keywords:{literal:r}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},C,_,c,h],T=[...k];return T.pop(),T.push(u),v.contains=T,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}return Q0=i,Q0}var J0,UN;function zit(){if(UN)return J0;UN=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=(Q,{after:tt})=>{const ot="</"+Q[0].slice(1);return Q.input.indexOf(ot,tt)!==-1},y=i,v={begin:"<>",end:"</>"},C=/<[A-Za-z0-9\\._:-]+\s*\/>/,_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,tt)=>{const ot=Q[0].length+Q.index,Ct=Q.input[ot];if(Ct==="<"||Ct===","){tt.ignoreMatch();return}Ct===">"&&(x(Q,{after:ot})||tt.ignoreMatch());let At;const Dt=Q.input.substring(ot);if(At=Dt.match(/^\s*=/)){tt.ignoreMatch();return}if((At=Dt.match(/^\s+extends\s+/))&&At.index===0){tt.ignoreMatch();return}}},k={$pattern:i,keyword:e,literal:r,built_in:h,"variable.language":c},T="[0-9](_?[0-9])*",E=`\\.(${T})`,A="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",B={className:"number",variants:[{begin:`(\\b(${A})((${E})|\\.)?|(${E}))[eE][+-]?(${T})\\b`},{begin:`\\b(${A})\\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},L={className:"subst",begin:"\\$\\{",end:"\\}",keywords:k,contains:[]},N={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,L],subLanguage:"xml"}},M={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,L],subLanguage:"css"}},I={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,L],subLanguage:"graphql"}},j={className:"string",begin:"`",end:"`",contains:[f.BACKSLASH_ESCAPE,L]},W={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,N,M,I,j,{match:/\$\d+/},B];L.contains=K.concat({begin:/\{/,end:/\}/,keywords:k,contains:["self"].concat(K)});const z=[].concat(W,L.contains),G=z.concat([{begin:/(\s*)\(/,end:/\)/,keywords:k,contains:["self"].concat(z)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:k,contains:G},F={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"}}]},q={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]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},nt={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(Q){return g.concat("(?!",Q.join("|"),")")}const ht={match:g.concat(/\b/,J([...o,"super","import"].map(Q=>`${Q}\\s*\\(`)),y,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},at={begin:g.concat(/\./,g.lookahead(g.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},vt={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},ct="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",Z={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(ct)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:k,exports:{PARAMS_CONTAINS:G,CLASS_REFERENCE:q},illegal:/#(?![$_A-z])/,contains:[f.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,N,M,I,j,W,{match:/\$\d+/},B,q,{scope:"attr",match:y+g.lookahead(":"),relevance:0},Z,{begin:"("+f.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[W,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:G}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:v.begin,end:v.end},{match:C},{begin:_.begin,"on:begin":_.isTrulyOpeningTag,end:_.end}],subLanguage:"xml",contains:[{begin:_.begin,end:_.end,skip:!0,contains:["self"]}]}]},nt,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+f.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,f.inherit(f.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},at,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},ht,H,F,vt,{match:/\$[(.]/}]}}function d(f){const g=f.regex,x=u(f),y=i,v=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],C={begin:[/namespace/,/\s+/,f.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},_={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:v},contains:[x.exports.CLASS_REFERENCE]},k={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},T=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],E={$pattern:i,keyword:e.concat(T),literal:r,built_in:h.concat(v),"variable.language":c},A={className:"meta",begin:"@"+y},B=(I,j,P)=>{const W=I.contains.findIndex(K=>K.label===j);if(W===-1)throw new Error("can not find mode to replace");I.contains.splice(W,1,P)};Object.assign(x.keywords,E),x.exports.PARAMS_CONTAINS.push(A);const L=x.contains.find(I=>I.scope==="attr"),N=Object.assign({},L,{match:g.concat(y,g.lookahead(/\s*\?:/))});x.exports.PARAMS_CONTAINS.push([x.exports.CLASS_REFERENCE,L,N]),x.contains=x.contains.concat([A,C,_,N]),B(x,"shebang",f.SHEBANG()),B(x,"use_strict",k);const M=x.contains.find(I=>I.label==="func.def");return M.relevance=0,Object.assign(x,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),x}return J0=d,J0}var tx,HN;function Pit(){if(HN)return tx;HN=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 tx=i,tx}var ex,WN;function qit(){if(WN)return ex;WN=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 ex=i,ex}var ix,GN;function Uit(){if(GN)return ix;GN=1;var i=sit();return i.registerLanguage("xml",oit()),i.registerLanguage("bash",lit()),i.registerLanguage("c",cit()),i.registerLanguage("cpp",hit()),i.registerLanguage("csharp",uit()),i.registerLanguage("css",dit()),i.registerLanguage("markdown",fit()),i.registerLanguage("diff",pit()),i.registerLanguage("ruby",git()),i.registerLanguage("go",mit()),i.registerLanguage("graphql",yit()),i.registerLanguage("ini",bit()),i.registerLanguage("java",xit()),i.registerLanguage("javascript",vit()),i.registerLanguage("json",Cit()),i.registerLanguage("kotlin",_it()),i.registerLanguage("less",kit()),i.registerLanguage("lua",wit()),i.registerLanguage("makefile",Sit()),i.registerLanguage("perl",Tit()),i.registerLanguage("objectivec",Eit()),i.registerLanguage("php",Nit()),i.registerLanguage("php-template",Ait()),i.registerLanguage("plaintext",Mit()),i.registerLanguage("python",Bit()),i.registerLanguage("python-repl",Lit()),i.registerLanguage("r",Oit()),i.registerLanguage("rust",Rit()),i.registerLanguage("scss",jit()),i.registerLanguage("shell",Dit()),i.registerLanguage("sql",Fit()),i.registerLanguage("swift",Iit()),i.registerLanguage("yaml",$it()),i.registerLanguage("typescript",zit()),i.registerLanguage("vbnet",Pit()),i.registerLanguage("wasm",qit()),i.HighlightJS=i,i.default=i,ix=i,ix}var Hit=Uit();const Wit=Id(Hit);function Git(i,e){Y.useEffect(()=>{const r=i.current;r&&r.querySelectorAll("pre > code:not(.language-mermaid)").forEach(n=>{if(n.dataset.highlighted!=="yes")try{Wit.highlightElement(n)}catch{}})},[i,e])}we.setOptions({gfm:!0,breaks:!0});function Jd({content:i,frontmatter:e}){const r=Y.useMemo(()=>Do.sanitize(we.parse(i)),[i]),n=Y.useRef(null),{resolved:a}=Wd();ait(n,r,a,"md-mmd"),Git(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 Yit({onManagePacks:i}){const{t:e}=Bi(),{data:r}=YG(),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(Jd,{content:n})}),a.length>0&&i&&m.jsx("button",{className:"update-badge-action",onClick:()=>{i(),c(!1)},children:e("update.managePacks")})]})]}):null}const rd=[.85,.9,1,1.1,1.2],qj="dreamcontext-zoom";function Kit(){try{const i=localStorage.getItem(qj);if(i!==null){const e=parseFloat(i);if(rd.includes(e))return e}}catch{}return 1}function Vit(i){document.documentElement.style.setProperty("--zoom",String(i))}function Xit({onNavigate:i}){const{theme:e,setTheme:r,resolved:n}=Wd(),{data:a}=nL(),[o,c]=Y.useState(Kit);Y.useEffect(()=>{Vit(o)},[o]);const h=(a==null?void 0:a.debt)??0,u=iL(h),d=rL(h),f=()=>{r(e==="system"?"light":e==="light"?"dark":"system")},g=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",x=rd.indexOf(o),y=x>0,v=x<rd.length-1,C=_=>{const k=x+_;if(k<0||k>=rd.length)return;const T=rd[k];c(T);try{localStorage.setItem(qj,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(Yit,{onManagePacks:i?()=>i("packs"):void 0}),m.jsxs("div",{className:"zoom-controls",children:[m.jsx("button",{className:"zoom-btn",onClick:()=>C(-1),disabled:!y,title:"Zoom out",children:"-"}),m.jsxs("span",{className:"zoom-label",children:[Math.round(o*100),"%"]}),m.jsx("button",{className:"zoom-btn",onClick:()=>C(1),disabled:!v,title:"Zoom in",children:"+"})]}),m.jsx("button",{className:"theme-toggle",onClick:f,title:`Theme: ${g}`,children:n==="dark"?m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{d:"M8 1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 1zm0 10a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 11zm7-3a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 15 8zM5 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 5 8zm7.07-4.07a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 1 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zM6.05 10.66a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 0 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zm7.72 3.12a.5.5 0 0 1-.71 0l-1.41-1.41a.5.5 0 1 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM5.34 6.05a.5.5 0 0 1-.71 0L3.22 4.64a.5.5 0 0 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8z"})}):m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:m.jsx("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"})})})]})]})}const Zit=[{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"}]}],Uj="dreamcontext.dashboard.sidebarCollapsed",Hj="dreamcontext.dashboard.aboutSeen",Oc=typeof window<"u"&&window.matchMedia?window.matchMedia("(max-width: 1024px)"):null;function Qit(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Uj)==="1"}catch{return!1}}function Jit(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Hj)==="1"}catch{return!1}}function trt({activePage:i,onNavigate:e}){const{t:r}=Bi(),[n,a]=Y.useState(Qit),[o,c]=Y.useState((Oc==null?void 0:Oc.matches)??!1),[h,u]=Y.useState(Jit);Y.useEffect(()=>{if(!Oc)return;const v=C=>c(C.matches);return Oc.addEventListener("change",v),()=>Oc.removeEventListener("change",v)},[]);const d=o||n,f=()=>{a(v=>{const C=!v;try{window.localStorage.setItem(Uj,C?"1":"0")}catch{}return C})},g=()=>{if(!h){u(!0);try{window.localStorage.setItem(Hj,"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")})]}),Zit.map(v=>m.jsxs("div",{className:"sidebar-group",children:[m.jsx("span",{className:"sidebar-group-label",children:r(v.labelKey)}),m.jsx("ul",{className:"sidebar-nav",children:v.items.map(({page:C,icon:_,labelKey:k})=>{y+=1;const T=r(k);return m.jsx("li",{className:`animate-stagger animate-stagger-${y}`,children:m.jsxs("button",{className:`sidebar-item ${i===C?"sidebar-item--active":""}`,onClick:()=>e(C),title:T,"aria-current":i===C?"page":void 0,children:[m.jsx("span",{className:"sidebar-icon",children:_}),m.jsx("span",{className:"sidebar-label",children:T})]})},C)})})]},v.labelKey)),m.jsx("div",{className:"sidebar-footer",children:m.jsxs("button",{className:`sidebar-item sidebar-item--about ${i==="about"?"sidebar-item--active":""}${x?" sidebar-item--nudge":""}`,onClick:g,title:r("nav.about"),"aria-current":i==="about"?"page":void 0,children:[m.jsx("span",{className:"sidebar-icon",children:"✷"}),m.jsx("span",{className:"sidebar-label",children:r("nav.about")})]})})]})}const Wj="dreamcontext.dashboard.activePage",ert=["tasks","core","knowledge","features","sleep","brain","council","taxonomy","settings","packs","about"];function irt(){if(typeof window>"u")return"brain";try{const i=window.localStorage.getItem(Wj);if(i&&ert.includes(i))return i}catch{}return"brain"}function rrt({children:i}){const[e,r]=Y.useState(irt),[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(Wj,f)}catch{}},[]),u=Y.useCallback(f=>{h(f,null)},[h]),d=Y.useCallback(()=>a(null),[]);return m.jsxs("div",{className:"shell",children:[m.jsx(Xit,{onNavigate:u}),m.jsxs("div",{className:"shell-body",children:[m.jsx(trt,{activePage:e,onNavigate:u}),m.jsx("main",{className:"shell-main",children:i({page:e,focusId:n,nonce:o,navigate:h,clearFocus:d})})]})]})}function nrt(){return ri({queryKey:["tasks"],queryFn:()=>Xt.get("/tasks"),select:i=>i.tasks})}function art(){const i=Ui();return ir({mutationFn:e=>Xt.post("/tasks",e),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function Gj(){const i=Ui();return ir({mutationFn:({slug:e,updates:r})=>Xt.patch(`/tasks/${e}`,r),onSuccess:(e,r)=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks",r.slug]})}})}function Yj(){const i=Ui();return ir({mutationFn:e=>Xt.del(`/tasks/${e}`),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function srt(){return ri({queryKey:["task-members"],queryFn:()=>Xt.get("/tasks/members"),select:i=>i.members,staleTime:300*1e3})}function ort(){return ri({queryKey:["tasks-sync-status"],queryFn:()=>Xt.get("/tasks/sync-status"),select:i=>i.status,refetchInterval:3e4})}function lrt(){const i=Ui();return ir({mutationFn:()=>Xt.post("/tasks/sync",{direction:"both"}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks-sync-status"]})}})}function crt(){return ri({queryKey:["features"],queryFn:()=>Xt.get("/features"),select:i=>i.features??[],staleTime:6e4})}function hrt(){const i=Ui();return ir({mutationFn:({slug:e,content:r})=>Xt.post(`/tasks/${e}/changelog`,{content:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function Kj(){return ri({queryKey:["releases"],queryFn:()=>Xt.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"}))})}function Vj(){return ri({queryKey:["releases"],queryFn:()=>Xt.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function urt(){const i=Ui();return ir({mutationFn:e=>Xt.post("/releases",{...e,status:"planning"}),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}function drt(){const i=Ui();return ir({mutationFn:({version:e,updates:r})=>Xt.patch(`/releases/${encodeURIComponent(e)}`,r),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}const Xj="dreamcontext:",Zj="kanban-presets",l1=`${Xj}${Zj}`;function Qj(i){return i?`${Xj}${i}:${Zj}`:l1}function frt(i){const e=Qj(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(l1);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(l1);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function Jj(i,e){try{localStorage.setItem(Qj(i),JSON.stringify(e))}catch{}}const Vg=new Map;function JC(i){let e=Vg.get(i);return e===void 0&&(e=frt(i),Vg.set(i,e)),e}const c1=new Set;function prt(i){return c1.add(i),()=>{c1.delete(i)}}function tD(){for(const i of c1)i()}function grt(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function mrt(i){return Y.useSyncExternalStore(prt,()=>JC(i))}function yrt(i,e,r){const n={id:grt(),name:e,filters:r},o=[...JC(i),n];return Vg.set(i,o),Jj(i,o),tD(),n}function brt(i,e){const r=JC(i),n=r.filter(a=>a.id!==e);n.length!==r.length&&(Vg.set(i,n),Jj(i,n),tD())}const xrt=10;function Va(i){let e=2166136261;for(let r=0;r<i.length;r++)e^=i.charCodeAt(r),e=Math.imul(e,16777619);return(e>>>0)%xrt}function tf({task:i,onClick:e,onDragStart:r,onContextMenu:n,dragging:a=!1}){return m.jsxs("div",{className:`task-card${a?" task-card--dragging":""}`,draggable:!0,onDragStart:r,onClick:e,onContextMenu:n,role:"button",tabIndex:0,onKeyDown:o=>{o.key==="Enter"&&e()},children:[m.jsxs("div",{className:"task-card-header",children:[m.jsx("span",{className:`priority-dot priority-dot--${i.priority}`,title:`Priority: ${i.priority}`}),i.urgency&&i.urgency!=="medium"&&m.jsx("span",{className:`urgency-bar urgency-bar--${i.urgency}`,title:`Urgency: ${i.urgency}`}),m.jsx("span",{className:"task-card-name",children:i.name})]}),i.description&&m.jsxs("p",{className:"task-card-desc",children:[i.description.slice(0,100),i.description.length>100?"...":""]}),m.jsxs("div",{className:"task-card-footer",children:[i.tags.length>0&&m.jsx("div",{className:"task-card-tags",children:i.tags.slice(0,3).map(o=>m.jsx("span",{className:"task-tag","data-hue":Va(o),children:o},o))}),m.jsx("span",{className:"task-card-date",children:i.updated_at})]})]})}function vrt({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(tf,{task:u,onClick:()=>n(u),onContextMenu:a?d=>a(u,d):void 0,onDragStart:d=>o(d,u)},u.slug))})]})}function YN({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=C=>{C.preventDefault(),C.dataTransfer.dropEffect="move",f(!0)},x=()=>{f(!1)},y=C=>{C.preventDefault(),f(!1);const _=C.dataTransfer.getData("text/plain");_&&h(_,e)},v=(C,_)=>{C.dataTransfer.setData("text/plain",_.slug),C.dataTransfer.effectAllowed="move"};return m.jsxs("div",{className:`kanban-column ${d?"kanban-column--dragover":""}`,onDragOver:g,onDragLeave:x,onDrop:y,children:[m.jsxs("div",{className:"kanban-column-header",children:[m.jsx("span",{className:"kanban-column-dot",style:{background:`var(${a})`}}),m.jsx("span",{className:"kanban-column-title",children:i}),m.jsx("span",{className:"kanban-column-count",children:n})]}),m.jsx("div",{className:"kanban-column-cards",children:u&&u.length>0?u.map(C=>m.jsx(vrt,{label:C.label,color:C.color,tasks:C.tasks,onTaskClick:o,onTaskContextMenu:c,onDragStart:v},C.key)):r.map(C=>m.jsx(tf,{task:C,onClick:()=>o(C),onContextMenu:c?_=>c(C,_):void 0,onDragStart:_=>v(_,C)},C.slug))})]})}function Ic({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 Crt({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 $u({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(A=>A!==E)):n([...r,E])},y=()=>n(e.map(E=>E.value)),v=()=>n([]),C=h?r.length<=2?r.map(E=>{var A;return((A=e.find(B=>B.value===E))==null?void 0:A.label)??E}).join(", "):`${((k=e.find(E=>E.value===r[0]))==null?void 0:k.label)??r[0]} +${r.length-1}`:i,_=e.length>5;return m.jsx(Ic,{isOpen:a,onClose:c,trigger:m.jsxs("button",{className:`filter-chip ${h?"filter-chip--active":""}`,onClick:o,children:[h&&r.length===1&&m.jsx("span",{className:"filter-chip-dot",style:{background:(T=e.find(E=>E.value===r[0]))==null?void 0:T.color}}),m.jsx("span",{className:"filter-chip-label",children:C}),m.jsx(Crt,{open:a})]}),content:m.jsxs("div",{className:"multi-select-list",children:[_&&m.jsx("div",{className:"multi-select-search-wrap",children:m.jsx("input",{ref:f,className:"multi-select-search",placeholder:"Search...",value:u,onChange:E=>d(E.target.value)})}),m.jsxs("div",{className:"multi-select-actions",children:[m.jsx("button",{className:"multi-select-action",onClick:y,children:"All"}),m.jsx("button",{className:"multi-select-action",onClick:v,children:"None"})]}),m.jsxs("div",{className:"multi-select-options",children:[g.map(E=>m.jsxs("label",{className:"multi-select-option",children:[m.jsx("input",{type:"checkbox",checked:r.includes(E.value),onChange:()=>x(E.value)}),E.color&&m.jsx("span",{className:"filter-option-dot",style:{background:E.color}}),m.jsx("span",{className:"filter-option-label",children:E.label})]},E.value)),g.length===0&&m.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function KN(i){return String(i).padStart(2,"0")}function jo(i){return`${i.getFullYear()}-${KN(i.getMonth()+1)}-${KN(i.getDate())}`}function eD(){return jo(new Date)}function Bp(i){const e=new Date;return e.setDate(e.getDate()-i),jo(e)}function _rt(){const i=new Date,e=i.getDay();return i.setDate(i.getDate()-(e===0?6:e-1)),jo(i)}function krt(){const i=new Date;return i.setDate(1),jo(i)}function wrt(){const i=new Date;return i.setMonth(0,1),jo(i)}function VN(i){return new Date(i+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Srt(){const i=eD();return[{label:"Today",from:i,to:i},{label:"Yesterday",from:Bp(1),to:Bp(1)},{label:"This week",from:_rt(),to:i},{label:"Last 7 days",from:Bp(6),to:i},{label:"This month",from:krt(),to:i},{label:"Last 30 days",from:Bp(29),to:i},{label:"This year",from:wrt(),to:i}]}const Trt=["January","February","March","April","May","June","July","August","September","October","November","December"],Ert=["Mo","Tu","We","Th","Fr","Sa","Su"];function Nrt({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(Srt,[]),x=Y.useMemo(()=>{const A=new Date(h,d+1,0).getDate(),B=new Date(h,d,1).getDay(),L=B===0?6:B-1,N=[],M=new Date(h,d,0).getDate();for(let j=L-1;j>=0;j--){const P=M-j,W=d===0?11:d-1,K=d===0?h-1:h;N.push({date:jo(new Date(K,W,P)),day:P,isCurrentMonth:!1})}for(let j=1;j<=A;j++)N.push({date:jo(new Date(h,d,j)),day:j,isCurrentMonth:!0});const I=42-N.length;for(let j=1;j<=I;j++){const P=d===11?0:d+1,W=d===11?h+1:h;N.push({date:jo(new Date(W,P,j)),day:j,isCurrentMonth:!1})}return N},[h,d]),y=A=>{!e||e&&r?(a(A),o("")):A<e?(o(e),a(A)):o(A)},v=A=>{a(A.from),o(A.to);const B=new Date(A.from+"T00:00:00");u(B.getFullYear()),f(B.getMonth())},C=()=>{a(""),o("")},_=()=>{d===0?(f(11),u(A=>A-1)):f(A=>A-1)},k=()=>{d===11?(f(0),u(A=>A+1)):f(A=>A+1)},T=eD(),E=g.find(A=>A.from===e&&A.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(A=>m.jsx("button",{className:`mini-cal-preset ${(E==null?void 0:E.label)===A.label?"mini-cal-preset--active":""}`,onClick:()=>v(A),children:A.label},A.label))}),m.jsx("div",{className:"mini-cal-divider"}),m.jsxs("div",{className:"mini-cal-nav-row",children:[m.jsx("button",{className:"mini-cal-nav-btn",onClick:_,"aria-label":"Previous month",children:m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),m.jsxs("span",{className:"mini-cal-month-label",children:[Trt[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:[Ert.map(A=>m.jsx("div",{className:"mini-cal-day-label",children:A},A)),x.map((A,B)=>{const L=A.date===e,N=A.date===r,M=e&&r&&A.date>e&&A.date<r,I=L&&!r,j=L||N,P=["mini-cal-day",!A.isCurrentMonth&&"mini-cal-day--outside",A.date===T&&"mini-cal-day--today",j&&"mini-cal-day--selected",L&&r&&"mini-cal-day--range-start",N&&e&&"mini-cal-day--range-end",M&&"mini-cal-day--in-range",I&&"mini-cal-day--single"].filter(Boolean).join(" ");return m.jsx("button",{className:P,onClick:()=>y(A.date),children:A.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:VN(e)}),e&&r&&e!==r&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mini-cal-arrow",children:"→"}),m.jsx("span",{children:VN(r)})]}),e&&!r&&m.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),m.jsx("button",{className:"mini-cal-clear-btn",onClick:C,children:"Clear"})]})]})}const Xg={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function Art(){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 Lp({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 rx(){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 XN(){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 Mrt(){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 Brt(){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 Lrt(){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 Ort(){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 Rrt(){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 jrt(){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 Drt(){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 Frt=[{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)"}],Irt=[{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)"}],$rt=[{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)"}],ZN=[{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"}],nx=[{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 zrt(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 Prt(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 qrt({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 j,P;const{t:x}=Bi(),[y,v]=Y.useState(null),[C,_]=Y.useState(""),k=zrt(i),T=Y.useMemo(()=>Prt(i),[i]),E=W=>v(K=>K===W?null:W),A=()=>v(null),B=(j=ZN.find(W=>W.value===i.sortField))==null?void 0:j.label,L=(P=nx.find(W=>W.value===i.groupBy))==null?void 0:P.label,N=Y.useMemo(()=>d.map(W=>({value:W,label:W})),[d]),M=Y.useMemo(()=>f.map(W=>({value:W,label:W})),[f]),I=Y.useMemo(()=>nx.filter(W=>W.value!==i.groupBy&&W.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(Art,{}),m.jsx("input",{className:"filter-search-input",placeholder:"Search tasks...",value:i.searchQuery,onChange:W=>e("searchQuery",W.target.value)}),i.searchQuery&&m.jsx("button",{className:"filter-search-clear",onClick:()=>e("searchQuery",""),children:m.jsx(XN,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx($u,{id:"status",label:"Status",options:Frt,selected:i.statusFilter,onChange:W=>e("statusFilter",W),isOpen:y==="status",onToggle:()=>E("status"),onClose:A}),m.jsx($u,{id:"priority",label:"Priority",options:Irt,selected:i.priorityFilter,onChange:W=>e("priorityFilter",W),isOpen:y==="priority",onToggle:()=>E("priority"),onClose:A}),m.jsx($u,{id:"urgency",label:"Urgency",options:$rt,selected:i.urgencyFilter,onChange:W=>e("urgencyFilter",W),isOpen:y==="urgency",onToggle:()=>E("urgency"),onClose:A}),N.length>0&&m.jsx($u,{id:"tags",label:"Tags",options:N,selected:i.tagFilter,onChange:W=>e("tagFilter",W),isOpen:y==="tags",onToggle:()=>E("tags"),onClose:A}),M.length>0&&m.jsx($u,{id:"version",label:"Version",options:M,selected:i.versionFilter,onChange:W=>e("versionFilter",W),isOpen:y==="version",onToggle:()=>E("version"),onClose:A}),m.jsx(Ic,{isOpen:y==="date",onClose:A,width:320,trigger:m.jsxs("button",{className:`filter-chip ${T?"filter-chip--active":""}`,onClick:()=>E("date"),children:[m.jsx(Mrt,{}),m.jsx("span",{className:"filter-chip-label",children:T??"Date"}),m.jsx(Lp,{open:y==="date"})]}),content:m.jsx(Nrt,{dateField:i.dateField,dateFrom:i.dateFrom,dateTo:i.dateTo,onDateFieldChange:W=>e("dateField",W),onDateFromChange:W=>e("dateFrom",W),onDateToChange:W=>e("dateTo",W)})}),m.jsx(Ic,{isOpen:y==="minRice",onClose:A,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(Lp,{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:W=>{const K=W.target.value.trim();if(K===""){e("minRice",null);return}const z=Number(K);e("minRice",Number.isFinite(z)?z:null)}}),i.minRice!==null&&m.jsx("button",{type:"button",className:"filter-min-rice-clear",onClick:()=>e("minRice",null),children:"Clear"})]})}),k>0&&m.jsxs("button",{className:"filter-clear-all",onClick:r,children:["Clear ",m.jsx("span",{className:"filter-clear-count",children:k})]}),m.jsx("div",{className:"filter-bar-spacer"}),m.jsxs("div",{className:"filter-view-toggle",children:[m.jsx("button",{className:`filter-view-btn ${i.viewMode==="kanban"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","kanban"),title:"Kanban view",children:m.jsx(Lrt,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:m.jsx(Ort,{})}),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(Rrt,{})}),m.jsx("button",{className:`filter-view-btn ${i.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:m.jsx(jrt,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx(Ic,{isOpen:y==="sort",onClose:A,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(Lp,{open:y==="sort"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Sort by"}),ZN.map(W=>m.jsxs("button",{className:`filter-option ${i.sortField===W.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",W.value),A()},children:[m.jsx("span",{className:"filter-option-label",children:W.label}),i.sortField===W.value&&m.jsx(rx,{})]},W.value))]})}),m.jsx(Ic,{isOpen:y==="group",onClose:A,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:L}),m.jsx(Lp,{open:y==="group"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Group by"}),nx.map(W=>m.jsxs("button",{className:`filter-option ${i.groupBy===W.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",W.value),A()},children:[m.jsx("span",{className:"filter-option-label",children:W.label}),i.groupBy===W.value&&m.jsx(rx,{})]},W.value)),i.groupBy!=="none"&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"filter-popover-section",style:{marginTop:"var(--space-2)"},children:"Sub-group by"}),I.map(W=>m.jsxs("button",{className:`filter-option ${i.subGroupBy===W.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",W.value),A()},children:[m.jsx("span",{className:"filter-option-label",children:W.label}),i.subGroupBy===W.value&&m.jsx(rx,{})]},`sub-${W.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(Drt,{})}),m.jsx(Ic,{isOpen:y==="views",onClose:A,align:"right",width:220,trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>E("views"),children:[m.jsx(Brt,{}),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(W=>m.jsxs("div",{className:"filter-views-item",children:[m.jsx("button",{className:"filter-views-load",onClick:()=>{h(W),A()},children:W.name}),m.jsx("button",{className:"filter-views-delete",onClick:()=>u(W.id),children:m.jsx(XN,{})})]},W.id))}),m.jsx("div",{className:"filter-popover-divider"}),m.jsxs("div",{className:"filter-views-save",children:[m.jsx("input",{className:"filter-views-input",placeholder:"Save current view...",value:C,onChange:W=>_(W.target.value),onKeyDown:W=>{W.key==="Enter"&&C.trim()&&(c(C.trim()),_(""))}}),m.jsx("button",{className:"filter-views-save-btn",disabled:!C.trim(),onClick:()=>{C.trim()&&(c(C.trim()),_(""))},children:"Save"})]})]})}),a,m.jsxs("button",{className:"filter-create-btn",onClick:n,children:[m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),x("tasks.create")]})]})}function Urt({onClose:i}){const{t:e}=Bi(),r=art(),{data:n}=Vj(),[a,o]=Y.useState(""),[c,h]=Y.useState(""),[u,d]=Y.useState("medium"),[f,g]=Y.useState("medium"),[x,y]=Y.useState(""),[v,C]=Y.useState(""),[_,k]=Y.useState(""),T=E=>{if(E.preventDefault(),!a.trim())return;const A=x.split(",").map(B=>B.trim()).filter(Boolean);r.mutate({name:a.trim(),description:c,priority:u,tags:A,urgency:f!=="medium"?f:void 0,why:v.trim()||void 0,version:_||void 0},{onSuccess:()=>i()})};return m.jsx("div",{className:"modal-overlay",onClick:i,children:m.jsxs("div",{className:"modal",onClick:E=>E.stopPropagation(),children:[m.jsxs("div",{className:"modal-header",children:[m.jsx("h2",{className:"modal-title",children:e("tasks.create")}),m.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),m.jsxs("form",{onSubmit:T,className:"modal-body",children:[m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.name")}),m.jsx("input",{className:"field-input",value:a,onChange:E=>o(E.target.value),placeholder:"e.g. Implement user auth",autoFocus:!0,required:!0})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.description")}),m.jsx("textarea",{className:"field-textarea",value:c,onChange:E=>h(E.target.value),placeholder:"What needs to be done?",rows:3})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.priority")}),m.jsxs("select",{className:"field-select",value:u,onChange:E=>d(E.target.value),children:[m.jsx("option",{value:"low",children:e("priority.low")}),m.jsx("option",{value:"medium",children:e("priority.medium")}),m.jsx("option",{value:"high",children:e("priority.high")}),m.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Urgency"}),m.jsxs("select",{className:"field-select",value:f,onChange:E=>g(E.target.value),children:[m.jsx("option",{value:"low",children:e("priority.low")}),m.jsx("option",{value:"medium",children:e("priority.medium")}),m.jsx("option",{value:"high",children:e("priority.high")}),m.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Version"}),m.jsxs("select",{className:"field-select",value:_,onChange:E=>k(E.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(n??[]).map(E=>m.jsx("option",{value:E.version,children:E.version},E.version))]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Why"}),m.jsx("textarea",{className:"field-textarea",value:v,onChange:E=>C(E.target.value),placeholder:"Why is this task needed?",rows:2})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.tags")}),m.jsx("input",{className:"field-input",value:x,onChange:E=>y(E.target.value),placeholder:"Comma-separated tags"})]}),m.jsxs("div",{className:"modal-actions",children:[m.jsx("button",{type:"button",className:"btn btn--ghost",onClick:i,children:e("tasks.cancel")}),m.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!a.trim()||r.isPending,children:r.isPending?"...":e("tasks.save")})]})]})]})})}var zu={exports:{}},QN;function Hrt(){if(QN)return zu.exports;QN=1,zu.exports=i,zu.exports.addWheelListener=i,zu.exports.removeWheelListener=e;function i(r,n,a){r.addEventListener("wheel",n,a)}function e(r,n,a){r.removeEventListener("wheel",n,a)}return zu.exports}var Pu={exports:{}},ax,JN;function Wrt(){if(JN)return ax;JN=1;var i=4,e=.001,r=1e-7,n=10,a=11,o=1/(a-1),c=typeof Float32Array=="function";function h(C,_){return 1-3*_+3*C}function u(C,_){return 3*_-6*C}function d(C){return 3*C}function f(C,_,k){return((h(_,k)*C+u(_,k))*C+d(_))*C}function g(C,_,k){return 3*h(_,k)*C*C+2*u(_,k)*C+d(_)}function x(C,_,k,T,E){var A,B,L=0;do B=_+(k-_)/2,A=f(B,T,E)-C,A>0?k=B:_=B;while(Math.abs(A)>r&&++L<n);return B}function y(C,_,k,T){for(var E=0;E<i;++E){var A=g(_,k,T);if(A===0)return _;var B=f(_,k,T)-C;_-=B/A}return _}function v(C){return C}return ax=function(_,k,T,E){if(!(0<=_&&_<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(_===k&&T===E)return v;for(var A=c?new Float32Array(a):new Array(a),B=0;B<a;++B)A[B]=f(B*o,_,T);function L(N){for(var M=0,I=1,j=a-1;I!==j&&A[I]<=N;++I)M+=o;--I;var P=(N-A[I])/(A[I+1]-A[I]),W=M+P*o,K=g(W,_,T);return K>=e?y(N,W,_,T):K===0?W:x(N,M,M+o,_,T)}return function(M){return M===0?0:M===1?1:f(L(M),k,E)}},ax}var tA;function Grt(){if(tA)return Pu.exports;tA=1;var i=Wrt(),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)};Pu.exports=r,Pu.exports.makeAggregateRaf=h,Pu.exports.sharedScheduler=h();function r(u,d,f){var g=Object.create(null),x=Object.create(null);f=f||{};var y=typeof f.easing=="function"?f.easing:e[f.easing];y||(f.easing&&console.warn("Unknown easing function in amator: "+f.easing),y=e.ease);var v=typeof f.step=="function"?f.step:n,C=typeof f.done=="function"?f.done:n,_=a(f.scheduler),k=Object.keys(d);k.forEach(function(I){g[I]=u[I],x[I]=d[I]-u[I]});var T=typeof f.duration=="number"?f.duration:400,E=Math.max(1,T*.06),A,B=0;return A=_.next(N),{cancel:L};function L(){_.cancel(A),A=0}function N(){var I=y(B/E);B+=1,M(I),B<=E?(A=_.next(N),v(u)):(A=0,setTimeout(function(){C(u)},0))}function M(I){k.forEach(function(j){u[j]=x[j]*I+g[j]})}}function n(){}function a(u){if(!u){var d=typeof window<"u"&&window.requestAnimationFrame;return d?o():c()}if(typeof u.next!="function")throw new Error("Scheduler is supposed to have next(cb) function");if(typeof u.cancel!="function")throw new Error("Scheduler is supposed to have cancel(handle) function");return u}function o(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function c(){return{next:function(u){return setTimeout(u,1e3/60)},cancel:function(u){return clearTimeout(u)}}}function h(){var u=new Set,d=new Set,f=0;return{next:x,cancel:x,clearAll:g};function g(){u.clear(),d.clear(),cancelAnimationFrame(f),f=0}function x(C){d.add(C),y()}function y(){f||(f=requestAnimationFrame(v))}function v(){f=0;var C=d;d=u,u=C,u.forEach(function(_){_()}),u.clear()}}return Pu.exports}var sx,eA;function Yrt(){if(eA)return sx;eA=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 sx=i,sx}var ox,iA;function Krt(){if(iA)return ox;iA=1,ox=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,A;return{start:L,stop:M,cancel:B};function B(){u(y),u(A)}function L(){f=n(),_=E=v=k=0,g=new Date,u(y),u(A),y=d(N)}function N(){var j=Date.now(),P=j-g;g=j;var W=n(),K=W.x-f.x,z=W.y-f.y;f=W;var G=1e3/(1+P);v=.8*K*G+.2*v,k=.8*z*G+.2*k,y=d(N)}function M(){u(y),u(A);var j=n();C=j.x,T=j.y,g=Date.now(),(v<-c||v>c)&&(_=h*v,C+=_),(k<-c||k>c)&&(E=h*k,T+=E),A=d(I)}function I(){var j=Date.now()-g,P=!1,W=0,K=0;_&&(W=-_*Math.exp(-j/x),W>.5||W<-.5?P=!0:W=_=0),E&&(K=-E*Math.exp(-j/x),K>.5||K<-.5?P=!0:K=E=0),P&&(a(C+W,T+K),A=d(I))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function r(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return ox}var lx,rA;function Vrt(){if(rA)return lx;rA=1,lx=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 lx}var cx,nA;function Xrt(){if(nA)return cx;nA=1,cx=i;function i(){this.x=0,this.y=0,this.scale=1}return cx}var Op={exports:{}},aA;function Zrt(){if(aA)return Op.exports;aA=1,Op.exports=i,Op.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 Op.exports}var Rp={exports:{}},sA;function Qrt(){if(sA)return Rp.exports;sA=1,Rp.exports=i,Rp.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 Rp.exports}var hx,oA;function Jrt(){if(oA)return hx;oA=1;var i=Hrt(),e=Grt(),r=Yrt(),n=Krt(),a=Vrt(),o=a(),c=a(!0),h=Xrt(),u=Zrt(),d=Qrt(),f=1,g=1.75,x=300,y=200;hx=v;function v(N,M){M=M||{};var I=M.controller;if(I||(u.canAttach(N)?I=u(N,M):d.canAttach(N)&&(I=d(N,M))),!I)throw new Error("Cannot create panzoom for the current type of dom element");var j=I.getOwner(),P={x:0,y:0},W=!1,K=new h;I.initTransform&&I.initTransform(K);var z=typeof M.filterKey=="function"?M.filterKey:k,G=typeof M.pinchSpeed=="number"?M.pinchSpeed:1,D=M.bounds,F=typeof M.maxZoom=="number"?M.maxZoom:Number.POSITIVE_INFINITY,q=typeof M.minZoom=="number"?M.minZoom:0,X=typeof M.boundsPadding=="number"?M.boundsPadding:.05,nt=typeof M.zoomDoubleClickSpeed=="number"?M.zoomDoubleClickSpeed:g,H=M.beforeWheel||k,J=M.beforeMouseDown||k,ht=typeof M.zoomSpeed=="number"?M.zoomSpeed:f,at=C(M.transformOrigin),vt=M.enableTextSelection?c:o;T(D),M.autocenter&&je();var ct,Z=0,Q=0,tt=0,ot=null,Ct=new Date,At,Dt=!1,qt=!1,Rt,Gt,zt,ye,Ne,ve;"smoothScroll"in M&&!M.smoothScroll?ve=B():ve=n(it,nr,M.smoothScroll);var pi,Li,Ti,fe=!1;ki();var Ci={dispose:ar,moveBy:Gr,moveTo:wt,smoothMoveTo:on,centerOn:gi,zoomTo:zn,zoomAbs:oi,smoothZoom:zi,smoothZoomAbs:_e,showRectangle:_n,pause:Ii,resume:Oi,isPaused:Cr,getTransform:Ke,getMinZoom:Be,setMinZoom:dr,getMaxZoom:_i,setMaxZoom:Qi,getTransformOrigin:Ae,setTransformOrigin:rr,getZoomSpeed:Sr,setZoomSpeed:Hi};r(Ci);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)&&oi($e,Ue,Fe),Ci;function Ii(){Wi(),fe=!0}function Oi(){fe&&(ki(),fe=!1)}function Cr(){return fe}function _n(mt){var Bt=j.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(I.getScreenCTM){var Mt=I.getScreenCTM(),Ut=Mt.a,Le=Mt.d,$t=Mt.e,Je=Mt.f;P.x=mt*Ut-$t,P.y=Bt*Le-Je}else P.x=mt,P.y=Bt;return P}function je(){var mt,Bt,Mt=0,Ut=0,Le=si();if(Le)Mt=Le.left,Ut=Le.top,mt=Le.right-Le.left,Bt=Le.bottom-Le.top;else{var $t=j.getBoundingClientRect();mt=$t.width,Bt=$t.height}var Je=I.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 q}function dr(mt){q=mt}function _i(){return F}function Qi(mt){F=mt}function Ae(){return at}function rr(mt){at=C(mt)}function Sr(){return ht}function Hi(mt){if(!Number.isFinite(mt))throw new Error("Zoom speed should be a number");ht=mt}function it(){return{x:K.x,y:K.y}}function wt(mt,Bt){K.x=mt,K.y=Bt,he(),Pn("pan"),Pt()}function jt(mt,Bt){wt(K.x+mt,K.y+Bt)}function he(){var mt=si();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 si(){if(D){if(typeof D=="boolean"){var mt=j.getBoundingClientRect(),Bt=mt.width,Mt=mt.height;return{left:Bt*X,top:Mt*X,right:Bt*(1-X),bottom:Mt*(1-X)}}return D}}function pe(){var mt=I.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(){W=!0,ct=window.requestAnimationFrame(kn)}function le(mt,Bt,Mt){if(A(mt)||A(Bt)||A(Mt))throw new Error("zoom requires valid numbers");var Ut=K.scale*Mt;if(Ut<q){if(K.scale===q)return;Mt=q/K.scale}if(Ut>F){if(K.scale===F)return;Mt=F/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),D&&X===1&&q===1)K.scale*=Mt,he();else{var $t=he();$t||(K.scale*=Mt)}Pn("zoom"),Pt()}function oi(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 jt(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){jt(Ie.x-$t,Ie.y-Je),$t=Ie.x,Je=Ie.y}})}function nr(mt,Bt){la(),wt(mt,Bt)}function ar(){Wi()}function ki(){j.addEventListener("mousedown",ft,{passive:!1}),j.addEventListener("dblclick",kt,{passive:!1}),j.addEventListener("touchstart",Tr,{passive:!1}),j.addEventListener("keydown",wn,{passive:!1}),i.addWheelListener(j,ci,{passive:!1}),Pt()}function Wi(){i.removeWheelListener(j,ci),j.removeEventListener("mousedown",ft),j.removeEventListener("keydown",wn),j.removeEventListener("dblclick",kt),j.removeEventListener("touchstart",Tr),ct&&(window.cancelAnimationFrame(ct),ct=0),ve.cancel(),re(),ze(),vt.release(),Wo()}function kn(){W&&In()}function In(){W=!1,I.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),!z(mt,Bt,Mt,Ut)){if(Bt||Mt){mt.preventDefault(),mt.stopPropagation();var Le=j.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=qs(Ut*100),$t=at?Gi():Sn();zn($t.x,$t.y,Dr)}}}function Sn(){var mt=j.getBoundingClientRect();return{x:mt.width/2,y:mt.height/2}}function Tr(mt){if($n(mt),pr(),mt.touches.length===1)return fr(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){pr(),!(M.onDoubleClick&&!M.onDoubleClick(mt))&&(mt.preventDefault(),mt.stopPropagation())}function fr(mt){Q=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(){Dt||(Dt=!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)*G,qn=Ve(Je),Us=Ve(Ie);if(Rt=(qn.x+Us.x)/2,Gt=(qn.y+Us.y)/2,at){var Mt=Gi();Rt=Mt.x,Gt=Mt.y}zn(Rt,Gt,Dr),Ne=He,mt.stopPropagation(),mt.preventDefault()}}function pr(){tt&&(clearTimeout(tt),tt=0)}function li(mt){if(M.onClick){pr();var Bt=Rt-zt,Mt=Gt-ye,Ut=Math.sqrt(Bt*Bt+Mt*Mt);Ut>5||(tt=setTimeout(function(){tt=0,M.onClick(mt)},x))}}function Kt(mt){if(pr(),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-Z<x)if(at){var Bt=Gi();zi(Bt.x,Bt.y,nt)}else zi(At.x,At.y,nt);else Ut-Q<y&&li(mt);Z=Ut,Wo(),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);at&&(Bt=Gi()),zi(Bt.x,Bt.y,nt)}function ft(mt){if(pr(),!J(mt)){if(ot=mt,Ct=new Date,Dt)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),vt.capture(mt.target||mt.srcElement),!1}}}function Lt(mt){if(!Dt){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-Ct<y&&li(ot),vt.release(),Wo(),re()}function re(){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,Dt=!1}function ci(mt){if(!H(mt)){ve.cancel();var Bt=mt.deltaY;mt.deltaMode>0&&(Bt*=100);var Mt=qs(Bt);if(Mt!==1){var Ut=at?Gi():Ve(mt);zn(Ut.x,Ut.y,Mt),mt.preventDefault()}}}function Ve(mt){var Bt,Mt,Ut=j.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){oi(mt,Bt,Je.scale)},done:Er})}function _e(mt,Bt,Mt){var Ut=K.scale,Le={scale:Ut},$t={scale:Mt};ve.cancel(),la(),Li=e(Le,$t,{step:function(Je){oi(mt,Bt,Je.scale)},done:Er})}function Gi(){var mt=j.getBoundingClientRect();return{x:mt.width*at.x,y:mt.height*at.y}}function zn(mt,Bt,Mt){return ve.cancel(),la(),le(mt,Bt,Mt)}function la(){Li&&(Li.cancel(),Li=null)}function qs(mt){var Bt=Math.sign(mt),Mt=Math.min(.25,Math.abs(ht*mt/128));return 1-Bt*Mt}function Ja(){qt||(Pn("panstart"),qt=!0,ve.start())}function Wo(){qt&&(Ti||ve.stop(),Pn("panend"))}function Er(){Pn("zoomend")}function Pn(mt){Ci.fire(mt,Ci)}}function C(N){if(N){if(typeof N=="object")return(!E(N.x)||!E(N.y))&&_(N),N;_()}}function _(N){throw console.error(N),new Error(["Cannot parse transform origin.","Some good examples:",' "center center" can be achieved with {x: 0.5, y: 0.5}',' "top center" can be achieved with {x: 0.5, y: 0}',' "bottom right" can be achieved with {x: 1, y: 1}'].join(`
|
|
463
|
+
`))}function k(){}function T(N){var M=typeof N;if(!(M==="undefined"||M==="boolean")){var I=E(N.left)&&E(N.top)&&E(N.bottom)&&E(N.right);if(!I)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function E(N){return Number.isFinite(N)}function A(N){return Number.isNaN?Number.isNaN(N):N!==N}function B(){return{start:k,stop:k,cancel:k}}function L(){if(typeof document>"u")return;var N=document.getElementsByTagName("script");if(!N)return;for(var M,I=0;I<N.length;++I){var j=N[I];if(j.src&&j.src.match(/\bpanzoom(\.min)?\.js/)){M=j;break}}if(!M)return;var P=M.getAttribute("query");if(!P)return;var W=M.getAttribute("name")||"pz",K=Date.now();z();function z(){var F=document.querySelector(P);if(!F){var q=Date.now(),X=q-K;if(X<2e3){setTimeout(z,100);return}console.error("Cannot find the panzoom element",W);return}var nt=G(M);console.log(nt),window[W]=v(F,nt)}function G(F){for(var q=F.attributes,X={},nt=0;nt<q.length;++nt){var H=q[nt],J=D(H);J&&(X[J.name]=J.value)}return X}function D(F){if(F.name){var q=F.name[0]==="p"&&F.name[1]==="z"&&F.name[2]==="-";if(q){var X=F.name.substr(3),nt=JSON.parse(F.value);return{name:X,value:nt}}}}}return L(),hx}var tnt=Jrt();const iD=Id(tnt);function ux(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 h1({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 _=ux(d.trim());return _?e.filter(k=>ux(k.label).includes(_)||ux(k.value).includes(_)):e},[e,d]),y=e.find(_=>_.value===i),v=o&&d.trim()&&!e.some(_=>_.value===d.trim());Y.useEffect(()=>{if(!h)return;const _=T=>{g.current&&!g.current.contains(T.target)&&u(!1)},k=T=>{T.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",_),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",k)}},[h]);const C=_=>{a(_),u(!1),f("")};return m.jsxs("div",{className:"ss-root",ref:g,children:[m.jsxs("button",{type:"button",className:"ss-trigger",onClick:()=>{u(_=>!_),f("")},children:[m.jsx("span",{className:y||i?"ss-value":"ss-placeholder",children:(y==null?void 0:y.label)??i??r}),m.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",className:"ss-chevron",children:m.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),h&&m.jsxs("div",{className:"ss-pop",children:[m.jsx("input",{autoFocus:!0,className:"ss-search",placeholder:n,value:d,onChange:_=>f(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),x.length>0?C(x[0].value):v&&C(d.trim()))}}),m.jsxs("div",{className:"ss-list",children:[m.jsx("button",{type:"button",className:"ss-item ss-item--clear",onClick:()=>C(null),children:c}),x.map(_=>m.jsxs("button",{type:"button",className:`ss-item${_.value===i?" ss-item--active":""}`,onClick:()=>C(_.value),children:[m.jsx("span",{children:_.label}),_.hint&&m.jsx("span",{className:"ss-hint",children:_.hint})]},_.value)),v&&m.jsxs("button",{type:"button",className:"ss-item",onClick:()=>C(d.trim()),children:["Use “",d.trim(),"”"]}),x.length===0&&!v&&m.jsx("div",{className:"ss-empty",children:e.length===0&&o&&!d.trim()?"Type a name…":"No matches"})]})]})]})}we.setOptions({gfm:!0,breaks:!0});const ent={"[":"]","(":")","{":"}"};function int(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=ent[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 rnt(i){return i.split(`
|
|
464
|
+
`).map(int).join(`
|
|
465
|
+
`)}const nnt=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function ant(i,e,r){const n=i.split(`
|
|
466
|
+
`);let a=0,o=!1,c="";for(let h=0;h<n.length;h++){const u=n[h],d=/^(\s*)(```|~~~)/.exec(u);if(d){o?u.includes(c)&&(o=!1,c=""):(o=!0,c=d[2]);continue}if(o)continue;const f=nnt.exec(u);if(f){if(a===e){const[,g,,x,y]=f,v=r?"[x]":"[ ]";n[h]=`${g}${v}${x}${y}`;const C=/<!--\s*node:([A-Za-z0-9_-]+)\s*-->/.exec(y);return{body:n.join(`
|
|
467
|
+
`),nodeId:C?C[1]:null}}a++}}return null}const snt=/-->|---|==>|==|-\.|~~~|\.->/;function ont(i,e,r){const n=r?"done":"todo",a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`^(\\s*)(${a})((?:\\[[^\\]]*\\]|\\([^)]*\\)|\\{[^}]*\\})?)(\\s*:::(?:done|todo|active|blocked)\\b)?\\s*$`),c=i.split(`
|
|
468
|
+
`);let h=!1,u="";for(let d=0;d<c.length;d++){const f=c[d];if(!h){const C=/^(\s*)(```|~~~)\s*mermaid\b/i.exec(f);C&&(h=!0,u=C[2]);continue}if(f.trim().startsWith(u)){h=!1,u="";continue}if(/^\s*(classDef|class|style|linkStyle|click|subgraph|end)\b/.test(f)||snt.test(f))continue;const g=o.exec(f);if(!g)continue;const[,x,y,v]=g;c[d]=`${x}${y}${v??""}:::${n}`}return c.join(`
|
|
469
|
+
`)}const lnt=[1,2,3,4,5,6,7,8,9,10],cnt=[1,2,3,4,5],hnt=[25,50,75,100],unt=[.5,1,1.5,2,3,4,5,6,8];function dnt(i){return i==null?"":i<5?"rice-score--low":i<=15?"rice-score--mid":"rice-score--high"}function fnt({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=dnt(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:"—"}),lnt.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:"—"}),cnt.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:"—"}),hnt.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:"—"}),unt.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 $r({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 pnt({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 gnt({task:i,onClose:e,initialRiceExpanded:r}){const{t:n}=Bi(),{resolved:a}=Wd(),o=Gj(),c=hrt(),h=Yj(),{data:u}=srt(),{data:d}=crt(),{data:f}=Vj(),[g,x]=Y.useState(""),[y,v]=Y.useState(""),[C,_]=Y.useState(null),[k,T]=Y.useState(r??!!i.rice),[E,A]=Y.useState(!1),B=Z=>{_(Z.message),setTimeout(()=>_(null),5e3)},L=Z=>{o.mutate({slug:i.slug,updates:{status:Z}},{onError:B})},N=Z=>{o.mutate({slug:i.slug,updates:{priority:Z}},{onError:B})},M=Z=>{o.mutate({slug:i.slug,updates:{urgency:Z}},{onError:B})},I=Z=>{o.mutate({slug:i.slug,updates:{version:Z||null}},{onError:B})},j=Z=>{o.mutate({slug:i.slug,updates:{rice:Z}},{onError:B})},P=(Z,Q)=>{const tt=Z==="related_feature"?Q.trim()||null:Q.trim();Z!=="related_feature"&&!tt||o.mutate({slug:i.slug,updates:{[Z]:tt}},{onError:B})},W=Z=>{const Q=Z.find(tt=>tt.startsWith("person:"));return Q?Q.slice(7):null},K=(Z,Q)=>{const tt=Z.filter(ot=>!ot.startsWith("person:"));return Q?[...tt,`person:${Q}`]:tt},z=i.assignee??W(i.tags),G=Z=>{const Q=Z||null;o.mutate({slug:i.slug,updates:{assignee:Q,tags:K(i.tags,Q)}},{onError:B})},D=()=>{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()})},F=Z=>{o.mutate({slug:i.slug,updates:{due_date:Z||null}},{onError:B})},q=Z=>{const Q=W(Z);o.mutate({slug:i.slug,updates:{tags:Z,...Q!==z?{assignee:Q}:{}}},{onError:B})},X=()=>{const Z=y.trim();Z&&(i.tags.some(Q=>Q.toLowerCase()===Z.toLowerCase())||q([...i.tags,Z]),v(""))},nt=Z=>{Z.preventDefault(),g.trim()&&c.mutate({slug:i.slug,content:g.trim()},{onSuccess:()=>x(""),onError:B})},H=Y.useMemo(()=>i.body?we.parse(i.body):"",[i.body]),J=Y.useRef(null),ht=Y.useRef(i.body??""),at=Y.useRef(i.body??"");Y.useEffect(()=>{ht.current=i.body??"",at.current=i.body??""},[i.body]);const vt=Y.useRef(o),ct=Y.useRef(B);return Y.useEffect(()=>{vt.current=o,ct.current=B}),Y.useEffect(()=>{const Z=J.current;if(!Z||!H)return;Z.querySelectorAll('input[type="checkbox"]').forEach((ot,Ct)=>{ot.removeAttribute("disabled"),ot.dataset.criterionIndex=String(Ct)});const tt=ot=>{const Ct=ot.target;if(!(Ct instanceof HTMLInputElement)||Ct.type!=="checkbox")return;const At=Ct.dataset.criterionIndex;if(At===void 0)return;const Dt=Number(At),qt=Ct.checked,Rt=at.current,Gt=ant(Rt,Dt,qt);if(!Gt)return;let zt=Gt.body;Gt.nodeId&&(zt=ont(zt,Gt.nodeId,qt)),zt!==Rt&&(at.current=zt,vt.current.mutate({slug:i.slug,updates:{body:zt}},{onError:ye=>{Ct.checked=!qt,at.current=ht.current,ct.current(ye)}}))};return Z.addEventListener("change",tt),()=>Z.removeEventListener("change",tt)},[H,i.slug]),Y.useEffect(()=>{const Z=J.current;if(!Z||!H)return;zj(a);let Q=!1;const tt=[];let ot=!1;const Ct=async()=>{if(Q||ot)return;Z.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 Dt=Z.querySelectorAll("pre > code.language-mermaid");if(Dt.length!==0){for(ot=!0;tt.length;){const qt=tt.pop();try{qt==null||qt()}catch{}}for(let qt=0;qt<Dt.length&&!Q;qt++){const Rt=Dt[qt],Gt=Rt.parentElement;if(!Gt)continue;const zt=rnt(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=`
|
|
470
|
+
<button type="button" data-act="out" title="Zoom out">−</button>
|
|
471
|
+
<button type="button" data-act="reset" title="Fit">⤢</button>
|
|
472
|
+
<button type="button" data-act="in" title="Zoom in">+</button>
|
|
473
|
+
`,Ne.appendChild(pi),Gt.replaceWith(Ne);try{const{svg:Li,bindFunctions:Ti}=await QC.render(ye,zt);if(Q)break;ve.innerHTML=Li,Ti==null||Ti(ve),Ne.dataset.mermaidRendered="1";const fe=ve.querySelector("svg");if(!fe)continue;Pj(fe);const Ci=fe.viewBox.baseVal,$e=Ci&&Ci.width>0?Ci.width:fe.getBoundingClientRect().width,Ue=Ci&&Ci.height>0?Ci.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=iD(fe,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),Ii=()=>{try{const je=ve.getBoundingClientRect();if(je.width===0||je.height===0)return;const Ke=32,Be=Math.min((je.width-Ke)/$e,(je.height-Ke)/Ue,1);Fe.zoomAbs(0,0,1),Fe.moveTo(0,0),Fe.zoomAbs(0,0,Be);const dr=(je.width-$e*Be)/2,_i=(je.height-Ue*Be)/2;Fe.moveTo(dr,_i)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(Ii));const Oi=new ResizeObserver(()=>Ii());Oi.observe(ve);let Cr=null;const _n=je=>{try{const Ke=je.getBoundingClientRect(),Be=ve.getBoundingClientRect();if(Ke.width===0)return;const dr=Ke.left+Ke.width/2-Be.left,_i=Ke.top+Ke.height/2-Be.top,Qi=Math.min(Be.width*.6/Ke.width,Be.height*.6/Ke.height,6),Ae=Fe.getTransform(),rr=Qi/Ae.scale;if(Math.abs(rr-1)<.01)return;Fe.smoothZoom(dr,_i,rr)}catch{}},$i=je=>{const Ke=je.target,Be=(Ke==null?void 0:Ke.closest("g.node, g.cluster"))??null;if(!Be){Cr&&(Cr=null,Ii());return}Cr===Be?(Cr=null,Ii()):(Cr=Be,_n(Be))};ve.addEventListener("click",$i),fe.querySelectorAll("g.node, g.cluster").forEach(je=>{je.style.cursor="zoom-in"}),pi.addEventListener("click",je=>{je.stopPropagation();const Ke=je.target.closest("button");if(!Ke)return;const Be=ve.getBoundingClientRect(),dr=Be.width/2,_i=Be.height/2,Qi=Ke.getAttribute("data-act");Qi==="in"?Fe.smoothZoom(dr,_i,1.4):Qi==="out"?Fe.smoothZoom(dr,_i,1/1.4):Qi==="reset"&&(Cr=null,Ii())}),tt.push(()=>{Oi.disconnect(),ve.removeEventListener("click",$i),Fe.dispose()})}catch(Li){if(Q)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}};Ct();const At=new MutationObserver(()=>{if(Q||ot)return;const Dt=Z.querySelector("pre > code.language-mermaid"),qt=Z.querySelector(".mermaid-rendered .mermaid-stage svg");Dt&&(!qt||Dt)&&Dt&&Ct()});return At.observe(Z,{childList:!0,subtree:!0}),()=>{for(Q=!0,At.disconnect();tt.length;){const Dt=tt.pop();try{Dt==null||Dt()}catch{}}}},[H,i.slug,a]),m.jsx("div",{className:`detail-overlay ${E?"detail-overlay--fullscreen":""}`,onClick:e,children:m.jsxs("div",{className:`detail-panel ${E?"detail-panel--fullscreen":""}`,onClick:Z=>Z.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:()=>A(Z=>!Z),title:E?"Exit full-page view":"Open in full page","aria-label":E?"Exit full-page view":"Open in full page",children:E?m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("path",{d:"M6 3v3H3M10 3v3h3M6 13v-3H3M10 13v-3h3"})}):m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("path",{d:"M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3"})})}),m.jsx("button",{className:"modal-close",onClick:e,"aria-label":"Close",children:"×"})]})]}),m.jsxs("div",{className:"detail-body",children:[C&&m.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:C}),m.jsxs("div",{className:"props-block",children:[m.jsx($r,{label:"Status",children:m.jsxs("select",{className:"field-select prop-select",value:i.status,onChange:Z=>L(Z.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($r,{label:n("tasks.priority"),children:m.jsxs("select",{className:"field-select prop-select",value:i.priority,onChange:Z=>N(Z.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($r,{label:"Urgency",children:m.jsxs("select",{className:"field-select prop-select",value:i.urgency,onChange:Z=>M(Z.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($r,{label:n("rice.title"),children:m.jsx(fnt,{task:i,expanded:k,onToggle:()=>T(Z=>!Z),onUpdate:j})}),m.jsx($r,{label:"Name",children:m.jsx("input",{className:"settings-like-input prop-text-input",defaultValue:i.name,onBlur:Z=>{Z.target.value.trim()&&Z.target.value.trim()!==i.name&&P("name",Z.target.value)},onKeyDown:Z=>{Z.key==="Enter"&&Z.target.blur()}},`name-${i.slug}-${i.name}`)}),m.jsx($r,{label:"Summary",children:m.jsx("input",{className:"prop-text-input",defaultValue:i.description,placeholder:"One-line summary",onBlur:Z=>{Z.target.value.trim()&&Z.target.value.trim()!==i.description&&P("description",Z.target.value)},onKeyDown:Z=>{Z.key==="Enter"&&Z.target.blur()}},`desc-${i.slug}-${i.description}`)}),m.jsx($r,{label:"Assignee",children:m.jsx(h1,{value:z,options:[...(u??[]).map(Z=>({value:Z.slug,label:Z.name,hint:Z.slug})),...z&&!(u??[]).some(Z=>Z.slug===z)?[{value:z,label:z}]:[]],placeholder:"Unassigned",searchPlaceholder:"Search people…",clearLabel:"Unassigned",allowCustom:!0,onChange:Z=>G(Z??"")})}),m.jsx($r,{label:"Feature",children:m.jsx(h1,{value:i.related_feature??null,options:(d??[]).map(Z=>({value:Z.slug,label:Z.name??Z.slug,hint:Z.name?Z.slug:void 0})),placeholder:"No feature",searchPlaceholder:"Search features…",clearLabel:"No feature",allowCustom:!0,onChange:Z=>P("related_feature",Z??"")})}),m.jsx($r,{label:"Due",children:i.tags.some(Z=>Z.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:Z=>F(Z.target.value)})}),m.jsx($r,{label:"Tags",children:m.jsxs("div",{className:"prop-tags prop-tags--editable",children:[i.tags.map(Z=>m.jsxs("span",{className:"task-tag","data-hue":Va(Z),children:[Z,m.jsx("button",{type:"button",className:"task-tag-remove","aria-label":`Remove tag ${Z}`,onClick:()=>q(i.tags.filter(Q=>Q!==Z)),children:"×"})]},Z)),m.jsx("input",{className:"task-tag-input",value:y,placeholder:"+ tag","aria-label":"Add tag",onChange:Z=>v(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&(Z.preventDefault(),X())},onBlur:X})]})}),m.jsx($r,{label:"Version",children:m.jsxs("select",{className:"field-select prop-select",value:i.version??"",onChange:Z=>I(Z.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(f??[]).map(Z=>m.jsx("option",{value:Z.version,children:Z.version},Z.version)),i.version&&!(f??[]).some(Z=>Z.version===i.version)&&m.jsx("option",{value:i.version,children:i.version})]})}),i.description&&m.jsx($r,{label:"Description",children:m.jsx(pnt,{text:i.description})}),m.jsx($r,{label:"Created",children:m.jsx("span",{className:"prop-date",children:i.created_at})}),m.jsx($r,{label:"Updated",children:m.jsx("span",{className:"prop-date",children:i.updated_at})}),i.parent_task&&m.jsx($r,{label:"Parent",children:m.jsx("span",{className:"prop-text",children:i.parent_task})}),m.jsx($r,{label:"ID",children:m.jsx("code",{className:"prop-id",children:i.id})})]}),m.jsx("hr",{className:"detail-divider"}),H?m.jsx("div",{ref:J,className:"markdown-body",dangerouslySetInnerHTML:{__html:H}}):m.jsx("p",{className:"detail-empty",children:"No content."}),m.jsx("hr",{className:"detail-divider"}),m.jsxs("div",{className:"changelog-section",children:[m.jsx("h3",{className:"changelog-title",children:n("tasks.changelog")}),m.jsxs("form",{onSubmit:nt,className:"changelog-add",children:[m.jsx("input",{className:"field-input",value:g,onChange:Z=>x(Z.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:D,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 mnt=["critical","high"];function Zg(i){return mnt.includes(i)}const u1=[{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 lA(i){const e=Zg(i.priority),r=Zg(i.urgency);return e&&r?"do":e&&!r?"schedule":!e&&r?"delegate":"eliminate"}function cA(i,e){return i&&!Zg(e)?"high":!i&&Zg(e)?"medium":null}function hA(i,e){const r=u1.find(c=>c.key===e);if(!r)return{};const n={},a=cA(r.priorityHigh,i.priority),o=cA(r.urgencyHigh,i.urgency);return a&&(n.priority=a),o&&(n.urgency=o),n}function dx(i){return!i.priority&&!i.urgency}function ynt(i){const e=[];return i.priority&&e.push(`priority → ${i.priority}`),i.urgency&&e.push(`urgency → ${i.urgency}`),e.join(" · ")}function bnt({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?lA(g):null,y=(T,E)=>{T.dataTransfer.setData("text/plain",E.slug),T.dataTransfer.effectAllowed="move",h(E.slug)},v=()=>{h(null),o(null)},C=(T,E)=>{f&&(T.preventDefault(),T.dataTransfer.dropEffect="move",a!==E&&o(E))},_=(T,E)=>{if(!r)return;T.preventDefault();const A=T.dataTransfer.getData("text/plain");if(v(),!A)return;const B=n.find(M=>M.slug===A);if(!B)return;const L=hA(B,E);if(dx(L))return;r(A,L);const N=u1.find(M=>M.key===E);d({slug:A,name:B.name,toLabel:(N==null?void 0:N.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:u1.map(T=>{const E=n.filter(I=>lA(I)===T.key),A=a===T.key,B=x===T.key,L=A&&g?hA(g,T.key):null,N=L?dx(L)?"Already here":ynt(L):null,M=["eisenhower-quadrant",`eisenhower-quadrant--${T.key}`,A?"eisenhower-quadrant--dragover":"",B?"eisenhower-quadrant--source":"",A&&L&&dx(L)?"eisenhower-quadrant--noop":""].filter(Boolean).join(" ");return m.jsxs("div",{className:M,onDragOver:I=>C(I,T.key),onDragLeave:()=>o(I=>I===T.key?null:I),onDrop:I=>_(I,T.key),children:[m.jsxs("div",{className:"eisenhower-quadrant-header",children:[m.jsx("span",{className:"eisenhower-quadrant-dot",style:{background:`var(${T.colorVar})`}}),m.jsx("span",{className:"eisenhower-quadrant-label",children:T.label}),m.jsx("span",{className:"eisenhower-quadrant-count",children:E.length})]}),N?m.jsx("span",{className:"eisenhower-quadrant-preview",children:N}):m.jsx("span",{className:"eisenhower-quadrant-subtitle",children:T.subtitle}),m.jsxs("div",{className:"eisenhower-quadrant-cards",children:[E.map(I=>m.jsx(tf,{task:I,onClick:()=>e(I),onDragStart:j=>y(j,I),dragging:c===I.slug},I.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 Ce={top:32,right:24,bottom:56,left:64},uA=.5,dA=8,fx=1,fA=5,xnt=2,vnt=3,Cnt={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function px(i){return Math.log2(Math.max(i,.01)+1)}function gx(i,e,r){return Math.max(e,Math.min(r,i))}function pA(i){const e=i.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function _nt({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 j=r.current;if(!j)return;const P=new ResizeObserver(W=>{for(const K of W){const z=K.contentRect.width,G=Math.max(360,Math.min(620,z*.6));a({width:z,height:G})}});return P.observe(j),()=>P.disconnect()},[]);const d=Y.useMemo(()=>i.filter(j=>j.status!=="completed"),[i]),f=Y.useMemo(()=>d.filter(pA),[d]),g=Y.useMemo(()=>d.filter(j=>!pA(j)),[d]),x=Y.useMemo(()=>[...f].sort((j,P)=>(P.rice.score??0)-(j.rice.score??0)),[f]),y=Math.max(120,n.width-Ce.left-Ce.right),v=Math.max(120,n.height-Ce.top-Ce.bottom),C=px(uA),k=px(dA)-C,T=j=>{const P=(px(gx(j,uA,dA))-C)/k;return Ce.left+(1-P)*y},E=j=>{const P=(gx(j,fx,fA)-fx)/(fA-fx);return Ce.top+(1-P)*v},A=j=>6+(gx(j,1,10)-1)/9*18,B=j=>Math.max(.4,j/100),L=T(xnt),N=E(vnt),M=[.5,1,2,4,8],I=[1,2,3,4,5];return m.jsxs("div",{className:"rice-scatter",ref:r,children:[m.jsxs("svg",{className:"rice-scatter-svg",width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,role:"img","aria-label":`RICE scatter: ${f.length} rated tasks plotted by impact and effort`,children:[m.jsx("rect",{x:Ce.left,y:Ce.top,width:L-Ce.left,height:N-Ce.top,className:"rice-quad rice-quad--big-bets"}),m.jsx("rect",{x:L,y:Ce.top,width:Ce.left+y-L,height:N-Ce.top,className:"rice-quad rice-quad--quick-wins"}),m.jsx("rect",{x:Ce.left,y:N,width:L-Ce.left,height:Ce.top+v-N,className:"rice-quad rice-quad--time-sinks"}),m.jsx("rect",{x:L,y:N,width:Ce.left+y-L,height:Ce.top+v-N,className:"rice-quad rice-quad--fill-ins"}),m.jsx("text",{x:Ce.left+8,y:Ce.top+18,className:"rice-quad-label",children:"Big Bets"}),m.jsx("text",{x:Ce.left+y-8,y:Ce.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),m.jsx("text",{x:Ce.left+8,y:Ce.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),m.jsx("text",{x:Ce.left+y-8,y:Ce.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),m.jsx("line",{x1:L,y1:Ce.top,x2:L,y2:Ce.top+v,className:"rice-quad-divider"}),m.jsx("line",{x1:Ce.left,y1:N,x2:Ce.left+y,y2:N,className:"rice-quad-divider"}),m.jsx("line",{x1:Ce.left,y1:Ce.top+v,x2:Ce.left+y,y2:Ce.top+v,className:"rice-axis"}),m.jsx("line",{x1:Ce.left,y1:Ce.top,x2:Ce.left,y2:Ce.top+v,className:"rice-axis"}),M.map(j=>m.jsxs("g",{children:[m.jsx("line",{x1:T(j),y1:Ce.top+v,x2:T(j),y2:Ce.top+v+4,className:"rice-axis"}),m.jsxs("text",{x:T(j),y:Ce.top+v+18,textAnchor:"middle",className:"rice-tick",children:[j,"w"]})]},`xt-${j}`)),m.jsx("text",{x:Ce.left+y/2,y:Ce.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),I.map(j=>m.jsxs("g",{children:[m.jsx("line",{x1:Ce.left-4,y1:E(j),x2:Ce.left,y2:E(j),className:"rice-axis"}),m.jsx("text",{x:Ce.left-8,y:E(j)+4,textAnchor:"end",className:"rice-tick",children:j})]},`yt-${j}`)),m.jsx("text",{transform:`translate(${Ce.left-44}, ${Ce.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),f.map(j=>{const P=j.rice,W=T(P.effort),K=E(P.impact),z=A(P.reach),G=B(P.confidence),D=Cnt[j.status],F=h===j.slug;return m.jsx("circle",{cx:W,cy:K,r:z,fill:`var(${D})`,fillOpacity:G,stroke:"var(--color-bg)",strokeWidth:F?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${j.name}: reach ${P.reach}, impact ${P.impact}, confidence ${P.confidence}, effort ${P.effort} weeks, score ${P.score}`,onClick:()=>e(j),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),e(j))},onMouseEnter:()=>u(j.slug),onMouseLeave:()=>u(null),onFocus:()=>u(j.slug),onBlur:()=>u(null),children:m.jsx("title",{children:`${j.name}
|
|
474
|
+
R ${P.reach} · I ${P.impact} · C ${P.confidence}% · E ${P.effort}w
|
|
475
|
+
Score: ${P.score}`})},j.slug)})]}),m.jsx("ol",{className:"rice-scatter-sr-list",children:x.map(j=>m.jsx("li",{children:`${j.name} — score ${j.rice.score}`},j.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(j=>!j),"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(j=>m.jsx(tf,{task:j,onClick:()=>e(j),onDragStart:()=>{}},j.slug))})]})]})}function knt({onClose:i,tasks:e}){const{data:r,isLoading:n}=Kj(),a=urt(),o=drt(),[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(C=>C.version===v).length,x=(r??[]).filter(v=>v.status==="planning"),y=(r??[]).filter(v=>v.status==="released");return m.jsx("div",{className:"modal-overlay",onClick:i,children:m.jsxs("div",{className:"modal version-manager-modal",onClick:v=>v.stopPropagation(),children:[m.jsxs("div",{className:"modal-header",children:[m.jsx("h2",{className:"modal-title",children:"Versions & Releases"}),m.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),m.jsxs("div",{className:"modal-body version-manager-body",children:[m.jsxs("div",{className:"version-stats",children:[m.jsxs("div",{className:"version-stat",children:[m.jsx("span",{className:"version-stat-count",children:x.length}),m.jsx("span",{className:"version-stat-label",children:"Planning"})]}),m.jsxs("div",{className:"version-stat",children:[m.jsx("span",{className:"version-stat-count",children:y.length}),m.jsx("span",{className:"version-stat-label",children:"Released"})]})]}),n&&m.jsx("p",{className:"version-manager-loading",children:"Loading..."}),x.length>0&&m.jsxs("div",{className:"version-section",children:[m.jsx("h3",{className:"version-section-title",children:"Planning"}),x.map(v=>{const C=g(v.version);return m.jsxs("div",{className:"version-item",children:[m.jsxs("div",{className:"version-item-info",children:[m.jsx("span",{className:"version-status-badge version-status-badge--planning",children:"planning"}),m.jsx("span",{className:"version-item-name",children:v.version}),m.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]})]}),v.summary&&m.jsx("p",{className:"version-item-desc",children:v.summary}),m.jsx("div",{className:"version-item-actions",children:m.jsx("button",{className:"btn btn--primary version-release-btn",onClick:()=>o.mutate({version:v.version,updates:{status:"released"}}),children:"Release"})})]},v.version)})]}),y.length>0&&m.jsxs("div",{className:"version-section",children:[m.jsx("h3",{className:"version-section-title",children:"Released"}),y.map(v=>{const C=g(v.version);return m.jsxs("div",{className:"version-item version-item--released",children:[m.jsxs("div",{className:"version-item-info",children:[m.jsx("span",{className:"version-status-badge version-status-badge--released",children:"released"}),m.jsx("span",{className:"version-item-name",children:v.version}),m.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]}),v.date&&m.jsx("span",{className:"version-item-date",children:v.date})]}),v.summary&&m.jsx("p",{className:"version-item-desc",children:v.summary})]},v.version)})]}),(r??[]).length===0&&!n&&m.jsx("p",{className:"version-manager-empty",children:"No versions yet. Create one below."}),m.jsxs("form",{onSubmit:f,className:"version-create-form",children:[m.jsx("h3",{className:"version-section-title",children:"New Version"}),m.jsx("input",{className:"field-input",value:c,onChange:v=>h(v.target.value),placeholder:"Version name (e.g. v0.2.0)",required:!0}),m.jsx("input",{className:"field-input",value:u,onChange:v=>d(v.target.value),placeholder:"Summary (optional)"}),m.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!c.trim()||a.isPending,children:a.isPending?"...":"Create Planning Version"})]})]})]})})}const gA={critical:0,high:1,medium:2,low:3},mA={critical:0,high:1,medium:2,low:3},rD=[{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"}],nD=[{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"}],aD=[{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 wnt(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(gA[r.priority]??9)-(gA[n.priority]??9);case"urgency":return(mA[r.urgency]??9)-(mA[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 Snt(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 wnt(r,e.sortField)}function yA(i){const e=i,r={...Xg};for(const a of Object.keys(Xg))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 bA(i,e){if(e==="none")return[];switch(e){case"status":return rD.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 nD.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 aD.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 Tnt(i,e){return i?`dreamcontext:${i}:${e}`:`dreamcontext:${e}`}function Ent(i,e){try{const r=localStorage.getItem(i);return r===null?e:JSON.parse(r)}catch{return e}}function Nnt(i,e){try{localStorage.setItem(i,JSON.stringify(e))}catch{}}function Ant(){const{t:i}=Bi(),{projectId:e}=eL(),{data:r,isLoading:n,isError:a,error:o}=nrt(),{data:c}=Kj(),h=Gj(),{data:u}=ort(),d=lrt(),f=Yj(),[g,x]=Y.useState(null),y=(ct,Z)=>{Z.preventDefault(),x({x:Z.clientX,y:Z.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&&I(null)}})},[C,_]=Y.useState(null),k=()=>{_(null),d.mutate(void 0,{onSuccess:({report:ct})=>{const Z=ct.pushed+ct.created+ct.pulled+ct.deleted+ct.mirrorDeleted;_(ct.skipped==="locked"?"⏳ another sync is already running":ct.errors.length>0?`⚠ ${ct.errors[0]}`:ct.conflicts.length>0?`↕ ${Z} synced · ${ct.conflicts.length} conflict(s) preserved`:Z>0?`↕ ${ct.pushed+ct.created} up · ${ct.pulled} down`:"✓ up to date"),setTimeout(()=>_(null),6e3)},onError:ct=>{_(`⚠ ${ct.message}`),setTimeout(()=>_(null),6e3)}})},T=((u==null?void 0:u.pendingPush)??0)+((u==null?void 0:u.queuedOps)??0),E=u&&u.backend!=="local"?m.jsxs("div",{className:"filter-sync-wrap",children:[C&&m.jsx("span",{className:"filter-sync-note",children:C}),m.jsxs("button",{className:"filter-sync-btn",onClick:k,disabled:d.isPending,title:`Sync with ${u.backend}`,children:[m.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",className:d.isPending?"filter-sync-spin":void 0,children:[m.jsx("path",{d:"M12 7a5 5 0 0 1-9.17 2.75M2 7a5 5 0 0 1 9.17-2.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),m.jsx("path",{d:"M11.5 1.5v3h-3M2.5 12.5v-3h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),d.isPending?"Syncing…":"Sync",T>0&&!d.isPending&&m.jsx("span",{className:"filter-sync-badge",children:T})]})]}):void 0,[A,B]=Y.useState(!1),[L,N]=Y.useState(!1),[M,I]=Y.useState(null),j=Y.useMemo(()=>Tnt(e,"kanban-filters"),[e]),[P,W]=Y.useState(()=>{const ct=Ent(j,Xg);return yA(ct)}),K=Y.useCallback(ct=>{W(Z=>{const Q=typeof ct=="function"?ct(Z):ct;return Nnt(j,Q),Q})},[j]),z=mrt(e),G=Y.useCallback((ct,Z)=>{K(Q=>({...Q,[ct]:Z}))},[K]),D=Y.useCallback(()=>{K(ct=>({...Xg,sortField:ct.sortField,groupBy:ct.groupBy,subGroupBy:ct.subGroupBy,viewMode:ct.viewMode}))},[K]),F=Y.useCallback(ct=>{yrt(e,ct,{...P})},[P,e]),q=Y.useCallback(ct=>{K(yA(ct.filters))},[K]),X=Y.useCallback(ct=>{brt(e,ct)},[e]),nt=Y.useMemo(()=>Snt(r??[],P),[r,P]),H=Y.useMemo(()=>!M||!r?null:r.find(ct=>ct.slug===M)??null,[M,r]),J=Y.useMemo(()=>{const ct=new Set;for(const Z of r??[])for(const Q of Z.tags)ct.add(Q);return Array.from(ct).sort()},[r]),ht=Y.useMemo(()=>{const ct=new Set;for(const Z of r??[])Z.version&&ct.add(Z.version);for(const Z of c??[])ct.add(Z.version);return Array.from(ct).sort()},[r,c]),at=(ct,Z,Q)=>{switch(Q){case"status":h.mutate({slug:ct,updates:{status:Z}});break;case"priority":h.mutate({slug:ct,updates:{priority:Z}});break;case"urgency":h.mutate({slug:ct,updates:{urgency:Z}});break;case"tags":{const tt=(r??[]).find(ot=>ot.slug===ct);tt&&!tt.tags.includes(Z)&&Z!=="(untagged)"&&h.mutate({slug:ct,updates:{tags:[...tt.tags,Z]}})}break;case"version":h.mutate({slug:ct,updates:{version:Z==="(no version)"?null:Z}});break}};if(n)return m.jsx("div",{className:"loading",children:i("common.loading")});if(a)return m.jsxs("div",{className:"error-state",children:["Failed to load tasks. ",o==null?void 0:o.message]});const vt=()=>{const{groupBy:ct,subGroupBy:Z}=P,Q=(tt,ot,Ct,At,Dt)=>m.jsx(YN,{title:typeof ot=="string"&&ot.includes(".")?i(ot):ot,status:tt,tasks:At,count:At.length,colorVar:Ct,onTaskClick:qt=>I(qt.slug),onTaskContextMenu:y,onDrop:(qt,Rt)=>at(qt,Rt,ct),staggerIndex:Dt+1,subGroups:Z!=="none"?bA(At,Z):void 0},tt);switch(ct){case"status":return rD.map((tt,ot)=>Q(tt.key,tt.labelKey,tt.colorVar,nt.filter(Ct=>Ct.status===tt.key),ot));case"priority":return nD.map((tt,ot)=>Q(tt.key,tt.label,tt.colorVar,nt.filter(Ct=>Ct.priority===tt.key),ot));case"urgency":return aD.map((tt,ot)=>Q(tt.key,tt.label,tt.colorVar,nt.filter(Ct=>Ct.urgency===tt.key),ot));case"tags":{const tt=new Map;for(const ot of nt)if(ot.tags.length===0){const Ct=tt.get("(untagged)")??[];Ct.push(ot),tt.set("(untagged)",Ct)}else for(const Ct of ot.tags){const At=tt.get(Ct)??[];At.push(ot),tt.set(Ct,At)}return Array.from(tt.entries()).map(([ot,Ct],At)=>Q(ot,ot,"--color-brand-vivid",Ct,At))}case"version":{const tt=(c??[]).filter(At=>At.status==="planning").map(At=>At.version),ot=(c??[]).filter(At=>At.status==="released").map(At=>At.version),Ct=["(no version)",...tt,...ot];for(const At of nt)At.version&&!Ct.includes(At.version)&&Ct.push(At.version);return Ct.map((At,Dt)=>{const qt=nt.filter(Rt=>(Rt.version??"(no version)")===At);return qt.length===0&&At!=="(no version)"?null:Q(At,At,"--color-brand-mid",qt,Dt)}).filter(Boolean)}case"none":return[m.jsx(YN,{title:"All Tasks",status:"all",tasks:nt,count:nt.length,colorVar:"--color-brand-vivid",onTaskClick:tt=>I(tt.slug),onTaskContextMenu:y,onDrop:()=>{},subGroups:Z!=="none"?bA(nt,Z):void 0},"all")]}};return m.jsxs("div",{className:"kanban-board",children:[m.jsx(qrt,{filters:P,onFilterChange:G,onClearFilters:D,onCreateClick:()=>B(!0),presets:z,onSavePreset:F,onLoadPreset:q,onDeletePreset:X,allTags:J,allVersions:ht,onVersionManagerClick:()=>N(!0),syncSlot:E}),P.viewMode==="eisenhower"?m.jsx(bnt,{tasks:nt,onTaskClick:ct=>I(ct.slug),onTaskMove:(ct,Z)=>h.mutate({slug:ct,updates:Z})}):P.viewMode==="scatter"?m.jsx(_nt,{tasks:nt,onTaskClick:ct=>I(ct.slug)}):P.viewMode==="list"?m.jsx("div",{className:"task-list",children:nt.map(ct=>m.jsx(tf,{task:ct,onClick:()=>I(ct.slug),onContextMenu:Z=>y(ct,Z),onDragStart:()=>{}},ct.slug))}):m.jsx("div",{className:"kanban-columns",children:vt()}),A&&m.jsx(Urt,{onClose:()=>B(!1)}),L&&m.jsx(knt,{onClose:()=>N(!1),tasks:r??[]}),H&&m.jsx(gnt,{task:H,onClose:()=>I(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:()=>{I(g.task.slug),x(null)},children:"Open"}),m.jsx("button",{type:"button",className:"task-ctx-item task-ctx-item--danger",onClick:v,children:"Delete task"})]})})]})}function Mnt(){return m.jsx("div",{children:m.jsx(Ant,{})})}function Bnt(){return ri({queryKey:["changelog"],queryFn:()=>Xt.get("/changelog")})}const Lnt=25;function xA({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":Va(i.type),children:i.type}),i.scope&&m.jsx("span",{className:"changelog-scope",children:i.scope}),i.breaking&&m.jsx("span",{className:"changelog-breaking",children:e("sleep.changelog.breaking")})]}),m.jsx("p",{className:"changelog-summary",children:i.summary}),i.description&&m.jsx("p",{className:"changelog-desc",children:i.description})]})}function Ont(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 Rnt(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=nL(),{data:o}=Bnt();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=iL(e.debt),h=rL(e.debt),u=e.last_sleep,d=(o==null?void 0:o.entries)??[],f=u?d.filter(C=>C.date>u):[],g=u?d.filter(C=>C.date<=u):d,x=g.slice(0,Lnt),y=Ont(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(xA,{entry:C},`p-${_}`))})]}),y.map(C=>m.jsxs("div",{className:"changelog-group",children:[m.jsx("h3",{className:"changelog-group-title changelog-group-title--day",children:C.date}),m.jsx("div",{className:"changelog-list",children:C.items.map((_,k)=>m.jsx(xA,{entry:_},`${C.date}-${k}`))})]},C.date)),v>0&&m.jsxs("p",{className:"changelog-more",children:[v," ",i("sleep.changelog.earlier")]})]}),e.sessions.length>0&&m.jsxs("div",{className:"sleep-section",children:[m.jsxs("h2",{className:"sleep-section-title",children:[i("sleep.sessions")," (",e.sessions.length,")"]}),m.jsx("div",{className:"session-list",children:e.sessions.map((C,_)=>m.jsxs("div",{className:"session-item",children:[m.jsxs("div",{className:"session-header",children:[m.jsx("span",{className:"session-time",children:C.stopped_at??"Active"}),C.score!==null&&m.jsxs("span",{className:"session-score",children:["+",C.score]}),C.change_count!==null&&m.jsxs("span",{className:"session-changes",children:[C.change_count," changes"]}),C.tool_count!=null&&m.jsxs("span",{className:"session-changes",children:[C.tool_count," tools"]})]}),C.last_assistant_message&&m.jsxs("p",{className:"session-message",children:[C.last_assistant_message.slice(0,150),C.last_assistant_message.length>150?"...":""]})]},_))})]}),e.dashboard_changes.length>0&&m.jsxs("div",{className:"sleep-section",children:[m.jsxs("h2",{className:"sleep-section-title",children:["Dashboard Changes (",e.dashboard_changes.length,")"]}),m.jsx("div",{className:"session-list",children:e.dashboard_changes.map((C,_)=>m.jsxs("div",{className:"session-item",children:[m.jsxs("div",{className:"session-header",children:[m.jsx("span",{className:"session-time",children:C.timestamp}),m.jsxs("span",{className:"session-changes",children:[C.entity," / ",C.action]})]}),m.jsx("p",{className:"session-message",children:C.summary})]},_))})]})]})}const jnt=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 mx(i){const e=i.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return jnt.has(e)}function Dnt(i){const{entities:e,relations:r}=Fnt(i),n=Int(i),a=new Set(e.map(f=>f.name.toLowerCase())),o=[...e,...n.filter(f=>!a.has(f.name.toLowerCase()))],c=$nt(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 Fnt(i){const e=[],r=[],n=i.split(`
|
|
476
|
+
`);let a=null,o=[],c,h=!1,u=null;function d(){a&&o.length>0&&e.push({name:a,path:c,fields:o,storageType:"table",notes:[]}),a=null,c=void 0,o=[],h=!1,u=null}for(let f=0;f<n.length;f++){const g=n[f],x=g.trim();if(/^\s*--\s*\d+\.\s+\w+/.test(g)){const I=g.match(/\/\w+\/\{[^}]+\}/);I&&(c=I[0]);continue}const y=x.match(/^CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"']?(\w+)[`"']?\s*\(/i);if(y){d(),a=y[1],o=[],h=!0;continue}if(!h||!a)continue;if(/^\s*\)\s*;/.test(g)){d();continue}if(/^\s*--/.test(g)){const j=g.replace(/^\s*--\s?/,"").trim();if(!j||/^[═─=\-*]{3,}/.test(j))continue;if(j.startsWith(".")){const W=j.match(/^\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(W&&mx(W[2])&&u){const K=W[1],z=W[2].toLowerCase(),D=(W[3]||"").match(/--\s*(.+)$/),F=D?D[1].trim():void 0;o.push({name:`${u}.${K}`,type:z,description:F,isNested:!0,parentField:u})}continue}const P=j.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(P&&mx(P[3])){const W=P[1].replace(/\[\]$/,""),K=P[2],z=P[3].toLowerCase(),D=(P[4]||"").match(/--\s*(.+)$/),F=D?D[1].trim():void 0;u=W,o.push({name:`${W}.${K}`,type:z,description:F,isNested:!0,parentField:W});continue}continue}if(!x)continue;const C=x.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(C))continue;const _=C.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!_)continue;const k=_[1],T=_[2],E=_[3]||"";if(!mx(T))continue;const A=T.toLowerCase(),B=/PRIMARY\s+KEY/i.test(E),L=E.match(/REFERENCES\s+[`"']?(\w+)[`"']?\s*\(\s*[`"']?(\w+)[`"']?\s*\)/i);L&&r.push({from:a,fromField:k,to:L[1],toField:L[2],cardinality:"1:1"});const N=g.match(/--\s*(.+)$/),M=N?N[1].trim():void 0;(A==="jsonb"||A==="json")&&(u=k),o.push({name:k,type:A,isPrimary:B,description:M})}return d(),{entities:e,relations:r}}function Int(i){var o,c,h,u,d;const e=[];let r=null,n=!1;const a=i.split(`
|
|
477
|
+
`);for(let f=0;f<a.length;f++){const x=a[f].match(/^--\s?(.*)/);if(!x)continue;const y=x[1].trim();if(/^={4,}$/.test(y)){r&&r.fields.length>0&&e.push(r),r=null,n=!1;continue}if(/^[A-Z ]+\(/.test(y)&&!y.match(/^[a-z_]/))continue;const v=y.match(/^([A-Z][A-Z _]+?):\s+(\S.+)$/);if(v&&!n){const C=v[1].trim();if(C===C.toUpperCase()&&C.length>1){r&&r.fields.length>0&&e.push(r);const _=v[2].trim();r={name:C,path:_,storageType:_.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(r){const C=y.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(C){r.managedBy=C[1].trim();continue}}if(y.includes("Fields in YAML frontmatter")||y.startsWith("Schema ")){n=!0;continue}if(y==="["||y==="{"){n=!0;continue}if(!(y==="]"||y==="}"||y==="..."||y==="},")){if(r&&n){const C=y.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(C){const{type:k,enumValues:T}=vA(C[2].trim(),(o=C[3])==null?void 0:o.trim());r.fields.push({name:C[1],type:k,enumValues:T,description:(c=C[3])==null?void 0:c.trim(),isPrimary:C[1]==="id"});continue}const _=y.match(/^"([a-z_]\w*)":\s+(.+?)(?:,)?(?:\s{2,}--\s+(.+))?$/);if(_){const{type:k,enumValues:T}=vA(_[2].trim(),(h=_[3])==null?void 0:h.trim());r.fields.push({name:_[1],type:k,enumValues:T,description:(u=_[3])==null?void 0:u.trim()});continue}}if(r&&y.startsWith("Body ")&&(r.notes.push(y),y.includes("sections")&&f+1<a.length)){const C=(d=a[f+1])==null?void 0:d.match(/^--\s?(.*)/);C&&/^\s*(Why|[A-Z])/.test(C[1])&&(r.notes.push(C[1].trim()),f++)}}}return r&&r.fields.length>0&&e.push(r),e}function vA(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 $nt(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 d1(i){return i.toLowerCase().replace(/\s+/g,"-")}function CA(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 znt(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 Pnt(i,e,r,n){if(n){const C=i.right-r.left,_=i.top+i.height*.35-r.top,k=36,T=28;return{d:`M ${C},${_} C ${C+k},${_-T*.3} ${C+k},${_-T*1.3} ${C},${_-T}`,labelX:C+k+4,labelY:_-T*.5}}const a=i.left+i.width/2-r.left,o=e.left+e.width/2-r.left,c=i.top+i.height/2-r.top,h=e.top+e.height/2-r.top,u=Math.abs(a-o),d=Math.abs(c-h);let f,g,x,y;if(u>d){a<o?(f=i.right-r.left,x=e.left-r.left):(f=i.left-r.left,x=e.right-r.left),g=c,y=h;const C=(x-f)*.4;return{d:`M ${f},${g} C ${f+C},${g} ${x-C},${y} ${x},${y}`,labelX:(f+x)/2,labelY:(g+y)/2-10}}f=a,x=o,c<h?(g=i.bottom-r.top,y=e.top-r.top):(g=i.top-r.top,y=e.bottom-r.top);const v=(y-g)*.4;return{d:`M ${f},${g} C ${f},${g+v} ${x},${y-v} ${x},${y}`,labelX:(f+x)/2,labelY:(g+y)/2-10}}function qnt({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":d1(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=znt(u,e,i.name),f=CA(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 _;const v=CA(y.type),C=y.name.slice((((_=y.parentField)==null?void 0:_.length)??0)+1);return m.jsxs("div",{className:"entity-field entity-field--nested",children:[m.jsx("span",{className:"entity-field-icon"}),m.jsxs("span",{className:"entity-field-name entity-field-name--nested",children:[".",C]}),m.jsx("span",{className:"entity-field-type","data-type":v,children:y.type}),y.description&&m.jsx("span",{className:"entity-field-desc",title:y.description,children:y.description})]},y.name)})]},u.name)})}),i.notes.length>0&&m.jsx("div",{className:"entity-card-notes",children:i.notes.map((u,d)=>m.jsx("div",{className:"entity-card-note",children:u},d))})]})}function Unt({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 sD({content:i}){const e=Y.useRef(null),[r,n]=Y.useState([]),[a,o]=Y.useState({width:0,height:0}),c=Y.useMemo(()=>Dnt(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="${d1(g.from)}"]`),y=u.querySelector(`[data-entity="${d1(g.to)}"]`);if(!x||!y)continue;const v=x.getBoundingClientRect(),C=y.getBoundingClientRect(),{d:_,labelX:k,labelY:T}=Pnt(v,C,d,g.from===g.to);f.push({d:_,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(qnt,{entity:u,relations:c.relations},u.name))}),m.jsx(Unt,{relations:c.relations,entities:c.entities})]})}const Hnt={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function f1({type:i}){return m.jsx("span",{className:`json-type-badge ${Hnt[i]??""}`,children:i})}function p1(){return m.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function Wnt({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(f1,{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(f1,{type:f.type}),f.breaking&&m.jsx(p1,{}),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 Gnt({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(p1,{}),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(f1,{type:g.type}),g.breaking&&m.jsx(p1,{}),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 Ynt({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(Wnt,{data:i}):n&&((c=i[0])!=null&&c.version)?m.jsx(Gnt,{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 Knt(i){return i.endsWith(".sql")||i.endsWith(".json")||i.endsWith(".md")}function Vnt({onNavigateTaxonomy:i}={}){const{t:e}=Bi(),r=Ui(),[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}=ri({queryKey:["core"],queryFn:()=>Xt.get("/core")}),{data:C}=ri({queryKey:["core",n],queryFn:()=>Xt.get(`/core/${n}`),enabled:!!n}),_=ir({mutationFn:({filename:B,content:L})=>Xt.put(`/core/${B}`,{content:L}),onSuccess:()=>{r.invalidateQueries({queryKey:["core"]}),u(!1)}}),k=()=>{(C==null?void 0:C.content)!==void 0&&(c(C.content),u(!0))},T=()=>{n&&o!==null&&_.mutate({filename:n,content:o})};if(x)return m.jsx("div",{className:"loading",children:e("common.loading")});if(y)return m.jsxs("div",{className:"error-state",children:["Failed to load core files. ",v==null?void 0:v.message]});const E=(g==null?void 0:g.files)??[],A=()=>{if(!n||!C)return null;if(n==="taxonomy.json"&&i)return m.jsxs("div",{className:"core-taxonomy-link",children:[m.jsx("p",{className:"core-taxonomy-link-hint",children:"This file is managed by the Taxonomy system."}),m.jsx("button",{className:"btn btn--primary",onClick:i,children:"Open Taxonomy page"})]});if(d==="preview"){if(n.endsWith(".sql")&&C.content)return m.jsx(sD,{content:C.content});if(n.endsWith(".json")&&C.data)return m.jsx(Ynt,{data:C.data,filename:n});if(n.endsWith(".md")&&C.content)return m.jsx(Jd,{content:C.content,frontmatter:C.frontmatter})}return m.jsx("pre",{className:"core-viewer-content",children:C.content??JSON.stringify(C.data,null,2)})};return m.jsxs("div",{className:"core-page",children:[m.jsx("h1",{className:"page-title",children:e("core.title")}),m.jsxs("div",{className:"core-layout",children:[m.jsx("div",{className:"core-list",children:E.map((B,L)=>m.jsxs("button",{className:`core-list-item ${n===B.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(L+1,8)}`,onClick:()=>{a(B.filename),u(!1),f("preview")},children:[m.jsx("span",{className:"core-list-name",children:B.name}),m.jsx("span",{className:"core-list-type",children:B.type})]},B.filename))}),m.jsxs("div",{className:"core-detail",children:[!n&&m.jsx("div",{className:"core-empty",children:"Select a file to view."}),n&&C&&!h&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:C.filename}),m.jsxs("div",{className:"core-viewer-actions",children:[Knt(n)&&m.jsxs("div",{className:"core-tabs",children:[m.jsx("button",{className:`core-tab ${d==="file"?"core-tab--active":""}`,onClick:()=>f("file"),children:"File"}),m.jsx("button",{className:`core-tab ${d==="preview"?"core-tab--active":""}`,onClick:()=>f("preview"),children:"Preview"})]}),C.type==="markdown"&&m.jsx("button",{className:"btn btn--ghost",onClick:k,children:"Edit"})]})]}),A()]}),n&&h&&m.jsxs("div",{className:"core-editor",children:[m.jsxs("div",{className:"core-editor-header",children:[m.jsxs("h2",{className:"core-viewer-title",children:["Editing: ",n]}),m.jsxs("div",{className:"core-editor-actions",children:[m.jsx("button",{className:"btn btn--ghost",onClick:()=>u(!1),children:"Cancel"}),m.jsx("button",{className:"btn btn--primary",onClick:T,disabled:_.isPending,children:_.isPending?"Saving...":"Save"})]})]}),m.jsxs("div",{className:"core-editor-split",children:[m.jsx("textarea",{className:"core-editor-textarea",value:o??"",onChange:B=>c(B.target.value)}),m.jsx("pre",{className:"core-editor-preview",children:o})]})]})]})]})]})}function Xnt(){return ri({queryKey:["knowledge"],queryFn:()=>Xt.get("/knowledge"),select:i=>i.entries})}function Znt(i){return ri({queryKey:["knowledge",i],queryFn:()=>Xt.get(`/knowledge/${i}`),select:e=>e.entry,enabled:!!i})}function Qnt(){const i=Ui();return ir({mutationFn:({slug:e,pinned:r})=>Xt.patch(`/knowledge/${e}`,{pinned:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["knowledge"]})}})}const Jnt='button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])';function tat({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 C=h.querySelectorAll(Jnt);if(C.length===0){v.preventDefault();return}const _=C[0],k=C[C.length-1],T=document.activeElement;!T||!h.contains(T)?(v.preventDefault(),(v.shiftKey?k:_).focus()):v.shiftKey&&(T===_||T===h)?(v.preventDefault(),k.focus()):!v.shiftKey&&T===k&&(v.preventDefault(),_.focus())};return document.addEventListener("keydown",y,!0),()=>{var v;document.removeEventListener("keydown",y,!0),d.style.overflow=f,d.style.paddingRight=g,(v=u==null?void 0:u.focus)==null||v.call(u)}},[]),m.jsxs("div",{ref:o,className:"fullscreen-overlay",role:"dialog","aria-modal":"true","aria-label":i,tabIndex:-1,children:[m.jsxs("div",{className:"fullscreen-overlay-header",children:[m.jsx("h2",{className:"fullscreen-overlay-title",children:i}),m.jsxs("div",{className:"fullscreen-overlay-actions",children:[e,m.jsx("button",{className:"fullscreen-overlay-close",onClick:r,title:a("common.close"),"aria-label":a("common.close"),children:"✕"})]})]}),m.jsx("div",{className:"fullscreen-overlay-body",children:n})]})}var yx={exports:{}},_A;function eat(){return _A||(_A=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,A=2,B=[],L=0,N=0,M;for(M=0;M<u.length;M+=1)if(C=u.charAt(M),Object.prototype.hasOwnProperty.call(y,C)||(y[C]=E++,v[C]=!0),_=k+C,Object.prototype.hasOwnProperty.call(y,_))k=_;else{if(Object.prototype.hasOwnProperty.call(v,k)){if(k.charCodeAt(0)<256){for(g=0;g<A;g++)L=L<<1,N==d-1?(N=0,B.push(f(L)),L=0):N++;for(x=k.charCodeAt(0),g=0;g<8;g++)L=L<<1|x&1,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=x>>1}else{for(x=1,g=0;g<A;g++)L=L<<1|x,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)L=L<<1|x&1,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=x>>1}T--,T==0&&(T=Math.pow(2,A),A++),delete v[k]}else for(x=y[k],g=0;g<A;g++)L=L<<1|x&1,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=x>>1;T--,T==0&&(T=Math.pow(2,A),A++),y[_]=E++,k=String(C)}if(k!==""){if(Object.prototype.hasOwnProperty.call(v,k)){if(k.charCodeAt(0)<256){for(g=0;g<A;g++)L=L<<1,N==d-1?(N=0,B.push(f(L)),L=0):N++;for(x=k.charCodeAt(0),g=0;g<8;g++)L=L<<1|x&1,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=x>>1}else{for(x=1,g=0;g<A;g++)L=L<<1|x,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)L=L<<1|x&1,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=x>>1}T--,T==0&&(T=Math.pow(2,A),A++),delete v[k]}else for(x=y[k],g=0;g<A;g++)L=L<<1|x&1,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=x>>1;T--,T==0&&(T=Math.pow(2,A),A++)}for(x=2,g=0;g<A;g++)L=L<<1|x&1,N==d-1?(N=0,B.push(f(L)),L=0):N++,x=x>>1;for(;;)if(L=L<<1,N==d-1){B.push(f(L));break}else N++;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,A,B,L,N,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),L=1;L!=B;)A=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(A>0?1:0)*L,L<<=1;switch(E){case 0:for(E=0,B=Math.pow(2,8),L=1;L!=B;)A=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(A>0?1:0)*L,L<<=1;N=r(E);break;case 1:for(E=0,B=Math.pow(2,16),L=1;L!=B;)A=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(A>0?1:0)*L,L<<=1;N=r(E);break;case 2:return""}for(g[3]=N,T=N,_.push(N);;){if(M.index>u)return"";for(E=0,B=Math.pow(2,v),L=1;L!=B;)A=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(A>0?1:0)*L,L<<=1;switch(N=E){case 0:for(E=0,B=Math.pow(2,8),L=1;L!=B;)A=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(A>0?1:0)*L,L<<=1;g[y++]=r(E),N=y-1,x--;break;case 1:for(E=0,B=Math.pow(2,16),L=1;L!=B;)A=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),E|=(A>0?1:0)*L,L<<=1;g[y++]=r(E),N=y-1,x--;break;case 2:return _.join("")}if(x==0&&(x=Math.pow(2,v),v++),g[N])C=g[N];else if(N===y)C=T+T.charAt(0);else return null;_.push(C),g[y++]=T+C.charAt(0),x--,T=C,x==0&&(x=Math.pow(2,v),v++)}}};return h})();i!=null?i.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})})(yx)),yx.exports}var iat=eat();const rat=/##\s*Drawing\s*```(compressed-json|json)\s*([\s\S]*?)```/;function nat(i){const e=i.match(rat);if(!e)return null;const[,r,n]=e;let a;if(r==="compressed-json"){const o=iat.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 oD(i){return i.endsWith(".excalidraw")}function aat({content:i}){const e=Y.useRef(null),{resolved:r}=Wd(),[n,a]=Y.useState(null);return Y.useEffect(()=>{const o=e.current;if(!o)return;let c=!1,h=null,u=null;const d=nat(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:_}=await import("./percentages-BXMCSKIN-AuedyVVS.js").then(k=>k.i);return{exportToSvg:_}},__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=iD(g,{maxZoom:12,minZoom:.1,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1});h=()=>v.dispose();const C=()=>{try{const _=o.getBoundingClientRect();if(_.width===0||_.height===0||x===0||y===0)return;const k=24,T=Math.min((_.width-k)/x,(_.height-k)/y,1);v.zoomAbs(0,0,1),v.moveTo(0,0),v.zoomAbs(0,0,T);const E=(_.width-x*T)/2,A=(_.height-y*T)/2;v.moveTo(E,A)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(C)),u=new ResizeObserver(()=>C()),u.observe(o)}catch(f){c||a(f instanceof Error?f.message:"Failed to render Excalidraw drawing.")}})(),()=>{c=!0,u==null||u.disconnect(),h==null||h(),o.innerHTML=""}},[i,r]),n?m.jsx("div",{className:"excalidraw-error",children:n}):m.jsx("div",{className:"excalidraw-preview","data-theme":r,children:m.jsx("div",{ref:e,className:"excalidraw-stage"})})}const sat=/```sql\s*\n([\s\S]*?)```/i;function oat(i,e){if(!i.startsWith("data-structures/"))return null;const r=e.match(sat);return r?r[1]:null}function lat(i){return i.split(/[-_]/).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(" ")}function cat(i,e){if(!e)return i.name;if(oD(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 hat(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=Xnt(),o=Qnt(),[c,h]=Y.useState(""),[u,d]=Y.useState(null),[f,g]=Y.useState("preview"),[x,y]=Y.useState(new Set),[v,C]=Y.useState(!1),{data:_}=Znt(u??""),k=Y.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const j=c.toLowerCase();return e.filter(P=>P.name.toLowerCase().includes(j)||P.description.toLowerCase().includes(j)||P.tags.some(W=>W.toLowerCase().includes(j)))},[e,c]),{rootEntries:T,folders:E}=Y.useMemo(()=>{const j=[],P=new Map;for(const K of k){const z=K.slug.indexOf("/");if(z===-1){j.push(K);continue}const G=K.slug.slice(0,z),D=P.get(G);D?D.push(K):P.set(G,[K])}const W=[...P.entries()].sort((K,z)=>K[0].localeCompare(z[0])).map(([K,z])=>({folder:K,label:lat(K),entries:z}));return{rootEntries:j,folders:W}},[k]),A=c.trim().length>0,B=j=>A||x.has(j),L=j=>{y(P=>{const W=new Set(P);return W.has(j)?W.delete(j):W.add(j),W})},N=(j,P=null)=>m.jsxs("button",{className:`knowledge-card ${u===j.slug?"knowledge-card--active":""}`,onClick:()=>{d(j.slug),g("preview")},children:[m.jsxs("div",{className:"knowledge-card-header",children:[m.jsx("span",{className:"knowledge-card-name",children:cat(j,P)}),m.jsx("button",{className:`pin-btn ${j.pinned?"pin-btn--active":""}`,onClick:W=>{W.stopPropagation(),o.mutate({slug:j.slug,pinned:!j.pinned})},title:j.pinned?i("knowledge.unpin"):i("knowledge.pin"),children:j.pinned?"◆":"◇"})]}),j.description&&m.jsx("p",{className:"knowledge-card-desc",children:j.description}),m.jsx("div",{className:"knowledge-card-tags",children:j.tags.map(W=>m.jsx("span",{className:"task-tag","data-hue":Va(W),children:W},W))})]},j.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"})]}),I=j=>{if(f==="preview"&&j.content){if(oD(j.slug))return m.jsx(aat,{content:j.content});const P=oat(j.slug,j.content);return P?m.jsx(sD,{content:P}):m.jsx(Jd,{content:j.content})}return m.jsx("pre",{className:"core-viewer-content",children:j.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:j=>h(j.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(j=>m.jsxs("div",{className:"knowledge-folder",children:[m.jsxs("button",{className:"knowledge-folder-header",onClick:()=>L(j.folder),"aria-expanded":B(j.folder),children:[m.jsx("span",{className:"knowledge-folder-chevron",children:B(j.folder)?"▾":"▸"}),m.jsx("span",{className:"knowledge-folder-name",children:j.label}),m.jsx("span",{className:"knowledge-folder-count",children:j.entries.length})]}),B(j.folder)&&m.jsx("div",{className:"knowledge-folder-items",children:j.entries.map(P=>N(P,j.folder))})]},j.folder)),T.map(j=>N(j))]}),m.jsxs("div",{className:"knowledge-detail",children:[!u&&m.jsx("div",{className:"core-empty",children:"Select a knowledge file to view."}),u&&_&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:_.name}),m.jsxs("div",{className:"core-viewer-actions",children:[M(),m.jsx("button",{className:"core-expand-btn",onClick:()=>C(!0),title:i("knowledge.fullscreen"),"aria-label":i("knowledge.fullscreen"),children:"⛶"})]})]}),v?m.jsx(tat,{label:_.name,actions:M(),onClose:()=>C(!1),children:I(_)}):I(_)]})]})]})]})}function uat(){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}=ri({queryKey:["features"],queryFn:()=>Xt.get("/features")}),g=(h==null?void 0:h.features)??[],x=Y.useMemo(()=>{if(!o.trim())return g;const v=o.toLowerCase();return g.filter(C=>C.slug.toLowerCase().includes(v)||C.status.toLowerCase().includes(v)||C.tags.some(_=>_.toLowerCase().includes(v)))},[g,o]),{data:y}=ri({queryKey:["features",e],queryFn:()=>Xt.get(`/features/${e}`),enabled:!!e,select:v=>v.feature});return u?m.jsx("div",{className:"loading",children:i("common.loading")}):d?m.jsxs("div",{className:"error-state",children:["Failed to load features. ",f==null?void 0:f.message]}):m.jsxs("div",{className:"features-page",children:[m.jsx("input",{className:"features-search",placeholder:i("features.search"),value:o,onChange:v=>c(v.target.value)}),m.jsxs("div",{className:"features-layout",children:[m.jsxs("div",{className:"features-list",children:[x.length===0&&m.jsx("div",{className:"core-empty",children:i("common.empty")}),x.map((v,C)=>{var _;return m.jsxs("button",{className:`feature-card ${e===v.slug?"feature-card--active":""} animate-stagger animate-stagger-${Math.min(C+1,8)}`,onClick:()=>{r(v.slug),a("preview")},children:[m.jsxs("div",{className:"feature-card-header",children:[m.jsx("span",{className:"feature-card-name",children:v.slug}),m.jsxs("div",{className:"feature-card-badges",children:[((_=v.freshness)==null?void 0:_.level)==="stale"&&m.jsx("span",{className:"feature-freshness feature-freshness--stale",children:"stale"}),m.jsx("span",{className:`feature-status feature-status--${v.status}`,children:v.status})]})]}),m.jsx("div",{className:"knowledge-card-tags",children:v.tags.map(k=>m.jsx("span",{className:"task-tag","data-hue":Va(k),children:k},k))})]},v.slug)})]}),m.jsxs("div",{className:"features-detail",children:[!e&&m.jsx("div",{className:"core-empty",children:"Select a feature to view."}),e&&y&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:y.slug}),m.jsx("div",{className:"core-viewer-actions",children:m.jsxs("div",{className:"core-tabs",children:[m.jsx("button",{className:`core-tab ${n==="file"?"core-tab--active":""}`,onClick:()=>a("file"),children:"File"}),m.jsx("button",{className:`core-tab ${n==="preview"?"core-tab--active":""}`,onClick:()=>a("preview"),children:"Preview"})]})})]}),m.jsxs("div",{className:"feature-meta",children:[m.jsxs("span",{children:["Status: ",y.status]}),m.jsxs("span",{children:["Created: ",y.created]}),m.jsxs("span",{children:["Updated: ",y.updated]})]}),y.related_tasks.length>0&&m.jsxs("div",{className:"feature-tasks",children:["Related tasks: ",y.related_tasks.join(", ")]}),n==="preview"&&y.content?m.jsx(Jd,{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 dat(){return ri({queryKey:["graph"],queryFn:()=>Xt.get("/graph"),staleTime:3e4})}const bx="dreamcontext:";function fat(i,e){const{projectId:r}=eL(),n=r?`${bx}${r}:${i}`:`${bx}${i}`,[a,o]=Y.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(r){const u=`${bx}${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 zc={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 pat(i){return{centerStrength:.05+i.centerStrength*.45,repelStrength:-(30+i.repelStrength*240),linkStrength:.1+i.linkStrength*1.2,linkDistance:20+i.linkDistance*180}}function gat(i){return{filters:{...zc.filters,...i.filters},groups:Array.isArray(i.groups)?i.groups:zc.groups,display:{...zc.display,...i.display},forces:{...zc.forces,...i.forces}}}function mat(){const[i,e]=fat("brain:settings:v1",zc),r=Y.useRef(!1);Y.useEffect(()=>{if(r.current)return;let d=!1;return Xt.get("/brain-settings").then(f=>{if(d)return;r.current=!0;const g=f.settings;g&&typeof g=="object"&&Object.keys(g).length>0&&e(gat(g))}).catch(()=>{r.current=!0}),()=>{d=!0}},[e]);const n=Y.useRef(null),a=Y.useCallback(d=>{r.current&&(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{Xt.put("/brain-settings",{settings:d}).catch(()=>{})},600))},[]),o=Y.useCallback(d=>{e(f=>{const g=d(f);return a(g),g})},[e,a]),c=Y.useCallback((d,f)=>{o(g=>({...g,[d]:{...g[d],...f}}))},[o]),h=Y.useCallback(d=>{o(f=>({...f,groups:d}))},[o]),u=Y.useCallback(()=>{o(()=>zc)},[o]);return{settings:i,patch:c,setGroups:h,reset:u}}function yat(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 bat{constructor(e){se(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?lD(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 lD(i){return i.type==="and"||i.type==="or"?{...i,children:i.children.map(lD)}:{...i,negated:!i.negated}}function kA(i){const e=i.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const r=yat(e),n=new bat(r).parse();return{match:a=>g1(n,a),raw:e,isEmpty:!1}}function g1(i,e){switch(i.type){case"and":return i.children.every(r=>g1(r,e));case"or":return i.children.some(r=>g1(r,e));case"word":return jp(wA(e,i.value),i.negated);case"phrase":return jp(wA(e,i.value),i.negated);case"regex":return jp(xat(e,i.value),i.negated);case"op":return jp(vat(e,i.op,i.arg),i.negated)}}function jp(i,e){return e?!i:i}function cD(i){return[i.label,i.path,i.id,i.meta.description??"",...i.meta.tags??[]].join(" ").toLowerCase()}function wA(i,e){return cD(i).includes(e)}function xat(i,e){return e.test(cD(i))}function vat(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 Dp={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},xx=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function Cat({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(Fp,{label:Dp.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(qu,{label:"Tags",checked:i.filters.showTags,onChange:u=>e("filters",{showTags:u})}),m.jsx(qu,{label:"Attachments",checked:i.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),m.jsx(qu,{label:"Existing files only",checked:i.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),m.jsx(qu,{label:"Orphans",checked:i.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),m.jsx(Fp,{label:Dp.groups,open:o.groups,onToggle:()=>h("groups"),children:m.jsx(kat,{groups:i.groups,onChange:r})}),m.jsxs(Fp,{label:Dp.display,open:o.display,onToggle:()=>h("display"),children:[m.jsx(_at,{label:"View",value:i.display.view==="3d"?"3d":"2d",options:[{value:"2d",label:"2D"},{value:"3d",label:"3D"}],onChange:u=>e("display",{view:u})}),m.jsx(qu,{label:"Arrows",checked:i.display.arrows,onChange:u=>e("display",{arrows:u})}),m.jsx(ul,{label:"Text fade threshold",value:i.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),m.jsx(ul,{label:"Node size",value:i.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),m.jsx(ul,{label:"Link thickness",value:i.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),m.jsxs(Fp,{label:Dp.forces,open:o.forces,onToggle:()=>h("forces"),children:[m.jsx(ul,{label:"Center force",value:i.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),m.jsx(ul,{label:"Repel force",value:i.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),m.jsx(ul,{label:"Link force",value:i.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),m.jsx(ul,{label:"Link distance",value:i.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Fp({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 qu({label:i,checked:e,onChange:r}){return m.jsxs("label",{className:"brain-toggle-row",children:[m.jsx("span",{children:i}),m.jsx("span",{className:`brain-toggle ${e?"brain-toggle--on":""}`,onClick:()=>r(!e),children:m.jsx("span",{className:"brain-toggle-knob"})})]})}function _at({label:i,value:e,options:r,onChange:n}){return m.jsxs("div",{className:"brain-segmented-row",children:[m.jsx("span",{className:"brain-segmented-label",children:i}),m.jsx("div",{className:"brain-segmented",role:"tablist",children:r.map(a=>m.jsx("button",{type:"button",role:"tab","aria-selected":e===a.value,className:`brain-segmented-btn ${e===a.value?"brain-segmented-btn--active":""}`,onClick:()=>n(a.value),children:a.label},a.value))})]})}function ul({label:i,value:e,onChange:r}){return m.jsxs("label",{className:"brain-slider-row",children:[m.jsx("span",{className:"brain-slider-label-text",children:i}),m.jsx("input",{type:"range",min:0,max:1,step:.01,value:e,onChange:n=>r(parseFloat(n.target.value))})]})}function kat({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:xx[i.length%xx.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:xx.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 wat(i){return ri({queryKey:["graph","content",(i==null?void 0:i.path)??null],queryFn:()=>{if(!i||!i.path)throw new Error("No path for node");return Xt.get(`/graph/content?path=${encodeURIComponent(i.path)}`)},enabled:!!(i&&i.path),staleTime:3e4})}const SA={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Sat={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},Tat={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function Eat(i){return i==="task"?"tasks":i==="feature"?"features":i==="knowledge"?"knowledge":i==="soul"||i==="user"||i==="memory"||i==="core"?"core":null}function Nat({node:i,onClose:e,onSelectRelated:r,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(i!=null&&i.path),u=wat(h?i:null);if(!i)return m.jsx("aside",{className:"brain-drawer"});const d=Eat(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:SA[i.group]}}),Sat[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(Jd,{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:SA[g.group]}}),m.jsx("span",{children:g.label}),m.jsx("span",{className:"brain-related-kind",children:Tat[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 Aat=Y.lazy(()=>Te(()=>import("./BrainCanvas3D-CoTzHqzT.js"),__vite__mapDeps([54,53])).then(i=>({default:i.BrainCanvas3D}))),Mat={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Bat={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function TA(i){return typeof i=="string"?i:i.id}function hD(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 EA(i,e){return Math.sqrt(hD(i)*e)*3}function Lat(i,e,r){for(const{group:n,parsed:a}of e)if(a.match(i))return n.color;return r[i.group]}function Oat({onNavigate:i}){const{data:e,isLoading:r,error:n}=dat(),a=Ui(),{settings:o,patch:c,setGroups:h,reset:u}=mat(),{resolved:d}=Wd(),f=d==="dark",g=f?Mat:Bat,x=Y.useRef(null),y=Y.useRef(void 0),[v,C]=Y.useState({w:0,h:0}),[_,k]=Y.useState(null),[T,E]=Y.useState(null),[A,B]=Y.useState(!0),L=Y.useRef(!1);Y.useEffect(()=>{if(!x.current)return;const Q=x.current,tt=()=>C({w:Q.clientWidth,h:Q.clientHeight});tt();const ot=new ResizeObserver(tt);return ot.observe(Q),()=>ot.disconnect()},[]);const N=Y.useMemo(()=>kA(o.filters.search),[o.filters.search]),M=Y.useMemo(()=>o.groups.map(Q=>({group:Q,parsed:kA(Q.query)})).filter(({parsed:Q})=>!Q.isEmpty),[o.groups]),{filteredData:I,neighborsById:j,totalDegreeById:P,inDegreeById:W}=Y.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const Q=new Map,tt=new Map;for(const Rt of e.nodes)Q.set(Rt.id,0),tt.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;Q.set(zt,(Q.get(zt)??0)+1),tt.set(Gt,(tt.get(Gt)??0)+1),tt.set(zt,(tt.get(zt)??0)+1)}const ot=Rt=>(tt.get(Rt)??0)===0,Ct=[],At=new Set;for(const Rt of e.nodes){if(!o.filters.showTags&&Rt.group==="tag"||!o.filters.showOrphans&&ot(Rt.id)||!N.isEmpty&&!N.match(Rt))continue;const Gt={...Rt};Gt.__inDegree=Q.get(Rt.id)??0,Gt.__totalDegree=tt.get(Rt.id)??0,Gt.__color=Lat(Rt,M,g),Ct.push(Gt),At.add(Rt.id)}const Dt=[],qt=new Map;for(const Rt of Ct)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)||(Dt.push({source:Gt,target:zt,kind:Rt.kind}),qt.get(Gt).add(zt),qt.get(zt).add(Gt))}return{filteredData:{nodes:Ct,links:Dt},neighborsById:qt,totalDegreeById:tt,inDegreeById:Q}},[e,o.filters,N,M]),K=Y.useMemo(()=>pat(o.forces),[o.forces]),z=.4+o.display.nodeSize*2.2;Y.useEffect(()=>{var At,Dt,qt,Rt,Gt,zt,ye,Ne,ve;const Q=y.current;if(!Q)return;const tt=(At=Q.d3Force)==null?void 0:At.call(Q,"charge");tt!=null&&tt.strength&&tt.strength(K.repelStrength),tt!=null&&tt.distanceMax&&tt.distanceMax(420);const ot=(Dt=Q.d3Force)==null?void 0:Dt.call(Q,"link");ot&&((qt=ot.strength)==null||qt.call(ot,K.linkStrength),(Rt=ot.distance)==null||Rt.call(ot,K.linkDistance));const Ct=(Gt=Q.d3Force)==null?void 0:Gt.call(Q,"center");Ct!=null&&Ct.strength&&Ct.strength(K.centerStrength),(zt=Q.d3Force)==null||zt.call(Q,"collide",cH().radius(pi=>EA(pi,z)+4).strength(.9).iterations(2)),(ye=Q.d3Force)==null||ye.call(Q,"x",_H(0).strength(K.centerStrength*.4)),(Ne=Q.d3Force)==null||Ne.call(Q,"y",kH(0).strength(K.centerStrength*.4)),(ve=Q.d3ReheatSimulation)==null||ve.call(Q)},[K,z,I]),Y.useEffect(()=>{L.current=!1},[e==null?void 0:e.nodes.length]),Y.useEffect(()=>{if(!e||!I.nodes.length)return;const Q=[];return[800,1600,2600].forEach(tt=>{Q.push(setTimeout(()=>{var Ct;if(L.current)return;const ot=y.current;ot&&((Ct=ot.zoomToFit)==null||Ct.call(ot,500,80),tt>=2600&&(L.current=!0))},tt))}),()=>Q.forEach(clearTimeout)},[e,I.nodes.length]);const G=Y.useMemo(()=>I.nodes.find(Q=>Q.id===_)??null,[I,_]),D=Y.useMemo(()=>{if(!G||!e)return[];const Q=[],tt=new Map(e.nodes.map(ot=>[ot.id,ot]));for(const ot of e.links){const Ct=typeof ot.source=="string"?ot.source:ot.source.id,At=typeof ot.target=="string"?ot.target:ot.target.id;if(Ct===G.id){const Dt=tt.get(At);Dt&&Q.push({node:Dt,kind:ot.kind})}else if(At===G.id){const Dt=tt.get(Ct);Dt&&Q.push({node:Dt,kind:ot.kind})}}return Q},[e,G]),F=Q=>{k(Q.id);const tt=y.current;tt&&typeof Q.x=="number"&&typeof Q.y=="number"&&(tt.centerAt(Q.x,Q.y,400),tt.zoom(Math.max(tt.zoom(),2.2),400))},q=()=>a.invalidateQueries({queryKey:["graph"]});Y.useEffect(()=>{const Q=tt=>{var At;if((At=tt.target)!=null&&At.matches("input,textarea"))return;const ot=y.current;if(!ot)return;const Ct=ot.zoom();if(tt.key==="+"||tt.key==="=")ot.zoom(Ct*1.2,200);else if(tt.key==="-"||tt.key==="_")ot.zoom(Ct/1.2,200);else if(tt.key.startsWith("Arrow")){const Dt=tt.shiftKey?120:40,qt=ot.centerAt();let Rt=0,Gt=0;tt.key==="ArrowUp"?Gt=-Dt:tt.key==="ArrowDown"?Gt=Dt:tt.key==="ArrowLeft"?Rt=-Dt:tt.key==="ArrowRight"&&(Rt=Dt),ot.centerAt(((qt==null?void 0:qt.x)??0)+Rt/Ct,((qt==null?void 0:qt.y)??0)+Gt/Ct,150)}};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[]);const X=T??_,nt=X?j.get(X)??new Set:null,H=Q=>!X||Q===X?!1:!(nt!=null&&nt.has(Q)),J=Q=>{const tt=Q.__color??g[Q.group];return H(Q.id)?Rat(tt,f?.18:.3):tt},ht=Q=>{const tt=TA(Q.source),ot=TA(Q.target);return X?tt===X||ot===X?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)"},at=.5+o.display.linkThickness*2.5,vt=Q=>Q.kind==="sibling_core"||Q.kind==="release_includes"?at*1.3:at,ct=Q=>hD(Q)*z,Z=(1-o.display.textFadeThreshold)*.8;return m.jsxs("div",{className:"brain-page",children:[m.jsxs("header",{className:"brain-header",children:[m.jsxs("h1",{className:"brain-title",children:[m.jsx("span",{className:"brain-title-mark",children:"◉"}),"Brain"]}),e&&m.jsxs("span",{className:"brain-stats",children:[I.nodes.length,"/",e.nodes.length," nodes · ",I.links.length," links"]}),m.jsxs("div",{className:"brain-header-actions",children:[m.jsx("button",{className:"brain-btn",onClick:q,title:"Refresh",children:"↻"}),m.jsx("button",{className:`brain-btn ${A?"brain-btn--active":""}`,onClick:()=>B(Q=>!Q),title:"Graph settings",children:"⚙"})]})]}),m.jsxs("div",{className:"brain-canvas-wrap",ref:x,onPointerLeave:()=>E(null),onPointerDown:()=>E(null),children:[A&&m.jsx(Cat,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>B(!1)}),r&&m.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&m.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&I.nodes.length===0&&!r&&m.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&I.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&m.jsx(hm,{ref:y,graphData:I,width:v.w,height:v.h,backgroundColor:f?"#151518":"#ffffff",nodeId:"id",nodeLabel:Q=>Q.label,nodeColor:Q=>J(Q),nodeVal:Q=>ct(Q),nodeRelSize:3,linkColor:Q=>ht(Q),linkWidth:Q=>vt(Q),linkDirectionalArrowLength:Q=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>f?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:Q=>F(Q),onNodeHover:Q=>E(Q?Q.id:null),onNodeDrag:()=>E(null),onZoom:()=>E(null),onBackgroundClick:()=>{k(null),E(null)},onEngineStop:()=>{var tt;if(L.current)return;const Q=y.current;Q&&((tt=Q.zoomToFit)==null||tt.call(Q,600,80),L.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(Q,tt,ot)=>{if(!(Q.id===T||Q.id===_||X&&(nt==null?void 0:nt.has(Q.id)))&&ot<Z)return;const At=Q.label,Dt=Math.max(10,13/Math.max(ot,.7));tt.font=`${Dt}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,tt.textAlign="center",tt.textBaseline="top";const qt=EA(Q,z),Rt=(Q.y??0)+qt+3,Gt=H(Q.id);f?tt.fillStyle=Gt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":tt.fillStyle=Gt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",tt.fillText(At,Q.x??0,Rt)}}),e&&I.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(Aat,{graphData:I,width:v.w,height:v.h,isDark:f,nodeColor:J,nodeVal:ct,linkColor:ht,linkWidth:vt,showArrows:o.display.arrows,forces:K,nodeSizeScale:z,isDimmed:H,neighborsById:j,onNodeClick:F,onNodeHover:Q=>E(Q?Q.id:null),onBackgroundClick:()=>{k(null),E(null)}})}),m.jsx(Nat,{node:G,onClose:()=>k(null),onSelectRelated:Q=>k(Q),relatedNodes:D,inDegree:G?W.get(G.id)??0:0,totalDegree:G?P.get(G.id)??0:0,onNavigate:i})]})]})}function Rat(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 jat(){return ri({queryKey:["council"],queryFn:()=>Xt.get("/council"),select:i=>i.debates})}function Dat(i){return ri({queryKey:["council",i],queryFn:()=>Xt.get(`/council/${i}`),select:e=>e.debate,enabled:!!i})}function uD(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 Fat(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 dD(i,e){return i.rounds.find(r=>r.round===e)??null}function fD(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 Iat(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 $at(i){return i.openQuestions?(i.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function zat(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+fD(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 Pat(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return e%360}const NA=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function qat(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return NA[e%NA.length]}function Uat(i){const e=(i||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function Hat(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 ef({slug:i,size:e=36,title:r,onClick:n}){const a=Pat(i),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=qat(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 Wat=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function Gat(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 Yat(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 Kat(i){return i==="complete"?"Complete":i==="synthesizing"?"Synthesizing":i.endsWith("_running")?"In progress":"Pending"}function Vat({debates:i,onOpen:e}){const{t:r}=Bi(),[n,a]=Y.useState(""),[o,c]=Y.useState("all"),h=Y.useMemo(()=>i.filter(u=>Gat(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:Wat.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 ${Yat(u.status)}`,children:[m.jsx("span",{className:"council-hall-status-dot"}),Kat(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(ef,{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 Xat(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 Zat({status:i,size:e="md"}){const{label:r,tone:n}=Xat(i);return m.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[m.jsx("span",{className:"council-status-dot"}),r]})}function Uu({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 Qat({debate:i,onCiteJump:e,onAgentJump:r}){const{t:n}=Bi(),a=Y.useMemo(()=>zat(i),[i]),o=i.finalReport?Hat(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(Uu,{value:a.rounds,label:"rounds"}),m.jsx(Uu,{value:a.personas,label:"personas"}),m.jsx(Uu,{value:a.pushbacks,label:"pushbacks"}),m.jsx(Uu,{value:a.openRisks,label:"open risks",tone:"warning"}),m.jsx(Uu,{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(Jat,{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 Jat({text:i,knownSlugs:e,onCiteJump:r,onAgentJump:n}){const a=[],o=new Set(e);let c=i.replace(/([a-z][a-z0-9-]+)\s+in\s+R(\d+)/g,(x,y,v)=>{if(!o.has(y))return x;const C=a.length;return a.push({slug:y,round:Number(v)}),`\0CITE${C}\0`});const h=[];c=c.replace(/\*\*([a-z][a-z0-9-]+)\*\*/g,(x,y)=>{if(!o.has(y))return x;const v=h.length;return h.push(y),`\0AGENT${v}\0`});const d=we.parse(c).split(/\u0000(CITE|AGENT)(\d+)\u0000/),f=[];let g=0;for(;g<d.length;){const x=d[g];if(g+2<d.length&&(d[g+1]==="CITE"||d[g+1]==="AGENT")){f.push(m.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`));const y=d[g+1],v=Number(d[g+2]);if(y==="CITE"){const C=a[v];f.push(m.jsxs("button",{type:"button",className:"council-cite-chip",onClick:()=>r(C.slug,C.round),children:[m.jsx(ef,{slug:C.slug,size:14}),m.jsx("span",{children:C.slug}),m.jsxs("span",{className:"council-cite-round",children:["R",C.round]})]},`c-${g}`))}else{const C=h[v];f.push(m.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(C),children:C},`a-${g}`))}g+=3}else f.push(m.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`)),g+=1}return m.jsx("div",{className:"council-sheet-prose council-citation-prose",children:f})}function pD({model:i}){const e=Uat(i),r=i?i.charAt(0).toUpperCase()+i.slice(1):"unknown";return m.jsx("span",{className:"council-model-badge",style:{background:`hsl(${e} 85% 55% / 0.14)`,color:`hsl(${e} 85% 40%)`,borderColor:`hsl(${e} 85% 55% / 0.35)`},title:`Model: ${r}`,children:r})}function tst(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 t_(i,e){if(!e.trim())return i;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return i.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function est({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=>tst(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(ist,{persona:f,query:n,collapsed:o.has(f.slug),highlighted:e===f.slug,onToggle:()=>d(f.slug)},f.slug))]})]})}function ist({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(ef,{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(pD,{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:t_(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(rst,{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 rst({round:i,crossContext:e,query:r}){const n=uD(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:t_(we.parse(e),r)}})]}),i.executiveSummary&&m.jsx(Hu,{title:"Executive summary",body:i.executiveSummary,query:r}),i.position&&m.jsx(Hu,{title:"Position",body:i.position,query:r}),i.reasoning&&m.jsx(Hu,{title:"Reasoning",body:i.reasoning,query:r}),i.reactions&&m.jsx(Hu,{title:"Reactions to peers",body:i.reactions,query:r}),i.openQuestions&&m.jsx(Hu,{title:"Open questions",body:i.openQuestions,query:r})]})}function Hu({title:i,body:e,query:r}){const n=t_(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 gD(i,e){return e.trim()?i?[i.executiveSummary,i.position,i.reasoning].filter(Boolean).join(`
|
|
480
|
+
`).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function nst({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)gD(dD(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(C=>C.slug===n.slug);if(y===-1)return;const v=i.frontmatter.rounds_planned;g.key==="ArrowRight"&&n.round<v?(g.preventDefault(),a(n.slug,n.round+1)):g.key==="ArrowLeft"&&n.round>1?(g.preventDefault(),a(n.slug,n.round-1)):g.key==="ArrowDown"&&y<i.personas.length-1?(g.preventDefault(),a(i.personas[y+1].slug,n.round)):g.key==="ArrowUp"&&y>0&&(g.preventDefault(),a(i.personas[y-1].slug,n.round))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[n,i,o,a]),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(ast,{persona:f,rounds:h,debate:i,query:e,selected:n,knownSlugs:u,onSelectCell:a},f.slug))]})})]})}function ast({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(ef,{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(pD,{model:i.frontmatter.model})]})]}),e.map(h=>{const u=dD(i,h),d=r.frontmatter.status===`round_${h}_running`,f=!!a&&a.slug===i.slug&&a.round===h,g=gD(u,n),x=!!n.trim()&&!g;return m.jsx(sst,{personaSlug:i.slug,round:h,data:u,isRunning:d,active:f,dimmed:x,knownSlugs:o,onSelect:c},h)})]})}function sst({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=uD(r.position),d=Fat(r.position),f=fD(r),g=$at(r),x=Iat(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(Wu,{title:"Executive summary",children:m.jsx("p",{children:r.executiveSummary})}),r.position&&m.jsx(Wu,{title:"Position",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.position)}})}),r.reasoning&&m.jsx(Wu,{title:"Reasoning",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.reasoning)}})}),r.reactions&&m.jsxs(Wu,{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(ef,{slug:y,size:14}),m.jsx("span",{children:y})]},y))})]}),r.openQuestions&&m.jsx(Wu,{title:"Open questions",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:we.parse(r.openQuestions)}})})]})]})}function Wu({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 AA(i){return i==="complete"||i==="synthesizing"?"overview":"matrix"}function ost({debate:i,onBack:e}){const{t:r}=Bi(),[n,a]=Y.useState(()=>AA(i.frontmatter.status)),[o,c]=Y.useState(""),[h,u]=Y.useState(null),[d,f]=Y.useState(null);Y.useEffect(()=>{a(AA(i.frontmatter.status)),c(""),u(null),f(null)},[i.frontmatter.id]);const g=(v,C)=>{a("matrix"),u({slug:v,round:C})},x=v=>{a("agents"),f(v)},y=()=>{var v;return(v=navigator.clipboard)==null?void 0:v.writeText(i.frontmatter.id).catch(()=>{})};return m.jsxs("div",{className:"council-detail",children:[m.jsxs("header",{className:"council-detail-head",children:[m.jsxs("button",{type:"button",className:"council-detail-back",onClick:e,children:["← ",r("council.title")]}),m.jsxs("div",{className:"council-detail-meta",children:[m.jsx(Zat,{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(vx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),m.jsx(vx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),m.jsx(vx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),m.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&m.jsx(Qat,{debate:i,onCiteJump:g,onAgentJump:x}),n==="agents"&&m.jsx(est,{debate:i,focusSlug:d}),n==="matrix"&&m.jsx(nst,{debate:i,query:o,onQueryChange:c,selected:h,onSelectCell:(v,C)=>u({slug:v,round:C}),onClearSelection:()=>u(null)})]})]})}function vx({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 lst(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=jat(),[o,c]=Y.useState(null),{data:h,isLoading:u}=Dat(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(ost,{debate:h,onBack:()=>c(null)})]}):m.jsxs("div",{className:"council-page",children:[m.jsx("h1",{className:"page-title",children:i("council.title")}),m.jsx(Vat,{debates:e??[],onOpen:c})]})}function cst(){return ri({queryKey:["config"],queryFn:()=>Xt.get("/config"),select:i=>i.config})}function hst(){const i=Ui();return ir({mutationFn:e=>Xt.patch("/config",e),onSuccess:()=>{i.invalidateQueries({queryKey:["config"]})}})}function ust(){return ri({queryKey:["vaults"],queryFn:()=>Xt.get("/vaults")})}function dst(){return ri({queryKey:["connections"],queryFn:()=>Xt.get("/connections"),select:i=>i.connections})}function fst(){const i=Ui();return ir({mutationFn:e=>Xt.post("/connections",e),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]})}})}function pst(){const i=Ui();return ir({mutationFn:e=>Xt.del(`/connections/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["connections"]})}})}function gst(){return ri({queryKey:["federation","inbox"],queryFn:()=>Xt.get("/federation/inbox")})}function mst(){return ir({mutationFn:()=>Xt.post("/federation/sync",{})})}const MA=["out","in","both"];function yst({shareable:i,onToggleShareable:e,shareablePending:r}){const{t:n}=Bi(),{data:a}=ust(),{data:o}=dst(),c=fst(),h=pst(),{data:u}=gst(),d=mst(),[f,g]=Y.useState(""),[x,y]=Y.useState("both"),[v,C]=Y.useState(null),_=(a==null?void 0:a.vaults)??[],k=(a==null?void 0:a.current)??null,T=o??[],E=new Set(T.map(M=>M.vault)),A=_.filter(M=>M.name!==k&&!E.has(M.name)),B=()=>{if(C(null),!f){C(n("federation.error.pick_vault"));return}c.mutate({vault:f,direction:x},{onSuccess:()=>{g(""),y("both")},onError:M=>C(M instanceof Error?M.message:String(M))})},L=(M,I)=>{c.mutate({vault:M.vault,direction:I,topics:M.topics})},N=(M,I)=>{const j=I.split(",").map(P=>P.trim()).filter(Boolean);c.mutate({vault:M.vault,direction:M.direction,topics:j.length>0?j:null})};return m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:n("settings.federation")}),m.jsxs("div",{className:"fed-intro",children:[m.jsx("h3",{className:"fed-intro-title",children:n("federation.intro.title")}),m.jsx("p",{className:"fed-intro-body",children:n("federation.intro.body")}),m.jsxs("ol",{className:"fed-intro-steps",children:[m.jsx("li",{children:n("federation.intro.step1")}),m.jsx("li",{children:n("federation.intro.step2")}),m.jsx("li",{children:n("federation.intro.step3")})]})]}),m.jsxs("div",{className:"fed-card",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.sharing")}),m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:i,disabled:r,onChange:M=>e(M.target.checked)}),m.jsx("span",{children:n("federation.shareable.label")})]}),m.jsx("p",{className:"settings-field-hint",children:n("federation.shareable.hint")})]}),m.jsxs("div",{className:"fed-vaults",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.vaults")}),_.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.vaults.empty")}):m.jsx("ul",{className:"fed-vault-list",children:_.map(M=>m.jsxs("li",{className:`fed-vault-item${M.name===k?" fed-vault-item--current":""}`,children:[m.jsx("span",{className:"fed-vault-name",children:M.name}),M.name===k&&m.jsx("span",{className:"fed-badge",children:n("federation.current")}),m.jsx("span",{className:"fed-vault-path",children:M.path})]},M.name))})]}),m.jsxs("div",{className:"fed-connections",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.connections")}),T.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.connections.empty")}):m.jsx("ul",{className:"fed-conn-list",children:T.map(M=>{var I;return m.jsxs("li",{className:"fed-conn-item",children:[m.jsxs("div",{className:"fed-conn-head",children:[m.jsx("span",{className:"fed-conn-name",children:M.vault}),M.status==="stale"&&m.jsx("span",{className:"fed-badge fed-badge--stale",children:n("federation.stale")}),m.jsx("button",{className:"btn fed-conn-remove",onClick:()=>h.mutate(M.vault),disabled:h.isPending,children:n("federation.remove")})]}),m.jsxs("div",{className:"fed-conn-controls",children:[m.jsx("div",{className:"fed-direction",role:"group","aria-label":n("federation.direction"),children:MA.map(j=>m.jsx("button",{className:`fed-dir-btn${M.direction===j?" fed-dir-btn--active":""}`,onClick:()=>L(M,j),disabled:c.isPending,children:n(`federation.direction.${j}`)},j))}),m.jsx("input",{className:"settings-text-input fed-topics-input",defaultValue:((I=M.topics)==null?void 0:I.join(", "))??"",placeholder:n("federation.topics.placeholder"),onBlur:j=>{const P=j.target.value.split(",").map(K=>K.trim()).filter(Boolean).join(", "),W=(M.topics??[]).join(", ");P!==W&&N(M,j.target.value)}})]}),m.jsx("p",{className:"settings-field-hint fed-dir-hint",children:n(`federation.direction.${M.direction}.hint`)})]},M.vault)})})]}),m.jsxs("div",{className:"fed-add",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.add")}),A.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")}),A.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:MA.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")})]}),A.length>0&&m.jsx("p",{className:"settings-field-hint fed-dir-hint",children:n(`federation.direction.${x}.hint`)}),v&&m.jsx("p",{className:"settings-test-err",children:v})]}),m.jsxs("div",{className:"fed-inbox",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.inbox")}),(()=>{const M=(u==null?void 0:u.pending)??[],I=(u==null?void 0:u.consumed)??[],j=(u==null?void 0:u.quarantined)??[];return M.length===0&&I.length===0&&j.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(P=>m.jsx(BA,{entry:P,fromLabel:n("federation.inbox.from")},`p-${P.id}`))})]}),I.length>0&&m.jsxs("div",{className:"fed-inbox-group",children:[m.jsxs("h4",{className:"fed-inbox-group-title",children:[n("federation.inbox.consumed")," (",I.length,")"]}),m.jsx("ul",{className:"fed-entry-list fed-entry-list--consumed",children:I.map(P=>m.jsx(BA,{entry:P,fromLabel:n("federation.inbox.from")},`c-${P.id}`))})]}),j.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")," (",j.length,")"]}),m.jsx("ul",{className:"fed-entry-list",children:j.map(P=>m.jsxs("li",{className:"fed-entry fed-entry--quarantined",children:[m.jsx("code",{className:"fed-entry-file",children:P.file}),m.jsxs("span",{className:"fed-entry-meta",children:["v",P.version]})]},`q-${P.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(bst,{deltas:d.data.deltas,t:n})]})]})}function BA({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 bst({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 xst(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 vst=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],Cx={platforms:[],disableNativeMemory:!0};function Cst(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n}=cst(),a=hst(),[o,c]=Y.useState(Cx.platforms),[h,u]=Y.useState(Cx.disableNativeMemory),[d,f]=Y.useState(!1),[g,x]=Y.useState(""),[y,v]=Y.useState(""),[C,_]=Y.useState(""),[k,T]=Y.useState(null),[E,A]=Y.useState(!1),[B,L]=Y.useState(null),[N,M]=Y.useState(!1),[I,j]=Y.useState(!1),[P,W]=Y.useState(!1),[K,z]=Y.useState(()=>oC()),[G,D]=Y.useState(!1),F=tt=>{z(tt),OG(tt),vv(tt)},{data:q}=ri({queryKey:["tasks-sync-status"],queryFn:()=>Xt.get("/tasks/sync-status"),select:tt=>tt.status}),{data:X}=ri({queryKey:["tasks-containers"],queryFn:()=>Xt.get("/tasks/containers"),select:tt=>tt.containers,enabled:d,staleTime:300*1e3}),nt=tt=>{const ot=(X??[]).find(Ct=>Ct.ids.listId===tt);ot&&(x(ot.ids.teamId),v(ot.ids.spaceId),_(ot.ids.listId),vt())},H=async()=>{M(!0),L(null);try{const{result:tt}=await Xt.post("/tasks/provision",{});L(tt.errors.length>0?`⚠ ${tt.errors[0]}`:tt.created.length>0?`✓ Created: ${tt.created.join(", ")}${tt.backfilled>0?` · backfilled ${tt.backfilled} value(s)`:""}`:"✓ All recommended fields already exist.")}catch(tt){L(`⚠ ${tt instanceof Error?tt.message:String(tt)}`)}finally{M(!1)}};if(Y.useEffect(()=>{var Ct,At,Dt;const tt=e??Cx;c(tt.platforms),u(tt.disableNativeMemory??!0);const ot=e;f((ot==null?void 0:ot.taskBackend)==="clickup"),x(((Ct=ot==null?void 0:ot.clickup)==null?void 0:Ct.teamId)??""),v(((At=ot==null?void 0:ot.clickup)==null?void 0:At.spaceId)??""),_(((Dt=ot==null?void 0:ot.clickup)==null?void 0:Dt.listId)??""),j(!1),W(!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 J=tt=>{c(ot=>{const Ct=ot.includes(tt)?ot.filter(At=>At!==tt):[...ot,tt];return j(!0),W(!1),Ct})},ht=()=>{u(tt=>!tt),j(!0),W(!1)},at=()=>{a.mutate({platforms:o,disableNativeMemory:h,taskBackend:d?"clickup":"local",...d?{clickup:{teamId:g||void 0,spaceId:y||void 0,listId:C||void 0}}:{}},{onSuccess:()=>{j(!1),W(!0)}})},vt=()=>{j(!0),W(!1)},ct=(e==null?void 0:e.shareable)===!0,Z=tt=>{a.mutate({shareable:tt})},Q=async()=>{A(!0),T(null);try{T(await Xt.post("/tasks/sync-test",{}))}catch(tt){T({ok:!1,backend:"clickup",error:tt instanceof Error?tt.message:String(tt)})}finally{A(!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:[P&&!I&&m.jsx("span",{className:"settings-saved",children:i("settings.saved")}),a.isError&&m.jsx("span",{className:"settings-error",children:i("common.error")}),m.jsx("button",{className:"btn btn--primary",onClick:at,disabled:!I||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:vst.map(({id:tt,labelKey:ot})=>m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(tt),onChange:()=>J(tt)}),m.jsx("span",{children:i(ot)})]},tt))})]}),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(tt=>!tt),vt()}}),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:[(X??[]).length>0&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:"List"}),m.jsx(h1,{value:C||null,options:(X??[]).map(tt=>({value:tt.ids.listId,label:tt.path})),placeholder:"Pick the list to sync to…",searchPlaceholder:"Search lists…",clearLabel:"(keep current)",onChange:nt})]}),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:tt=>{x(tt.target.value),vt()}})]}),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:tt=>{v(tt.target.value),vt()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:i("settings.cloud_tasks.list")}),m.jsx("input",{className:"settings-text-input",value:C,onChange:tt=>{_(tt.target.value),vt()}})]}),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:Q,disabled:E,children:i(E?"settings.cloud_tasks.testing":"settings.cloud_tasks.test")}),m.jsx("button",{className:"btn",onClick:H,disabled:N,children:N?"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]})]}),q&&q.backend!=="local"&&m.jsxs("p",{className:"settings-sync-badge",children:[i("settings.cloud_tasks.status"),": ",q.pendingPush," ",i("settings.cloud_tasks.pending"),q.conflicts>0&&` · ${q.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:ht}),m.jsx("span",{children:i("settings.native_memory.label")})]}),m.jsx("p",{className:"settings-field-hint",children:i("settings.native_memory.hint")})]})]}),m.jsx(yst,{shareable:ct,onToggleShareable:Z,shareablePending:a.isPending}),Po()&&m.jsxs("section",{className:"settings-section",children:[m.jsxs("h2",{className:"settings-section-title",children:["Sleepy — notch quick-capture",m.jsx("span",{className:"settings-beta-badge",children:"BETA"})]}),m.jsxs("div",{className:"settings-checkboxes",children:[m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:K.enabled,onChange:()=>F({...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:G?"Press a key combo…":K.hotkey,onFocus:()=>D(!0),onBlur:()=>D(!1),onKeyDown:tt=>{tt.preventDefault();const ot=xst(tt);ot&&(F({...K,hotkey:ot}),D(!1),tt.currentTarget.blur())}})]})]})]})]})}function mD(){return ri({queryKey:["packs"],queryFn:()=>Xt.get("/packs")})}function _st(){const i=Ui();return ir({mutationFn:e=>Xt.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function kst(){const i=Ui();return ir({mutationFn:e=>Xt.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function wst(i){return"base"in i}function yD({item:i,onActionDone:e}){const{t:r}=Bi(),n=_st(),a=kst(),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 Sst({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(yD,{item:i,onActionDone:e}),m.jsx("button",{className:"packs-modal-close btn btn--ghost",type:"button",onClick:e,"aria-label":r("packs.detail.close"),children:r("packs.detail.close")})]})]}),i.description&&m.jsx("p",{className:"packs-modal-desc",children:i.description}),i.tags.length>0&&m.jsx("div",{className:"packs-modal-tags",children:i.tags.map(a=>m.jsx("span",{className:"task-tag","data-hue":Va(a),children:a},a))}),wst(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 LA({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":Va(a),children:a},a))}),m.jsx(yD,{item:i})]})}function Tst(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=mD(),[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(LA,{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(LA,{item:d,onClick:c},d.name))})]}),o!==null&&m.jsx(Sst,{item:o,onClose:()=>c(null)})]})}function Est(){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 Nst(){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 Ast(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 Am({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]:Ast(u.sub,u.w,r==="mini"?10:12),x=15,y=u.glyph?f+6:g.length?f-8-(g.length-1)*(x/2):f,v=u.glyph?u.y+u.h-16:y+22;return m.jsxs("g",{className:`fd-node fd-node--${u.variant??"plain"}${u.breathe?" fd-node--breathe":""}`,children:[m.jsx("rect",{x:u.x,y:u.y,width:u.w,height:u.h,rx:"14",fill:`url(#${o})`,style:u.breathe&&u.breatheDelay!==void 0?{animationDelay:`${u.breatheDelay}s`}:void 0}),u.glyph&&m.jsx("text",{x:d,y:u.y+26,className:"fd-region-glyph",children:u.glyph}),m.jsx("text",{x:d,y,className:"fd-node-title",children:u.title}),g.length>0&&m.jsx("text",{x:d,y:v,className:"fd-node-sub",children:g.map((C,_)=>m.jsx("tspan",{x:d,dy:_===0?0:x,children:C},_))})]},u.id)})]})})}function an(i,e,r,n){const a=(e+n)/2;return`M ${i} ${e} C ${i} ${a}, ${r} ${a}, ${r} ${n}`}const e_=[{file:"soul",region:"Identity",glyph:"◆"},{file:"user",region:"Episodic",glyph:"◉"},{file:"memory",region:"Semantic",glyph:"✦"},{file:"knowledge",region:"Procedural",glyph:"⚙"},{file:"state",region:"Working",glyph:"▦"},{file:"data-structures",region:"Schema",glyph:"▤"},{file:"skills",region:"Capabilities",glyph:"✧"},{file:"sub-agents",region:"Workers",glyph:"⬡"}],gl=600,Mm=250,bD=92,Hl=4,OA=(1200-Hl*Mm)/(Hl+1),i_=196,Mst=320,Bst=Mst-i_,Lst=120,xD=470,Ost=548,RA=632;function vD(i){return OA+i*(Mm+OA)}function CD(i){return vD(i)+Mm/2}function _D(i){return i_+i*Bst}const Rst=e_.map((i,e)=>{const r=e%Hl,n=Math.floor(e/Hl);return{id:`cat-${i.file}`,x:vD(r),y:_D(n),w:Mm,h:bD,title:i.file,sub:i.region,glyph:i.glyph,variant:"region",breathe:!0,breatheDelay:e*.18}}),jst=e_.slice(0,Hl).map((i,e)=>({id:`fan-${e}`,d:an(gl,Lst,CD(e),i_),travel:220,delay:e*.18,dur:2.6})),Dst=e_.map((i,e)=>{const r=e%Hl,n=Math.floor(e/Hl);return{id:`conv-${i.file}`,d:an(CD(r),_D(n)+bD,gl,xD),travel:300,delay:.5+e*.12,dur:2.8}}),Fst={viewBox:"0 0 1200 780",ariaLabel:"How dreamcontext works: a SessionStart hook preloads eight context categories — identity, episodic, semantic, procedural, working, schema, capabilities and workers — with zero tool calls. The agent then works with the whole picture, and RemSleep parallel specialists consolidate the session and feed the distilled knowledge back into the context categories. The loop is the product.",nodes:[{id:"hook",x:gl-215,y:40,w:430,h:80,title:"SessionStart hook fires",sub:"preloads context · 0 tool calls",variant:"hook"},...Rst,{id:"agent",x:gl-250,y:xD,w:500,h:78,title:"Your agent works with the whole picture",sub:"no re-exploring · no blind search spiral",variant:"agent"},{id:"rem",x:gl-200,y:RA,w:400,h:78,title:"RemSleep — parallel specialists",sub:"multi-agent consolidation",variant:"rem"}],edges:[...jst,...Dst,{id:"agent-rem",d:`M ${gl} ${Ost} L ${gl} ${RA}`,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,Bm=300,kD=116,jA=3,DA=(1100-jA*Bm)/(jA+1),r_=280,Ist=196,wD=470,$st=540,FA=596;function SD(i){return DA+i*(Bm+DA)}function TD(i){return SD(i)+Bm/2}const n_=[{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"}],zst=n_.map((i,e)=>({id:i.id,x:SD(e),y:r_,w:Bm,h:kD,title:i.title,sub:i.sub,variant:"region",breathe:!0,breatheDelay:e*.25})),Pst=n_.map((i,e)=>({id:`fan-${i.id}`,d:an(Ia,Ist,TD(e),r_),travel:200,delay:e*.3,dur:2.4})),qst=n_.map((i,e)=>({id:`conv-${i.id}`,d:an(TD(e),r_+kD,Ia,wD),travel:200,delay:.9+e*.2,dur:2.4})),Ust={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"},...zst,{id:"converge",x:Ia-220,y:wD,w:440,h:70,title:"system knowledge updated",sub:"reports stitched into one summary",variant:"agent"},{id:"sleep-done",x:Ia-130,y:FA,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},...Pst,...qst,{id:"converge-done",d:`M ${Ia} ${$st} L ${Ia} ${FA}`,travel:64,delay:1.8,dur:1.8}]},m1=230,ED=230,IA=132,y1=[{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"}],Hst=y1.map(i=>({id:i.id,x:i.x,y:m1-IA/2,w:ED,h:IA,title:i.title,sub:i.sub,variant:i.variant})),Wst=y1.slice(0,-1).map((i,e)=>{const r=y1[e+1],n=i.x+ED,a=r.x;return{id:`pipe-${i.id}`,d:`M ${n} ${m1} L ${a} ${m1}`,travel:a-n,delay:e*.4,dur:2.2}}),Gst={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:Hst,edges:Wst},Yst=[{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 Kst(){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(Am,{spec:Fst}),m.jsx("div",{className:"hiw2-steps",children:Yst.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 Vst=[{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"}],Xst=[{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 Zst(){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(Am,{spec:Ust}),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:Vst.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:Xst.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 Qst=[{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 Jst(){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(Am,{spec:Gst}),m.jsx("div",{className:"recallf-stages",children:Qst.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 $A=[{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 tot(){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:$A.map((i,e)=>m.jsxs("li",{className:"arch-stratum",style:{"--i":e,"--n":$A.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 eot(i){return"base"in i}function zA({item:i}){const e=eot(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 iot(){const{data:i,isLoading:e,isError:r}=mD(),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(zA,{item:c},`a-${c.name}`))}),m.jsx("ul",{className:"marquee-track marquee-track--dup","aria-hidden":"true",children:n.map(c=>m.jsx(zA,{item:c},`b-${c.name}`))})]})]})}const Ho="0 0 360 170";function ND(i,e,r){return{viewBox:Ho,ariaLabel:i,nodes:[{id:"a",x:20,y:50,w:140,h:70,title:e.title,sub:e.sub,variant:e.variant??"hook"},{id:"b",x:200,y:50,w:140,h:70,title:r.title,sub:r.sub,variant:r.variant??"rem"}],edges:[{id:"a-b",d:"M 160 85 L 200 85",travel:40,dur:2}]}}const rot={viewBox:Ho,ariaLabel:"Context snapshot: a SessionStart hook injects the soul, memory, active tasks and knowledge index straight into the agent with zero tool calls.",nodes:[{id:"hook",x:110,y:12,w:140,h:50,title:"SessionStart",sub:"0 tool calls",variant:"hook"},{id:"brain",x:16,y:100,w:150,h:56,title:"project brain",sub:"soul · memory · tasks",variant:"region",breathe:!0},{id:"agent",x:194,y:100,w:150,h:56,title:"your agent",sub:"oriented",variant:"agent"}],edges:[{id:"h-b",d: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}]},not={viewBox:Ho,ariaLabel:"Memory recall: a question is scored by BM25 keyword match, optionally refined by a small Haiku agent, returning the most relevant docs in under 100 milliseconds.",nodes:[{id:"q",x:14,y:52,w:96,h:66,title:"question",sub:"any language",variant:"hook"},{id:"bm25",x:132,y:52,w:96,h:66,title:"BM25",sub:"+ Haiku",variant:"region",breathe:!0},{id:"docs",x:250,y:52,w:96,h:66,title:"top docs",sub:"<100ms",variant:"rem"}],edges:[{id:"q-b",d:"M 110 85 L 132 85",travel:22,dur:1.6},{id:"b-d",d:"M 228 85 L 250 85",travel:22,dur:1.6,delay:.4}]},aot={viewBox:Ho,ariaLabel:"RemSleep: accumulated sleep debt triggers a fan-out to three parallel specialists that consolidate the session and reset the meter.",nodes:[{id:"debt",x:108,y:10,w:144,h:46,title:"sleep debt",sub:"crosses threshold",variant:"accent"},{id:"s1",x:14,y:92,w:100,h:50,title:"sleep-tasks",variant:"region",breathe:!0},{id:"s2",x:130,y:92,w:100,h:50,title:"sleep-state",variant:"region",breathe:!0,breatheDelay:.2},{id:"s3",x:246,y:92,w:100,h:50,title:"sleep-product",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"d-1",d: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}]},sot={viewBox:Ho,ariaLabel:"Brain-region core files: soul, user, memory and the knowledge index sit in a numbered band the snapshot always loads.",nodes:[{id:"soul",x:14,y:24,w:158,h:54,title:"0.soul",sub:"identity · rules",variant:"region",breathe:!0},{id:"mem",x:188,y:24,w:158,h:54,title:"2.memory",sub:"decisions · issues",variant:"region",breathe:!0,breatheDelay:.2},{id:"user",x:14,y:96,w:158,h:54,title:"1.user",sub:"preferences",variant:"region",breathe:!0,breatheDelay:.4},{id:"know",x:188,y:96,w:158,h:54,title:"knowledge",sub:"index · pinned",variant:"region",breathe:!0,breatheDelay:.6}],edges:[]},oot={viewBox:Ho,ariaLabel:"Tag-based relation graph: knowledge, features and tasks link through shared tags into a navigable brain view.",nodes:[{id:"tag",x:110,y:58,w:140,h:54,title:"shared tag",sub:"the edge",variant:"accent",breathe:!0},{id:"k",x:14,y:10,w:110,h:44,title:"knowledge",variant:"region"},{id:"f",x:236,y:10,w:110,h:44,title:"features",variant:"region"},{id:"t",x:125,y:122,w:110,h:40,title:"tasks",variant:"region"}],edges:[{id:"k-tag",d: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}]},lot={viewBox:Ho,ariaLabel:"Task management: each task carries a LIFO changelog viewable as a Kanban board, an Eisenhower matrix, or RICE-scored.",nodes:[{id:"task",x:16,y:50,w:130,h:70,title:"task .md",sub:"LIFO changelog",variant:"hook"},{id:"views",x:200,y:24,w:144,h:44,title:"Kanban",variant:"region",breathe:!0},{id:"eis",x:200,y:74,w:144,h:40,title:"Eisenhower",variant:"region",breathe:!0,breatheDelay:.2},{id:"rice",x:200,y:120,w:144,h:40,title:"RICE score",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"t-k",d: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}]},cot={viewBox:Ho,ariaLabel:"Sub-agents: the main agent fans work out to briefed specialist sub-agents that report back, keeping the main context small.",nodes:[{id:"main",x:110,y:12,w:140,h:46,title:"main agent",variant:"agent"},{id:"a",x:16,y:96,w:96,h:50,title:"reviewer",variant:"region",breathe:!0},{id:"b",x:132,y:96,w:96,h:50,title:"planner",variant:"region",breathe:!0,breatheDelay:.2},{id:"c",x:248,y:96,w:96,h:50,title:"researcher",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"m-a",d: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}]},hot={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}]},uot={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}}]},dot=ND("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"}),fot=ND("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"}),AD=[{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:rot},{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:not},{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:aot},{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:sot},{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:fot},{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:oot},{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:lot},{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:dot},{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:cot},{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:hot},{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:uot},{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:"✦"}],b1=AD.filter(i=>i.defaultOpen),PA=AD.filter(i=>!i.defaultOpen),ta=b1.length,_x=16,pot=62,got=.72,mot=40,yot=140,bot=8;function xot(){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=_=>`${r}-tab-${_}`,x=_=>`${r}-panel-${_}`,y=Y.useCallback(_=>{const k=Math.max(0,Math.min(ta-1,_));k!==f.current&&(f.current=k,e(k))},[]);Y.useLayoutEffect(()=>{const _=c.current,k=h.current;if(!_||!k)return;d.current=window.matchMedia("(prefers-reduced-motion: reduce)").matches;const T=_.closest(".shell-main")??null,E=T??window;let A=0;const B=()=>{A=0;const I=_.getBoundingClientRect(),j=T?T.getBoundingClientRect().top:0,P=I.height-k.offsetHeight;if(P<=0)return;const W=Math.max(0,Math.min(1,(j+_x-I.top)/P));u.current&&(u.current.style.transform=`scaleX(${W})`);const K=W*(ta-1);for(let z=0;z<ta;z++){const G=a.current[z];if(!G)continue;const D=z-K,F=Math.abs(D);G.style.opacity=String(Math.max(0,1-F/got)),G.style.transform=d.current?"none":`translate3d(0, ${D*mot}px, 0)`;const q=F<.5;G.style.zIndex=q?"2":"1",G.style.pointerEvents=q?"auto":"none";const X=F<1.05;o.current[z]!==X&&(o.current[z]=X,G.classList.toggle("feat-panel--near",X))}y(Math.round(K))};let L=0;const N=()=>{if(!T)return;const I=_.getBoundingClientRect(),j=I.height-k.offsetHeight;if(j<=0)return;const P=(T.getBoundingClientRect().top+_x-I.top)/j;if(P<=.012||P>=.988)return;const K=(Math.round(P*(ta-1))/(ta-1)-P)*j;Math.abs(K)<bot||T.scrollTo({top:T.scrollTop+K,behavior:d.current?"auto":"smooth"})},M=()=>{A||(A=requestAnimationFrame(B)),L&&clearTimeout(L),L=window.setTimeout(N,yot)};return E.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M),B(),()=>{E.removeEventListener("scroll",M),window.removeEventListener("resize",M),A&&cancelAnimationFrame(A),L&&clearTimeout(L)}},[y]);const v=Y.useCallback(_=>{const k=c.current,T=h.current,E=k==null?void 0:k.closest(".shell-main");if(!k||!T||!E){y(_);return}const A=k.getBoundingClientRect(),B=A.height-T.offsetHeight;if(B<=0){y(_);return}const N=_/(ta-1)*B-(E.getBoundingClientRect().top+_x-A.top);E.scrollTo({top:E.scrollTop+N,behavior:d.current?"auto":"smooth"})},[y]);function C(_){var T;let k=f.current;if(_.key==="ArrowDown"||_.key==="ArrowRight")k=(f.current+1)%ta;else if(_.key==="ArrowUp"||_.key==="ArrowLeft")k=(f.current-1+ta)%ta;else if(_.key==="Home")k=0;else if(_.key==="End")k=ta-1;else return;_.preventDefault(),y(k),(T=n.current[k])==null||T.focus(),v(k)}return m.jsxs("section",{className:"about-section feat-section",children:[m.jsx("div",{className:"feat-scroller",ref:c,style:{"--feat-track-h":`${ta*pot}vh`},children:m.jsxs("div",{className:"feat-sticky",ref:h,children:[m.jsx("p",{className:"about-kicker",children:"Everything inside"}),m.jsx("h2",{className:"about-h2",children:"One brain, many faculties."}),m.jsxs("p",{className:"about-section-lead",children:["Every capability dreamcontext gives your agents — ",m.jsx("em",{children:"scroll to move through them, or pick one."})]}),m.jsxs("div",{className:"feat-spotlight",children:[m.jsxs("div",{className:"feat-rail-wrap",children:[m.jsxs("div",{className:"feat-rail-head","aria-hidden":"true",children:[m.jsxs("span",{className:"feat-rail-step",children:[String(i+1).padStart(2,"0")," ",m.jsxs("i",{children:["/ ",String(ta).padStart(2,"0")]})]}),m.jsx("div",{className:"feat-rail-track",children:m.jsx("span",{className:"feat-rail-fill",ref:u})})]}),m.jsx("div",{className:"feat-rail",role:"tablist","aria-orientation":"vertical","aria-label":"Core faculties",onKeyDown:C,children:b1.map((_,k)=>{const T=k===i;return m.jsxs("button",{ref:E=>{n.current[k]=E},id:g(k),role:"tab",type:"button","aria-selected":T,"aria-controls":x(k),tabIndex:T?0:-1,className:`feat-rail-item${T?" feat-rail-item--active":""}`,onClick:()=>{y(k),v(k)},children:[m.jsx("span",{className:"feat-rail-title",children:_.title}),_.tag&&m.jsx("span",{className:"feat-rail-tag",children:_.tag})]},_.id)})})]}),m.jsx("div",{className:"feat-stage",children:b1.map((_,k)=>m.jsxs("div",{ref:T=>{a.current[k]=T},className:"feat-panel",role:"tabpanel",id:x(k),"aria-labelledby":g(k),"aria-hidden":k!==i,tabIndex:k===i?0:-1,children:[m.jsxs("div",{className:"feat-stage-head",children:[_.tag&&m.jsx("span",{className:"feat-stage-chip",children:_.tag}),m.jsx("h3",{className:"feat-stage-title",children:_.title})]}),m.jsx("p",{className:"feat-stage-body",children:_.body}),_.flow&&m.jsx(Am,{spec:_.flow,className:"feat-stage-flow"})]},_.id))})]})]})}),m.jsxs("div",{className:"feat-more",children:[m.jsxs("div",{className:"feat-more-head",children:[m.jsx("span",{className:"feat-more-label",children:"Everything else"}),m.jsx("span",{className:"feat-more-count",children:PA.length})]}),m.jsx("div",{className:"feat-more-grid",children:PA.map(_=>m.jsxs("div",{className:"feat-more-card",children:[m.jsx("span",{className:"feat-more-glyph","aria-hidden":"true",children:_.glyph??"✦"}),m.jsxs("div",{className:"feat-more-meta",children:[m.jsx("span",{className:"feat-more-title",children:_.title}),m.jsx("span",{className:"feat-more-tagline",children:_.tagline})]})]},_.id))})]})]})}const vot=[{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:vot.map(i=>m.jsxs("div",{className:"closing-cmd",role:"listitem",children:[m.jsx("span",{className:"closing-cmd-c","aria-hidden":"true",children:"$"}),m.jsx("span",{className:"closing-cmd-text",children:i.cmd}),m.jsx("span",{className:"closing-cmd-hint",children:i.hint})]},i.cmd))}),m.jsx("p",{className:"closing-foot",children:"You're looking at the dashboard now. The brain graph, tasks, and sleep state in the sidebar are this project's actual memory — live."})]})}function _ot(){return m.jsxs("div",{className:"about","data-testid":"about-page",children:[m.jsx(Est,{}),m.jsx(Nst,{}),m.jsx(Kst,{}),m.jsx(Zst,{}),m.jsx(Jst,{}),m.jsx(tot,{}),m.jsx(iot,{}),m.jsx(xot,{}),m.jsx(Cot,{})]})}function kot(){return ri({queryKey:["taxonomy"],queryFn:()=>Xt.get("/taxonomy")})}const wot={domain:"Domain",layer:"Layer",kind:"Kind",topic:"Topic"};function qA({tag:i,count:e,dimmed:r}){return m.jsxs("span",{className:`taxonomy-chip${r?" taxonomy-chip--dim":""}`,"data-hue":Va(i),title:e>0?`${e} use${e===1?"":"s"}`:"unused",children:[m.jsx("span",{className:"taxonomy-chip-label",children:i}),e>0&&m.jsx("span",{className:"taxonomy-chip-count",children:e})]})}function Ip({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 Sot(){const{t:i}=Bi(),{data:e,isLoading:r,isError:n,error:a}=kot();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:wot[f]??f}),m.jsx("div",{className:"taxonomy-chip-cluster",children:g.map(x=>{const y=c[x]??0;return m.jsx(qA,{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(qA,{tag:f,count:g,dimmed:g===0},f)})})]}),Object.keys(o.aliases).length>0&&m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Aliases"}),m.jsx("div",{className:"taxonomy-alias-list",children:Object.entries(o.aliases).map(([f,g])=>m.jsxs("div",{className:"taxonomy-alias-pair",children:[m.jsx("span",{className:"taxonomy-chip taxonomy-chip--alias","data-hue":Va(f),children:m.jsx("span",{className:"taxonomy-chip-label",children:f})}),m.jsx("span",{className:"taxonomy-alias-arrow","aria-hidden":"true",children:"→"}),m.jsx("span",{className:"taxonomy-chip","data-hue":Va(g),children:m.jsx("span",{className:"taxonomy-chip-label",children:g})})]},f))})]}),m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Drift Audit"}),d?m.jsxs("div",{className:"taxonomy-healthy",children:[m.jsx("span",{className:"taxonomy-healthy-icon",children:"✓"}),m.jsx("span",{children:"Taxonomy healthy — no drift detected."})]}):m.jsxs("div",{className:"taxonomy-audit-panel",children:[m.jsx(Ip,{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(Ip,{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(Ip,{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(Ip,{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 Tot=["tasks.members","tasks.delete","tasks.sync"];function Eot(){const{data:i}=ri({queryKey:["health"],queryFn:()=>Xt.get("/health"),staleTime:6e4,retry:1});if(!i)return null;const e=i.capabilities??[];return Tot.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 UA=new gI({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function Not({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(Oat,{onNavigate:e});case"tasks":return m.jsx(Mnt,{});case"sleep":return m.jsx(Rnt,{});case"core":return m.jsx(Vnt,{onNavigateTaxonomy:()=>i.navigate("taxonomy",null)});case"knowledge":return m.jsx(hat,{});case"features":return m.jsx(uat,{});case"council":return m.jsx(lst,{});case"settings":return m.jsx(Cst,{});case"packs":return m.jsx(Tst,{});case"taxonomy":return m.jsx(Sot,{});case"about":return m.jsx(_ot,{})}}class kx extends Y.Component{constructor(){super(...arguments);se(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 MD=new URLSearchParams(window.location.search),x1=MD.get("vault"),Aot=MD.get("capture")==="1";x1&&fM(x1);function Mot(){return Y.useEffect(()=>{RG().then(e=>vv(e));const i=e=>{(e.key===null||e.key===KB)&&vv(oC())};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]),null}function Bot(){return Aot?m.jsx(kx,{children:m.jsx(qG,{})}):x1?m.jsx(kx,{children:m.jsx(i2,{client:UA,children:m.jsx(GG,{children:m.jsx(rE,{children:m.jsxs(HG,{children:[m.jsx(Eot,{}),m.jsx(rrt,{children:i=>m.jsx(Not,{nav:i})})]})})})})}):m.jsx(kx,{children:m.jsx(i2,{client:UA,children:m.jsxs(rE,{children:[m.jsx(Mot,{}),m.jsx(xW,{})]})})})}W4.createRoot(document.getElementById("root")).render(m.jsx(Y.StrictMode,{children:m.jsx(Bot,{})}));export{wL as $,Pot as A,Oo as B,QG as C,qi as D,cK as E,OC as F,fL as G,VV as H,NK as I,RV as J,fY as K,Sd as L,$ot as M,xm as N,UY as O,_L as P,oE as Q,xK as R,Nv as S,KV as T,Gd as U,Ta as V,_t as W,bt as X,ZY as Y,zV as Z,O as _,rK as a,O9 as a$,gK as a0,uE as a1,hE as a2,Vot as a3,Hot as a4,Yot as a5,Got as a6,qot as a7,gC as a8,Kot as a9,cQ as aA,lQ as aB,EB as aC,HH as aD,dZ as aE,oL as aF,mK as aG,Id as aH,Iot as aI,im as aJ,dg as aK,rP as aL,WM as aM,Xd as aN,hZ as aO,cZ as aP,WH as aQ,M1 as aR,xo as aS,vd as aT,b2 as aU,mz as aV,UP as aW,QM as aX,JM as aY,L9 as aZ,ug as a_,Uot as aa,Mc as ab,Zot as ac,Xot as ad,Wot as ae,FZ as af,$5 as ag,olt as ah,DV as ai,nn as aj,zs as ak,Ou as al,RC as am,RR as an,Pl as ao,IR as ap,ke as aq,Ya as ar,Zt as as,$Q as at,slt as au,llt as av,nlt as aw,ie as ax,alt as ay,pQ as az,iK as b,pg as b$,Th as b0,dl as b1,Nq as b2,$2 as b3,_a as b4,MP as b5,I1 as b6,S9 as b7,R9 as b8,Eh as b9,vH as bA,uU as bB,ae as bC,GH as bD,hU as bE,nB as bF,Z2 as bG,Bl as bH,u$ as bI,lt as bJ,Y as bK,cH as bL,_H as bM,kH as bN,m as bO,L2 as bP,FP as bQ,HP as bR,YP as bS,em as bT,D9 as bU,F1 as bV,GM as bW,Y9 as bX,Lq as bY,Dq as bZ,qd as b_,qP as ba,WP as bb,z9 as bc,jP as bd,D1 as be,X2 as bf,Jt as bg,$R as bh,QC as bi,vn as bj,cz as bk,A1 as bl,BM as bm,Pd as bn,RM as bo,Fot as bp,A2 as bq,N2 as br,ZG as bs,vr as bt,Yrt as bu,hi as bv,z1 as bw,CH as bx,xH as by,uH as bz,ii as c,qo as c0,V2 as c1,$1 as c2,YM as c3,Jx as c4,Oot as c5,Te as c6,eM as c7,q4 as c8,jot as c9,C1 as ca,Rot as cb,ue as d,kL as e,br as f,aK as g,Fs as h,ka as i,$V as j,Yd as k,Nt as l,DR as m,zot as n,hlt as o,sK as p,oK as q,clt as r,nK as s,jV as t,ba as u,rQ as v,QV as w,Qot as x,Do as y,eK as z};
|