dreamcontext 0.8.3 → 0.8.6
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 +17 -13
- package/agents/dreamcontext-explore.md +7 -2
- package/agents/sleep-federation.md +28 -2
- package/agents/sleep-product.md +23 -0
- package/agents/sleep-tasks.md +31 -12
- package/dist/agents/dreamcontext-explore.md +7 -2
- package/dist/agents/sleep-federation.md +28 -2
- package/dist/agents/sleep-product.md +23 -0
- package/dist/agents/sleep-tasks.md +31 -12
- package/dist/dashboard/assets/{BrainCanvas3D-CoTzHqzT.js → BrainCanvas3D-CAB2im2F.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-BlQ6XWxs.js → _baseUniq-dsXhE6Mb.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-C4qyHe9L.js → ar-SA-G6X2FPQ2-BmAprFYu.js} +1 -1
- package/dist/dashboard/assets/{arc-uGukQNxI.js → arc-d9gHov8I.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-BhtWTFvf.js → architectureDiagram-Q4EWVU46-C58hXcUE.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-HfK2pIVQ.js → az-AZ-76LH7QW2-BDUks0et.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-L7TlhXli.js → bg-BG-XCXSNQG7-Bdi-CLmM.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-BmPhQEp6.js → blockDiagram-DXYQGD6D-yJn6zNZG.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-DE0uNoU6.js → bn-BD-2XOGV67Q-THuskwuf.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-DtQKYrmP.js → c4Diagram-AHTNJAMY-fGKTGH97.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-7JHCTA6b.js → ca-ES-6MX7JW3Y-CWrsv8xQ.js} +1 -1
- package/dist/dashboard/assets/channel-Do_JtUNy.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-BvnLY9qE.js → chunk-4BX2VUAB-ZCQicbHU.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK--piiFXgS.js → chunk-4TB4RGXK-DGTUpfCU.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-C7uvmawY.js → chunk-55IACEB6-BnK0E2R4.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-BuWBKOPY.js → chunk-EDXVE4YY-B3YEC9QU.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-C1Le6hxh.js → chunk-FMBD7UC4-DIteC6lG.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-B8JE8Wz4.js → chunk-OYMX7WX6-DC84qLFn.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-U9FJi59p.js → chunk-QZHKN3VN-Uc2Uvh7x.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-BNc94uy1.js → chunk-YZCP3GAM--p-GHUD7.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-Dj8SIYaT.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-Dj8SIYaT.js +1 -0
- package/dist/dashboard/assets/clone-BpmzOucO.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-D0hUzBCj.js → cose-bilkent-S5V4N54A-DBBUVsxi.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-B0rWHDIi.js → cs-CZ-2BRQDIVT-B8STDI2F.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-D_PQO_T0.js → da-DK-5WZEPLOC-CWhAB8Gq.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-B_bjkEDQ.js → dagre-KV5264BT-BcS_NAij.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-D1G4J6Mz.js → de-DE-XR44H4JA-BULNBnuJ.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-B63uEoiS.js → diagram-5BDNPKRD-CmCCHnLC.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-DShdwm3D.js → diagram-G4DWMVQ6-Ba84raDA.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-DdVsHQ-l.js → diagram-MMDJMWI5-xNrgYgGq.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-BdHifyqU.js → diagram-TYMM5635-CMTfUaO1.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-a0CO4RfB.js → el-GR-BZB4AONW-DBD23y9B.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-CYxdxNcb.js → erDiagram-SMLLAGMA-BajnFM-6.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-ejRYVYRf.js → es-ES-U4NZUMDT-C71t6ojw.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-B-4OXJLd.js → eu-ES-A7QVB2H4-B_ttSuYR.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-DhOcLy7v.js → fa-IR-HGAKTJCU-Bq4zIqyT.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-CKQF9xKf.js → fi-FI-Z5N7JZ37-CsLCTzrZ.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-azQUtREP.js → flowDiagram-DWJPFMVM-CwfPSiA0.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-CsGekBXq.js → fr-FR-RHASNOE6-3XVH-KvN.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-DjXmGcb4.js → ganttDiagram-T4ZO3ILL-DttgldaZ.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-Dz87wo6e.js → gitGraphDiagram-UUTBAWPF-BD3bGHtr.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-NRfsjlmW.js → gl-ES-HMX3MZ6V-DROoNE8o.js} +1 -1
- package/dist/dashboard/assets/{graph-BMW3t-Jz.js → graph-CDuZp5IO.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-CK4gfEss.js → he-IL-6SHJWFNN-BqAkB-H9.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-CqyBl1jA.js → hi-IN-IWLTKZ5I-Bn1svlpD.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-BO0SthvO.js → hu-HU-A5ZG7DT2-BpbEcSt9.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-CrHxJe1s.js → id-ID-SAP4L64H-BFbKSomM.js} +1 -1
- package/dist/dashboard/assets/index-CgYfjFTP.css +1 -0
- package/dist/dashboard/assets/index-Di8SAJL6.js +480 -0
- package/dist/dashboard/assets/{index-B0pCDfL8.js → index-cIXUPF7a.js} +1 -1
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-zG-8q9HR.js → infoDiagram-42DDH7IO-CrGCfIaU.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-5OzPmL1c.js → ishikawaDiagram-UXIWVN3A-DdanP4Cg.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-CW6fpZrT.js → it-IT-JPQ66NNP-DElAu1GB.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-DMJRiMhd.js → ja-JP-DBVTYXUO-CX5hYCt6.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-f8lbDQ22.js → journeyDiagram-VCZTEJTY-BJYoD993.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-C4yr2X6j.js → kaa-6HZHGXH3-Dv86pOJk.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-BtwhZ5Ak.js → kab-KAB-ZGHBKWFO-BdVPAiBC.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-BJtF1llZ.js → kanban-definition-6JOO6SKY-BCtHyYn3.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-BiS5ISFw.js → kk-KZ-P5N5QNE5-rqy6kPw3.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-CJcAjj0D.js → km-KH-HSX4SM5Z-W6zLGjnE.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-yw6XRj7m.js → ko-KR-MTYHY66A-ACtkqDBa.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-nAwdHGyN.js → ku-TR-6OUDTVRD-D2MiKXrW.js} +1 -1
- package/dist/dashboard/assets/{layout-guqP2e-e.js → layout-G4fEkmiY.js} +1 -1
- package/dist/dashboard/assets/{linear-W2_Ct9N6.js → linear-B2IKexSz.js} +1 -1
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-D7h1NJrv.js → lt-LT-XHIRWOB4-BXUl6qoc.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-DJfUJgRc.js → lv-LV-5QDEKY6T-CbfqRExf.js} +1 -1
- package/dist/dashboard/assets/{min-BlLHklQU.js → min-CGs-EORe.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-Ch2AO4mc.js → mindmap-definition-QFDTVHPH-BG5rEg9o.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-BV3znx0p.js → mr-IN-CRQNXWMA-BDQS6spB.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-IjUN-e5U.js → my-MM-5M5IBNSE-slOXMPAS.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-MMsvbc2a.js → nb-NO-T6EIAALU-DsUSa36i.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-ByYTJGOK.js → nl-NL-IS3SIHDZ-Bmxt9uv4.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-Bgbgzvhm.js → nn-NO-6E72VCQL-B3EKWZ2E.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-BMBbvfQp.js → oc-FR-POXYY2M6-CQ95AKGA.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-CgcUC9Zd.js → pa-IN-N4M65BXN-DlOGvEPy.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-AuedyVVS.js → percentages-BXMCSKIN-Cghe4Ak9.js} +7 -7
- package/dist/dashboard/assets/{pica-DxO5y0j_.js → pica-BElmNROA.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-q-J8tI3B.js → pieDiagram-DEJITSTG-CM8vpcY4.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-BaZSYTKJ.js → pl-PL-T2D74RX3-ia8QfWiE.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-DSPF7aLm.js → pt-BR-5N22H2LF-Dk0_mzTj.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-aoPTHC3m.js → pt-PT-UZXXM6DQ-DVhHd3sQ.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-CGbfFson.js → quadrantDiagram-34T5L4WZ-DHK8pFQ0.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-ThxVmoCe.js → requirementDiagram-MS252O5E-O5-02BwJ.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-YfCwiIS2.js → ro-RO-JPDTUUEW-BnsPiMQX.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-zIVsVhsz.js → ru-RU-B4JR7IUQ-DGg0hVo9.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-BvEv917s.js → sankeyDiagram-XADWPNL6-CWTRPjWg.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-JrhjN3MG.js → sequenceDiagram-FGHM5R23-DgPVR3Bj.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-CegSAwip.js → si-LK-N5RQ5JYF-tYLdyZ7v.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-C_K-Uoai.js → sk-SK-C5VTKIMK-1xA3G05_.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-DHGXOoZl.js → sl-SI-NN7IZMDC-DhfNsg9e.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-BzOtZESp.js → stateDiagram-FHFEXIEX-Bca5FGdM.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-DIY7ac6n.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-BWfXaC19.js → subset-shared.chunk-CGU8uh4H.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-DHcqLDUZ.js → subset-worker.chunk-y2R5BeoP.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-BoNob2y3.js → sv-SE-XGPEYMSR-DfzE39Ps.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-C8UHJYct.js → ta-IN-2NMHFXQM-D7LBIYw1.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-D7wP1iSi.js → th-TH-HPSO5L25-Cfm5Dm_a.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-Gwb0w7bX.js → timeline-definition-GMOUNBTQ-C-mJxmUk.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-He51QB-L.js → tr-TR-DEFEU3FU-m5lXhQtR.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-Blg5n9CR.js → uk-UA-QMV73CPH-CDhF3uD5.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-y2S0dZjp.js → vennDiagram-DHZGUBPP-EXa8McYU.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-2z-4xcM3.js → vi-VN-M7AON7JQ-C67Ii_Ev.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-BNThyuCt.js → wardley-RL74JXVD-auY9rf2s.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-Sljri5hz.js → wardleyDiagram-NUSXRM2D-B8qVq-Ss.js} +1 -1
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-BIFYd4_d.js → xychartDiagram-5P7HB3ND-DIfk5B6V.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-DZ8sfmlq.js → zh-CN-LNUGB5OW-8NshHSLl.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-Zvqwoloz.js → zh-HK-E62DVLB3-D22tHzlZ.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-Ck_uDtMQ.js → zh-TW-RAJ6MFWO-BllueYdk.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +3427 -3050
- package/dist/skill-packs/goal-skill/SKILL.md +8 -6
- package/package.json +1 -1
- package/skill/SKILL.md +34 -18
- package/skill-packs/goal-skill/SKILL.md +8 -6
- package/dist/dashboard/assets/channel-3OfE-PZ3.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-Dpt9qwZI.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-Dpt9qwZI.js +0 -1
- package/dist/dashboard/assets/clone-CZ-InUnR.js +0 -1
- package/dist/dashboard/assets/index-rIZLhbl7.js +0 -480
- package/dist/dashboard/assets/index-sax--nf3.css +0 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-CjcHIbj7.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-BcS_NAij.js","assets/graph-CDuZp5IO.js","assets/_baseUniq-dsXhE6Mb.js","assets/layout-G4fEkmiY.js","assets/min-CGs-EORe.js","assets/clone-BpmzOucO.js","assets/cose-bilkent-S5V4N54A-DBBUVsxi.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-fGKTGH97.js","assets/chunk-YZCP3GAM--p-GHUD7.js","assets/flowDiagram-DWJPFMVM-CwfPSiA0.js","assets/chunk-FMBD7UC4-DIteC6lG.js","assets/chunk-55IACEB6-BnK0E2R4.js","assets/chunk-EDXVE4YY-B3YEC9QU.js","assets/channel-Do_JtUNy.js","assets/erDiagram-SMLLAGMA-BajnFM-6.js","assets/gitGraphDiagram-UUTBAWPF-BD3bGHtr.js","assets/chunk-4BX2VUAB-ZCQicbHU.js","assets/chunk-QZHKN3VN-Uc2Uvh7x.js","assets/wardley-RL74JXVD-auY9rf2s.js","assets/ganttDiagram-T4ZO3ILL-DttgldaZ.js","assets/linear-B2IKexSz.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-CrGCfIaU.js","assets/pieDiagram-DEJITSTG-CM8vpcY4.js","assets/arc-d9gHov8I.js","assets/quadrantDiagram-34T5L4WZ-DHK8pFQ0.js","assets/xychartDiagram-5P7HB3ND-DIfk5B6V.js","assets/requirementDiagram-MS252O5E-O5-02BwJ.js","assets/sequenceDiagram-FGHM5R23-DgPVR3Bj.js","assets/classDiagram-6PBFFD2Q-Dj8SIYaT.js","assets/chunk-4TB4RGXK-DGTUpfCU.js","assets/classDiagram-v2-HSJHXN6E-Dj8SIYaT.js","assets/stateDiagram-FHFEXIEX-Bca5FGdM.js","assets/chunk-OYMX7WX6-DC84qLFn.js","assets/stateDiagram-v2-QKLJ7IA2-DIY7ac6n.js","assets/journeyDiagram-VCZTEJTY-BJYoD993.js","assets/timeline-definition-GMOUNBTQ-C-mJxmUk.js","assets/mindmap-definition-QFDTVHPH-BG5rEg9o.js","assets/kanban-definition-6JOO6SKY-BCtHyYn3.js","assets/diagram-TYMM5635-CMTfUaO1.js","assets/diagram-MMDJMWI5-xNrgYgGq.js","assets/blockDiagram-DXYQGD6D-yJn6zNZG.js","assets/diagram-5BDNPKRD-CmCCHnLC.js","assets/architectureDiagram-Q4EWVU46-C58hXcUE.js","assets/diagram-G4DWMVQ6-Ba84raDA.js","assets/wardleyDiagram-NUSXRM2D-B8qVq-Ss.js","assets/percentages-BXMCSKIN-Cghe4Ak9.js","assets/extends-CF3RwP-h.js","assets/BrainCanvas3D-CAB2im2F.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var I4=Object.defineProperty;var PS=r=>{throw TypeError(r)};var $4=(r,e,i)=>e in r?I4(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i;var pe=(r,e,i)=>$4(r,typeof e!="symbol"?e+"":e,i),Db=(r,e,i)=>e.has(r)||PS("Cannot "+i);var et=(r,e,i)=>(Db(r,e,"read from private field"),i?i.call(r):e.get(r)),ge=(r,e,i)=>e.has(r)?PS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,i),Xt=(r,e,i,n)=>(Db(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),We=(r,e,i)=>(Db(r,e,"access private method"),i);var fp=(r,e,i,n)=>({set _(a){Xt(r,e,a,i)},get _(){return et(r,e,n)}});function z4(r,e){for(var i=0;i<e.length;i++){const n=e[i];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in r)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(r,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(r,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 i(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=i(a);fetch(a.href,o)}})();var Wot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $d(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Got(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var i=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var a=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(i,n,a.get?a:{enumerable:!0,get:function(){return r[n]}})}),i}var Fb={exports:{}},vu={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var qS;function P4(){if(qS)return vu;qS=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(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:r,type:n,key:c,ref:a!==void 0?a:null,props:o}}return vu.Fragment=e,vu.jsx=i,vu.jsxs=i,vu}var US;function q4(){return US||(US=1,Fb.exports=P4()),Fb.exports}var m=q4(),Ib={exports:{}},je={};/**
|
|
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 HS;function U4(){if(HS)return je;HS=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=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(Y){return Y===null||typeof Y!="object"?null:(Y=x&&Y[x]||Y["@@iterator"],typeof Y=="function"?Y:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function k(Y,rt,ft){this.props=Y,this.context=rt,this.refs=_,this.updater=ft||v}k.prototype.isReactComponent={},k.prototype.setState=function(Y,rt){if(typeof Y!="object"&&typeof Y!="function"&&Y!=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,Y,rt,"setState")},k.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function T(){}T.prototype=k.prototype;function N(Y,rt,ft){this.props=Y,this.context=rt,this.refs=_,this.updater=ft||v}var E=N.prototype=new T;E.constructor=N,C(E,k.prototype),E.isPureReactComponent=!0;var B=Array.isArray;function O(){}var A={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function F(Y,rt,ft){var ct=ft.ref;return{$$typeof:r,type:Y,key:rt,ref:ct!==void 0?ct:null,props:ft}}function j(Y,rt){return F(Y.type,rt,Y.props)}function z(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===r}function U(Y){var rt={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(ft){return rt[ft]})}var V=/\/+/g;function I(Y,rt){return typeof Y=="object"&&Y!==null&&Y.key!=null?U(""+Y.key):rt.toString(36)}function G(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(O,O):(Y.status="pending",Y.then(function(rt){Y.status==="pending"&&(Y.status="fulfilled",Y.value=rt)},function(rt){Y.status==="pending"&&(Y.status="rejected",Y.reason=rt)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function D(Y,rt,ft,ct,xt){var st=typeof Y;(st==="undefined"||st==="boolean")&&(Y=null);var kt=!1;if(Y===null)kt=!0;else switch(st){case"bigint":case"string":case"number":kt=!0;break;case"object":switch(Y.$$typeof){case r:case e:kt=!0;break;case f:return kt=Y._init,D(kt(Y._payload),rt,ft,ct,xt)}}if(kt)return xt=xt(Y),kt=ct===""?"."+I(Y,0):ct,B(xt)?(ft="",kt!=null&&(ft=kt.replace(V,"$&/")+"/"),D(xt,rt,ft,"",function(J){return J})):xt!=null&&(z(xt)&&(xt=j(xt,ft+(xt.key==null||Y&&Y.key===xt.key?"":(""+xt.key).replace(V,"$&/")+"/")+kt)),rt.push(xt)),1;kt=0;var it=ct===""?".":ct+":";if(B(Y))for(var H=0;H<Y.length;H++)ct=Y[H],st=it+I(ct,H),kt+=D(ct,rt,ft,st,xt);else if(H=y(Y),typeof H=="function")for(Y=H.call(Y),H=0;!(ct=Y.next()).done;)ct=ct.value,st=it+I(ct,H++),kt+=D(ct,rt,ft,st,xt);else if(st==="object"){if(typeof Y.then=="function")return D(G(Y),rt,ft,ct,xt);throw rt=String(Y),Error("Objects are not valid as a React child (found: "+(rt==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":rt)+"). If you meant to render a collection of children, use an array instead.")}return kt}function W(Y,rt,ft){if(Y==null)return Y;var ct=[],xt=0;return D(Y,ct,"","",function(st){return rt.call(ft,st,xt++)}),ct}function K(Y){if(Y._status===-1){var rt=Y._result;rt=rt(),rt.then(function(ft){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=ft)},function(ft){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=ft)}),Y._status===-1&&(Y._status=0,Y._result=rt)}if(Y._status===1)return Y._result.default;throw Y._result}var tt=typeof reportError=="function"?reportError:function(Y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var rt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Y=="object"&&Y!==null&&typeof Y.message=="string"?String(Y.message):String(Y),error:Y});if(!window.dispatchEvent(rt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)},nt={map:W,forEach:function(Y,rt,ft){W(Y,function(){rt.apply(this,arguments)},ft)},count:function(Y){var rt=0;return W(Y,function(){rt++}),rt},toArray:function(Y){return W(Y,function(rt){return rt})||[]},only:function(Y){if(!z(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return je.Activity=g,je.Children=nt,je.Component=k,je.Fragment=i,je.Profiler=a,je.PureComponent=N,je.StrictMode=n,je.Suspense=u,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,je.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return A.H.useMemoCache(Y)}},je.cache=function(Y){return function(){return Y.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(Y,rt,ft){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var ct=C({},Y.props),xt=Y.key;if(rt!=null)for(st in rt.key!==void 0&&(xt=""+rt.key),rt)!M.call(rt,st)||st==="key"||st==="__self"||st==="__source"||st==="ref"&&rt.ref===void 0||(ct[st]=rt[st]);var st=arguments.length-2;if(st===1)ct.children=ft;else if(1<st){for(var kt=Array(st),it=0;it<st;it++)kt[it]=arguments[it+2];ct.children=kt}return F(Y.type,xt,ct)},je.createContext=function(Y){return Y={$$typeof:c,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null},Y.Provider=Y,Y.Consumer={$$typeof:o,_context:Y},Y},je.createElement=function(Y,rt,ft){var ct,xt={},st=null;if(rt!=null)for(ct in rt.key!==void 0&&(st=""+rt.key),rt)M.call(rt,ct)&&ct!=="key"&&ct!=="__self"&&ct!=="__source"&&(xt[ct]=rt[ct]);var kt=arguments.length-2;if(kt===1)xt.children=ft;else if(1<kt){for(var it=Array(kt),H=0;H<kt;H++)it[H]=arguments[H+2];xt.children=it}if(Y&&Y.defaultProps)for(ct in kt=Y.defaultProps,kt)xt[ct]===void 0&&(xt[ct]=kt[ct]);return F(Y,st,xt)},je.createRef=function(){return{current:null}},je.forwardRef=function(Y){return{$$typeof:h,render:Y}},je.isValidElement=z,je.lazy=function(Y){return{$$typeof:f,_payload:{_status:-1,_result:Y},_init:K}},je.memo=function(Y,rt){return{$$typeof:d,type:Y,compare:rt===void 0?null:rt}},je.startTransition=function(Y){var rt=A.T,ft={};A.T=ft;try{var ct=Y(),xt=A.S;xt!==null&&xt(ft,ct),typeof ct=="object"&&ct!==null&&typeof ct.then=="function"&&ct.then(O,tt)}catch(st){tt(st)}finally{rt!==null&&ft.types!==null&&(rt.types=ft.types),A.T=rt}},je.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},je.use=function(Y){return A.H.use(Y)},je.useActionState=function(Y,rt,ft){return A.H.useActionState(Y,rt,ft)},je.useCallback=function(Y,rt){return A.H.useCallback(Y,rt)},je.useContext=function(Y){return A.H.useContext(Y)},je.useDebugValue=function(){},je.useDeferredValue=function(Y,rt){return A.H.useDeferredValue(Y,rt)},je.useEffect=function(Y,rt){return A.H.useEffect(Y,rt)},je.useEffectEvent=function(Y){return A.H.useEffectEvent(Y)},je.useId=function(){return A.H.useId()},je.useImperativeHandle=function(Y,rt,ft){return A.H.useImperativeHandle(Y,rt,ft)},je.useInsertionEffect=function(Y,rt){return A.H.useInsertionEffect(Y,rt)},je.useLayoutEffect=function(Y,rt){return A.H.useLayoutEffect(Y,rt)},je.useMemo=function(Y,rt){return A.H.useMemo(Y,rt)},je.useOptimistic=function(Y,rt){return A.H.useOptimistic(Y,rt)},je.useReducer=function(Y,rt,ft){return A.H.useReducer(Y,rt,ft)},je.useRef=function(Y){return A.H.useRef(Y)},je.useState=function(Y){return A.H.useState(Y)},je.useSyncExternalStore=function(Y,rt,ft){return A.H.useSyncExternalStore(Y,rt,ft)},je.useTransition=function(){return A.H.useTransition()},je.version="19.2.4",je}var WS;function E1(){return WS||(WS=1,Ib.exports=U4()),Ib.exports}var q=E1();const sM=$d(q),Yot=z4({__proto__:null,default:sM},[q]);var $b={exports:{}},Cu={},zb={exports:{}},Pb={};/**
|
|
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 GS;function H4(){return GS||(GS=1,(function(r){function e(D,W){var K=D.length;D.push(W);t:for(;0<K;){var tt=K-1>>>1,nt=D[tt];if(0<a(nt,W))D[tt]=W,D[K]=nt,K=tt;else break t}}function i(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var W=D[0],K=D.pop();if(K!==W){D[0]=K;t:for(var tt=0,nt=D.length,Y=nt>>>1;tt<Y;){var rt=2*(tt+1)-1,ft=D[rt],ct=rt+1,xt=D[ct];if(0>a(ft,K))ct<nt&&0>a(xt,ft)?(D[tt]=xt,D[ct]=K,tt=ct):(D[tt]=ft,D[rt]=K,tt=rt);else if(ct<nt&&0>a(xt,K))D[tt]=xt,D[ct]=K,tt=ct;else break t}}return W}function a(D,W){var K=D.sortIndex-W.sortIndex;return K!==0?K:D.id-W.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();r.unstable_now=function(){return c.now()-h}}var u=[],d=[],f=1,g=null,x=3,y=!1,v=!1,C=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function E(D){for(var W=i(d);W!==null;){if(W.callback===null)n(d);else if(W.startTime<=D)n(d),W.sortIndex=W.expirationTime,e(u,W);else break;W=i(d)}}function B(D){if(C=!1,E(D),!v)if(i(u)!==null)v=!0,O||(O=!0,U());else{var W=i(d);W!==null&&G(B,W.startTime-D)}}var O=!1,A=-1,M=5,F=-1;function j(){return _?!0:!(r.unstable_now()-F<M)}function z(){if(_=!1,O){var D=r.unstable_now();F=D;var W=!0;try{t:{v=!1,C&&(C=!1,T(A),A=-1),y=!0;var K=x;try{e:{for(E(D),g=i(u);g!==null&&!(g.expirationTime>D&&j());){var tt=g.callback;if(typeof tt=="function"){g.callback=null,x=g.priorityLevel;var nt=tt(g.expirationTime<=D);if(D=r.unstable_now(),typeof nt=="function"){g.callback=nt,E(D),W=!0;break e}g===i(u)&&n(u),E(D)}else n(u);g=i(u)}if(g!==null)W=!0;else{var Y=i(d);Y!==null&&G(B,Y.startTime-D),W=!1}}break t}finally{g=null,x=K,y=!1}W=void 0}}finally{W?U():O=!1}}}var U;if(typeof N=="function")U=function(){N(z)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,I=V.port2;V.port1.onmessage=z,U=function(){I.postMessage(null)}}else U=function(){k(z,0)};function G(D,W){A=k(function(){D(r.unstable_now())},W)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(D){D.callback=null},r.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},r.unstable_getCurrentPriorityLevel=function(){return x},r.unstable_next=function(D){switch(x){case 1:case 2:case 3:var W=3;break;default:W=x}var K=x;x=W;try{return D()}finally{x=K}},r.unstable_requestPaint=function(){_=!0},r.unstable_runWithPriority=function(D,W){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var K=x;x=D;try{return W()}finally{x=K}},r.unstable_scheduleCallback=function(D,W,K){var tt=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?tt+K:tt):K=tt,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=K+nt,D={id:f++,callback:W,priorityLevel:D,startTime:K,expirationTime:nt,sortIndex:-1},K>tt?(D.sortIndex=K,e(d,D),i(u)===null&&D===i(d)&&(C?(T(A),A=-1):C=!0,G(B,K-tt))):(D.sortIndex=nt,e(u,D),v||y||(v=!0,O||(O=!0,U()))),D},r.unstable_shouldYield=j,r.unstable_wrapCallback=function(D){var W=x;return function(){var K=x;x=W;try{return D.apply(this,arguments)}finally{x=K}}}})(Pb)),Pb}var YS;function W4(){return YS||(YS=1,zb.exports=H4()),zb.exports}var qb={exports:{}},Ii={};/**
|
|
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 KS;function G4(){if(KS)return Ii;KS=1;var r=E1();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 i(){}var n={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},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=r.__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 Ii.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Ii.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)},Ii.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()}},Ii.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))},Ii.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},Ii.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})}},Ii.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)},Ii.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})}},Ii.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)},Ii.requestFormReset=function(u){n.d.r(u)},Ii.unstable_batchedUpdates=function(u,d){return u(d)},Ii.useFormState=function(u,d,f){return c.H.useFormState(u,d,f)},Ii.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ii.version="19.2.4",Ii}var VS;function Y4(){if(VS)return qb.exports;VS=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),qb.exports=G4(),qb.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 XS;function K4(){if(XS)return Cu;XS=1;var r=W4(),e=E1(),i=Y4();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)l+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,p=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(p=l.return),s=l.return;while(s)}return l.tag===3?p:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function h(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function d(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var p=s,b=l;;){var w=p.return;if(w===null)break;var S=w.alternate;if(S===null){if(b=w.return,b!==null){p=b;continue}break}if(w.child===S.child){for(S=w.child;S;){if(S===p)return u(w),s;if(S===b)return u(w),l;S=S.sibling}throw Error(n(188))}if(p.return!==b.return)p=w,b=S;else{for(var R=!1,P=w.child;P;){if(P===p){R=!0,p=w,b=S;break}if(P===b){R=!0,b=w,p=S;break}P=P.sibling}if(!R){for(P=S.child;P;){if(P===p){R=!0,p=S,b=w;break}if(P===b){R=!0,b=S,p=w;break}P=P.sibling}if(!R)throw Error(n(189))}}if(p.alternate!==b)throw Error(n(190))}if(p.tag!==3)throw Error(n(188));return p.stateNode.current===p?s:l}function f(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=f(s),l!==null)return l;s=s.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),N=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function U(s){return s===null||typeof s!="object"?null:(s=z&&s[z]||s["@@iterator"],typeof s=="function"?s:null)}var V=Symbol.for("react.client.reference");function I(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===V?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case k:return"Profiler";case _:return"StrictMode";case B:return"Suspense";case O:return"SuspenseList";case F:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case v:return"Portal";case N:return s.displayName||"Context";case T:return(s._context.displayName||"Context")+".Consumer";case E:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case A:return l=s.displayName||null,l!==null?l:I(s.type)||"Memo";case M:l=s._payload,s=s._init;try{return I(s(l))}catch{}}return null}var G=Array.isArray,D=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},tt=[],nt=-1;function Y(s){return{current:s}}function rt(s){0>nt||(s.current=tt[nt],tt[nt]=null,nt--)}function ft(s,l){nt++,tt[nt]=s.current,s.current=l}var ct=Y(null),xt=Y(null),st=Y(null),kt=Y(null);function it(s,l){switch(ft(st,l),ft(xt,s),ft(ct,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?hS(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=hS(l),s=uS(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}rt(ct),ft(ct,s)}function H(){rt(ct),rt(xt),rt(st)}function J(s){s.memoizedState!==null&&ft(kt,s);var l=ct.current,p=uS(l,s.type);l!==p&&(ft(xt,s),ft(ct,p))}function vt(s){xt.current===s&&(rt(ct),rt(xt)),kt.current===s&&(rt(kt),mu._currentValue=K)}var At,qt;function ie(s){if(At===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);At=l&&l[1]||"",qt=-1<p.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+At+s+qt}var Dt=!1;function Ht(s,l){if(!s||Dt)return"";Dt=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var b={DetermineComponentFrameRoot:function(){try{if(l){var Mt=function(){throw Error()};if(Object.defineProperty(Mt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Mt,[])}catch(_t){var bt=_t}Reflect.construct(s,[],Mt)}else{try{Mt.call()}catch(_t){bt=_t}s.call(Mt.prototype)}}else{try{throw Error()}catch(_t){bt=_t}(Mt=s())&&typeof Mt.catch=="function"&&Mt.catch(function(){})}}catch(_t){if(_t&&bt&&typeof _t.stack=="string")return[_t.stack,bt.stack]}return[null,null]}};b.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(b.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(b.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=b.DetermineComponentFrameRoot(),R=S[0],P=S[1];if(R&&P){var Z=R.split(`
|
|
45
|
+
`),mt=P.split(`
|
|
46
|
+
`);for(w=b=0;b<Z.length&&!Z[b].includes("DetermineComponentFrameRoot");)b++;for(;w<mt.length&&!mt[w].includes("DetermineComponentFrameRoot");)w++;if(b===Z.length||w===mt.length)for(b=Z.length-1,w=mt.length-1;1<=b&&0<=w&&Z[b]!==mt[w];)w--;for(;1<=b&&0<=w;b--,w--)if(Z[b]!==mt[w]){if(b!==1||w!==1)do if(b--,w--,0>w||Z[b]!==mt[w]){var Et=`
|
|
47
|
+
`+Z[b].replace(" at new "," at ");return s.displayName&&Et.includes("<anonymous>")&&(Et=Et.replace("<anonymous>",s.displayName)),Et}while(1<=b&&0<=w);break}}}finally{Dt=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?ie(p):""}function Fe(s,l){switch(s.tag){case 26:case 27:case 5:return ie(s.type);case 16:return ie("Lazy");case 13:return s.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return Ht(s.type,!1);case 11:return Ht(s.type.render,!1);case 1:return Ht(s.type,!0);case 31:return ie("Activity");default:return""}}function Zt(s){try{var l="",p=null;do l+=Fe(s,p),p=s,s=s.return;while(s);return l}catch(b){return`
|
|
48
|
+
Error generating stack: `+b.message+`
|
|
49
|
+
`+b.stack}}var ht=Object.prototype.hasOwnProperty,ot=r.unstable_scheduleCallback,Lt=r.unstable_cancelCallback,$t=r.unstable_shouldYield,Wt=r.unstable_requestPaint,Rt=r.unstable_now,ne=r.unstable_getCurrentPriorityLevel,Ft=r.unstable_ImmediatePriority,Re=r.unstable_UserBlockingPriority,xe=r.unstable_NormalPriority,He=r.unstable_LowPriority,Me=r.unstable_IdlePriority,kr=r.log,Lr=r.unstable_setDisableYieldValue,Ge=null,Ze=null;function or(s){if(typeof kr=="function"&&Lr(s),Ze&&typeof Ze.setStrictMode=="function")try{Ze.setStrictMode(Ge,s)}catch{}}var me=Math.clz32?Math.clz32:Er,sr=Math.log,$e=Math.LN2;function Er(s){return s>>>=0,s===0?32:31-(sr(s)/$e|0)|0}var ve=256,Or=262144,Xr=4194304;function Nr(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 Q(s,l,p){var b=s.pendingLanes;if(b===0)return 0;var w=0,S=s.suspendedLanes,R=s.pingedLanes;s=s.warmLanes;var P=b&134217727;return P!==0?(b=P&~S,b!==0?w=Nr(b):(R&=P,R!==0?w=Nr(R):p||(p=P&~s,p!==0&&(w=Nr(p))))):(P=b&~S,P!==0?w=Nr(P):R!==0?w=Nr(R):p||(p=b&~s,p!==0&&(w=Nr(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 Tt(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Pt(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 Ce(){var s=Xr;return Xr<<=1,(Xr&62914560)===0&&(Xr=4194304),s}function gr(s){for(var l=[],p=0;31>p;p++)l.push(s);return l}function we(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Qt(s,l,p,b,w,S){var R=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var P=s.entanglements,Z=s.expirationTimes,mt=s.hiddenUpdates;for(p=R&~p;0<p;){var Et=31-me(p),Mt=1<<Et;P[Et]=0,Z[Et]=-1;var bt=mt[Et];if(bt!==null)for(mt[Et]=null,Et=0;Et<bt.length;Et++){var _t=bt[Et];_t!==null&&(_t.lane&=-536870913)}p&=~Mt}b!==0&&Kt(s,b,0),S!==0&&w===0&&s.tag!==0&&(s.suspendedLanes|=S&~(R&~l))}function Kt(s,l,p){s.pendingLanes|=l,s.suspendedLanes&=~l;var b=31-me(l);s.entangledLanes|=l,s.entanglements[b]=s.entanglements[b]|1073741824|p&261930}function ye(s,l){var p=s.entangledLanes|=l;for(s=s.entanglements;p;){var b=31-me(p),w=1<<b;w&l|s[b]&l&&(s[b]|=l),p&=~w}}function mr(s,l){var p=l&-l;return p=(p&42)!==0?1:wr(p),(p&(s.suspendedLanes|l))!==0?0:p}function wr(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function ln(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Yi(){var s=W.p;return s!==0?s:(s=window.event,s===void 0?32:RS(s.type))}function li(s,l){var p=W.p;try{return W.p=s,l()}finally{W.p=p}}var ci=Math.random().toString(36).slice(2),Rr="__reactFiber$"+ci,Zr="__reactProps$"+ci,kn="__reactContainer$"+ci,In="__reactEvents$"+ci,wn="__reactListeners$"+ci,Sn="__reactHandles$"+ci,Ei="__reactResources$"+ci,$n="__reactMarker$"+ci;function Ea(s){delete s[Rr],delete s[Zr],delete s[In],delete s[wn],delete s[Sn]}function mi(s){var l=s[Rr];if(l)return l;for(var p=s.parentNode;p;){if(l=p[kn]||p[Rr]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(s=bS(s);s!==null;){if(p=s[Rr])return p;s=bS(s)}return l}s=p,p=s.parentNode}return null}function Ki(s){if(s=s[Rr]||s[kn]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function cn(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function yi(s){var l=s[Ei];return l||(l=s[Ei]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function yr(s){s[$n]=!0}var te=new Set,X={};function St(s,l){pt(s,l),pt(s+"Capture",l)}function pt(s,l){for(X[s]=l,s=0;s<l.length;s++)te.add(l[s])}var It=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]*$"),Gt={},ue={};function Ke(s){return ht.call(ue,s)?!0:ht.call(Gt,s)?!1:It.test(s)?ue[s]=!0:(Gt[s]=!0,!1)}function br(s,l,p){if(Ke(l))if(p===null)s.removeAttribute(l);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var b=l.toLowerCase().slice(0,5);if(b!=="data-"&&b!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+p)}}function rr(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 Yr(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 Be(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Qr(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=Qr(s)?"checked":"value";s._valueTracker=zn(s,l,""+s[l])}}function Ps(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var p=l.getValue(),b="";return s&&(b=Qr(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 Ni(s){return s.replace(Wo,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Pn(s,l,p,b,w,S,R,P){s.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?s.type=R:s.removeAttribute("type"),l!=null?R==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Be(l)):s.value!==""+Be(l)&&(s.value=""+Be(l)):R!=="submit"&&R!=="reset"||s.removeAttribute("value"),l!=null?jt(s,R,Be(l)):p!=null?jt(s,R,Be(p)):b!=null&&s.removeAttribute("value"),w==null&&S!=null&&(s.defaultChecked=!!S),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?s.name=""+Be(P):s.removeAttribute("name")}function yt(s,l,p,b,w,S,R,P){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.type=S),l!=null||p!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){la(s);return}p=p!=null?""+Be(p):"",l=l!=null?""+Be(l):p,P||l===s.value||(s.value=l),s.defaultValue=l}b=b??w,b=typeof b!="function"&&typeof b!="symbol"&&!!b,s.checked=P?s.checked:!!b,s.defaultChecked=!!b,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(s.name=R),la(s)}function jt(s,l,p){l==="number"&&Ja(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Ot(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=""+Be(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 Vt(s,l,p){if(l!=null&&(l=""+Be(l),l!==s.value&&(s.value=l),p==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=p!=null?""+Be(p):""}function Pe(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=Be(l),s.defaultValue=p,b=s.textContent,b===p&&b!==""&&b!==null&&(s.value=b),la(s)}function Yt(s,l){if(l){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=l;return}}s.textContent=l}var lr=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ye(s,l,p){var b=l.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?b?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":b?s.setProperty(l,p):typeof p!="number"||p===0||lr.has(l)?l==="float"?s.cssFloat=p:s[l]=(""+p).trim():s[l]=p+"px"}function Qe(s,l,p){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,p!=null){for(var b in p)!p.hasOwnProperty(b)||l!=null&&l.hasOwnProperty(b)||(b.indexOf("--")===0?s.setProperty(b,""):b==="float"?s.cssFloat="":s[b]="");for(var w in l)b=l[w],l.hasOwnProperty(w)&&p[w]!==b&&Ye(s,w,b)}else for(var S in l)l.hasOwnProperty(S)&&Ye(s,S,l[S])}function Fi(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qn=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),qs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Us(s){return qs.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Ut(){}var le=null;function Ie(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Je=null,Kr=null;function Un(s){var l=Ki(s);if(l&&(s=l.stateNode)){var p=s[Zr]||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="'+Ni(""+l)+'"][type="radio"]'),l=0;l<p.length;l++){var b=p[l];if(b!==s&&b.form===s.form){var w=b[Zr]||null;if(!w)throw Error(n(90));Pn(b,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(l=0;l<p.length;l++)b=p[l],b.form===s.form&&Ps(b)}break t;case"textarea":Vt(s,p.value,p.defaultValue);break t;case"select":l=p.value,l!=null&&Ot(s,!!p.multiple,l,!1)}}}var Lh=!1;function nf(s,l,p){if(Lh)return s(l,p);Lh=!0;try{var b=s(l);return b}finally{if(Lh=!1,(Je!==null||Kr!==null)&&(Wf(),Je&&(l=Je,s=Kr,Kr=Je=null,Un(l),s)))for(l=0;l<s.length;l++)Un(s[l])}}function Oh(s,l){var p=s.stateNode;if(p===null)return null;var b=p[Zr]||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"),Dm=!1;if(ts)try{var Rh={};Object.defineProperty(Rh,"passive",{get:function(){Dm=!0}}),window.addEventListener("test",Rh,Rh),window.removeEventListener("test",Rh,Rh)}catch{Dm=!1}var Hs=null,Fm=null,af=null;function u_(){if(af)return af;var s,l=Fm,p=l.length,b,w="value"in Hs?Hs.value:Hs.textContent,S=w.length;for(s=0;s<p&&l[s]===w[s];s++);var R=p-s;for(b=1;b<=R&&l[p-b]===w[S-b];b++);return af=w.slice(s,1<b?1-b:void 0)}function sf(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function of(){return!0}function d_(){return!1}function hn(s){function l(p,b,w,S,R){this._reactName=p,this._targetInst=w,this.type=b,this.nativeEvent=S,this.target=R,this.currentTarget=null;for(var P in s)s.hasOwnProperty(P)&&(p=s[P],this[P]=p?p(S):S[P]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?of:d_,this.isPropagationStopped=d_,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=of)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=of)},persist:function(){},isPersistent:of}),l}var Go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lf=hn(Go),jh=g({},Go,{view:0,detail:0}),DD=hn(jh),Im,$m,Dh,cf=g({},jh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Dh&&(Dh&&s.type==="mousemove"?(Im=s.screenX-Dh.screenX,$m=s.screenY-Dh.screenY):$m=Im=0,Dh=s),Im)},movementY:function(s){return"movementY"in s?s.movementY:$m}}),f_=hn(cf),FD=g({},cf,{dataTransfer:0}),ID=hn(FD),$D=g({},jh,{relatedTarget:0}),zm=hn($D),zD=g({},Go,{animationName:0,elapsedTime:0,pseudoElement:0}),PD=hn(zD),qD=g({},Go,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),UD=hn(qD),HD=g({},Go,{data:0}),p_=hn(HD),WD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},GD={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"},YD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KD(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=YD[s])?!!l[s]:!1}function Pm(){return KD}var VD=g({},jh,{key:function(s){if(s.key){var l=WD[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=sf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?GD[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pm,charCode:function(s){return s.type==="keypress"?sf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?sf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),XD=hn(VD),ZD=g({},cf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),g_=hn(ZD),QD=g({},jh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pm}),JD=hn(QD),tF=g({},Go,{propertyName:0,elapsedTime:0,pseudoElement:0}),eF=hn(tF),rF=g({},cf,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),iF=hn(rF),nF=g({},Go,{newState:0,oldState:0}),aF=hn(nF),sF=[9,13,27,32],qm=ts&&"CompositionEvent"in window,Fh=null;ts&&"documentMode"in document&&(Fh=document.documentMode);var oF=ts&&"TextEvent"in window&&!Fh,m_=ts&&(!qm||Fh&&8<Fh&&11>=Fh),y_=" ",b_=!1;function x_(s,l){switch(s){case"keyup":return sF.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v_(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Zl=!1;function lF(s,l){switch(s){case"compositionend":return v_(l);case"keypress":return l.which!==32?null:(b_=!0,y_);case"textInput":return s=l.data,s===y_&&b_?null:s;default:return null}}function cF(s,l){if(Zl)return s==="compositionend"||!qm&&x_(s,l)?(s=u_(),af=Fm=Hs=null,Zl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return m_&&l.locale!=="ko"?null:l.data;default:return null}}var hF={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 C_(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!hF[s.type]:l==="textarea"}function __(s,l,p,b){Je?Kr?Kr.push(b):Kr=[b]:Je=b,l=Qf(l,"onChange"),0<l.length&&(p=new lf("onChange","change",null,p,b),s.push({event:p,listeners:l}))}var Ih=null,$h=null;function uF(s){nS(s,0)}function hf(s){var l=cn(s);if(Ps(l))return s}function k_(s,l){if(s==="change")return l}var w_=!1;if(ts){var Um;if(ts){var Hm="oninput"in document;if(!Hm){var S_=document.createElement("div");S_.setAttribute("oninput","return;"),Hm=typeof S_.oninput=="function"}Um=Hm}else Um=!1;w_=Um&&(!document.documentMode||9<document.documentMode)}function T_(){Ih&&(Ih.detachEvent("onpropertychange",E_),$h=Ih=null)}function E_(s){if(s.propertyName==="value"&&hf($h)){var l=[];__(l,$h,s,Ie(s)),nf(uF,l)}}function dF(s,l,p){s==="focusin"?(T_(),Ih=l,$h=p,Ih.attachEvent("onpropertychange",E_)):s==="focusout"&&T_()}function fF(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return hf($h)}function pF(s,l){if(s==="click")return hf(l)}function gF(s,l){if(s==="input"||s==="change")return hf(l)}function mF(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Tn=typeof Object.is=="function"?Object.is:mF;function zh(s,l){if(Tn(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var p=Object.keys(s),b=Object.keys(l);if(p.length!==b.length)return!1;for(b=0;b<p.length;b++){var w=p[b];if(!ht.call(l,w)||!Tn(s[w],l[w]))return!1}return!0}function N_(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function A_(s,l){var p=N_(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=N_(p)}}function M_(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?M_(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function B_(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 Wm(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 yF=ts&&"documentMode"in document&&11>=document.documentMode,Ql=null,Gm=null,Ph=null,Ym=!1;function L_(s,l,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Ym||Ql==null||Ql!==Ja(b)||(b=Ql,"selectionStart"in b&&Wm(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),Ph&&zh(Ph,b)||(Ph=b,b=Qf(Gm,"onSelect"),0<b.length&&(l=new lf("onSelect","select",null,l,p),s.push({event:l,listeners:b}),l.target=Ql)))}function Yo(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Jl={animationend:Yo("Animation","AnimationEnd"),animationiteration:Yo("Animation","AnimationIteration"),animationstart:Yo("Animation","AnimationStart"),transitionrun:Yo("Transition","TransitionRun"),transitionstart:Yo("Transition","TransitionStart"),transitioncancel:Yo("Transition","TransitionCancel"),transitionend:Yo("Transition","TransitionEnd")},Km={},O_={};ts&&(O_=document.createElement("div").style,"AnimationEvent"in window||(delete Jl.animationend.animation,delete Jl.animationiteration.animation,delete Jl.animationstart.animation),"TransitionEvent"in window||delete Jl.transitionend.transition);function Ko(s){if(Km[s])return Km[s];if(!Jl[s])return s;var l=Jl[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in O_)return Km[s]=l[p];return s}var R_=Ko("animationend"),j_=Ko("animationiteration"),D_=Ko("animationstart"),bF=Ko("transitionrun"),xF=Ko("transitionstart"),vF=Ko("transitioncancel"),F_=Ko("transitionend"),I_=new Map,Vm="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(" ");Vm.push("scrollEnd");function ca(s,l){I_.set(s,l),St(l,[s])}var uf=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Hn=[],tc=0,Xm=0;function df(){for(var s=tc,l=Xm=tc=0;l<s;){var p=Hn[l];Hn[l++]=null;var b=Hn[l];Hn[l++]=null;var w=Hn[l];Hn[l++]=null;var S=Hn[l];if(Hn[l++]=null,b!==null&&w!==null){var R=b.pending;R===null?w.next=w:(w.next=R.next,R.next=w),b.pending=w}S!==0&&$_(p,w,S)}}function ff(s,l,p,b){Hn[tc++]=s,Hn[tc++]=l,Hn[tc++]=p,Hn[tc++]=b,Xm|=b,s.lanes|=b,s=s.alternate,s!==null&&(s.lanes|=b)}function Zm(s,l,p,b){return ff(s,l,p,b),pf(s)}function Vo(s,l){return ff(s,null,null,l),pf(s)}function $_(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-me(p),s=S.hiddenUpdates,b=s[w],b===null?s[w]=[l]:b.push(l),l.lane=p|536870912),S):null}function pf(s){if(50<cu)throw cu=0,sb=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var ec={};function CF(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 CF(s,l,p,b)}function Qm(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 z_(s,l){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,l=p.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function gf(s,l,p,b,w,S){var R=0;if(b=s,typeof s=="function")Qm(s)&&(R=1);else if(typeof s=="string")R=T4(s,p,ct.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case F:return s=En(31,p,l,w),s.elementType=F,s.lanes=S,s;case C:return Xo(p.children,w,S,l);case _:R=8,w|=24;break;case k:return s=En(12,p,l,w|2),s.elementType=k,s.lanes=S,s;case B:return s=En(13,p,l,w),s.elementType=B,s.lanes=S,s;case O:return s=En(19,p,l,w),s.elementType=O,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case N:R=10;break t;case T:R=9;break t;case E:R=11;break t;case A:R=14;break t;case M:R=16,b=null;break t}R=29,p=Error(n(130,s===null?"null":typeof s,"")),b=null}return l=En(R,p,l,w),l.elementType=s,l.type=b,l.lanes=S,l}function Xo(s,l,p,b){return s=En(7,s,b,l),s.lanes=p,s}function Jm(s,l,p){return s=En(6,s,null,l),s.lanes=p,s}function P_(s){var l=En(18,null,null,0);return l.stateNode=s,l}function ty(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 q_=new WeakMap;function Wn(s,l){if(typeof s=="object"&&s!==null){var p=q_.get(s);return p!==void 0?p:(l={value:s,source:l,stack:Zt(l)},q_.set(s,l),l)}return{value:s,source:l,stack:Zt(l)}}var rc=[],ic=0,mf=null,qh=0,Gn=[],Yn=0,Ws=null,Na=1,Aa="";function rs(s,l){rc[ic++]=qh,rc[ic++]=mf,mf=s,qh=l}function U_(s,l,p){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Ws=s;var b=Na;s=Aa;var w=32-me(b)-1;b&=~(1<<w),p+=1;var S=32-me(l)+w;if(30<S){var R=w-w%5;S=(b&(1<<R)-1).toString(32),b>>=R,w-=R,Na=1<<32-me(l)+w|p<<w|b,Aa=S+s}else Na=1<<S|p<<w|b,Aa=s}function ey(s){s.return!==null&&(rs(s,1),U_(s,1,0))}function ry(s){for(;s===mf;)mf=rc[--ic],rc[ic]=null,qh=rc[--ic],rc[ic]=null;for(;s===Ws;)Ws=Gn[--Yn],Gn[Yn]=null,Aa=Gn[--Yn],Gn[Yn]=null,Na=Gn[--Yn],Gn[Yn]=null}function H_(s,l){Gn[Yn++]=Na,Gn[Yn++]=Aa,Gn[Yn++]=Ws,Na=l.id,Aa=l.overflow,Ws=s}var Ai=null,Fr=null,ir=!1,Gs=null,Kn=!1,iy=Error(n(519));function Ys(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Uh(Wn(l,s)),iy}function W_(s){var l=s.stateNode,p=s.type,b=s.memoizedProps;switch(l[Rr]=s,l[Zr]=b,p){case"dialog":Xe("cancel",l),Xe("close",l);break;case"iframe":case"object":case"embed":Xe("load",l);break;case"video":case"audio":for(p=0;p<uu.length;p++)Xe(uu[p],l);break;case"source":Xe("error",l);break;case"img":case"image":case"link":Xe("error",l),Xe("load",l);break;case"details":Xe("toggle",l);break;case"input":Xe("invalid",l),yt(l,b.value,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name,!0);break;case"select":Xe("invalid",l);break;case"textarea":Xe("invalid",l),Pe(l,b.value,b.defaultValue,b.children)}p=b.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||l.textContent===""+p||b.suppressHydrationWarning===!0||lS(l.textContent,p)?(b.popover!=null&&(Xe("beforetoggle",l),Xe("toggle",l)),b.onScroll!=null&&Xe("scroll",l),b.onScrollEnd!=null&&Xe("scrollend",l),b.onClick!=null&&(l.onclick=Ut),l=!0):l=!1,l||Ys(s,!0)}function G_(s){for(Ai=s.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Ai=Ai.return}}function nc(s){if(s!==Ai)return!1;if(!ir)return G_(s),ir=!0,!1;var l=s.tag,p;if((p=l!==3&&l!==27)&&((p=l===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||Cb(s.type,s.memoizedProps)),p=!p),p&&Fr&&Ys(s),G_(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Fr=yS(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Fr=yS(s)}else l===27?(l=Fr,oo(s.type)?(s=Tb,Tb=null,Fr=s):Fr=l):Fr=Ai?Xn(s.stateNode.nextSibling):null;return!0}function Zo(){Fr=Ai=null,ir=!1}function ny(){var s=Gs;return s!==null&&(pn===null?pn=s:pn.push.apply(pn,s),Gs=null),s}function Uh(s){Gs===null?Gs=[s]:Gs.push(s)}var ay=Y(null),Qo=null,is=null;function Ks(s,l,p){ft(ay,l._currentValue),l._currentValue=p}function ns(s){s._currentValue=ay.current,rt(ay)}function sy(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 oy(s,l,p,b){var w=s.child;for(w!==null&&(w.return=s);w!==null;){var S=w.dependencies;if(S!==null){var R=w.child;S=S.firstContext;t:for(;S!==null;){var P=S;S=w;for(var Z=0;Z<l.length;Z++)if(P.context===l[Z]){S.lanes|=p,P=S.alternate,P!==null&&(P.lanes|=p),sy(S.return,p,s),b||(R=null);break t}S=P.next}}else if(w.tag===18){if(R=w.return,R===null)throw Error(n(341));R.lanes|=p,S=R.alternate,S!==null&&(S.lanes|=p),sy(R,p,s),R=null}else R=w.child;if(R!==null)R.return=w;else for(R=w;R!==null;){if(R===s){R=null;break}if(w=R.sibling,w!==null){w.return=R.return,R=w;break}R=R.return}w=R}}function ac(s,l,p,b){s=null;for(var w=l,S=!1;w!==null;){if(!S){if((w.flags&524288)!==0)S=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var R=w.alternate;if(R===null)throw Error(n(387));if(R=R.memoizedProps,R!==null){var P=w.type;Tn(w.pendingProps.value,R.value)||(s!==null?s.push(P):s=[P])}}else if(w===kt.current){if(R=w.alternate,R===null)throw Error(n(387));R.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(mu):s=[mu])}w=w.return}s!==null&&oy(l,s,p,b),l.flags|=262144}function yf(s){for(s=s.firstContext;s!==null;){if(!Tn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Jo(s){Qo=s,is=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Mi(s){return Y_(Qo,s)}function bf(s,l){return Qo===null&&Jo(s),Y_(s,l)}function Y_(s,l){var p=l._currentValue;if(l={context:l,memoizedValue:p,next:null},is===null){if(s===null)throw Error(n(308));is=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else is=is.next=l;return p}var _F=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()})}},kF=r.unstable_scheduleCallback,wF=r.unstable_NormalPriority,hi={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ly(){return{controller:new _F,data:new Map,refCount:0}}function Hh(s){s.refCount--,s.refCount===0&&kF(wF,function(){s.controller.abort()})}var Wh=null,cy=0,sc=0,oc=null;function SF(s,l){if(Wh===null){var p=Wh=[];cy=0,sc=db(),oc={status:"pending",value:void 0,then:function(b){p.push(b)}}}return cy++,l.then(K_,K_),l}function K_(){if(--cy===0&&Wh!==null){oc!==null&&(oc.status="fulfilled");var s=Wh;Wh=null,sc=0,oc=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function TF(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 V_=D.S;D.S=function(s,l){Lw=Rt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&SF(s,l),V_!==null&&V_(s,l)};var tl=Y(null);function hy(){var s=tl.current;return s!==null?s:jr.pooledCache}function xf(s,l){l===null?ft(tl,tl.current):ft(tl,l.pool)}function X_(){var s=hy();return s===null?null:{parent:hi._currentValue,pool:s}}var lc=Error(n(460)),uy=Error(n(474)),vf=Error(n(542)),Cf={then:function(){}};function Z_(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Q_(s,l,p){switch(p=s[p],p===void 0?s.push(l):p!==l&&(l.then(Ut,Ut),l=p),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,tk(s),s;default:if(typeof l.status=="string")l.then(Ut,Ut);else{if(s=jr,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,tk(s),s}throw rl=l,lc}}function el(s){try{var l=s._init;return l(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(rl=p,lc):p}}var rl=null;function J_(){if(rl===null)throw Error(n(459));var s=rl;return rl=null,s}function tk(s){if(s===lc||s===vf)throw Error(n(483))}var cc=null,Gh=0;function _f(s){var l=Gh;return Gh+=1,cc===null&&(cc=[]),Q_(cc,s,l)}function Yh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function kf(s,l){throw l.$$typeof===x?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function ek(s){function l(dt,at){if(s){var gt=dt.deletions;gt===null?(dt.deletions=[at],dt.flags|=16):gt.push(at)}}function p(dt,at){if(!s)return null;for(;at!==null;)l(dt,at),at=at.sibling;return null}function b(dt){for(var at=new Map;dt!==null;)dt.key!==null?at.set(dt.key,dt):at.set(dt.index,dt),dt=dt.sibling;return at}function w(dt,at){return dt=es(dt,at),dt.index=0,dt.sibling=null,dt}function S(dt,at,gt){return dt.index=gt,s?(gt=dt.alternate,gt!==null?(gt=gt.index,gt<at?(dt.flags|=67108866,at):gt):(dt.flags|=67108866,at)):(dt.flags|=1048576,at)}function R(dt){return s&&dt.alternate===null&&(dt.flags|=67108866),dt}function P(dt,at,gt,Nt){return at===null||at.tag!==6?(at=Jm(gt,dt.mode,Nt),at.return=dt,at):(at=w(at,gt),at.return=dt,at)}function Z(dt,at,gt,Nt){var be=gt.type;return be===C?Et(dt,at,gt.props.children,Nt,gt.key):at!==null&&(at.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===M&&el(be)===at.type)?(at=w(at,gt.props),Yh(at,gt),at.return=dt,at):(at=gf(gt.type,gt.key,gt.props,null,dt.mode,Nt),Yh(at,gt),at.return=dt,at)}function mt(dt,at,gt,Nt){return at===null||at.tag!==4||at.stateNode.containerInfo!==gt.containerInfo||at.stateNode.implementation!==gt.implementation?(at=ty(gt,dt.mode,Nt),at.return=dt,at):(at=w(at,gt.children||[]),at.return=dt,at)}function Et(dt,at,gt,Nt,be){return at===null||at.tag!==7?(at=Xo(gt,dt.mode,Nt,be),at.return=dt,at):(at=w(at,gt),at.return=dt,at)}function Mt(dt,at,gt){if(typeof at=="string"&&at!==""||typeof at=="number"||typeof at=="bigint")return at=Jm(""+at,dt.mode,gt),at.return=dt,at;if(typeof at=="object"&&at!==null){switch(at.$$typeof){case y:return gt=gf(at.type,at.key,at.props,null,dt.mode,gt),Yh(gt,at),gt.return=dt,gt;case v:return at=ty(at,dt.mode,gt),at.return=dt,at;case M:return at=el(at),Mt(dt,at,gt)}if(G(at)||U(at))return at=Xo(at,dt.mode,gt,null),at.return=dt,at;if(typeof at.then=="function")return Mt(dt,_f(at),gt);if(at.$$typeof===N)return Mt(dt,bf(dt,at),gt);kf(dt,at)}return null}function bt(dt,at,gt,Nt){var be=at!==null?at.key:null;if(typeof gt=="string"&>!==""||typeof gt=="number"||typeof gt=="bigint")return be!==null?null:P(dt,at,""+gt,Nt);if(typeof gt=="object"&>!==null){switch(gt.$$typeof){case y:return gt.key===be?Z(dt,at,gt,Nt):null;case v:return gt.key===be?mt(dt,at,gt,Nt):null;case M:return gt=el(gt),bt(dt,at,gt,Nt)}if(G(gt)||U(gt))return be!==null?null:Et(dt,at,gt,Nt,null);if(typeof gt.then=="function")return bt(dt,at,_f(gt),Nt);if(gt.$$typeof===N)return bt(dt,at,bf(dt,gt),Nt);kf(dt,gt)}return null}function _t(dt,at,gt,Nt,be){if(typeof Nt=="string"&&Nt!==""||typeof Nt=="number"||typeof Nt=="bigint")return dt=dt.get(gt)||null,P(at,dt,""+Nt,be);if(typeof Nt=="object"&&Nt!==null){switch(Nt.$$typeof){case y:return dt=dt.get(Nt.key===null?gt:Nt.key)||null,Z(at,dt,Nt,be);case v:return dt=dt.get(Nt.key===null?gt:Nt.key)||null,mt(at,dt,Nt,be);case M:return Nt=el(Nt),_t(dt,at,gt,Nt,be)}if(G(Nt)||U(Nt))return dt=dt.get(gt)||null,Et(at,dt,Nt,be,null);if(typeof Nt.then=="function")return _t(dt,at,gt,_f(Nt),be);if(Nt.$$typeof===N)return _t(dt,at,gt,bf(at,Nt),be);kf(at,Nt)}return null}function re(dt,at,gt,Nt){for(var be=null,cr=null,ce=at,qe=at=0,er=null;ce!==null&&qe<gt.length;qe++){ce.index>qe?(er=ce,ce=null):er=ce.sibling;var hr=bt(dt,ce,gt[qe],Nt);if(hr===null){ce===null&&(ce=er);break}s&&ce&&hr.alternate===null&&l(dt,ce),at=S(hr,at,qe),cr===null?be=hr:cr.sibling=hr,cr=hr,ce=er}if(qe===gt.length)return p(dt,ce),ir&&rs(dt,qe),be;if(ce===null){for(;qe<gt.length;qe++)ce=Mt(dt,gt[qe],Nt),ce!==null&&(at=S(ce,at,qe),cr===null?be=ce:cr.sibling=ce,cr=ce);return ir&&rs(dt,qe),be}for(ce=b(ce);qe<gt.length;qe++)er=_t(ce,dt,qe,gt[qe],Nt),er!==null&&(s&&er.alternate!==null&&ce.delete(er.key===null?qe:er.key),at=S(er,at,qe),cr===null?be=er:cr.sibling=er,cr=er);return s&&ce.forEach(function(fo){return l(dt,fo)}),ir&&rs(dt,qe),be}function Se(dt,at,gt,Nt){if(gt==null)throw Error(n(151));for(var be=null,cr=null,ce=at,qe=at=0,er=null,hr=gt.next();ce!==null&&!hr.done;qe++,hr=gt.next()){ce.index>qe?(er=ce,ce=null):er=ce.sibling;var fo=bt(dt,ce,hr.value,Nt);if(fo===null){ce===null&&(ce=er);break}s&&ce&&fo.alternate===null&&l(dt,ce),at=S(fo,at,qe),cr===null?be=fo:cr.sibling=fo,cr=fo,ce=er}if(hr.done)return p(dt,ce),ir&&rs(dt,qe),be;if(ce===null){for(;!hr.done;qe++,hr=gt.next())hr=Mt(dt,hr.value,Nt),hr!==null&&(at=S(hr,at,qe),cr===null?be=hr:cr.sibling=hr,cr=hr);return ir&&rs(dt,qe),be}for(ce=b(ce);!hr.done;qe++,hr=gt.next())hr=_t(ce,dt,qe,hr.value,Nt),hr!==null&&(s&&hr.alternate!==null&&ce.delete(hr.key===null?qe:hr.key),at=S(hr,at,qe),cr===null?be=hr:cr.sibling=hr,cr=hr);return s&&ce.forEach(function(F4){return l(dt,F4)}),ir&&rs(dt,qe),be}function Br(dt,at,gt,Nt){if(typeof gt=="object"&>!==null&>.type===C&>.key===null&&(gt=gt.props.children),typeof gt=="object"&>!==null){switch(gt.$$typeof){case y:t:{for(var be=gt.key;at!==null;){if(at.key===be){if(be=gt.type,be===C){if(at.tag===7){p(dt,at.sibling),Nt=w(at,gt.props.children),Nt.return=dt,dt=Nt;break t}}else if(at.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===M&&el(be)===at.type){p(dt,at.sibling),Nt=w(at,gt.props),Yh(Nt,gt),Nt.return=dt,dt=Nt;break t}p(dt,at);break}else l(dt,at);at=at.sibling}gt.type===C?(Nt=Xo(gt.props.children,dt.mode,Nt,gt.key),Nt.return=dt,dt=Nt):(Nt=gf(gt.type,gt.key,gt.props,null,dt.mode,Nt),Yh(Nt,gt),Nt.return=dt,dt=Nt)}return R(dt);case v:t:{for(be=gt.key;at!==null;){if(at.key===be)if(at.tag===4&&at.stateNode.containerInfo===gt.containerInfo&&at.stateNode.implementation===gt.implementation){p(dt,at.sibling),Nt=w(at,gt.children||[]),Nt.return=dt,dt=Nt;break t}else{p(dt,at);break}else l(dt,at);at=at.sibling}Nt=ty(gt,dt.mode,Nt),Nt.return=dt,dt=Nt}return R(dt);case M:return gt=el(gt),Br(dt,at,gt,Nt)}if(G(gt))return re(dt,at,gt,Nt);if(U(gt)){if(be=U(gt),typeof be!="function")throw Error(n(150));return gt=be.call(gt),Se(dt,at,gt,Nt)}if(typeof gt.then=="function")return Br(dt,at,_f(gt),Nt);if(gt.$$typeof===N)return Br(dt,at,bf(dt,gt),Nt);kf(dt,gt)}return typeof gt=="string"&>!==""||typeof gt=="number"||typeof gt=="bigint"?(gt=""+gt,at!==null&&at.tag===6?(p(dt,at.sibling),Nt=w(at,gt),Nt.return=dt,dt=Nt):(p(dt,at),Nt=Jm(gt,dt.mode,Nt),Nt.return=dt,dt=Nt),R(dt)):p(dt,at)}return function(dt,at,gt,Nt){try{Gh=0;var be=Br(dt,at,gt,Nt);return cc=null,be}catch(ce){if(ce===lc||ce===vf)throw ce;var cr=En(29,ce,null,dt.mode);return cr.lanes=Nt,cr.return=dt,cr}finally{}}}var il=ek(!0),rk=ek(!1),Vs=!1;function dy(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fy(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Zs(s,l,p){var b=s.updateQueue;if(b===null)return null;if(b=b.shared,(pr&2)!==0){var w=b.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),b.pending=l,l=pf(s),$_(s,null,p),l}return ff(s,b,l,p),pf(s)}function Kh(s,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194048)!==0)){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,ye(s,p)}}function py(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 gy=!1;function Vh(){if(gy){var s=oc;if(s!==null)throw s}}function Xh(s,l,p,b){gy=!1;var w=s.updateQueue;Vs=!1;var S=w.firstBaseUpdate,R=w.lastBaseUpdate,P=w.shared.pending;if(P!==null){w.shared.pending=null;var Z=P,mt=Z.next;Z.next=null,R===null?S=mt:R.next=mt,R=Z;var Et=s.alternate;Et!==null&&(Et=Et.updateQueue,P=Et.lastBaseUpdate,P!==R&&(P===null?Et.firstBaseUpdate=mt:P.next=mt,Et.lastBaseUpdate=Z))}if(S!==null){var Mt=w.baseState;R=0,Et=mt=Z=null,P=S;do{var bt=P.lane&-536870913,_t=bt!==P.lane;if(_t?(tr&bt)===bt:(b&bt)===bt){bt!==0&&bt===sc&&(gy=!0),Et!==null&&(Et=Et.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});t:{var re=s,Se=P;bt=l;var Br=p;switch(Se.tag){case 1:if(re=Se.payload,typeof re=="function"){Mt=re.call(Br,Mt,bt);break t}Mt=re;break t;case 3:re.flags=re.flags&-65537|128;case 0:if(re=Se.payload,bt=typeof re=="function"?re.call(Br,Mt,bt):re,bt==null)break t;Mt=g({},Mt,bt);break t;case 2:Vs=!0}}bt=P.callback,bt!==null&&(s.flags|=64,_t&&(s.flags|=8192),_t=w.callbacks,_t===null?w.callbacks=[bt]:_t.push(bt))}else _t={lane:bt,tag:P.tag,payload:P.payload,callback:P.callback,next:null},Et===null?(mt=Et=_t,Z=Mt):Et=Et.next=_t,R|=bt;if(P=P.next,P===null){if(P=w.shared.pending,P===null)break;_t=P,P=_t.next,_t.next=null,w.lastBaseUpdate=_t,w.shared.pending=null}}while(!0);Et===null&&(Z=Mt),w.baseState=Z,w.firstBaseUpdate=mt,w.lastBaseUpdate=Et,S===null&&(w.shared.lanes=0),ro|=R,s.lanes=R,s.memoizedState=Mt}}function ik(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function nk(s,l){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)ik(p[s],l)}var hc=Y(null),wf=Y(0);function ak(s,l){s=fs,ft(wf,s),ft(hc,l),fs=s|l.baseLanes}function my(){ft(wf,fs),ft(hc,hc.current)}function yy(){fs=wf.current,rt(hc),rt(wf)}var Nn=Y(null),Vn=null;function Qs(s){var l=s.alternate;ft(ai,ai.current&1),ft(Nn,s),Vn===null&&(l===null||hc.current!==null||l.memoizedState!==null)&&(Vn=s)}function by(s){ft(ai,ai.current),ft(Nn,s),Vn===null&&(Vn=s)}function sk(s){s.tag===22?(ft(ai,ai.current),ft(Nn,s),Vn===null&&(Vn=s)):Js()}function Js(){ft(ai,ai.current),ft(Nn,Nn.current)}function An(s){rt(Nn),Vn===s&&(Vn=null),rt(ai)}var ai=Y(0);function Sf(s){for(var l=s;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||wb(p)||Sb(p)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var as=0,ze=null,Ar=null,ui=null,Tf=!1,uc=!1,nl=!1,Ef=0,Zh=0,dc=null,EF=0;function Jr(){throw Error(n(321))}function xy(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 vy(s,l,p,b,w,S){return as=S,ze=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,D.H=s===null||s.memoizedState===null?Uk:jy,nl=!1,S=p(b,w),nl=!1,uc&&(S=lk(l,p,b,w)),ok(s),S}function ok(s){D.H=tu;var l=Ar!==null&&Ar.next!==null;if(as=0,ui=Ar=ze=null,Tf=!1,Zh=0,dc=null,l)throw Error(n(300));s===null||di||(s=s.dependencies,s!==null&&yf(s)&&(di=!0))}function lk(s,l,p,b){ze=s;var w=0;do{if(uc&&(dc=null),Zh=0,uc=!1,25<=w)throw Error(n(301));if(w+=1,ui=Ar=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=Hk,S=l(p,b)}while(uc);return S}function NF(){var s=D.H,l=s.useState()[0];return l=typeof l.then=="function"?Qh(l):l,s=s.useState()[0],(Ar!==null?Ar.memoizedState:null)!==s&&(ze.flags|=1024),l}function Cy(){var s=Ef!==0;return Ef=0,s}function _y(s,l,p){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~p}function ky(s){if(Tf){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Tf=!1}as=0,ui=Ar=ze=null,uc=!1,Zh=Ef=0,dc=null}function Vi(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ui===null?ze.memoizedState=ui=s:ui=ui.next=s,ui}function si(){if(Ar===null){var s=ze.alternate;s=s!==null?s.memoizedState:null}else s=Ar.next;var l=ui===null?ze.memoizedState:ui.next;if(l!==null)ui=l,Ar=s;else{if(s===null)throw ze.alternate===null?Error(n(467)):Error(n(310));Ar=s,s={memoizedState:Ar.memoizedState,baseState:Ar.baseState,baseQueue:Ar.baseQueue,queue:Ar.queue,next:null},ui===null?ze.memoizedState=ui=s:ui=ui.next=s}return ui}function Nf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qh(s){var l=Zh;return Zh+=1,dc===null&&(dc=[]),s=Q_(dc,s,l),l=ze,(ui===null?l.memoizedState:ui.next)===null&&(l=l.alternate,D.H=l===null||l.memoizedState===null?Uk:jy),s}function Af(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Qh(s);if(s.$$typeof===N)return Mi(s)}throw Error(n(438,String(s)))}function wy(s){var l=null,p=ze.updateQueue;if(p!==null&&(l=p.memoCache),l==null){var b=ze.alternate;b!==null&&(b=b.updateQueue,b!==null&&(b=b.memoCache,b!=null&&(l={data:b.data.map(function(w){return w.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),p===null&&(p=Nf(),ze.updateQueue=p),p.memoCache=l,p=l.data[l.index],p===void 0)for(p=l.data[l.index]=Array(s),b=0;b<s;b++)p[b]=j;return l.index++,p}function ss(s,l){return typeof l=="function"?l(s):l}function Mf(s){var l=si();return Sy(l,Ar,s)}function Sy(s,l,p){var b=s.queue;if(b===null)throw Error(n(311));b.lastRenderedReducer=p;var w=s.baseQueue,S=b.pending;if(S!==null){if(w!==null){var R=w.next;w.next=S.next,S.next=R}l.baseQueue=w=S,b.pending=null}if(S=s.baseState,w===null)s.memoizedState=S;else{l=w.next;var P=R=null,Z=null,mt=l,Et=!1;do{var Mt=mt.lane&-536870913;if(Mt!==mt.lane?(tr&Mt)===Mt:(as&Mt)===Mt){var bt=mt.revertLane;if(bt===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:mt.action,hasEagerState:mt.hasEagerState,eagerState:mt.eagerState,next:null}),Mt===sc&&(Et=!0);else if((as&bt)===bt){mt=mt.next,bt===sc&&(Et=!0);continue}else Mt={lane:0,revertLane:mt.revertLane,gesture:null,action:mt.action,hasEagerState:mt.hasEagerState,eagerState:mt.eagerState,next:null},Z===null?(P=Z=Mt,R=S):Z=Z.next=Mt,ze.lanes|=bt,ro|=bt;Mt=mt.action,nl&&p(S,Mt),S=mt.hasEagerState?mt.eagerState:p(S,Mt)}else bt={lane:Mt,revertLane:mt.revertLane,gesture:mt.gesture,action:mt.action,hasEagerState:mt.hasEagerState,eagerState:mt.eagerState,next:null},Z===null?(P=Z=bt,R=S):Z=Z.next=bt,ze.lanes|=Mt,ro|=Mt;mt=mt.next}while(mt!==null&&mt!==l);if(Z===null?R=S:Z.next=P,!Tn(S,s.memoizedState)&&(di=!0,Et&&(p=oc,p!==null)))throw p;s.memoizedState=S,s.baseState=R,s.baseQueue=Z,b.lastRenderedState=S}return w===null&&(b.lanes=0),[s.memoizedState,b.dispatch]}function Ty(s){var l=si(),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)||(di=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),p.lastRenderedState=S}return[S,b]}function ck(s,l,p){var b=ze,w=si(),S=ir;if(S){if(p===void 0)throw Error(n(407));p=p()}else p=l();var R=!Tn((Ar||w).memoizedState,p);if(R&&(w.memoizedState=p,di=!0),w=w.queue,Ay(dk.bind(null,b,w,s),[s]),w.getSnapshot!==l||R||ui!==null&&ui.memoizedState.tag&1){if(b.flags|=2048,fc(9,{destroy:void 0},uk.bind(null,b,w,p,l),null),jr===null)throw Error(n(349));S||(as&127)!==0||hk(b,l,p)}return p}function hk(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=ze.updateQueue,l===null?(l=Nf(),ze.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function uk(s,l,p,b){l.value=p,l.getSnapshot=b,fk(l)&&pk(s)}function dk(s,l,p){return p(function(){fk(l)&&pk(s)})}function fk(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!Tn(s,p)}catch{return!0}}function pk(s){var l=Vo(s,2);l!==null&&gn(l,s,2)}function Ey(s){var l=Vi();if(typeof s=="function"){var p=s;if(s=p(),nl){or(!0);try{p()}finally{or(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:s},l}function gk(s,l,p,b){return s.baseState=p,Sy(s,Ar,typeof b=="function"?b:ss)}function AF(s,l,p,b,w){if(Of(s))throw Error(n(485));if(s=l.action,s!==null){var S={payload:w,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){S.listeners.push(R)}};D.T!==null?p(!0):S.isTransition=!1,b(S),p=l.pending,p===null?(S.next=l.pending=S,mk(l,S)):(S.next=p.next,l.pending=p.next=S)}}function mk(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 P=p(w,b),Z=D.S;Z!==null&&Z(R,P),yk(s,l,P)}catch(mt){Ny(s,l,mt)}finally{S!==null&&R.types!==null&&(S.types=R.types),D.T=S}}else try{S=p(w,b),yk(s,l,S)}catch(mt){Ny(s,l,mt)}}function yk(s,l,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(b){bk(s,l,b)},function(b){return Ny(s,l,b)}):bk(s,l,p)}function bk(s,l,p){l.status="fulfilled",l.value=p,xk(l),s.state=p,l=s.pending,l!==null&&(p=l.next,p===l?s.pending=null:(p=p.next,l.next=p,mk(s,p)))}function Ny(s,l,p){var b=s.pending;if(s.pending=null,b!==null){b=b.next;do l.status="rejected",l.reason=p,xk(l),l=l.next;while(l!==b)}s.action=null}function xk(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function vk(s,l){return l}function Ck(s,l){if(ir){var p=jr.formState;if(p!==null){t:{var b=ze;if(ir){if(Fr){e:{for(var w=Fr,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){Fr=Xn(w.nextSibling),b=w.data==="F!";break t}}Ys(b)}b=!1}b&&(l=p[0])}}return p=Vi(),p.memoizedState=p.baseState=l,b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vk,lastRenderedState:l},p.queue=b,p=zk.bind(null,ze,b),b.dispatch=p,b=Ey(!1),S=Ry.bind(null,ze,!1,b.queue),b=Vi(),w={state:l,dispatch:null,action:s,pending:null},b.queue=w,p=AF.bind(null,ze,w,S,p),w.dispatch=p,b.memoizedState=s,[l,p,!1]}function _k(s){var l=si();return kk(l,Ar,s)}function kk(s,l,p){if(l=Sy(s,l,vk)[0],s=Mf(ss)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var b=Qh(l)}catch(R){throw R===lc?vf:R}else b=l;l=si();var w=l.queue,S=w.dispatch;return p!==l.memoizedState&&(ze.flags|=2048,fc(9,{destroy:void 0},MF.bind(null,w,p),null)),[b,S,s]}function MF(s,l){s.action=l}function wk(s){var l=si(),p=Ar;if(p!==null)return kk(l,p,s);si(),l=l.memoizedState,p=si();var b=p.queue.dispatch;return p.memoizedState=s,[l,b,!1]}function fc(s,l,p,b){return s={tag:s,create:p,deps:b,inst:l,next:null},l=ze.updateQueue,l===null&&(l=Nf(),ze.updateQueue=l),p=l.lastEffect,p===null?l.lastEffect=s.next=s:(b=p.next,p.next=s,s.next=b,l.lastEffect=s),s}function Sk(){return si().memoizedState}function Bf(s,l,p,b){var w=Vi();ze.flags|=s,w.memoizedState=fc(1|l,{destroy:void 0},p,b===void 0?null:b)}function Lf(s,l,p,b){var w=si();b=b===void 0?null:b;var S=w.memoizedState.inst;Ar!==null&&b!==null&&xy(b,Ar.memoizedState.deps)?w.memoizedState=fc(l,S,p,b):(ze.flags|=s,w.memoizedState=fc(1|l,S,p,b))}function Tk(s,l){Bf(8390656,8,s,l)}function Ay(s,l){Lf(2048,8,s,l)}function BF(s){ze.flags|=4;var l=ze.updateQueue;if(l===null)l=Nf(),ze.updateQueue=l,l.events=[s];else{var p=l.events;p===null?l.events=[s]:p.push(s)}}function Ek(s){var l=si().memoizedState;return BF({ref:l,nextImpl:s}),function(){if((pr&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function Nk(s,l){return Lf(4,2,s,l)}function Ak(s,l){return Lf(4,4,s,l)}function Mk(s,l){if(typeof l=="function"){s=s();var p=l(s);return function(){typeof p=="function"?p():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function Bk(s,l,p){p=p!=null?p.concat([s]):null,Lf(4,4,Mk.bind(null,l,s),p)}function My(){}function Lk(s,l){var p=si();l=l===void 0?null:l;var b=p.memoizedState;return l!==null&&xy(l,b[1])?b[0]:(p.memoizedState=[s,l],s)}function Ok(s,l){var p=si();l=l===void 0?null:l;var b=p.memoizedState;if(l!==null&&xy(l,b[1]))return b[0];if(b=s(),nl){or(!0);try{s()}finally{or(!1)}}return p.memoizedState=[b,l],b}function By(s,l,p){return p===void 0||(as&1073741824)!==0&&(tr&261930)===0?s.memoizedState=l:(s.memoizedState=p,s=Rw(),ze.lanes|=s,ro|=s,p)}function Rk(s,l,p,b){return Tn(p,l)?p:hc.current!==null?(s=By(s,p,b),Tn(s,l)||(di=!0),s):(as&42)===0||(as&1073741824)!==0&&(tr&261930)===0?(di=!0,s.memoizedState=p):(s=Rw(),ze.lanes|=s,ro|=s,l)}function jk(s,l,p,b,w){var S=W.p;W.p=S!==0&&8>S?S:8;var R=D.T,P={};D.T=P,Ry(s,!1,l,p);try{var Z=w(),mt=D.S;if(mt!==null&&mt(P,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var Et=TF(Z,b);Jh(s,l,Et,Ln(s))}else Jh(s,l,b,Ln(s))}catch(Mt){Jh(s,l,{then:function(){},status:"rejected",reason:Mt},Ln())}finally{W.p=S,R!==null&&P.types!==null&&(R.types=P.types),D.T=R}}function LF(){}function Ly(s,l,p,b){if(s.tag!==5)throw Error(n(476));var w=Dk(s).queue;jk(s,w,l,K,p===null?LF:function(){return Fk(s),p(b)})}function Dk(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:K},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 Fk(s){var l=Dk(s);l.next===null&&(l=s.alternate.memoizedState),Jh(s,l.next.queue,{},Ln())}function Oy(){return Mi(mu)}function Ik(){return si().memoizedState}function $k(){return si().memoizedState}function OF(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var p=Ln();s=Xs(p);var b=Zs(l,s,p);b!==null&&(gn(b,l,p),Kh(b,l,p)),l={cache:ly()},s.payload=l;return}l=l.return}}function RF(s,l,p){var b=Ln();p={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Of(s)?Pk(l,p):(p=Zm(s,l,p,b),p!==null&&(gn(p,s,b),qk(p,l,b)))}function zk(s,l,p){var b=Ln();Jh(s,l,p,b)}function Jh(s,l,p,b){var w={lane:b,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Of(s))Pk(l,w);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var R=l.lastRenderedState,P=S(R,p);if(w.hasEagerState=!0,w.eagerState=P,Tn(P,R))return ff(s,l,w,0),jr===null&&df(),!1}catch{}finally{}if(p=Zm(s,l,w,b),p!==null)return gn(p,s,b),qk(p,l,b),!0}return!1}function Ry(s,l,p,b){if(b={lane:2,revertLane:db(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Of(s)){if(l)throw Error(n(479))}else l=Zm(s,p,b,2),l!==null&&gn(l,s,2)}function Of(s){var l=s.alternate;return s===ze||l!==null&&l===ze}function Pk(s,l){uc=Tf=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function qk(s,l,p){if((p&4194048)!==0){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,ye(s,p)}}var tu={readContext:Mi,use:Af,useCallback:Jr,useContext:Jr,useEffect:Jr,useImperativeHandle:Jr,useLayoutEffect:Jr,useInsertionEffect:Jr,useMemo:Jr,useReducer:Jr,useRef:Jr,useState:Jr,useDebugValue:Jr,useDeferredValue:Jr,useTransition:Jr,useSyncExternalStore:Jr,useId:Jr,useHostTransitionStatus:Jr,useFormState:Jr,useActionState:Jr,useOptimistic:Jr,useMemoCache:Jr,useCacheRefresh:Jr};tu.useEffectEvent=Jr;var Uk={readContext:Mi,use:Af,useCallback:function(s,l){return Vi().memoizedState=[s,l===void 0?null:l],s},useContext:Mi,useEffect:Tk,useImperativeHandle:function(s,l,p){p=p!=null?p.concat([s]):null,Bf(4194308,4,Mk.bind(null,l,s),p)},useLayoutEffect:function(s,l){return Bf(4194308,4,s,l)},useInsertionEffect:function(s,l){Bf(4,2,s,l)},useMemo:function(s,l){var p=Vi();l=l===void 0?null:l;var b=s();if(nl){or(!0);try{s()}finally{or(!1)}}return p.memoizedState=[b,l],b},useReducer:function(s,l,p){var b=Vi();if(p!==void 0){var w=p(l);if(nl){or(!0);try{p(l)}finally{or(!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=RF.bind(null,ze,s),[b.memoizedState,s]},useRef:function(s){var l=Vi();return s={current:s},l.memoizedState=s},useState:function(s){s=Ey(s);var l=s.queue,p=zk.bind(null,ze,l);return l.dispatch=p,[s.memoizedState,p]},useDebugValue:My,useDeferredValue:function(s,l){var p=Vi();return By(p,s,l)},useTransition:function(){var s=Ey(!1);return s=jk.bind(null,ze,s.queue,!0,!1),Vi().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,p){var b=ze,w=Vi();if(ir){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),jr===null)throw Error(n(349));(tr&127)!==0||hk(b,l,p)}w.memoizedState=p;var S={value:p,getSnapshot:l};return w.queue=S,Tk(dk.bind(null,b,S,s),[s]),b.flags|=2048,fc(9,{destroy:void 0},uk.bind(null,b,S,p,l),null),p},useId:function(){var s=Vi(),l=jr.identifierPrefix;if(ir){var p=Aa,b=Na;p=(b&~(1<<32-me(b)-1)).toString(32)+p,l="_"+l+"R_"+p,p=Ef++,0<p&&(l+="H"+p.toString(32)),l+="_"}else p=EF++,l="_"+l+"r_"+p.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Oy,useFormState:Ck,useActionState:Ck,useOptimistic:function(s){var l=Vi();l.memoizedState=l.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=p,l=Ry.bind(null,ze,!0,p),p.dispatch=l,[s,l]},useMemoCache:wy,useCacheRefresh:function(){return Vi().memoizedState=OF.bind(null,ze)},useEffectEvent:function(s){var l=Vi(),p={impl:s};return l.memoizedState=p,function(){if((pr&2)!==0)throw Error(n(440));return p.impl.apply(void 0,arguments)}}},jy={readContext:Mi,use:Af,useCallback:Lk,useContext:Mi,useEffect:Ay,useImperativeHandle:Bk,useInsertionEffect:Nk,useLayoutEffect:Ak,useMemo:Ok,useReducer:Mf,useRef:Sk,useState:function(){return Mf(ss)},useDebugValue:My,useDeferredValue:function(s,l){var p=si();return Rk(p,Ar.memoizedState,s,l)},useTransition:function(){var s=Mf(ss)[0],l=si().memoizedState;return[typeof s=="boolean"?s:Qh(s),l]},useSyncExternalStore:ck,useId:Ik,useHostTransitionStatus:Oy,useFormState:_k,useActionState:_k,useOptimistic:function(s,l){var p=si();return gk(p,Ar,s,l)},useMemoCache:wy,useCacheRefresh:$k};jy.useEffectEvent=Ek;var Hk={readContext:Mi,use:Af,useCallback:Lk,useContext:Mi,useEffect:Ay,useImperativeHandle:Bk,useInsertionEffect:Nk,useLayoutEffect:Ak,useMemo:Ok,useReducer:Ty,useRef:Sk,useState:function(){return Ty(ss)},useDebugValue:My,useDeferredValue:function(s,l){var p=si();return Ar===null?By(p,s,l):Rk(p,Ar.memoizedState,s,l)},useTransition:function(){var s=Ty(ss)[0],l=si().memoizedState;return[typeof s=="boolean"?s:Qh(s),l]},useSyncExternalStore:ck,useId:Ik,useHostTransitionStatus:Oy,useFormState:wk,useActionState:wk,useOptimistic:function(s,l){var p=si();return Ar!==null?gk(p,Ar,s,l):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:wy,useCacheRefresh:$k};Hk.useEffectEvent=Ek;function Dy(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 Fy={enqueueSetState:function(s,l,p){s=s._reactInternals;var b=Ln(),w=Xs(b);w.payload=l,p!=null&&(w.callback=p),l=Zs(s,w,b),l!==null&&(gn(l,s,b),Kh(l,s,b))},enqueueReplaceState:function(s,l,p){s=s._reactInternals;var b=Ln(),w=Xs(b);w.tag=1,w.payload=l,p!=null&&(w.callback=p),l=Zs(s,w,b),l!==null&&(gn(l,s,b),Kh(l,s,b))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var p=Ln(),b=Xs(p);b.tag=2,l!=null&&(b.callback=l),l=Zs(s,b,p),l!==null&&(gn(l,s,p),Kh(l,s,p))}};function Wk(s,l,p,b,w,S,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(b,S,R):l.prototype&&l.prototype.isPureReactComponent?!zh(p,b)||!zh(w,S):!0}function Gk(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&&Fy.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 Yk(s){uf(s)}function Kk(s){console.error(s)}function Vk(s){uf(s)}function Rf(s,l){try{var p=s.onUncaughtError;p(l.value,{componentStack:l.stack})}catch(b){setTimeout(function(){throw b})}}function Xk(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 Iy(s,l,p){return p=Xs(p),p.tag=3,p.payload={element:null},p.callback=function(){Rf(s,l)},p}function Zk(s){return s=Xs(s),s.tag=3,s}function Qk(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(){Xk(l,p,b)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(s.callback=function(){Xk(l,p,b),typeof w!="function"&&(io===null?io=new Set([this]):io.add(this));var P=b.stack;this.componentDidCatch(b.value,{componentStack:P!==null?P:""})})}function jF(s,l,p,b,w){if(p.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){if(l=p.alternate,l!==null&&ac(l,p,w,!0),p=Nn.current,p!==null){switch(p.tag){case 31:case 13:return Vn===null?Gf():p.alternate===null&&ti===0&&(ti=3),p.flags&=-257,p.flags|=65536,p.lanes=w,b===Cf?p.flags|=16384:(l=p.updateQueue,l===null?p.updateQueue=new Set([b]):l.add(b),cb(s,b,w)),!1;case 22:return p.flags|=65536,b===Cf?p.flags|=16384:(l=p.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([b])},p.updateQueue=l):(p=l.retryQueue,p===null?l.retryQueue=new Set([b]):p.add(b)),cb(s,b,w)),!1}throw Error(n(435,p.tag))}return cb(s,b,w),Gf(),!1}if(ir)return l=Nn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,b!==iy&&(s=Error(n(422),{cause:b}),Uh(Wn(s,p)))):(b!==iy&&(l=Error(n(423),{cause:b}),Uh(Wn(l,p))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,b=Wn(b,p),w=Iy(s.stateNode,b,w),py(s,w),ti!==4&&(ti=2)),!1;var S=Error(n(520),{cause:b});if(S=Wn(S,p),lu===null?lu=[S]:lu.push(S),ti!==4&&(ti=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=Iy(p.stateNode,b,s),py(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"&&(io===null||!io.has(S))))return p.flags|=65536,w&=-w,p.lanes|=w,w=Zk(w),Qk(w,s,p,b),py(p,w),!1}p=p.return}while(p!==null);return!1}var $y=Error(n(461)),di=!1;function Bi(s,l,p,b){l.child=s===null?rk(l,null,p,b):il(l,s.child,p,b)}function Jk(s,l,p,b,w){p=p.render;var S=l.ref;if("ref"in b){var R={};for(var P in b)P!=="ref"&&(R[P]=b[P])}else R=b;return Jo(l),b=vy(s,l,p,R,S,w),P=Cy(),s!==null&&!di?(_y(s,l,w),os(s,l,w)):(ir&&P&&ey(l),l.flags|=1,Bi(s,l,b,w),l.child)}function tw(s,l,p,b,w){if(s===null){var S=p.type;return typeof S=="function"&&!Qm(S)&&S.defaultProps===void 0&&p.compare===null?(l.tag=15,l.type=S,ew(s,l,S,b,w)):(s=gf(p.type,null,b,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!Yy(s,w)){var R=S.memoizedProps;if(p=p.compare,p=p!==null?p:zh,p(R,b)&&s.ref===l.ref)return os(s,l,w)}return l.flags|=1,s=es(S,b),s.ref=l.ref,s.return=l,l.child=s}function ew(s,l,p,b,w){if(s!==null){var S=s.memoizedProps;if(zh(S,b)&&s.ref===l.ref)if(di=!1,l.pendingProps=b=S,Yy(s,w))(s.flags&131072)!==0&&(di=!0);else return l.lanes=s.lanes,os(s,l,w)}return zy(s,l,p,b,w)}function rw(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 iw(s,l,S,p,b)}if((p&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&xf(l,S!==null?S.cachePool:null),S!==null?ak(l,S):my(),sk(l);else return b=l.lanes=536870912,iw(s,l,S!==null?S.baseLanes|p:p,p,b)}else S!==null?(xf(l,S.cachePool),ak(l,S),Js(),l.memoizedState=null):(s!==null&&xf(l,null),my(),Js());return Bi(s,l,w,p),l.child}function eu(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function iw(s,l,p,b,w){var S=hy();return S=S===null?null:{parent:hi._currentValue,pool:S},l.memoizedState={baseLanes:p,cachePool:S},s!==null&&xf(l,null),my(),sk(l),s!==null&&ac(s,l,b,!0),l.childLanes=w,null}function jf(s,l){return l=Ff({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function nw(s,l,p){return il(l,s.child,null,p),s=jf(l,l.pendingProps),s.flags|=2,An(l),l.memoizedState=null,s}function DF(s,l,p){var b=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(ir){if(b.mode==="hidden")return s=jf(l,b),l.lanes=536870912,eu(null,s);if(by(l),(s=Fr)?(s=mS(s,Kn),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ws!==null?{id:Na,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=P_(s),p.return=l,l.child=p,Ai=l,Fr=null)):s=null,s===null)throw Ys(l);return l.lanes=536870912,null}return jf(l,b)}var S=s.memoizedState;if(S!==null){var R=S.dehydrated;if(by(l),w)if(l.flags&256)l.flags&=-257,l=nw(s,l,p);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(di||ac(s,l,p,!1),w=(p&s.childLanes)!==0,di||w){if(b=jr,b!==null&&(R=mr(b,p),R!==0&&R!==S.retryLane))throw S.retryLane=R,Vo(s,R),gn(b,s,R),$y;Gf(),l=nw(s,l,p)}else s=S.treeContext,Fr=Xn(R.nextSibling),Ai=l,ir=!0,Gs=null,Kn=!1,s!==null&&H_(l,s),l=jf(l,b),l.flags|=4096;return l}return s=es(s.child,{mode:b.mode,children:b.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Df(s,l){var p=l.ref;if(p===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(n(284));(s===null||s.ref!==p)&&(l.flags|=4194816)}}function zy(s,l,p,b,w){return Jo(l),p=vy(s,l,p,b,void 0,w),b=Cy(),s!==null&&!di?(_y(s,l,w),os(s,l,w)):(ir&&b&&ey(l),l.flags|=1,Bi(s,l,p,w),l.child)}function aw(s,l,p,b,w,S){return Jo(l),l.updateQueue=null,p=lk(l,b,p,w),ok(s),b=Cy(),s!==null&&!di?(_y(s,l,S),os(s,l,S)):(ir&&b&&ey(l),l.flags|=1,Bi(s,l,p,S),l.child)}function sw(s,l,p,b,w){if(Jo(l),l.stateNode===null){var S=ec,R=p.contextType;typeof R=="object"&&R!==null&&(S=Mi(R)),S=new p(b,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Fy,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=b,S.state=l.memoizedState,S.refs={},dy(l),R=p.contextType,S.context=typeof R=="object"&&R!==null?Mi(R):ec,S.state=l.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Dy(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&&Fy.enqueueReplaceState(S,S.state,null),Xh(l,b,S,w),Vh(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!0}else if(s===null){S=l.stateNode;var P=l.memoizedProps,Z=al(p,P);S.props=Z;var mt=S.context,Et=p.contextType;R=ec,typeof Et=="object"&&Et!==null&&(R=Mi(Et));var Mt=p.getDerivedStateFromProps;Et=typeof Mt=="function"||typeof S.getSnapshotBeforeUpdate=="function",P=l.pendingProps!==P,Et||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(P||mt!==R)&&Gk(l,S,b,R),Vs=!1;var bt=l.memoizedState;S.state=bt,Xh(l,b,S,w),Vh(),mt=l.memoizedState,P||bt!==mt||Vs?(typeof Mt=="function"&&(Dy(l,p,Mt,b),mt=l.memoizedState),(Z=Vs||Wk(l,p,Z,b,bt,mt,R))?(Et||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=b,l.memoizedState=mt),S.props=b,S.state=mt,S.context=R,b=Z):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{S=l.stateNode,fy(s,l),R=l.memoizedProps,Et=al(p,R),S.props=Et,Mt=l.pendingProps,bt=S.context,mt=p.contextType,Z=ec,typeof mt=="object"&&mt!==null&&(Z=Mi(mt)),P=p.getDerivedStateFromProps,(mt=typeof P=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==Mt||bt!==Z)&&Gk(l,S,b,Z),Vs=!1,bt=l.memoizedState,S.state=bt,Xh(l,b,S,w),Vh();var _t=l.memoizedState;R!==Mt||bt!==_t||Vs||s!==null&&s.dependencies!==null&&yf(s.dependencies)?(typeof P=="function"&&(Dy(l,p,P,b),_t=l.memoizedState),(Et=Vs||Wk(l,p,Et,b,bt,_t,Z)||s!==null&&s.dependencies!==null&&yf(s.dependencies))?(mt||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(b,_t,Z),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(b,_t,Z)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=1024),l.memoizedProps=b,l.memoizedState=_t),S.props=b,S.state=_t,S.context=Z,b=Et):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&bt===s.memoizedState||(l.flags|=1024),b=!1)}return S=b,Df(s,l),b=(l.flags&128)!==0,S||b?(S=l.stateNode,p=b&&typeof p.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&b?(l.child=il(l,s.child,null,w),l.child=il(l,null,p,w)):Bi(s,l,p,w),l.memoizedState=S.state,s=l.child):s=os(s,l,w),s}function ow(s,l,p,b){return Zo(),l.flags|=256,Bi(s,l,p,b),l.child}var Py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qy(s){return{baseLanes:s,cachePool:X_()}}function Uy(s,l,p){return s=s!==null?s.childLanes&~p:0,l&&(s|=Bn),s}function lw(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:(ai.current&2)!==0),R&&(w=!0,l.flags&=-129),R=(l.flags&32)!==0,l.flags&=-33,s===null){if(ir){if(w?Qs(l):Js(),(s=Fr)?(s=mS(s,Kn),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ws!==null?{id:Na,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=P_(s),p.return=l,l.child=p,Ai=l,Fr=null)):s=null,s===null)throw Ys(l);return Sb(s)?l.lanes=32:l.lanes=536870912,null}var P=b.children;return b=b.fallback,w?(Js(),w=l.mode,P=Ff({mode:"hidden",children:P},w),b=Xo(b,w,p,null),P.return=l,b.return=l,P.sibling=b,l.child=P,b=l.child,b.memoizedState=qy(p),b.childLanes=Uy(s,R,p),l.memoizedState=Py,eu(null,b)):(Qs(l),Hy(l,P))}var Z=s.memoizedState;if(Z!==null&&(P=Z.dehydrated,P!==null)){if(S)l.flags&256?(Qs(l),l.flags&=-257,l=Wy(s,l,p)):l.memoizedState!==null?(Js(),l.child=s.child,l.flags|=128,l=null):(Js(),P=b.fallback,w=l.mode,b=Ff({mode:"visible",children:b.children},w),P=Xo(P,w,p,null),P.flags|=2,b.return=l,P.return=l,b.sibling=P,l.child=b,il(l,s.child,null,p),b=l.child,b.memoizedState=qy(p),b.childLanes=Uy(s,R,p),l.memoizedState=Py,l=eu(null,b));else if(Qs(l),Sb(P)){if(R=P.nextSibling&&P.nextSibling.dataset,R)var mt=R.dgst;R=mt,b=Error(n(419)),b.stack="",b.digest=R,Uh({value:b,source:null,stack:null}),l=Wy(s,l,p)}else if(di||ac(s,l,p,!1),R=(p&s.childLanes)!==0,di||R){if(R=jr,R!==null&&(b=mr(R,p),b!==0&&b!==Z.retryLane))throw Z.retryLane=b,Vo(s,b),gn(R,s,b),$y;wb(P)||Gf(),l=Wy(s,l,p)}else wb(P)?(l.flags|=192,l.child=s.child,l=null):(s=Z.treeContext,Fr=Xn(P.nextSibling),Ai=l,ir=!0,Gs=null,Kn=!1,s!==null&&H_(l,s),l=Hy(l,b.children),l.flags|=4096);return l}return w?(Js(),P=b.fallback,w=l.mode,Z=s.child,mt=Z.sibling,b=es(Z,{mode:"hidden",children:b.children}),b.subtreeFlags=Z.subtreeFlags&65011712,mt!==null?P=es(mt,P):(P=Xo(P,w,p,null),P.flags|=2),P.return=l,b.return=l,b.sibling=P,l.child=b,eu(null,b),b=l.child,P=s.child.memoizedState,P===null?P=qy(p):(w=P.cachePool,w!==null?(Z=hi._currentValue,w=w.parent!==Z?{parent:Z,pool:Z}:w):w=X_(),P={baseLanes:P.baseLanes|p,cachePool:w}),b.memoizedState=P,b.childLanes=Uy(s,R,p),l.memoizedState=Py,eu(s.child,b)):(Qs(l),p=s.child,s=p.sibling,p=es(p,{mode:"visible",children:b.children}),p.return=l,p.sibling=null,s!==null&&(R=l.deletions,R===null?(l.deletions=[s],l.flags|=16):R.push(s)),l.child=p,l.memoizedState=null,p)}function Hy(s,l){return l=Ff({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Ff(s,l){return s=En(22,s,null,l),s.lanes=0,s}function Wy(s,l,p){return il(l,s.child,null,p),s=Hy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function cw(s,l,p){s.lanes|=l;var b=s.alternate;b!==null&&(b.lanes|=l),sy(s.return,l,p)}function Gy(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 hw(s,l,p){var b=l.pendingProps,w=b.revealOrder,S=b.tail;b=b.children;var R=ai.current,P=(R&2)!==0;if(P?(R=R&1|2,l.flags|=128):R&=1,ft(ai,R),Bi(s,l,b,p),b=ir?qh:0,!P&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&cw(s,p,l);else if(s.tag===19)cw(s,p,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break t;for(;s.sibling===null;){if(s.return===null||s.return===l)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(w){case"forwards":for(p=l.child,w=null;p!==null;)s=p.alternate,s!==null&&Sf(s)===null&&(w=p),p=p.sibling;p=w,p===null?(w=l.child,l.child=null):(w=p.sibling,p.sibling=null),Gy(l,!1,w,p,S,b);break;case"backwards":case"unstable_legacy-backwards":for(p=null,w=l.child,l.child=null;w!==null;){if(s=w.alternate,s!==null&&Sf(s)===null){l.child=w;break}s=w.sibling,w.sibling=p,p=w,w=s}Gy(l,!0,p,null,S,b);break;case"together":Gy(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(ac(s,l,p,!1),(p&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,p=es(s,s.pendingProps),l.child=p,p.return=l;s.sibling!==null;)s=s.sibling,p=p.sibling=es(s,s.pendingProps),p.return=l;p.sibling=null}return l.child}function Yy(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&yf(s)))}function FF(s,l,p){switch(l.tag){case 3:it(l,l.stateNode.containerInfo),Ks(l,hi,s.memoizedState.cache),Zo();break;case 27:case 5:J(l);break;case 4:it(l,l.stateNode.containerInfo);break;case 10:Ks(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,by(l),null;break;case 13:var b=l.memoizedState;if(b!==null)return b.dehydrated!==null?(Qs(l),l.flags|=128,null):(p&l.child.childLanes)!==0?lw(s,l,p):(Qs(l),s=os(s,l,p),s!==null?s.sibling:null);Qs(l);break;case 19:var w=(s.flags&128)!==0;if(b=(p&l.childLanes)!==0,b||(ac(s,l,p,!1),b=(p&l.childLanes)!==0),w){if(b)return hw(s,l,p);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),ft(ai,ai.current),b)break;return null;case 22:return l.lanes=0,rw(s,l,p,l.pendingProps);case 24:Ks(l,hi,s.memoizedState.cache)}return os(s,l,p)}function uw(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps)di=!0;else{if(!Yy(s,p)&&(l.flags&128)===0)return di=!1,FF(s,l,p);di=(s.flags&131072)!==0}else di=!1,ir&&(l.flags&1048576)!==0&&U_(l,qh,l.index);switch(l.lanes=0,l.tag){case 16:t:{var b=l.pendingProps;if(s=el(l.elementType),l.type=s,typeof s=="function")Qm(s)?(b=al(s,b),l.tag=1,l=sw(null,l,s,b,p)):(l.tag=0,l=zy(null,l,s,b,p));else{if(s!=null){var w=s.$$typeof;if(w===E){l.tag=11,l=Jk(null,l,s,b,p);break t}else if(w===A){l.tag=14,l=tw(null,l,s,b,p);break t}}throw l=I(s)||s,Error(n(306,l,""))}}return l;case 0:return zy(s,l,l.type,l.pendingProps,p);case 1:return b=l.type,w=al(b,l.pendingProps),sw(s,l,b,w,p);case 3:t:{if(it(l,l.stateNode.containerInfo),s===null)throw Error(n(387));b=l.pendingProps;var S=l.memoizedState;w=S.element,fy(s,l),Xh(l,b,null,p);var R=l.memoizedState;if(b=R.cache,Ks(l,hi,b),b!==S.cache&&oy(l,[hi],p,!0),Vh(),b=R.element,S.isDehydrated)if(S={element:b,isDehydrated:!1,cache:R.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=ow(s,l,b,p);break t}else if(b!==w){w=Wn(Error(n(424)),l),Uh(w),l=ow(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(Fr=Xn(s.firstChild),Ai=l,ir=!0,Gs=null,Kn=!0,p=rk(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}Bi(s,l,b,p)}l=l.child}return l;case 26:return Df(s,l),s===null?(p=_S(l.type,null,l.pendingProps,null))?l.memoizedState=p:ir||(p=l.type,s=l.pendingProps,b=Jf(st.current).createElement(p),b[Rr]=l,b[Zr]=s,Li(b,p,s),yr(b),l.stateNode=b):l.memoizedState=_S(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return J(l),s===null&&ir&&(b=l.stateNode=xS(l.type,l.pendingProps,st.current),Ai=l,Kn=!0,w=Fr,oo(l.type)?(Tb=w,Fr=Xn(b.firstChild)):Fr=w),Bi(s,l,l.pendingProps.children,p),Df(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&ir&&((w=b=Fr)&&(b=f4(b,l.type,l.pendingProps,Kn),b!==null?(l.stateNode=b,Ai=l,Fr=Xn(b.firstChild),Kn=!1,w=!0):w=!1),w||Ys(l)),J(l),w=l.type,S=l.pendingProps,R=s!==null?s.memoizedProps:null,b=S.children,Cb(w,S)?b=null:R!==null&&Cb(w,R)&&(l.flags|=32),l.memoizedState!==null&&(w=vy(s,l,NF,null,null,p),mu._currentValue=w),Df(s,l),Bi(s,l,b,p),l.child;case 6:return s===null&&ir&&((s=p=Fr)&&(p=p4(p,l.pendingProps,Kn),p!==null?(l.stateNode=p,Ai=l,Fr=null,s=!0):s=!1),s||Ys(l)),null;case 13:return lw(s,l,p);case 4:return it(l,l.stateNode.containerInfo),b=l.pendingProps,s===null?l.child=il(l,null,b,p):Bi(s,l,b,p),l.child;case 11:return Jk(s,l,l.type,l.pendingProps,p);case 7:return Bi(s,l,l.pendingProps,p),l.child;case 8:return Bi(s,l,l.pendingProps.children,p),l.child;case 12:return Bi(s,l,l.pendingProps.children,p),l.child;case 10:return b=l.pendingProps,Ks(l,l.type,b.value),Bi(s,l,b.children,p),l.child;case 9:return w=l.type._context,b=l.pendingProps.children,Jo(l),w=Mi(w),b=b(w),l.flags|=1,Bi(s,l,b,p),l.child;case 14:return tw(s,l,l.type,l.pendingProps,p);case 15:return ew(s,l,l.type,l.pendingProps,p);case 19:return hw(s,l,p);case 31:return DF(s,l,p);case 22:return rw(s,l,p,l.pendingProps);case 24:return Jo(l),b=Mi(hi),s===null?(w=hy(),w===null&&(w=jr,S=ly(),w.pooledCache=S,S.refCount++,S!==null&&(w.pooledCacheLanes|=p),w=S),l.memoizedState={parent:b,cache:w},dy(l),Ks(l,hi,w)):((s.lanes&p)!==0&&(fy(s,l),Xh(l,null,null,p),Vh()),w=s.memoizedState,S=l.memoizedState,w.parent!==b?(w={parent:b,cache:b},l.memoizedState=w,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=w),Ks(l,hi,b)):(b=S.cache,Ks(l,hi,b),b!==w.cache&&oy(l,[hi],p,!0))),Bi(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 Ky(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(Iw())s.flags|=8192;else throw rl=Cf,uy}else s.flags&=-16777217}function dw(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!ES(l))if(Iw())s.flags|=8192;else throw rl=Cf,uy}function If(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?Ce():536870912,s.lanes|=l,yc|=l)}function ru(s,l){if(!ir)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 Ir(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 IF(s,l,p){var b=l.pendingProps;switch(ry(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ir(l),null;case 1:return Ir(l),null;case 3:return p=l.stateNode,b=null,s!==null&&(b=s.memoizedState.cache),l.memoizedState.cache!==b&&(l.flags|=2048),ns(hi),H(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(nc(l)?ls(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ny())),Ir(l),null;case 26:var w=l.type,S=l.memoizedState;return s===null?(ls(l),S!==null?(Ir(l),dw(l,S)):(Ir(l),Ky(l,w,null,b,p))):S?S!==s.memoizedState?(ls(l),Ir(l),dw(l,S)):(Ir(l),l.flags&=-16777217):(s=s.memoizedProps,s!==b&&ls(l),Ir(l),Ky(l,w,s,b,p)),null;case 27:if(vt(l),p=st.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 Ir(l),null}s=ct.current,nc(l)?W_(l):(s=xS(w,b,p),l.stateNode=s,ls(l))}return Ir(l),null;case 5:if(vt(l),w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==b&&ls(l);else{if(!b){if(l.stateNode===null)throw Error(n(166));return Ir(l),null}if(S=ct.current,nc(l))W_(l);else{var R=Jf(st.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[Rr]=l,S[Zr]=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(Li(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 Ir(l),Ky(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=st.current,nc(l)){if(s=l.stateNode,p=l.memoizedProps,b=null,w=Ai,w!==null)switch(w.tag){case 27:case 5:b=w.memoizedProps}s[Rr]=l,s=!!(s.nodeValue===p||b!==null&&b.suppressHydrationWarning===!0||lS(s.nodeValue,p)),s||Ys(l,!0)}else s=Jf(s).createTextNode(b),s[Rr]=l,l.stateNode=s}return Ir(l),null;case 31:if(p=l.memoizedState,s===null||s.memoizedState!==null){if(b=nc(l),p!==null){if(s===null){if(!b)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[Rr]=l}else Zo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ir(l),s=!1}else p=ny(),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 Ir(l),null;case 13:if(b=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=nc(l),b!==null&&b.dehydrated!==null){if(s===null){if(!w)throw Error(n(318));if(w=l.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[Rr]=l}else Zo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ir(l),w=!1}else w=ny(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=w),w=!0;if(!w)return l.flags&256?(An(l),l):(An(l),null)}return An(l),(l.flags&128)!==0?(l.lanes=p,l):(p=b!==null,s=s!==null&&s.memoizedState!==null,p&&(b=l.child,w=null,b.alternate!==null&&b.alternate.memoizedState!==null&&b.alternate.memoizedState.cachePool!==null&&(w=b.alternate.memoizedState.cachePool.pool),S=null,b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(S=b.memoizedState.cachePool.pool),S!==w&&(b.flags|=2048)),p!==s&&p&&(l.child.flags|=8192),If(l,l.updateQueue),Ir(l),null);case 4:return H(),s===null&&mb(l.stateNode.containerInfo),Ir(l),null;case 10:return ns(l.type),Ir(l),null;case 19:if(rt(ai),b=l.memoizedState,b===null)return Ir(l),null;if(w=(l.flags&128)!==0,S=b.rendering,S===null)if(w)ru(b,!1);else{if(ti!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=Sf(s),S!==null){for(l.flags|=128,ru(b,!1),s=S.updateQueue,l.updateQueue=s,If(l,s),l.subtreeFlags=0,s=p,p=l.child;p!==null;)z_(p,s),p=p.sibling;return ft(ai,ai.current&1|2),ir&&rs(l,b.treeForkCount),l.child}s=s.sibling}b.tail!==null&&Rt()>Uf&&(l.flags|=128,w=!0,ru(b,!1),l.lanes=4194304)}else{if(!w)if(s=Sf(S),s!==null){if(l.flags|=128,w=!0,s=s.updateQueue,l.updateQueue=s,If(l,s),ru(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!ir)return Ir(l),null}else 2*Rt()-b.renderingStartTime>Uf&&p!==536870912&&(l.flags|=128,w=!0,ru(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=Rt(),s.sibling=null,p=ai.current,ft(ai,w?p&1|2:p&1),ir&&rs(l,b.treeForkCount),s):(Ir(l),null);case 22:case 23:return An(l),yy(),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&&(Ir(l),l.subtreeFlags&6&&(l.flags|=8192)):Ir(l),p=l.updateQueue,p!==null&&If(l,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),b=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(b=l.memoizedState.cachePool.pool),b!==p&&(l.flags|=2048),s!==null&&rt(tl),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ns(hi),Ir(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function $F(s,l){switch(ry(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ns(hi),H(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return vt(l),null;case 31:if(l.memoizedState!==null){if(An(l),l.alternate===null)throw Error(n(340));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 rt(ai),null;case 4:return H(),null;case 10:return ns(l.type),null;case 22:case 23:return An(l),yy(),s!==null&&rt(tl),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return ns(hi),null;case 25:return null;default:return null}}function fw(s,l){switch(ry(l),l.tag){case 3:ns(hi),H();break;case 26:case 27:case 5:vt(l);break;case 4:H();break;case 31:l.memoizedState!==null&&An(l);break;case 13:An(l);break;case 19:rt(ai);break;case 10:ns(l.type);break;case 22:case 23:An(l),yy(),s!==null&&rt(tl);break;case 24:ns(hi)}}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(P){Tr(l,l.return,P)}}function to(s,l,p){try{var b=l.updateQueue,w=b!==null?b.lastEffect:null;if(w!==null){var S=w.next;b=S;do{if((b.tag&s)===s){var R=b.inst,P=R.destroy;if(P!==void 0){R.destroy=void 0,w=l;var Z=p,mt=P;try{mt()}catch(Et){Tr(w,Z,Et)}}}b=b.next}while(b!==S)}}catch(Et){Tr(l,l.return,Et)}}function pw(s){var l=s.updateQueue;if(l!==null){var p=s.stateNode;try{nk(l,p)}catch(b){Tr(s,s.return,b)}}}function gw(s,l,p){p.props=al(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(b){Tr(s,l,b)}}function nu(s,l){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var b=s.stateNode;break;case 30:b=s.stateNode;break;default:b=s.stateNode}typeof p=="function"?s.refCleanup=p(b):p.current=b}}catch(w){Tr(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){Tr(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){Tr(s,l,w)}else p.current=null}function mw(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){Tr(s,s.return,w)}}function Vy(s,l,p){try{var b=s.stateNode;o4(b,s.type,p,l),b[Zr]=l}catch(w){Tr(s,s.return,w)}}function yw(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&oo(s.type)||s.tag===4}function Xy(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||yw(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&oo(s.type)||s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Zy(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=Ut));else if(b!==4&&(b===27&&oo(s.type)&&(p=s.stateNode,l=null),s=s.child,s!==null))for(Zy(s,l,p),s=s.sibling;s!==null;)Zy(s,l,p),s=s.sibling}function $f(s,l,p){var b=s.tag;if(b===5||b===6)s=s.stateNode,l?p.insertBefore(s,l):p.appendChild(s);else if(b!==4&&(b===27&&oo(s.type)&&(p=s.stateNode),s=s.child,s!==null))for($f(s,l,p),s=s.sibling;s!==null;)$f(s,l,p),s=s.sibling}function bw(s){var l=s.stateNode,p=s.memoizedProps;try{for(var b=s.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);Li(l,b,p),l[Rr]=s,l[Zr]=p}catch(S){Tr(s,s.return,S)}}var cs=!1,fi=!1,Qy=!1,xw=typeof WeakSet=="function"?WeakSet:Set,wi=null;function zF(s,l){if(s=s.containerInfo,xb=sp,s=B_(s),Wm(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else t:{p=(p=s.ownerDocument)&&p.defaultView||window;var b=p.getSelection&&p.getSelection();if(b&&b.rangeCount!==0){p=b.anchorNode;var w=b.anchorOffset,S=b.focusNode;b=b.focusOffset;try{p.nodeType,S.nodeType}catch{p=null;break t}var R=0,P=-1,Z=-1,mt=0,Et=0,Mt=s,bt=null;e:for(;;){for(var _t;Mt!==p||w!==0&&Mt.nodeType!==3||(P=R+w),Mt!==S||b!==0&&Mt.nodeType!==3||(Z=R+b),Mt.nodeType===3&&(R+=Mt.nodeValue.length),(_t=Mt.firstChild)!==null;)bt=Mt,Mt=_t;for(;;){if(Mt===s)break e;if(bt===p&&++mt===w&&(P=R),bt===S&&++Et===b&&(Z=R),(_t=Mt.nextSibling)!==null)break;Mt=bt,bt=Mt.parentNode}Mt=_t}p=P===-1||Z===-1?null:{start:P,end:Z}}else p=null}p=p||{start:0,end:0}}else p=null;for(vb={focusedElem:s,selectionRange:p},sp=!1,wi=l;wi!==null;)if(l=wi,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,wi=s;else for(;wi!==null;){switch(l=wi,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 re=al(p.type,w);s=b.getSnapshotBeforeUpdate(re,S),b.__reactInternalSnapshotBeforeUpdate=s}catch(Se){Tr(p,p.return,Se)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,p=s.nodeType,p===9)kb(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":kb(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,wi=s;break}wi=l.return}}function vw(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){Tr(p,p.return,R)}else{var w=al(p.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(R){Tr(p,p.return,R)}}b&64&&pw(p),b&512&&nu(p,p.return);break;case 3:if(us(s,p),b&64&&(s=p.updateQueue,s!==null)){if(l=null,p.child!==null)switch(p.child.tag){case 27:case 5:l=p.child.stateNode;break;case 1:l=p.child.stateNode}try{nk(s,l)}catch(R){Tr(p,p.return,R)}}break;case 27:l===null&&b&4&&bw(p);case 26:case 5:us(s,p),l===null&&b&4&&mw(p),b&512&&nu(p,p.return);break;case 12:us(s,p);break;case 31:us(s,p),b&4&&kw(s,p);break;case 13:us(s,p),b&4&&ww(s,p),b&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=VF.bind(null,p),g4(s,p))));break;case 22:if(b=p.memoizedState!==null||cs,!b){l=l!==null&&l.memoizedState!==null||fi,w=cs;var S=fi;cs=b,(fi=l)&&!S?ds(s,p,(p.subtreeFlags&8772)!==0):us(s,p),cs=w,fi=S}break;case 30:break;default:us(s,p)}}function Cw(s){var l=s.alternate;l!==null&&(s.alternate=null,Cw(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 qr=null,un=!1;function hs(s,l,p){for(p=p.child;p!==null;)_w(s,l,p),p=p.sibling}function _w(s,l,p){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(Ge,p)}catch{}switch(p.tag){case 26:fi||Ma(p,l),hs(s,l,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:fi||Ma(p,l);var b=qr,w=un;oo(p.type)&&(qr=p.stateNode,un=!1),hs(s,l,p),fu(p.stateNode),qr=b,un=w;break;case 5:fi||Ma(p,l);case 6:if(b=qr,w=un,qr=null,hs(s,l,p),qr=b,un=w,qr!==null)if(un)try{(qr.nodeType===9?qr.body:qr.nodeName==="HTML"?qr.ownerDocument.body:qr).removeChild(p.stateNode)}catch(S){Tr(p,l,S)}else try{qr.removeChild(p.stateNode)}catch(S){Tr(p,l,S)}break;case 18:qr!==null&&(un?(s=qr,pS(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),Sc(s)):pS(qr,p.stateNode));break;case 4:b=qr,w=un,qr=p.stateNode.containerInfo,un=!0,hs(s,l,p),qr=b,un=w;break;case 0:case 11:case 14:case 15:to(2,p,l),fi||to(4,p,l),hs(s,l,p);break;case 1:fi||(Ma(p,l),b=p.stateNode,typeof b.componentWillUnmount=="function"&&gw(p,l,b)),hs(s,l,p);break;case 21:hs(s,l,p);break;case 22:fi=(b=fi)||p.memoizedState!==null,hs(s,l,p),fi=b;break;default:hs(s,l,p)}}function kw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Sc(s)}catch(p){Tr(l,l.return,p)}}}function ww(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Sc(s)}catch(p){Tr(l,l.return,p)}}function PF(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new xw),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new xw),l;default:throw Error(n(435,s.tag))}}function zf(s,l){var p=PF(s);l.forEach(function(b){if(!p.has(b)){p.add(b);var w=XF.bind(null,s,b);b.then(w,w)}})}function dn(s,l){var p=l.deletions;if(p!==null)for(var b=0;b<p.length;b++){var w=p[b],S=s,R=l,P=R;t:for(;P!==null;){switch(P.tag){case 27:if(oo(P.type)){qr=P.stateNode,un=!1;break t}break;case 5:qr=P.stateNode,un=!1;break t;case 3:case 4:qr=P.stateNode.containerInfo,un=!0;break t}P=P.return}if(qr===null)throw Error(n(160));_w(S,R,w),qr=null,un=!1,S=w.alternate,S!==null&&(S.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Sw(l,s),l=l.sibling}var ha=null;function Sw(s,l){var p=s.alternate,b=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:dn(l,s),fn(s),b&4&&(to(3,s,s.return),iu(3,s),to(5,s,s.return));break;case 1:dn(l,s),fn(s),b&512&&(fi||p===null||Ma(p,p.return)),b&64&&cs&&(s=s.updateQueue,s!==null&&(b=s.callbacks,b!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?b:p.concat(b))));break;case 26:var w=ha;if(dn(l,s),fn(s),b&512&&(fi||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[Rr]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=w.createElement(b),w.head.insertBefore(S,w.querySelector("head > title"))),Li(S,b,p),S[Rr]=s,yr(S),b=S;break t;case"link":var R=SS("link","href",w).get(b+(p.href||""));if(R){for(var P=0;P<R.length;P++)if(S=R[P],S.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&S.getAttribute("rel")===(p.rel==null?null:p.rel)&&S.getAttribute("title")===(p.title==null?null:p.title)&&S.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){R.splice(P,1);break e}}S=w.createElement(b),Li(S,b,p),w.head.appendChild(S);break;case"meta":if(R=SS("meta","content",w).get(b+(p.content||""))){for(P=0;P<R.length;P++)if(S=R[P],S.getAttribute("content")===(p.content==null?null:""+p.content)&&S.getAttribute("name")===(p.name==null?null:p.name)&&S.getAttribute("property")===(p.property==null?null:p.property)&&S.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&S.getAttribute("charset")===(p.charSet==null?null:p.charSet)){R.splice(P,1);break e}}S=w.createElement(b),Li(S,b,p),w.head.appendChild(S);break;default:throw Error(n(468,b))}S[Rr]=s,yr(S),b=S}s.stateNode=b}else TS(w,s.type,s.stateNode);else s.stateNode=wS(w,b,s.memoizedProps);else S!==b?(S===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):S.count--,b===null?TS(w,s.type,s.stateNode):wS(w,b,s.memoizedProps)):b===null&&s.stateNode!==null&&Vy(s,s.memoizedProps,p.memoizedProps)}break;case 27:dn(l,s),fn(s),b&512&&(fi||p===null||Ma(p,p.return)),p!==null&&b&4&&Vy(s,s.memoizedProps,p.memoizedProps);break;case 5:if(dn(l,s),fn(s),b&512&&(fi||p===null||Ma(p,p.return)),s.flags&32){w=s.stateNode;try{Yt(w,"")}catch(re){Tr(s,s.return,re)}}b&4&&s.stateNode!=null&&(w=s.memoizedProps,Vy(s,w,p!==null?p.memoizedProps:w)),b&1024&&(Qy=!0);break;case 6:if(dn(l,s),fn(s),b&4){if(s.stateNode===null)throw Error(n(162));b=s.memoizedProps,p=s.stateNode;try{p.nodeValue=b}catch(re){Tr(s,s.return,re)}}break;case 3:if(rp=null,w=ha,ha=tp(l.containerInfo),dn(l,s),ha=w,fn(s),b&4&&p!==null&&p.memoizedState.isDehydrated)try{Sc(l.containerInfo)}catch(re){Tr(s,s.return,re)}Qy&&(Qy=!1,Tw(s));break;case 4:b=ha,ha=tp(s.stateNode.containerInfo),dn(l,s),fn(s),ha=b;break;case 12:dn(l,s),fn(s);break;case 31:dn(l,s),fn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,zf(s,b)));break;case 13:dn(l,s),fn(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(qf=Rt()),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,zf(s,b)));break;case 22:w=s.memoizedState!==null;var Z=p!==null&&p.memoizedState!==null,mt=cs,Et=fi;if(cs=mt||w,fi=Et||Z,dn(l,s),fi=Et,cs=mt,fn(s),b&8192)t:for(l=s.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(p===null||Z||cs||fi||sl(s)),p=null,l=s;;){if(l.tag===5||l.tag===26){if(p===null){Z=p=l;try{if(S=Z.stateNode,w)R=S.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{P=Z.stateNode;var Mt=Z.memoizedProps.style,bt=Mt!=null&&Mt.hasOwnProperty("display")?Mt.display:null;P.style.display=bt==null||typeof bt=="boolean"?"":(""+bt).trim()}}catch(re){Tr(Z,Z.return,re)}}}else if(l.tag===6){if(p===null){Z=l;try{Z.stateNode.nodeValue=w?"":Z.memoizedProps}catch(re){Tr(Z,Z.return,re)}}}else if(l.tag===18){if(p===null){Z=l;try{var _t=Z.stateNode;w?gS(_t,!0):gS(Z.stateNode,!1)}catch(re){Tr(Z,Z.return,re)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break t;for(;l.sibling===null;){if(l.return===null||l.return===s)break t;p===l&&(p=null),l=l.return}p===l&&(p=null),l.sibling.return=l.return,l=l.sibling}b&4&&(b=s.updateQueue,b!==null&&(p=b.retryQueue,p!==null&&(b.retryQueue=null,zf(s,p))));break;case 19:dn(l,s),fn(s),b&4&&(b=s.updateQueue,b!==null&&(s.updateQueue=null,zf(s,b)));break;case 30:break;case 21:break;default:dn(l,s),fn(s)}}function fn(s){var l=s.flags;if(l&2){try{for(var p,b=s.return;b!==null;){if(yw(b)){p=b;break}b=b.return}if(p==null)throw Error(n(160));switch(p.tag){case 27:var w=p.stateNode,S=Xy(s);$f(s,S,w);break;case 5:var R=p.stateNode;p.flags&32&&(Yt(R,""),p.flags&=-33);var P=Xy(s);$f(s,P,R);break;case 3:case 4:var Z=p.stateNode.containerInfo,mt=Xy(s);Zy(s,mt,Z);break;default:throw Error(n(161))}}catch(Et){Tr(s,s.return,Et)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function Tw(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;Tw(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;)vw(s,l.alternate,l),l=l.sibling}function sl(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:to(4,l,l.return),sl(l);break;case 1:Ma(l,l.return);var p=l.stateNode;typeof p.componentWillUnmount=="function"&&gw(l,l.return,p),sl(l);break;case 27:fu(l.stateNode);case 26:case 5:Ma(l,l.return),sl(l);break;case 22:l.memoizedState===null&&sl(l);break;case 30:sl(l);break;default:sl(l)}s=s.sibling}}function ds(s,l,p){for(p=p&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var b=l.alternate,w=s,S=l,R=S.flags;switch(S.tag){case 0:case 11:case 15:ds(w,S,p),iu(4,S);break;case 1:if(ds(w,S,p),b=S,w=b.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(mt){Tr(b,b.return,mt)}if(b=S,w=b.updateQueue,w!==null){var P=b.stateNode;try{var Z=w.shared.hiddenCallbacks;if(Z!==null)for(w.shared.hiddenCallbacks=null,w=0;w<Z.length;w++)ik(Z[w],P)}catch(mt){Tr(b,b.return,mt)}}p&&R&64&&pw(S),nu(S,S.return);break;case 27:bw(S);case 26:case 5:ds(w,S,p),p&&b===null&&R&4&&mw(S),nu(S,S.return);break;case 12:ds(w,S,p);break;case 31:ds(w,S,p),p&&R&4&&kw(w,S);break;case 13:ds(w,S,p),p&&R&4&&ww(w,S);break;case 22:S.memoizedState===null&&ds(w,S,p),nu(S,S.return);break;case 30:break;default:ds(w,S,p)}l=l.sibling}}function Jy(s,l){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&Hh(p))}function tb(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Hh(s))}function ua(s,l,p,b){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Ew(s,l,p,b),l=l.sibling}function Ew(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&&Hh(s)));break;case 12:if(w&2048){ua(s,l,p,b),s=l.stateNode;try{var S=l.memoizedProps,R=S.id,P=S.onPostCommit;typeof P=="function"&&P(R,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Z){Tr(l,l.return,Z)}}else ua(s,l,p,b);break;case 31:ua(s,l,p,b);break;case 13:ua(s,l,p,b);break;case 23:break;case 22:S=l.stateNode,R=l.alternate,l.memoizedState!==null?S._visibility&2?ua(s,l,p,b):au(s,l):S._visibility&2?ua(s,l,p,b):(S._visibility|=2,pc(s,l,p,b,(l.subtreeFlags&10256)!==0||!1)),w&2048&&Jy(R,l);break;case 24:ua(s,l,p,b),w&2048&&tb(l.alternate,l);break;default:ua(s,l,p,b)}}function pc(s,l,p,b,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,R=l,P=p,Z=b,mt=R.flags;switch(R.tag){case 0:case 11:case 15:pc(S,R,P,Z,w),iu(8,R);break;case 23:break;case 22:var Et=R.stateNode;R.memoizedState!==null?Et._visibility&2?pc(S,R,P,Z,w):au(S,R):(Et._visibility|=2,pc(S,R,P,Z,w)),w&&mt&2048&&Jy(R.alternate,R);break;case 24:pc(S,R,P,Z,w),w&&mt&2048&&tb(R.alternate,R);break;default:pc(S,R,P,Z,w)}l=l.sibling}}function au(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var p=s,b=l,w=b.flags;switch(b.tag){case 22:au(p,b),w&2048&&Jy(b.alternate,b);break;case 24:au(p,b),w&2048&&tb(b.alternate,b);break;default:au(p,b)}l=l.sibling}}var su=8192;function gc(s,l,p){if(s.subtreeFlags&su)for(s=s.child;s!==null;)Nw(s,l,p),s=s.sibling}function Nw(s,l,p){switch(s.tag){case 26:gc(s,l,p),s.flags&su&&s.memoizedState!==null&&E4(p,ha,s.memoizedState,s.memoizedProps);break;case 5:gc(s,l,p);break;case 3:case 4:var b=ha;ha=tp(s.stateNode.containerInfo),gc(s,l,p),ha=b;break;case 22:s.memoizedState===null&&(b=s.alternate,b!==null&&b.memoizedState!==null?(b=su,su=16777216,gc(s,l,p),su=b):gc(s,l,p));break;default:gc(s,l,p)}}function Aw(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function ou(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var p=0;p<l.length;p++){var b=l[p];wi=b,Bw(b,s)}Aw(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Mw(s),s=s.sibling}function Mw(s){switch(s.tag){case 0:case 11:case 15:ou(s),s.flags&2048&&to(9,s,s.return);break;case 3:ou(s);break;case 12:ou(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Pf(s)):ou(s);break;default:ou(s)}}function Pf(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var p=0;p<l.length;p++){var b=l[p];wi=b,Bw(b,s)}Aw(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:to(8,l,l.return),Pf(l);break;case 22:p=l.stateNode,p._visibility&2&&(p._visibility&=-3,Pf(l));break;default:Pf(l)}s=s.sibling}}function Bw(s,l){for(;wi!==null;){var p=wi;switch(p.tag){case 0:case 11:case 15:to(8,p,l);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var b=p.memoizedState.cachePool.pool;b!=null&&b.refCount++}break;case 24:Hh(p.memoizedState.cache)}if(b=p.child,b!==null)b.return=p,wi=b;else t:for(p=s;wi!==null;){b=wi;var w=b.sibling,S=b.return;if(Cw(b),b===p){wi=null;break t}if(w!==null){w.return=S,wi=w;break t}wi=S}}}var qF={getCacheForType:function(s){var l=Mi(hi),p=l.data.get(s);return p===void 0&&(p=s(),l.data.set(s,p)),p},cacheSignal:function(){return Mi(hi).controller.signal}},UF=typeof WeakMap=="function"?WeakMap:Map,pr=0,jr=null,Ve=null,tr=0,Sr=0,Mn=null,eo=!1,mc=!1,eb=!1,fs=0,ti=0,ro=0,ol=0,rb=0,Bn=0,yc=0,lu=null,pn=null,ib=!1,qf=0,Lw=0,Uf=1/0,Hf=null,io=null,bi=0,no=null,bc=null,ps=0,nb=0,ab=null,Ow=null,cu=0,sb=null;function Ln(){return(pr&2)!==0&&tr!==0?tr&-tr:D.T!==null?db():Yi()}function Rw(){if(Bn===0)if((tr&536870912)===0||ir){var s=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),Bn=s}else Bn=536870912;return s=Nn.current,s!==null&&(s.flags|=32),Bn}function gn(s,l,p){(s===jr&&(Sr===2||Sr===9)||s.cancelPendingCommit!==null)&&(xc(s,0),ao(s,tr,Bn,!1)),we(s,p),((pr&2)===0||s!==jr)&&(s===jr&&((pr&2)===0&&(ol|=p),ti===4&&ao(s,tr,Bn,!1)),Ba(s))}function jw(s,l,p){if((pr&6)!==0)throw Error(n(327));var b=!p&&(l&127)===0&&(l&s.expiredLanes)===0||Tt(s,l),w=b?GF(s,l):lb(s,l,!0),S=b;do{if(w===0){mc&&!b&&ao(s,l,0,!1);break}else{if(p=s.current.alternate,S&&!HF(p)){w=lb(s,l,!1),S=!1;continue}if(w===2){if(S=l,s.errorRecoveryDisabledLanes&S)var R=0;else R=s.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){l=R;t:{var P=s;w=lu;var Z=P.current.memoizedState.isDehydrated;if(Z&&(xc(P,R).flags|=256),R=lb(P,R,!1),R!==2){if(eb&&!Z){P.errorRecoveryDisabledLanes|=S,ol|=S,w=4;break t}S=pn,pn=w,S!==null&&(pn===null?pn=S:pn.push.apply(pn,S))}w=R}if(S=!1,w!==2)continue}}if(w===1){xc(s,0),ao(s,l,0,!0);break}t:{switch(b=s,S=w,S){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:ao(b,l,Bn,!eo);break t;case 2:pn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(w=qf+300-Rt(),10<w)){if(ao(b,l,Bn,!eo),Q(b,0,!0)!==0)break t;ps=l,b.timeoutHandle=dS(Dw.bind(null,b,p,pn,Hf,ib,l,Bn,ol,yc,eo,S,"Throttled",-0,0),w);break t}Dw(b,p,pn,Hf,ib,l,Bn,ol,yc,eo,S,null,-0,0)}}break}while(!0);Ba(s)}function Dw(s,l,p,b,w,S,R,P,Z,mt,Et,Mt,bt,_t){if(s.timeoutHandle=-1,Mt=l.subtreeFlags,Mt&8192||(Mt&16785408)===16785408){Mt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ut},Nw(l,S,Mt);var re=(S&62914560)===S?qf-Rt():(S&4194048)===S?Lw-Rt():0;if(re=N4(Mt,re),re!==null){ps=S,s.cancelPendingCommit=re(Hw.bind(null,s,l,S,p,b,w,R,P,Z,Et,Mt,null,bt,_t)),ao(s,S,R,!mt);return}}Hw(s,l,S,p,b,w,R,P,Z)}function HF(s){for(var l=s;;){var p=l.tag;if((p===0||p===11||p===15)&&l.flags&16384&&(p=l.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var b=0;b<p.length;b++){var w=p[b],S=w.getSnapshot;w=w.value;try{if(!Tn(S(),w))return!1}catch{return!1}}if(p=l.child,l.subtreeFlags&16384&&p!==null)p.return=l,l=p;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ao(s,l,p,b){l&=~rb,l&=~ol,s.suspendedLanes|=l,s.pingedLanes&=~l,b&&(s.warmLanes|=l),b=s.expirationTimes;for(var w=l;0<w;){var S=31-me(w),R=1<<S;b[S]=-1,w&=~R}p!==0&&Kt(s,p,l)}function Wf(){return(pr&6)===0?(hu(0),!1):!0}function ob(){if(Ve!==null){if(Sr===0)var s=Ve.return;else s=Ve,is=Qo=null,ky(s),cc=null,Gh=0,s=Ve;for(;s!==null;)fw(s.alternate,s),s=s.return;Ve=null}}function xc(s,l){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,h4(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),ps=0,ob(),jr=s,Ve=p=es(s.current,null),tr=l,Sr=0,Mn=null,eo=!1,mc=Tt(s,l),eb=!1,yc=Bn=rb=ol=ro=ti=0,pn=lu=null,ib=!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-me(b),S=1<<w;l|=s[w],b&=~S}return fs=l,df(),p}function Fw(s,l){ze=null,D.H=tu,l===lc||l===vf?(l=J_(),Sr=3):l===uy?(l=J_(),Sr=4):Sr=l===$y?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Mn=l,Ve===null&&(ti=1,Rf(s,Wn(l,s.current)))}function Iw(){var s=Nn.current;return s===null?!0:(tr&4194048)===tr?Vn===null:(tr&62914560)===tr||(tr&536870912)!==0?s===Vn:!1}function $w(){var s=D.H;return D.H=tu,s===null?tu:s}function zw(){var s=D.A;return D.A=qF,s}function Gf(){ti=4,eo||(tr&4194048)!==tr&&Nn.current!==null||(mc=!0),(ro&134217727)===0&&(ol&134217727)===0||jr===null||ao(jr,tr,Bn,!1)}function lb(s,l,p){var b=pr;pr|=2;var w=$w(),S=zw();(jr!==s||tr!==l)&&(Hf=null,xc(s,l)),l=!1;var R=ti;t:do try{if(Sr!==0&&Ve!==null){var P=Ve,Z=Mn;switch(Sr){case 8:ob(),R=6;break t;case 3:case 2:case 9:case 6:Nn.current===null&&(l=!0);var mt=Sr;if(Sr=0,Mn=null,vc(s,P,Z,mt),p&&mc){R=0;break t}break;default:mt=Sr,Sr=0,Mn=null,vc(s,P,Z,mt)}}WF(),R=ti;break}catch(Et){Fw(s,Et)}while(!0);return l&&s.shellSuspendCounter++,is=Qo=null,pr=b,D.H=w,D.A=S,Ve===null&&(jr=null,tr=0,df()),R}function WF(){for(;Ve!==null;)Pw(Ve)}function GF(s,l){var p=pr;pr|=2;var b=$w(),w=zw();jr!==s||tr!==l?(Hf=null,Uf=Rt()+500,xc(s,l)):mc=Tt(s,l);t:do try{if(Sr!==0&&Ve!==null){l=Ve;var S=Mn;e:switch(Sr){case 1:Sr=0,Mn=null,vc(s,l,S,1);break;case 2:case 9:if(Z_(S)){Sr=0,Mn=null,qw(l);break}l=function(){Sr!==2&&Sr!==9||jr!==s||(Sr=7),Ba(s)},S.then(l,l);break t;case 3:Sr=7;break t;case 4:Sr=5;break t;case 7:Z_(S)?(Sr=0,Mn=null,qw(l)):(Sr=0,Mn=null,vc(s,l,S,7));break;case 5:var R=null;switch(Ve.tag){case 26:R=Ve.memoizedState;case 5:case 27:var P=Ve;if(R?ES(R):P.stateNode.complete){Sr=0,Mn=null;var Z=P.sibling;if(Z!==null)Ve=Z;else{var mt=P.return;mt!==null?(Ve=mt,Yf(mt)):Ve=null}break e}}Sr=0,Mn=null,vc(s,l,S,5);break;case 6:Sr=0,Mn=null,vc(s,l,S,6);break;case 8:ob(),ti=6;break t;default:throw Error(n(462))}}YF();break}catch(Et){Fw(s,Et)}while(!0);return is=Qo=null,D.H=b,D.A=w,pr=p,Ve!==null?0:(jr=null,tr=0,df(),ti)}function YF(){for(;Ve!==null&&!$t();)Pw(Ve)}function Pw(s){var l=uw(s.alternate,s,fs);s.memoizedProps=s.pendingProps,l===null?Yf(s):Ve=l}function qw(s){var l=s,p=l.alternate;switch(l.tag){case 15:case 0:l=aw(p,l,l.pendingProps,l.type,void 0,tr);break;case 11:l=aw(p,l,l.pendingProps,l.type.render,l.ref,tr);break;case 5:ky(l);default:fw(p,l),l=Ve=z_(l,fs),l=uw(p,l,fs)}s.memoizedProps=s.pendingProps,l===null?Yf(s):Ve=l}function vc(s,l,p,b){is=Qo=null,ky(l),cc=null,Gh=0;var w=l.return;try{if(jF(s,w,l,p,tr)){ti=1,Rf(s,Wn(p,s.current)),Ve=null;return}}catch(S){if(w!==null)throw Ve=w,S;ti=1,Rf(s,Wn(p,s.current)),Ve=null;return}l.flags&32768?(ir||b===1?s=!0:mc||(tr&536870912)!==0?s=!1:(eo=s=!0,(b===2||b===9||b===3||b===6)&&(b=Nn.current,b!==null&&b.tag===13&&(b.flags|=16384))),Uw(l,s)):Yf(l)}function Yf(s){var l=s;do{if((l.flags&32768)!==0){Uw(l,eo);return}s=l.return;var p=IF(l.alternate,l,fs);if(p!==null){Ve=p;return}if(l=l.sibling,l!==null){Ve=l;return}Ve=l=s}while(l!==null);ti===0&&(ti=5)}function Uw(s,l){do{var p=$F(s.alternate,s);if(p!==null){p.flags&=32767,Ve=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!l&&(s=s.sibling,s!==null)){Ve=s;return}Ve=s=p}while(s!==null);ti=6,Ve=null}function Hw(s,l,p,b,w,S,R,P,Z){s.cancelPendingCommit=null;do Kf();while(bi!==0);if((pr&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Xm,Qt(s,p,S,R,P,Z),s===jr&&(Ve=jr=null,tr=0),bc=l,no=s,ps=p,nb=S,ab=w,Ow=b,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,ZF(xe,function(){return Vw(),null})):(s.callbackNode=null,s.callbackPriority=0),b=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||b){b=D.T,D.T=null,w=W.p,W.p=2,R=pr,pr|=4;try{zF(s,l,p)}finally{pr=R,W.p=w,D.T=b}}bi=1,Ww(),Gw(),Yw()}}function Ww(){if(bi===1){bi=0;var s=no,l=bc,p=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||p){p=D.T,D.T=null;var b=W.p;W.p=2;var w=pr;pr|=4;try{Sw(l,s);var S=vb,R=B_(s.containerInfo),P=S.focusedElem,Z=S.selectionRange;if(R!==P&&P&&P.ownerDocument&&M_(P.ownerDocument.documentElement,P)){if(Z!==null&&Wm(P)){var mt=Z.start,Et=Z.end;if(Et===void 0&&(Et=mt),"selectionStart"in P)P.selectionStart=mt,P.selectionEnd=Math.min(Et,P.value.length);else{var Mt=P.ownerDocument||document,bt=Mt&&Mt.defaultView||window;if(bt.getSelection){var _t=bt.getSelection(),re=P.textContent.length,Se=Math.min(Z.start,re),Br=Z.end===void 0?Se:Math.min(Z.end,re);!_t.extend&&Se>Br&&(R=Br,Br=Se,Se=R);var dt=A_(P,Se),at=A_(P,Br);if(dt&&at&&(_t.rangeCount!==1||_t.anchorNode!==dt.node||_t.anchorOffset!==dt.offset||_t.focusNode!==at.node||_t.focusOffset!==at.offset)){var gt=Mt.createRange();gt.setStart(dt.node,dt.offset),_t.removeAllRanges(),Se>Br?(_t.addRange(gt),_t.extend(at.node,at.offset)):(gt.setEnd(at.node,at.offset),_t.addRange(gt))}}}}for(Mt=[],_t=P;_t=_t.parentNode;)_t.nodeType===1&&Mt.push({element:_t,left:_t.scrollLeft,top:_t.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Mt.length;P++){var Nt=Mt[P];Nt.element.scrollLeft=Nt.left,Nt.element.scrollTop=Nt.top}}sp=!!xb,vb=xb=null}finally{pr=w,W.p=b,D.T=p}}s.current=l,bi=2}}function Gw(){if(bi===2){bi=0;var s=no,l=bc,p=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||p){p=D.T,D.T=null;var b=W.p;W.p=2;var w=pr;pr|=4;try{vw(s,l.alternate,l)}finally{pr=w,W.p=b,D.T=p}}bi=3}}function Yw(){if(bi===4||bi===3){bi=0,Wt();var s=no,l=bc,p=ps,b=Ow;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?bi=5:(bi=0,bc=no=null,Kw(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(io=null),ln(p),l=l.stateNode,Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(Ge,l,void 0,(l.current.flags&128)===128)}catch{}if(b!==null){l=D.T,w=W.p,W.p=2,D.T=null;try{for(var S=s.onRecoverableError,R=0;R<b.length;R++){var P=b[R];S(P.value,{componentStack:P.stack})}}finally{D.T=l,W.p=w}}(ps&3)!==0&&Kf(),Ba(s),w=s.pendingLanes,(p&261930)!==0&&(w&42)!==0?s===sb?cu++:(cu=0,sb=s):cu=0,hu(0)}}function Kw(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Hh(l)))}function Kf(){return Ww(),Gw(),Yw(),Vw()}function Vw(){if(bi!==5)return!1;var s=no,l=nb;nb=0;var p=ln(ps),b=D.T,w=W.p;try{W.p=32>p?32:p,D.T=null,p=ab,ab=null;var S=no,R=ps;if(bi=0,bc=no=null,ps=0,(pr&6)!==0)throw Error(n(331));var P=pr;if(pr|=4,Mw(S.current),Ew(S,S.current,R,p),pr=P,hu(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(Ge,S)}catch{}return!0}finally{W.p=w,D.T=b,Kw(s,l)}}function Xw(s,l,p){l=Wn(p,l),l=Iy(s.stateNode,l,2),s=Zs(s,l,2),s!==null&&(we(s,2),Ba(s))}function Tr(s,l,p){if(s.tag===3)Xw(s,s,p);else for(;l!==null;){if(l.tag===3){Xw(l,s,p);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(io===null||!io.has(b))){s=Wn(p,s),p=Zk(2),b=Zs(l,p,2),b!==null&&(Qk(p,b,l,s),we(b,2),Ba(b));break}}l=l.return}}function cb(s,l,p){var b=s.pingCache;if(b===null){b=s.pingCache=new UF;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)||(eb=!0,w.add(p),s=KF.bind(null,s,l,p),l.then(s,s))}function KF(s,l,p){var b=s.pingCache;b!==null&&b.delete(l),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,jr===s&&(tr&p)===p&&(ti===4||ti===3&&(tr&62914560)===tr&&300>Rt()-qf?(pr&2)===0&&xc(s,0):rb|=p,yc===tr&&(yc=0)),Ba(s)}function Zw(s,l){l===0&&(l=Ce()),s=Vo(s,l),s!==null&&(we(s,l),Ba(s))}function VF(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),Zw(s,p)}function XF(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),Zw(s,p)}function ZF(s,l){return ot(s,l)}var Vf=null,Cc=null,hb=!1,Xf=!1,ub=!1,so=0;function Ba(s){s!==Cc&&s.next===null&&(Cc===null?Vf=Cc=s:Cc=Cc.next=s),Xf=!0,hb||(hb=!0,JF())}function hu(s,l){if(!ub&&Xf){ub=!0;do for(var p=!1,b=Vf;b!==null;){if(s!==0){var w=b.pendingLanes;if(w===0)var S=0;else{var R=b.suspendedLanes,P=b.pingedLanes;S=(1<<31-me(42|s)+1)-1,S&=w&~(R&~P),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(p=!0,eS(b,S))}else S=tr,S=Q(b,b===jr?S:0,b.cancelPendingCommit!==null||b.timeoutHandle!==-1),(S&3)===0||Tt(b,S)||(p=!0,eS(b,S));b=b.next}while(p);ub=!1}}function QF(){Qw()}function Qw(){Xf=hb=!1;var s=0;so!==0&&c4()&&(s=so);for(var l=Rt(),p=null,b=Vf;b!==null;){var w=b.next,S=Jw(b,l);S===0?(b.next=null,p===null?Vf=w:p.next=w,w===null&&(Cc=p)):(p=b,(s!==0||(S&3)!==0)&&(Xf=!0)),b=w}bi!==0&&bi!==5||hu(s),so!==0&&(so=0)}function Jw(s,l){for(var p=s.suspendedLanes,b=s.pingedLanes,w=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var R=31-me(S),P=1<<R,Z=w[R];Z===-1?((P&p)===0||(P&b)!==0)&&(w[R]=Pt(P,l)):Z<=l&&(s.expiredLanes|=P),S&=~P}if(l=jr,p=tr,p=Q(s,s===l?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b=s.callbackNode,p===0||s===l&&(Sr===2||Sr===9)||s.cancelPendingCommit!==null)return b!==null&&b!==null&&Lt(b),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||Tt(s,p)){if(l=p&-p,l===s.callbackPriority)return l;switch(b!==null&&Lt(b),ln(p)){case 2:case 8:p=Re;break;case 32:p=xe;break;case 268435456:p=Me;break;default:p=xe}return b=tS.bind(null,s),p=ot(p,b),s.callbackPriority=l,s.callbackNode=p,l}return b!==null&&b!==null&&Lt(b),s.callbackPriority=2,s.callbackNode=null,2}function tS(s,l){if(bi!==0&&bi!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(Kf()&&s.callbackNode!==p)return null;var b=tr;return b=Q(s,s===jr?b:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),b===0?null:(jw(s,b,l),Jw(s,Rt()),s.callbackNode!=null&&s.callbackNode===p?tS.bind(null,s):null)}function eS(s,l){if(Kf())return null;jw(s,l,!0)}function JF(){u4(function(){(pr&6)!==0?ot(Ft,QF):Qw()})}function db(){if(so===0){var s=sc;s===0&&(s=ve,ve<<=1,(ve&261888)===0&&(ve=256)),so=s}return so}function rS(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Us(""+s)}function iS(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 t4(s,l,p,b,w){if(l==="submit"&&p&&p.stateNode===w){var S=rS((w[Zr]||null).action),R=b.submitter;R&&(l=(l=R[Zr]||null)?rS(l.formAction):R.getAttribute("formAction"),l!==null&&(S=l,R=null));var P=new lf("action","action",null,b,w);s.push({event:P,listeners:[{instance:null,listener:function(){if(b.defaultPrevented){if(so!==0){var Z=R?iS(w,R):new FormData(w);Ly(p,{pending:!0,data:Z,method:w.method,action:S},null,Z)}}else typeof S=="function"&&(P.preventDefault(),Z=R?iS(w,R):new FormData(w),Ly(p,{pending:!0,data:Z,method:w.method,action:S},S,Z))},currentTarget:w}]})}}for(var fb=0;fb<Vm.length;fb++){var pb=Vm[fb],e4=pb.toLowerCase(),r4=pb[0].toUpperCase()+pb.slice(1);ca(e4,"on"+r4)}ca(R_,"onAnimationEnd"),ca(j_,"onAnimationIteration"),ca(D_,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(bF,"onTransitionRun"),ca(xF,"onTransitionStart"),ca(vF,"onTransitionCancel"),ca(F_,"onTransitionEnd"),pt("onMouseEnter",["mouseout","mouseover"]),pt("onMouseLeave",["mouseout","mouseover"]),pt("onPointerEnter",["pointerout","pointerover"]),pt("onPointerLeave",["pointerout","pointerover"]),St("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),St("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),St("onBeforeInput",["compositionend","keypress","textInput","paste"]),St("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),i4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(uu));function nS(s,l){l=(l&4)!==0;for(var p=0;p<s.length;p++){var b=s[p],w=b.event;b=b.listeners;t:{var S=void 0;if(l)for(var R=b.length-1;0<=R;R--){var P=b[R],Z=P.instance,mt=P.currentTarget;if(P=P.listener,Z!==S&&w.isPropagationStopped())break t;S=P,w.currentTarget=mt;try{S(w)}catch(Et){uf(Et)}w.currentTarget=null,S=Z}else for(R=0;R<b.length;R++){if(P=b[R],Z=P.instance,mt=P.currentTarget,P=P.listener,Z!==S&&w.isPropagationStopped())break t;S=P,w.currentTarget=mt;try{S(w)}catch(Et){uf(Et)}w.currentTarget=null,S=Z}}}}function Xe(s,l){var p=l[In];p===void 0&&(p=l[In]=new Set);var b=s+"__bubble";p.has(b)||(aS(l,s,2,!1),p.add(b))}function gb(s,l,p){var b=0;l&&(b|=4),aS(p,s,b,l)}var Zf="_reactListening"+Math.random().toString(36).slice(2);function mb(s){if(!s[Zf]){s[Zf]=!0,te.forEach(function(p){p!=="selectionchange"&&(i4.has(p)||gb(p,!1,s),gb(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Zf]||(l[Zf]=!0,gb("selectionchange",!1,l))}}function aS(s,l,p,b){switch(RS(l)){case 2:var w=B4;break;case 8:w=L4;break;default:w=Bb}p=w.bind(null,l,p,s),w=void 0,!Dm||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 yb(s,l,p,b,w){var S=b;if((l&1)===0&&(l&2)===0&&b!==null)t:for(;;){if(b===null)return;var R=b.tag;if(R===3||R===4){var P=b.stateNode.containerInfo;if(P===w)break;if(R===4)for(R=b.return;R!==null;){var Z=R.tag;if((Z===3||Z===4)&&R.stateNode.containerInfo===w)return;R=R.return}for(;P!==null;){if(R=mi(P),R===null)return;if(Z=R.tag,Z===5||Z===6||Z===26||Z===27){b=S=R;continue t}P=P.parentNode}}b=b.return}nf(function(){var mt=S,Et=Ie(p),Mt=[];t:{var bt=I_.get(s);if(bt!==void 0){var _t=lf,re=s;switch(s){case"keypress":if(sf(p)===0)break t;case"keydown":case"keyup":_t=XD;break;case"focusin":re="focus",_t=zm;break;case"focusout":re="blur",_t=zm;break;case"beforeblur":case"afterblur":_t=zm;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":_t=f_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_t=ID;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_t=JD;break;case R_:case j_:case D_:_t=PD;break;case F_:_t=eF;break;case"scroll":case"scrollend":_t=DD;break;case"wheel":_t=iF;break;case"copy":case"cut":case"paste":_t=UD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_t=g_;break;case"toggle":case"beforetoggle":_t=aF}var Se=(l&4)!==0,Br=!Se&&(s==="scroll"||s==="scrollend"),dt=Se?bt!==null?bt+"Capture":null:bt;Se=[];for(var at=mt,gt;at!==null;){var Nt=at;if(gt=Nt.stateNode,Nt=Nt.tag,Nt!==5&&Nt!==26&&Nt!==27||gt===null||dt===null||(Nt=Oh(at,dt),Nt!=null&&Se.push(du(at,Nt,gt))),Br)break;at=at.return}0<Se.length&&(bt=new _t(bt,re,null,p,Et),Mt.push({event:bt,listeners:Se}))}}if((l&7)===0){t:{if(bt=s==="mouseover"||s==="pointerover",_t=s==="mouseout"||s==="pointerout",bt&&p!==le&&(re=p.relatedTarget||p.fromElement)&&(mi(re)||re[kn]))break t;if((_t||bt)&&(bt=Et.window===Et?Et:(bt=Et.ownerDocument)?bt.defaultView||bt.parentWindow:window,_t?(re=p.relatedTarget||p.toElement,_t=mt,re=re?mi(re):null,re!==null&&(Br=o(re),Se=re.tag,re!==Br||Se!==5&&Se!==27&&Se!==6)&&(re=null)):(_t=null,re=mt),_t!==re)){if(Se=f_,Nt="onMouseLeave",dt="onMouseEnter",at="mouse",(s==="pointerout"||s==="pointerover")&&(Se=g_,Nt="onPointerLeave",dt="onPointerEnter",at="pointer"),Br=_t==null?bt:cn(_t),gt=re==null?bt:cn(re),bt=new Se(Nt,at+"leave",_t,p,Et),bt.target=Br,bt.relatedTarget=gt,Nt=null,mi(Et)===mt&&(Se=new Se(dt,at+"enter",re,p,Et),Se.target=gt,Se.relatedTarget=Br,Nt=Se),Br=Nt,_t&&re)e:{for(Se=n4,dt=_t,at=re,gt=0,Nt=dt;Nt;Nt=Se(Nt))gt++;Nt=0;for(var be=at;be;be=Se(be))Nt++;for(;0<gt-Nt;)dt=Se(dt),gt--;for(;0<Nt-gt;)at=Se(at),Nt--;for(;gt--;){if(dt===at||at!==null&&dt===at.alternate){Se=dt;break e}dt=Se(dt),at=Se(at)}Se=null}else Se=null;_t!==null&&sS(Mt,bt,_t,Se,!1),re!==null&&Br!==null&&sS(Mt,Br,re,Se,!0)}}t:{if(bt=mt?cn(mt):window,_t=bt.nodeName&&bt.nodeName.toLowerCase(),_t==="select"||_t==="input"&&bt.type==="file")var cr=k_;else if(C_(bt))if(w_)cr=gF;else{cr=fF;var ce=dF}else _t=bt.nodeName,!_t||_t.toLowerCase()!=="input"||bt.type!=="checkbox"&&bt.type!=="radio"?mt&&Fi(mt.elementType)&&(cr=k_):cr=pF;if(cr&&(cr=cr(s,mt))){__(Mt,cr,p,Et);break t}ce&&ce(s,bt,mt),s==="focusout"&&mt&&bt.type==="number"&&mt.memoizedProps.value!=null&&jt(bt,"number",bt.value)}switch(ce=mt?cn(mt):window,s){case"focusin":(C_(ce)||ce.contentEditable==="true")&&(Ql=ce,Gm=mt,Ph=null);break;case"focusout":Ph=Gm=Ql=null;break;case"mousedown":Ym=!0;break;case"contextmenu":case"mouseup":case"dragend":Ym=!1,L_(Mt,p,Et);break;case"selectionchange":if(yF)break;case"keydown":case"keyup":L_(Mt,p,Et)}var qe;if(qm)t:{switch(s){case"compositionstart":var er="onCompositionStart";break t;case"compositionend":er="onCompositionEnd";break t;case"compositionupdate":er="onCompositionUpdate";break t}er=void 0}else Zl?x_(s,p)&&(er="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(er="onCompositionStart");er&&(m_&&p.locale!=="ko"&&(Zl||er!=="onCompositionStart"?er==="onCompositionEnd"&&Zl&&(qe=u_()):(Hs=Et,Fm="value"in Hs?Hs.value:Hs.textContent,Zl=!0)),ce=Qf(mt,er),0<ce.length&&(er=new p_(er,s,null,p,Et),Mt.push({event:er,listeners:ce}),qe?er.data=qe:(qe=v_(p),qe!==null&&(er.data=qe)))),(qe=oF?lF(s,p):cF(s,p))&&(er=Qf(mt,"onBeforeInput"),0<er.length&&(ce=new p_("onBeforeInput","beforeinput",null,p,Et),Mt.push({event:ce,listeners:er}),ce.data=qe)),t4(Mt,s,mt,p,Et)}nS(Mt,l)})}function du(s,l,p){return{instance:s,listener:l,currentTarget:p}}function Qf(s,l){for(var p=l+"Capture",b=[];s!==null;){var w=s,S=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||S===null||(w=Oh(s,p),w!=null&&b.unshift(du(s,w,S)),w=Oh(s,l),w!=null&&b.push(du(s,w,S))),s.tag===3)return b;s=s.return}return[]}function n4(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function sS(s,l,p,b,w){for(var S=l._reactName,R=[];p!==null&&p!==b;){var P=p,Z=P.alternate,mt=P.stateNode;if(P=P.tag,Z!==null&&Z===b)break;P!==5&&P!==26&&P!==27||mt===null||(Z=mt,w?(mt=Oh(p,S),mt!=null&&R.unshift(du(p,mt,Z))):w||(mt=Oh(p,S),mt!=null&&R.push(du(p,mt,Z)))),p=p.return}R.length!==0&&s.push({event:l,listeners:R})}var a4=/\r\n?/g,s4=/\u0000|\uFFFD/g;function oS(s){return(typeof s=="string"?s:""+s).replace(a4,`
|
|
50
|
+
`).replace(s4,"")}function lS(s,l){return l=oS(l),oS(s)===l}function Mr(s,l,p,b,w,S){switch(p){case"children":typeof b=="string"?l==="body"||l==="textarea"&&b===""||Yt(s,b):(typeof b=="number"||typeof b=="bigint")&&l!=="body"&&Yt(s,""+b);break;case"className":rr(s,"class",b);break;case"tabIndex":rr(s,"tabindex",b);break;case"dir":case"role":case"viewBox":case"width":case"height":rr(s,p,b);break;case"style":Qe(s,b,S);break;case"data":if(l!=="object"){rr(s,"data",b);break}case"src":case"href":if(b===""&&(l!=="a"||p!=="href")){s.removeAttribute(p);break}if(b==null||typeof b=="function"||typeof b=="symbol"||typeof b=="boolean"){s.removeAttribute(p);break}b=Us(""+b),s.setAttribute(p,b);break;case"action":case"formAction":if(typeof b=="function"){s.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(p==="formAction"?(l!=="input"&&Mr(s,l,"name",w.name,w,null),Mr(s,l,"formEncType",w.formEncType,w,null),Mr(s,l,"formMethod",w.formMethod,w,null),Mr(s,l,"formTarget",w.formTarget,w,null)):(Mr(s,l,"encType",w.encType,w,null),Mr(s,l,"method",w.method,w,null),Mr(s,l,"target",w.target,w,null)));if(b==null||typeof b=="symbol"||typeof b=="boolean"){s.removeAttribute(p);break}b=Us(""+b),s.setAttribute(p,b);break;case"onClick":b!=null&&(s.onclick=Ut);break;case"onScroll":b!=null&&Xe("scroll",s);break;case"onScrollEnd":b!=null&&Xe("scrollend",s);break;case"dangerouslySetInnerHTML":if(b!=null){if(typeof b!="object"||!("__html"in b))throw Error(n(61));if(p=b.__html,p!=null){if(w.children!=null)throw Error(n(60));s.innerHTML=p}}break;case"multiple":s.multiple=b&&typeof b!="function"&&typeof b!="symbol";break;case"muted":s.muted=b&&typeof b!="function"&&typeof b!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(b==null||typeof b=="function"||typeof b=="boolean"||typeof b=="symbol"){s.removeAttribute("xlink:href");break}p=Us(""+b),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":b!=null&&typeof b!="function"&&typeof b!="symbol"?s.setAttribute(p,""+b):s.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":b&&typeof b!="function"&&typeof b!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":b===!0?s.setAttribute(p,""):b!==!1&&b!=null&&typeof b!="function"&&typeof b!="symbol"?s.setAttribute(p,b):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":b!=null&&typeof b!="function"&&typeof b!="symbol"&&!isNaN(b)&&1<=b?s.setAttribute(p,b):s.removeAttribute(p);break;case"rowSpan":case"start":b==null||typeof b=="function"||typeof b=="symbol"||isNaN(b)?s.removeAttribute(p):s.setAttribute(p,b);break;case"popover":Xe("beforetoggle",s),Xe("toggle",s),br(s,"popover",b);break;case"xlinkActuate":Yr(s,"http://www.w3.org/1999/xlink","xlink:actuate",b);break;case"xlinkArcrole":Yr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",b);break;case"xlinkRole":Yr(s,"http://www.w3.org/1999/xlink","xlink:role",b);break;case"xlinkShow":Yr(s,"http://www.w3.org/1999/xlink","xlink:show",b);break;case"xlinkTitle":Yr(s,"http://www.w3.org/1999/xlink","xlink:title",b);break;case"xlinkType":Yr(s,"http://www.w3.org/1999/xlink","xlink:type",b);break;case"xmlBase":Yr(s,"http://www.w3.org/XML/1998/namespace","xml:base",b);break;case"xmlLang":Yr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",b);break;case"xmlSpace":Yr(s,"http://www.w3.org/XML/1998/namespace","xml:space",b);break;case"is":br(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,br(s,p,b))}}function bb(s,l,p,b,w,S){switch(p){case"style":Qe(s,b,S);break;case"dangerouslySetInnerHTML":if(b!=null){if(typeof b!="object"||!("__html"in b))throw Error(n(61));if(p=b.__html,p!=null){if(w.children!=null)throw Error(n(60));s.innerHTML=p}}break;case"children":typeof b=="string"?Yt(s,b):(typeof b=="number"||typeof b=="bigint")&&Yt(s,""+b);break;case"onScroll":b!=null&&Xe("scroll",s);break;case"onScrollEnd":b!=null&&Xe("scrollend",s);break;case"onClick":b!=null&&(s.onclick=Ut);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X.hasOwnProperty(p))t:{if(p[0]==="o"&&p[1]==="n"&&(w=p.endsWith("Capture"),l=p.slice(2,w?p.length-7:void 0),S=s[Zr]||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,""):br(s,p,b)}}}function Li(s,l,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",s),Xe("load",s);var b=!1,w=!1,S;for(S in p)if(p.hasOwnProperty(S)){var R=p[S];if(R!=null)switch(S){case"src":b=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:Mr(s,l,S,R,p,null)}}w&&Mr(s,l,"srcSet",p.srcSet,p,null),b&&Mr(s,l,"src",p.src,p,null);return;case"input":Xe("invalid",s);var P=S=R=w=null,Z=null,mt=null;for(b in p)if(p.hasOwnProperty(b)){var Et=p[b];if(Et!=null)switch(b){case"name":w=Et;break;case"type":R=Et;break;case"checked":Z=Et;break;case"defaultChecked":mt=Et;break;case"value":S=Et;break;case"defaultValue":P=Et;break;case"children":case"dangerouslySetInnerHTML":if(Et!=null)throw Error(n(137,l));break;default:Mr(s,l,b,Et,p,null)}}yt(s,S,P,Z,mt,R,w,!1);return;case"select":Xe("invalid",s),b=R=S=null;for(w in p)if(p.hasOwnProperty(w)&&(P=p[w],P!=null))switch(w){case"value":S=P;break;case"defaultValue":R=P;break;case"multiple":b=P;default:Mr(s,l,w,P,p,null)}l=S,p=R,s.multiple=!!b,l!=null?Ot(s,!!b,l,!1):p!=null&&Ot(s,!!b,p,!0);return;case"textarea":Xe("invalid",s),S=w=b=null;for(R in p)if(p.hasOwnProperty(R)&&(P=p[R],P!=null))switch(R){case"value":b=P;break;case"defaultValue":w=P;break;case"children":S=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:Mr(s,l,R,P,p,null)}Pe(s,b,w,S);return;case"option":for(Z in p)if(p.hasOwnProperty(Z)&&(b=p[Z],b!=null))switch(Z){case"selected":s.selected=b&&typeof b!="function"&&typeof b!="symbol";break;default:Mr(s,l,Z,b,p,null)}return;case"dialog":Xe("beforetoggle",s),Xe("toggle",s),Xe("cancel",s),Xe("close",s);break;case"iframe":case"object":Xe("load",s);break;case"video":case"audio":for(b=0;b<uu.length;b++)Xe(uu[b],s);break;case"image":Xe("error",s),Xe("load",s);break;case"details":Xe("toggle",s);break;case"embed":case"source":case"link":Xe("error",s),Xe("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(mt in p)if(p.hasOwnProperty(mt)&&(b=p[mt],b!=null))switch(mt){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:Mr(s,l,mt,b,p,null)}return;default:if(Fi(l)){for(Et in p)p.hasOwnProperty(Et)&&(b=p[Et],b!==void 0&&bb(s,l,Et,b,p,void 0));return}}for(P in p)p.hasOwnProperty(P)&&(b=p[P],b!=null&&Mr(s,l,P,b,p,null))}function o4(s,l,p,b){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,S=null,R=null,P=null,Z=null,mt=null,Et=null;for(_t in p){var Mt=p[_t];if(p.hasOwnProperty(_t)&&Mt!=null)switch(_t){case"checked":break;case"value":break;case"defaultValue":Z=Mt;default:b.hasOwnProperty(_t)||Mr(s,l,_t,null,b,Mt)}}for(var bt in b){var _t=b[bt];if(Mt=p[bt],b.hasOwnProperty(bt)&&(_t!=null||Mt!=null))switch(bt){case"type":S=_t;break;case"name":w=_t;break;case"checked":mt=_t;break;case"defaultChecked":Et=_t;break;case"value":R=_t;break;case"defaultValue":P=_t;break;case"children":case"dangerouslySetInnerHTML":if(_t!=null)throw Error(n(137,l));break;default:_t!==Mt&&Mr(s,l,bt,_t,b,Mt)}}Pn(s,R,P,Z,mt,Et,S,w);return;case"select":_t=R=P=bt=null;for(S in p)if(Z=p[S],p.hasOwnProperty(S)&&Z!=null)switch(S){case"value":break;case"multiple":_t=Z;default:b.hasOwnProperty(S)||Mr(s,l,S,null,b,Z)}for(w in b)if(S=b[w],Z=p[w],b.hasOwnProperty(w)&&(S!=null||Z!=null))switch(w){case"value":bt=S;break;case"defaultValue":P=S;break;case"multiple":R=S;default:S!==Z&&Mr(s,l,w,S,b,Z)}l=P,p=R,b=_t,bt!=null?Ot(s,!!p,bt,!1):!!b!=!!p&&(l!=null?Ot(s,!!p,l,!0):Ot(s,!!p,p?[]:"",!1));return;case"textarea":_t=bt=null;for(P in p)if(w=p[P],p.hasOwnProperty(P)&&w!=null&&!b.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:Mr(s,l,P,null,b,w)}for(R in b)if(w=b[R],S=p[R],b.hasOwnProperty(R)&&(w!=null||S!=null))switch(R){case"value":bt=w;break;case"defaultValue":_t=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(n(91));break;default:w!==S&&Mr(s,l,R,w,b,S)}Vt(s,bt,_t);return;case"option":for(var re in p)if(bt=p[re],p.hasOwnProperty(re)&&bt!=null&&!b.hasOwnProperty(re))switch(re){case"selected":s.selected=!1;break;default:Mr(s,l,re,null,b,bt)}for(Z in b)if(bt=b[Z],_t=p[Z],b.hasOwnProperty(Z)&&bt!==_t&&(bt!=null||_t!=null))switch(Z){case"selected":s.selected=bt&&typeof bt!="function"&&typeof bt!="symbol";break;default:Mr(s,l,Z,bt,b,_t)}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 Se in p)bt=p[Se],p.hasOwnProperty(Se)&&bt!=null&&!b.hasOwnProperty(Se)&&Mr(s,l,Se,null,b,bt);for(mt in b)if(bt=b[mt],_t=p[mt],b.hasOwnProperty(mt)&&bt!==_t&&(bt!=null||_t!=null))switch(mt){case"children":case"dangerouslySetInnerHTML":if(bt!=null)throw Error(n(137,l));break;default:Mr(s,l,mt,bt,b,_t)}return;default:if(Fi(l)){for(var Br in p)bt=p[Br],p.hasOwnProperty(Br)&&bt!==void 0&&!b.hasOwnProperty(Br)&&bb(s,l,Br,void 0,b,bt);for(Et in b)bt=b[Et],_t=p[Et],!b.hasOwnProperty(Et)||bt===_t||bt===void 0&&_t===void 0||bb(s,l,Et,bt,b,_t);return}}for(var dt in p)bt=p[dt],p.hasOwnProperty(dt)&&bt!=null&&!b.hasOwnProperty(dt)&&Mr(s,l,dt,null,b,bt);for(Mt in b)bt=b[Mt],_t=p[Mt],!b.hasOwnProperty(Mt)||bt===_t||bt==null&&_t==null||Mr(s,l,Mt,bt,b,_t)}function cS(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function l4(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,p=performance.getEntriesByType("resource"),b=0;b<p.length;b++){var w=p[b],S=w.transferSize,R=w.initiatorType,P=w.duration;if(S&&P&&cS(R)){for(R=0,P=w.responseEnd,b+=1;b<p.length;b++){var Z=p[b],mt=Z.startTime;if(mt>P)break;var Et=Z.transferSize,Mt=Z.initiatorType;Et&&cS(Mt)&&(Z=Z.responseEnd,R+=Et*(Z<P?1:(P-mt)/(Z-mt)))}if(--b,l+=8*(S+R)/(w.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var xb=null,vb=null;function Jf(s){return s.nodeType===9?s:s.ownerDocument}function hS(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 uS(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 Cb(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 _b=null;function c4(){var s=window.event;return s&&s.type==="popstate"?s===_b?!1:(_b=s,!0):(_b=null,!1)}var dS=typeof setTimeout=="function"?setTimeout:void 0,h4=typeof clearTimeout=="function"?clearTimeout:void 0,fS=typeof Promise=="function"?Promise:void 0,u4=typeof queueMicrotask=="function"?queueMicrotask:typeof fS<"u"?function(s){return fS.resolve(null).then(s).catch(d4)}:dS;function d4(s){setTimeout(function(){throw s})}function oo(s){return s==="head"}function pS(s,l){var p=l,b=0;do{var w=p.nextSibling;if(s.removeChild(p),w&&w.nodeType===8)if(p=w.data,p==="/$"||p==="/&"){if(b===0){s.removeChild(w),Sc(l);return}b--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")b++;else if(p==="html")fu(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,fu(p);for(var S=p.firstChild;S;){var R=S.nextSibling,P=S.nodeName;S[$n]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&S.rel.toLowerCase()==="stylesheet"||p.removeChild(S),S=R}}else p==="body"&&fu(s.ownerDocument.body);p=w}while(p);Sc(l)}function gS(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 kb(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":kb(p),Ea(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function f4(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 p4(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 mS(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 wb(s){return s.data==="$?"||s.data==="$~"}function Sb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function g4(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 Tb=null;function yS(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 bS(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 xS(s,l,p){switch(l=Jf(p),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function fu(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Ea(s)}var Zn=new Map,vS=new Set;function tp(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var gs=W.d;W.d={f:m4,r:y4,D:b4,C:x4,L:v4,m:C4,X:k4,S:_4,M:w4};function m4(){var s=gs.f(),l=Wf();return s||l}function y4(s){var l=Ki(s);l!==null&&l.tag===5&&l.type==="form"?Fk(l):gs.r(s)}var _c=typeof document>"u"?null:document;function CS(s,l,p){var b=_c;if(b&&typeof l=="string"&&l){var w=Ni(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof p=="string"&&(w+='[crossorigin="'+p+'"]'),vS.has(w)||(vS.add(w),s={rel:s,crossOrigin:p,href:l},b.querySelector(w)===null&&(l=b.createElement("link"),Li(l,"link",s),yr(l),b.head.appendChild(l)))}}function b4(s){gs.D(s),CS("dns-prefetch",s,null)}function x4(s,l){gs.C(s,l),CS("preconnect",s,l)}function v4(s,l,p){gs.L(s,l,p);var b=_c;if(b&&s&&l){var w='link[rel="preload"][as="'+Ni(l)+'"]';l==="image"&&p&&p.imageSrcSet?(w+='[imagesrcset="'+Ni(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(w+='[imagesizes="'+Ni(p.imageSizes)+'"]')):w+='[href="'+Ni(s)+'"]';var S=w;switch(l){case"style":S=kc(s);break;case"script":S=wc(s)}Zn.has(S)||(s=g({rel:"preload",href:l==="image"&&p&&p.imageSrcSet?void 0:s,as:l},p),Zn.set(S,s),b.querySelector(w)!==null||l==="style"&&b.querySelector(pu(S))||l==="script"&&b.querySelector(gu(S))||(l=b.createElement("link"),Li(l,"link",s),yr(l),b.head.appendChild(l)))}}function C4(s,l){gs.m(s,l);var p=_c;if(p&&s){var b=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+Ni(b)+'"][href="'+Ni(s)+'"]',S=w;switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=wc(s)}if(!Zn.has(S)&&(s=g({rel:"modulepreload",href:s},l),Zn.set(S,s),p.querySelector(w)===null)){switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(gu(S)))return}b=p.createElement("link"),Li(b,"link",s),yr(b),p.head.appendChild(b)}}}function _4(s,l,p){gs.S(s,l,p);var b=_c;if(b&&s){var w=yi(b).hoistableStyles,S=kc(s);l=l||"default";var R=w.get(S);if(!R){var P={loading:0,preload:null};if(R=b.querySelector(pu(S)))P.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},p),(p=Zn.get(S))&&Eb(s,p);var Z=R=b.createElement("link");yr(Z),Li(Z,"link",s),Z._p=new Promise(function(mt,Et){Z.onload=mt,Z.onerror=Et}),Z.addEventListener("load",function(){P.loading|=1}),Z.addEventListener("error",function(){P.loading|=2}),P.loading|=4,ep(R,l,b)}R={type:"stylesheet",instance:R,count:1,state:P},w.set(S,R)}}}function k4(s,l){gs.X(s,l);var p=_c;if(p&&s){var b=yi(p).hoistableScripts,w=wc(s),S=b.get(w);S||(S=p.querySelector(gu(w)),S||(s=g({src:s,async:!0},l),(l=Zn.get(w))&&Nb(s,l),S=p.createElement("script"),yr(S),Li(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function w4(s,l){gs.M(s,l);var p=_c;if(p&&s){var b=yi(p).hoistableScripts,w=wc(s),S=b.get(w);S||(S=p.querySelector(gu(w)),S||(s=g({src:s,async:!0,type:"module"},l),(l=Zn.get(w))&&Nb(s,l),S=p.createElement("script"),yr(S),Li(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},b.set(w,S))}}function _S(s,l,p,b){var w=(w=st.current)?tp(w):null;if(!w)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(l=kc(p.href),p=yi(w).hoistableStyles,b=p.get(l),b||(b={type:"style",instance:null,count:0,state:null},p.set(l,b)),b):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=kc(p.href);var S=yi(w).hoistableStyles,R=S.get(s);if(R||(w=w.ownerDocument||w,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(s,R),(S=w.querySelector(pu(s)))&&!S._p&&(R.instance=S,R.state.loading=5),Zn.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Zn.set(s,p),S||S4(w,s,p,R.state))),l&&b===null)throw Error(n(528,""));return R}if(l&&b!==null)throw Error(n(529,""));return null;case"script":return l=p.async,p=p.src,typeof p=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=wc(p),p=yi(w).hoistableScripts,b=p.get(l),b||(b={type:"script",instance:null,count:0,state:null},p.set(l,b)),b):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function kc(s){return'href="'+Ni(s)+'"'}function pu(s){return'link[rel="stylesheet"]['+s+"]"}function kS(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function S4(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}),Li(l,"link",p),yr(l),s.head.appendChild(l))}function wc(s){return'[src="'+Ni(s)+'"]'}function gu(s){return"script[async]"+s}function wS(s,l,p){if(l.count++,l.instance===null)switch(l.type){case"style":var b=s.querySelector('style[data-href~="'+Ni(p.href)+'"]');if(b)return l.instance=b,yr(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"),yr(b),Li(b,"style",w),ep(b,p.precedence,s),l.instance=b;case"stylesheet":w=kc(p.href);var S=s.querySelector(pu(w));if(S)return l.state.loading|=4,l.instance=S,yr(S),S;b=kS(p),(w=Zn.get(w))&&Eb(b,w),S=(s.ownerDocument||s).createElement("link"),yr(S);var R=S;return R._p=new Promise(function(P,Z){R.onload=P,R.onerror=Z}),Li(S,"link",b),l.state.loading|=4,ep(S,p.precedence,s),l.instance=S;case"script":return S=wc(p.src),(w=s.querySelector(gu(S)))?(l.instance=w,yr(w),w):(b=p,(w=Zn.get(S))&&(b=g({},p),Nb(b,w)),s=s.ownerDocument||s,w=s.createElement("script"),yr(w),Li(w,"link",b),s.head.appendChild(w),l.instance=w);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(b=l.instance,l.state.loading|=4,ep(b,p.precedence,s));return l.instance}function ep(s,l,p){for(var b=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=b.length?b[b.length-1]:null,S=w,R=0;R<b.length;R++){var P=b[R];if(P.dataset.precedence===l)S=P;else if(S!==w)break}S?S.parentNode.insertBefore(s,S.nextSibling):(l=p.nodeType===9?p.head:p,l.insertBefore(s,l.firstChild))}function Eb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function Nb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var rp=null;function SS(s,l,p){if(rp===null){var b=new Map,w=rp=new Map;w.set(p,b)}else w=rp,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[Rr]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var R=S.getAttribute(l)||"";R=s+R;var P=b.get(R);P?P.push(S):b.set(R,[S])}}return b}function TS(s,l,p){s=s.ownerDocument||s,s.head.insertBefore(p,l==="title"?s.querySelector("head > title"):null)}function T4(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 ES(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function E4(s,l,p,b){if(p.type==="stylesheet"&&(typeof b.media!="string"||matchMedia(b.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var w=kc(b.href),S=l.querySelector(pu(w));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=ip.bind(s),l.then(s,s)),p.state.loading|=4,p.instance=S,yr(S);return}S=l.ownerDocument||l,b=kS(b),(w=Zn.get(w))&&Eb(b,w),S=S.createElement("link"),yr(S);var R=S;R._p=new Promise(function(P,Z){R.onload=P,R.onerror=Z}),Li(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 Ab=0;function N4(s,l){return s.stylesheets&&s.count===0&&ap(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var b=setTimeout(function(){if(s.stylesheets&&ap(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&Ab===0&&(Ab=62500*l4());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&ap(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>Ab?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)ap(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var np=null;function ap(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,np=new Map,l.forEach(A4,s),np=null,ip.call(s))}function A4(s,l){if(!(l.state.loading&4)){var p=np.get(s);if(p)var b=p.get(null);else{p=new Map,np.set(s,p);for(var w=s.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<w.length;S++){var R=w[S];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(p.set(R.dataset.precedence,R),b=R)}b&&p.set(null,b)}w=l.instance,R=w.getAttribute("data-precedence"),S=p.get(R)||b,S===b&&p.set(null,w),p.set(R,w),this.count++,b=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 mu={$$typeof:N,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function M4(s,l,p,b,w,S,R,P,Z){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=gr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gr(0),this.hiddenUpdates=gr(null),this.identifierPrefix=b,this.onUncaughtError=w,this.onCaughtError=S,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function NS(s,l,p,b,w,S,R,P,Z,mt,Et,Mt){return s=new M4(s,l,p,R,Z,mt,Et,Mt,P),l=1,S===!0&&(l|=24),S=En(3,null,null,l),s.current=S,S.stateNode=s,l=ly(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:b,isDehydrated:p,cache:l},dy(S),s}function AS(s){return s?(s=ec,s):ec}function MS(s,l,p,b,w,S){w=AS(w),b.context===null?b.context=w:b.pendingContext=w,b=Xs(l),b.payload={element:p},S=S===void 0?null:S,S!==null&&(b.callback=S),p=Zs(s,b,l),p!==null&&(gn(p,s,l),Kh(p,s,l))}function BS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function Mb(s,l){BS(s,l),(s=s.alternate)&&BS(s,l)}function LS(s){if(s.tag===13||s.tag===31){var l=Vo(s,67108864);l!==null&&gn(l,s,67108864),Mb(s,67108864)}}function OS(s){if(s.tag===13||s.tag===31){var l=Ln();l=wr(l);var p=Vo(s,l);p!==null&&gn(p,s,l),Mb(s,l)}}var sp=!0;function B4(s,l,p,b){var w=D.T;D.T=null;var S=W.p;try{W.p=2,Bb(s,l,p,b)}finally{W.p=S,D.T=w}}function L4(s,l,p,b){var w=D.T;D.T=null;var S=W.p;try{W.p=8,Bb(s,l,p,b)}finally{W.p=S,D.T=w}}function Bb(s,l,p,b){if(sp){var w=Lb(b);if(w===null)yb(s,l,b,op,p),jS(s,b);else if(R4(w,s,l,p,b))b.stopPropagation();else if(jS(s,b),l&4&&-1<O4.indexOf(s)){for(;w!==null;){var S=Ki(w);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var R=Nr(S.pendingLanes);if(R!==0){var P=S;for(P.pendingLanes|=2,P.entangledLanes|=2;R;){var Z=1<<31-me(R);P.entanglements[1]|=Z,R&=~Z}Ba(S),(pr&6)===0&&(Uf=Rt()+500,hu(0))}}break;case 31:case 13:P=Vo(S,2),P!==null&&gn(P,S,2),Wf(),Mb(S,2)}if(S=Lb(b),S===null&&yb(s,l,b,op,p),S===w)break;w=S}w!==null&&b.stopPropagation()}else yb(s,l,b,null,p)}}function Lb(s){return s=Ie(s),Ob(s)}var op=null;function Ob(s){if(op=null,s=mi(s),s!==null){var l=o(s);if(l===null)s=null;else{var p=l.tag;if(p===13){if(s=c(l),s!==null)return s;s=null}else if(p===31){if(s=h(l),s!==null)return s;s=null}else if(p===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return op=s,null}function RS(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(ne()){case Ft:return 2;case Re:return 8;case xe:case He:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Rb=!1,lo=null,co=null,ho=null,yu=new Map,bu=new Map,uo=[],O4="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 jS(s,l){switch(s){case"focusin":case"focusout":lo=null;break;case"dragenter":case"dragleave":co=null;break;case"mouseover":case"mouseout":ho=null;break;case"pointerover":case"pointerout":yu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":bu.delete(l.pointerId)}}function xu(s,l,p,b,w,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:p,eventSystemFlags:b,nativeEvent:S,targetContainers:[w]},l!==null&&(l=Ki(l),l!==null&&LS(l)),s):(s.eventSystemFlags|=b,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function R4(s,l,p,b,w){switch(l){case"focusin":return lo=xu(lo,s,l,p,b,w),!0;case"dragenter":return co=xu(co,s,l,p,b,w),!0;case"mouseover":return ho=xu(ho,s,l,p,b,w),!0;case"pointerover":var S=w.pointerId;return yu.set(S,xu(yu.get(S)||null,s,l,p,b,w)),!0;case"gotpointercapture":return S=w.pointerId,bu.set(S,xu(bu.get(S)||null,s,l,p,b,w)),!0}return!1}function DS(s){var l=mi(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,li(s.priority,function(){OS(p)});return}}else if(l===31){if(l=h(p),l!==null){s.blockedOn=l,li(s.priority,function(){OS(p)});return}}else if(l===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function lp(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=Lb(s.nativeEvent);if(p===null){p=s.nativeEvent;var b=new p.constructor(p.type,p);le=b,p.target.dispatchEvent(b),le=null}else return l=Ki(p),l!==null&&LS(l),s.blockedOn=p,!1;l.shift()}return!0}function FS(s,l,p){lp(s)&&p.delete(l)}function j4(){Rb=!1,lo!==null&&lp(lo)&&(lo=null),co!==null&&lp(co)&&(co=null),ho!==null&&lp(ho)&&(ho=null),yu.forEach(FS),bu.forEach(FS)}function cp(s,l){s.blockedOn===l&&(s.blockedOn=null,Rb||(Rb=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,j4)))}var hp=null;function IS(s){hp!==s&&(hp=s,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){hp===s&&(hp=null);for(var l=0;l<s.length;l+=3){var p=s[l],b=s[l+1],w=s[l+2];if(typeof b!="function"){if(Ob(b||p)===null)continue;break}var S=Ki(p);S!==null&&(s.splice(l,3),l-=3,Ly(S,{pending:!0,data:w,method:p.method,action:b},b,w))}}))}function Sc(s){function l(Z){return cp(Z,s)}lo!==null&&cp(lo,s),co!==null&&cp(co,s),ho!==null&&cp(ho,s),yu.forEach(l),bu.forEach(l);for(var p=0;p<uo.length;p++){var b=uo[p];b.blockedOn===s&&(b.blockedOn=null)}for(;0<uo.length&&(p=uo[0],p.blockedOn===null);)DS(p),p.blockedOn===null&&uo.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(b=0;b<p.length;b+=3){var w=p[b],S=p[b+1],R=w[Zr]||null;if(typeof S=="function")R||IS(p);else if(R){var P=null;if(S&&S.hasAttribute("formAction")){if(w=S,R=S[Zr]||null)P=R.formAction;else if(Ob(w)!==null)continue}else P=R.action;typeof P=="function"?p[b+1]=P:(p.splice(b,3),b-=3),IS(p)}}}function $S(){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 jb(s){this._internalRoot=s}up.prototype.render=jb.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var p=l.current,b=Ln();MS(p,b,s,l,null,null)},up.prototype.unmount=jb.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;MS(s.current,2,null,s,null,null),Wf(),l[kn]=null}};function up(s){this._internalRoot=s}up.prototype.unstable_scheduleHydration=function(s){if(s){var l=Yi();s={blockedOn:null,target:s,priority:l};for(var p=0;p<uo.length&&l!==0&&l<uo[p].priority;p++);uo.splice(p,0,s),p===0&&DS(s)}};var zS=e.version;if(zS!=="19.2.4")throw Error(n(527,zS,"19.2.4"));W.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 D4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dp.isDisabled&&dp.supportsFiber)try{Ge=dp.inject(D4),Ze=dp}catch{}}return Cu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var p=!1,b="",w=Yk,S=Kk,R=Vk;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=NS(s,1,!1,null,null,p,b,null,w,S,R,$S),s[kn]=l.current,mb(s),new jb(l)},Cu.hydrateRoot=function(s,l,p){if(!a(s))throw Error(n(299));var b=!1,w="",S=Yk,R=Kk,P=Vk,Z=null;return p!=null&&(p.unstable_strictMode===!0&&(b=!0),p.identifierPrefix!==void 0&&(w=p.identifierPrefix),p.onUncaughtError!==void 0&&(S=p.onUncaughtError),p.onCaughtError!==void 0&&(R=p.onCaughtError),p.onRecoverableError!==void 0&&(P=p.onRecoverableError),p.formState!==void 0&&(Z=p.formState)),l=NS(s,1,!0,l,p??null,b,w,Z,S,R,P,$S),l.context=AS(null),p=l.current,b=Ln(),b=wr(b),w=Xs(b),w.callback=null,Zs(p,w,b),p=b,l.current.lanes=p,we(l,p),Ba(l),s[kn]=l.current,mb(s),new up(l)},Cu.version="19.2.4",Cu}var ZS;function V4(){if(ZS)return $b.exports;ZS=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),$b.exports=K4(),$b.exports}var X4=V4(),Th=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Z4={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},Co,T1,VA,Q4=(VA=class{constructor(){ge(this,Co,Z4);ge(this,T1,!1)}setTimeoutProvider(r){Xt(this,Co,r)}setTimeout(r,e){return et(this,Co).setTimeout(r,e)}clearTimeout(r){et(this,Co).clearTimeout(r)}setInterval(r,e){return et(this,Co).setInterval(r,e)}clearInterval(r){et(this,Co).clearInterval(r)}},Co=new WeakMap,T1=new WeakMap,VA),ml=new Q4;function J4(r){setTimeout(r,0)}var Ol=typeof window>"u"||"Deno"in globalThis;function Qi(){}function tI(r,e){return typeof r=="function"?r(e):r}function Bx(r){return typeof r=="number"&&r>=0&&r!==1/0}function oM(r,e){return Math.max(r+(e||0)-Date.now(),0)}function Lo(r,e){return typeof r=="function"?r(e):r}function ia(r,e){return typeof r=="function"?r(e):r}function QS(r,e){const{type:i="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=r;if(c){if(n){if(e.queryHash!==N1(c,e.options))return!1}else if(!yd(e.queryKey,c))return!1}if(i!=="all"){const u=e.isActive();if(i==="active"&&!u||i==="inactive"&&u)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||a&&a!==e.state.fetchStatus||o&&!o(e))}function JS(r,e){const{exact:i,status:n,predicate:a,mutationKey:o}=r;if(o){if(!e.options.mutationKey)return!1;if(i){if(Rl(e.options.mutationKey)!==Rl(o))return!1}else if(!yd(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function N1(r,e){return((e==null?void 0:e.queryKeyHashFn)||Rl)(r)}function Rl(r){return JSON.stringify(r,(e,i)=>Lx(i)?Object.keys(i).sort().reduce((n,a)=>(n[a]=i[a],n),{}):i)}function yd(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(i=>yd(r[i],e[i])):!1}var eI=Object.prototype.hasOwnProperty;function lM(r,e,i=0){if(r===e)return r;if(i>500)return e;const n=t2(r)&&t2(e);if(!n&&!(Lx(r)&&Lx(e)))return e;const o=(n?r:Object.keys(r)).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=r[g],y=e[g];if(x===y){u[g]=x,(n?f<o:eI.call(r,g))&&d++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[g]=y;continue}const v=lM(x,y,i+1);u[g]=v,v===x&&d++}return o===h&&d===o?r:u}function og(r,e){if(!e||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(r[i]!==e[i])return!1;return!0}function t2(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function Lx(r){if(!e2(r))return!1;const e=r.constructor;if(e===void 0)return!0;const i=e.prototype;return!(!e2(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function e2(r){return Object.prototype.toString.call(r)==="[object Object]"}function rI(r){return new Promise(e=>{ml.setTimeout(e,r)})}function Ox(r,e,i){return typeof i.structuralSharing=="function"?i.structuralSharing(r,e):i.structuralSharing!==!1?lM(r,e):e}function iI(r,e,i=0){const n=[...r,e];return i&&n.length>i?n.slice(1):n}function nI(r,e,i=0){const n=[e,...r];return i&&n.length>i?n.slice(0,-1):n}var A1=Symbol();function cM(r,e){return!r.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!r.queryFn||r.queryFn===A1?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function M1(r,e){return typeof r=="function"?r(...e):!!r}function aI(r,e,i){let n=!1,a;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?i():a.addEventListener("abort",i,{once:!0})),a)}),r}var Cl,_o,Gc,XA,sI=(XA=class extends Th{constructor(){super();ge(this,Cl);ge(this,_o);ge(this,Gc);Xt(this,Gc,e=>{if(!Ol&&window.addEventListener){const i=()=>e();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){et(this,_o)||this.setEventListener(et(this,Gc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,_o))==null||e.call(this),Xt(this,_o,void 0))}setEventListener(e){var i;Xt(this,Gc,e),(i=et(this,_o))==null||i.call(this),Xt(this,_o,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){et(this,Cl)!==e&&(Xt(this,Cl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(i=>{i(e)})}isFocused(){var e;return typeof et(this,Cl)=="boolean"?et(this,Cl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Cl=new WeakMap,_o=new WeakMap,Gc=new WeakMap,XA),B1=new sI;function Rx(){let r,e;const i=new Promise((a,o)=>{r=a,e=o});i.status="pending",i.catch(()=>{});function n(a){Object.assign(i,a),delete i.resolve,delete i.reject}return i.resolve=a=>{n({status:"fulfilled",value:a}),r(a)},i.reject=a=>{n({status:"rejected",reason:a}),e(a)},i}var oI=J4;function lI(){let r=[],e=0,i=h=>{h()},n=h=>{h()},a=oI;const o=h=>{e?r.push(h):a(()=>{i(h)})},c=()=>{const h=r;r=[],h.length&&a(()=>{n(()=>{h.forEach(u=>{i(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=>{i=h},setBatchNotifyFunction:h=>{n=h},setScheduler:h=>{a=h}}}var vi=lI(),Yc,ko,Kc,ZA,cI=(ZA=class extends Th{constructor(){super();ge(this,Yc,!0);ge(this,ko);ge(this,Kc);Xt(this,Kc,e=>{if(!Ol&&window.addEventListener){const i=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",n)}}})}onSubscribe(){et(this,ko)||this.setEventListener(et(this,Kc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,ko))==null||e.call(this),Xt(this,ko,void 0))}setEventListener(e){var i;Xt(this,Kc,e),(i=et(this,ko))==null||i.call(this),Xt(this,ko,e(this.setOnline.bind(this)))}setOnline(e){et(this,Yc)!==e&&(Xt(this,Yc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return et(this,Yc)}},Yc=new WeakMap,ko=new WeakMap,Kc=new WeakMap,ZA),lg=new cI;function hI(r){return Math.min(1e3*2**r,3e4)}function hM(r){return(r??"online")==="online"?lg.isOnline():!0}var jx=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function uM(r){let e=!1,i=0,n;const a=Rx(),o=()=>a.status!=="pending",c=C=>{var _;if(!o()){const k=new jx(C);x(k),(_=r.onCancel)==null||_.call(r,k)}},h=()=>{e=!0},u=()=>{e=!1},d=()=>B1.isFocused()&&(r.networkMode==="always"||lg.isOnline())&&r.canRun(),f=()=>hM(r.networkMode)&&r.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)},(_=r.onPause)==null||_.call(r)}).then(()=>{var C;n=void 0,o()||(C=r.onContinue)==null||C.call(r)}),v=()=>{if(o())return;let C;const _=i===0?r.initialPromise:void 0;try{C=_??r.fn()}catch(k){C=Promise.reject(k)}Promise.resolve(C).then(g).catch(k=>{var O;if(o())return;const T=r.retry??(Ol?0:3),N=r.retryDelay??hI,E=typeof N=="function"?N(i,k):N,B=T===!0||typeof T=="number"&&i<T||typeof T=="function"&&T(i,k);if(e||!B){x(k);return}i++,(O=r.onFail)==null||O.call(r,i,k),rI(E).then(()=>d()?void 0:y()).then(()=>{e?x(k):v()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:h,continueRetry:u,canStart:f,start:()=>(f()?v():y().then(v),a)}}var _l,QA,dM=(QA=class{constructor(){ge(this,_l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bx(this.gcTime)&&Xt(this,_l,ml.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Ol?1/0:300*1e3))}clearGcTimeout(){et(this,_l)&&(ml.clearTimeout(et(this,_l)),Xt(this,_l,void 0))}},_l=new WeakMap,QA),kl,Vc,ra,wl,Si,Rd,Sl,fa,Cs,JA,uI=(JA=class extends dM{constructor(e){super();ge(this,fa);ge(this,kl);ge(this,Vc);ge(this,ra);ge(this,wl);ge(this,Si);ge(this,Rd);ge(this,Sl);Xt(this,Sl,!1),Xt(this,Rd,e.defaultOptions),this.setOptions(e.options),this.observers=[],Xt(this,wl,e.client),Xt(this,ra,et(this,wl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Xt(this,kl,i2(this.options)),this.state=e.state??et(this,kl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=et(this,Si))==null?void 0:e.promise}setOptions(e){if(this.options={...et(this,Rd),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=i2(this.options);i.data!==void 0&&(this.setState(r2(i.data,i.dataUpdatedAt)),Xt(this,kl,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&et(this,ra).remove(this)}setData(e,i){const n=Ox(this.state.data,e,this.options);return We(this,fa,Cs).call(this,{data:n,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),n}setState(e,i){We(this,fa,Cs).call(this,{type:"setState",state:e,setStateOptions:i})}cancel(e){var n,a;const i=(n=et(this,Si))==null?void 0:n.promise;return(a=et(this,Si))==null||a.cancel(e),i?i.then(Qi).catch(Qi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(et(this,kl))}isActive(){return this.observers.some(e=>ia(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===A1||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:!oM(this.state.dataUpdatedAt,e)}onFocus(){var i;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(i=et(this,Si))==null||i.continue()}onOnline(){var i;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(i=et(this,Si))==null||i.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),et(this,ra).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(i=>i!==e),this.observers.length||(et(this,Si)&&(et(this,Sl)?et(this,Si).cancel({revert:!0}):et(this,Si).cancelRetry()),this.scheduleGc()),et(this,ra).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,fa,Cs).call(this,{type:"invalidate"})}async fetch(e,i){var u,d,f,g,x,y,v,C,_,k,T,N;if(this.state.fetchStatus!=="idle"&&((u=et(this,Si))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(et(this,Si))return et(this,Si).continueRetry(),et(this,Si).promise}if(e&&this.setOptions(e),!this.options.queryFn){const E=this.observers.find(B=>B.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,a=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Xt(this,Sl,!0),n.signal)})},o=()=>{const E=cM(this.options,i),O=(()=>{const A={client:et(this,wl),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return Xt(this,Sl,!1),this.options.persister?this.options.persister(E,O,this):E(O)},h=(()=>{const E={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:et(this,wl),state:this.state,fetchFn:o};return a(E),E})();(d=this.options.behavior)==null||d.onFetch(h,this),Xt(this,Vc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=h.fetchOptions)==null?void 0:f.meta))&&We(this,fa,Cs).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Xt(this,Si,uM({initialPromise:i==null?void 0:i.initialPromise,fn:h.fetchFn,onCancel:E=>{E instanceof jx&&E.revert&&this.setState({...et(this,Vc),fetchStatus:"idle"}),n.abort()},onFail:(E,B)=>{We(this,fa,Cs).call(this,{type:"failed",failureCount:E,error:B})},onPause:()=>{We(this,fa,Cs).call(this,{type:"pause"})},onContinue:()=>{We(this,fa,Cs).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const E=await et(this,Si).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(y=(x=et(this,ra).config).onSuccess)==null||y.call(x,E,this),(C=(v=et(this,ra).config).onSettled)==null||C.call(v,E,this.state.error,this),E}catch(E){if(E instanceof jx){if(E.silent)return et(this,Si).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw We(this,fa,Cs).call(this,{type:"error",error:E}),(k=(_=et(this,ra).config).onError)==null||k.call(_,E,this),(N=(T=et(this,ra).config).onSettled)==null||N.call(T,this.state.data,E,this),E}finally{this.scheduleGc()}}},kl=new WeakMap,Vc=new WeakMap,ra=new WeakMap,wl=new WeakMap,Si=new WeakMap,Rd=new WeakMap,Sl=new WeakMap,fa=new WeakSet,Cs=function(e){const i=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,...fM(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...r2(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Xt(this,Vc,e.manual?a:void 0),a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=i(this.state),vi.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),et(this,ra).notify({query:this,type:"updated",action:e})})},JA);function fM(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hM(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function r2(r,e){return{data:r,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function i2(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,i=e!==void 0,n=i?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var yn,nr,jd,Zi,Tl,Xc,ws,wo,Dd,Zc,Qc,El,Nl,So,Jc,Cr,Yu,Dx,Fx,Ix,$x,zx,Px,qx,pM,tM,dI=(tM=class extends Th{constructor(e,i){super();ge(this,Cr);ge(this,yn);ge(this,nr);ge(this,jd);ge(this,Zi);ge(this,Tl);ge(this,Xc);ge(this,ws);ge(this,wo);ge(this,Dd);ge(this,Zc);ge(this,Qc);ge(this,El);ge(this,Nl);ge(this,So);ge(this,Jc,new Set);this.options=i,Xt(this,yn,e),Xt(this,wo,null),Xt(this,ws,Rx()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(et(this,nr).addObserver(this),n2(et(this,nr),this.options)?We(this,Cr,Yu).call(this):this.updateResult(),We(this,Cr,$x).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ux(et(this,nr),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ux(et(this,nr),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,We(this,Cr,zx).call(this),We(this,Cr,Px).call(this),et(this,nr).removeObserver(this)}setOptions(e){const i=this.options,n=et(this,nr);if(this.options=et(this,yn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ia(this.options.enabled,et(this,nr))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");We(this,Cr,qx).call(this),et(this,nr).setOptions(this.options),i._defaulted&&!og(this.options,i)&&et(this,yn).getQueryCache().notify({type:"observerOptionsUpdated",query:et(this,nr),observer:this});const a=this.hasListeners();a&&a2(et(this,nr),n,this.options,i)&&We(this,Cr,Yu).call(this),this.updateResult(),a&&(et(this,nr)!==n||ia(this.options.enabled,et(this,nr))!==ia(i.enabled,et(this,nr))||Lo(this.options.staleTime,et(this,nr))!==Lo(i.staleTime,et(this,nr)))&&We(this,Cr,Dx).call(this);const o=We(this,Cr,Fx).call(this);a&&(et(this,nr)!==n||ia(this.options.enabled,et(this,nr))!==ia(i.enabled,et(this,nr))||o!==et(this,So))&&We(this,Cr,Ix).call(this,o)}getOptimisticResult(e){const i=et(this,yn).getQueryCache().build(et(this,yn),e),n=this.createResult(i,e);return pI(this,n)&&(Xt(this,Zi,n),Xt(this,Xc,this.options),Xt(this,Tl,et(this,nr).state)),n}getCurrentResult(){return et(this,Zi)}trackResult(e,i){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),i==null||i(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&et(this,ws).status==="pending"&&et(this,ws).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){et(this,Jc).add(e)}getCurrentQuery(){return et(this,nr)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const i=et(this,yn).defaultQueryOptions(e),n=et(this,yn).getQueryCache().build(et(this,yn),i);return n.fetch().then(()=>this.createResult(n,i))}fetch(e){return We(this,Cr,Yu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),et(this,Zi)))}createResult(e,i){var F;const n=et(this,nr),a=this.options,o=et(this,Zi),c=et(this,Tl),h=et(this,Xc),d=e!==n?e.state:et(this,jd),{state:f}=e;let g={...f},x=!1,y;if(i._optimisticResults){const j=this.hasListeners(),z=!j&&n2(e,i),U=j&&a2(e,n,i,a);(z||U)&&(g={...g,...fM(f.data,e.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:C,status:_}=g;y=g.data;let k=!1;if(i.placeholderData!==void 0&&y===void 0&&_==="pending"){let j;o!=null&&o.isPlaceholderData&&i.placeholderData===(h==null?void 0:h.placeholderData)?(j=o.data,k=!0):j=typeof i.placeholderData=="function"?i.placeholderData((F=et(this,Qc))==null?void 0:F.state.data,et(this,Qc)):i.placeholderData,j!==void 0&&(_="success",y=Ox(o==null?void 0:o.data,j,i),x=!0)}if(i.select&&y!==void 0&&!k)if(o&&y===(c==null?void 0:c.data)&&i.select===et(this,Dd))y=et(this,Zc);else try{Xt(this,Dd,i.select),y=i.select(y),y=Ox(o==null?void 0:o.data,y,i),Xt(this,Zc,y),Xt(this,wo,null)}catch(j){Xt(this,wo,j)}et(this,wo)&&(v=et(this,wo),y=et(this,Zc),C=Date.now(),_="error");const T=g.fetchStatus==="fetching",N=_==="pending",E=_==="error",B=N&&T,O=y!==void 0,M={status:_,fetchStatus:g.fetchStatus,isPending:N,isSuccess:_==="success",isError:E,isInitialLoading:B,isLoading:B,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:T,isRefetching:T&&!N,isLoadingError:E&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:E&&O,isStale:L1(e,i),refetch:this.refetch,promise:et(this,ws),isEnabled:ia(i.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const j=M.data!==void 0,z=M.status==="error"&&!j,U=G=>{z?G.reject(M.error):j&&G.resolve(M.data)},V=()=>{const G=Xt(this,ws,M.promise=Rx());U(G)},I=et(this,ws);switch(I.status){case"pending":e.queryHash===n.queryHash&&U(I);break;case"fulfilled":(z||M.data!==I.value)&&V();break;case"rejected":(!z||M.error!==I.reason)&&V();break}}return M}updateResult(){const e=et(this,Zi),i=this.createResult(et(this,nr),this.options);if(Xt(this,Tl,et(this,nr).state),Xt(this,Xc,this.options),et(this,Tl).data!==void 0&&Xt(this,Qc,et(this,nr)),og(i,e))return;Xt(this,Zi,i);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!et(this,Jc).size)return!0;const c=new Set(o??et(this,Jc));return this.options.throwOnError&&c.add("error"),Object.keys(et(this,Zi)).some(h=>{const u=h;return et(this,Zi)[u]!==e[u]&&c.has(u)})};We(this,Cr,pM).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&We(this,Cr,$x).call(this)}},yn=new WeakMap,nr=new WeakMap,jd=new WeakMap,Zi=new WeakMap,Tl=new WeakMap,Xc=new WeakMap,ws=new WeakMap,wo=new WeakMap,Dd=new WeakMap,Zc=new WeakMap,Qc=new WeakMap,El=new WeakMap,Nl=new WeakMap,So=new WeakMap,Jc=new WeakMap,Cr=new WeakSet,Yu=function(e){We(this,Cr,qx).call(this);let i=et(this,nr).fetch(this.options,e);return e!=null&&e.throwOnError||(i=i.catch(Qi)),i},Dx=function(){We(this,Cr,zx).call(this);const e=Lo(this.options.staleTime,et(this,nr));if(Ol||et(this,Zi).isStale||!Bx(e))return;const n=oM(et(this,Zi).dataUpdatedAt,e)+1;Xt(this,El,ml.setTimeout(()=>{et(this,Zi).isStale||this.updateResult()},n))},Fx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(et(this,nr)):this.options.refetchInterval)??!1},Ix=function(e){We(this,Cr,Px).call(this),Xt(this,So,e),!(Ol||ia(this.options.enabled,et(this,nr))===!1||!Bx(et(this,So))||et(this,So)===0)&&Xt(this,Nl,ml.setInterval(()=>{(this.options.refetchIntervalInBackground||B1.isFocused())&&We(this,Cr,Yu).call(this)},et(this,So)))},$x=function(){We(this,Cr,Dx).call(this),We(this,Cr,Ix).call(this,We(this,Cr,Fx).call(this))},zx=function(){et(this,El)&&(ml.clearTimeout(et(this,El)),Xt(this,El,void 0))},Px=function(){et(this,Nl)&&(ml.clearInterval(et(this,Nl)),Xt(this,Nl,void 0))},qx=function(){const e=et(this,yn).getQueryCache().build(et(this,yn),this.options);if(e===et(this,nr))return;const i=et(this,nr);Xt(this,nr,e),Xt(this,jd,e.state),this.hasListeners()&&(i==null||i.removeObserver(this),e.addObserver(this))},pM=function(e){vi.batch(()=>{e.listeners&&this.listeners.forEach(i=>{i(et(this,Zi))}),et(this,yn).getQueryCache().notify({query:et(this,nr),type:"observerResultsUpdated"})})},tM);function fI(r,e){return ia(e.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&e.retryOnMount===!1)}function n2(r,e){return fI(r,e)||r.state.data!==void 0&&Ux(r,e,e.refetchOnMount)}function Ux(r,e,i){if(ia(e.enabled,r)!==!1&&Lo(e.staleTime,r)!=="static"){const n=typeof i=="function"?i(r):i;return n==="always"||n!==!1&&L1(r,e)}return!1}function a2(r,e,i,n){return(r!==e||ia(n.enabled,r)===!1)&&(!i.suspense||r.state.status!=="error")&&L1(r,i)}function L1(r,e){return ia(e.enabled,r)!==!1&&r.isStaleByTime(Lo(e.staleTime,r))}function pI(r,e){return!og(r.getCurrentResult(),e)}function s2(r){return{onFetch:(e,i)=>{var f,g,x,y,v;const n=e.options,a=(x=(g=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],c=((v=e.state.data)==null?void 0:v.pageParams)||[];let h={pages:[],pageParams:[]},u=0;const d=async()=>{let C=!1;const _=N=>{aI(N,()=>e.signal,()=>C=!0)},k=cM(e.options,e.fetchOptions),T=async(N,E,B)=>{if(C)return Promise.reject();if(E==null&&N.pages.length)return Promise.resolve(N);const A=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:E,direction:B?"backward":"forward",meta:e.options.meta};return _(z),z})(),M=await k(A),{maxPages:F}=e.options,j=B?nI:iI;return{pages:j(N.pages,M,F),pageParams:j(N.pageParams,E,F)}};if(a&&o.length){const N=a==="backward",E=N?gI:o2,B={pages:o,pageParams:c},O=E(n,B);h=await T(B,O,N)}else{const N=r??o.length;do{const E=u===0?c[0]??n.initialPageParam:o2(n,h);if(u>0&&E==null)break;h=await T(h,E),u++}while(u<N)}return h};e.options.persister?e.fetchFn=()=>{var C,_;return(_=(C=e.options).persister)==null?void 0:_.call(C,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i)}:e.fetchFn=d}}}function o2(r,{pages:e,pageParams:i}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,i[n],i):void 0}function gI(r,{pages:e,pageParams:i}){var n;return e.length>0?(n=r.getPreviousPageParam)==null?void 0:n.call(r,e[0],e,i[0],i):void 0}var Fd,Pa,Ui,Al,qa,yo,eM,mI=(eM=class extends dM{constructor(e){super();ge(this,qa);ge(this,Fd);ge(this,Pa);ge(this,Ui);ge(this,Al);Xt(this,Fd,e.client),this.mutationId=e.mutationId,Xt(this,Ui,e.mutationCache),Xt(this,Pa,[]),this.state=e.state||gM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){et(this,Pa).includes(e)||(et(this,Pa).push(e),this.clearGcTimeout(),et(this,Ui).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Xt(this,Pa,et(this,Pa).filter(i=>i!==e)),this.scheduleGc(),et(this,Ui).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){et(this,Pa).length||(this.state.status==="pending"?this.scheduleGc():et(this,Ui).remove(this))}continue(){var e;return((e=et(this,Al))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O,A;const i=()=>{We(this,qa,yo).call(this,{type:"continue"})},n={client:et(this,Fd),meta:this.options.meta,mutationKey:this.options.mutationKey};Xt(this,Al,uM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,F)=>{We(this,qa,yo).call(this,{type:"failed",failureCount:M,error:F})},onPause:()=>{We(this,qa,yo).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>et(this,Ui).canRun(this)}));const a=this.state.status==="pending",o=!et(this,Al).canStart();try{if(a)i();else{We(this,qa,yo).call(this,{type:"pending",variables:e,isPaused:o}),et(this,Ui).config.onMutate&&await et(this,Ui).config.onMutate(e,this,n);const F=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));F!==this.state.context&&We(this,qa,yo).call(this,{type:"pending",context:F,variables:e,isPaused:o})}const M=await et(this,Al).start();return await((d=(u=et(this,Ui).config).onSuccess)==null?void 0:d.call(u,M,e,this.state.context,this,n)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,M,e,this.state.context,n)),await((y=(x=et(this,Ui).config).onSettled)==null?void 0:y.call(x,M,null,this.state.variables,this.state.context,this,n)),await((C=(v=this.options).onSettled)==null?void 0:C.call(v,M,null,e,this.state.context,n)),We(this,qa,yo).call(this,{type:"success",data:M}),M}catch(M){try{await((k=(_=et(this,Ui).config).onError)==null?void 0:k.call(_,M,e,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((N=(T=this.options).onError)==null?void 0:N.call(T,M,e,this.state.context,n))}catch(F){Promise.reject(F)}try{await((B=(E=et(this,Ui).config).onSettled)==null?void 0:B.call(E,void 0,M,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((A=(O=this.options).onSettled)==null?void 0:A.call(O,void 0,M,e,this.state.context,n))}catch(F){Promise.reject(F)}throw We(this,qa,yo).call(this,{type:"error",error:M}),M}finally{et(this,Ui).runNext(this)}}},Fd=new WeakMap,Pa=new WeakMap,Ui=new WeakMap,Al=new WeakMap,qa=new WeakSet,yo=function(e){const i=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=i(this.state),vi.batch(()=>{et(this,Pa).forEach(n=>{n.onMutationUpdate(e)}),et(this,Ui).notify({mutation:this,type:"updated",action:e})})},eM);function gM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ss,pa,Id,rM,yI=(rM=class extends Th{constructor(e={}){super();ge(this,Ss);ge(this,pa);ge(this,Id);this.config=e,Xt(this,Ss,new Set),Xt(this,pa,new Map),Xt(this,Id,0)}build(e,i,n){const a=new mI({client:e,mutationCache:this,mutationId:++fp(this,Id)._,options:e.defaultMutationOptions(i),state:n});return this.add(a),a}add(e){et(this,Ss).add(e);const i=pp(e);if(typeof i=="string"){const n=et(this,pa).get(i);n?n.push(e):et(this,pa).set(i,[e])}this.notify({type:"added",mutation:e})}remove(e){if(et(this,Ss).delete(e)){const i=pp(e);if(typeof i=="string"){const n=et(this,pa).get(i);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&et(this,pa).delete(i)}}this.notify({type:"removed",mutation:e})}canRun(e){const i=pp(e);if(typeof i=="string"){const n=et(this,pa).get(i),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const i=pp(e);if(typeof i=="string"){const a=(n=et(this,pa).get(i))==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(){vi.batch(()=>{et(this,Ss).forEach(e=>{this.notify({type:"removed",mutation:e})}),et(this,Ss).clear(),et(this,pa).clear()})}getAll(){return Array.from(et(this,Ss))}find(e){const i={exact:!0,...e};return this.getAll().find(n=>JS(i,n))}findAll(e={}){return this.getAll().filter(i=>JS(e,i))}notify(e){vi.batch(()=>{this.listeners.forEach(i=>{i(e)})})}resumePausedMutations(){const e=this.getAll().filter(i=>i.state.isPaused);return vi.batch(()=>Promise.all(e.map(i=>i.continue().catch(Qi))))}},Ss=new WeakMap,pa=new WeakMap,Id=new WeakMap,rM);function pp(r){var e;return(e=r.options.scope)==null?void 0:e.id}var Ts,To,bn,Es,Rs,Hp,Hx,iM,bI=(iM=class extends Th{constructor(i,n){super();ge(this,Rs);ge(this,Ts);ge(this,To);ge(this,bn);ge(this,Es);Xt(this,Ts,i),this.setOptions(n),this.bindMethods(),We(this,Rs,Hp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var a;const n=this.options;this.options=et(this,Ts).defaultMutationOptions(i),og(this.options,n)||et(this,Ts).getMutationCache().notify({type:"observerOptionsUpdated",mutation:et(this,bn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Rl(n.mutationKey)!==Rl(this.options.mutationKey)?this.reset():((a=et(this,bn))==null?void 0:a.state.status)==="pending"&&et(this,bn).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=et(this,bn))==null||i.removeObserver(this)}onMutationUpdate(i){We(this,Rs,Hp).call(this),We(this,Rs,Hx).call(this,i)}getCurrentResult(){return et(this,To)}reset(){var i;(i=et(this,bn))==null||i.removeObserver(this),Xt(this,bn,void 0),We(this,Rs,Hp).call(this),We(this,Rs,Hx).call(this)}mutate(i,n){var a;return Xt(this,Es,n),(a=et(this,bn))==null||a.removeObserver(this),Xt(this,bn,et(this,Ts).getMutationCache().build(et(this,Ts),this.options)),et(this,bn).addObserver(this),et(this,bn).execute(i)}},Ts=new WeakMap,To=new WeakMap,bn=new WeakMap,Es=new WeakMap,Rs=new WeakSet,Hp=function(){var n;const i=((n=et(this,bn))==null?void 0:n.state)??gM();Xt(this,To,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Hx=function(i){vi.batch(()=>{var n,a,o,c,h,u,d,f;if(et(this,Es)&&this.hasListeners()){const g=et(this,To).variables,x=et(this,To).context,y={client:et(this,Ts),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(a=(n=et(this,Es)).onSuccess)==null||a.call(n,i.data,g,x,y)}catch(v){Promise.reject(v)}try{(c=(o=et(this,Es)).onSettled)==null||c.call(o,i.data,null,g,x,y)}catch(v){Promise.reject(v)}}else if((i==null?void 0:i.type)==="error"){try{(u=(h=et(this,Es)).onError)==null||u.call(h,i.error,g,x,y)}catch(v){Promise.reject(v)}try{(f=(d=et(this,Es)).onSettled)==null||f.call(d,void 0,i.error,g,x,y)}catch(v){Promise.reject(v)}}}this.listeners.forEach(g=>{g(et(this,To))})})},iM),Ua,nM,xI=(nM=class extends Th{constructor(e={}){super();ge(this,Ua);this.config=e,Xt(this,Ua,new Map)}build(e,i,n){const a=i.queryKey,o=i.queryHash??N1(a,i);let c=this.get(o);return c||(c=new uI({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(i),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){et(this,Ua).has(e.queryHash)||(et(this,Ua).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const i=et(this,Ua).get(e.queryHash);i&&(e.destroy(),i===e&&et(this,Ua).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){vi.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return et(this,Ua).get(e)}getAll(){return[...et(this,Ua).values()]}find(e){const i={exact:!0,...e};return this.getAll().find(n=>QS(i,n))}findAll(e={}){const i=this.getAll();return Object.keys(e).length>0?i.filter(n=>QS(e,n)):i}notify(e){vi.batch(()=>{this.listeners.forEach(i=>{i(e)})})}onFocus(){vi.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){vi.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ua=new WeakMap,nM),ii,Eo,No,th,eh,Ao,rh,ih,aM,vI=(aM=class{constructor(r={}){ge(this,ii);ge(this,Eo);ge(this,No);ge(this,th);ge(this,eh);ge(this,Ao);ge(this,rh);ge(this,ih);Xt(this,ii,r.queryCache||new xI),Xt(this,Eo,r.mutationCache||new yI),Xt(this,No,r.defaultOptions||{}),Xt(this,th,new Map),Xt(this,eh,new Map),Xt(this,Ao,0)}mount(){fp(this,Ao)._++,et(this,Ao)===1&&(Xt(this,rh,B1.subscribe(async r=>{r&&(await this.resumePausedMutations(),et(this,ii).onFocus())})),Xt(this,ih,lg.subscribe(async r=>{r&&(await this.resumePausedMutations(),et(this,ii).onOnline())})))}unmount(){var r,e;fp(this,Ao)._--,et(this,Ao)===0&&((r=et(this,rh))==null||r.call(this),Xt(this,rh,void 0),(e=et(this,ih))==null||e.call(this),Xt(this,ih,void 0))}isFetching(r){return et(this,ii).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return et(this,Eo).findAll({...r,status:"pending"}).length}getQueryData(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=et(this,ii).get(e.queryHash))==null?void 0:i.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),i=et(this,ii).build(this,e),n=i.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&i.isStaleByTime(Lo(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return et(this,ii).findAll(r).map(({queryKey:e,state:i})=>{const n=i.data;return[e,n]})}setQueryData(r,e,i){const n=this.defaultQueryOptions({queryKey:r}),a=et(this,ii).get(n.queryHash),o=a==null?void 0:a.state.data,c=tI(e,o);if(c!==void 0)return et(this,ii).build(this,n).setData(c,{...i,manual:!0})}setQueriesData(r,e,i){return vi.batch(()=>et(this,ii).findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,i)]))}getQueryState(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=et(this,ii).get(e.queryHash))==null?void 0:i.state}removeQueries(r){const e=et(this,ii);vi.batch(()=>{e.findAll(r).forEach(i=>{e.remove(i)})})}resetQueries(r,e){const i=et(this,ii);return vi.batch(()=>(i.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const i={revert:!0,...e},n=vi.batch(()=>et(this,ii).findAll(r).map(a=>a.cancel(i)));return Promise.all(n).then(Qi).catch(Qi)}invalidateQueries(r,e={}){return vi.batch(()=>(et(this,ii).findAll(r).forEach(i=>{i.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},e)))}refetchQueries(r,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},n=vi.batch(()=>et(this,ii).findAll(r).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,i);return i.throwOnError||(o=o.catch(Qi)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Qi)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const i=et(this,ii).build(this,e);return i.isStaleByTime(Lo(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Qi).catch(Qi)}fetchInfiniteQuery(r){return r.behavior=s2(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Qi).catch(Qi)}ensureInfiniteQueryData(r){return r.behavior=s2(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return lg.isOnline()?et(this,Eo).resumePausedMutations():Promise.resolve()}getQueryCache(){return et(this,ii)}getMutationCache(){return et(this,Eo)}getDefaultOptions(){return et(this,No)}setDefaultOptions(r){Xt(this,No,r)}setQueryDefaults(r,e){et(this,th).set(Rl(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...et(this,th).values()],i={};return e.forEach(n=>{yd(r,n.queryKey)&&Object.assign(i,n.defaultOptions)}),i}setMutationDefaults(r,e){et(this,eh).set(Rl(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...et(this,eh).values()],i={};return e.forEach(n=>{yd(r,n.mutationKey)&&Object.assign(i,n.defaultOptions)}),i}defaultQueryOptions(r){if(r._defaulted)return r;const e={...et(this,No).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=N1(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===A1&&(e.enabled=!1),e}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...et(this,No).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){et(this,ii).clear(),et(this,Eo).clear()}},ii=new WeakMap,Eo=new WeakMap,No=new WeakMap,th=new WeakMap,eh=new WeakMap,Ao=new WeakMap,rh=new WeakMap,ih=new WeakMap,aM),mM=q.createContext(void 0),Gr=r=>{const e=q.useContext(mM);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},l2=({client:r,children:e})=>(q.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),m.jsx(mM.Provider,{value:r,children:e})),yM=q.createContext(!1),CI=()=>q.useContext(yM);yM.Provider;function _I(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var kI=q.createContext(_I()),wI=()=>q.useContext(kI),SI=(r,e,i)=>{const n=i!=null&&i.state.error&&typeof r.throwOnError=="function"?M1(r.throwOnError,[i.state.error,i]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||n)&&(e.isReset()||(r.retryOnMount=!1))},TI=r=>{q.useEffect(()=>{r.clearReset()},[r])},EI=({result:r,errorResetBoundary:e,throwOnError:i,query:n,suspense:a})=>r.isError&&!e.isReset()&&!r.isFetching&&n&&(a&&r.data===void 0||M1(i,[r.error,n])),NI=r=>{if(r.suspense){const i=a=>a==="static"?a:Math.max(a??1e3,1e3),n=r.staleTime;r.staleTime=typeof n=="function"?(...a)=>i(n(...a)):i(n),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},AI=(r,e)=>r.isLoading&&r.isFetching&&!e,MI=(r,e)=>(r==null?void 0:r.suspense)&&e.isPending,c2=(r,e,i)=>e.fetchOptimistic(r).catch(()=>{i.clearReset()});function BI(r,e,i){var x,y,v,C;const n=CI(),a=wI(),o=Gr(),c=o.defaultQueryOptions(r);(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",NI(c),SI(c,a,h),TI(a);const u=!o.getQueryCache().get(c.queryHash),[d]=q.useState(()=>new e(o,c)),f=d.getOptimisticResult(c),g=!n&&r.subscribed!==!1;if(q.useSyncExternalStore(q.useCallback(_=>{const k=g?d.subscribe(vi.batchCalls(_)):Qi;return d.updateResult(),k},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),q.useEffect(()=>{d.setOptions(c)},[c,d]),MI(c,f))throw c2(c,d,a);if(EI({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&&AI(f,n)){const _=u?c2(c,d,a):h==null?void 0:h.promise;_==null||_.catch(Qi).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?f:d.trackResult(f)}function dr(r,e){return BI(r,dI)}function ni(r,e){const i=Gr(),[n]=q.useState(()=>new bI(i,r));q.useEffect(()=>{n.setOptions(r)},[n,r]);const a=q.useSyncExternalStore(q.useCallback(c=>n.subscribe(vi.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=q.useCallback((c,h)=>{n.mutate(c,h).catch(Qi)},[n]);if(a.error&&M1(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const LI="/api";let Wx=null;function bM(r){Wx=r}class OI{async request(e,i){const n={"Content-Type":"application/json",...i==null?void 0:i.headers};Wx&&(n["X-Dreamcontext-Vault"]=Wx);const a=await fetch(`${LI}${e}`,{...i,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,i){return this.request(e,{method:"POST",body:JSON.stringify(i)})}patch(e,i){return this.request(e,{method:"PATCH",body:JSON.stringify(i)})}put(e,i){return this.request(e,{method:"PUT",body:JSON.stringify(i)})}del(e){return this.request(e,{method:"DELETE"})}}const ee=new OI,RI=[["vaults"],["launcher-status"],["launcher-federation-graph"],["connections"]];function Wl(r){for(const e of RI)r.invalidateQueries({queryKey:e})}function jI(){const r=Gr();return ni({mutationFn:e=>ee.post("/launcher/register",e),onSuccess:()=>{Wl(r)}})}function DI(){return dr({queryKey:["launcher-defaults"],queryFn:()=>ee.get("/launcher/defaults"),staleTime:1/0})}function FI(){const r=Gr();return ni({mutationFn:e=>ee.post("/launcher/scaffold",e),onSuccess:()=>{Wl(r)}})}function II(){return dr({queryKey:["launcher-catalog"],queryFn:()=>ee.get("/launcher/catalog"),staleTime:1/0})}async function $I(r){return ee.get(`/launcher/detect?path=${encodeURIComponent(r)}`)}function zI(){return dr({queryKey:["launcher-status"],queryFn:()=>ee.get("/launcher/status")})}function xM(){const r=Gr();return ni({mutationFn:e=>ee.post("/launcher/update",{name:e}),onSuccess:()=>{Wl(r)}})}function PI(){const r=Gr();return ni({mutationFn:e=>ee.post("/launcher/unregister",{name:e}),onSuccess:()=>{Wl(r)}})}function qI(){return dr({queryKey:["launcher-federation-graph"],queryFn:()=>ee.get("/launcher/federation-graph")})}function UI(){const r=Gr();return ni({mutationFn:e=>ee.post("/launcher/connection",e),onSuccess:()=>{Wl(r)}})}function HI(){const r=Gr();return ni({mutationFn:e=>ee.post("/launcher/connection/remove",e),onSuccess:()=>{Wl(r)}})}function WI(){const r=Gr();return ni({mutationFn:e=>ee.post("/launcher/shareable",e),onSuccess:()=>{Wl(r)}})}const GI="modulepreload",YI=function(r){return"/"+r},h2={},De=function(e,i,n){let a=Promise.resolve();if(i&&i.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(i.map(d=>{if(d=YI(d),d in h2)return;h2[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":GI,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 KI(){if(Po()){const{open:e}=await De(async()=>{const{open:n}=await import("./index-BK87l45R.js");return{open:n}},__vite__mapDeps([0,1])),i=await e({directory:!0,multiple:!1});return typeof i=="string"?i:null}const r=window.prompt("Enter an absolute path to a dreamcontext project:");return r&&r.trim()?r.trim():null}async function VI(r){if(Po()){const{WebviewWindow:e}=await De(async()=>{const{WebviewWindow:o}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:o}},__vite__mapDeps([2,3,1])),i=`vault-${r.replace(/[^a-zA-Z0-9_-]/g,"-")}`,n=await e.getByLabel(i);if(n){await n.setFocus();return}const a=new e(i,{url:`${window.location.origin}/?vault=${encodeURIComponent(r)}`,title:`dreamcontext — ${r}`,width:1280,height:800,dragDropEnabled:!1});await new Promise((o,c)=>{a.once("tauri://created",()=>o()),a.once("tauri://error",h=>c(new Error(`window create failed: ${String(h.payload)}`)))});return}window.open(`/?vault=${encodeURIComponent(r)}`,"_blank")}const XI=["name","description","targetUser","stack","priority","platforms","packs","review"],ZI=["path","description","targetUser","stack","priority","platforms","packs","review"],QI=["path","platforms","packs","review"],Ub={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 JI({onClose:r,onReady:e}){const i=DI(),n=II(),a=FI(),o=jI(),[c,h]=q.useState(null),[u,d]=q.useState(0),[f,g]=q.useState(null),[x,y]=q.useState(null),[v,C]=q.useState(null),[_,k]=q.useState(!1),[T,N]=q.useState(""),[E,B]=q.useState(""),[O,A]=q.useState(""),[M,F]=q.useState(""),[j,z]=q.useState(""),[U,V]=q.useState(""),[I,G]=q.useState(""),[D,W]=q.useState(["claude"]),[K,tt]=q.useState([]),[nt,Y]=q.useState(!1),rt=q.useRef(null);function ft(Zt,ht,ot){ht(Zt.includes(ot)?Zt.filter(Lt=>Lt!==ot):[...Zt,ot])}q.useEffect(()=>{var Zt;c==="new"&&!E&&((Zt=i.data)!=null&&Zt.defaultParent)&&B(i.data.defaultParent)},[c,E,i.data]);const ct=c==="existing"?nt?QI:ZI:XI,xt=ct[u];q.useEffect(()=>{var Zt;(Zt=rt.current)==null||Zt.focus()},[xt,c]);function st(Zt){h(Zt),d(0),g(null)}async function kt(Zt){g(null);const ht=await KI();if(ht){if(Zt==="parent"){B(ht);return}A(ht);try{const ot=await $I(ht);if(N(ot.name),!U&&ot.stack&&V(ot.stack),Y(ot.hasContext),ot.hasContext){try{await o.mutateAsync({name:ot.name,path:ht})}catch(Lt){const $t=Lt instanceof Error?Lt.message:String(Lt);if(!/already registered/i.test($t))throw Lt}e(ot.name);return}d(1)}catch(ot){g(ot instanceof Error?ot.message:String(ot))}}}const it=q.useMemo(()=>xt==="name"?T.trim().length>0&&E.trim().length>0:xt==="path"?O.trim().length>0:!0,[xt,T,E,O]);function H(){g(null),u<ct.length-1&&d(Zt=>Zt+1)}function J(){g(null),u>0?d(Zt=>Zt-1):h(null)}async function vt(){g(null);const Zt=c==="existing"?{mode:"existing",name:T.trim(),projectPath:O.trim()}:{mode:"new",name:T.trim(),parentDir:E.trim()};Zt.description=M.trim()||void 0,Zt.targetUser=j.trim()||void 0,Zt.stack=U.trim()||void 0,Zt.priority=I.trim()||void 0,Zt.platforms=D.length>0?D:void 0,Zt.packs=K.length>0?K:void 0;try{const ht=await a.mutateAsync(Zt);y(ht.vault),C(ht.cli??null)}catch(ht){g(ht instanceof Error?ht.message:String(ht))}}const At="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 qt(){try{await navigator.clipboard.writeText(At),k(!0),setTimeout(()=>k(!1),1500)}catch{g("Could not copy to clipboard.")}}function ie(Zt,ht,ot){return m.jsx("input",{ref:rt,type:"text",className:"wiz-input",value:Zt,placeholder:ot,onChange:Lt=>ht(Lt.target.value),onKeyDown:Lt=>{Lt.key==="Enter"&&it&&H()}})}function Dt(){var Rt,ne,Ft;if(x)return m.jsxs("div",{className:"wiz-success",children:[m.jsx("div",{className:"wiz-success-check","aria-hidden":!0,children:"✓"}),m.jsxs("h2",{className:"wiz-q",children:["“",x.name,"” is ready"]}),m.jsx("p",{className:"wiz-hint",children:x.path}),(v==null?void 0:v.status)==="installed"&&m.jsx("p",{className:"wiz-hint",children:"Installed the dreamcontext CLI from npm so your hooks work."}),(v==null?void 0:v.status)==="failed"&&m.jsx("div",{className:"wiz-error",children:v.message??"Run: npm install -g dreamcontext"}),m.jsxs("div",{className:"wiz-handoff",children:[m.jsx("div",{className:"wiz-handoff-title",children:"Next: enrich it in Claude Code"}),m.jsx("p",{className:"wiz-hint",children:"The skeleton is in place. Open this project in Claude Code and paste the prompt below so the agent can scan your code and fill in real context."}),m.jsx("pre",{className:"wiz-handoff-prompt",children:At}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:qt,children:_?"Copied ✓":"Copy prompt"})]}),m.jsxs("div",{className:"wiz-actions",children:[m.jsx("button",{type:"button",className:"wiz-btn",onClick:r,children:"Close"}),m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:()=>e(x.name),children:"Open project →"})]})]});if(c===null)return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Add a project"}),m.jsx("p",{className:"wiz-hint",children:"Create something new, or set up a folder you already have."}),m.jsxs("div",{className:"wiz-choices",children:[m.jsxs("button",{type:"button",className:"wiz-choice",onClick:()=>st("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:()=>st("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(xt==="path")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Which folder?"}),m.jsx("p",{className:"wiz-hint",children:"Choose the project folder. If it's already a dreamcontext project, it opens straight away."}),m.jsxs("div",{className:"wiz-row",children:[m.jsx("input",{className:"wiz-input",type:"text",value:O,readOnly:!0,placeholder:"No folder chosen"}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>kt("project"),children:a.isPending?"Working…":"Browse…"})]})]});if(xt==="name")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:Ub.name.label}),m.jsx("p",{className:"wiz-hint",children:Ub.name.hint}),ie(T,N,"my-project"),m.jsx("label",{className:"wiz-sublabel",children:"Where should it live?"}),m.jsxs("div",{className:"wiz-row",children:[m.jsx("input",{className:"wiz-input",type:"text",value:E,placeholder:((Rt=i.data)==null?void 0:Rt.defaultParent)??"~/projects",onChange:Re=>B(Re.target.value)}),m.jsx("button",{type:"button",className:"wiz-btn",onClick:()=>kt("parent"),children:"Browse…"})]}),T.trim()&&E.trim()&&m.jsxs("p",{className:"wiz-hint wiz-preview",children:["Creates: ",E.replace(/\/+$/,""),"/",T.trim()]})]});if(xt==="review")return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:"Ready to set up"}),m.jsxs("dl",{className:"wiz-review",children:[m.jsx("dt",{children:"Name"}),m.jsx("dd",{children:T.trim()}),m.jsx("dt",{children:"Location"}),m.jsx("dd",{children:c==="new"?`${E.replace(/\/+$/,"")}/${T.trim()}`:O}),M.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Description"}),m.jsx("dd",{children:M.trim()})]}),j.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"For"}),m.jsx("dd",{children:j.trim()})]}),U.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Stack"}),m.jsx("dd",{children:U.trim()})]}),I.trim()&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Focus"}),m.jsx("dd",{children:I.trim()})]}),m.jsx("dt",{children:"Platforms"}),m.jsx("dd",{children:(D.length>0?D:["claude"]).map(Re=>{var xe,He;return((He=(xe=n.data)==null?void 0:xe.platforms.find(Me=>Me.id===Re))==null?void 0:He.label)??Re}).join(", ")}),K.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{children:"Skill packs"}),m.jsx("dd",{children:K.join(", ")})]})]})]});if(xt==="platforms"){const Re=((ne=n.data)==null?void 0:ne.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:Re.map(xe=>{const He=D.includes(xe.id);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${He?" wiz-select-on":""}`,onClick:()=>ft(D,W,xe.id),"aria-pressed":He,children:[m.jsxs("span",{className:"wiz-choice-title",children:[xe.label,xe.recommended&&m.jsx("span",{className:"wiz-badge",children:"Recommended"})]}),m.jsx("span",{className:"wiz-hint",children:xe.description})]},xe.id)})}),D.length===0&&m.jsx("p",{className:"wiz-hint wiz-preview",children:"Nothing selected — defaults to Claude."})]})}if(xt==="packs"){const Re=((Ft=n.data)==null?void 0:Ft.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."}),Re.length===0?m.jsx("p",{className:"wiz-hint",children:"No optional packs available."}):m.jsx("div",{className:"wiz-choices",children:Re.map(xe=>{const He=K.includes(xe.name);return m.jsxs("button",{type:"button",className:`wiz-choice wiz-select${He?" wiz-select-on":""}`,onClick:()=>ft(K,tt,xe.name),"aria-pressed":He,children:[m.jsxs("span",{className:"wiz-choice-title",children:[m.jsx("span",{className:"wiz-check","aria-hidden":!0,children:He?"☑":"☐"})," ",xe.name]}),m.jsx("span",{className:"wiz-hint",children:xe.description})]},xe.name)})})]})}const ht=Ub[xt],ot={description:[M,F,"A persistent brain for AI agents…"],targetUser:[j,z,"Developers"],stack:[U,V,"TypeScript, React, Node…"],priority:[I,G,"Initial setup"]},[Lt,$t,Wt]=ot[xt];return m.jsxs("div",{children:[m.jsx("h2",{className:"wiz-q",children:ht.label}),m.jsx("p",{className:"wiz-hint",children:ht.hint}),ie(Lt,$t,Wt)]})}const Ht=xt==="review",Fe=c!==null&&xt!=="path"&&!x;return m.jsx("div",{className:"wiz-overlay",role:"dialog","aria-modal":"true",onClick:r,children:m.jsxs("div",{className:"wiz-modal",onClick:Zt=>Zt.stopPropagation(),children:[m.jsx("button",{type:"button",className:"wiz-close",onClick:r,"aria-label":"Close",children:"×"}),m.jsx("div",{className:"wiz-body",children:Dt()}),f&&m.jsx("div",{className:"wiz-error",children:f}),Fe&&m.jsxs("div",{className:"wiz-actions",children:[m.jsx("button",{type:"button",className:"wiz-btn",onClick:J,children:"Back"}),Ht?m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:vt,disabled:a.isPending||!T.trim(),children:a.isPending?"Setting up…":"Set up project"}):m.jsx("button",{type:"button",className:"wiz-btn wiz-btn-primary",onClick:H,disabled:!it,children:"Next"})]})]})})}function t$(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function e$(r,e,i){return e=c$(e),e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function u2(r,e){return n$(r)||t$(r,e)||vM(r,e)||o$()}function r$(r){return i$(r)||a$(r)||vM(r)||s$()}function i$(r){if(Array.isArray(r))return Gx(r)}function n$(r){if(Array.isArray(r))return r}function a$(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function vM(r,e){if(r){if(typeof r=="string")return Gx(r,e);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Gx(r,e)}}function Gx(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=r[i];return n}function s$(){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 o$(){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 l$(r,e){if(typeof r!="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function c$(r){var e=l$(r,"string");return typeof e=="symbol"?e:String(e)}var h$=function(e,i){var n=new Set(i);return Object.assign.apply(Object,[{}].concat(r$(Object.entries(e).filter(function(a){var o=u2(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=u2(a,2),c=o[0],h=o[1];return e$({},c,h)}))))};function Yx(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function u$(r){if(Array.isArray(r))return r}function d$(r){if(Array.isArray(r))return Yx(r)}function f$(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function p$(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function g$(){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 m$(){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 y$(r,e){return u$(r)||p$(r,e)||CM(r,e)||g$()}function d2(r){return d$(r)||f$(r)||CM(r)||m$()}function CM(r,e){if(r){if(typeof r=="string")return Yx(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Yx(r,e):void 0}}function b$(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.wrapperElementType,n=i===void 0?"div":i,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 q.forwardRef(function(f,g){var x=q.useRef(),y=q.useMemo(function(){var _=Object.fromEntries(d.filter(function(k){return f.hasOwnProperty(k)}).map(function(k){return[k,f[k]]}));return r(_)},[]);f2(function(){y(o(x.current))},q.useLayoutEffect),f2(function(){return y._destructor instanceof Function?y._destructor:void 0});var v=q.useCallback(function(_){for(var k=arguments.length,T=new Array(k>1?k-1:0),N=1;N<k;N++)T[N-1]=arguments[N];return y[_]instanceof Function?y[_].apply(y,T):void 0},[y]),C=q.useRef({});return Object.keys(h$(f,[].concat(d2(h),d2(d)))).filter(function(_){return C.current[_]!==f[_]}).forEach(function(_){return v(_,f[_])}),C.current=f,q.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(_){return[_,function(){for(var k=arguments.length,T=new Array(k),N=0;N<k;N++)T[N]=arguments[N];return v.apply(void 0,[_].concat(T))}]}))},[v]),sM.createElement(n,{ref:x})})}function f2(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q.useEffect,i=q.useRef(),n=q.useRef(!1),a=q.useRef(!1),o=q.useState(0),c=y$(o,2);c[0];var h=c[1];n.current&&(a.current=!0),e(function(){return n.current||(i.current=r(),n.current=!0),h(function(u){return u+1}),function(){a.current&&i.current&&i.current()}},[])}var Kx="http://www.w3.org/1999/xhtml";const p2={svg:"http://www.w3.org/2000/svg",xhtml:Kx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rm(r){var e=r+="",i=e.indexOf(":");return i>=0&&(e=r.slice(0,i))!=="xmlns"&&(r=r.slice(i+1)),p2.hasOwnProperty(e)?{space:p2[e],local:r}:r}function x$(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Kx&&e.documentElement.namespaceURI===Kx?e.createElement(r):e.createElementNS(i,r)}}function v$(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function _M(r){var e=rm(r);return(e.local?v$:x$)(e)}function C$(){}function O1(r){return r==null?C$:function(){return this.querySelector(r)}}function _$(r){typeof r!="function"&&(r=O1(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++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=r.call(u,u.__data__,f,o))&&("__data__"in u&&(d.__data__=u.__data__),h[f]=d);return new Fn(n,this._parents)}function k$(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function w$(){return[]}function kM(r){return r==null?w$:function(){return this.querySelectorAll(r)}}function S$(r){return function(){return k$(r.apply(this,arguments))}}function T$(r){typeof r=="function"?r=S$(r):r=kM(r);for(var e=this._groups,i=e.length,n=[],a=[],o=0;o<i;++o)for(var c=e[o],h=c.length,u,d=0;d<h;++d)(u=c[d])&&(n.push(r.call(u,u.__data__,d,c)),a.push(u));return new Fn(n,a)}function wM(r){return function(){return this.matches(r)}}function SM(r){return function(e){return e.matches(r)}}var E$=Array.prototype.find;function N$(r){return function(){return E$.call(this.children,r)}}function A$(){return this.firstElementChild}function M$(r){return this.select(r==null?A$:N$(typeof r=="function"?r:SM(r)))}var B$=Array.prototype.filter;function L$(){return Array.from(this.children)}function O$(r){return function(){return B$.call(this.children,r)}}function R$(r){return this.selectAll(r==null?L$:O$(typeof r=="function"?r:SM(r)))}function j$(r){typeof r!="function"&&(r=wM(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&r.call(u,u.__data__,d,o)&&h.push(u);return new Fn(n,this._parents)}function TM(r){return new Array(r.length)}function D$(){return new Fn(this._enter||this._groups.map(TM),this._parents)}function cg(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}cg.prototype={constructor:cg,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function F$(r){return function(){return r}}function I$(r,e,i,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):i[c]=new cg(r,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function $$(r,e,i,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(r,o[h],h,o)+"",(u=d.get(y))?(n[h]=u,u.__data__=o[h],d.delete(y)):i[h]=new cg(r,o[h]);for(h=0;h<f;++h)(u=e[h])&&d.get(x[h])===u&&(a[h]=u)}function z$(r){return r.__data__}function P$(r,e){if(!arguments.length)return Array.from(this,z$);var i=e?$$:I$,n=this._parents,a=this._groups;typeof r!="function"&&(r=F$(r));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=q$(r.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);i(f,g,C,_,k,y,e);for(var T=0,N=0,E,B;T<v;++T)if(E=C[T]){for(T>=N&&(N=T+1);!(B=_[N])&&++N<v;);E._next=B||null}}return c=new Fn(c,n),c._enter=h,c._exit=u,c}function q$(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function U$(){return new Fn(this._exit||this._groups.map(TM),this._parents)}function H$(r,e,i){var n=this.enter(),a=this,o=this.exit();return typeof r=="function"?(n=r(n),n&&(n=n.selection())):n=n.append(r+""),e!=null&&(a=e(a),a&&(a=a.selection())),i==null?o.remove():i(o),n&&a?n.merge(a).order():a}function W$(r){for(var e=r.selection?r.selection():r,i=this._groups,n=e._groups,a=i.length,o=n.length,c=Math.min(a,o),h=new Array(a),u=0;u<c;++u)for(var d=i[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]=i[u];return new Fn(h,this._parents)}function G$(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var n=r[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 Y$(r){r||(r=K$);function e(g,x){return g&&x?r(g.__data__,x.__data__):!g-!x}for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o){for(var c=i[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 K$(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function V$(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function X$(){return Array.from(this)}function Z$(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var n=r[e],a=0,o=n.length;a<o;++a){var c=n[a];if(c)return c}return null}function Q$(){let r=0;for(const e of this)++r;return r}function J$(){return!this.node()}function t6(r){for(var e=this._groups,i=0,n=e.length;i<n;++i)for(var a=e[i],o=0,c=a.length,h;o<c;++o)(h=a[o])&&r.call(h,h.__data__,o,a);return this}function e6(r){return function(){this.removeAttribute(r)}}function r6(r){return function(){this.removeAttributeNS(r.space,r.local)}}function i6(r,e){return function(){this.setAttribute(r,e)}}function n6(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function a6(r,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttribute(r):this.setAttribute(r,i)}}function s6(r,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttributeNS(r.space,r.local):this.setAttributeNS(r.space,r.local,i)}}function o6(r,e){var i=rm(r);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((e==null?i.local?r6:e6:typeof e=="function"?i.local?s6:a6:i.local?n6:i6)(i,e))}function EM(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function l6(r){return function(){this.style.removeProperty(r)}}function c6(r,e,i){return function(){this.style.setProperty(r,e,i)}}function h6(r,e,i){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(r):this.style.setProperty(r,n,i)}}function u6(r,e,i){return arguments.length>1?this.each((e==null?l6:typeof e=="function"?h6:c6)(r,e,i??"")):bh(this.node(),r)}function bh(r,e){return r.style.getPropertyValue(e)||EM(r).getComputedStyle(r,null).getPropertyValue(e)}function d6(r){return function(){delete this[r]}}function f6(r,e){return function(){this[r]=e}}function p6(r,e){return function(){var i=e.apply(this,arguments);i==null?delete this[r]:this[r]=i}}function g6(r,e){return arguments.length>1?this.each((e==null?d6:typeof e=="function"?p6:f6)(r,e)):this.node()[r]}function NM(r){return r.trim().split(/^|\s+/)}function R1(r){return r.classList||new AM(r)}function AM(r){this._node=r,this._names=NM(r.getAttribute("class")||"")}AM.prototype={add:function(r){var e=this._names.indexOf(r);e<0&&(this._names.push(r),this._node.setAttribute("class",this._names.join(" ")))},remove:function(r){var e=this._names.indexOf(r);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(r){return this._names.indexOf(r)>=0}};function MM(r,e){for(var i=R1(r),n=-1,a=e.length;++n<a;)i.add(e[n])}function BM(r,e){for(var i=R1(r),n=-1,a=e.length;++n<a;)i.remove(e[n])}function m6(r){return function(){MM(this,r)}}function y6(r){return function(){BM(this,r)}}function b6(r,e){return function(){(e.apply(this,arguments)?MM:BM)(this,r)}}function x6(r,e){var i=NM(r+"");if(arguments.length<2){for(var n=R1(this.node()),a=-1,o=i.length;++a<o;)if(!n.contains(i[a]))return!1;return!0}return this.each((typeof e=="function"?b6:e?m6:y6)(i,e))}function v6(){this.textContent=""}function C6(r){return function(){this.textContent=r}}function _6(r){return function(){var e=r.apply(this,arguments);this.textContent=e??""}}function k6(r){return arguments.length?this.each(r==null?v6:(typeof r=="function"?_6:C6)(r)):this.node().textContent}function w6(){this.innerHTML=""}function S6(r){return function(){this.innerHTML=r}}function T6(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e??""}}function E6(r){return arguments.length?this.each(r==null?w6:(typeof r=="function"?T6:S6)(r)):this.node().innerHTML}function N6(){this.nextSibling&&this.parentNode.appendChild(this)}function A6(){return this.each(N6)}function M6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B6(){return this.each(M6)}function L6(r){var e=typeof r=="function"?r:_M(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function O6(){return null}function R6(r,e){var i=typeof r=="function"?r:_M(r),n=e==null?O6:typeof e=="function"?e:O1(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})}function j6(){var r=this.parentNode;r&&r.removeChild(this)}function D6(){return this.each(j6)}function F6(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function I6(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function $6(r){return this.select(r?I6:F6)}function z6(r){return arguments.length?this.property("__data__",r):this.node().__data__}function P6(r){return function(e){r.call(this,e,this.__data__)}}function q6(r){return r.trim().split(/^|\s+/).map(function(e){var i="",n=e.indexOf(".");return n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),{type:e,name:i}})}function U6(r){return function(){var e=this.__on;if(e){for(var i=0,n=-1,a=e.length,o;i<a;++i)o=e[i],(!r.type||o.type===r.type)&&o.name===r.name?this.removeEventListener(o.type,o.listener,o.options):e[++n]=o;++n?e.length=n:delete this.__on}}}function H6(r,e,i){return function(){var n=this.__on,a,o=P6(e);if(n){for(var c=0,h=n.length;c<h;++c)if((a=n[c]).type===r.type&&a.name===r.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=i),a.value=e;return}}this.addEventListener(r.type,o,i),a={type:r.type,name:r.name,value:e,listener:o,options:i},n?n.push(a):this.__on=[a]}}function W6(r,e,i){var n=q6(r+""),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?H6:U6,a=0;a<o;++a)this.each(h(n[a],e,i));return this}function LM(r,e,i){var n=EM(r),a=n.CustomEvent;typeof a=="function"?a=new a(e,i):(a=n.document.createEvent("Event"),i?(a.initEvent(e,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(e,!1,!1)),r.dispatchEvent(a)}function G6(r,e){return function(){return LM(this,r,e)}}function Y6(r,e){return function(){return LM(this,r,e.apply(this,arguments))}}function K6(r,e){return this.each((typeof e=="function"?Y6:G6)(r,e))}function*V6(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var n=r[e],a=0,o=n.length,c;a<o;++a)(c=n[a])&&(yield c)}var OM=[null];function Fn(r,e){this._groups=r,this._parents=e}function zd(){return new Fn([[document.documentElement]],OM)}function X6(){return this}Fn.prototype=zd.prototype={constructor:Fn,select:_$,selectAll:T$,selectChild:M$,selectChildren:R$,filter:j$,data:P$,enter:D$,exit:U$,join:H$,merge:W$,selection:X6,order:G$,sort:Y$,call:V$,nodes:X$,node:Z$,size:Q$,empty:J$,each:t6,attr:o6,style:u6,property:g6,classed:x6,text:k6,html:E6,raise:A6,lower:B6,append:L6,insert:R6,remove:D6,clone:$6,datum:z6,on:W6,dispatch:K6,[Symbol.iterator]:V6};function _e(r){return typeof r=="string"?new Fn([[document.querySelector(r)]],[document.documentElement]):new Fn([[r]],OM)}function Z6(r){let e;for(;e=r.sourceEvent;)r=e;return r}function $a(r,e){if(r=Z6(r),e===void 0&&(e=r.currentTarget),e){var i=e.ownerSVGElement||e;if(i.createSVGPoint){var n=i.createSVGPoint();return n.x=r.clientX,n.y=r.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[r.clientX-a.left-e.clientLeft,r.clientY-a.top-e.clientTop]}}return[r.pageX,r.pageY]}var Q6={value:()=>{}};function Pd(){for(var r=0,e=arguments.length,i={},n;r<e;++r){if(!(n=arguments[r]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new Wp(i)}function Wp(r){this._=r}function J6(r,e){return r.trim().split(/^|\s+/).map(function(i){var n="",a=i.indexOf(".");if(a>=0&&(n=i.slice(a+1),i=i.slice(0,a)),i&&!e.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}Wp.prototype=Pd.prototype={constructor:Wp,on:function(r,e){var i=this._,n=J6(r+"",i),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(r=n[o]).type)&&(a=tz(i[a],r.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<c;)if(a=(r=n[o]).type)i[a]=g2(i[a],r.name,e);else if(e==null)for(a in i)i[a]=g2(i[a],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Wp(r)},call:function(r,e){if((a=arguments.length-2)>0)for(var i=new Array(a),n=0,a,o;n<a;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(o=this._[r],n=0,a=o.length;n<a;++n)o[n].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var n=this._[r],a=0,o=n.length;a<o;++a)n[a].value.apply(e,i)}};function tz(r,e){for(var i=0,n=r.length,a;i<n;++i)if((a=r[i]).name===e)return a.value}function g2(r,e,i){for(var n=0,a=r.length;n<a;++n)if(r[n].name===e){r[n]=Q6,r=r.slice(0,n).concat(r.slice(n+1));break}return i!=null&&r.push({name:e,value:i}),r}const ez={passive:!1},bd={capture:!0,passive:!1};function Hb(r){r.stopImmediatePropagation()}function qc(r){r.preventDefault(),r.stopImmediatePropagation()}function RM(r){var e=r.document.documentElement,i=_e(r).on("dragstart.drag",qc,bd);"onselectstart"in e?i.on("selectstart.drag",qc,bd):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function jM(r,e){var i=r.document.documentElement,n=_e(r).on("dragstart.drag",null);e&&(n.on("click.drag",qc,bd),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in i?n.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const gp=r=>()=>r;function Vx(r,{sourceEvent:e,subject:i,target:n,identifier:a,active:o,x:c,y:h,dx:u,dy:d,dispatch:f}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:i,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}})}Vx.prototype.on=function(){var r=this._.on.apply(this._,arguments);return r===this._?this:r};function rz(r){return!r.ctrlKey&&!r.button}function iz(){return this.parentNode}function nz(r,e){return e??{x:r.x,y:r.y}}function az(){return navigator.maxTouchPoints||"ontouchstart"in this}function sz(){var r=rz,e=iz,i=nz,n=az,a={},o=Pd("start","drag","end"),c=0,h,u,d,f,g=0;function x(E){E.on("mousedown.drag",y).filter(n).on("touchstart.drag",_).on("touchmove.drag",k,ez).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(E,B){if(!(f||!r.call(this,E,B))){var O=N(this,e.call(this,E,B),E,B,"mouse");O&&(_e(E.view).on("mousemove.drag",v,bd).on("mouseup.drag",C,bd),RM(E.view),Hb(E),d=!1,h=E.clientX,u=E.clientY,O("start",E))}}function v(E){if(qc(E),!d){var B=E.clientX-h,O=E.clientY-u;d=B*B+O*O>g}a.mouse("drag",E)}function C(E){_e(E.view).on("mousemove.drag mouseup.drag",null),jM(E.view,d),qc(E),a.mouse("end",E)}function _(E,B){if(r.call(this,E,B)){var O=E.changedTouches,A=e.call(this,E,B),M=O.length,F,j;for(F=0;F<M;++F)(j=N(this,A,E,B,O[F].identifier,O[F]))&&(Hb(E),j("start",E,O[F]))}}function k(E){var B=E.changedTouches,O=B.length,A,M;for(A=0;A<O;++A)(M=a[B[A].identifier])&&(qc(E),M("drag",E,B[A]))}function T(E){var B=E.changedTouches,O=B.length,A,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<O;++A)(M=a[B[A].identifier])&&(Hb(E),M("end",E,B[A]))}function N(E,B,O,A,M,F){var j=o.copy(),z=$a(F||O,B),U,V,I;if((I=i.call(E,new Vx("beforestart",{sourceEvent:O,target:x,identifier:M,active:c,x:z[0],y:z[1],dx:0,dy:0,dispatch:j}),A))!=null)return U=I.x-z[0]||0,V=I.y-z[1]||0,function G(D,W,K){var tt=z,nt;switch(D){case"start":a[M]=G,nt=c++;break;case"end":delete a[M],--c;case"drag":z=$a(K||W,B),nt=c;break}j.call(D,E,new Vx(D,{sourceEvent:W,subject:I,target:x,identifier:M,active:nt,x:z[0]+U,y:z[1]+V,dx:z[0]-tt[0],dy:z[1]-tt[1],dispatch:j}),A)}}return x.filter=function(E){return arguments.length?(r=typeof E=="function"?E:gp(!!E),x):r},x.container=function(E){return arguments.length?(e=typeof E=="function"?E:gp(E),x):e},x.subject=function(E){return arguments.length?(i=typeof E=="function"?E:gp(E),x):i},x.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:gp(!!E),x):n},x.on=function(){var E=o.on.apply(o,arguments);return E===o?x:E},x.clickDistance=function(E){return arguments.length?(g=(E=+E)*E,x):Math.sqrt(g)},x}function j1(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function DM(r,e){var i=Object.create(r.prototype);for(var n in e)i[n]=e[n];return i}function qd(){}var xd=.7,hg=1/xd,Uc="\\s*([+-]?\\d+)\\s*",vd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oz=/^#([0-9a-f]{3,8})$/,lz=new RegExp(`^rgb\\(${Uc},${Uc},${Uc}\\)$`),cz=new RegExp(`^rgb\\(${Wa},${Wa},${Wa}\\)$`),hz=new RegExp(`^rgba\\(${Uc},${Uc},${Uc},${vd}\\)$`),uz=new RegExp(`^rgba\\(${Wa},${Wa},${Wa},${vd}\\)$`),dz=new RegExp(`^hsl\\(${vd},${Wa},${Wa}\\)$`),fz=new RegExp(`^hsla\\(${vd},${Wa},${Wa},${vd}\\)$`),m2={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};j1(qd,Cd,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:y2,formatHex:y2,formatHex8:pz,formatHsl:gz,formatRgb:b2,toString:b2});function y2(){return this.rgb().formatHex()}function pz(){return this.rgb().formatHex8()}function gz(){return FM(this).formatHsl()}function b2(){return this.rgb().formatRgb()}function Cd(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=oz.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?x2(e):i===3?new Cn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?mp(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?mp(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=lz.exec(r))?new Cn(e[1],e[2],e[3],1):(e=cz.exec(r))?new Cn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=hz.exec(r))?mp(e[1],e[2],e[3],e[4]):(e=uz.exec(r))?mp(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=dz.exec(r))?_2(e[1],e[2]/100,e[3]/100,1):(e=fz.exec(r))?_2(e[1],e[2]/100,e[3]/100,e[4]):m2.hasOwnProperty(r)?x2(m2[r]):r==="transparent"?new Cn(NaN,NaN,NaN,0):null}function x2(r){return new Cn(r>>16&255,r>>8&255,r&255,1)}function mp(r,e,i,n){return n<=0&&(r=e=i=NaN),new Cn(r,e,i,n)}function mz(r){return r instanceof qd||(r=Cd(r)),r?(r=r.rgb(),new Cn(r.r,r.g,r.b,r.opacity)):new Cn}function Xx(r,e,i,n){return arguments.length===1?mz(r):new Cn(r,e,i,n??1)}function Cn(r,e,i,n){this.r=+r,this.g=+e,this.b=+i,this.opacity=+n}j1(Cn,Xx,DM(qd,{brighter(r){return r=r==null?hg:Math.pow(hg,r),new Cn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?xd:Math.pow(xd,r),new Cn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Cn(Ml(this.r),Ml(this.g),Ml(this.b),ug(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:v2,formatHex:v2,formatHex8:yz,formatRgb:C2,toString:C2}));function v2(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}`}function yz(){return`#${yl(this.r)}${yl(this.g)}${yl(this.b)}${yl((isNaN(this.opacity)?1:this.opacity)*255)}`}function C2(){const r=ug(this.opacity);return`${r===1?"rgb(":"rgba("}${Ml(this.r)}, ${Ml(this.g)}, ${Ml(this.b)}${r===1?")":`, ${r})`}`}function ug(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Ml(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function yl(r){return r=Ml(r),(r<16?"0":"")+r.toString(16)}function _2(r,e,i,n){return n<=0?r=e=i=NaN:i<=0||i>=1?r=e=NaN:e<=0&&(r=NaN),new ya(r,e,i,n)}function FM(r){if(r instanceof ya)return new ya(r.h,r.s,r.l,r.opacity);if(r instanceof qd||(r=Cd(r)),!r)return new ya;if(r instanceof ya)return r;r=r.rgb();var e=r.r/255,i=r.g/255,n=r.b/255,a=Math.min(e,i,n),o=Math.max(e,i,n),c=NaN,h=o-a,u=(o+a)/2;return h?(e===o?c=(i-n)/h+(i<n)*6:i===o?c=(n-e)/h+2:c=(e-i)/h+4,h/=u<.5?o+a:2-o-a,c*=60):h=u>0&&u<1?0:c,new ya(c,h,u,r.opacity)}function bz(r,e,i,n){return arguments.length===1?FM(r):new ya(r,e,i,n??1)}function ya(r,e,i,n){this.h=+r,this.s=+e,this.l=+i,this.opacity=+n}j1(ya,bz,DM(qd,{brighter(r){return r=r==null?hg:Math.pow(hg,r),new ya(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?xd:Math.pow(xd,r),new ya(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*e,a=2*i-n;return new Cn(Wb(r>=240?r-240:r+120,a,n),Wb(r,a,n),Wb(r<120?r+240:r-120,a,n),this.opacity)},clamp(){return new ya(k2(this.h),yp(this.s),yp(this.l),ug(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=ug(this.opacity);return`${r===1?"hsl(":"hsla("}${k2(this.h)}, ${yp(this.s)*100}%, ${yp(this.l)*100}%${r===1?")":`, ${r})`}`}}));function k2(r){return r=(r||0)%360,r<0?r+360:r}function yp(r){return Math.max(0,Math.min(1,r||0))}function Wb(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}const D1=r=>()=>r;function IM(r,e){return function(i){return r+i*e}}function xz(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(n){return Math.pow(r+n*e,i)}}function Vot(r,e){var i=e-r;return i?IM(r,i>180||i<-180?i-360*Math.round(i/360):i):D1(isNaN(r)?e:r)}function vz(r){return(r=+r)==1?$M:function(e,i){return i-e?xz(e,i,r):D1(isNaN(e)?i:e)}}function $M(r,e){var i=e-r;return i?IM(r,i):D1(isNaN(r)?e:r)}const w2=(function r(e){var i=vz(e);function n(a,o){var c=i((a=Xx(a)).r,(o=Xx(o)).r),h=i(a.g,o.g),u=i(a.b,o.b),d=$M(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=r,n})(1);function xo(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var Zx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Gb=new RegExp(Zx.source,"g");function Cz(r){return function(){return r}}function _z(r){return function(e){return r(e)+""}}function kz(r,e){var i=Zx.lastIndex=Gb.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(r=r+"",e=e+"";(n=Zx.exec(r))&&(a=Gb.exec(e));)(o=a.index)>i&&(o=e.slice(i,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)})),i=Gb.lastIndex;return i<e.length&&(o=e.slice(i),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?_z(u[0].x):Cz(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 S2=180/Math.PI,Qx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zM(r,e,i,n,a,o){var c,h,u;return(c=Math.sqrt(r*r+e*e))&&(r/=c,e/=c),(u=r*i+e*n)&&(i-=r*u,n-=e*u),(h=Math.sqrt(i*i+n*n))&&(i/=h,n/=h,u/=h),r*n<e*i&&(r=-r,e=-e,u=-u,c=-c),{translateX:a,translateY:o,rotate:Math.atan2(e,r)*S2,skewX:Math.atan(u)*S2,scaleX:c,scaleY:h}}var bp;function wz(r){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?Qx:zM(e.a,e.b,e.c,e.d,e.e,e.f)}function Sz(r){return r==null||(bp||(bp=document.createElementNS("http://www.w3.org/2000/svg","g")),bp.setAttribute("transform",r),!(r=bp.transform.baseVal.consolidate()))?Qx:(r=r.matrix,zM(r.a,r.b,r.c,r.d,r.e,r.f))}function PM(r,e,i,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,i);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+i)}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=r(d),f=r(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 Tz=PM(wz,"px, ","px)","deg)"),Ez=PM(Sz,", ",")",")"),Nz=1e-12;function T2(r){return((r=Math.exp(r))+1/r)/2}function Az(r){return((r=Math.exp(r))-1/r)/2}function Mz(r){return((r=Math.exp(2*r))-1)/(r+1)}const Bz=(function r(e,i,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<Nz)k=Math.log(x/d)/e,_=function(A){return[h+A*y,u+A*v,d*Math.exp(e*A*k)]};else{var T=Math.sqrt(C),N=(x*x-d*d+n*C)/(2*d*i*T),E=(x*x-d*d-n*C)/(2*x*i*T),B=Math.log(Math.sqrt(N*N+1)-N),O=Math.log(Math.sqrt(E*E+1)-E);k=(O-B)/e,_=function(A){var M=A*k,F=T2(B),j=d/(i*T)*(F*Mz(e*M+B)-Az(B));return[h+j*y,u+j*v,d*F/T2(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 r(c,h,u)},a})(Math.SQRT2,2,4);var xh=0,Ku=0,_u=0,qM=1e3,dg,Vu,fg=0,jl=0,im=0,_d=typeof performance=="object"&&performance.now?performance:Date,UM=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function F1(){return jl||(UM(Lz),jl=_d.now()+im)}function Lz(){jl=0}function pg(){this._call=this._time=this._next=null}pg.prototype=I1.prototype={constructor:pg,restart:function(r,e,i){if(typeof r!="function")throw new TypeError("callback is not a function");i=(i==null?F1():+i)+(e==null?0:+e),!this._next&&Vu!==this&&(Vu?Vu._next=this:dg=this,Vu=this),this._call=r,this._time=i,Jx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jx())}};function I1(r,e,i){var n=new pg;return n.restart(r,e,i),n}function Oz(){F1(),++xh;for(var r=dg,e;r;)(e=jl-r._time)>=0&&r._call.call(void 0,e),r=r._next;--xh}function E2(){jl=(fg=_d.now())+im,xh=Ku=0;try{Oz()}finally{xh=0,jz(),jl=0}}function Rz(){var r=_d.now(),e=r-fg;e>qM&&(im-=e,fg=r)}function jz(){for(var r,e=dg,i,n=1/0;e;)e._call?(n>e._time&&(n=e._time),r=e,e=e._next):(i=e._next,e._next=null,e=r?r._next=i:dg=i);Vu=r,Jx(n)}function Jx(r){if(!xh){Ku&&(Ku=clearTimeout(Ku));var e=r-jl;e>24?(r<1/0&&(Ku=setTimeout(E2,r-_d.now()-im)),_u&&(_u=clearInterval(_u))):(_u||(fg=_d.now(),_u=setInterval(Rz,qM)),xh=1,UM(E2))}}function N2(r,e,i){var n=new pg;return e=e==null?0:+e,n.restart(a=>{n.stop(),r(a+e)},e,i),n}var Dz=Pd("start","end","cancel","interrupt"),Fz=[],HM=0,A2=1,tv=2,Gp=3,M2=4,ev=5,Yp=6;function nm(r,e,i,n,a,o){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;Iz(r,i,{name:e,index:n,group:a,on:Dz,tween:Fz,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:HM})}function $1(r,e){var i=wa(r,e);if(i.state>HM)throw new Error("too late; already scheduled");return i}function Xa(r,e){var i=wa(r,e);if(i.state>Gp)throw new Error("too late; already running");return i}function wa(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function Iz(r,e,i){var n=r.__transition,a;n[e]=i,i.timer=I1(o,0,i.time);function o(d){i.state=A2,i.timer.restart(c,i.delay,i.time),i.delay<=d&&c(d-i.delay)}function c(d){var f,g,x,y;if(i.state!==A2)return u();for(f in n)if(y=n[f],y.name===i.name){if(y.state===Gp)return N2(c);y.state===M2?(y.state=Yp,y.timer.stop(),y.on.call("interrupt",r,r.__data__,y.index,y.group),delete n[f]):+f<e&&(y.state=Yp,y.timer.stop(),y.on.call("cancel",r,r.__data__,y.index,y.group),delete n[f])}if(N2(function(){i.state===Gp&&(i.state=M2,i.timer.restart(h,i.delay,i.time),h(d))}),i.state=tv,i.on.call("start",r,r.__data__,i.index,i.group),i.state===tv){for(i.state=Gp,a=new Array(x=i.tween.length),f=0,g=-1;f<x;++f)(y=i.tween[f].value.call(r,r.__data__,i.index,i.group))&&(a[++g]=y);a.length=g+1}}function h(d){for(var f=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(u),i.state=ev,1),g=-1,x=a.length;++g<x;)a[g].call(r,f);i.state===ev&&(i.on.call("end",r,r.__data__,i.index,i.group),u())}function u(){i.state=Yp,i.timer.stop(),delete n[e];for(var d in n)return;delete r.__transition}}function Kp(r,e){var i=r.__transition,n,a,o=!0,c;if(i){e=e==null?null:e+"";for(c in i){if((n=i[c]).name!==e){o=!1;continue}a=n.state>tv&&n.state<ev,n.state=Yp,n.timer.stop(),n.on.call(a?"interrupt":"cancel",r,r.__data__,n.index,n.group),delete i[c]}o&&delete r.__transition}}function $z(r){return this.each(function(){Kp(this,r)})}function zz(r,e){var i,n;return function(){var a=Xa(this,r),o=a.tween;if(o!==i){n=i=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 Pz(r,e,i){var n,a;if(typeof i!="function")throw new Error;return function(){var o=Xa(this,r),c=o.tween;if(c!==n){a=(n=c).slice();for(var h={name:e,value:i},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 qz(r,e){var i=this._id;if(r+="",arguments.length<2){for(var n=wa(this.node(),i).tween,a=0,o=n.length,c;a<o;++a)if((c=n[a]).name===r)return c.value;return null}return this.each((e==null?zz:Pz)(i,r,e))}function z1(r,e,i){var n=r._id;return r.each(function(){var a=Xa(this,n);(a.value||(a.value={}))[e]=i.apply(this,arguments)}),function(a){return wa(a,n).value[e]}}function WM(r,e){var i;return(typeof e=="number"?xo:e instanceof Cd?w2:(i=Cd(e))?(e=i,w2):kz)(r,e)}function Uz(r){return function(){this.removeAttribute(r)}}function Hz(r){return function(){this.removeAttributeNS(r.space,r.local)}}function Wz(r,e,i){var n,a=i+"",o;return function(){var c=this.getAttribute(r);return c===a?null:c===n?o:o=e(n=c,i)}}function Gz(r,e,i){var n,a=i+"",o;return function(){var c=this.getAttributeNS(r.space,r.local);return c===a?null:c===n?o:o=e(n=c,i)}}function Yz(r,e,i){var n,a,o;return function(){var c,h=i(this),u;return h==null?void this.removeAttribute(r):(c=this.getAttribute(r),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Kz(r,e,i){var n,a,o;return function(){var c,h=i(this),u;return h==null?void this.removeAttributeNS(r.space,r.local):(c=this.getAttributeNS(r.space,r.local),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Vz(r,e){var i=rm(r),n=i==="transform"?Ez:WM;return this.attrTween(r,typeof e=="function"?(i.local?Kz:Yz)(i,n,z1(this,"attr."+r,e)):e==null?(i.local?Hz:Uz)(i):(i.local?Gz:Wz)(i,n,e))}function Xz(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function Zz(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function Qz(r,e){var i,n;function a(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&Zz(r,o)),i}return a._value=e,a}function Jz(r,e){var i,n;function a(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&Xz(r,o)),i}return a._value=e,a}function t8(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;var n=rm(r);return this.tween(i,(n.local?Qz:Jz)(n,e))}function e8(r,e){return function(){$1(this,r).delay=+e.apply(this,arguments)}}function r8(r,e){return e=+e,function(){$1(this,r).delay=e}}function i8(r){var e=this._id;return arguments.length?this.each((typeof r=="function"?e8:r8)(e,r)):wa(this.node(),e).delay}function n8(r,e){return function(){Xa(this,r).duration=+e.apply(this,arguments)}}function a8(r,e){return e=+e,function(){Xa(this,r).duration=e}}function s8(r){var e=this._id;return arguments.length?this.each((typeof r=="function"?n8:a8)(e,r)):wa(this.node(),e).duration}function o8(r,e){if(typeof e!="function")throw new Error;return function(){Xa(this,r).ease=e}}function l8(r){var e=this._id;return arguments.length?this.each(o8(e,r)):wa(this.node(),e).ease}function c8(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!="function")throw new Error;Xa(this,r).ease=i}}function h8(r){if(typeof r!="function")throw new Error;return this.each(c8(this._id,r))}function u8(r){typeof r!="function"&&(r=wM(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&r.call(u,u.__data__,d,o)&&h.push(u);return new js(n,this._parents,this._name,this._id)}function d8(r){if(r._id!==this._id)throw new Error;for(var e=this._groups,i=r._groups,n=e.length,a=i.length,o=Math.min(n,a),c=new Array(n),h=0;h<o;++h)for(var u=e[h],d=i[h],f=u.length,g=c[h]=new Array(f),x,y=0;y<f;++y)(x=u[y]||d[y])&&(g[y]=x);for(;h<n;++h)c[h]=e[h];return new js(c,this._parents,this._name,this._id)}function f8(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");return i>=0&&(e=e.slice(0,i)),!e||e==="start"})}function p8(r,e,i){var n,a,o=f8(e)?$1:Xa;return function(){var c=o(this,r),h=c.on;h!==n&&(a=(n=h).copy()).on(e,i),c.on=a}}function g8(r,e){var i=this._id;return arguments.length<2?wa(this.node(),i).on.on(r):this.each(p8(i,r,e))}function m8(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;e&&e.removeChild(this)}}function y8(){return this.on("end.remove",m8(this._id))}function b8(r){var e=this._name,i=this._id;typeof r!="function"&&(r=O1(r));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=r.call(f,f.__data__,x,h))&&("__data__"in f&&(g.__data__=f.__data__),d[x]=g,nm(d[x],e,i,x,d,wa(f,i)));return new js(o,this._parents,e,i)}function x8(r){var e=this._name,i=this._id;typeof r!="function"&&(r=kM(r));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=r.call(f,f.__data__,g,u),y,v=wa(f,i),C=0,_=x.length;C<_;++C)(y=x[C])&&nm(y,e,i,C,x,v);o.push(x),c.push(f)}return new js(o,c,e,i)}var v8=zd.prototype.constructor;function C8(){return new v8(this._groups,this._parents)}function _8(r,e){var i,n,a;return function(){var o=bh(this,r),c=(this.style.removeProperty(r),bh(this,r));return o===c?null:o===i&&c===n?a:a=e(i=o,n=c)}}function GM(r){return function(){this.style.removeProperty(r)}}function k8(r,e,i){var n,a=i+"",o;return function(){var c=bh(this,r);return c===a?null:c===n?o:o=e(n=c,i)}}function w8(r,e,i){var n,a,o;return function(){var c=bh(this,r),h=i(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(r),bh(this,r))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function S8(r,e){var i,n,a,o="style."+e,c="end."+o,h;return function(){var u=Xa(this,r),d=u.on,f=u.value[o]==null?h||(h=GM(e)):void 0;(d!==i||a!==f)&&(n=(i=d).copy()).on(c,a=f),u.on=n}}function T8(r,e,i){var n=(r+="")=="transform"?Tz:WM;return e==null?this.styleTween(r,_8(r,n)).on("end.style."+r,GM(r)):typeof e=="function"?this.styleTween(r,w8(r,n,z1(this,"style."+r,e))).each(S8(this._id,r)):this.styleTween(r,k8(r,n,e),i).on("end.style."+r,null)}function E8(r,e,i){return function(n){this.style.setProperty(r,e.call(this,n),i)}}function N8(r,e,i){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&E8(r,c,i)),n}return o._value=e,o}function A8(r,e,i){var n="style."+(r+="");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,N8(r,e,i??""))}function M8(r){return function(){this.textContent=r}}function B8(r){return function(){var e=r(this);this.textContent=e??""}}function L8(r){return this.tween("text",typeof r=="function"?B8(z1(this,"text",r)):M8(r==null?"":r+""))}function O8(r){return function(e){this.textContent=r.call(this,e)}}function R8(r){var e,i;function n(){var a=r.apply(this,arguments);return a!==i&&(e=(i=a)&&O8(a)),e}return n._value=r,n}function j8(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!="function")throw new Error;return this.tween(e,R8(r))}function D8(){for(var r=this._name,e=this._id,i=YM(),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);nm(u,r,i,d,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new js(n,this._parents,r,i)}function F8(){var r,e,i=this,n=i._id,a=i.size();return new Promise(function(o,c){var h={value:c},u={value:function(){--a===0&&o()}};i.each(function(){var d=Xa(this,n),f=d.on;f!==r&&(e=(r=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(u)),d.on=e}),a===0&&o()})}var I8=0;function js(r,e,i,n){this._groups=r,this._parents=e,this._name=i,this._id=n}function YM(){return++I8}var ms=zd.prototype;js.prototype={constructor:js,select:b8,selectAll:x8,selectChild:ms.selectChild,selectChildren:ms.selectChildren,filter:u8,merge:d8,selection:C8,transition:D8,call:ms.call,nodes:ms.nodes,node:ms.node,size:ms.size,empty:ms.empty,each:ms.each,on:g8,attr:Vz,attrTween:t8,style:T8,styleTween:A8,text:L8,textTween:j8,remove:y8,tween:qz,delay:i8,duration:s8,ease:l8,easeVarying:h8,end:F8,[Symbol.iterator]:ms[Symbol.iterator]};function $8(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var z8={time:null,delay:0,duration:250,ease:$8};function P8(r,e){for(var i;!(i=r.__transition)||!(i=i[e]);)if(!(r=r.parentNode))throw new Error(`transition ${e} not found`);return i}function q8(r){var e,i;r instanceof js?(e=r._id,r=r._name):(e=YM(),(i=z8).time=F1(),r=r==null?null:r+"");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])&&nm(u,r,e,d,c,i||P8(u,e));return new js(n,this._parents,r,e)}zd.prototype.interrupt=$z;zd.prototype.transition=q8;const xp=r=>()=>r;function U8(r,{sourceEvent:e,target:i,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function Ns(r,e,i){this.k=r,this.x=e,this.y=i}Ns.prototype={constructor:Ns,scale:function(r){return r===1?this:new Ns(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new Ns(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var P1=new Ns(1,0,0);Fa.prototype=Ns.prototype;function Fa(r){for(;!r.__zoom;)if(!(r=r.parentNode))return P1;return r.__zoom}function Yb(r){r.stopImmediatePropagation()}function ku(r){r.preventDefault(),r.stopImmediatePropagation()}function H8(r){return(!r.ctrlKey||r.type==="wheel")&&!r.button}function W8(){var r=this;return r instanceof SVGElement?(r=r.ownerSVGElement||r,r.hasAttribute("viewBox")?(r=r.viewBox.baseVal,[[r.x,r.y],[r.x+r.width,r.y+r.height]]):[[0,0],[r.width.baseVal.value,r.height.baseVal.value]]):[[0,0],[r.clientWidth,r.clientHeight]]}function B2(){return this.__zoom||P1}function G8(r){return-r.deltaY*(r.deltaMode===1?.05:r.deltaMode?1:.002)*(r.ctrlKey?10:1)}function Y8(){return navigator.maxTouchPoints||"ontouchstart"in this}function K8(r,e,i){var n=r.invertX(e[0][0])-i[0][0],a=r.invertX(e[1][0])-i[1][0],o=r.invertY(e[0][1])-i[0][1],c=r.invertY(e[1][1])-i[1][1];return r.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 V8(){var r=H8,e=W8,i=K8,n=G8,a=Y8,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=Bz,d=Pd("start","zoom","end"),f,g,x,y=500,v=150,C=0,_=10;function k(I){I.property("__zoom",B2).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",j).filter(a).on("touchstart.zoom",z).on("touchmove.zoom",U).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(I,G,D,W){var K=I.selection?I.selection():I;K.property("__zoom",B2),I!==K?B(I,G,D,W):K.interrupt().each(function(){O(this,arguments).event(W).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},k.scaleBy=function(I,G,D,W){k.scaleTo(I,function(){var K=this.__zoom.k,tt=typeof G=="function"?G.apply(this,arguments):G;return K*tt},D,W)},k.scaleTo=function(I,G,D,W){k.transform(I,function(){var K=e.apply(this,arguments),tt=this.__zoom,nt=D==null?E(K):typeof D=="function"?D.apply(this,arguments):D,Y=tt.invert(nt),rt=typeof G=="function"?G.apply(this,arguments):G;return i(N(T(tt,rt),nt,Y),K,c)},D,W)},k.translateBy=function(I,G,D,W){k.transform(I,function(){return i(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,W)},k.translateTo=function(I,G,D,W,K){k.transform(I,function(){var tt=e.apply(this,arguments),nt=this.__zoom,Y=W==null?E(tt):typeof W=="function"?W.apply(this,arguments):W;return i(P1.translate(Y[0],Y[1]).scale(nt.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof D=="function"?-D.apply(this,arguments):-D),tt,c)},W,K)};function T(I,G){return G=Math.max(o[0],Math.min(o[1],G)),G===I.k?I:new Ns(G,I.x,I.y)}function N(I,G,D){var W=G[0]-D[0]*I.k,K=G[1]-D[1]*I.k;return W===I.x&&K===I.y?I:new Ns(I.k,W,K)}function E(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function B(I,G,D,W){I.on("start.zoom",function(){O(this,arguments).event(W).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(W).end()}).tween("zoom",function(){var K=this,tt=arguments,nt=O(K,tt).event(W),Y=e.apply(K,tt),rt=D==null?E(Y):typeof D=="function"?D.apply(K,tt):D,ft=Math.max(Y[1][0]-Y[0][0],Y[1][1]-Y[0][1]),ct=K.__zoom,xt=typeof G=="function"?G.apply(K,tt):G,st=u(ct.invert(rt).concat(ft/ct.k),xt.invert(rt).concat(ft/xt.k));return function(kt){if(kt===1)kt=xt;else{var it=st(kt),H=ft/it[2];kt=new Ns(H,rt[0]-it[0]*H,rt[1]-it[1]*H)}nt.zoom(null,kt)}})}function O(I,G,D){return!D&&I.__zooming||new A(I,G)}function A(I,G){this.that=I,this.args=G,this.active=0,this.sourceEvent=null,this.extent=e.apply(I,G),this.taps=0}A.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,G){return this.mouse&&I!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&I!=="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(I){var G=_e(this.that).datum();d.call(I,this.that,new U8(I,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),G)}};function M(I,...G){if(!r.apply(this,arguments))return;var D=O(this,G).event(I),W=this.__zoom,K=Math.max(o[0],Math.min(o[1],W.k*Math.pow(2,n.apply(this,arguments)))),tt=$a(I);if(D.wheel)(D.mouse[0][0]!==tt[0]||D.mouse[0][1]!==tt[1])&&(D.mouse[1]=W.invert(D.mouse[0]=tt)),clearTimeout(D.wheel);else{if(W.k===K)return;D.mouse=[tt,W.invert(tt)],Kp(this),D.start()}ku(I),D.wheel=setTimeout(nt,v),D.zoom("mouse",i(N(T(W,K),D.mouse[0],D.mouse[1]),D.extent,c));function nt(){D.wheel=null,D.end()}}function F(I,...G){if(x||!r.apply(this,arguments))return;var D=I.currentTarget,W=O(this,G,!0).event(I),K=_e(I.view).on("mousemove.zoom",rt,!0).on("mouseup.zoom",ft,!0),tt=$a(I,D),nt=I.clientX,Y=I.clientY;RM(I.view),Yb(I),W.mouse=[tt,this.__zoom.invert(tt)],Kp(this),W.start();function rt(ct){if(ku(ct),!W.moved){var xt=ct.clientX-nt,st=ct.clientY-Y;W.moved=xt*xt+st*st>C}W.event(ct).zoom("mouse",i(N(W.that.__zoom,W.mouse[0]=$a(ct,D),W.mouse[1]),W.extent,c))}function ft(ct){K.on("mousemove.zoom mouseup.zoom",null),jM(ct.view,W.moved),ku(ct),W.event(ct).end()}}function j(I,...G){if(r.apply(this,arguments)){var D=this.__zoom,W=$a(I.changedTouches?I.changedTouches[0]:I,this),K=D.invert(W),tt=D.k*(I.shiftKey?.5:2),nt=i(N(T(D,tt),W,K),e.apply(this,G),c);ku(I),h>0?_e(this).transition().duration(h).call(B,nt,W,I):_e(this).call(k.transform,nt,W,I)}}function z(I,...G){if(r.apply(this,arguments)){var D=I.touches,W=D.length,K=O(this,G,I.changedTouches.length===W).event(I),tt,nt,Y,rt;for(Yb(I),nt=0;nt<W;++nt)Y=D[nt],rt=$a(Y,this),rt=[rt,this.__zoom.invert(rt),Y.identifier],K.touch0?!K.touch1&&K.touch0[2]!==rt[2]&&(K.touch1=rt,K.taps=0):(K.touch0=rt,tt=!0,K.taps=1+!!f);f&&(f=clearTimeout(f)),tt&&(K.taps<2&&(g=rt[0],f=setTimeout(function(){f=null},y)),Kp(this),K.start())}}function U(I,...G){if(this.__zooming){var D=O(this,G).event(I),W=I.changedTouches,K=W.length,tt,nt,Y,rt;for(ku(I),tt=0;tt<K;++tt)nt=W[tt],Y=$a(nt,this),D.touch0&&D.touch0[2]===nt.identifier?D.touch0[0]=Y:D.touch1&&D.touch1[2]===nt.identifier&&(D.touch1[0]=Y);if(nt=D.that.__zoom,D.touch1){var ft=D.touch0[0],ct=D.touch0[1],xt=D.touch1[0],st=D.touch1[1],kt=(kt=xt[0]-ft[0])*kt+(kt=xt[1]-ft[1])*kt,it=(it=st[0]-ct[0])*it+(it=st[1]-ct[1])*it;nt=T(nt,Math.sqrt(kt/it)),Y=[(ft[0]+xt[0])/2,(ft[1]+xt[1])/2],rt=[(ct[0]+st[0])/2,(ct[1]+st[1])/2]}else if(D.touch0)Y=D.touch0[0],rt=D.touch0[1];else return;D.zoom("touch",i(N(nt,Y,rt),D.extent,c))}}function V(I,...G){if(this.__zooming){var D=O(this,G).event(I),W=I.changedTouches,K=W.length,tt,nt;for(Yb(I),x&&clearTimeout(x),x=setTimeout(function(){x=null},y),tt=0;tt<K;++tt)nt=W[tt],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 Y=_e(this).on("dblclick.zoom");Y&&Y.apply(this,arguments)}}}return k.wheelDelta=function(I){return arguments.length?(n=typeof I=="function"?I:xp(+I),k):n},k.filter=function(I){return arguments.length?(r=typeof I=="function"?I:xp(!!I),k):r},k.touchable=function(I){return arguments.length?(a=typeof I=="function"?I:xp(!!I),k):a},k.extent=function(I){return arguments.length?(e=typeof I=="function"?I:xp([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),k):e},k.scaleExtent=function(I){return arguments.length?(o[0]=+I[0],o[1]=+I[1],k):[o[0],o[1]]},k.translateExtent=function(I){return arguments.length?(c[0][0]=+I[0][0],c[1][0]=+I[1][0],c[0][1]=+I[0][1],c[1][1]=+I[1][1],k):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},k.constrain=function(I){return arguments.length?(i=I,k):i},k.duration=function(I){return arguments.length?(h=+I,k):h},k.interpolate=function(I){return arguments.length?(u=I,k):u},k.on=function(){var I=d.on.apply(d,arguments);return I===d?k:I},k.clickDistance=function(I){return arguments.length?(C=(I=+I)*I,k):Math.sqrt(C)},k.tapDistance=function(I){return arguments.length?(_=+I,k):_},k}class L2 extends Map{constructor(e,i=Q8){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:i}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(O2(this,e))}has(e){return super.has(O2(this,e))}set(e,i){return super.set(X8(this,e),i)}delete(e){return super.delete(Z8(this,e))}}function O2({_intern:r,_key:e},i){const n=e(i);return r.has(n)?r.get(n):i}function X8({_intern:r,_key:e},i){const n=e(i);return r.has(n)?r.get(n):(r.set(n,i),i)}function Z8({_intern:r,_key:e},i){const n=e(i);return r.has(n)&&(i=r.get(n),r.delete(n)),i}function Q8(r){return r!==null&&typeof r=="object"?r.valueOf():r}function R2(r,e){let i;if(e===void 0)for(const n of r)n!=null&&(i<n||i===void 0&&n>=n)&&(i=n);else{let n=-1;for(let a of r)(a=e(a,++n,r))!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}return i}function j2(r,e){let i;if(e===void 0)for(const n of r)n!=null&&(i>n||i===void 0&&n>=n)&&(i=n);else{let n=-1;for(let a of r)(a=e(a,++n,r))!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}return i}function J8(r,e){let i=0;for(let n of r)(n=+n)&&(i+=n);return i}var KM=typeof global=="object"&&global&&global.Object===Object&&global,tP=typeof self=="object"&&self&&self.Object===Object&&self,Sa=KM||tP||Function("return this")(),gg=Sa.Symbol,VM=Object.prototype,eP=VM.hasOwnProperty,rP=VM.toString,wu=gg?gg.toStringTag:void 0;function iP(r){var e=eP.call(r,wu),i=r[wu];try{r[wu]=void 0;var n=!0}catch{}var a=rP.call(r);return n&&(e?r[wu]=i:delete r[wu]),a}var nP=Object.prototype,aP=nP.toString;function sP(r){return aP.call(r)}var oP="[object Null]",lP="[object Undefined]",D2=gg?gg.toStringTag:void 0;function Gl(r){return r==null?r===void 0?lP:oP:D2&&D2 in Object(r)?iP(r):sP(r)}function Eh(r){return r!=null&&typeof r=="object"}var cP="[object Symbol]";function hP(r){return typeof r=="symbol"||Eh(r)&&Gl(r)==cP}var mg=Array.isArray,uP=/\s/;function dP(r){for(var e=r.length;e--&&uP.test(r.charAt(e)););return e}var fP=/^\s+/;function pP(r){return r&&r.slice(0,dP(r)+1).replace(fP,"")}function _a(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var F2=NaN,gP=/^[-+]0x[0-9a-f]+$/i,mP=/^0b[01]+$/i,yP=/^0o[0-7]+$/i,bP=parseInt;function I2(r){if(typeof r=="number")return r;if(hP(r))return F2;if(_a(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=_a(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=pP(r);var i=mP.test(r);return i||yP.test(r)?bP(r.slice(2),i?2:8):gP.test(r)?F2:+r}function XM(r){return r}var xP="[object AsyncFunction]",vP="[object Function]",CP="[object GeneratorFunction]",_P="[object Proxy]";function q1(r){if(!_a(r))return!1;var e=Gl(r);return e==vP||e==CP||e==xP||e==_P}var Kb=Sa["__core-js_shared__"],$2=(function(){var r=/[^.]+$/.exec(Kb&&Kb.keys&&Kb.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function kP(r){return!!$2&&$2 in r}var wP=Function.prototype,SP=wP.toString;function Yl(r){if(r!=null){try{return SP.call(r)}catch{}try{return r+""}catch{}}return""}var TP=/[\\^$.*+?()[\]{}|]/g,EP=/^\[object .+?Constructor\]$/,NP=Function.prototype,AP=Object.prototype,MP=NP.toString,BP=AP.hasOwnProperty,LP=RegExp("^"+MP.call(BP).replace(TP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OP(r){if(!_a(r)||kP(r))return!1;var e=q1(r)?LP:EP;return e.test(Yl(r))}function RP(r,e){return r==null?void 0:r[e]}function Kl(r,e){var i=RP(r,e);return OP(i)?i:void 0}var rv=Kl(Sa,"WeakMap"),z2=Object.create,jP=(function(){function r(){}return function(e){if(!_a(e))return{};if(z2)return z2(e);r.prototype=e;var i=new r;return r.prototype=void 0,i}})();function DP(r,e,i){switch(i.length){case 0:return r.call(e);case 1:return r.call(e,i[0]);case 2:return r.call(e,i[0],i[1]);case 3:return r.call(e,i[0],i[1],i[2])}return r.apply(e,i)}function FP(r,e){var i=-1,n=r.length;for(e||(e=Array(n));++i<n;)e[i]=r[i];return e}var IP=800,$P=16,zP=Date.now;function PP(r){var e=0,i=0;return function(){var n=zP(),a=$P-(n-i);if(i=n,a>0){if(++e>=IP)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function qP(r){return function(){return r}}var yg=(function(){try{var r=Kl(Object,"defineProperty");return r({},"",{}),r}catch{}})(),UP=yg?function(r,e){return yg(r,"toString",{configurable:!0,enumerable:!1,value:qP(e),writable:!0})}:XM,HP=PP(UP),WP=9007199254740991,GP=/^(?:0|[1-9]\d*)$/;function ZM(r,e){var i=typeof r;return e=e??WP,!!e&&(i=="number"||i!="symbol"&&GP.test(r))&&r>-1&&r%1==0&&r<e}function U1(r,e,i){e=="__proto__"&&yg?yg(r,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[e]=i}function am(r,e){return r===e||r!==r&&e!==e}var YP=Object.prototype,KP=YP.hasOwnProperty;function VP(r,e,i){var n=r[e];(!(KP.call(r,e)&&am(n,i))||i===void 0&&!(e in r))&&U1(r,e,i)}function XP(r,e,i,n){var a=!i;i||(i={});for(var o=-1,c=e.length;++o<c;){var h=e[o],u=void 0;u===void 0&&(u=r[h]),a?U1(i,h,u):VP(i,h,u)}return i}var P2=Math.max;function ZP(r,e,i){return e=P2(e===void 0?r.length-1:e,0),function(){for(var n=arguments,a=-1,o=P2(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]=i(c),DP(r,this,h)}}function QP(r,e){return HP(ZP(r,e,XM),r+"")}var JP=9007199254740991;function QM(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=JP}function sm(r){return r!=null&&QM(r.length)&&!q1(r)}function tq(r,e,i){if(!_a(i))return!1;var n=typeof e;return(n=="number"?sm(i)&&ZM(e,i.length):n=="string"&&e in i)?am(i[e],r):!1}function eq(r){return QP(function(e,i){var n=-1,a=i.length,o=a>1?i[a-1]:void 0,c=a>2?i[2]:void 0;for(o=r.length>3&&typeof o=="function"?(a--,o):void 0,c&&tq(i[0],i[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var h=i[n];h&&r(e,h,n,o)}return e})}var rq=Object.prototype;function om(r){var e=r&&r.constructor,i=typeof e=="function"&&e.prototype||rq;return r===i}function iq(r,e){for(var i=-1,n=Array(r);++i<r;)n[i]=e(i);return n}var nq="[object Arguments]";function q2(r){return Eh(r)&&Gl(r)==nq}var JM=Object.prototype,aq=JM.hasOwnProperty,sq=JM.propertyIsEnumerable,bg=q2((function(){return arguments})())?q2:function(r){return Eh(r)&&aq.call(r,"callee")&&!sq.call(r,"callee")};function oq(){return!1}var tB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,U2=tB&&typeof module=="object"&&module&&!module.nodeType&&module,lq=U2&&U2.exports===tB,H2=lq?Sa.Buffer:void 0,cq=H2?H2.isBuffer:void 0,H1=cq||oq,hq="[object Arguments]",uq="[object Array]",dq="[object Boolean]",fq="[object Date]",pq="[object Error]",gq="[object Function]",mq="[object Map]",yq="[object Number]",bq="[object Object]",xq="[object RegExp]",vq="[object Set]",Cq="[object String]",_q="[object WeakMap]",kq="[object ArrayBuffer]",wq="[object DataView]",Sq="[object Float32Array]",Tq="[object Float64Array]",Eq="[object Int8Array]",Nq="[object Int16Array]",Aq="[object Int32Array]",Mq="[object Uint8Array]",Bq="[object Uint8ClampedArray]",Lq="[object Uint16Array]",Oq="[object Uint32Array]",zr={};zr[Sq]=zr[Tq]=zr[Eq]=zr[Nq]=zr[Aq]=zr[Mq]=zr[Bq]=zr[Lq]=zr[Oq]=!0;zr[hq]=zr[uq]=zr[kq]=zr[dq]=zr[wq]=zr[fq]=zr[pq]=zr[gq]=zr[mq]=zr[yq]=zr[bq]=zr[xq]=zr[vq]=zr[Cq]=zr[_q]=!1;function Rq(r){return Eh(r)&&QM(r.length)&&!!zr[Gl(r)]}function jq(r){return function(e){return r(e)}}var eB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ad=eB&&typeof module=="object"&&module&&!module.nodeType&&module,Dq=ad&&ad.exports===eB,Vb=Dq&&KM.process,W2=(function(){try{var r=ad&&ad.require&&ad.require("util").types;return r||Vb&&Vb.binding&&Vb.binding("util")}catch{}})(),G2=W2&&W2.isTypedArray,W1=G2?jq(G2):Rq,Fq=Object.prototype,Iq=Fq.hasOwnProperty;function $q(r,e){var i=mg(r),n=!i&&bg(r),a=!i&&!n&&H1(r),o=!i&&!n&&!a&&W1(r),c=i||n||a||o,h=c?iq(r.length,String):[],u=h.length;for(var d in r)(e||Iq.call(r,d))&&!(c&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||ZM(d,u)))&&h.push(d);return h}function rB(r,e){return function(i){return r(e(i))}}var zq=rB(Object.keys,Object),Pq=Object.prototype,qq=Pq.hasOwnProperty;function Uq(r){if(!om(r))return zq(r);var e=[];for(var i in Object(r))qq.call(r,i)&&i!="constructor"&&e.push(i);return e}function Hq(r){var e=[];if(r!=null)for(var i in Object(r))e.push(i);return e}var Wq=Object.prototype,Gq=Wq.hasOwnProperty;function Yq(r){if(!_a(r))return Hq(r);var e=om(r),i=[];for(var n in r)n=="constructor"&&(e||!Gq.call(r,n))||i.push(n);return i}function iB(r){return sm(r)?$q(r,!0):Yq(r)}var kd=Kl(Object,"create");function Kq(){this.__data__=kd?kd(null):{},this.size=0}function Vq(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Xq="__lodash_hash_undefined__",Zq=Object.prototype,Qq=Zq.hasOwnProperty;function Jq(r){var e=this.__data__;if(kd){var i=e[r];return i===Xq?void 0:i}return Qq.call(e,r)?e[r]:void 0}var t9=Object.prototype,e9=t9.hasOwnProperty;function r9(r){var e=this.__data__;return kd?e[r]!==void 0:e9.call(e,r)}var i9="__lodash_hash_undefined__";function n9(r,e){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=kd&&e===void 0?i9:e,this}function Dl(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}Dl.prototype.clear=Kq;Dl.prototype.delete=Vq;Dl.prototype.get=Jq;Dl.prototype.has=r9;Dl.prototype.set=n9;function a9(){this.__data__=[],this.size=0}function lm(r,e){for(var i=r.length;i--;)if(am(r[i][0],e))return i;return-1}var s9=Array.prototype,o9=s9.splice;function l9(r){var e=this.__data__,i=lm(e,r);if(i<0)return!1;var n=e.length-1;return i==n?e.pop():o9.call(e,i,1),--this.size,!0}function c9(r){var e=this.__data__,i=lm(e,r);return i<0?void 0:e[i][1]}function h9(r){return lm(this.__data__,r)>-1}function u9(r,e){var i=this.__data__,n=lm(i,r);return n<0?(++this.size,i.push([r,e])):i[n][1]=e,this}function Fs(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}Fs.prototype.clear=a9;Fs.prototype.delete=l9;Fs.prototype.get=c9;Fs.prototype.has=h9;Fs.prototype.set=u9;var wd=Kl(Sa,"Map");function d9(){this.size=0,this.__data__={hash:new Dl,map:new(wd||Fs),string:new Dl}}function f9(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function cm(r,e){var i=r.__data__;return f9(e)?i[typeof e=="string"?"string":"hash"]:i.map}function p9(r){var e=cm(this,r).delete(r);return this.size-=e?1:0,e}function g9(r){return cm(this,r).get(r)}function m9(r){return cm(this,r).has(r)}function y9(r,e){var i=cm(this,r),n=i.size;return i.set(r,e),this.size+=i.size==n?0:1,this}function qo(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}qo.prototype.clear=d9;qo.prototype.delete=p9;qo.prototype.get=g9;qo.prototype.has=m9;qo.prototype.set=y9;var b9="Expected a function";function Ud(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(b9);var i=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=i.cache;if(o.has(a))return o.get(a);var c=r.apply(this,n);return i.cache=o.set(a,c)||o,c};return i.cache=new(Ud.Cache||qo),i}Ud.Cache=qo;var nB=rB(Object.getPrototypeOf,Object),x9="[object Object]",v9=Function.prototype,C9=Object.prototype,aB=v9.toString,_9=C9.hasOwnProperty,k9=aB.call(Object);function w9(r){if(!Eh(r)||Gl(r)!=x9)return!1;var e=nB(r);if(e===null)return!0;var i=_9.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&aB.call(i)==k9}function S9(){this.__data__=new Fs,this.size=0}function T9(r){var e=this.__data__,i=e.delete(r);return this.size=e.size,i}function E9(r){return this.__data__.get(r)}function N9(r){return this.__data__.has(r)}var A9=200;function M9(r,e){var i=this.__data__;if(i instanceof Fs){var n=i.__data__;if(!wd||n.length<A9-1)return n.push([r,e]),this.size=++i.size,this;i=this.__data__=new qo(n)}return i.set(r,e),this.size=i.size,this}function Nh(r){var e=this.__data__=new Fs(r);this.size=e.size}Nh.prototype.clear=S9;Nh.prototype.delete=T9;Nh.prototype.get=E9;Nh.prototype.has=N9;Nh.prototype.set=M9;var sB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Y2=sB&&typeof module=="object"&&module&&!module.nodeType&&module,B9=Y2&&Y2.exports===sB,K2=B9?Sa.Buffer:void 0,V2=K2?K2.allocUnsafe:void 0;function L9(r,e){if(e)return r.slice();var i=r.length,n=V2?V2(i):new r.constructor(i);return r.copy(n),n}var iv=Kl(Sa,"DataView"),nv=Kl(Sa,"Promise"),av=Kl(Sa,"Set"),X2="[object Map]",O9="[object Object]",Z2="[object Promise]",Q2="[object Set]",J2="[object WeakMap]",tT="[object DataView]",R9=Yl(iv),j9=Yl(wd),D9=Yl(nv),F9=Yl(av),I9=Yl(rv),dl=Gl;(iv&&dl(new iv(new ArrayBuffer(1)))!=tT||wd&&dl(new wd)!=X2||nv&&dl(nv.resolve())!=Z2||av&&dl(new av)!=Q2||rv&&dl(new rv)!=J2)&&(dl=function(r){var e=Gl(r),i=e==O9?r.constructor:void 0,n=i?Yl(i):"";if(n)switch(n){case R9:return tT;case j9:return X2;case D9:return Z2;case F9:return Q2;case I9:return J2}return e});var eT=Sa.Uint8Array;function $9(r){var e=new r.constructor(r.byteLength);return new eT(e).set(new eT(r)),e}function z9(r,e){var i=e?$9(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}function P9(r){return typeof r.constructor=="function"&&!om(r)?jP(nB(r)):{}}function q9(r){return function(e,i,n){for(var a=-1,o=Object(e),c=n(e),h=c.length;h--;){var u=c[++a];if(i(o[u],u,o)===!1)break}return e}}var U9=q9(),Xb=function(){return Sa.Date.now()},H9="Expected a function",W9=Math.max,G9=Math.min;function oB(r,e,i){var n,a,o,c,h,u,d=0,f=!1,g=!1,x=!0;if(typeof r!="function")throw new TypeError(H9);e=I2(e)||0,_a(i)&&(f=!!i.leading,g="maxWait"in i,o=g?W9(I2(i.maxWait)||0,e):o,x="trailing"in i?!!i.trailing:x);function y(O){var A=n,M=a;return n=a=void 0,d=O,c=r.apply(M,A),c}function v(O){return d=O,h=setTimeout(k,e),f?y(O):c}function C(O){var A=O-u,M=O-d,F=e-A;return g?G9(F,o-M):F}function _(O){var A=O-u,M=O-d;return u===void 0||A>=e||A<0||g&&M>=o}function k(){var O=Xb();if(_(O))return T(O);h=setTimeout(k,C(O))}function T(O){return h=void 0,x&&n?y(O):(n=a=void 0,c)}function N(){h!==void 0&&clearTimeout(h),d=0,n=u=a=h=void 0}function E(){return h===void 0?c:T(Xb())}function B(){var O=Xb(),A=_(O);if(n=arguments,a=this,u=O,A){if(h===void 0)return v(u);if(g)return clearTimeout(h),h=setTimeout(k,e),y(u)}return h===void 0&&(h=setTimeout(k,e)),c}return B.cancel=N,B.flush=E,B}function sv(r,e,i){(i!==void 0&&!am(r[e],i)||i===void 0&&!(e in r))&&U1(r,e,i)}function Y9(r){return Eh(r)&&sm(r)}function ov(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function K9(r){return XP(r,iB(r))}function V9(r,e,i,n,a,o,c){var h=ov(r,i),u=ov(e,i),d=c.get(u);if(d){sv(r,i,d);return}var f=o?o(h,u,i+"",r,e,c):void 0,g=f===void 0;if(g){var x=mg(u),y=!x&&H1(u),v=!x&&!y&&W1(u);f=u,x||y||v?mg(h)?f=h:Y9(h)?f=FP(h):y?(g=!1,f=L9(u,!0)):v?(g=!1,f=z9(u,!0)):f=[]:w9(u)||bg(u)?(f=h,bg(h)?f=K9(h):(!_a(h)||q1(h))&&(f=P9(u))):g=!1}g&&(c.set(u,f),a(f,u,n,o,c),c.delete(u)),sv(r,i,f)}function lB(r,e,i,n,a){r!==e&&U9(e,function(o,c){if(a||(a=new Nh),_a(o))V9(r,e,c,i,lB,n,a);else{var h=n?n(ov(r,c),o,c+"",r,e,a):void 0;h===void 0&&(h=o),sv(r,c,h)}},iB)}var X9="[object Map]",Z9="[object Set]",Q9=Object.prototype,J9=Q9.hasOwnProperty;function rT(r){if(r==null)return!0;if(sm(r)&&(mg(r)||typeof r=="string"||typeof r.splice=="function"||H1(r)||W1(r)||bg(r)))return!r.length;var e=dl(r);if(e==X9||e==Z9)return!r.size;if(om(r))return!Uq(r).length;for(var i in r)if(J9.call(r,i))return!1;return!0}var t7=eq(function(r,e,i){lB(r,e,i)}),e7="Expected a function";function r7(r,e,i){var n=!0,a=!0;if(typeof r!="function")throw new TypeError(e7);return _a(i)&&(n="leading"in i?!!i.leading:n,a="trailing"in i?!!i.trailing:a),oB(r,e,{leading:n,maxWait:e,trailing:a})}var Bl=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var e=1.70158;return r===1?1:r*r*((e+1)*r-e)},Out:function(r){var e=1.70158;return r===0?0:--r*r*((e+1)*r+e)+1},InOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)}}),Bounce:Object.freeze({In:function(r){return 1-Bl.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?Bl.Bounce.In(r*2)*.5:Bl.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(e){return Math.pow(e,r)},Out:function(e){return 1-Math.pow(1-e,r)},InOut:function(e){return e<.5?Math.pow(e*2,r)/2:(1-Math.pow(2-e*2,r))/2+.5}}}}),Xu=function(){return performance.now()},cB=(function(){function r(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return r.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(i){return e._tweens[i]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var e,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];for(var a=0,o=i;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}},r.prototype.remove=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];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()]}},r.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},r.prototype.update=function(e,i){e===void 0&&(e=Xu()),i===void 0&&(i=!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=!i;o&&o.update(e,c)===!1&&!i&&this.remove(o)}n=Object.keys(this._tweensAddedDuringUpdate)}},r})(),lv={Linear:function(r,e){var i=r.length-1,n=i*e,a=Math.floor(n),o=lv.Utils.Linear;return e<0?o(r[0],r[1],n):e>1?o(r[i],r[i-1],i-n):o(r[a],r[a+1>i?i:a+1],n-a)},Utils:{Linear:function(r,e,i){return(e-r)*i+r}}},hB=(function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r})(),cv=new cB,iT=(function(){function r(e,i){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=lv.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=hB.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof i=="object"?(this._group=i,i.add(this)):i===!0&&(this._group=cv,cv.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(e,i){if(i===void 0&&(i=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=i<0?0:i,this},r.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},r.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},r.prototype.start=function(e,i){if(e===void 0&&(e=Xu()),i===void 0&&(i=!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||i){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,i)}return this},r.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},r.prototype._setupProperties=function(e,i,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){i[c]=u?[]:{};var _=h;for(var k in _)i[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(_,i[c],g,a[c],o)}else(typeof i[c]>"u"||o)&&(i[c]=h),u||(i[c]*=1),f?a[c]=n[c].slice().reverse():a[c]=i[c]||0}}},r.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},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(e){return e===void 0&&(e=Xu()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},r.prototype.resume=function(e){return e===void 0&&(e=Xu()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var e=0,i=this._chainedTweens.length;e<i;e++)this._chainedTweens[e].stop();return this},r.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)},r.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},r.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},r.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},r.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},r.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},r.prototype.easing=function(e){return e===void 0&&(e=Bl.Linear.None),this._easingFunction=e,this},r.prototype.interpolation=function(e){return e===void 0&&(e=lv.Linear),this._interpolationFunction=e,this},r.prototype.chain=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return this._chainedTweens=e,this},r.prototype.onStart=function(e){return this._onStartCallback=e,this},r.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},r.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},r.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},r.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},r.prototype.onStop=function(e){return this._onStopCallback=e,this},r.prototype.update=function(e,i){var n=this,a;if(e===void 0&&(e=Xu()),i===void 0&&(i=r.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(i)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},r.prototype._updateProperties=function(e,i,n,a){for(var o in n)if(i[o]!==void 0){var c=i[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))}},r.prototype._handleRelativeValue=function(e,i){return typeof i!="string"?i:i.charAt(0)==="+"||i.charAt(0)==="-"?e+parseFloat(i):parseFloat(i)},r.prototype._swapEndStartRepeatValues=function(e){var i=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]=i},r.autoStartOnUpdate=!1,r})();hB.nextId;var Ga=cv;Ga.getAll.bind(Ga);Ga.removeAll.bind(Ga);Ga.add.bind(Ga);Ga.remove.bind(Ga);Ga.update.bind(Ga);function nT(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function i7(r){if(Array.isArray(r))return r}function n7(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function a7(r,e,i){return Object.defineProperty(r,"prototype",{writable:!1}),r}function s7(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function o7(){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 l7(r,e){return i7(r)||s7(r,e)||c7(r,e)||o7()}function c7(r,e){if(r){if(typeof r=="string")return nT(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?nT(r,e):void 0}}var h7=a7(function r(e,i){var n=i.default,a=n===void 0?null:n,o=i.triggerUpdate,c=o===void 0?!0:o,h=i.onChange,u=h===void 0?function(d,f){}:h;n7(this,r),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function G1(r){var e=r.stateInit,i=e===void 0?function(){return{}}:e,n=r.props,a=n===void 0?{}:n,o=r.methods,c=o===void 0?{}:o,h=r.aliases,u=h===void 0?{}:h,d=r.init,f=d===void 0?function(){}:d,g=r.update,x=g===void 0?function(){}:g,y=Object.keys(a).map(function(v){return new h7(v,a[v])});return function v(){for(var C=arguments.length,_=new Array(C),k=0;k<C;k++)_[k]=arguments[k];var T=!!(this instanceof v&&this.constructor),N=T?_.shift():void 0,E=_[0],B=E===void 0?{}:E,O=Object.assign({},i instanceof Function?i(B):i,{initialised:!1}),A={};function M(z){return F(z,B),j(),M}var F=function(U,V){f.call(M,U,O,V),O.initialised=!0},j=oB(function(){O.initialised&&(x.call(M,O,A),A={})},1);return y.forEach(function(z){M[z.name]=U(z);function U(V){var I=V.name,G=V.triggerUpdate,D=G===void 0?!1:G,W=V.onChange,K=W===void 0?function(Y,rt){}:W,tt=V.defaultVal,nt=tt===void 0?null:tt;return function(Y){var rt=O[I];if(!arguments.length)return rt;var ft=Y===void 0?nt:Y;return O[I]=ft,K.call(M,ft,O,rt),!A.hasOwnProperty(I)&&(A[I]=rt),D&&j(),M}}}),Object.keys(c).forEach(function(z){M[z]=function(){for(var U,V=arguments.length,I=new Array(V),G=0;G<V;G++)I[G]=arguments[G];return(U=c[z]).call.apply(U,[M,O].concat(I))}}),Object.entries(u).forEach(function(z){var U=l7(z,2),V=U[0],I=U[1];return M[V]=M[I]}),M.resetProps=function(){return y.forEach(function(z){M[z.name](z.defaultVal)}),M},M.resetProps(),O._rerender=j,T&&N&&M(N),M}}var xr=(function(r){return typeof r=="function"?r:typeof r=="string"?function(e){return e[r]}:function(e){return r}});function xg(r){"@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(r)}var u7=/^\s+/,d7=/\s+$/;function fe(r,e){if(r=r||"",e=e||{},r instanceof fe)return r;if(!(this instanceof fe))return new fe(r,e);var i=f7(r);this._originalInput=r,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||i.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=i.ok}fe.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(),i,n,a,o,c,h;return i=e.r/255,n=e.g/255,a=e.b/255,i<=.03928?o=i/12.92:o=Math.pow((i+.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=uB(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=sT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=sT(this._r,this._g,this._b),i=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+i+", "+n+"%, "+a+"%)":"hsva("+i+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=aT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=aT(this._r,this._g,this._b),i=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+i+", "+n+"%, "+a+"%)":"hsla("+i+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return oT(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return y7(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(Hr(this._r,255)*100)+"%",g:Math.round(Hr(this._g,255)*100)+"%",b:Math.round(Hr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Hr(this._r,255)*100)+"%, "+Math.round(Hr(this._g,255)*100)+"%, "+Math.round(Hr(this._b,255)*100)+"%)":"rgba("+Math.round(Hr(this._r,255)*100)+"%, "+Math.round(Hr(this._g,255)*100)+"%, "+Math.round(Hr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:A7[oT(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var i="#"+lT(this._r,this._g,this._b,this._a),n=i,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=fe(e);n="#"+lT(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+i+",endColorstr="+n+")"},toString:function(e){var i=!!e;e=e||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!i&&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 fe(this.toString())},_applyModification:function(e,i){var n=e.apply(null,[this].concat([].slice.call(i)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(C7,arguments)},brighten:function(){return this._applyModification(_7,arguments)},darken:function(){return this._applyModification(k7,arguments)},desaturate:function(){return this._applyModification(b7,arguments)},saturate:function(){return this._applyModification(x7,arguments)},greyscale:function(){return this._applyModification(v7,arguments)},spin:function(){return this._applyModification(w7,arguments)},_applyCombination:function(e,i){return e.apply(null,[this].concat([].slice.call(i)))},analogous:function(){return this._applyCombination(E7,arguments)},complement:function(){return this._applyCombination(S7,arguments)},monochromatic:function(){return this._applyCombination(N7,arguments)},splitcomplement:function(){return this._applyCombination(T7,arguments)},triad:function(){return this._applyCombination(cT,[3])},tetrad:function(){return this._applyCombination(cT,[4])}};fe.fromRatio=function(r,e){if(xg(r)=="object"){var i={};for(var n in r)r.hasOwnProperty(n)&&(n==="a"?i[n]=r[n]:i[n]=Zu(r[n]));r=i}return fe(r,e)};function f7(r){var e={r:0,g:0,b:0},i=1,n=null,a=null,o=null,c=!1,h=!1;return typeof r=="string"&&(r=O7(r)),xg(r)=="object"&&(ys(r.r)&&ys(r.g)&&ys(r.b)?(e=p7(r.r,r.g,r.b),c=!0,h=String(r.r).substr(-1)==="%"?"prgb":"rgb"):ys(r.h)&&ys(r.s)&&ys(r.v)?(n=Zu(r.s),a=Zu(r.v),e=m7(r.h,n,a),c=!0,h="hsv"):ys(r.h)&&ys(r.s)&&ys(r.l)&&(n=Zu(r.s),o=Zu(r.l),e=g7(r.h,n,o),c=!0,h="hsl"),r.hasOwnProperty("a")&&(i=r.a)),i=uB(i),{ok:c,format:r.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:i}}function p7(r,e,i){return{r:Hr(r,255)*255,g:Hr(e,255)*255,b:Hr(i,255)*255}}function aT(r,e,i){r=Hr(r,255),e=Hr(e,255),i=Hr(i,255);var n=Math.max(r,e,i),a=Math.min(r,e,i),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 r:o=(e-i)/u+(e<i?6:0);break;case e:o=(i-r)/u+2;break;case i:o=(r-e)/u+4;break}o/=6}return{h:o,s:c,l:h}}function g7(r,e,i){var n,a,o;r=Hr(r,360),e=Hr(e,100),i=Hr(i,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=i;else{var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;n=c(u,h,r+1/3),a=c(u,h,r),o=c(u,h,r-1/3)}return{r:n*255,g:a*255,b:o*255}}function sT(r,e,i){r=Hr(r,255),e=Hr(e,255),i=Hr(i,255);var n=Math.max(r,e,i),a=Math.min(r,e,i),o,c,h=n,u=n-a;if(c=n===0?0:u/n,n==a)o=0;else{switch(n){case r:o=(e-i)/u+(e<i?6:0);break;case e:o=(i-r)/u+2;break;case i:o=(r-e)/u+4;break}o/=6}return{h:o,s:c,v:h}}function m7(r,e,i){r=Hr(r,360)*6,e=Hr(e,100),i=Hr(i,100);var n=Math.floor(r),a=r-n,o=i*(1-e),c=i*(1-a*e),h=i*(1-(1-a)*e),u=n%6,d=[i,c,o,o,h,i][u],f=[h,i,i,c,o,o][u],g=[o,o,h,i,i,c][u];return{r:d*255,g:f*255,b:g*255}}function oT(r,e,i,n){var a=[xa(Math.round(r).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(i).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 y7(r,e,i,n,a){var o=[xa(Math.round(r).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(i).toString(16)),xa(dB(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 lT(r,e,i,n){var a=[xa(dB(n)),xa(Math.round(r).toString(16)),xa(Math.round(e).toString(16)),xa(Math.round(i).toString(16))];return a.join("")}fe.equals=function(r,e){return!r||!e?!1:fe(r).toRgbString()==fe(e).toRgbString()};fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function b7(r,e){e=e===0?0:e||10;var i=fe(r).toHsl();return i.s-=e/100,i.s=hm(i.s),fe(i)}function x7(r,e){e=e===0?0:e||10;var i=fe(r).toHsl();return i.s+=e/100,i.s=hm(i.s),fe(i)}function v7(r){return fe(r).desaturate(100)}function C7(r,e){e=e===0?0:e||10;var i=fe(r).toHsl();return i.l+=e/100,i.l=hm(i.l),fe(i)}function _7(r,e){e=e===0?0:e||10;var i=fe(r).toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(255*-(e/100)))),i.g=Math.max(0,Math.min(255,i.g-Math.round(255*-(e/100)))),i.b=Math.max(0,Math.min(255,i.b-Math.round(255*-(e/100)))),fe(i)}function k7(r,e){e=e===0?0:e||10;var i=fe(r).toHsl();return i.l-=e/100,i.l=hm(i.l),fe(i)}function w7(r,e){var i=fe(r).toHsl(),n=(i.h+e)%360;return i.h=n<0?360+n:n,fe(i)}function S7(r){var e=fe(r).toHsl();return e.h=(e.h+180)%360,fe(e)}function cT(r,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var i=fe(r).toHsl(),n=[fe(r)],a=360/e,o=1;o<e;o++)n.push(fe({h:(i.h+o*a)%360,s:i.s,l:i.l}));return n}function T7(r){var e=fe(r).toHsl(),i=e.h;return[fe(r),fe({h:(i+72)%360,s:e.s,l:e.l}),fe({h:(i+216)%360,s:e.s,l:e.l})]}function E7(r,e,i){e=e||6,i=i||30;var n=fe(r).toHsl(),a=360/i,o=[fe(r)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(fe(n));return o}function N7(r,e){e=e||6;for(var i=fe(r).toHsv(),n=i.h,a=i.s,o=i.v,c=[],h=1/e;e--;)c.push(fe({h:n,s:a,v:o})),o=(o+h)%1;return c}fe.mix=function(r,e,i){i=i===0?0:i||50;var n=fe(r).toRgb(),a=fe(e).toRgb(),o=i/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 fe(c)};fe.readability=function(r,e){var i=fe(r),n=fe(e);return(Math.max(i.getLuminance(),n.getLuminance())+.05)/(Math.min(i.getLuminance(),n.getLuminance())+.05)};fe.isReadable=function(r,e,i){var n=fe.readability(r,e),a,o;switch(o=!1,a=R7(i),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};fe.mostReadable=function(r,e,i){var n=null,a=0,o,c,h,u;i=i||{},c=i.includeFallbackColors,h=i.level,u=i.size;for(var d=0;d<e.length;d++)o=fe.readability(r,e[d]),o>a&&(a=o,n=fe(e[d]));return fe.isReadable(r,n,{level:h,size:u})||!c?n:(i.includeFallbackColors=!1,fe.mostReadable(r,["#fff","#000"],i))};var hv=fe.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"},A7=fe.hexNames=M7(hv);function M7(r){var e={};for(var i in r)r.hasOwnProperty(i)&&(e[r[i]]=i);return e}function uB(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function Hr(r,e){B7(r)&&(r="100%");var i=L7(r);return r=Math.min(e,Math.max(0,parseFloat(r))),i&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function hm(r){return Math.min(1,Math.max(0,r))}function jn(r){return parseInt(r,16)}function B7(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}function L7(r){return typeof r=="string"&&r.indexOf("%")!=-1}function xa(r){return r.length==1?"0"+r:""+r}function Zu(r){return r<=1&&(r=r*100+"%"),r}function dB(r){return Math.round(parseFloat(r)*255).toString(16)}function hT(r){return jn(r)/255}var da=(function(){var r="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",i="(?:"+e+")|(?:"+r+")",n="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",a="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{CSS_UNIT:new RegExp(i),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(r){return!!da.CSS_UNIT.exec(r)}function O7(r){r=r.replace(u7,"").replace(d7,"").toLowerCase();var e=!1;if(hv[r])r=hv[r],e=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var i;return(i=da.rgb.exec(r))?{r:i[1],g:i[2],b:i[3]}:(i=da.rgba.exec(r))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=da.hsl.exec(r))?{h:i[1],s:i[2],l:i[3]}:(i=da.hsla.exec(r))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=da.hsv.exec(r))?{h:i[1],s:i[2],v:i[3]}:(i=da.hsva.exec(r))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=da.hex8.exec(r))?{r:jn(i[1]),g:jn(i[2]),b:jn(i[3]),a:hT(i[4]),format:e?"name":"hex8"}:(i=da.hex6.exec(r))?{r:jn(i[1]),g:jn(i[2]),b:jn(i[3]),format:e?"name":"hex"}:(i=da.hex4.exec(r))?{r:jn(i[1]+""+i[1]),g:jn(i[2]+""+i[2]),b:jn(i[3]+""+i[3]),a:hT(i[4]+""+i[4]),format:e?"name":"hex8"}:(i=da.hex3.exec(r))?{r:jn(i[1]+""+i[1]),g:jn(i[2]+""+i[2]),b:jn(i[3]+""+i[3]),format:e?"name":"hex"}:!1}function R7(r){var e,i;return r=r||{level:"AA",size:"small"},e=(r.level||"AA").toUpperCase(),i=(r.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),i!=="small"&&i!=="large"&&(i="small"),{level:e,size:i}}function uv(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function j7(r){if(Array.isArray(r))return uv(r)}function fB(r,e,i){if(typeof r=="function"?r===e:r.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}function D7(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function F7(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(r,e){return r.get(fB(r,e))}function uT(r,e,i){D7(r,e),e.set(r,i)}function dT(r,e,i){return r.set(fB(r,e),i),i}function I7(r,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,H7(n.key),n)}}function $7(r,e,i){return e&&I7(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function z7(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function P7(){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 q7(r){return j7(r)||z7(r)||W7(r)||P7()}function U7(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function H7(r){var e=U7(r,"string");return typeof e=="symbol"?e:e+""}function W7(r,e){if(r){if(typeof r=="string")return uv(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?uv(r,e):void 0}}var G7=123,Y7=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},pB=function(e,i,n){return(e<<16)+(i<<8)+n},K7=function(e){var i=fe(e).toRgb(),n=i.r,a=i.g,o=i.b;return pB(n,a,o)},fT=function(e,i){return e*G7%Math.pow(2,i)},ll=new WeakMap,bs=new WeakMap,V7=(function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;F7(this,r),uT(this,ll,void 0),uT(this,bs,void 0),dT(bs,this,e),this.reset()}return $7(r,[{key:"reset",value:function(){dT(ll,this,["__reserved for background__"])}},{key:"register",value:function(i){if(Qn(ll,this).length>=Math.pow(2,24-Qn(bs,this)))return null;var n=Qn(ll,this).length,a=fT(n,Qn(bs,this)),o=Y7(n+(a<<24-Qn(bs,this)));return Qn(ll,this).push(i),o}},{key:"lookup",value:function(i){if(!i)return null;var n=typeof i=="string"?K7(i):pB.apply(void 0,q7(i));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 fT(a,Qn(bs,this))!==o||a>=Qn(ll,this).length?null:Qn(ll,this)[a]}}])})(),Hd,Wr,gB,mB,vo,pT,yB,bB,Zb,Vp,sd,xB,Y1,dv,fv,vg={},Cg=[],X7=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,um=Array.isArray;function Ha(r,e){for(var i in e)r[i]=e[i];return r}function K1(r){r&&r.parentNode&&r.parentNode.removeChild(r)}function Z7(r,e,i){var n,a,o,c={};for(o in e)o=="key"?n=e[o]:o=="ref"?a=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?Hd.call(arguments,2):i),typeof r=="function"&&r.defaultProps!=null)for(o in r.defaultProps)c[o]===void 0&&(c[o]=r.defaultProps[o]);return od(r,c,n,a,null)}function od(r,e,i,n,a){var o={type:r,props:e,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++gB,__i:-1,__u:0};return a==null&&Wr.vnode!=null&&Wr.vnode(o),o}function dm(r){return r.children}function Xp(r,e){this.props=r,this.context=e}function vh(r,e){if(e==null)return r.__?vh(r.__,r.__i+1):null;for(var i;e<r.__k.length;e++)if((i=r.__k[e])!=null&&i.__e!=null)return i.__e;return typeof r.type=="function"?vh(r):null}function Q7(r){if(r.__P&&r.__d){var e=r.__v,i=e.__e,n=[],a=[],o=Ha({},e);o.__v=e.__v+1,Wr.vnode&&Wr.vnode(o),V1(r.__P,o,e,r.__n,r.__P.namespaceURI,32&e.__u?[i]:null,n,i??vh(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,kB(n,o,a),e.__e=e.__=null,o.__e!=i&&vB(o)}}function vB(r){if((r=r.__)!=null&&r.__c!=null)return r.__e=r.__c.base=null,r.__k.some(function(e){if(e!=null&&e.__e!=null)return r.__e=r.__c.base=e.__e}),vB(r)}function gT(r){(!r.__d&&(r.__d=!0)&&vo.push(r)&&!_g.__r++||pT!=Wr.debounceRendering)&&((pT=Wr.debounceRendering)||yB)(_g)}function _g(){try{for(var r,e=1;vo.length;)vo.length>e&&vo.sort(bB),r=vo.shift(),e=vo.length,Q7(r)}finally{vo.length=_g.__r=0}}function CB(r,e,i,n,a,o,c,h,u,d,f){var g,x,y,v,C,_,k,T=n&&n.__k||Cg,N=e.length;for(u=J7(i,e,T,u,N),g=0;g<N;g++)(y=i.__k[g])!=null&&(x=y.__i!=-1&&T[y.__i]||vg,y.__i=g,_=V1(r,y,x,a,o,c,h,u,d,f),v=y.__e,y.ref&&x.ref!=y.ref&&(x.ref&&X1(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=_B(y,u,r,k),k&&x.__e&&(x.__e=null)):typeof y.type=="function"&&_!==void 0?u=_:v&&(u=v.nextSibling),y.__u&=-7);return i.__e=C,u}function J7(r,e,i,n,a){var o,c,h,u,d,f=i.length,g=f,x=0;for(r.__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=r.__k[o]=od(null,c,null,null,null):um(c)?c=r.__k[o]=od(dm,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=r.__k[o]=od(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):r.__k[o]=c,u=o+x,c.__=r,c.__b=r.__b+1,h=null,(d=c.__i=tU(c,i,u,g))!=-1&&(g--,(h=i[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))):r.__k[o]=null;if(g)for(o=0;o<f;o++)(h=i[o])!=null&&(2&h.__u)==0&&(h.__e==n&&(n=vh(h)),SB(h,h));return n}function _B(r,e,i,n){var a,o;if(typeof r.type=="function"){for(a=r.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=r,e=_B(a[o],e,i,n));return e}r.__e!=e&&(n&&(e&&r.type&&!e.parentNode&&(e=vh(r)),i.insertBefore(r.__e,e||null)),e=r.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function tU(r,e,i,n){var a,o,c,h=r.key,u=r.type,d=e[i],f=d!=null&&(2&d.__u)==0;if(d===null&&h==null||f&&h==d.key&&u==d.type)return i;if(n>(f?1:0)){for(a=i-1,o=i+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 mT(r,e,i){e[0]=="-"?r.setProperty(e,i??""):r[e]=i==null?"":typeof i!="number"||X7.test(e)?i:i+"px"}function vp(r,e,i,n,a){var o,c;t:if(e=="style")if(typeof i=="string")r.style.cssText=i;else{if(typeof n=="string"&&(r.style.cssText=n=""),n)for(e in n)i&&e in i||mT(r.style,e,"");if(i)for(e in i)n&&i[e]==n[e]||mT(r.style,e,i[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(xB,"$1")),c=e.toLowerCase(),e=c in r||e=="onFocusOut"||e=="onFocusIn"?c.slice(2):e.slice(2),r.l||(r.l={}),r.l[e+o]=i,i?n?i[sd]=n[sd]:(i[sd]=Y1,r.addEventListener(e,o?fv:dv,o)):r.removeEventListener(e,o?fv:dv,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 r)try{r[e]=i??"";break t}catch{}typeof i=="function"||(i==null||i===!1&&e[4]!="-"?r.removeAttribute(e):r.setAttribute(e,e=="popover"&&i==1?"":i))}}function yT(r){return function(e){if(this.l){var i=this.l[e.type+r];if(e[Vp]==null)e[Vp]=Y1++;else if(e[Vp]<i[sd])return;return i(Wr.event?Wr.event(e):e)}}}function V1(r,e,i,n,a,o,c,h,u,d){var f,g,x,y,v,C,_,k,T,N,E,B,O,A,M,F=e.type;if(e.constructor!==void 0)return null;128&i.__u&&(u=!!(32&i.__u),o=[h=e.__e=i.__e]),(f=Wr.__b)&&f(e);t:if(typeof F=="function")try{if(k=e.props,T=F.prototype&&F.prototype.render,N=(f=F.contextType)&&n[f.__c],E=f?N?N.props.value:f.__:n,i.__c?_=(g=e.__c=i.__c).__=g.__E:(T?e.__c=g=new F(k,E):(e.__c=g=new Xp(k,E),g.constructor=F,g.render=rU),N&&N.sub(g),g.state||(g.state={}),g.__n=n,x=g.__d=!0,g.__h=[],g._sb=[]),T&&g.__s==null&&(g.__s=g.state),T&&F.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Ha({},g.__s)),Ha(g.__s,F.getDerivedStateFromProps(k,g.__s))),y=g.props,v=g.state,g.__v=e,x)T&&F.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&F.getDerivedStateFromProps==null&&k!==y&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(k,E),e.__v==i.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(k,g.__s,E)===!1){e.__v!=i.__v&&(g.props=k,g.state=g.__s,g.__d=!1),e.__e=i.__e,e.__k=i.__k,e.__k.some(function(j){j&&(j.__=e)}),Cg.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(k,g.__s,E),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(y,v,C)})}if(g.context=E,g.props=k,g.__P=r,g.__e=!1,B=Wr.__r,O=0,T)g.state=g.__s,g.__d=!1,B&&B(e),f=g.render(g.props,g.state,g.context),Cg.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,B&&B(e),f=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++O<25);g.state=g.__s,g.getChildContext!=null&&(n=Ha(Ha({},n),g.getChildContext())),T&&!x&&g.getSnapshotBeforeUpdate!=null&&(C=g.getSnapshotBeforeUpdate(y,v)),A=f!=null&&f.type===dm&&f.key==null?wB(f.props.children):f,h=CB(r,um(A)?A:[A],e,i,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--;)K1(o[M]);pv(e)}else e.__e=i.__e,e.__k=i.__k,j.then||pv(e);Wr.__e(j,e,i)}else o==null&&e.__v==i.__v?(e.__k=i.__k,e.__e=i.__e):h=e.__e=eU(i.__e,e,i,n,a,o,c,u,d);return(f=Wr.diffed)&&f(e),128&e.__u?void 0:h}function pv(r){r&&(r.__c&&(r.__c.__e=!0),r.__k&&r.__k.some(pv))}function kB(r,e,i){for(var n=0;n<i.length;n++)X1(i[n],i[++n],i[++n]);Wr.__c&&Wr.__c(e,r),r.some(function(a){try{r=a.__h,a.__h=[],r.some(function(o){o.call(a)})}catch(o){Wr.__e(o,a.__v)}})}function wB(r){return typeof r!="object"||r==null||r.__b>0?r:um(r)?r.map(wB):Ha({},r)}function eU(r,e,i,n,a,o,c,h,u){var d,f,g,x,y,v,C,_=i.props||vg,k=e.props,T=e.type;if(T=="svg"?a="http://www.w3.org/2000/svg":T=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((y=o[d])&&"setAttribute"in y==!!T&&(T?y.localName==T:y.nodeType==3)){r=y,o[d]=null;break}}if(r==null){if(T==null)return document.createTextNode(k);r=document.createElementNS(a,T,k.is&&k),h&&(Wr.__m&&Wr.__m(e,o),h=!1),o=null}if(T==null)_===k||h&&r.data==k||(r.data=k);else{if(o=o&&Hd.call(r.childNodes),!h&&o!=null)for(_={},d=0;d<r.attributes.length;d++)_[(y=r.attributes[d]).name]=y.value;for(d in _)y=_[d],d=="dangerouslySetInnerHTML"?g=y:d=="children"||d in k||d=="value"&&"defaultValue"in k||d=="checked"&&"defaultChecked"in k||vp(r,d,null,y,a);for(d in k)y=k[d],d=="children"?x=y:d=="dangerouslySetInnerHTML"?f=y:d=="value"?v=y:d=="checked"?C=y:h&&typeof y!="function"||_[d]===y||vp(r,d,y,_[d],a);if(f)h||g&&(f.__html==g.__html||f.__html==r.innerHTML)||(r.innerHTML=f.__html),e.__k=[];else if(g&&(r.innerHTML=""),CB(e.type=="template"?r.content:r,um(x)?x:[x],e,i,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:i.__k&&vh(i,0),h,u),o!=null)for(d=o.length;d--;)K1(o[d]);h||(d="value",T=="progress"&&v==null?r.removeAttribute("value"):v!=null&&(v!==r[d]||T=="progress"&&!v||T=="option"&&v!=_[d])&&vp(r,d,v,_[d],a),d="checked",C!=null&&C!=r[d]&&vp(r,d,C,_[d],a))}return r}function X1(r,e,i){try{if(typeof r=="function"){var n=typeof r.__u=="function";n&&r.__u(),n&&e==null||(r.__u=r(e))}else r.current=e}catch(a){Wr.__e(a,i)}}function SB(r,e,i){var n,a;if(Wr.unmount&&Wr.unmount(r),(n=r.ref)&&(n.current&&n.current!=r.__e||X1(n,null,e)),(n=r.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){Wr.__e(o,e)}n.base=n.__P=null}if(n=r.__k)for(a=0;a<n.length;a++)n[a]&&SB(n[a],e,i||typeof r.type!="function");i||K1(r.__e),r.__c=r.__=r.__e=void 0}function rU(r,e,i){return this.constructor(r,i)}function iU(r,e,i){var n,a,o,c;e==document&&(e=document.documentElement),Wr.__&&Wr.__(r,e),a=(n=!1)?null:e.__k,o=[],c=[],V1(e,r=e.__k=Z7(dm,null,[r]),a||vg,vg,e.namespaceURI,a?null:e.firstChild?Hd.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),kB(o,r,c)}function TB(r,e,i){var n,a,o,c,h=Ha({},r.props);for(o in r.type&&r.type.defaultProps&&(c=r.type.defaultProps),e)o=="key"?n=e[o]:o=="ref"?a=e[o]:h[o]=e[o]===void 0&&c!=null?c[o]:e[o];return arguments.length>2&&(h.children=arguments.length>3?Hd.call(arguments,2):i),od(r.type,h,n||r.key,a||r.ref,null)}Hd=Cg.slice,Wr={__e:function(r,e,i,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(r)),c=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(r,n||{}),c=a.__d),c)return a.__E=a}catch(h){r=h}throw r}},gB=0,mB=function(r){return r!=null&&r.constructor===void 0},Xp.prototype.setState=function(r,e){var i;i=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ha({},this.state),typeof r=="function"&&(r=r(Ha({},i),this.props)),r&&Ha(i,r),r!=null&&this.__v&&(e&&this._sb.push(e),gT(this))},Xp.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),gT(this))},Xp.prototype.render=dm,vo=[],yB=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,bB=function(r,e){return r.__v.__b-e.__v.__b},_g.__r=0,Zb=Math.random().toString(8),Vp="__d"+Zb,sd="__a"+Zb,xB=/(PointerCapture)$|Capture$/i,Y1=0,dv=yT(!1),fv=yT(!0);function bT(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function nU(r){if(Array.isArray(r))return r}function aU(r,e,i){return(e=uU(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function sU(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function oU(){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 xT(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),i.push.apply(i,n)}return i}function lU(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?xT(Object(i),!0).forEach(function(n){aU(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):xT(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function cU(r,e){return nU(r)||sU(r,e)||dU(r,e)||oU()}function hU(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function uU(r){var e=hU(r,"string");return typeof e=="symbol"?e:e+""}function kg(r){"@babel/helpers - typeof";return kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kg(r)}function dU(r,e){if(r){if(typeof r=="string")return bT(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?bT(r,e):void 0}}var gv=function(e){if(kg(e)!=="object")return e;var i=TB(e);if(i.props){var n;i.props=lU({},i.props),i!=null&&(n=i.props)!==null&&n!==void 0&&n.children&&(i.props.children=Array.isArray(i.props.children)?i.props.children.map(gv):gv(i.props.children))}return i},fU=function(e){return mB(TB(e))},pU=function(e,i){delete i.__k,iU(gv(e),i)};function gU(r,e){e===void 0&&(e={});var i=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r))}}var mU=`.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
|
+
`;gU(mU);var yU=G1({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.style,o=a===void 0?{}:a,c=!!e&&kg(e)==="object"&&!!e.node&&typeof e.node=="function",h=_e(c?e.node():e);h.style("position")==="static"&&h.style("position","relative"),i.tooltipEl=h.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var f=cU(d,2),g=f[0],x=f[1];return i.tooltipEl.style(g,x)}),i.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));i.mouseInside=!1,h.on("mousemove.".concat(u),function(d){i.mouseInside=!0;var f=$a(d),g=h.node(),x=g.offsetWidth,y=g.offsetHeight,v=[i.offsetX===null||i.offsetX===void 0?"-".concat(f[0]/x*100,"%"):typeof i.offsetX=="number"?"calc(-50% + ".concat(i.offsetX,"px)"):i.offsetX,i.offsetY===null||i.offsetY===void 0?y>130&&y-f[1]<100?"calc(-100% - 6px)":"21px":typeof i.offsetY=="number"?i.offsetY<0?"calc(-100% - ".concat(Math.abs(i.offsetY),"px)"):"".concat(i.offsetY,"px"):i.offsetY];i.tooltipEl.style("left",f[0]+"px").style("top",f[1]+"px").style("transform","translate(".concat(v.join(","),")")),i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseover.".concat(u),function(){i.mouseInside=!0,i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseout.".concat(u),function(){i.mouseInside=!1,i.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):fU(e.content)?(e.tooltipEl.text(""),pU(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 bU(r,e,i){var n,a=1;r==null&&(r=0),e==null&&(e=0),i==null&&(i=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-r)*a,f=(f/h-e)*a,g=(g/h-i)*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?(r=+c,o):r},o.y=function(c){return arguments.length?(e=+c,o):e},o.z=function(c){return arguments.length?(i=+c,o):i},o.strength=function(c){return arguments.length?(a=+c,o):a},o}function xU(r){const e=+this._x.call(null,r);return EB(this.cover(e),e,r)}function EB(r,e,i){if(isNaN(e))return r;var n,a=r._root,o={data:i},c=r._x0,h=r._x1,u,d,f,g,x;if(!a)return r._root=o,r;for(;a.length;)if((f=e>=(u=(c+h)/2))?c=u:h=u,n=a,!(a=a[g=+f]))return n[g]=o,r;if(d=+r._x.call(null,a.data),e===d)return o.next=a,n?n[g]=o:r._root=o,r;do n=n?n[g]=new Array(2):r._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,r}function vU(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e);let n=1/0,a=-1/0;for(let o=0,c;o<e;++o)isNaN(c=+this._x.call(null,r[o]))||(i[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)EB(this,i[o],r[o]);return this}function CU(r){if(isNaN(r=+r))return this;var e=this._x0,i=this._x1;if(isNaN(e))i=(e=Math.floor(r))+1;else{for(var n=i-e||1,a=this._root,o,c;e>r||r>=i;)switch(c=+(r<e),o=new Array(2),o[c]=a,a=o,n*=2,c){case 0:i=e+n;break;case 1:e=i-n;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._x1=i,this}function _U(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function kU(r){return arguments.length?this.cover(+r[0][0]).cover(+r[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Bs(r,e,i){this.node=r,this.x0=e,this.x1=i}function wU(r,e){var i,n=this._x0,a,o,c=this._x1,h=[],u=this._root,d,f;for(u&&h.push(new Bs(u,n,c)),e==null?e=1/0:(n=r-e,c=r+e);d=h.pop();)if(!(!(u=d.node)||(a=d.x0)>c||(o=d.x1)<n))if(u.length){var g=(a+o)/2;h.push(new Bs(u[1],g,o),new Bs(u[0],a,g)),(f=+(r>=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(r-+this._x.call(null,u.data));x<e&&(e=x,n=r-x,c=r+x,i=u.data)}return i}function SU(r){if(isNaN(u=+this._x.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._x1,u,d,f,g,x;if(!i)return this;if(i.length)for(;;){if((f=u>=(d=(c+h)/2))?c=d:h=d,e=i,!(i=i[g=+f]))return this;if(!i.length)break;e[g+1&1]&&(n=e,x=g)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[g]=o:delete e[g],(i=e[0]||e[1])&&i===(e[1]||e[0])&&!i.length&&(n?n[x]=i:this._root=i),this):(this._root=o,this)}function TU(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function EU(){return this._root}function NU(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function AU(r){var e=[],i,n=this._root,a,o,c;for(n&&e.push(new Bs(n,this._x0,this._x1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.x1)&&n.length){var h=(o+c)/2;(a=n[1])&&e.push(new Bs(a,h,c)),(a=n[0])&&e.push(new Bs(a,o,h))}return this}function MU(r){var e=[],i=[],n;for(this._root&&e.push(new Bs(this._root,this._x0,this._x1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.x1,u=(c+h)/2;(o=a[0])&&e.push(new Bs(o,c,u)),(o=a[1])&&e.push(new Bs(o,u,h))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.x1);return this}function BU(r){return r[0]}function LU(r){return arguments.length?(this._x=r,this):this._x}function Z1(r,e){var i=new Q1(e??BU,NaN,NaN);return r==null?i:i.addAll(r)}function Q1(r,e,i){this._x=r,this._x0=e,this._x1=i,this._root=void 0}function vT(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var _n=Z1.prototype=Q1.prototype;_n.copy=function(){var r=new Q1(this._x,this._x0,this._x1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=vT(e),r;for(i=[{source:e,target:r._root=new Array(2)}];e=i.pop();)for(var a=0;a<2;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(2)}):e.target[a]=vT(n));return r};_n.add=xU;_n.addAll=vU;_n.cover=CU;_n.data=_U;_n.extent=kU;_n.find=wU;_n.remove=SU;_n.removeAll=TU;_n.root=EU;_n.size=NU;_n.visit=AU;_n.visitAfter=MU;_n.x=LU;function OU(r){const e=+this._x.call(null,r),i=+this._y.call(null,r);return NB(this.cover(e,i),e,i,r)}function NB(r,e,i,n){if(isNaN(e)||isNaN(i))return r;var a,o=r._root,c={data:n},h=r._x0,u=r._y0,d=r._x1,f=r._y1,g,x,y,v,C,_,k,T;if(!o)return r._root=c,r;for(;o.length;)if((C=e>=(g=(h+d)/2))?h=g:d=g,(_=i>=(x=(u+f)/2))?u=x:f=x,a=o,!(o=o[k=_<<1|C]))return a[k]=c,r;if(y=+r._x.call(null,o.data),v=+r._y.call(null,o.data),e===y&&i===v)return c.next=o,a?a[k]=c:r._root=c,r;do a=a?a[k]=new Array(4):r._root=new Array(4),(C=e>=(g=(h+d)/2))?h=g:d=g,(_=i>=(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,r}function RU(r){var e,i,n=r.length,a,o,c=new Array(n),h=new Array(n),u=1/0,d=1/0,f=-1/0,g=-1/0;for(i=0;i<n;++i)isNaN(a=+this._x.call(null,e=r[i]))||isNaN(o=+this._y.call(null,e))||(c[i]=a,h[i]=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),i=0;i<n;++i)NB(this,c[i],h[i],r[i]);return this}function jU(r,e){if(isNaN(r=+r)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,a=this._x1,o=this._y1;if(isNaN(i))a=(i=Math.floor(r))+1,o=(n=Math.floor(e))+1;else{for(var c=a-i||1,h=this._root,u,d;i>r||r>=a||n>e||e>=o;)switch(d=(e<n)<<1|r<i,u=new Array(4),u[d]=h,h=u,c*=2,d){case 0:a=i+c,o=n+c;break;case 1:i=a-c,o=n+c;break;case 2:a=i+c,n=o-c;break;case 3:i=a-c,n=o-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=n,this._x1=a,this._y1=o,this}function DU(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function FU(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ji(r,e,i,n,a){this.node=r,this.x0=e,this.y0=i,this.x1=n,this.y1=a}function IU(r,e,i){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 Ji(y,a,o,f,g)),i==null?i=1/0:(a=r-i,o=e-i,f=r+i,g=e+i,i*=i);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 Ji(y[3],_,k,u,d),new Ji(y[2],c,k,_,d),new Ji(y[1],_,h,u,k),new Ji(y[0],c,h,_,k)),(C=(e>=k)<<1|r>=_)&&(v=x[x.length-1],x[x.length-1]=x[x.length-1-C],x[x.length-1-C]=v)}else{var T=r-+this._x.call(null,y.data),N=e-+this._y.call(null,y.data),E=T*T+N*N;if(E<i){var B=Math.sqrt(i=E);a=r-B,o=e-B,f=r+B,g=e+B,n=y.data}}return n}function $U(r){if(isNaN(f=+this._x.call(null,r))||isNaN(g=+this._y.call(null,r)))return this;var e,i=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(!i)return this;if(i.length)for(;;){if((v=f>=(x=(c+u)/2))?c=x:u=x,(C=g>=(y=(h+d)/2))?h=y:d=y,e=i,!(i=i[_=C<<1|v]))return this;if(!i.length)break;(e[_+1&3]||e[_+2&3]||e[_+3&3])&&(n=e,k=_)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[_]=o:delete e[_],(i=e[0]||e[1]||e[2]||e[3])&&i===(e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[k]=i:this._root=i),this):(this._root=o,this)}function zU(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function PU(){return this._root}function qU(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function UU(r){var e=[],i,n=this._root,a,o,c,h,u;for(n&&e.push(new Ji(n,this._x0,this._y0,this._x1,this._y1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.y0,h=i.x1,u=i.y1)&&n.length){var d=(o+h)/2,f=(c+u)/2;(a=n[3])&&e.push(new Ji(a,d,f,h,u)),(a=n[2])&&e.push(new Ji(a,o,f,d,u)),(a=n[1])&&e.push(new Ji(a,d,c,h,f)),(a=n[0])&&e.push(new Ji(a,o,c,d,f))}return this}function HU(r){var e=[],i=[],n;for(this._root&&e.push(new Ji(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 Ji(o,c,h,f,g)),(o=a[1])&&e.push(new Ji(o,f,h,u,g)),(o=a[2])&&e.push(new Ji(o,c,g,f,d)),(o=a[3])&&e.push(new Ji(o,f,g,u,d))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.x1,n.y1);return this}function WU(r){return r[0]}function GU(r){return arguments.length?(this._x=r,this):this._x}function YU(r){return r[1]}function KU(r){return arguments.length?(this._y=r,this):this._y}function J1(r,e,i){var n=new tC(e??WU,i??YU,NaN,NaN,NaN,NaN);return r==null?n:n.addAll(r)}function tC(r,e,i,n,a,o){this._x=r,this._y=e,this._x0=i,this._y0=n,this._x1=a,this._y1=o,this._root=void 0}function CT(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var on=J1.prototype=tC.prototype;on.copy=function(){var r=new tC(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=CT(e),r;for(i=[{source:e,target:r._root=new Array(4)}];e=i.pop();)for(var a=0;a<4;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(4)}):e.target[a]=CT(n));return r};on.add=OU;on.addAll=RU;on.cover=jU;on.data=DU;on.extent=FU;on.find=IU;on.remove=$U;on.removeAll=zU;on.root=PU;on.size=qU;on.visit=UU;on.visitAfter=HU;on.x=GU;on.y=KU;function VU(r){const e=+this._x.call(null,r),i=+this._y.call(null,r),n=+this._z.call(null,r);return AB(this.cover(e,i,n),e,i,n,r)}function AB(r,e,i,n,a){if(isNaN(e)||isNaN(i)||isNaN(n))return r;var o,c=r._root,h={data:a},u=r._x0,d=r._y0,f=r._z0,g=r._x1,x=r._y1,y=r._z1,v,C,_,k,T,N,E,B,O,A,M;if(!c)return r._root=h,r;for(;c.length;)if((E=e>=(v=(u+g)/2))?u=v:g=v,(B=i>=(C=(d+x)/2))?d=C:x=C,(O=n>=(_=(f+y)/2))?f=_:y=_,o=c,!(c=c[A=O<<2|B<<1|E]))return o[A]=h,r;if(k=+r._x.call(null,c.data),T=+r._y.call(null,c.data),N=+r._z.call(null,c.data),e===k&&i===T&&n===N)return h.next=c,o?o[A]=h:r._root=h,r;do o=o?o[A]=new Array(8):r._root=new Array(8),(E=e>=(v=(u+g)/2))?u=v:g=v,(B=i>=(C=(d+x)/2))?d=C:x=C,(O=n>=(_=(f+y)/2))?f=_:y=_;while((A=O<<2|B<<1|E)===(M=(N>=_)<<2|(T>=C)<<1|k>=v));return o[M]=c,o[A]=h,r}function XU(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=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=r[g]))||isNaN(v=+this._y.call(null,x))||isNaN(C=+this._z.call(null,x))||(i[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)AB(this,i[g],n[g],a[g],r[g]);return this}function ZU(r,e,i){if(isNaN(r=+r)||isNaN(e=+e)||isNaN(i=+i))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(r))+1,h=(a=Math.floor(e))+1,u=(o=Math.floor(i))+1;else{for(var d=c-n||1,f=this._root,g,x;n>r||r>=c||a>e||e>=h||o>i||i>=u;)switch(x=(i<o)<<2|(e<a)<<1|r<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 QU(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function JU(r){return arguments.length?this.cover(+r[0][0],+r[0][1],+r[0][2]).cover(+r[1][0],+r[1][1],+r[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Dr(r,e,i,n,a,o,c){this.node=r,this.x0=e,this.y0=i,this.z0=n,this.x1=a,this.y1=o,this.z1=c}function tH(r,e,i,n){var a,o=this._x0,c=this._y0,h=this._z0,u,d,f,g,x,y,v=this._x1,C=this._y1,_=this._z1,k=[],T=this._root,N,E;for(T&&k.push(new Dr(T,o,c,h,v,C,_)),n==null?n=1/0:(o=r-n,c=e-n,h=i-n,v=r+n,C=e+n,_=i+n,n*=n);N=k.pop();)if(!(!(T=N.node)||(u=N.x0)>v||(d=N.y0)>C||(f=N.z0)>_||(g=N.x1)<o||(x=N.y1)<c||(y=N.z1)<h))if(T.length){var B=(u+g)/2,O=(d+x)/2,A=(f+y)/2;k.push(new Dr(T[7],B,O,A,g,x,y),new Dr(T[6],u,O,A,B,x,y),new Dr(T[5],B,d,A,g,O,y),new Dr(T[4],u,d,A,B,O,y),new Dr(T[3],B,O,f,g,x,A),new Dr(T[2],u,O,f,B,x,A),new Dr(T[1],B,d,f,g,O,A),new Dr(T[0],u,d,f,B,O,A)),(E=(i>=A)<<2|(e>=O)<<1|r>=B)&&(N=k[k.length-1],k[k.length-1]=k[k.length-1-E],k[k.length-1-E]=N)}else{var M=r-+this._x.call(null,T.data),F=e-+this._y.call(null,T.data),j=i-+this._z.call(null,T.data),z=M*M+F*F+j*j;if(z<n){var U=Math.sqrt(n=z);o=r-U,c=e-U,h=i-U,v=r+U,C=e+U,_=i+U,a=T.data}}return a}const eH=(r,e,i,n,a,o)=>Math.sqrt((r-n)**2+(e-a)**2+(i-o)**2);function rH(r,e,i,n){const a=[],o=r-n,c=e-n,h=i-n,u=r+n,d=e+n,f=i+n;return this.visit((g,x,y,v,C,_,k)=>{if(!g.length)do{const T=g.data;eH(r,e,i,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 iH(r){if(isNaN(x=+this._x.call(null,r))||isNaN(y=+this._y.call(null,r))||isNaN(v=+this._z.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._y0,u=this._z0,d=this._x1,f=this._y1,g=this._z1,x,y,v,C,_,k,T,N,E,B,O;if(!i)return this;if(i.length)for(;;){if((T=x>=(C=(c+d)/2))?c=C:d=C,(N=y>=(_=(h+f)/2))?h=_:f=_,(E=v>=(k=(u+g)/2))?u=k:g=k,e=i,!(i=i[B=E<<2|N<<1|T]))return this;if(!i.length)break;(e[B+1&7]||e[B+2&7]||e[B+3&7]||e[B+4&7]||e[B+5&7]||e[B+6&7]||e[B+7&7])&&(n=e,O=B)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[B]=o:delete e[B],(i=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&i===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[O]=i:this._root=i),this):(this._root=o,this)}function nH(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function aH(){return this._root}function sH(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function oH(r){var e=[],i,n=this._root,a,o,c,h,u,d,f;for(n&&e.push(new Dr(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.y0,h=i.z0,u=i.x1,d=i.y1,f=i.z1)&&n.length){var g=(o+u)/2,x=(c+d)/2,y=(h+f)/2;(a=n[7])&&e.push(new Dr(a,g,x,y,u,d,f)),(a=n[6])&&e.push(new Dr(a,o,x,y,g,d,f)),(a=n[5])&&e.push(new Dr(a,g,c,y,u,x,f)),(a=n[4])&&e.push(new Dr(a,o,c,y,g,x,f)),(a=n[3])&&e.push(new Dr(a,g,x,h,u,d,y)),(a=n[2])&&e.push(new Dr(a,o,x,h,g,d,y)),(a=n[1])&&e.push(new Dr(a,g,c,h,u,x,y)),(a=n[0])&&e.push(new Dr(a,o,c,h,g,x,y))}return this}function lH(r){var e=[],i=[],n;for(this._root&&e.push(new Dr(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 Dr(o,c,h,u,x,y,v)),(o=a[1])&&e.push(new Dr(o,x,h,u,d,y,v)),(o=a[2])&&e.push(new Dr(o,c,y,u,x,f,v)),(o=a[3])&&e.push(new Dr(o,x,y,u,d,f,v)),(o=a[4])&&e.push(new Dr(o,c,h,v,x,y,g)),(o=a[5])&&e.push(new Dr(o,x,h,v,d,y,g)),(o=a[6])&&e.push(new Dr(o,c,y,v,x,f,g)),(o=a[7])&&e.push(new Dr(o,x,y,v,d,f,g))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function cH(r){return r[0]}function hH(r){return arguments.length?(this._x=r,this):this._x}function uH(r){return r[1]}function dH(r){return arguments.length?(this._y=r,this):this._y}function fH(r){return r[2]}function pH(r){return arguments.length?(this._z=r,this):this._z}function eC(r,e,i,n){var a=new rC(e??cH,i??uH,n??fH,NaN,NaN,NaN,NaN,NaN,NaN);return r==null?a:a.addAll(r)}function rC(r,e,i,n,a,o,c,h,u){this._x=r,this._y=e,this._z=i,this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this._root=void 0}function _T(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var Di=eC.prototype=rC.prototype;Di.copy=function(){var r=new rC(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=_T(e),r;for(i=[{source:e,target:r._root=new Array(8)}];e=i.pop();)for(var a=0;a<8;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(8)}):e.target[a]=_T(n));return r};Di.add=VU;Di.addAll=XU;Di.cover=ZU;Di.data=QU;Di.extent=JU;Di.find=tH;Di.findAllWithinRadius=rH;Di.remove=iH;Di.removeAll=nH;Di.root=aH;Di.size=sH;Di.visit=oH;Di.visitAfter=lH;Di.x=hH;Di.y=dH;Di.z=pH;function ki(r){return function(){return r}}function na(r){return(r()-.5)*1e-6}function Qb(r){return r.x+r.vx}function kT(r){return r.y+r.vy}function gH(r){return r.z+r.vz}function mH(r){var e,i,n,a,o=1,c=1;typeof r!="function"&&(r=ki(r==null?1:+r));function h(){for(var f,g=e.length,x,y,v,C,_,k,T,N=0;N<c;++N)for(x=(i===1?Z1(e,Qb):i===2?J1(e,Qb,kT):i===3?eC(e,Qb,kT,gH):null).visitAfter(u),f=0;f<g;++f)y=e[f],k=n[y.index],T=k*k,v=y.x+y.vx,i>1&&(C=y.y+y.vy),i>2&&(_=y.z+y.vz),x.visit(E);function E(B,O,A,M,F,j,z){var U=[O,A,M,F,j,z],V=U[0],I=U[1],G=U[2],D=U[i],W=U[i+1],K=U[i+2],tt=B.data,nt=B.r,Y=k+nt;if(tt){if(tt.index>y.index){var rt=v-tt.x-tt.vx,ft=i>1?C-tt.y-tt.vy:0,ct=i>2?_-tt.z-tt.vz:0,xt=rt*rt+ft*ft+ct*ct;xt<Y*Y&&(rt===0&&(rt=na(a),xt+=rt*rt),i>1&&ft===0&&(ft=na(a),xt+=ft*ft),i>2&&ct===0&&(ct=na(a),xt+=ct*ct),xt=(Y-(xt=Math.sqrt(xt)))/xt*o,y.vx+=(rt*=xt)*(Y=(nt*=nt)/(T+nt)),i>1&&(y.vy+=(ft*=xt)*Y),i>2&&(y.vz+=(ct*=xt)*Y),tt.vx-=rt*(Y=1-Y),i>1&&(tt.vy-=ft*Y),i>2&&(tt.vz-=ct*Y))}return}return V>v+Y||D<v-Y||i>1&&(I>C+Y||W<C-Y)||i>2&&(G>_+Y||K<_-Y)}}function u(f){if(f.data)return f.r=n[f.data.index];for(var g=f.r=0;g<Math.pow(2,i);++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]=+r(x,f,e)}}return h.initialize=function(f,...g){e=f,a=g.find(x=>typeof x=="function")||Math.random,i=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?(r=typeof f=="function"?f:ki(+f),d(),h):r},h}function yH(r){return r.index}function wT(r,e){var i=r.get(e);if(!i)throw new Error("node not found: "+e);return i}function bH(r){var e=yH,i=x,n,a=ki(30),o,c,h,u,d,f,g=1;r==null&&(r=[]);function x(k){return 1/Math.min(u[k.source.index],u[k.target.index])}function y(k){for(var T=0,N=r.length;T<g;++T)for(var E=0,B,O,A,M=0,F=0,j=0,z,U;E<N;++E)B=r[E],O=B.source,A=B.target,M=A.x+A.vx-O.x-O.vx||na(f),h>1&&(F=A.y+A.vy-O.y-O.vy||na(f)),h>2&&(j=A.z+A.vz-O.z-O.vz||na(f)),z=Math.sqrt(M*M+F*F+j*j),z=(z-o[E])/z*k*n[E],M*=z,F*=z,j*=z,A.vx-=M*(U=d[E]),h>1&&(A.vy-=F*U),h>2&&(A.vz-=j*U),O.vx+=M*(U=1-U),h>1&&(O.vy+=F*U),h>2&&(O.vz+=j*U)}function v(){if(c){var k,T=c.length,N=r.length,E=new Map(c.map((O,A)=>[e(O,A,c),O])),B;for(k=0,u=new Array(T);k<N;++k)B=r[k],B.index=k,typeof B.source!="object"&&(B.source=wT(E,B.source)),typeof B.target!="object"&&(B.target=wT(E,B.target)),u[B.source.index]=(u[B.source.index]||0)+1,u[B.target.index]=(u[B.target.index]||0)+1;for(k=0,d=new Array(N);k<N;++k)B=r[k],d[k]=u[B.source.index]/(u[B.source.index]+u[B.target.index]);n=new Array(N),C(),o=new Array(N),_()}}function C(){if(c)for(var k=0,T=r.length;k<T;++k)n[k]=+i(r[k],k,r)}function _(){if(c)for(var k=0,T=r.length;k<T;++k)o[k]=+a(r[k],k,r)}return y.initialize=function(k,...T){c=k,f=T.find(N=>typeof N=="function")||Math.random,h=T.find(N=>[1,2,3].includes(N))||2,v()},y.links=function(k){return arguments.length?(r=k,v(),y):r},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?(i=typeof k=="function"?k:ki(+k),C(),y):i},y.distance=function(k){return arguments.length?(a=typeof k=="function"?k:ki(+k),_(),y):a},y}const xH=1664525,vH=1013904223,ST=4294967296;function CH(){let r=1;return()=>(r=(xH*r+vH)%ST)/ST}var TT=3;function Jb(r){return r.x}function ET(r){return r.y}function _H(r){return r.z}var kH=10,wH=Math.PI*(3-Math.sqrt(5)),SH=Math.PI*20/(9+Math.sqrt(221));function TH(r,e){e=e||2;var i=Math.min(TT,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=I1(y),g=Pd("tick","end"),x=CH();r==null&&(r=[]);function y(){v(),g.call("tick",n),a<o&&(f.stop(),g.call("end",n))}function v(k){var T,N=r.length,E;k===void 0&&(k=1);for(var B=0;B<k;++B)for(a+=(h-a)*c,d.forEach(function(O){O(a)}),T=0;T<N;++T)E=r[T],E.fx==null?E.x+=E.vx*=u:(E.x=E.fx,E.vx=0),i>1&&(E.fy==null?E.y+=E.vy*=u:(E.y=E.fy,E.vy=0)),i>2&&(E.fz==null?E.z+=E.vz*=u:(E.z=E.fz,E.vz=0));return n}function C(){for(var k=0,T=r.length,N;k<T;++k){if(N=r[k],N.index=k,N.fx!=null&&(N.x=N.fx),N.fy!=null&&(N.y=N.fy),N.fz!=null&&(N.z=N.fz),isNaN(N.x)||i>1&&isNaN(N.y)||i>2&&isNaN(N.z)){var E=kH*(i>2?Math.cbrt(.5+k):i>1?Math.sqrt(.5+k):k),B=k*wH,O=k*SH;i===1?N.x=E:i===2?(N.x=E*Math.cos(B),N.y=E*Math.sin(B)):(N.x=E*Math.sin(B)*Math.cos(O),N.y=E*Math.cos(B),N.z=E*Math.sin(B)*Math.sin(O))}(isNaN(N.vx)||i>1&&isNaN(N.vy)||i>2&&isNaN(N.vz))&&(N.vx=0,i>1&&(N.vy=0),i>2&&(N.vz=0))}}function _(k){return k.initialize&&k.initialize(r,x,i),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?(i=Math.min(TT,Math.max(1,Math.round(k))),d.forEach(_),n):i},nodes:function(k){return arguments.length?(r=k,C(),d.forEach(_),n):r},alpha:function(k){return arguments.length?(a=+k,n):a},alphaMin:function(k){return arguments.length?(o=+k,n):o},alphaDecay:function(k){return arguments.length?(c=+k,n):+c},alphaTarget:function(k){return arguments.length?(h=+k,n):h},velocityDecay:function(k){return arguments.length?(u=1-k,n):1-u},randomSource:function(k){return arguments.length?(x=k,d.forEach(_),n):x},force:function(k,T){return arguments.length>1?(T==null?d.delete(k):d.set(k,_(T)),n):d.get(k)},find:function(){var k=Array.prototype.slice.call(arguments),T=k.shift()||0,N=(i>1?k.shift():null)||0,E=(i>2?k.shift():null)||0,B=k.shift()||1/0,O=0,A=r.length,M,F,j,z,U,V;for(B*=B,O=0;O<A;++O)U=r[O],M=T-U.x,F=N-(U.y||0),j=E-(U.z||0),z=M*M+F*F+j*j,z<B&&(V=U,B=z);return V},on:function(k,T){return arguments.length>1?(g.on(k,T),n):g.on(k)}}}function EH(){var r,e,i,n,a,o=ki(-30),c,h=1,u=1/0,d=.81;function f(v){var C,_=r.length,k=(e===1?Z1(r,Jb):e===2?J1(r,Jb,ET):e===3?eC(r,Jb,ET,_H):null).visitAfter(x);for(a=v,C=0;C<_;++C)i=r[C],k.visit(y)}function g(){if(r){var v,C=r.length,_;for(c=new Array(C),v=0;v<C;++v)_=r[v],c[_.index]=+o(_,v,r)}}function x(v){var C=0,_,k,T=0,N,E,B,O,A=v.length;if(A){for(N=E=B=O=0;O<A;++O)(_=v[O])&&(k=Math.abs(_.value))&&(C+=_.value,T+=k,N+=k*(_.x||0),E+=k*(_.y||0),B+=k*(_.z||0));C*=Math.sqrt(4/A),v.x=N/T,e>1&&(v.y=E/T),e>2&&(v.z=B/T)}else{_=v,_.x=_.data.x,e>1&&(_.y=_.data.y),e>2&&(_.z=_.data.z);do C+=c[_.data.index];while(_=_.next)}v.value=C}function y(v,C,_,k,T){if(!v.value)return!0;var N=[_,k,T][e-1],E=v.x-i.x,B=e>1?v.y-i.y:0,O=e>2?v.z-i.z:0,A=N-C,M=E*E+B*B+O*O;if(A*A/d<M)return M<u&&(E===0&&(E=na(n),M+=E*E),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&O===0&&(O=na(n),M+=O*O),M<h&&(M=Math.sqrt(h*M)),i.vx+=E*v.value*a/M,e>1&&(i.vy+=B*v.value*a/M),e>2&&(i.vz+=O*v.value*a/M)),!0;if(v.length||M>=u)return;(v.data!==i||v.next)&&(E===0&&(E=na(n),M+=E*E),e>1&&B===0&&(B=na(n),M+=B*B),e>2&&O===0&&(O=na(n),M+=O*O),M<h&&(M=Math.sqrt(h*M)));do v.data!==i&&(A=c[v.data.index]*a/M,i.vx+=E*A,e>1&&(i.vy+=B*A),e>2&&(i.vz+=O*A));while(v=v.next)}return f.initialize=function(v,...C){r=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:ki(+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 NH(r,e,i,n){var a,o,c=ki(.1),h,u;typeof r!="function"&&(r=ki(+r)),e==null&&(e=0),i==null&&(i=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)-i||1e-6,k=(v.z||0)-n||1e-6,T=Math.sqrt(C*C+_*_+k*k),N=(u[x]-T)*h[x]*g/T;v.vx+=C*N,o>1&&(v.vy+=_*N),o>2&&(v.vz+=k*N)}}function f(){if(a){var g,x=a.length;for(h=new Array(x),u=new Array(x),g=0;g<x;++g)u[g]=+r(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:ki(+g),f(),d):c},d.radius=function(g){return arguments.length?(r=typeof g=="function"?g:ki(+g),f(),d):r},d.x=function(g){return arguments.length?(e=+g,d):e},d.y=function(g){return arguments.length?(i=+g,d):i},d.z=function(g){return arguments.length?(n=+g,d):n},d}function AH(r){var e=ki(.1),i,n,a;typeof r!="function"&&(r=ki(r==null?0:+r));function o(h){for(var u=0,d=i.length,f;u<d;++u)f=i[u],f.vx+=(a[u]-f.x)*n[u]*h}function c(){if(i){var h,u=i.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+r(i[h],h,i))?0:+e(i[h],h,i)}}return o.initialize=function(h){i=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:ki(+h),c(),o):e},o.x=function(h){return arguments.length?(r=typeof h=="function"?h:ki(+h),c(),o):r},o}function MH(r){var e=ki(.1),i,n,a;typeof r!="function"&&(r=ki(r==null?0:+r));function o(h){for(var u=0,d=i.length,f;u<d;++u)f=i[u],f.vy+=(a[u]-f.y)*n[u]*h}function c(){if(i){var h,u=i.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+r(i[h],h,i))?0:+e(i[h],h,i)}}return o.initialize=function(h){i=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:ki(+h),c(),o):e},o.y=function(h){return arguments.length?(r=typeof h=="function"?h:ki(+h),c(),o):r},o}const{abs:Su,cos:xs,sin:Tc,acos:BH,atan2:Tu,sqrt:po,pow:ea}=Math;function Eu(r){return r<0?-ea(-r,1/3):ea(r,1/3)}const MB=Math.PI,Cp=2*MB,go=MB/2,LH=1e-6,t0=Number.MAX_SAFE_INTEGER||9007199254740991,e0=Number.MIN_SAFE_INTEGER||-9007199254740991,OH={x:0,y:0,z:0},zt={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(r,e){const i=e(r);let n=i.x*i.x+i.y*i.y;return typeof i.z<"u"&&(n+=i.z*i.z),po(n)},compute:function(r,e,i){if(r===0)return e[0].t=0,e[0];const n=e.length-1;if(r===1)return e[n].t=1,e[n];const a=1-r;let o=e;if(n===0)return e[0].t=r,e[0];if(n===1){const h={x:a*o[0].x+r*o[1].x,y:a*o[0].y+r*o[1].y,t:r};return i&&(h.z=a*o[0].z+r*o[1].z),h}if(n<4){let h=a*a,u=r*r,d,f,g,x=0;n===2?(o=[o[0],o[1],o[2],OH],d=h,f=a*r*2,g=u):n===3&&(d=h*a,f=h*r*3,g=a*u*3,x=r*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:r};return i&&(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)*r,y:c[h].y+(c[h+1].y-c[h].y)*r},typeof c[h].z<"u"&&(c[h].z=c[h].z+(c[h+1].z-c[h].z)*r);c.splice(c.length-1,1)}return c[0].t=r,c[0]},computeWithRatios:function(r,e,i,n){const a=1-r,o=i,c=e;let h=o[0],u=o[1],d=o[2],f=o[3],g;if(h*=a,u*=r,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:r};if(h*=a,u*=2*a,d*=r*r,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:r};if(h*=a,u*=1.5*a,d*=3*a,f*=r*r*r,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:r}},derive:function(r,e){const i=[];for(let n=r,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);i.push(c),n=c}return i},between:function(r,e,i){return e<=r&&r<=i||zt.approximately(r,e)||zt.approximately(r,i)},approximately:function(r,e,i){return Su(r-e)<=(i||LH)},length:function(r){const i=zt.Tvalues.length;let n=0;for(let a=0,o;a<i;a++)o=.5*zt.Tvalues[a]+.5,n+=zt.Cvalues[a]*zt.arcfn(o,r);return .5*n},map:function(r,e,i,n,a){const o=i-e,c=a-n,h=r-e,u=h/o;return n+c*u},lerp:function(r,e,i){const n={x:e.x+r*(i.x-e.x),y:e.y+r*(i.y-e.y)};return e.z!==void 0&&i.z!==void 0&&(n.z=e.z+r*(i.z-e.z)),n},pointToString:function(r){let e=r.x+"/"+r.y;return typeof r.z<"u"&&(e+="/"+r.z),e},pointsToString:function(r){return"["+r.map(zt.pointToString).join(", ")+"]"},copy:function(r){return JSON.parse(JSON.stringify(r))},angle:function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=i.x-r.x,c=i.y-r.y,h=n*c-a*o,u=n*o+a*c;return Tu(h,u)},round:function(r,e){const i=""+r,n=i.indexOf(".");return parseFloat(i.substring(0,n+1+e))},dist:function(r,e){const i=r.x-e.x,n=r.y-e.y;return po(i*i+n*n)},closest:function(r,e){let i=ea(2,63),n,a;return r.forEach(function(o,c){a=zt.dist(e,o),a<i&&(i=a,n=c)}),{mdist:i,mpos:n}},abcratio:function(r,e){if(e!==2&&e!==3)return!1;if(typeof r>"u")r=.5;else if(r===0||r===1)return r;const i=ea(r,e)+ea(1-r,e),n=i-1;return Su(n/i)},projectionratio:function(r,e){if(e!==2&&e!==3)return!1;if(typeof r>"u")r=.5;else if(r===0||r===1)return r;const i=ea(1-r,e),n=ea(r,e)+i;return i/n},lli8:function(r,e,i,n,a,o,c,h){const u=(r*n-e*i)*(a-c)-(r-i)*(a*h-o*c),d=(r*n-e*i)*(o-h)-(e-n)*(a*h-o*c),f=(r-i)*(o-h)-(e-n)*(a-c);return f==0?!1:{x:u/f,y:d/f}},lli4:function(r,e,i,n){const a=r.x,o=r.y,c=e.x,h=e.y,u=i.x,d=i.y,f=n.x,g=n.y;return zt.lli8(a,o,c,h,u,d,f,g)},lli:function(r,e){return zt.lli4(r,r.c,e,e.c)},makeline:function(r,e){return new $r(r.x,r.y,(r.x+e.x)/2,(r.y+e.y)/2,e.x,e.y)},findbbox:function(r){let e=t0,i=t0,n=e0,a=e0;return r.forEach(function(o){const c=o.bbox();e>c.x.min&&(e=c.x.min),i>c.y.min&&(i=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:i,mid:(i+a)/2,max:a,size:a-i}}},shapeintersections:function(r,e,i,n,a){if(!zt.bboxoverlap(e,n))return[];const o=[],c=[r.startcap,r.forward,r.back,r.endcap],h=[i.startcap,i.forward,i.back,i.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=r,f.s2=i,o.push(f))})}),o},makeshape:function(r,e,i){const n=e.points.length,a=r.points.length,o=zt.makeline(e.points[n-1],r.points[0]),c=zt.makeline(r.points[a-1],e.points[0]),h={startcap:o,forward:r,back:e,endcap:c,bbox:zt.findbbox([o,r,e,c])};return h.intersections=function(u){return zt.shapeintersections(h,h.bbox,u,u.bbox,i)},h},getminmax:function(r,e,i){if(!i)return{min:0,max:0};let n=t0,a=e0,o,c;i.indexOf(0)===-1&&(i=[0].concat(i)),i.indexOf(1)===-1&&i.push(1);for(let h=0,u=i.length;h<u;h++)o=i[h],c=r.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(r,e){const i=e.p1.x,n=e.p1.y,a=-Tu(e.p2.y-n,e.p2.x-i),o=function(c){return{x:(c.x-i)*xs(a)-(c.y-n)*Tc(a),y:(c.x-i)*Tc(a)+(c.y-n)*xs(a)}};return r.map(o)},roots:function(r,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const i=r.length-1,n=zt.align(r,e),a=function(A){return 0<=A&&A<=1};if(i===2){const A=n[0].y,M=n[1].y,F=n[2].y,j=A-2*M+F;if(j!==0){const z=-po(M*M-A*F),U=-A+M,V=-(z+U)/j,I=-(-z+U)/j;return[V,I].filter(a)}else if(M!==F&&j===0)return[(2*M-F)/(2*M-2*F)].filter(a);return[]}const o=n[0].y,c=n[1].y,h=n[2].y,u=n[3].y;let d=-o+3*c-3*h+u,f=3*o-6*c+3*h,g=-3*o+3*c,x=o;if(zt.approximately(d,0)){if(zt.approximately(f,0))return zt.approximately(g,0)?[]:[-x/g].filter(a);const A=po(g*g-4*f*x),M=2*f;return[(A-g)/M,(-g-A)/M].filter(a)}f/=d,g/=d,x/=d;const y=(3*g-f*f)/3,v=y/3,C=(2*f*f*f-9*f*g+27*x)/27,_=C/2,k=_*_+v*v*v;let T,N,E,B,O;if(k<0){const A=-y/3,M=A*A*A,F=po(M),j=-C/(2*F),z=j<-1?-1:j>1?1:j,U=BH(z),V=Eu(F),I=2*V;return E=I*xs(U/3)-f/3,B=I*xs((U+Cp)/3)-f/3,O=I*xs((U+2*Cp)/3)-f/3,[E,B,O].filter(a)}else{if(k===0)return T=_<0?Eu(-_):-Eu(_),E=2*T-f/3,B=-T-f/3,[E,B].filter(a);{const A=po(k);return T=Eu(-_+A),N=Eu(_+A),[T-N-f/3].filter(a)}}},droots:function(r){if(r.length===3){const e=r[0],i=r[1],n=r[2],a=e-2*i+n;if(a!==0){const o=-po(i*i-e*n),c=-e+i,h=-(o+c)/a,u=-(-o+c)/a;return[h,u]}else if(i!==n&&a===0)return[(2*i-n)/(2*(i-n))];return[]}if(r.length===2){const e=r[0],i=r[1];return e!==i?[e/(e-i)]:[]}return[]},curvature:function(r,e,i,n,a){let o,c,h,u,d=0,f=0;const g=zt.compute(r,e),x=zt.compute(r,i),y=g.x*g.x+g.y*g.y;if(n?(o=po(ea(g.y*x.z-x.y*g.z,2)+ea(g.z*x.x-x.z*g.x,2)+ea(g.x*x.y-x.x*g.y,2)),c=ea(y+g.z*g.z,3/2)):(o=g.x*x.y-g.y*x.x,c=ea(y,3/2)),o===0||c===0)return{k:0,r:0};if(d=o/c,f=c/o,!a){const v=zt.curvature(r-.001,e,i,n,!0).k,C=zt.curvature(r+.001,e,i,n,!0).k;u=(C-d+(d-v))/2,h=(Su(C-d)+Su(d-v))/2}return{k:d,r:f,dk:u,adk:h}},inflections:function(r){if(r.length<4)return[];const e=zt.align(r,{p1:r[0],p2:r.slice(-1)[0]}),i=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*i+2*n+3*a-o),h=18*(3*i-n-3*a),u=18*(a-i);if(zt.approximately(c,0)){if(!zt.approximately(h,0)){let x=-u/h;if(0<=x&&x<=1)return[x]}return[]}const d=2*c;if(zt.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(r,e){const i=["x","y"],n=i.length;for(let a=0,o,c,h,u;a<n;a++)if(o=i[a],c=r[o].mid,h=e[o].mid,u=(r[o].size+e[o].size)/2,Su(c-h)>=u)return!1;return!0},expandbox:function(r,e){e.x.min<r.x.min&&(r.x.min=e.x.min),e.y.min<r.y.min&&(r.y.min=e.y.min),e.z&&e.z.min<r.z.min&&(r.z.min=e.z.min),e.x.max>r.x.max&&(r.x.max=e.x.max),e.y.max>r.y.max&&(r.y.max=e.y.max),e.z&&e.z.max>r.z.max&&(r.z.max=e.z.max),r.x.mid=(r.x.min+r.x.max)/2,r.y.mid=(r.y.min+r.y.max)/2,r.z&&(r.z.mid=(r.z.min+r.z.max)/2),r.x.size=r.x.max-r.x.min,r.y.size=r.y.max-r.y.min,r.z&&(r.z.size=r.z.max-r.z.min)},pairiteration:function(r,e,i){const n=r.bbox(),a=e.bbox(),o=1e5,c=i||.5;if(n.x.size+n.y.size<c&&a.x.size+a.y.size<c)return[(o*(r._t1+r._t2)/2|0)/o+"/"+(o*(e._t1+e._t2)/2|0)/o];let h=r.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 zt.bboxoverlap(g.left.bbox(),g.right.bbox())});let f=[];return d.length===0||(d.forEach(function(g){f=f.concat(zt.pairiteration(g.left,g.right,c))}),f=f.filter(function(g,x){return f.indexOf(g)===x})),f},getccenter:function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=i.x-e.x,c=i.y-e.y,h=n*xs(go)-a*Tc(go),u=n*Tc(go)+a*xs(go),d=o*xs(go)-c*Tc(go),f=o*Tc(go)+c*xs(go),g=(r.x+e.x)/2,x=(r.y+e.y)/2,y=(e.x+i.x)/2,v=(e.y+i.y)/2,C=g+h,_=x+u,k=y+d,T=v+f,N=zt.lli8(g,x,C,_,y,v,k,T),E=zt.dist(N,r);let B=Tu(r.y-N.y,r.x-N.x),O=Tu(e.y-N.y,e.x-N.x),A=Tu(i.y-N.y,i.x-N.x),M;return B<A?((B>O||O>A)&&(B+=Cp),B>A&&(M=A,A=B,B=M)):A<O&&O<B?(M=A,A=B,B=M):A+=Cp,N.s=B,N.e=A,N.r=E,N},numberSort:function(r,e){return r-e}};class ld{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(e){return zt.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,i){return e+i})}curve(e){return this.curves[e]}bbox(){const e=this.curves;for(var i=e[0].bbox(),n=1;n<e.length;n++)zt.expandbox(i,e[n].bbox());return i}offset(e){const i=[];return this.curves.forEach(function(n){i.push(...n.offset(e))}),new ld(i)}}const{abs:Nu,min:NT,max:AT,cos:RH,sin:jH,acos:DH,sqrt:Au}=Math,FH=Math.PI;class $r{constructor(e){let i=e&&e.forEach?e:Array.from(arguments).slice(),n=!1;if(typeof i[0]=="object"){n=i.length;const y=[];i.forEach(function(v){["x","y","z"].forEach(function(C){typeof v[C]<"u"&&y.push(v[C])})}),i=y}let a=!1;const o=i.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:i[y],y:i[y+1]};c&&(u.z=i[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=zt.align(h,{p1:h[0],p2:h[d]}),x=zt.dist(h[0],h[d]);this._linear=g.reduce((y,v)=>y+Nu(v.y),0)<x/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(e,i,n,a){if(typeof a>"u"&&(a=.5),a===0)return new $r(i,i,n);if(a===1)return new $r(e,i,i);const o=$r.getABC(2,e,i,n,a);return new $r(e,o.A,n)}static cubicFromPoints(e,i,n,a,o){typeof a>"u"&&(a=.5);const c=$r.getABC(3,e,i,n,a);typeof o>"u"&&(o=zt.dist(i,c.C));const h=o*(1-a)/a,u=zt.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:i.x-g,y:i.y-x},_={x:i.x+y,y:i.y+v},k=c.A,T={x:k.x+(C.x-k.x)/(1-a),y:k.y+(C.y-k.y)/(1-a)},N={x:k.x+(_.x-k.x)/a,y:k.y+(_.y-k.y)/a},E={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},B={x:n.x+(N.x-n.x)/(1-a),y:n.y+(N.y-n.y)/(1-a)};return new $r(e,E,B,n)}static getUtils(){return zt}getUtils(){return $r.getUtils()}static get PolyBezier(){return ld}valueOf(){return this.toString()}toString(){return zt.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,i=e[0].x,n=e[0].y,a=["M",i,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,i){return""+i+e.x+e.y+(e.z?e.z:0)}).join("")}update(){this._lut=[],this.dpoints=zt.derive(this.points,this._3d),this.computedirection()}computedirection(){const e=this.points,i=zt.angle(e[0],e[this.order],e[1]);this.clockwise=i>0}length(){return zt.length(this.derivative.bind(this))}static getABC(e=2,i,n,a,o=.5){const c=zt.projectionratio(o,e),h=1-c,u={x:c*i.x+h*a.x,y:c*i.y+h*a.y},d=zt.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:i,E:a}}getABC(e,i){i=i||this.get(e);let n=this.points[0],a=this.points[this.order];return $r.getABC(this.order,n,i,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 i=0,n,a;i<e;i++)a=i/(e-1),n=this.compute(a),n.t=a,this._lut.push(n);return this._lut}on(e,i){i=i||5;const n=this.getLUT(),a=[];for(let o=0,c,h=0;o<n.length;o++)c=n[o],zt.dist(c,e)<i&&(a.push(c),h+=o/n.length);return a.length?t/=a.length:!1}project(e){const i=this.getLUT(),n=i.length-1,a=zt.closest(i,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=zt.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?zt.computeWithRatios(e,this.points,this.ratios,this._3d):zt.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,i=[e[0]],n=e.length;for(let a=1,o,c;a<n;a++)o=e[a],c=e[a-1],i[a]={x:(n-a)/n*o.x+a/n*c.x,y:(n-a)/n*o.y+a/n*c.y};return i[n]=e[n-1],new $r(i)}derivative(e){return zt.compute(e,this.dpoints[0],this._3d)}dderivative(e){return zt.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new $r(zt.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return zt.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return zt.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){const i=this.derivative(e),n=Au(i.x*i.x+i.y*i.y);return{t:e,x:-i.y/n,y:i.x/n}}__normal3(e){const i=this.derivative(e),n=this.derivative(e+.01),a=Au(i.x*i.x+i.y*i.y+i.z*i.z),o=Au(n.x*n.x+n.y*n.y+n.z*n.z);i.x/=a,i.y/=a,i.z/=a,n.x/=o,n.y/=o,n.z/=o;const c={x:n.y*i.z-n.z*i.y,y:n.z*i.x-n.x*i.z,z:n.x*i.y-n.y*i.x},h=Au(c.x*c.x+c.y*c.y+c.z*c.z);c.x/=h,c.y/=h,c.z/=h;const u=[c.x*c.x,c.x*c.y-c.z,c.x*c.z+c.y,c.x*c.y+c.z,c.y*c.y,c.y*c.z-c.x,c.x*c.z-c.y,c.y*c.z+c.x,c.z*c.z];return{t:e,x:u[0]*i.x+u[1]*i.y+u[2]*i.z,y:u[3]*i.x+u[4]*i.y+u[5]*i.z,z:u[6]*i.x+u[7]*i.y+u[8]*i.z}}hull(e){let i=this.points,n=[],a=[],o=0;for(a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],this.order===3&&(a[o++]=i[3]);i.length>1;){n=[];for(let c=0,h,u=i.length-1;c<u;c++)h=zt.lerp(e,i[c],i[c+1]),a[o++]=h,n.push(h);i=n}return a}split(e,i){if(e===0&&i)return this.split(i).left;if(i===1)return this.split(e).right;const n=this.hull(e),a={left:this.order===2?new $r([n[0],n[3],n[5]]):new $r([n[0],n[4],n[7],n[9]]),right:this.order===2?new $r([n[5],n[4],n[2]]):new $r([n[9],n[8],n[6],n[3]]),span:n};return a.left._t1=zt.map(0,0,1,this._t1,this._t2),a.left._t2=zt.map(e,0,1,this._t1,this._t2),a.right._t1=zt.map(e,0,1,this._t1,this._t2),a.right._t2=zt.map(1,0,1,this._t1,this._t2),i?(i=zt.map(i,e,1,0,1),a.right.split(i).left):a}extrema(){const e={};let i=[];return this.dims.forEach((function(n){let a=function(c){return c[n]},o=this.dpoints[0].map(a);e[n]=zt.droots(o),this.order===3&&(o=this.dpoints[1].map(a),e[n]=e[n].concat(zt.droots(o))),e[n]=e[n].filter(function(c){return c>=0&&c<=1}),i=i.concat(e[n].sort(zt.numberSort))}).bind(this)),e.values=i.sort(zt.numberSort).filter(function(n,a){return i.indexOf(n)===a}),e}bbox(){const e=this.extrema(),i={};return this.dims.forEach((function(n){i[n]=zt.getminmax(this,n,e[n])}).bind(this)),i}overlaps(e){const i=this.bbox(),n=e.bbox();return zt.bboxoverlap(i,n)}offset(e,i){if(typeof i<"u"){const n=this.get(e),a=this.normal(e),o={c:n,n:a,x:n.x+a.x*i,y:n.y+a.y*i};return this._3d&&(o.z=n.z+a.z*i),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 $r(a)]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(this.order===3){const a=zt.angle(this.points[0],this.points[3],this.points[1]),o=zt.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),i=this.normal(1);let n=e.x*i.x+e.y*i.y;return this._3d&&(n+=e.z*i.z),Nu(DH(n))<FH/3}reduce(){let e,i=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),i=u[0],e=1;e<u.length;e++)n=u[e],o=this.split(i,n),o._t1=i,o._t2=n,c.push(o),i=n;return c.forEach(function(d){for(i=0,n=0;n<=1;)for(n=i+a;n<=1+a;n+=a)if(o=d.split(i,n),!o.simple()){if(n-=a,Nu(i-n)<a)return[];o=d.split(i,n),o._t1=zt.map(i,0,1,d._t1,d._t2),o._t2=zt.map(n,0,1,d._t1,d._t2),h.push(o),i=n;break}i<1&&(o=d.split(i,1),o._t1=zt.map(i,0,1,d._t1,d._t2),o._t2=d._t2,h.push(o))}),h}translate(e,i,n){n=typeof n=="number"?n:i;const a=this.order;let o=this.points.map((c,h)=>(1-h/a)*i+h/a*n);return new $r(this.points.map((c,h)=>({x:c.x+e.x*o[h],y:c.y+e.y*o[h]})))}scale(e){const i=this.order;let n=!1;if(typeof e=="function"&&(n=e),n&&i===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=zt.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*i]=zt.copy(o[g*i]);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(!(i===2&&g)){var x=o[g+1],y={x:x.x-f.x,y:x.y-f.y},v=n?n((g+1)/i):e;n&&!a&&(v=-v);var C=Au(y.x*y.x+y.y*y.y);y.x/=C,y.y/=C,d[g+1]={x:x.x+v*y.x,y:x.y+v*y.y}}}),new $r(d)):([0,1].forEach(g=>{if(i===2&&g)return;const x=d[g*i],y=this.derivative(g),v={x:x.x+y.x,y:x.y+y.y};d[g+1]=zt.lli4(x,v,f,o[g+1])}),new $r(d))}outline(e,i,n,a){if(i=i===void 0?e:i,this._linear){const B=this.normal(0),O=this.points[0],A=this.points[this.points.length-1];let M,F,j;n===void 0&&(n=e,a=i),M={x:O.x+B.x*e,y:O.y+B.y*e},j={x:A.x+B.x*n,y:A.y+B.y*n},F={x:(M.x+j.x)/2,y:(M.y+j.y)/2};const z=[M,F,j];M={x:O.x-B.x*i,y:O.y-B.y*i},j={x:A.x-B.x*a,y:A.y-B.y*a},F={x:(M.x+j.x)/2,y:(M.y+j.y)/2};const U=[j,F,M],V=zt.makeline(U[2],z[0]),I=zt.makeline(z[2],U[0]),G=[V,new $r(z),I,new $r(U)];return new ld(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,O,A,M,F){return function(j){const z=M/A,U=(M+F)/A,V=O-B;return zt.map(j,0,1,B+z*V,B+U*V)}}o.forEach(function(B){const O=B.length();x?(h.push(B.scale(y(e,n,g,f,O))),u.push(B.scale(y(-i,-a,g,f,O)))):(h.push(B.scale(e)),u.push(B.scale(-i))),f+=O}),u=u.map(function(B){return d=B.points,d[3]?B.points=[d[3],d[2],d[1],d[0]]:B.points=[d[2],d[1],d[0]],B}).reverse();const v=h[0].points[0],C=h[c-1].points[h[c-1].points.length-1],_=u[c-1].points[u[c-1].points.length-1],k=u[0].points[0],T=zt.makeline(_,v),N=zt.makeline(C,k),E=[T].concat(h).concat([N]).concat(u);return new ld(E)}outlineshapes(e,i,n){i=i||e;const a=this.outline(e,i).curves,o=[];for(let c=1,h=a.length;c<h/2;c++){const u=zt.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,i){return e?e.p1&&e.p2?this.lineIntersects(e):(e instanceof $r&&(e=e.reduce()),this.curveintersects(this.reduce(),e,i)):this.selfintersects(i)}lineIntersects(e){const i=NT(e.p1.x,e.p2.x),n=NT(e.p1.y,e.p2.y),a=AT(e.p1.x,e.p2.x),o=AT(e.p1.y,e.p2.y);return zt.roots(this.points,e).filter(c=>{var h=this.get(c);return zt.between(h.x,i,a)&&zt.between(h.y,n,o)})}selfintersects(e){const i=this.reduce(),n=i.length-2,a=[];for(let o=0,c,h,u;o<n;o++)h=i.slice(o,o+1),u=i.slice(o+2),c=this.curveintersects(h,u,e),a.push(...c);return a}curveintersects(e,i,n){const a=[];e.forEach(function(c){i.forEach(function(h){c.overlaps(h)&&a.push({left:c,right:h})})});let o=[];return a.forEach(function(c){const h=zt.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,i,n,a){const o=(a-n)/4,c=this.get(n+o),h=this.get(a-o),u=zt.dist(e,i),d=zt.dist(e,c),f=zt.dist(e,h);return Nu(d-u)+Nu(f-u)}_iterate(e,i){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=zt.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*RH(d.e),y:d.y+d.r*jH(d.e)};d.e+=zt.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,i.push(f),n=C}while(a<1);return i}}function mv(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function IH(r){if(Array.isArray(r))return r}function $H(r){if(Array.isArray(r))return mv(r)}function zH(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function PH(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function qH(){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 UH(){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 HH(r,e){if(r==null)return{};var i,n,a=WH(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)i=o[n],e.includes(i)||{}.propertyIsEnumerable.call(r,i)&&(a[i]=r[i])}return a}function WH(r,e){if(r==null)return{};var i={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;i[n]=r[n]}return i}function GH(r,e){return IH(r)||PH(r,e)||BB(r,e)||qH()}function YH(r){return $H(r)||zH(r)||BB(r)||UH()}function KH(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function VH(r){var e=KH(r,"string");return typeof e=="symbol"?e:e+""}function BB(r,e){if(r){if(typeof r=="string")return mv(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?mv(r,e):void 0}}var XH=(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=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=r.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=HH(_,[y].map(VH));C=k,f=T}else C=y(f,x);x+1<a.length?(d.hasOwnProperty(C)||(d[C]={}),d=d[C]):i?(d.hasOwnProperty(C)||(d[C]=[]),d[C].push(f)):d[C]=f}),h},{});i 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]=i(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=GH(f,2),x=g[0],y=g[1];return h(y,[].concat(YH(d),[x]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function ZH(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}const MT=Symbol("implicit");function LB(){var r=new L2,e=[],i=[],n=MT;function a(o){let c=r.get(o);if(c===void 0){if(n!==MT)return n;r.set(o,c=e.push(o)-1)}return i[c%i.length]}return a.domain=function(o){if(!arguments.length)return e.slice();e=[],r=new L2;for(const c of o)r.has(c)||r.set(c,e.push(c)-1);return a},a.range=function(o){return arguments.length?(i=Array.from(o),a):i.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return LB(e,i).unknown(n)},ZH.apply(a,arguments),a}function QH(r){for(var e=r.length/6|0,i=new Array(e),n=0;n<e;)i[n]="#"+r.slice(n*6,++n*6);return i}const JH=QH("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function tW(r,e){e===void 0&&(e={});var i=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r))}}var eW=`.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
|
+
`;tW(eW);function yv(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function rW(r){if(Array.isArray(r))return r}function iW(r){if(Array.isArray(r))return yv(r)}function BT(r,e,i){if(OB())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var a=new(r.bind.apply(r,n));return a}function Sd(r,e,i){return(e=cW(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function OB(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OB=function(){return!!r})()}function nW(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function aW(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function sW(){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 oW(){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 LT(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),i.push.apply(i,n)}return i}function Ec(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?LT(Object(i),!0).forEach(function(n){Sd(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):LT(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function cd(r,e){return rW(r)||aW(r,e)||RB(r,e)||sW()}function aa(r){return iW(r)||nW(r)||RB(r)||oW()}function lW(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function cW(r){var e=lW(r,"string");return typeof e=="symbol"?e:e+""}function bv(r){"@babel/helpers - typeof";return bv=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},bv(r)}function RB(r,e){if(r){if(typeof r=="string")return yv(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yv(r,e):void 0}}var hW=LB(JH);function OT(r,e,i){!e||typeof i!="string"||r.filter(function(n){return!n[i]}).forEach(function(n){n[i]=hW(e(n))})}function uW(r,e){var i=r.nodes,n=r.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={};i.forEach(function(y){return d[e(y)]={data:y,out:[],depth:-1,skip:!c(y)}}),n.forEach(function(y){var v=y.source,C=y.target,_=E(v),k=E(C);if(!d.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!d.hasOwnProperty(k))throw"Missing target node with id: ".concat(k);var T=d[_],N=d[k];T.out.push(N);function E(B){return bv(B)==="object"?e(B):B}});var f=[];x(Object.values(d));var g=Object.assign.apply(Object,[{}].concat(aa(Object.entries(d).filter(function(y){var v=cd(y,2),C=v[1];return!C.skip}).map(function(y){var v=cd(y,2),C=v[0],_=v[1];return Sd({},C,_.depth)}))));return g;function x(y){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var E=y[k];if(v.indexOf(E)!==-1){var B=[].concat(aa(v.slice(v.indexOf(E))),[E]).map(function(O){return e(O.data)});return f.some(function(O){return O.length===B.length&&O.every(function(A,M){return A===B[M]})})||(f.push(B),u(B)),1}C>E.depth&&(E.depth=C,x(E.out,[].concat(aa(v),[E]),C+(E.skip?0:1)))},k=0,T=y.length;k<T;k++)_()}}var dW=2,$i=function(e,i){return i.onNeedsRedraw&&i.onNeedsRedraw()},RT=function(e,i){if(!i.isShadow){var n=xr(i.linkDirectionalParticles);i.graphData.links.forEach(function(a){var o=Math.round(Math.abs(n(a)));o?a.__photons=aa(Array(o)).map(function(){return{}}):delete a.__photons})}},wg=G1({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,i){i.engineRunning=!1,RT(e,i)}},dagMode:{onChange:function(e,i){!e&&(i.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:$i},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:$i},nodeColor:{default:"color",triggerUpdate:!1,onChange:$i},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:$i},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:$i},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:$i},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:$i},linkColor:{default:"color",triggerUpdate:!1,onChange:$i},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:$i},linkWidth:{default:1,triggerUpdate:!1,onChange:$i},linkCurvature:{default:0,triggerUpdate:!1,onChange:$i},linkCanvasObject:{triggerUpdate:!1,onChange:$i},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:$i},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:$i},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:$i},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:$i},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:RT},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,i){i.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,i){i.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,i){i.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,i,n){return n===void 0?e.forceLayout.force(i):(e.forceLayout.force(i,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&&i(),a(),!e.isShadow&&o(),!e.isShadow&&c(),n(),this;function i(){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=xr(e.nodeVisibility),u=xr(e.nodeVal),d=xr(e.nodeColor),f=xr(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=xr(e.linkVisibility),u=xr(e.linkColor),d=xr(e.linkWidth),f=xr(e.linkLineDash),g=xr(e.linkCurvature),x=xr(e.linkCanvasObjectMode),y=e.ctx,v=e.isShadow*2,C=e.graphData.links.filter(h);C.forEach(O);var _=[],k=[],T=C;if(e.linkCanvasObject){var N=[],E=[];C.forEach(function(A){return({before:_,after:k,replace:N}[x(A)]||E).push(A)}),T=[].concat(aa(_),k,E),_=_.concat(N)}y.save(),_.forEach(function(A){return e.linkCanvasObject(A,y,e.globalScale)}),y.restore();var B=XH(T,[u,d,f]);y.save(),Object.entries(B).forEach(function(A){var M=cd(A,2),F=M[0],j=M[1],z=!F||F==="undefined"?"rgba(0,0,0,0.15)":F;Object.entries(j).forEach(function(U){var V=cd(U,2),I=V[0],G=V[1],D=(I||1)/e.globalScale+v;Object.entries(G).forEach(function(W){var K=cd(W,2);K[0];var tt=K[1],nt=f(tt[0]);y.beginPath(),tt.forEach(function(Y){var rt=Y.source,ft=Y.target;if(!(!rt||!ft||!rt.hasOwnProperty("x")||!ft.hasOwnProperty("x"))){y.moveTo(rt.x,rt.y);var ct=Y.__controlPoints;ct?y[ct.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,aa(ct).concat([ft.x,ft.y])):y.lineTo(ft.x,ft.y)}}),y.strokeStyle=z,y.lineWidth=D,y.setLineDash(nt||[]),y.stroke()})})}),y.restore(),y.save(),k.forEach(function(A){return e.linkCanvasObject(A,y,e.globalScale)}),y.restore();function O(A){var M=g(A);if(!M){A.__controlPoints=null;return}var F=A.source,j=A.target;if(!(!F||!j||!F.hasOwnProperty("x")||!j.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow(j.x-F.x,2)+Math.pow(j.y-F.y,2));if(z>0){var U=Math.atan2(j.y-F.y,j.x-F.x),V=z*M,I={x:(F.x+j.x)/2+V*Math.cos(U-Math.PI/2),y:(F.y+j.y)/2+V*Math.sin(U-Math.PI/2)};A.__controlPoints=[I.x,I.y]}else{var G=M*70;A.__controlPoints=[j.x,j.y-G,j.x+G,j.y]}}}}function o(){var h=1.6,u=.2,d=xr(e.linkDirectionalArrowLength),f=xr(e.linkDirectionalArrowRelPos),g=xr(e.linkVisibility),x=xr(e.linkDirectionalArrowColor||e.linkColor),y=xr(e.nodeVal),v=e.ctx;v.save(),e.graphData.links.filter(g).forEach(function(C){var _=d(C);if(!(!_||_<0)){var k=C.source,T=C.target;if(!(!k||!T||!k.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var N=Math.sqrt(Math.max(0,y(k)||1))*e.nodeRelSize,E=Math.sqrt(Math.max(0,y(T)||1))*e.nodeRelSize,B=Math.min(1,Math.max(0,f(C))),O=x(C)||"rgba(0,0,0,0.28)",A=_/h/2,M=C.__controlPoints&&BT($r,[k.x,k.y].concat(aa(C.__controlPoints),[T.x,T.y])),F=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)),z=N+_+(j-N-E-_)*B,U=F(z/j),V=F((z-_)/j),I=F((z-_*(1-u))/j),G=Math.atan2(U.y-V.y,U.x-V.x)-Math.PI/2;v.beginPath(),v.moveTo(U.x,U.y),v.lineTo(V.x+A*Math.cos(G),V.y+A*Math.sin(G)),v.lineTo(I.x,I.y),v.lineTo(V.x-A*Math.cos(G),V.y-A*Math.sin(G)),v.fillStyle=O,v.fill()}}}),v.restore()}function c(){var h=xr(e.linkDirectionalParticles),u=xr(e.linkDirectionalParticleSpeed),d=xr(e.linkDirectionalParticleOffset),f=xr(e.linkDirectionalParticleWidth),g=xr(e.linkVisibility),x=xr(e.linkDirectionalParticleColor||e.linkColor),y=e.ctx;y.save(),e.graphData.links.filter(g).forEach(function(v){var C=h(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var _=v.source,k=v.target;if(!(!_||!k||!_.hasOwnProperty("x")||!k.hasOwnProperty("x"))){var T=u(v),N=Math.abs(d(v)),E=v.__photons||[],B=Math.max(0,f(v)/2)/Math.sqrt(e.globalScale),O=x(v)||"rgba(0,0,0,0.28)";y.fillStyle=O;var A=v.__controlPoints?BT($r,[_.x,_.y].concat(aa(v.__controlPoints),[k.x,k.y])):null,M=0,F=!1;E.forEach(function(j){var z=!!j.__singleHop;if(j.hasOwnProperty("__progressRatio")||(j.__progressRatio=z?T<0?1:0:(M+N)/C),!z&&M++,j.__progressRatio+=T,j.__progressRatio>=1||j.__progressRatio<0)if(!z)j.__progressRatio=j.__progressRatio%1,j.__progressRatio<0&&j.__progressRatio++;else{F=!0;return}var U=j.__progressRatio,V=A?A.get(U):{x:_.x+(k.x-_.x)*U||0,y:_.y+(k.y-_.y)*U||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(V.x,V.y,v,y,e.globalScale):(y.beginPath(),y.arc(V.x,V.y,B,0,2*Math.PI,!1),y.fill())}),F&&(v.__photons=v.__photons.filter(function(j){return!j.__singleHop||j.__progressRatio<=1&&j.__progressRatio>=0}))}}}),y.restore()}},emitParticle:function(e,i){return i&&(!i.__photons&&(i.__photons=[]),i.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:TH().force("link",bH()).force("charge",EH()).force("center",bU()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,i){i.ctx=e},update:function(e,i){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&OT(e.graphData.nodes,xr(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&OT(e.graphData.links,xr(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&&uW(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)*dW*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(i.dagMode)){var h=["lr","rl"].includes(i.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?NH(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 jB(r,e){var i=r instanceof Array?r:[r],n=new e;return n._destructor&&n._destructor(),{linkProp:function(o){return{default:n[o](),onChange:function(h,u){i.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 i.forEach(function(g){var x=c[g],y=x[o].apply(x,u);y!==x&&f.push(y)}),f.length?f[0]:this}}}}var fW=800,pW=4,gW=5,DB=jB("forceGraph",wg),mW=jB(["forceGraph","shadowGraph"],wg),yW=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(r){return Sd({},r,DB.linkProp(r))})).concat(aa(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(r){return Sd({},r,mW.linkProp(r))})))),bW=Object.assign.apply(Object,aa(["d3Force","d3ReheatSimulation","emitParticle"].map(function(r){return Sd({},r,DB.linkMethod(r))})));function r0(r){if(r.canvas){var e=r.canvas.width,i=r.canvas.height;e===300&&i===150&&(e=i=0);var n=window.devicePixelRatio;e/=n,i/=n,[r.canvas,r.shadowCanvas].forEach(function(o){o.style.width="".concat(r.width,"px"),o.style.height="".concat(r.height,"px"),o.width=r.width*n,o.height=r.height*n,!e&&!i&&o.getContext("2d").scale(n,n)});var a=Fa(r.canvas).k;r.zoom.translateBy(r.zoom.__baseElem,(r.width-e)/2/a,(r.height-i)/2/a),r.needsRedraw=!0}}function FB(r){var e=window.devicePixelRatio;r.setTransform(e,0,0,e,0,0)}function jT(r,e,i){r.save(),FB(r),r.clearRect(0,0,e,i),r.restore()}var xW=G1({props:Ec({width:{default:window.innerWidth,onChange:function(e,i){return r0(i)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,i){return r0(i)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,i){[e.nodes,e.links].every(function(a){return(a||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&i.colorTracker.reset(),[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach(n),i.forceGraph.graphData(e),i.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=i.colorTracker.lookup(h.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==h}).forEach(function(h){h.__indexColor=i.colorTracker.register({type:o,d:h})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,i){i.canvas&&e&&(i.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,i){i.shadowGraph.nodeCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,i){i.shadowGraph.linkCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,i){i.zoom.scaleExtent([e,i.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,i){i.zoom.scaleExtent([i.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,i){i.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}},yW),aliases:{stopAnimation:"pauseAnimation"},methods:Ec({graph2ScreenCoords:function(e,i,n){var a=Fa(e.canvas);return{x:i*a.k+a.x,y:n*a.k+a.y}},screen2GraphCoords:function(e,i,n){var a=Fa(e.canvas);return{x:(i-a.x)/a.k,y:(n-a.y)/a.k}},centerAt:function(e,i,n,a){if(!e.canvas)return null;if(i!==void 0||n!==void 0){var o=Object.assign({},i!==void 0?{x:i}:{},n!==void 0?{y:n}:{});return a?e.tweenGroup.add(new iT(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,i,n){if(!e.canvas)return null;if(i!==void 0)return n?e.tweenGroup.add(new iT({k:a()}).to({k:i},n).easing(Bl.Quadratic.Out).onUpdate(function(c){var h=c.k;return o(h)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):o(i),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 i=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,i),this.zoom(d,i)}return this},getGraphBbox:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=xr(e.nodeVal),a=function(h){return Math.sqrt(Math.max(0,n(h)||1))*e.nodeRelSize},o=e.graphData.nodes.filter(i).map(function(c){return{x:c.x,y:c.y,r:a(c)}});return o.length?{x:[j2(o,function(c){return c.x-c.r}),R2(o,function(c){return c.x+c.r})],y:[j2(o,function(c){return c.y-c.r}),R2(o,function(c){return c.y+c.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},bW),stateInit:function(){return{lastSetZoom:1,zoom:V8(),forceGraph:new wg,shadowGraph:new wg().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new V7,tweenGroup:new cB}},init:function(e,i){var n=this;e.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",e.appendChild(a),i.canvas=document.createElement("canvas"),i.backgroundColor&&(i.canvas.style.background=i.backgroundColor),a.appendChild(i.canvas),i.shadowCanvas=document.createElement("canvas");var o=i.canvas.getContext("2d"),c=i.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=i.colorTracker.lookup(y.data)),g};_e(i.canvas).call(sz().subject(function(){if(!i.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),i.canvas.classList.add("grabbable")}).on("drag",function(f){var g=f.subject,x=g.__initialDragPos,y=f,v=Fa(i.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&&gW>=Math.sqrt(J8(["x","y"].map(function(_){return Math.pow(f[_]-x[_],2)}))))&&(i.forceGraph.d3AlphaTarget(.3).resetCountdown(),i.isPointerDragging=!0,g.__dragged=!0,i.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,i.forceGraph.d3AlphaTarget()&&i.forceGraph.d3AlphaTarget(0).resetCountdown(),i.canvas.classList.remove("grabbable"),i.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,i.onNodeDragEnd(g,y))})),i.zoom(i.zoom.__baseElem=_e(i.canvas)),i.zoom.__baseElem.on("dblclick.zoom",null),i.zoom.filter(function(f){return!f.button&&i.enableZoomPanInteraction&&(f.type!=="wheel"||xr(i.enableZoomInteraction)(f))&&(f.type==="wheel"||xr(i.enablePanInteraction)(f))}).on("zoom",function(f){var g=f.transform;[o,c].forEach(function(x){FB(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),i.isPointerDragging=!0,i.onZoom&&i.onZoom(Ec(Ec({},g),n.centerAt())),i.needsRedraw=!0}).on("end",function(f){i.isPointerDragging=!1,i.onZoomEnd&&i.onZoomEnd(Ec(Ec({},f.transform),n.centerAt()))}),r0(i),i.forceGraph.onNeedsRedraw(function(){return i.needsRedraw=!0}).onFinishUpdate(function(){Fa(i.canvas).k===i.lastSetZoom&&i.graphData.nodes.length&&(i.zoom.scaleTo(i.zoom.__baseElem,i.lastSetZoom=pW/Math.cbrt(i.graphData.nodes.length)),i.needsRedraw=!0)}),i.tooltip=new yU(a),["pointermove","pointerdown"].forEach(function(f){return a.addEventListener(f,function(g){f==="pointerdown"&&(i.isPointerPressed=!0,i.pointerDownEvent=g),!i.isPointerDragging&&g.type==="pointermove"&&i.onBackgroundClick&&(g.pressure>0||i.isPointerPressed)&&(g.pointerType==="mouse"||g.movementX===void 0||[g.movementX,g.movementY].some(function(v){return Math.abs(v)>1}))&&(i.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(i.isPointerPressed){if(i.isPointerPressed=!1,i.isPointerDragging){i.isPointerDragging=!1;return}var g=[f,i.pointerDownEvent];requestAnimationFrame(function(){if(f.button===0)if(i.hoverObj){var x=i["on".concat(i.hoverObj.type,"Click")];x&&x.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundClick&&i.onBackgroundClick.apply(i,g);if(f.button===2)if(i.hoverObj){var y=i["on".concat(i.hoverObj.type,"RightClick")];y&&y.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundRightClick&&i.onBackgroundRightClick.apply(i,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(f){return!i.onBackgroundRightClick&&!i.onNodeRightClick&&!i.onLinkRightClick?!0:(f.preventDefault(),!1)}),i.forceGraph(o),i.shadowGraph(c);var d=r7(function(){jT(c,i.width,i.height),i.shadowGraph.linkWidth(function(g){return xr(i.linkWidth)(g)+i.linkHoverPrecision});var f=Fa(i.canvas);i.shadowGraph.globalScale(f.k).tickFrame()},fW);i.flushShadowCanvas=d.flush,(this._animationCycle=function f(){var g=!i.autoPauseRedraw||!!i.needsRedraw||i.forceGraph.isEngineRunning()||i.graphData.links.some(function(N){return N.__photons&&N.__photons.length});if(i.needsRedraw=!1,i.enablePointerInteraction){var x=i.isPointerDragging?null:u();if(x!==i.hoverObj){var y=i.hoverObj,v=y?y.type:null,C=x?x.type:null;if(v&&v!==C){var _=i["on".concat(v,"Hover")];_&&_(null,y.d)}if(C){var k=i["on".concat(C,"Hover")];k&&k(x.d,v===C?y.d:null)}i.tooltip.content(x&&xr(i["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),i.canvas.classList[(x&&i["on".concat(C,"Click")]||!x&&i.onBackgroundClick)&&xr(i.showPointerCursor)(x==null?void 0:x.d)?"add":"remove"]("clickable"),i.hoverObj=x}g&&d()}if(g){jT(o,i.width,i.height);var T=Fa(i.canvas).k;i.onRenderFramePre&&i.onRenderFramePre(o,T),i.forceGraph.globalScale(T).tickFrame(),i.onRenderFramePost&&i.onRenderFramePost(o,T)}i.tweenGroup.update(),i.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(e){}}),i0={exports:{}},n0,DT;function vW(){if(DT)return n0;DT=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return n0=r,n0}var a0,FT;function CW(){if(FT)return a0;FT=1;var r=vW();function e(){}function i(){}return i.resetWarningCache=e,a0=function(){function n(c,h,u,d,f,g){if(g!==r){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:i,resetWarningCache:e};return o.PropTypes=o,o},a0}var IT;function _W(){return IT||(IT=1,i0.exports=CW()()),i0.exports}var kW=_W();const lt=$d(kW),fm={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},IB={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},iC={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])},wW=Object.assign({},fm,IB,{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({},fm,IB,iC,{enableNavigationControls:lt.bool,controlType:lt.oneOf(["trackball","orbit","fly"]),rendererConfig:lt.object,extraRenderers:lt.arrayOf(lt.shape({render:lt.func.isRequired}))});Object.assign({},fm,iC,{nodeDesc:lt.oneOfType([lt.string,lt.func]),linkDesc:lt.oneOfType([lt.string,lt.func])});Object.assign({},fm,iC,{markerAttrs:lt.object,yOffset:lt.number,glScale:lt.number});const pm=b$(xW,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});pm.displayName="ForceGraph2D";pm.propTypes=wW;const SW="#1f2430",_p="#6741d9",TW="rgba(103,65,217,0.9)",s0={ok:{fill:"#b2f2bb",stroke:"#2f9e44"},stale:{fill:"#ffec99",stroke:"#f08c00"},gone:{fill:"#ffc9c9",stroke:"#e03131"}};function o0(r){return r.exists?r.needsUpdate?s0.stale:s0.ok:s0.gone}function mo(r){return typeof r=="string"?r:r.id}const EW=6;function kp(r,e,i,n,a,o){const c=Math.min(o,n/2,a/2);r.beginPath(),r.moveTo(e+c,i),r.arcTo(e+n,i,e+n,i+a,c),r.arcTo(e+n,i+a,e,i+a,c),r.arcTo(e,i+a,e,i,c),r.arcTo(e,i,e+n,i,c),r.closePath()}function wp(r,e,i,n,a,o){const c=a-r,h=o-e;if(c===0&&h===0)return{x:r,y:e};const u=c!==0?i/Math.abs(c):1/0,d=h!==0?n/Math.abs(h):1/0,f=Math.min(u,d);return{x:r+c*f,y:e+h*f}}function $T(r,e,i,n,a,o){r.save(),r.translate(e,i),r.rotate(n),r.fillStyle=o,r.beginPath(),r.moveTo(0,0),r.lineTo(-a,-a*.5),r.lineTo(-a,a*.5),r.closePath(),r.fill(),r.restore()}function NW(){const{data:r,isLoading:e,isError:i,error:n}=qI(),a=UI(),o=HI(),c=WI(),h=xM(),u=q.useRef(void 0),d=q.useRef(null),[f,g]=q.useState({w:0,h:0}),[x,y]=q.useState(!0),[v,C]=q.useState(null),[_,k]=q.useState(null),[T,N]=q.useState(!0),E=q.useRef(null),B=q.useRef(null),O=q.useRef(null),[A,M]=q.useState(null),[F,j]=q.useState(!1),z=q.useRef(null);z.current=A;const[U,V]=q.useState(null),I=q.useRef(null);I.current=U,q.useEffect(()=>{const ht=d.current;if(!ht)return;const ot=new ResizeObserver(()=>g({w:ht.clientWidth,h:ht.clientHeight}));return ot.observe(ht),g({w:ht.clientWidth,h:ht.clientHeight}),()=>ot.disconnect()},[]);const G=q.useMemo(()=>{const ht=(r==null?void 0:r.nodes)??[],ot=(r==null?void 0:r.connections)??[],Lt=new Set(ht.map(Ft=>Ft.name)),$t=new Map(ht.map(Ft=>[Ft.name,Ft.shareable])),Wt=new Map;for(const Ft of ot)Wt.set(`${Ft.from}${Ft.to}`,Ft.direction);const Rt=(Ft,Re)=>{const xe=Wt.get(`${Ft}${Re}`);return xe==="out"||xe==="both"},ne=[];for(const Ft of ot)!Lt.has(Ft.from)||!Lt.has(Ft.to)||Rt(Ft.from,Ft.to)&&ne.push({from:Ft.from,to:Ft.to,kind:"reads",active:$t.get(Ft.to)===!0});return ne},[r]),D=q.useMemo(()=>{const ht=((r==null?void 0:r.nodes)??[]).map(Rt=>({...Rt,id:Rt.name})),ot=Rt=>`${Rt.from}${Rt.to}${Rt.kind}`,Lt=new Map(G.map(Rt=>[ot(Rt),Rt])),$t=[],Wt=new Set;for(const Rt of G){const ne=[Rt.from,Rt.to].sort().join("")+""+Rt.kind;if(Wt.has(ne))continue;Wt.add(ne);const Ft=Lt.get(`${Rt.to}${Rt.from}${Rt.kind}`);$t.push({source:Rt.from,target:Rt.to,kind:Rt.kind,active:Rt.active||((Ft==null?void 0:Ft.active)??!1),twoWay:!!Ft,curv:(Rt.from<Rt.to?1:-1)*.13})}return{nodes:ht,links:$t}},[r,G]),W=q.useMemo(()=>{const ht=new Map;for(const ot of D.nodes)ht.set(ot.id,ot);return ht},[D]);q.useEffect(()=>{var ot,Lt,$t;const ht=u.current;ht&&((ot=ht.d3Force("charge"))==null||ot.strength(-900),(Lt=ht.d3Force("link"))==null||Lt.distance(230),($t=ht.d3ReheatSimulation)==null||$t.call(ht))},[D]);const K=q.useCallback(()=>{const ht=u.current;ht&&(ht.zoomToFit(500,140),window.setTimeout(()=>{try{ht.zoom()>1.4&&ht.zoom(1.4,350)}catch{}},540))},[]),tt=.15,nt=6,Y=q.useCallback(ht=>{const ot=u.current;if(!ot)return;let Lt=1;try{Lt=ot.zoom()}catch{}const $t=Math.max(tt,Math.min(nt,Lt*ht));ot.zoom($t,220)},[]),rt=q.useCallback(()=>Y(1.3),[Y]),ft=q.useCallback(()=>Y(1/1.3),[Y]),ct=q.useCallback((ht,ot)=>{const Lt=u.current;if(!Lt)return null;let $t=1;try{$t=Lt.zoom()}catch{}for(const Wt of D.nodes){if(Wt.x==null||Wt.y==null)continue;const Rt=Lt.graph2ScreenCoords(Wt.x,Wt.y),ne=(Wt.__hw??50)*$t+4,Ft=(Wt.__hh??16)*$t+4;if(Math.abs(Rt.x-ht)<=ne&&Math.abs(Rt.y-ot)<=Ft)return Wt}return null},[D]),xt=q.useCallback((ht,ot)=>{const Lt=u.current;if(!Lt)return null;let $t=null,Wt=14;for(const Rt of D.links){const ne=Rt.source,Ft=Rt.target;if(ne.x==null||ne.y==null||Ft.x==null||Ft.y==null)continue;const Re=Math.hypot(Ft.x-ne.x,Ft.y-ne.y)||1,xe=(ne.x+Ft.x)/2,He=(ne.y+Ft.y)/2,Me=Math.atan2(Ft.y-ne.y,Ft.x-ne.x)+Math.PI/2,kr=xe+Math.cos(Me)*Rt.curv*Re,Lr=He+Math.sin(Me)*Rt.curv*Re,Ge=wp(ne.x,ne.y,(ne.__hw??50)+2,(ne.__hh??16)+2,kr,Lr),Ze=wp(Ft.x,Ft.y,(Ft.__hw??50)+2,(Ft.__hh??16)+2,kr,Lr);for(let or=0;or<=14;or++){const me=or/14,sr=(1-me)*(1-me)*Ge.x+2*(1-me)*me*kr+me*me*Ze.x,$e=(1-me)*(1-me)*Ge.y+2*(1-me)*me*Lr+me*me*Ze.y,Er=Lt.graph2ScreenCoords(sr,$e),ve=Math.hypot(Er.x-ht,Er.y-ot);ve<Wt&&(Wt=ve,$t=Rt)}}return $t},[D]);function st(ht){var Lt;const ot=(Lt=d.current)==null?void 0:Lt.getBoundingClientRect();return{x:ht.clientX-((ot==null?void 0:ot.left)??0),y:ht.clientY-((ot==null?void 0:ot.top)??0)}}const kt=q.useCallback((ht,ot)=>{k(null),a.mutate({from:ht.id,to:ot.id},{onSuccess:()=>{ot.shareable||(k(`“${ht.name}” now reads “${ot.name}”, but “${ot.name}” isn't Readable yet — click it and turn on Readable so the wire goes live.`),C(ot))},onError:Lt=>k(Lt instanceof Error?Lt.message:"Failed to connect.")})},[a]);function it(ht){var Wt,Rt,ne,Ft;const{x:ot,y:Lt}=st(ht);if(O.current={x:ot,y:Lt},B.current={x:ot,y:Lt},!x)return;(Rt=(Wt=u.current)==null?void 0:Wt.resumeAnimation)==null||Rt.call(Wt);const $t=ct(ot,Lt);$t?(E.current=$t,(Ft=(ne=ht.target).setPointerCapture)==null||Ft.call(ne,ht.pointerId)):A&&M(null)}function H(ht){if(!x)return;const{x:ot,y:Lt}=st(ht);O.current={x:ot,y:Lt};const $t=E.current??z.current;if(!$t){I.current&&V(null);return}const Wt=ct(ot,Lt),Rt=Wt&&Wt.id!==$t.id?Wt.id:null;Rt!==I.current&&V(Rt)}function J(ht){const{x:ot,y:Lt}=st(ht),$t=B.current!=null&&Math.hypot(ot-B.current.x,Lt-B.current.y)>EW;B.current=null;const Wt=ct(ot,Lt);if(!$t&&!Wt){const Ft=xt(ot,Lt);if(Ft){qt(Ft),O.current=null;return}}if(!x){O.current=null;return}const Rt=E.current;E.current=null,V(null);const ne=z.current;if(Rt&&$t&&Wt&&Wt.id!==Rt.id){kt(Rt,Wt),M(null),O.current=null;return}if(Rt&&!$t&&Wt&&Wt.id===Rt.id){if(ne&&ne.id!==Rt.id){kt(ne,Rt),M(null),O.current=null;return}if(ne&&ne.id===Rt.id){M(null),O.current=null;return}M(Rt);return}O.current=null}function vt(ht){const ot=E.current??z.current,Lt=u.current;if(!ot||!O.current||!Lt||ot.x==null||ot.y==null)return;const $t=Lt.screen2GraphCoords(O.current.x,O.current.y);ht.save(),ht.strokeStyle=_p,ht.lineWidth=2,ht.setLineDash([6,5]),ht.globalAlpha=.95,ht.beginPath(),ht.moveTo(ot.x,ot.y),ht.lineTo($t.x,$t.y),ht.stroke(),ht.restore()}function At(ht){x||(C(ht),k(null))}function qt(ht){var Rt,ne;const ot=mo(ht.source),Lt=mo(ht.target),$t=((Rt=W.get(ot))==null?void 0:Rt.name)??ot,Wt=((ne=W.get(Lt))==null?void 0:ne.name)??Lt;window.confirm(`Remove the read “${$t}” → “${Wt}”?`)&&(o.mutate({from:ot,to:Lt}),ht.twoWay&&o.mutate({from:Lt,to:ot}))}function ie(ht){var $t,Wt;const ot=(($t=W.get(mo(ht.source)))==null?void 0:$t.name)??mo(ht.source),Lt=((Wt=W.get(mo(ht.target)))==null?void 0:Wt.name)??mo(ht.target);return ht.twoWay?`${ot} ⇄ ${Lt} — read each other`:`${ot} reads ${Lt}${ht.active?"":" — not Readable yet"}`}function Dt(ht){const ot=mo(ht.source),Lt=mo(ht.target);o.mutate({from:ot,to:Lt}),ht.twoWay&&o.mutate({from:Lt,to:ot})}q.useEffect(()=>{function ht(ot){const Lt=ot.target;Lt&&(Lt.tagName==="INPUT"||Lt.tagName==="TEXTAREA")||(ot.key==="Escape"?(z.current?M(null):T?N(!1):v&&C(null),E.current=null,O.current=null,V(null)):ot.key==="c"||ot.key==="C"?y($t=>!$t):ot.key==="?"?N(!0):ot.key==="+"||ot.key==="="?rt():ot.key==="-"||ot.key==="_"?ft():ot.key==="0"&&K())}return window.addEventListener("keydown",ht),()=>window.removeEventListener("keydown",ht)},[T,v,rt,ft,K]);const Ht=(r==null?void 0:r.nodes)??[],Fe=D.links.length>0,Zt=q.useMemo(()=>{if(!v)return[];const ht=[];for(const ot of G)ot.from!==v.id&&ot.to!==v.id||(ot.from===v.id?ht.push({text:`You read “${ot.to}” live${ot.active?"":" — not Readable yet"}`,onRemove:()=>o.mutate({from:ot.from,to:ot.to})}):ht.push({text:`“${ot.from}” reads you live`,onRemove:()=>o.mutate({from:ot.from,to:ot.to})}));return ht},[v,G,o]);return m.jsxs("div",{className:"lgraph",children:[m.jsxs("div",{className:"lgraph-toolbar",children:[m.jsxs("button",{type:"button",className:`lgraph-mode${x?" lgraph-mode--on":""}`,onClick:()=>y(ht=>!ht),title:"Toggle Connect mode (C)",children:[m.jsx("span",{className:"lgraph-mode-dot","aria-hidden":!0}),x?"Connect mode":"View mode"]}),m.jsx("button",{type:"button",className:"lgraph-help",onClick:()=>N(!0),children:"How it works"}),m.jsxs("button",{type:"button",className:`lgraph-help${F?" lgraph-help--on":""}`,onClick:()=>j(ht=>!ht),children:["Connections",D.links.length?` (${D.links.length})`:""]}),m.jsx("span",{className:"lgraph-hint",children:x?A?`Now click the project “${A.name}” should read.`:"Click a project then the one it should read — or drag. Click a wire (or use Connections) to remove it.":"View mode — click a wire to remove it, or click a project for details. Press C to connect."}),m.jsx("span",{className:"lgraph-legend",children:m.jsxs("span",{className:"lgraph-legend-group",children:[m.jsx("i",{className:"lgwire lgwire--read"})," reads (live reference — nothing copied)",m.jsx("i",{className:"lgwire lgwire--inert"})," not readable yet"]})})]}),_&&m.jsxs("div",{className:"lgraph-note",children:[m.jsx("span",{children:_}),m.jsx("button",{className:"lgraph-note-x",onClick:()=>k(null),"aria-label":"Dismiss",children:"✕"})]}),m.jsxs("div",{className:"lgraph-canvas",ref:d,onPointerDown:it,onPointerMove:H,onPointerUp:J,children:[e&&m.jsx("div",{className:"lgraph-status",children:"Loading network…"}),i&&m.jsx("div",{className:"lgraph-status lgraph-status--err",children:n instanceof Error?n.message:"Failed to load the network."}),!e&&!i&&Ht.length<2&&m.jsx("div",{className:"lgraph-status",children:"Add at least two projects to start wiring relationships between them."}),Ht.length>=2&&m.jsxs("div",{className:"lgraph-zoom",role:"group","aria-label":"Zoom controls",onPointerDown:ht=>ht.stopPropagation(),children:[m.jsx("button",{type:"button",className:"lgraph-zoom-btn",onClick:rt,"aria-label":"Zoom in",title:"Zoom in",children:"+"}),m.jsx("button",{type:"button",className:"lgraph-zoom-btn",onClick:ft,"aria-label":"Zoom out",title:"Zoom out",children:"−"}),m.jsx("button",{type:"button",className:"lgraph-zoom-btn lgraph-zoom-fit",onClick:K,"aria-label":"Fit graph to view",title:"Fit to view",children:"⤢"})]}),f.w>0&&Ht.length>=2&&m.jsx(pm,{ref:u,graphData:D,width:f.w,height:f.h,backgroundColor:"#0b0b12",nodeId:"id",nodeRelSize:6,enablePanInteraction:!x,enableZoomInteraction:!0,enableNodeDrag:!1,cooldownTicks:140,onEngineStop:K,onNodeClick:ht=>At(ht),onRenderFramePost:vt,linkColor:()=>"rgba(0,0,0,0)",linkDirectionalArrowLength:0,linkCurvature:ht=>ht.curv,linkDirectionalParticles:ht=>ht.active?3:0,linkDirectionalParticleSpeed:.006,linkDirectionalParticleWidth:3.4,linkDirectionalParticleColor:()=>"#c9b8ff",linkCanvasObjectMode:()=>"replace",linkCanvasObject:(ht,ot,Lt)=>{const $t=ht.source,Wt=ht.target;if($t.x==null||$t.y==null||Wt.x==null||Wt.y==null)return;const Rt=Math.hypot(Wt.x-$t.x,Wt.y-$t.y)||1,ne=($t.x+Wt.x)/2,Ft=($t.y+Wt.y)/2,Re=Math.atan2(Wt.y-$t.y,Wt.x-$t.x)+Math.PI/2,xe=ne+Math.cos(Re)*ht.curv*Rt,He=Ft+Math.sin(Re)*ht.curv*Rt,Me=wp($t.x,$t.y,($t.__hw??50)+2,($t.__hh??16)+2,xe,He),kr=wp(Wt.x,Wt.y,(Wt.__hw??50)+2,(Wt.__hh??16)+2,xe,He),Lr=Me.x,Ge=Me.y,Ze=kr.x,or=kr.y,me=Math.atan2(or-He,Ze-xe),sr=Math.atan2(Ge-He,Lr-xe);ot.save(),ot.lineCap="round",ht.active?(ot.strokeStyle=TW,ot.lineWidth=2.2,ot.setLineDash([])):(ot.strokeStyle="rgba(150,150,170,0.55)",ot.lineWidth=1.6,ot.setLineDash([5,5])),ot.beginPath(),ot.moveTo(Lr,Ge),ot.quadraticCurveTo(xe,He,Ze,or),ot.stroke(),ot.setLineDash([]);const $e=ht.active?_p:"rgba(150,150,170,0.75)";if($T(ot,Ze,or,me,7,$e),ht.twoWay&&$T(ot,Lr,Ge,sr,7,$e),Lt>.75){const Er=.25*Lr+.5*xe+.25*Ze,ve=.25*Ge+.5*He+.25*or,Or=8;ot.font=`600 ${Or}px -apple-system, BlinkMacSystemFont, sans-serif`,ot.textAlign="center",ot.textBaseline="middle";const Xr=ht.twoWay?"read each other":"reads",Nr=ot.measureText(Xr).width;ot.fillStyle="#0b0b12",kp(ot,Er-Nr/2-3,ve-Or/2-2,Nr+6,Or+4,3),ot.fill(),ot.fillStyle="#c9b8ff",ot.fillText(Xr,Er,ve)}ot.restore()},nodeCanvasObject:(ht,ot)=>{var or;const Lt=ht.x??0,$t=ht.y??0,Wt=o0(ht),Rt=((or=z.current)==null?void 0:or.id)===ht.id,ne=I.current===ht.id,Ft=13;ot.font=`600 ${Ft}px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`;const Re=ot.measureText(ht.name).width,xe=14,He=9,Me=Math.min(220,Math.max(72,Re+xe*2)),kr=Ft+He*2;ht.__hw=Me/2,ht.__hh=kr/2;const Lr=Lt-Me/2,Ge=$t-kr/2;ot.save(),ot.shadowColor="rgba(0,0,0,0.45)",ot.shadowBlur=10,ot.shadowOffsetY=3,kp(ot,Lr,Ge,Me,kr,9),ot.fillStyle=Wt.fill,ot.fill(),ot.restore(),kp(ot,Lr,Ge,Me,kr,9),Rt||ne?(ot.strokeStyle=_p,ot.lineWidth=2.4):(ot.strokeStyle=Wt.stroke,ot.lineWidth=1.6),ot.stroke(),ht.shareable&&(ot.beginPath(),ot.arc(Lr+Me-7,Ge+7,3.2,0,2*Math.PI),ot.fillStyle=_p,ot.fill(),ot.lineWidth=1.2,ot.strokeStyle="#0b0b12",ot.stroke()),ot.fillStyle=SW,ot.textAlign="center",ot.textBaseline="middle";const Ze=Re>Me-xe*2?AW(ot,ht.name,Me-xe*2):ht.name;ot.fillText(Ze,Lt,$t+.5)},nodePointerAreaPaint:(ht,ot,Lt)=>{const $t=(ht.__hw??50)*2,Wt=(ht.__hh??16)*2;kp(Lt,(ht.x??0)-$t/2,(ht.y??0)-Wt/2,$t,Wt,9),Lt.fillStyle=ot,Lt.fill()}}),T&&Ht.length>=2&&m.jsx(MW,{hasLinks:Fe,onClose:()=>N(!1)}),F&&m.jsxs("div",{className:"lgraph-conns",role:"dialog","aria-label":"All connections",children:[m.jsxs("div",{className:"lgraph-conns-head",children:[m.jsx("strong",{children:"All connections"}),m.jsx("button",{className:"lgraph-x",onClick:()=>j(!1),"aria-label":"Close",children:"✕"})]}),D.links.length===0?m.jsx("div",{className:"lgraph-conns-empty",children:"No connections yet. Switch on Connect mode and draw a wire."}):D.links.map((ht,ot)=>m.jsxs("div",{className:"lgraph-conn-row",children:[m.jsx("span",{className:`lgchip-wire lgchip-wire--${ht.kind}`,"aria-hidden":!0}),m.jsx("span",{className:"lgraph-conn-label",children:ie(ht)}),m.jsx("button",{className:"lgraph-conn-del",onClick:()=>Dt(ht),"aria-label":"Delete connection",title:"Delete",children:"✕"})]},ot))]})]}),v&&m.jsxs("div",{className:"lgraph-detail",children:[m.jsxs("div",{className:"lgraph-detail-head",children:[m.jsx("span",{className:"lgchip",style:{background:o0(v).fill,borderColor:o0(v).stroke}}),m.jsx("strong",{children:v.name}),m.jsx("button",{className:"lgraph-x",onClick:()=>C(null),"aria-label":"Close",children:"✕"})]}),m.jsx("div",{className:"lgraph-detail-path",children:v.path}),m.jsxs("div",{className:"lgraph-detail-row",children:[m.jsx("span",{children:v.exists?v.needsUpdate?`Behind: v${v.setupVersion} → v${v.latestVersion}`:`Up to date (v${v.setupVersion})`:"Folder is gone."}),v.exists&&v.needsUpdate&&m.jsx("button",{className:"lgraph-btn",disabled:h.isPending,onClick:()=>h.mutate(v.name),children:h.isPending?"Updating…":"Update"})]}),m.jsxs("label",{className:"lgraph-detail-row lgraph-share",children:[m.jsx("input",{type:"checkbox",checked:v.shareable,disabled:!v.exists||c.isPending,onChange:ht=>c.mutate({name:v.name,shareable:ht.target.checked},{onSuccess:()=>C({...v,shareable:ht.target.checked})})}),m.jsx("span",{children:"Readable — let any connected project read this one"})]}),m.jsxs("div",{className:"lgraph-rels",children:[m.jsx("div",{className:"lgraph-rels-title",children:"Connections"}),Zt.length===0&&m.jsx("div",{className:"lgraph-rels-empty",children:"No connections yet."}),Zt.map((ht,ot)=>m.jsxs("div",{className:"lgraph-rel",children:[m.jsx("span",{children:ht.text}),m.jsx("button",{className:"lgraph-rel-x",onClick:ht.onRemove,"aria-label":"Remove",children:"✕"})]},ot))]})]})]})}function AW(r,e,i){let n=e;for(;n.length>1&&r.measureText(n+"…").width>i;)n=n.slice(0,-1);return n.length<e.length?n+"…":e}function MW({hasLinks:r,onClose:e}){return m.jsxs("div",{className:"lgraph-guide",role:"dialog","aria-label":"How the network works",children:[m.jsx("button",{className:"lgraph-guide-x",onClick:e,"aria-label":"Close",children:"✕"}),m.jsx("h3",{className:"lgraph-guide-title",children:"How reading works"}),m.jsx("div",{className:"lgraph-guide-demo","aria-hidden":!0,children:m.jsxs("svg",{viewBox:"0 0 260 60",className:"lgraph-guide-svg",children:[m.jsx("line",{className:"lgraph-guide-flow",x1:"92",y1:"30",x2:"168",y2:"30",stroke:"#6741d9",strokeWidth:"2.4"}),m.jsx("polygon",{points:"168,26 176,30 168,34",fill:"#6741d9"}),m.jsx("rect",{x:"14",y:"16",width:"70",height:"28",rx:"8",fill:"#b2f2bb",stroke:"#2f9e44",strokeWidth:"1.6"}),m.jsx("text",{x:"49",y:"31",textAnchor:"middle",className:"lgraph-guide-cardlabel",children:"App"}),m.jsx("rect",{x:"176",y:"16",width:"70",height:"28",rx:"8",fill:"#b2f2bb",stroke:"#2f9e44",strokeWidth:"1.6"}),m.jsx("circle",{cx:"240",cy:"20",r:"3.2",fill:"#6741d9",stroke:"#0b0b12",strokeWidth:"1"}),m.jsx("text",{x:"211",y:"31",textAnchor:"middle",className:"lgraph-guide-cardlabel",children:"Libs"}),m.jsx("text",{x:"130",y:"23",textAnchor:"middle",className:"lgraph-guide-wirelabel",fill:"#b9a6ff",children:"reads"})]})}),m.jsx("ul",{className:"lgraph-guide-defs",children:m.jsxs("li",{children:[m.jsx("span",{className:"lgraph-key lgraph-key--read"})," ",m.jsx("strong",{children:"Reads (violet):"})," App reads Libs' ",m.jsx("em",{children:"canonical"})," memory ",m.jsx("em",{children:"live"})," during recall — a reference, never a copy. Each project stays the single source of truth for its own knowledge. The target must be Readable (violet pip), or the wire is stored but inert."]})}),m.jsx("p",{className:"lgraph-guide-foot",children:"Click a project then the one it should read (or drag). Click any project to see exactly who reads it. (Copy-based sync is parked on the roadmap — federation only reads, live.)"}),m.jsx("button",{className:"lgraph-guide-cta",onClick:e,children:r?"Got it":"Start wiring"})]})}function BW(){const{data:r,isLoading:e,isError:i,error:n}=zI(),a=xM(),o=PI(),[c,h]=q.useState(""),[u,d]=q.useState(null),[f,g]=q.useState(!1),[x,y]=q.useState("cards"),v=(r==null?void 0:r.vaults)??[],C=q.useMemo(()=>{const E=c.trim().toLowerCase();return E?v.filter(B=>B.name.toLowerCase().includes(E)||B.path.toLowerCase().includes(E)):v},[v,c]);async function _(E){d(null);try{await VI(E)}catch(B){d(B instanceof Error?B.message:String(B))}}function k(E){d(null),a.mutate(E,{onError:B=>d(B instanceof Error?B.message:String(B))})}function T(E){const B=E.exists?`Remove “${E.name}” from the launcher? (the folder stays on disk)`:`“${E.name}” folder is gone. Remove it from the launcher?`;window.confirm(B)&&(d(null),o.mutate(E.name,{onError:O=>d(O instanceof Error?O.message:String(O))}))}function N(E){y(E)}return m.jsxs("div",{className:"launcher",children:[m.jsxs("header",{className:"launcher-bar",children:[m.jsx("h1",{className:"launcher-title",children:"Launcher · all projects"}),m.jsxs("div",{className:"launcher-actions",children:[v.length>=2&&m.jsxs("div",{className:"launcher-viewtoggle",role:"group","aria-label":"View",children:[m.jsx("button",{type:"button",className:`launcher-btn${x==="cards"?" launcher-btn-active":""}`,onClick:()=>N("cards"),children:"Cards"}),m.jsx("button",{type:"button",className:`launcher-btn${x==="graph"?" launcher-btn-active":""}`,onClick:()=>N("graph"),children:"Network"})]}),x==="cards"&&m.jsx("input",{type:"search",className:"launcher-search",placeholder:"Search projects…",value:c,onChange:E=>h(E.target.value),"aria-label":"Search projects"}),m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-primary",onClick:()=>g(!0),children:"+ Add Project"})]})]}),u&&m.jsx("div",{className:"launcher-error",children:u}),e&&m.jsx("div",{className:"launcher-status",children:"Loading vaults…"}),i&&m.jsx("div",{className:"launcher-error",children:n instanceof Error?n.message:"Failed to load vaults."}),!e&&!i&&x==="graph"&&m.jsx(NW,{}),!e&&!i&&x==="cards"&&m.jsxs(m.Fragment,{children:[C.length===0&&m.jsx("div",{className:"launcher-empty",children:v.length===0?"No projects yet. Use “+ Add Project” to create one or set up an existing folder.":"No projects match your search."}),m.jsx("div",{className:"launcher-grid",children:C.map(E=>{const B=E.exists?E.needsUpdate?"launcher-card-dot--stale":"launcher-card-dot--ok":"launcher-card-dot--gone";return m.jsxs("div",{className:`launcher-card${E.exists?"":" launcher-card--gone"}`,children:[m.jsxs("div",{className:"launcher-card-head",children:[m.jsx("span",{className:`launcher-card-dot ${B}`,title:E.exists?E.needsUpdate?`Update available: v${E.setupVersion} → v${E.latestVersion}`:"Up to date":"Folder is gone","aria-hidden":!0}),m.jsx("span",{className:"launcher-card-name",children:E.name})]}),m.jsx("div",{className:"launcher-card-path",children:E.path}),!E.exists&&m.jsx("div",{className:"launcher-card-warn",children:"Folder no longer exists on disk."}),E.exists&&E.needsUpdate&&m.jsxs("div",{className:"launcher-card-warn launcher-card-warn--stale",children:["Skills out of date — v",E.setupVersion," → v",E.latestVersion,"."]}),m.jsxs("div",{className:"launcher-card-actions",children:[E.exists&&m.jsx("button",{type:"button",className:"launcher-card-open launcher-link-btn",onClick:()=>_(E.name),children:"Open →"}),E.exists&&E.needsUpdate&&m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-update",disabled:a.isPending,onClick:()=>k(E.name),children:a.isPending&&a.variables===E.name?"Updating…":"Update"}),m.jsx("button",{type:"button",className:"launcher-btn launcher-btn-remove",disabled:o.isPending,onClick:()=>T(E),children:"Remove"})]})]},E.name)})})]}),f&&m.jsx(JI,{onClose:()=>g(!1),onReady:async E=>{g(!1),await _(E)}})]})}function nC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vl=nC();function $B(r){Vl=r}var hd={exec:()=>null};function _r(r,e=""){let i=typeof r=="string"?r:r.source;const n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(tn.caret,"$1"),i=i.replace(a,c),n},getRegex:()=>new RegExp(i,e)};return n}var tn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},LW=/^(?:[ \t]*(?:\n|$))+/,OW=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,RW=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jW=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,aC=/(?:[*+-]|\d{1,9}[.)])/,zB=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,PB=_r(zB).replace(/bull/g,aC).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(),DW=_r(zB).replace(/bull/g,aC).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(),sC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,FW=/^[^\n]+/,oC=/(?!\s*\])(?:\\.|[^\[\]\\])+/,IW=_r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",oC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$W=_r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,aC).getRegex(),gm="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",lC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,zW=_r("^ {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",lC).replace("tag",gm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qB=_r(sC).replace("hr",Wd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gm).getRegex(),PW=_r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",qB).getRegex(),cC={blockquote:PW,code:OW,def:IW,fences:RW,heading:jW,hr:Wd,html:zW,lheading:PB,list:$W,newline:LW,paragraph:qB,table:hd,text:FW},zT=_r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gm).getRegex(),qW={...cC,lheading:DW,table:zT,paragraph:_r(sC).replace("hr",Wd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zT).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",gm).getRegex()},UW={...cC,html:_r(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",lC).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_r(sC).replace("hr",Wd).replace("heading",` *#{1,6} *[^
|
|
96
|
+
]`).replace("lheading",PB).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},HW=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,WW=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,UB=/^( {2,}|\\)\n(?!\s*$)/,GW=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mm=/[\p{P}\p{S}]/u,hC=/[\s\p{P}\p{S}]/u,HB=/[^\s\p{P}\p{S}]/u,YW=_r(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,hC).getRegex(),WB=/(?!~)[\p{P}\p{S}]/u,KW=/(?!~)[\s\p{P}\p{S}]/u,VW=/(?:[^\s\p{P}\p{S}]|~)/u,XW=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,GB=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ZW=_r(GB,"u").replace(/punct/g,mm).getRegex(),QW=_r(GB,"u").replace(/punct/g,WB).getRegex(),YB="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",JW=_r(YB,"gu").replace(/notPunctSpace/g,HB).replace(/punctSpace/g,hC).replace(/punct/g,mm).getRegex(),tG=_r(YB,"gu").replace(/notPunctSpace/g,VW).replace(/punctSpace/g,KW).replace(/punct/g,WB).getRegex(),eG=_r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,HB).replace(/punctSpace/g,hC).replace(/punct/g,mm).getRegex(),rG=_r(/\\(punct)/,"gu").replace(/punct/g,mm).getRegex(),iG=_r(/^<(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(),nG=_r(lC).replace("(?:-->|$)","-->").getRegex(),aG=_r("^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",nG).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Sg=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,sG=_r(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Sg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),KB=_r(/^!?\[(label)\]\[(ref)\]/).replace("label",Sg).replace("ref",oC).getRegex(),VB=_r(/^!?\[(ref)\](?:\[\])?/).replace("ref",oC).getRegex(),oG=_r("reflink|nolink(?!\\()","g").replace("reflink",KB).replace("nolink",VB).getRegex(),uC={_backpedal:hd,anyPunctuation:rG,autolink:iG,blockSkip:XW,br:UB,code:WW,del:hd,emStrongLDelim:ZW,emStrongRDelimAst:JW,emStrongRDelimUnd:eG,escape:HW,link:sG,nolink:VB,punctuation:YW,reflink:KB,reflinkSearch:oG,tag:aG,text:GW,url:hd},lG={...uC,link:_r(/^!?\[(label)\]\((.*?)\)/).replace("label",Sg).getRegex(),reflink:_r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sg).getRegex()},xv={...uC,emStrongRDelimAst:tG,emStrongLDelim:QW,url:_r(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},cG={...xv,br:_r(UB).replace("{2,}","*").getRegex(),text:_r(xv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sp={normal:cC,gfm:qW,pedantic:UW},Mu={normal:uC,gfm:xv,breaks:cG,pedantic:lG},hG={"&":"&","<":"<",">":">",'"':""","'":"'"},PT=r=>hG[r];function Oa(r,e){if(e){if(tn.escapeTest.test(r))return r.replace(tn.escapeReplace,PT)}else if(tn.escapeTestNoEncode.test(r))return r.replace(tn.escapeReplaceNoEncode,PT);return r}function qT(r){try{r=encodeURI(r).replace(tn.percentDecode,"%")}catch{return null}return r}function UT(r,e){var o;const i=r.replace(tn.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=i.split(tn.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(tn.slashPipe,"|");return n}function Bu(r,e,i){const n=r.length;if(n===0)return"";let a=0;for(;a<n&&r.charAt(n-a-1)===e;)a++;return r.slice(0,n-a)}function uG(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return i>0?-2:-1}function HT(r,e,i,n,a){const o=e.href,c=e.title||null,h=r[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function dG(r,e,i){const n=r.match(i.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
|
|
97
|
+
`).map(o=>{const c=o.match(i.other.beginningSpace);if(c===null)return o;const[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
98
|
+
`)}var Tg=class{constructor(r){pe(this,"options");pe(this,"rules");pe(this,"lexer");this.options=r||Vl}space(r){const e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){const e=this.rules.block.code.exec(r);if(e){const i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Bu(i,`
|
|
99
|
+
`)}}}fences(r){const e=this.rules.block.fences.exec(r);if(e){const i=e[0],n=dG(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){const e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){const n=Bu(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){const e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:Bu(e[0],`
|
|
100
|
+
`)}}blockquote(r){const e=this.rules.block.blockquote.exec(r);if(e){let i=Bu(e[0],`
|
|
101
|
+
`).split(`
|
|
102
|
+
`),n="",a="";const o=[];for(;i.length>0;){let c=!1;const h=[];let u;for(u=0;u<i.length;u++)if(this.rules.other.blockquoteStart.test(i[u]))h.push(i[u]),c=!0;else if(!c)h.push(i[u]);else break;i=i.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,i.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
|
+
`+i.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
|
+
`+i.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,i=v.substring(o.at(-1).raw.length).split(`
|
|
111
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim();const n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const o=this.rules.other.listItemRegex(i);let c=!1;for(;r;){let u=!1,d="",f="";if(!(e=o.exec(r))||this.rules.block.hr.test(r))break;d=e[0],r=r.substring(d.length);let g=e[2].split(`
|
|
112
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),x=r.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
|
+
`,r=r.substring(x.length+1),u=!0),!u){const k=this.rules.other.nextBulletRegex(v),T=this.rules.other.hrRegex(v),N=this.rules.other.fencesBeginRegex(v),E=this.rules.other.headingBeginRegex(v),B=this.rules.other.htmlBeginRegex(v);for(;r;){const O=r.split(`
|
|
115
|
+
`,1)[0];let A;if(x=O,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),A=x):A=x.replace(this.rules.other.tabCharGlobal," "),N.test(x)||E.test(x)||B.test(x)||k.test(x)||T.test(x))break;if(A.search(this.rules.other.nonSpaceChar)>=v||!x.trim())f+=`
|
|
116
|
+
`+A.slice(v);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(g)||E.test(g)||T.test(g))break;f+=`
|
|
117
|
+
`+x}!y&&!x.trim()&&(y=!0),d+=O+`
|
|
118
|
+
`,r=r.substring(O.length+1),g=A.slice(v)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let C=null,_;this.options.gfm&&(C=this.rules.other.listIsTask.exec(f),C&&(_=C[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!C,checked:_,loose:!1,text:f,tokens:[]}),a.raw+=d}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const d=a.items[u].tokens.filter(g=>g.type==="space"),f=d.length>0&&d.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=f}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(r){const e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){const e=this.rules.block.def.exec(r);if(e){const i=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:i,raw:e[0],href:n,title:a}}}table(r){var c;const e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const i=UT(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(i.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<i.length;h++)o.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:o.align[h]});for(const h of a)o.rows.push(UT(h,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(r){const e=this.rules.block.lheading.exec(r);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(r){const e=this.rules.block.paragraph.exec(r);if(e){const i=e[1].charAt(e[1].length-1)===`
|
|
120
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){const e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){const e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){const e=this.rules.inline.tag.exec(r);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(r){const e=this.rules.inline.link.exec(r);if(e){const i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const o=Bu(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{const o=uG(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(i)?n=n.slice(1):n=n.slice(1,-1)),HT(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(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){const n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){const o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return HT(i,a,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){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*r.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=r.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(r){const e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){const e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){const e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){const e=this.rules.inline.autolink.exec(r);if(e){let i,n;return e[2]==="@"?(i=e[1],n="mailto:"+i):(i=e[1],n=i),{type:"link",raw:e[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(r){var i;let e;if(e=this.rules.inline.url.exec(r)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let o;do o=e[0],e[0]=((i=this.rules.inline._backpedal.exec(e[0]))==null?void 0:i[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(r){const e=this.rules.inline.text.exec(r);if(e){const i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},As=class vv{constructor(e){pe(this,"tokens");pe(this,"options");pe(this,"state");pe(this,"tokenizer");pe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Vl,this.options.tokenizer=this.options.tokenizer||new Tg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:tn,block:Sp.normal,inline:Mu.normal};this.options.pedantic?(i.block=Sp.pedantic,i.inline=Mu.pedantic):this.options.gfm&&(i.block=Sp.gfm,this.options.breaks?i.inline=Mu.breaks:i.inline=Mu.gfm),this.tokenizer.rules=i}static get rules(){return{block:Sp,inline:Mu}}static lex(e,i){return new vv(i).lex(e)}static lexInline(e,i){return new vv(i).inlineTokens(e)}lex(e){e=e.replace(tn.carriageReturn,`
|
|
121
|
+
`),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const n=this.inlineQueue[i];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(tn.tabCharGlobal," ").replace(tn.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,i))?(e=e.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);const d=i.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
|
|
122
|
+
`:i.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);const d=i.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):i.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);const d=i.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),i.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),i.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=i.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):i.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=i.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):i.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,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){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,i))?(e=e.substring(f.raw.length),i.push(f),!0):!1))continue;if(f=this.tokenizer.escape(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.tag(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.link(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(f.raw.length);const x=i.at(-1);f.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=f.raw,x.text+=f.text):i.push(f);continue}if(f=this.tokenizer.emStrong(e,n,c)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.codespan(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.br(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.del(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.autolink(e)){e=e.substring(f.raw.length),i.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(e))){e=e.substring(f.raw.length),i.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=i.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=f.raw,x.text+=f.text):i.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 i}},Eg=class{constructor(r){pe(this,"options");pe(this,"parser");this.options=r||Vl}space(r){return""}code({text:r,lang:e,escaped:i}){var o;const n=(o=(e||"").match(tn.notSpaceStart))==null?void 0:o[0],a=r.replace(tn.endingNewline,"")+`
|
|
131
|
+
`;return n?'<pre><code class="language-'+Oa(n)+'">'+(i?a:Oa(a,!0))+`</code></pre>
|
|
132
|
+
`:"<pre><code>"+(i?a:Oa(a,!0))+`</code></pre>
|
|
133
|
+
`}blockquote({tokens:r}){return`<blockquote>
|
|
134
|
+
${this.parser.parse(r)}</blockquote>
|
|
135
|
+
`}html({text:r}){return r}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
136
|
+
`}hr(r){return`<hr>
|
|
137
|
+
`}list(r){const e=r.ordered,i=r.start;let n="";for(let c=0;c<r.items.length;c++){const h=r.items[c];n+=this.listitem(h)}const a=e?"ol":"ul",o=e&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
|
138
|
+
`+n+"</"+a+`>
|
|
139
|
+
`}listitem(r){var i;let e="";if(r.task){const n=this.checkbox({checked:!!r.checked});r.loose?((i=r.tokens[0])==null?void 0:i.type)==="paragraph"?(r.tokens[0].text=n+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=n+" "+Oa(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
|
|
140
|
+
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
141
|
+
`}table(r){let e="",i="";for(let a=0;a<r.header.length;a++)i+=this.tablecell(r.header[a]);e+=this.tablerow({text:i});let n="";for(let a=0;a<r.rows.length;a++){const o=r.rows[a];i="";for(let c=0;c<o.length;c++)i+=this.tablecell(o[c]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
142
|
+
<thead>
|
|
143
|
+
`+e+`</thead>
|
|
144
|
+
`+n+`</table>
|
|
145
|
+
`}tablerow({text:r}){return`<tr>
|
|
146
|
+
${r}</tr>
|
|
147
|
+
`}tablecell(r){const e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
|
|
148
|
+
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Oa(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){const n=this.parser.parseInline(i),a=qT(r);if(a===null)return n;r=a;let o='<a href="'+r+'"';return e&&(o+=' title="'+Oa(e)+'"'),o+=">"+n+"</a>",o}image({href:r,title:e,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));const a=qT(r);if(a===null)return Oa(i);r=a;let o=`<img src="${r}" alt="${i}"`;return e&&(o+=` title="${Oa(e)}"`),o+=">",o}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:Oa(r.text)}},dC=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Ms=class Cv{constructor(e){pe(this,"options");pe(this,"renderer");pe(this,"textRenderer");this.options=e||Vl,this.options.renderer=this.options.renderer||new Eg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new dC}static parse(e,i){return new Cv(i).parse(e)}static parseInline(e,i){return new Cv(i).parseInline(e)}parse(e,i=!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);i?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,i=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+=i.text(u);break}case"html":{n+=i.html(u);break}case"link":{n+=i.link(u);break}case"image":{n+=i.image(u);break}case"strong":{n+=i.strong(u);break}case"em":{n+=i.em(u);break}case"codespan":{n+=i.codespan(u);break}case"br":{n+=i.br(u);break}case"del":{n+=i.del(u);break}case"text":{n+=i.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}},Mx,Zp=(Mx=class{constructor(r){pe(this,"options");pe(this,"block");this.options=r||Vl}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?As.lex:As.lexInline}provideParser(){return this.block?Ms.parse:Ms.parseInline}},pe(Mx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Mx),fG=class{constructor(...r){pe(this,"defaults",nC());pe(this,"options",this.setOptions);pe(this,"parse",this.parseMarkdown(!0));pe(this,"parseInline",this.parseMarkdown(!1));pe(this,"Parser",Ms);pe(this,"Renderer",Eg);pe(this,"TextRenderer",dC);pe(this,"Lexer",As);pe(this,"Tokenizer",Tg);pe(this,"Hooks",Zp);this.use(...r)}walkTokens(r,e){var n,a;let i=[];for(const o of r)switch(i=i.concat(e.call(this,o)),o.type){case"table":{const c=o;for(const h of c.header)i=i.concat(this.walkTokens(h.tokens,e));for(const h of c.rows)for(const u of h)i=i.concat(this.walkTokens(u.tokens,e));break}case"list":{const c=o;i=i.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);i=i.concat(this.walkTokens(u,e))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,e)))}}return i}use(...r){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.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),i.renderer){const a=this.defaults.renderer||new Eg(this.defaults);for(const o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const c=o,h=i.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(i.tokenizer){const a=this.defaults.tokenizer||new Tg(this.defaults);for(const o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const c=o,h=i.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(i.hooks){const a=this.defaults.hooks||new Zp;for(const o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const c=o,h=i.hooks[c],u=a[c];Zp.passThroughHooks.has(o)?a[c]=d=>{if(this.defaults.async)return Promise.resolve(h.call(a,d)).then(g=>u.call(a,g));const f=h.call(a,d);return u.call(a,f)}:a[c]=(...d)=>{let f=h.apply(a,d);return f===!1&&(f=u.apply(a,d)),f}}n.hooks=a}if(i.walkTokens){const a=this.defaults.walkTokens,o=i.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(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return As.lex(r,e??this.defaults)}parser(r,e){return Ms.parse(r,e??this.defaults)}parseMarkdown(r){return(i,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 i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=r);const h=o.hooks?o.hooks.provideLexer():r?As.lex:As.lexInline,u=o.hooks?o.hooks.provideParser():r?Ms.parse:Ms.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(i):i).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&&(i=o.hooks.preprocess(i));let d=h(i,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(r,e){return i=>{if(i.message+=`
|
|
150
|
+
Please report this to https://github.com/markedjs/marked.`,r){const n="<p>An error occurred:</p><pre>"+Oa(i.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(i);throw i}}},Fl=new fG;function Oe(r,e){return Fl.parse(r,e)}Oe.options=Oe.setOptions=function(r){return Fl.setOptions(r),Oe.defaults=Fl.defaults,$B(Oe.defaults),Oe};Oe.getDefaults=nC;Oe.defaults=Vl;Oe.use=function(...r){return Fl.use(...r),Oe.defaults=Fl.defaults,$B(Oe.defaults),Oe};Oe.walkTokens=function(r,e){return Fl.walkTokens(r,e)};Oe.parseInline=Fl.parseInline;Oe.Parser=Ms;Oe.parser=Ms.parse;Oe.Renderer=Eg;Oe.TextRenderer=dC;Oe.Lexer=As;Oe.lexer=As.lex;Oe.Tokenizer=Tg;Oe.Hooks=Zp;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.use;Oe.walkTokens;Oe.parseInline;Ms.parse;As.lex;/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function WT(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function pG(r){if(Array.isArray(r))return r}function gG(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function mG(){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 yG(r,e){return pG(r)||gG(r,e)||bG(r,e)||mG()}function bG(r,e){if(r){if(typeof r=="string")return WT(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?WT(r,e):void 0}}const XB=Object.entries,GT=Object.setPrototypeOf,xG=Object.isFrozen,vG=Object.getPrototypeOf,CG=Object.getOwnPropertyDescriptor;let nn=Object.freeze,sa=Object.seal,jc=Object.create,ZB=typeof Reflect<"u"&&Reflect,_v=ZB.apply,kv=ZB.construct;nn||(nn=function(e){return e});sa||(sa=function(e){return e});_v||(_v=function(e,i){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(i,a)});kv||(kv=function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return new e(...n)});const Nc=gi(Array.prototype.forEach),_G=gi(Array.prototype.lastIndexOf),YT=gi(Array.prototype.pop),Ac=gi(Array.prototype.push),kG=gi(Array.prototype.splice),Xi=Array.isArray,Qu=gi(String.prototype.toLowerCase),l0=gi(String.prototype.toString),KT=gi(String.prototype.match),Mc=gi(String.prototype.replace),VT=gi(String.prototype.indexOf),wG=gi(String.prototype.trim),SG=gi(Number.prototype.toString),TG=gi(Boolean.prototype.toString),XT=typeof BigInt>"u"?null:gi(BigInt.prototype.toString),ZT=typeof Symbol>"u"?null:gi(Symbol.prototype.toString),ri=gi(Object.prototype.hasOwnProperty),Lu=gi(Object.prototype.toString),Oi=gi(RegExp.prototype.test),Ou=EG(TypeError);function gi(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return _v(r,e,n)}}function EG(r){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return kv(r,i)}}function Ue(r,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qu;if(GT&>(r,null),!Xi(e))return r;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const o=i(a);o!==a&&(xG(e)||(e[n]=o),a=o)}r[a]=!0}return r}function NG(r){for(let e=0;e<r.length;e++)ri(r,e)||(r[e]=null);return r}function Pi(r){const e=jc(null);for(const n of XB(r)){var i=yG(n,2);const a=i[0],o=i[1];ri(r,a)&&(Xi(o)?e[a]=NG(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=Pi(o):e[a]=o)}return e}function AG(r){switch(typeof r){case"string":return r;case"number":return SG(r);case"boolean":return TG(r);case"bigint":return XT?XT(r):"0";case"symbol":return ZT?ZT(r):"Symbol()";case"undefined":return Lu(r);case"function":case"object":{if(r===null)return Lu(r);const e=r,i=Ra(e,"toString");if(typeof i=="function"){const n=i(e);return typeof n=="string"?n:Lu(n)}return Lu(r)}default:return Lu(r)}}function Ra(r,e){for(;r!==null;){const n=CG(r,e);if(n){if(n.get)return gi(n.get);if(typeof n.value=="function")return gi(n.value)}r=vG(r)}function i(){return null}return i}function MG(r){try{return Oi(r,""),!0}catch{return!1}}const QT=nn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),c0=nn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),h0=nn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),BG=nn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),u0=nn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),LG=nn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),JT=nn(["#text"]),tE=nn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),d0=nn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),eE=nn(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tp=nn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),OG=sa(/{{[\w\W]*|^[\w\W]*}}/g),RG=sa(/<%[\w\W]*|^[\w\W]*%>/g),jG=sa(/\${[\w\W]*/g),DG=sa(/^data-[\-\w.\u00B7-\uFFFF]+$/),FG=sa(/^aria-[\-\w]+$/),rE=sa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IG=sa(/^(?:\w+script|data):/i),$G=sa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zG=sa(/^html$/i),PG=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},qG=function(){return typeof window>"u"?null:window},UG=function(e,i){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";i&&i.hasAttribute(a)&&(n=i.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}},iE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function QB(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qG();const e=te=>QB(te);if(e.version="3.4.7",e.removed=[],!r||!r.document||r.document.nodeType!==La.document||!r.Element)return e.isSupported=!1,e;let i=r.document;const n=i,a=n.currentScript;r.DocumentFragment;const o=r.HTMLTemplateElement,c=r.Node,h=r.Element,u=r.NodeFilter,d=r.NamedNodeMap;d===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const f=r.DOMParser,g=r.trustedTypes,x=h.prototype,y=Ra(x,"cloneNode"),v=Ra(x,"remove"),C=Ra(x,"nextSibling"),_=Ra(x,"childNodes"),k=Ra(x,"parentNode"),T=Ra(x,"shadowRoot"),N=Ra(x,"attributes"),E=c&&c.prototype?Ra(c.prototype,"nodeType"):null,B=c&&c.prototype?Ra(c.prototype,"nodeName"):null;if(typeof o=="function"){const te=i.createElement("template");te.content&&te.content.ownerDocument&&(i=te.content.ownerDocument)}let O,A="";const M=i,F=M.implementation,j=M.createNodeIterator,z=M.createDocumentFragment,U=M.getElementsByTagName,V=n.importNode;let I=iE();e.isSupported=typeof XB=="function"&&typeof k=="function"&&F&&F.createHTMLDocument!==void 0;const G=OG,D=RG,W=jG,K=DG,tt=FG,nt=IG,Y=$G,rt=PG;let ft=rE,ct=null;const xt=Ue({},[...QT,...c0,...h0,...u0,...JT]);let st=null;const kt=Ue({},[...tE,...d0,...eE,...Tp]);let it=Object.seal(jc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,J=null;const vt=Object.seal(jc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let At=!0,qt=!0,ie=!1,Dt=!0,Ht=!1,Fe=!0,Zt=!1,ht=!1,ot=!1,Lt=!1,$t=!1,Wt=!1,Rt=!0,ne=!1;const Ft="user-content-";let Re=!0,xe=!1,He={},Me=null;const kr=Ue({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Lr=null;const Ge=Ue({},["audio","video","img","source","image","track"]);let Ze=null;const or=Ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",sr="http://www.w3.org/2000/svg",$e="http://www.w3.org/1999/xhtml";let Er=$e,ve=!1,Or=null;const Xr=Ue({},[me,sr,$e],l0);let Nr=Ue({},["mi","mo","mn","ms","mtext"]),Q=Ue({},["annotation-xml"]);const Tt=Ue({},["title","style","font","a","script"]);let Pt=null;const Ce=["application/xhtml+xml","text/html"],gr="text/html";let we=null,Qt=null;const Kt=i.createElement("form"),ye=function(X){return X instanceof RegExp||X instanceof Function},mr=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Qt&&Qt===X)return;(!X||typeof X!="object")&&(X={}),X=Pi(X),Pt=Ce.indexOf(X.PARSER_MEDIA_TYPE)===-1?gr:X.PARSER_MEDIA_TYPE,we=Pt==="application/xhtml+xml"?l0:Qu,ct=ri(X,"ALLOWED_TAGS")&&Xi(X.ALLOWED_TAGS)?Ue({},X.ALLOWED_TAGS,we):xt,st=ri(X,"ALLOWED_ATTR")&&Xi(X.ALLOWED_ATTR)?Ue({},X.ALLOWED_ATTR,we):kt,Or=ri(X,"ALLOWED_NAMESPACES")&&Xi(X.ALLOWED_NAMESPACES)?Ue({},X.ALLOWED_NAMESPACES,l0):Xr,Ze=ri(X,"ADD_URI_SAFE_ATTR")&&Xi(X.ADD_URI_SAFE_ATTR)?Ue(Pi(or),X.ADD_URI_SAFE_ATTR,we):or,Lr=ri(X,"ADD_DATA_URI_TAGS")&&Xi(X.ADD_DATA_URI_TAGS)?Ue(Pi(Ge),X.ADD_DATA_URI_TAGS,we):Ge,Me=ri(X,"FORBID_CONTENTS")&&Xi(X.FORBID_CONTENTS)?Ue({},X.FORBID_CONTENTS,we):kr,H=ri(X,"FORBID_TAGS")&&Xi(X.FORBID_TAGS)?Ue({},X.FORBID_TAGS,we):Pi({}),J=ri(X,"FORBID_ATTR")&&Xi(X.FORBID_ATTR)?Ue({},X.FORBID_ATTR,we):Pi({}),He=ri(X,"USE_PROFILES")?X.USE_PROFILES&&typeof X.USE_PROFILES=="object"?Pi(X.USE_PROFILES):X.USE_PROFILES:!1,At=X.ALLOW_ARIA_ATTR!==!1,qt=X.ALLOW_DATA_ATTR!==!1,ie=X.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ht=X.SAFE_FOR_TEMPLATES||!1,Fe=X.SAFE_FOR_XML!==!1,Zt=X.WHOLE_DOCUMENT||!1,Lt=X.RETURN_DOM||!1,$t=X.RETURN_DOM_FRAGMENT||!1,Wt=X.RETURN_TRUSTED_TYPE||!1,ot=X.FORCE_BODY||!1,Rt=X.SANITIZE_DOM!==!1,ne=X.SANITIZE_NAMED_PROPS||!1,Re=X.KEEP_CONTENT!==!1,xe=X.IN_PLACE||!1,ft=MG(X.ALLOWED_URI_REGEXP)?X.ALLOWED_URI_REGEXP:rE,Er=typeof X.NAMESPACE=="string"?X.NAMESPACE:$e,Nr=ri(X,"MATHML_TEXT_INTEGRATION_POINTS")&&X.MATHML_TEXT_INTEGRATION_POINTS&&typeof X.MATHML_TEXT_INTEGRATION_POINTS=="object"?Pi(X.MATHML_TEXT_INTEGRATION_POINTS):Ue({},["mi","mo","mn","ms","mtext"]),Q=ri(X,"HTML_INTEGRATION_POINTS")&&X.HTML_INTEGRATION_POINTS&&typeof X.HTML_INTEGRATION_POINTS=="object"?Pi(X.HTML_INTEGRATION_POINTS):Ue({},["annotation-xml"]);const St=ri(X,"CUSTOM_ELEMENT_HANDLING")&&X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING=="object"?Pi(X.CUSTOM_ELEMENT_HANDLING):jc(null);if(it=jc(null),ri(St,"tagNameCheck")&&ye(St.tagNameCheck)&&(it.tagNameCheck=St.tagNameCheck),ri(St,"attributeNameCheck")&&ye(St.attributeNameCheck)&&(it.attributeNameCheck=St.attributeNameCheck),ri(St,"allowCustomizedBuiltInElements")&&typeof St.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=St.allowCustomizedBuiltInElements),Ht&&(qt=!1),$t&&(Lt=!0),He&&(ct=Ue({},JT),st=jc(null),He.html===!0&&(Ue(ct,QT),Ue(st,tE)),He.svg===!0&&(Ue(ct,c0),Ue(st,d0),Ue(st,Tp)),He.svgFilters===!0&&(Ue(ct,h0),Ue(st,d0),Ue(st,Tp)),He.mathMl===!0&&(Ue(ct,u0),Ue(st,eE),Ue(st,Tp))),vt.tagCheck=null,vt.attributeCheck=null,ri(X,"ADD_TAGS")&&(typeof X.ADD_TAGS=="function"?vt.tagCheck=X.ADD_TAGS:Xi(X.ADD_TAGS)&&(ct===xt&&(ct=Pi(ct)),Ue(ct,X.ADD_TAGS,we))),ri(X,"ADD_ATTR")&&(typeof X.ADD_ATTR=="function"?vt.attributeCheck=X.ADD_ATTR:Xi(X.ADD_ATTR)&&(st===kt&&(st=Pi(st)),Ue(st,X.ADD_ATTR,we))),ri(X,"ADD_URI_SAFE_ATTR")&&Xi(X.ADD_URI_SAFE_ATTR)&&Ue(Ze,X.ADD_URI_SAFE_ATTR,we),ri(X,"FORBID_CONTENTS")&&Xi(X.FORBID_CONTENTS)&&(Me===kr&&(Me=Pi(Me)),Ue(Me,X.FORBID_CONTENTS,we)),ri(X,"ADD_FORBID_CONTENTS")&&Xi(X.ADD_FORBID_CONTENTS)&&(Me===kr&&(Me=Pi(Me)),Ue(Me,X.ADD_FORBID_CONTENTS,we)),Re&&(ct["#text"]=!0),Zt&&Ue(ct,["html","head","body"]),ct.table&&(Ue(ct,["tbody"]),delete H.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ou('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ou('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=X.TRUSTED_TYPES_POLICY,A=O.createHTML("")}else O===void 0&&(O=UG(g,a)),O!==null&&typeof A=="string"&&(A=O.createHTML(""));(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&ct===xt&&(ct=Pi(ct)),I.uponSanitizeAttribute.length>0&&st===kt&&(st=Pi(st)),nn&&nn(X),Qt=X},wr=Ue({},[...c0,...h0,...BG]),ln=Ue({},[...u0,...LG]),Yi=function(X){let St=k(X);(!St||!St.tagName)&&(St={namespaceURI:Er,tagName:"template"});const pt=Qu(X.tagName),It=Qu(St.tagName);return Or[X.namespaceURI]?X.namespaceURI===sr?St.namespaceURI===$e?pt==="svg":St.namespaceURI===me?pt==="svg"&&(It==="annotation-xml"||Nr[It]):!!wr[pt]:X.namespaceURI===me?St.namespaceURI===$e?pt==="math":St.namespaceURI===sr?pt==="math"&&Q[It]:!!ln[pt]:X.namespaceURI===$e?St.namespaceURI===sr&&!Q[It]||St.namespaceURI===me&&!Nr[It]?!1:!ln[pt]&&(Tt[pt]||!wr[pt]):!!(Pt==="application/xhtml+xml"&&Or[X.namespaceURI]):!1},li=function(X){Ac(e.removed,{element:X});try{k(X).removeChild(X)}catch{v(X)}},ci=function(X,St){try{Ac(e.removed,{attribute:St.getAttributeNode(X),from:St})}catch{Ac(e.removed,{attribute:null,from:St})}if(St.removeAttribute(X),X==="is")if(Lt||$t)try{li(St)}catch{}else try{St.setAttribute(X,"")}catch{}},Rr=function(X){let St=null,pt=null;if(ot)X="<remove></remove>"+X;else{const ue=KT(X,/^[\r\n\t ]+/);pt=ue&&ue[0]}Pt==="application/xhtml+xml"&&Er===$e&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const It=O?O.createHTML(X):X;if(Er===$e)try{St=new f().parseFromString(It,Pt)}catch{}if(!St||!St.documentElement){St=F.createDocument(Er,"template",null);try{St.documentElement.innerHTML=ve?A:It}catch{}}const Gt=St.body||St.documentElement;return X&&pt&&Gt.insertBefore(i.createTextNode(pt),Gt.childNodes[0]||null),Er===$e?U.call(St,Zt?"html":"body")[0]:Zt?St.documentElement:Gt},Zr=function(X){return j.call(X.ownerDocument||X,X,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},kn=function(X){X.normalize();const St=j.call(X.ownerDocument||X,X,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let pt=St.nextNode();for(;pt;){let It=pt.data;Nc([G,D,W],Gt=>{It=Mc(It,Gt," ")}),pt.data=It,pt=St.nextNode()}},In=function(X){const St=B?B(X):null;return typeof St!="string"||we(St)!=="form"?!1:typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||X.attributes!==N(X)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function"||X.nodeType!==E(X)||X.childNodes!==_(X)},wn=function(X){if(!E||typeof X!="object"||X===null)return!1;try{return E(X)===La.documentFragment}catch{return!1}},Sn=function(X){if(!E||typeof X!="object"||X===null)return!1;try{return typeof E(X)=="number"}catch{return!1}};function Ei(te,X,St){Nc(te,pt=>{pt.call(e,X,St,Qt)})}const $n=function(X){let St=null;if(Ei(I.beforeSanitizeElements,X,null),In(X))return li(X),!0;const pt=we(X.nodeName);if(Ei(I.uponSanitizeElement,X,{tagName:pt,allowedTags:ct}),Fe&&X.hasChildNodes()&&!Sn(X.firstElementChild)&&Oi(/<[/\w!]/g,X.innerHTML)&&Oi(/<[/\w!]/g,X.textContent)||Fe&&X.namespaceURI===$e&&pt==="style"&&Sn(X.firstElementChild)||X.nodeType===La.progressingInstruction||Fe&&X.nodeType===La.comment&&Oi(/<[/\w]/g,X.data))return li(X),!0;if(H[pt]||!(vt.tagCheck instanceof Function&&vt.tagCheck(pt))&&!ct[pt]){if(!H[pt]&&Ki(pt)&&(it.tagNameCheck instanceof RegExp&&Oi(it.tagNameCheck,pt)||it.tagNameCheck instanceof Function&&it.tagNameCheck(pt)))return!1;if(Re&&!Me[pt]){const Gt=k(X),ue=_(X);if(ue&&Gt){const Ke=ue.length;for(let br=Ke-1;br>=0;--br){const rr=y(ue[br],!0);Gt.insertBefore(rr,C(X))}}}return li(X),!0}return(E?E(X):X.nodeType)===La.element&&!Yi(X)||(pt==="noscript"||pt==="noembed"||pt==="noframes")&&Oi(/<\/no(script|embed|frames)/i,X.innerHTML)?(li(X),!0):(Ht&&X.nodeType===La.text&&(St=X.textContent,Nc([G,D,W],Gt=>{St=Mc(St,Gt," ")}),X.textContent!==St&&(Ac(e.removed,{element:X.cloneNode()}),X.textContent=St)),Ei(I.afterSanitizeElements,X,null),!1)},Ea=function(X,St,pt){if(J[St]||Rt&&(St==="id"||St==="name")&&(pt in i||pt in Kt))return!1;const It=st[St]||vt.attributeCheck instanceof Function&&vt.attributeCheck(St,X);if(!(qt&&!J[St]&&Oi(K,St))){if(!(At&&Oi(tt,St))){if(!It||J[St]){if(!(Ki(X)&&(it.tagNameCheck instanceof RegExp&&Oi(it.tagNameCheck,X)||it.tagNameCheck instanceof Function&&it.tagNameCheck(X))&&(it.attributeNameCheck instanceof RegExp&&Oi(it.attributeNameCheck,St)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(St,X))||St==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Oi(it.tagNameCheck,pt)||it.tagNameCheck instanceof Function&&it.tagNameCheck(pt))))return!1}else if(!Ze[St]){if(!Oi(ft,Mc(pt,Y,""))){if(!((St==="src"||St==="xlink:href"||St==="href")&&X!=="script"&&VT(pt,"data:")===0&&Lr[X])){if(!(ie&&!Oi(nt,Mc(pt,Y,"")))){if(pt)return!1}}}}}}return!0},mi=Ue({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ki=function(X){return!mi[Qu(X)]&&Oi(rt,X)},cn=function(X){Ei(I.beforeSanitizeAttributes,X,null);const St=X.attributes;if(!St||In(X))return;const pt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:st,forceKeepAttr:void 0};let It=St.length;for(;It--;){const Gt=St[It],ue=Gt.name,Ke=Gt.namespaceURI,br=Gt.value,rr=we(ue),Yr=br;let Be=ue==="value"?Yr:wG(Yr);if(pt.attrName=rr,pt.attrValue=Be,pt.keepAttr=!0,pt.forceKeepAttr=void 0,Ei(I.uponSanitizeAttribute,X,pt),Be=pt.attrValue,ne&&(rr==="id"||rr==="name")&&VT(Be,Ft)!==0&&(ci(ue,X),Be=Ft+Be),Fe&&Oi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Be)){ci(ue,X);continue}if(rr==="attributename"&&KT(Be,"href")){ci(ue,X);continue}if(pt.forceKeepAttr)continue;if(!pt.keepAttr){ci(ue,X);continue}if(!Dt&&Oi(/\/>/i,Be)){ci(ue,X);continue}Ht&&Nc([G,D,W],zn=>{Be=Mc(Be,zn," ")});const Qr=we(X.nodeName);if(!Ea(Qr,rr,Be)){ci(ue,X);continue}if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Ke)switch(g.getAttributeType(Qr,rr)){case"TrustedHTML":{Be=O.createHTML(Be);break}case"TrustedScriptURL":{Be=O.createScriptURL(Be);break}}if(Be!==Yr)try{Ke?X.setAttributeNS(Ke,ue,Be):X.setAttribute(ue,Be),In(X)?li(X):YT(e.removed)}catch{ci(ue,X)}}Ei(I.afterSanitizeAttributes,X,null)},yi=function(X){let St=null;const pt=Zr(X);for(Ei(I.beforeSanitizeShadowDOM,X,null);St=pt.nextNode();)if(Ei(I.uponSanitizeShadowNode,St,null),$n(St),cn(St),wn(St.content)&&yi(St.content),(E?E(St):St.nodeType)===La.element){const Gt=T?T(St):St.shadowRoot;wn(Gt)&&(yr(Gt),yi(Gt))}Ei(I.afterSanitizeShadowDOM,X,null)},yr=function(X){const St=E?E(X):X.nodeType;if(St===La.element){const Gt=T?T(X):X.shadowRoot;wn(Gt)&&(yr(Gt),yi(Gt))}const pt=_?_(X):X.childNodes;if(!pt)return;const It=[];Nc(pt,Gt=>{Ac(It,Gt)});for(const Gt of It)yr(Gt);if(St===La.element){const Gt=B?B(X):null;if(typeof Gt=="string"&&we(Gt)==="template"){const ue=X.content;wn(ue)&&yr(ue)}}};return e.sanitize=function(te){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St=null,pt=null,It=null,Gt=null;if(ve=!te,ve&&(te="<!-->"),typeof te!="string"&&!Sn(te)&&(te=AG(te),typeof te!="string"))throw Ou("dirty is not a string, aborting");if(!e.isSupported)return te;if(ht||mr(X),e.removed=[],typeof te=="string"&&(xe=!1),xe){const br=B?B(te):te.nodeName;if(typeof br=="string"){const rr=we(br);if(!ct[rr]||H[rr])throw Ou("root node is forbidden and cannot be sanitized in-place")}if(In(te))throw Ou("root node is clobbered and cannot be sanitized in-place");yr(te)}else if(Sn(te))St=Rr("<!---->"),pt=St.ownerDocument.importNode(te,!0),pt.nodeType===La.element&&pt.nodeName==="BODY"||pt.nodeName==="HTML"?St=pt:St.appendChild(pt),yr(pt);else{if(!Lt&&!Ht&&!Zt&&te.indexOf("<")===-1)return O&&Wt?O.createHTML(te):te;if(St=Rr(te),!St)return Lt?null:Wt?A:""}St&&ot&&li(St.firstChild);const ue=Zr(xe?te:St);for(;It=ue.nextNode();)$n(It),cn(It),wn(It.content)&&yi(It.content);if(xe)return Ht&&kn(te),te;if(Lt){if(Ht&&kn(St),$t)for(Gt=z.call(St.ownerDocument);St.firstChild;)Gt.appendChild(St.firstChild);else Gt=St;return(st.shadowroot||st.shadowrootmode)&&(Gt=V.call(n,Gt,!0)),Gt}let Ke=Zt?St.outerHTML:St.innerHTML;return Zt&&ct["!doctype"]&&St.ownerDocument&&St.ownerDocument.doctype&&St.ownerDocument.doctype.name&&Oi(zG,St.ownerDocument.doctype.name)&&(Ke="<!DOCTYPE "+St.ownerDocument.doctype.name+`>
|
|
152
|
+
`+Ke),Ht&&Nc([G,D,W],br=>{Ke=Mc(Ke,br," ")}),O&&Wt?O.createHTML(Ke):Ke},e.setConfig=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mr(te),ht=!0},e.clearConfig=function(){Qt=null,ht=!1},e.isValidAttribute=function(te,X,St){Qt||mr({});const pt=we(te),It=we(X);return Ea(pt,It,St)},e.addHook=function(te,X){typeof X=="function"&&Ac(I[te],X)},e.removeHook=function(te,X){if(X!==void 0){const St=_G(I[te],X);return St===-1?void 0:kG(I[te],St,1)[0]}return YT(I[te])},e.removeHooks=function(te){I[te]=[]},e.removeAllHooks=function(){I=iE()},e}var Do=QB();const JB="sleepy:config:v1",tL=JB,wv="sleepy",nE=420,HG=520,Sv={enabled:!1,hotkey:"Alt+Cmd+S"};function fC(){try{const r=localStorage.getItem(tL);if(r){const e=JSON.parse(r);return{enabled:!!e.enabled,hotkey:typeof e.hotkey=="string"&&e.hotkey.trim()?e.hotkey:Sv.hotkey}}}catch{}return{...Sv}}function eL(r){try{localStorage.setItem(tL,JSON.stringify(r))}catch{}}function WG(r){eL(r),ee.post("/launcher/sleepy-config",r).catch(()=>{})}async function GG(){try{const r=await ee.get("/launcher/sleepy-config"),e={enabled:!!r.enabled,hotkey:typeof r.hotkey=="string"&&r.hotkey.trim()?r.hotkey:Sv.hotkey};return eL(e),e}catch{return fC()}}async function YG(r){try{const{currentMonitor:e}=await De(async()=>{const{currentMonitor:o}=await import("./window-D0tFurhp.js").then(c=>c.w);return{currentMonitor:o}},__vite__mapDeps([3,1])),i=await e(),n=(i==null?void 0:i.scaleFactor)??1,a=((i==null?void 0:i.size.width)??1440)/n;return{x:Math.max(0,Math.round((a-r)/2)),y:0}}catch{return{x:420,y:0}}}async function KG(){if(!Po())return;const{WebviewWindow:r}=await De(async()=>{const{WebviewWindow:o}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:o}},__vite__mapDeps([2,3,1])),e=await r.getByLabel(wv);if(e){await e.close();return}const{x:i,y:n}=await YG(nE),a=new r(wv,{url:`${window.location.origin}/?capture=1`,width:nE,height:HG,x:i,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 VG(){if(!Po())return;const{WebviewWindow:r}=await De(async()=>{const{WebviewWindow:i}=await import("./webviewWindow-Dlc9MvRw.js");return{WebviewWindow:i}},__vite__mapDeps([2,3,1])),e=await r.getByLabel(wv);e&&await e.close()}async function aE(){if(Po())try{const{getCurrentWebviewWindow:r}=await De(async()=>{const{getCurrentWebviewWindow:e}=await import("./webviewWindow-Dlc9MvRw.js");return{getCurrentWebviewWindow:e}},__vite__mapDeps([2,3,1]));await r().close()}catch{await VG()}}async function XG(r){if(!Po())return()=>{};try{const{getCurrentWebviewWindow:e}=await De(async()=>{const{getCurrentWebviewWindow:n}=await import("./webviewWindow-Dlc9MvRw.js");return{getCurrentWebviewWindow:n}},__vite__mapDeps([2,3,1]));return await e().onFocusChanged(({payload:n})=>r(n))}catch{return()=>{}}}async function Tv(r){if(Po())try{const{register:e,unregisterAll:i}=await De(async()=>{const{register:n,unregisterAll:a}=await import("./index-D-gsCv2F.js");return{register:n,unregisterAll:a}},__vite__mapDeps([4,1]));if(await i(),!r.enabled||!r.hotkey.trim())return;await e(r.hotkey,n=>{n.state==="Pressed"&&KG()})}catch(e){console.warn("[sleepy] hotkey registration failed:",e)}}Oe.setOptions({gfm:!0,breaks:!0});function ZG(r){return Do.sanitize(Oe.parse(r))}const sE="sleepy:lastVault",QG=120;function JG(r){return r>=10?"sleeps":r>=8?"sleepy":"idle"}function tY(){const[r,e]=q.useState([]),[i,n]=q.useState(""),[a,o]=q.useState(""),[c,h]=q.useState("idle"),[u,d]=q.useState(""),[f,g]=q.useState("ask"),[x,y]=q.useState(null),[v,C]=q.useState("idle"),_=q.useRef(null),k=q.useRef(null),T=q.useRef(!1),N=q.useRef(!1);function E(F){F&&(F.style.height="auto",F.style.height=`${Math.min(F.scrollHeight,QG)}px`)}q.useEffect(()=>{const F=document.documentElement,j=F.style.background,z=document.body.style.background;return F.style.background="transparent",document.body.style.background="transparent",()=>{F.style.background=j,document.body.style.background=z}},[]),q.useEffect(()=>{ee.get("/vaults").then(F=>{var I;const j=F.vaults.filter(G=>G.exists!==!1),z=j.length>0?j:F.vaults;e(z);const U=localStorage.getItem(sE),V=U&&z.some(G=>G.name===U)?U:((I=z[0])==null?void 0:I.name)??"";n(V)}).catch(()=>h("error"))},[]),q.useEffect(()=>{if(!i)return;bM(i);let F=!1;return ee.get("/sleep").then(j=>{F||C(JG(typeof j.debt=="number"?j.debt:0))}).catch(()=>{F||C("idle")}),()=>{F=!0}},[i]),q.useEffect(()=>{var j;(j=_.current)==null||j.focus();const F=z=>{z.key==="Escape"&&(z.preventDefault(),aE())};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[]),q.useEffect(()=>{let F=!1,j=!1,z=()=>{};return XG(U=>{if(U){F=!0;return}F&&!T.current&&!N.current&&aE()}).then(U=>{j?U():z=U}),()=>{j=!0,z()}},[]),q.useEffect(()=>()=>{k.current&&window.clearTimeout(k.current)},[]);function B(F,j){k.current&&window.clearTimeout(k.current);let z=0;const U=j==="sleep"?750:150;let V=0;const I=async()=>{z+=1;try{const G=await ee.get(`/launcher/capture/status?id=${encodeURIComponent(F)}`);V=G.state==="unknown"?V+1:0,y({state:G.state,output:G.output,mode:j}),(G.state==="running"||G.state==="unknown")&&z<U&&V<3&&(k.current=window.setTimeout(()=>void I(),1200))}catch{y({state:"error",output:"Lost contact with the run.",mode:j})}};k.current=window.setTimeout(()=>void I(),600)}async function O(){var z;const F=a.trim(),j=f;if(!(j!=="sleep"&&!F||!i||c==="saving")){h("saving"),d(""),y(null);try{const U=await ee.post("/launcher/capture",{vault:i,text:F,mode:j});localStorage.setItem(sE,i),o(""),h(j==="learn"?"saved":"idle"),_.current&&(_.current.style.height="auto"),(z=_.current)==null||z.focus(),U.captureId&&(y({state:"running",output:"",mode:j}),B(U.captureId,j)),window.setTimeout(()=>h("idle"),1400)}catch(U){d(U instanceof Error?U.message:"Capture failed"),h("error"),window.setTimeout(()=>h("idle"),5e3)}}}const A=(x==null?void 0:x.mode)==="sleep"&&(x.state==="running"||x.state==="unknown");N.current=A;const M=A?"sleeps":v;return m.jsxs("div",{className:"cap-root",children:[m.jsx("div",{className:"cap-notch","data-tauri-drag-region":!0,children:m.jsx("img",{className:"cap-char",src:`/api/sleepy/anim?mode=${M}`,alt:"",draggable:!1},M)}),m.jsxs("div",{className:`cap-bar cap-${c}`,children:[m.jsxs("div",{className:"cap-bar-head",children:[m.jsxs("div",{className:"cap-vault-wrap",children:[m.jsxs("select",{className:"cap-vault",value:i,onFocus:()=>{T.current=!0},onBlur:()=>{T.current=!1},onChange:F=>n(F.target.value),"aria-label":"Project",children:[r.length===0&&m.jsx("option",{value:"",children:"No projects"}),r.map(F=>m.jsx("option",{value:F.name,children:F.name},F.name))]}),m.jsx("span",{className:"cap-chev","aria-hidden":!0,children:"⌄"})]}),m.jsx("span",{className:`cap-status cap-status-${c}`,"aria-hidden":!0,children:c==="saving"?"saving…":c==="saved"?"captured ✓":c==="error"?"failed":""}),m.jsx("div",{className:"cap-mode-toggle",role:"radiogroup","aria-label":"Mode",children:["ask","learn","sleep"].map(F=>m.jsx("button",{type:"button",className:`cap-mode-opt ${f===F?"is-active":""}`,role:"radio","aria-checked":f===F,disabled:A,onClick:()=>g(F),children:F==="learn"?"Learn":F==="ask"?"Ask":"Sleep"},F))})]}),f==="sleep"?m.jsx("button",{type:"button",className:"cap-sleep-btn",disabled:A||!i,onClick:()=>void O(),children:A?"Sleeping…":`💤 Sleep — consolidate ${i||"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:F=>{o(F.target.value),E(F.target)},onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),O())}}),c==="error"&&u&&m.jsx("div",{className:"cap-error-msg",children:u}),x&&m.jsxs("div",{className:`cap-enrich cap-enrich-${x.state}`,children:[m.jsx("div",{className:"cap-enrich-head",children:x.state==="running"||x.state==="unknown"?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"cap-spinner","aria-hidden":!0}),m.jsx("span",{children:x.mode==="ask"?"Sleepy is thinking…":x.mode==="sleep"?"Sleepy is sleeping — consolidating memory…":"Sleepy is learning…"})]}):x.state==="done"?m.jsx("span",{className:"cap-enrich-done",children:x.mode==="ask"?"✓ Answer":x.mode==="sleep"?"✓ Slept":"✓ Learned"}):m.jsx("span",{className:"cap-enrich-err",children:x.mode==="ask"?"Couldn't answer":x.mode==="sleep"?"Sleep failed":"Enrichment failed"})}),x.output&&(x.state==="error"?m.jsx("div",{className:"cap-enrich-body",children:x.output}):m.jsx("div",{className:"cap-enrich-body cap-md",dangerouslySetInnerHTML:{__html:ZG(x.output)}}))]})]})]})}const rL=q.createContext(null);function iL(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function oE(r){return r==="system"?iL():r}function lE({children:r}){const[e,i]=q.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=q.useState(()=>oE(e)),o=c=>{i(c),localStorage.setItem("dreamcontext-theme",c)};return q.useEffect(()=>{const c=oE(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),q.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=iL();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),m.jsx(rL.Provider,{value:{theme:e,resolved:n,setTheme:o},children:r})}function Gd(){const r=q.useContext(rL);if(!r)throw new Error("useTheme must be used within ThemeProvider");return r}const eY={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"}},nL=q.createContext(null);function rY({children:r}){const[e,i]=q.useState("en"),n=a=>{var o;return((o=eY[e])==null?void 0:o[a])??a};return m.jsx(nL.Provider,{value:{locale:e,setLocale:i,t:n},children:r})}function Pr(){const r=q.useContext(nL);if(!r)throw new Error("useI18n must be used within I18nProvider");return r}const aL=q.createContext({projectId:"",contextRoot:""});function iY(r){let e=0;for(let i=0;i<r.length;i++)e=(e<<5)-e+r.charCodeAt(i)|0;return Math.abs(e).toString(36)}function nY({children:r}){const[e,i]=q.useState({kind:"loading"});return q.useEffect(()=>{ee.get("/health").then(n=>{i({kind:"ready",value:{contextRoot:n.contextRoot,projectId:iY(n.contextRoot)}})}).catch(()=>{i({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(aL.Provider,{value:e.value,children:r})}function sL(){return q.useContext(aL)}function oL(r){return r<=3?"Alert":r<=6?"Drowsy":r<=9?"Sleepy":"Must Sleep"}function lL(r){return r<=3?"alert":r<=6?"drowsy":r<=9?"sleepy":"must_sleep"}function cL(){return dr({queryKey:["sleep"],queryFn:()=>ee.get("/sleep")})}function aY(){return dr({queryKey:["version-check"],queryFn:()=>ee.get("/version-check")})}var Qp={exports:{}},sY=Qp.exports,cE;function oY(){return cE||(cE=1,(function(r,e){(function(i,n){r.exports=n()})(sY,(function(){var i=1e3,n=6e4,a=36e5,o="millisecond",c="second",h="minute",u="hour",d="day",f="week",g="month",x="quarter",y="year",v="date",C="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var G=["th","st","nd","rd"],D=I%100;return"["+I+(G[(D-20)%10]||G[D]||G[0])+"]"}},N=function(I,G,D){var W=String(I);return!W||W.length>=G?I:""+Array(G+1-W.length).join(D)+I},E={s:N,z:function(I){var G=-I.utcOffset(),D=Math.abs(G),W=Math.floor(D/60),K=D%60;return(G<=0?"+":"-")+N(W,2,"0")+":"+N(K,2,"0")},m:function I(G,D){if(G.date()<D.date())return-I(D,G);var W=12*(D.year()-G.year())+(D.month()-G.month()),K=G.clone().add(W,g),tt=D-K<0,nt=G.clone().add(W+(tt?-1:1),g);return+(-(W+(D-K)/(tt?K-nt:nt-K))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:g,y,w:f,d,D:v,h:u,m:h,s:c,ms:o,Q:x}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},B="en",O={};O[B]=T;var A="$isDayjsObject",M=function(I){return I instanceof U||!(!I||!I[A])},F=function I(G,D,W){var K;if(!G)return B;if(typeof G=="string"){var tt=G.toLowerCase();O[tt]&&(K=tt),D&&(O[tt]=D,K=tt);var nt=G.split("-");if(!K&&nt.length>1)return I(nt[0])}else{var Y=G.name;O[Y]=G,K=Y}return!W&&K&&(B=K),K||!W&&B},j=function(I,G){if(M(I))return I.clone();var D=typeof G=="object"?G:{};return D.date=I,D.args=arguments,new U(D)},z=E;z.l=F,z.i=M,z.w=function(I,G){return j(I,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var U=(function(){function I(D){this.$L=F(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[A]=!0}var G=I.prototype;return G.parse=function(D){this.$d=(function(W){var K=W.date,tt=W.utc;if(K===null)return new Date(NaN);if(z.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var nt=K.match(_);if(nt){var Y=nt[2]-1||0,rt=(nt[7]||"0").substring(0,3);return tt?new Date(Date.UTC(nt[1],Y,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,rt)):new Date(nt[1],Y,nt[3]||1,nt[4]||0,nt[5]||0,nt[6]||0,rt)}}return new Date(K)})(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 z},G.isValid=function(){return this.$d.toString()!==C},G.isSame=function(D,W){var K=j(D);return this.startOf(W)<=K&&K<=this.endOf(W)},G.isAfter=function(D,W){return j(D)<this.startOf(W)},G.isBefore=function(D,W){return this.endOf(W)<j(D)},G.$g=function(D,W,K){return z.u(D)?this[W]:this.set(K,D)},G.unix=function(){return Math.floor(this.valueOf()/1e3)},G.valueOf=function(){return this.$d.getTime()},G.startOf=function(D,W){var K=this,tt=!!z.u(W)||W,nt=z.p(D),Y=function(H,J){var vt=z.w(K.$u?Date.UTC(K.$y,J,H):new Date(K.$y,J,H),K);return tt?vt:vt.endOf(d)},rt=function(H,J){return z.w(K.toDate()[H].apply(K.toDate("s"),(tt?[0,0,0,0]:[23,59,59,999]).slice(J)),K)},ft=this.$W,ct=this.$M,xt=this.$D,st="set"+(this.$u?"UTC":"");switch(nt){case y:return tt?Y(1,0):Y(31,11);case g:return tt?Y(1,ct):Y(0,ct+1);case f:var kt=this.$locale().weekStart||0,it=(ft<kt?ft+7:ft)-kt;return Y(tt?xt-it:xt+(6-it),ct);case d:case v:return rt(st+"Hours",0);case u:return rt(st+"Minutes",1);case h:return rt(st+"Seconds",2);case c:return rt(st+"Milliseconds",3);default:return this.clone()}},G.endOf=function(D){return this.startOf(D,!1)},G.$set=function(D,W){var K,tt=z.p(D),nt="set"+(this.$u?"UTC":""),Y=(K={},K[d]=nt+"Date",K[v]=nt+"Date",K[g]=nt+"Month",K[y]=nt+"FullYear",K[u]=nt+"Hours",K[h]=nt+"Minutes",K[c]=nt+"Seconds",K[o]=nt+"Milliseconds",K)[tt],rt=tt===d?this.$D+(W-this.$W):W;if(tt===g||tt===y){var ft=this.clone().set(v,1);ft.$d[Y](rt),ft.init(),this.$d=ft.set(v,Math.min(this.$D,ft.daysInMonth())).$d}else Y&&this.$d[Y](rt);return this.init(),this},G.set=function(D,W){return this.clone().$set(D,W)},G.get=function(D){return this[z.p(D)]()},G.add=function(D,W){var K,tt=this;D=Number(D);var nt=z.p(W),Y=function(ct){var xt=j(tt);return z.w(xt.date(xt.date()+Math.round(ct*D)),tt)};if(nt===g)return this.set(g,this.$M+D);if(nt===y)return this.set(y,this.$y+D);if(nt===d)return Y(1);if(nt===f)return Y(7);var rt=(K={},K[h]=n,K[u]=a,K[c]=i,K)[nt]||1,ft=this.$d.getTime()+D*rt;return z.w(ft,this)},G.subtract=function(D,W){return this.add(-1*D,W)},G.format=function(D){var W=this,K=this.$locale();if(!this.isValid())return K.invalidDate||C;var tt=D||"YYYY-MM-DDTHH:mm:ssZ",nt=z.z(this),Y=this.$H,rt=this.$m,ft=this.$M,ct=K.weekdays,xt=K.months,st=K.meridiem,kt=function(J,vt,At,qt){return J&&(J[vt]||J(W,tt))||At[vt].slice(0,qt)},it=function(J){return z.s(Y%12||12,J,"0")},H=st||function(J,vt,At){var qt=J<12?"AM":"PM";return At?qt.toLowerCase():qt};return tt.replace(k,(function(J,vt){return vt||(function(At){switch(At){case"YY":return String(W.$y).slice(-2);case"YYYY":return z.s(W.$y,4,"0");case"M":return ft+1;case"MM":return z.s(ft+1,2,"0");case"MMM":return kt(K.monthsShort,ft,xt,3);case"MMMM":return kt(xt,ft);case"D":return W.$D;case"DD":return z.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return kt(K.weekdaysMin,W.$W,ct,2);case"ddd":return kt(K.weekdaysShort,W.$W,ct,3);case"dddd":return ct[W.$W];case"H":return String(Y);case"HH":return z.s(Y,2,"0");case"h":return it(1);case"hh":return it(2);case"a":return H(Y,rt,!0);case"A":return H(Y,rt,!1);case"m":return String(rt);case"mm":return z.s(rt,2,"0");case"s":return String(W.$s);case"ss":return z.s(W.$s,2,"0");case"SSS":return z.s(W.$ms,3,"0");case"Z":return nt}return null})(J)||nt.replace(":","")}))},G.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},G.diff=function(D,W,K){var tt,nt=this,Y=z.p(W),rt=j(D),ft=(rt.utcOffset()-this.utcOffset())*n,ct=this-rt,xt=function(){return z.m(nt,rt)};switch(Y){case y:tt=xt()/12;break;case g:tt=xt();break;case x:tt=xt()/3;break;case f:tt=(ct-ft)/6048e5;break;case d:tt=(ct-ft)/864e5;break;case u:tt=ct/a;break;case h:tt=ct/n;break;case c:tt=ct/i;break;default:tt=ct}return K?tt:z.a(tt)},G.daysInMonth=function(){return this.endOf(g).$D},G.$locale=function(){return O[this.$L]},G.locale=function(D,W){if(!D)return this.$L;var K=this.clone(),tt=F(D,W,!0);return tt&&(K.$L=tt),K},G.clone=function(){return z.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()},I})(),V=U.prototype;return j.prototype=V,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",g],["$y",y],["$D",v]].forEach((function(I){V[I[1]]=function(G){return this.$g(G,I[0],I[1])}})),j.extend=function(I,G){return I.$i||(I(G,U,j),I.$i=!0),j},j.locale=F,j.isDayjs=M,j.unix=function(I){return j(1e3*I)},j.en=O[B],j.Ls=O,j.p={},j}))})(Qp)),Qp.exports}var lY=oY();const cY=$d(lY);var hL=Object.defineProperty,L=(r,e)=>hL(r,"name",{value:e,configurable:!0}),hY=(r,e)=>{for(var i in e)hL(r,i,{get:e[i],enumerable:!0})},vs={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Bt={trace:L((...r)=>{},"trace"),debug:L((...r)=>{},"debug"),info:L((...r)=>{},"info"),warn:L((...r)=>{},"warn"),error:L((...r)=>{},"error"),fatal:L((...r)=>{},"fatal")},pC=L(function(r="fatal"){let e=vs.fatal;typeof r=="string"?r.toLowerCase()in vs&&(e=vs[r]):typeof r=="number"&&(e=r),Bt.trace=()=>{},Bt.debug=()=>{},Bt.info=()=>{},Bt.warn=()=>{},Bt.error=()=>{},Bt.fatal=()=>{},e<=vs.fatal&&(Bt.fatal=console.error?console.error.bind(console,Jn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Jn("FATAL"))),e<=vs.error&&(Bt.error=console.error?console.error.bind(console,Jn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Jn("ERROR"))),e<=vs.warn&&(Bt.warn=console.warn?console.warn.bind(console,Jn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Jn("WARN"))),e<=vs.info&&(Bt.info=console.info?console.info.bind(console,Jn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Jn("INFO"))),e<=vs.debug&&(Bt.debug=console.debug?console.debug.bind(console,Jn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jn("DEBUG"))),e<=vs.trace&&(Bt.trace=console.debug?console.debug.bind(console,Jn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jn("TRACE")))},"setLogLevel"),Jn=L(r=>`%c${cY().format("ss.SSS")} : ${r} : `,"format");const Jp={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:r=>r>=255?255:r<0?0:r,g:r=>r>=255?255:r<0?0:r,b:r=>r>=255?255:r<0?0:r,h:r=>r%360,s:r=>r>=100?100:r<0?0:r,l:r=>r>=100?100:r<0?0:r,a:r=>r>=1?1:r<0?0:r},toLinear:r=>{const e=r/255;return r>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?r+(e-r)*6*i:i<1/2?e:i<2/3?r+(e-r)*(2/3-i)*6:r),hsl2rgb:({h:r,s:e,l:i},n)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;const a=i<.5?i*(1+e):i+e-i*e,o=2*i-a;switch(n){case"r":return Jp.hue2rgb(o,a,r+1/3)*255;case"g":return Jp.hue2rgb(o,a,r)*255;case"b":return Jp.hue2rgb(o,a,r-1/3)*255}},rgb2hsl:({r,g:e,b:i},n)=>{r/=255,e/=255,i/=255;const a=Math.max(r,e,i),o=Math.min(r,e,i),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 r:return((e-i)/h+(e<i?6:0))*60;case e:return((i-r)/h+2)*60;case i:return((r-e)/h+4)*60;default:return-1}}},uY={clamp:(r,e,i)=>e>i?Math.min(e,Math.max(i,r)):Math.min(i,Math.max(e,r)),round:r=>Math.round(r*1e10)/1e10},dY={dec2hex:r=>{const e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Le={channel:Jp,lang:uY,unit:dY},bo={};for(let r=0;r<=255;r++)bo[r]=Le.unit.dec2hex(r);const qi={ALL:0,RGB:1,HSL:2};class fY{constructor(){this.type=qi.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=qi.ALL}is(e){return this.type===e}}class pY{constructor(e,i){this.color=i,this.changed=!1,this.data=e,this.type=new fY}set(e,i){return this.color=i,this.changed=!1,this.data=e,this.type.type=qi.ALL,this}_ensureHSL(){const e=this.data,{h:i,s:n,l:a}=e;i===void 0&&(e.h=Le.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Le.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=Le.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:i,g:n,b:a}=e;i===void 0&&(e.r=Le.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Le.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=Le.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,i=e.r;return!this.type.is(qi.HSL)&&i!==void 0?i:(this._ensureHSL(),Le.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,i=e.g;return!this.type.is(qi.HSL)&&i!==void 0?i:(this._ensureHSL(),Le.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,i=e.b;return!this.type.is(qi.HSL)&&i!==void 0?i:(this._ensureHSL(),Le.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,i=e.h;return!this.type.is(qi.RGB)&&i!==void 0?i:(this._ensureRGB(),Le.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,i=e.s;return!this.type.is(qi.RGB)&&i!==void 0?i:(this._ensureRGB(),Le.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,i=e.l;return!this.type.is(qi.RGB)&&i!==void 0?i:(this._ensureRGB(),Le.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(qi.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(qi.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(qi.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(qi.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(qi.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(qi.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const ym=new pY({r:0,g:0,b:0,a:0},"transparent"),Hc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:r=>{if(r.charCodeAt(0)!==35)return;const e=r.match(Hc.re);if(!e)return;const i=e[1],n=parseInt(i,16),a=i.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 ym.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},r)},stringify:r=>{const{r:e,g:i,b:n,a}=r;return a<1?`#${bo[Math.round(e)]}${bo[Math.round(i)]}${bo[Math.round(n)]}${bo[Math.round(a*255)]}`:`#${bo[Math.round(e)]}${bo[Math.round(i)]}${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:r=>{const e=r.match(bl.hueRe);if(e){const[,i,n]=e;switch(n){case"grad":return Le.channel.clamp.h(parseFloat(i)*.9);case"rad":return Le.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Le.channel.clamp.h(parseFloat(i)*360)}}return Le.channel.clamp.h(parseFloat(r))},parse:r=>{const e=r.charCodeAt(0);if(e!==104&&e!==72)return;const i=r.match(bl.re);if(!i)return;const[,n,a,o,c,h]=i;return ym.set({h:bl._hue2deg(n),s:Le.channel.clamp.s(parseFloat(a)),l:Le.channel.clamp.l(parseFloat(o)),a:c?Le.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:r=>{const{h:e,s:i,l:n,a}=r;return a<1?`hsla(${Le.lang.round(e)}, ${Le.lang.round(i)}%, ${Le.lang.round(n)}%, ${a})`:`hsl(${Le.lang.round(e)}, ${Le.lang.round(i)}%, ${Le.lang.round(n)}%)`}},ud={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:r=>{r=r.toLowerCase();const e=ud.colors[r];if(e)return Hc.parse(e)},stringify:r=>{const e=Hc.stringify(r);for(const i in ud.colors)if(ud.colors[i]===e)return i}},Ju={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:r=>{const e=r.charCodeAt(0);if(e!==114&&e!==82)return;const i=r.match(Ju.re);if(!i)return;const[,n,a,o,c,h,u,d,f]=i;return ym.set({r:Le.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:Le.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:Le.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:d?Le.channel.clamp.a(f?parseFloat(d)/100:parseFloat(d)):1},r)},stringify:r=>{const{r:e,g:i,b:n,a}=r;return a<1?`rgba(${Le.lang.round(e)}, ${Le.lang.round(i)}, ${Le.lang.round(n)}, ${Le.lang.round(a)})`:`rgb(${Le.lang.round(e)}, ${Le.lang.round(i)}, ${Le.lang.round(n)})`}},Ya={format:{keyword:ud,hex:Hc,rgb:Ju,rgba:Ju,hsl:bl,hsla:bl},parse:r=>{if(typeof r!="string")return r;const e=Hc.parse(r)||Ju.parse(r)||bl.parse(r)||ud.parse(r);if(e)return e;throw new Error(`Unsupported color format: "${r}"`)},stringify:r=>!r.changed&&r.color?r.color:r.type.is(qi.HSL)||r.data.r===void 0?bl.stringify(r):r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b)?Ju.stringify(r):Hc.stringify(r)},uL=(r,e)=>{const i=Ya.parse(r);for(const n in e)i[n]=Le.channel.clamp[n](e[n]);return Ya.stringify(i)},Oo=(r,e,i=0,n=1)=>{if(typeof r!="number")return uL(r,{a:e});const a=ym.set({r:Le.channel.clamp.r(r),g:Le.channel.clamp.g(e),b:Le.channel.clamp.b(i),a:Le.channel.clamp.a(n)});return Ya.stringify(a)},gY=r=>{const{r:e,g:i,b:n}=Ya.parse(r),a=.2126*Le.channel.toLinear(e)+.7152*Le.channel.toLinear(i)+.0722*Le.channel.toLinear(n);return Le.lang.round(a)},mY=r=>gY(r)>=.5,Ta=r=>!mY(r),dL=(r,e,i)=>{const n=Ya.parse(r),a=n[e],o=Le.channel.clamp[e](a+i);return a!==o&&(n[e]=o),Ya.stringify(n)},wt=(r,e)=>dL(r,"l",e),Ct=(r,e)=>dL(r,"l",-e),$=(r,e)=>{const i=Ya.parse(r),n={};for(const a in e)e[a]&&(n[a]=i[a]+e[a]);return uL(r,n)},yY=(r,e,i=50)=>{const{r:n,g:a,b:o,a:c}=Ya.parse(r),{r:h,g:u,b:d,a:f}=Ya.parse(e),g=i/100,x=g*2-1,y=c-f,C=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,_=1-C,k=n*C+h*_,T=a*C+u*_,N=o*C+d*_,E=c*g+f*(1-g);return Oo(k,T,N,E)},ut=(r,e=100)=>{const i=Ya.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,yY(i,r,e)};var fL=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,dd=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,bY=/\s*%%.*\n/gm,nh,pL=(nh=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},L(nh,"UnknownDiagramError"),nh),Il={},gC=L(function(r,e){r=r.replace(fL,"").replace(dd,"").replace(bY,`
|
|
153
|
+
`);for(const[i,{detector:n}]of Object.entries(Il))if(n(r,e))return i;throw new pL(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Ev=L((...r)=>{for(const{id:e,detector:i,loader:n}of r)gL(e,i,n)},"registerLazyLoadedDiagrams"),gL=L((r,e,i)=>{Il[r]&&Bt.warn(`Detector with key ${r} already exists. Overwriting.`),Il[r]={detector:e,loader:i},Bt.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),xY=L(r=>Il[r].loader,"getDiagramLoader"),Nv=L((r,e,{depth:i=2,clobber:n=!1}={})=>{const a={depth:i,clobber:n};return Array.isArray(e)&&!Array.isArray(r)?(e.forEach(o=>Nv(r,o,a)),r):Array.isArray(e)&&Array.isArray(r)?(e.forEach(o=>{r.includes(o)||r.push(o)}),r):r===void 0||i<=0?r!=null&&typeof r=="object"&&typeof e=="object"?Object.assign(r,e):e:(e!==void 0&&typeof r=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&e[o]!==null&&(r[o]===void 0||typeof r[o]=="object")?(r[o]===void 0&&(r[o]=Array.isArray(e[o])?[]:{}),r[o]=Nv(r[o],e[o],{depth:i-1,clobber:n})):(n||typeof r[o]!="object"&&typeof e[o]!="object")&&(r[o]=e[o])}),r)},"assignWithDepth"),Ci=Nv,Za="#ffffff",Qa="#f2f2f2",Ne=L((r,e)=>e?$(r,{s:-40,l:10}):$(r,{s:-40,l:-10}),"mkBorder"),ah,vY=(ah=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var i,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O,A;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||$(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||$(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ne(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ne(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?Ct(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||Ct(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||wt(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||Ct(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ct(this.mainBkg,10)):(this.rowOdd=this.rowOdd||wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||wt(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]=Ct(this["cScale"+M],75);else for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=Ct(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]||wt(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||Ct(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:((i=this.radar)==null?void 0:i.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)?wt(this.quadrant1Fill):Ct(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,dataLabelColor:((v=this.xyChart)==null?void 0:v.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((C=this.xyChart)==null?void 0:C.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((N=this.xyChart)==null?void 0:N.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ct(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=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(ah,"Theme"),ah),CY=L(r=>{const e=new vY;return e.calculate(r),e},"getThemeVariables"),sh,_Y=(sh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=wt(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ne(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=wt(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=Ct("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ct(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||wt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ct(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,i,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.secondBkg=wt(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=wt(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=wt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=ut(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330});for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||ut(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScalePeer"+A]=this["cScalePeer"+A]||wt(this["cScale"+A],10);for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{h:30,s:-30,l:-(-10+A*4)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{h:30,s:-30,l:-(-7+A*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["pie"+A]=this["cScale"+A];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let A=0;A<8;A++)this["venn"+(A+1)]=this["venn"+(A+1)]??wt(this["cScale"+A],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?wt(this.quadrant1Fill):Ct(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:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ct(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=wt(this.secondaryColor,20),this.git1=wt(this.pie2||this.secondaryColor,20),this.git2=wt(this.pie3||this.tertiaryColor,20),this.git3=wt(this.pie4||$(this.primaryColor,{h:-30}),20),this.git4=wt(this.pie5||$(this.primaryColor,{h:-60}),20),this.git5=wt(this.pie6||$(this.primaryColor,{h:-90}),10),this.git6=wt(this.pie7||$(this.primaryColor,{h:60}),10),this.git7=wt(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||wt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(sh,"Theme"),sh),kY=L(r=>{const e=new _Y;return e.calculate(r),e},"getThemeVariables"),oh,wY=(oh=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=$(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ne(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=Ne(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,i,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||$(this.primaryColor,{h:30}),this.cScale4=this.cScale4||$(this.primaryColor,{h:60}),this.cScale5=this.cScale5||$(this.primaryColor,{h:90}),this.cScale6=this.cScale6||$(this.primaryColor,{h:120}),this.cScale7=this.cScale7||$(this.primaryColor,{h:150}),this.cScale8=this.cScale8||$(this.primaryColor,{h:210}),this.cScale9=this.cScale9||$(this.primaryColor,{h:270}),this.cScale10=this.cScale10||$(this.primaryColor,{h:300}),this.cScale11=this.cScale11||$(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ct(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ct(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=Ct(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||Ct(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||$(this["cScale"+A],{h:180});for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{h:30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{h:30,l:-(7+A*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ut(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ut(this.labelTextColor);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||wt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||wt(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)?wt(this.quadrant1Fill):Ct(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:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((N=this.xyChart)==null?void 0:N.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(this.git7,25)),this.gitInv0=this.gitInv0||Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(oh,"Theme"),oh),SY=L(r=>{const e=new wY;return e.calculate(r),e},"getThemeVariables"),lh,TY=(lh=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=wt("#cde498",10),this.primaryBorderColor=Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ne(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,i,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.actorBorder=Ct(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||Ct(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ct(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=Ct(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||Ct(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||$(this["cScale"+A],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{h:30,s:-30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{h:30,s:-30,l:-(8+A*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||wt(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)?wt(this.quadrant1Fill):Ct(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:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((k=this.xyChart)==null?void 0:k.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((N=this.xyChart)==null?void 0:N.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||$(this.primaryColor,{h:-30}),this.git4=this.git4||$(this.primaryColor,{h:-60}),this.git5=this.git5||$(this.primaryColor,{h:-90}),this.git6=this.git6||$(this.primaryColor,{h:60}),this.git7=this.git7||$(this.primaryColor,{h:120}),this.darkMode?(this.git0=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(lh,"Theme"),lh),EY=L(r=>{const e=new TY;return e.calculate(r),e},"getThemeVariables"),ch,NY=(ch=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=wt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ne(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||wt(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,i,n,a,o,c,h,u,d,f,g,x,y,v,C,_,k,T,N,E,B,O;this.secondBkg=wt(this.contrast,55),this.border2=this.contrast,this.actorBorder=wt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||ut(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this.darkMode?this["cScalePeer"+A]=this["cScalePeer"+A]||wt(this["cScale"+A],10):this["cScalePeer"+A]=this["cScalePeer"+A]||Ct(this["cScale"+A],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||$(this.mainBkg,{l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||$(this.mainBkg,{l:-(8+A*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=wt(this.contrast,30),this.sectionBkgColor2=wt(this.contrast,30),this.taskBorderColor=Ct(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=wt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Ct(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=$(this.primaryColor,{h:64}),this.fillType3=$(this.secondaryColor,{h:64}),this.fillType4=$(this.primaryColor,{h:-64}),this.fillType5=$(this.secondaryColor,{h:-64}),this.fillType6=$(this.primaryColor,{h:128}),this.fillType7=$(this.secondaryColor,{h:128});for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["pie"+A]=this["cScale"+A];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let A=0;A<8;A++)this["venn"+(A+1)]=this["venn"+(A+1)]??this["cScale"+A];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||$(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||$(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||$(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||$(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||$(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||$(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ta(this.quadrant1Fill)?wt(this.quadrant1Fill):Ct(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:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((k=this.radar)==null?void 0:k.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(ch,"Theme"),ch),AY=L(r=>{const e=new NY;return e.calculate(r),e},"getThemeVariables"),hh,MY=(hh=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Ne(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||Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ne(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ne(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?Ct(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||Ct(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=$(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,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||wt(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||i,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"+_]=Ct(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=Ct(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"+_]||wt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||Ct(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||i,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(i,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(i,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(i,{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)?wt(this.quadrant1Fill):Ct(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?Ct(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||i,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=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(hh,"Theme"),hh),BY=L(r=>{const e=new MY;return e.calculate(r),e},"getThemeVariables"),uh,LY=(uh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=wt(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ne(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=wt(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 i,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||Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ne(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ne(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?Ct(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||Ct(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||wt(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]=Ct(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=Ct(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]||wt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||Ct(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)?wt(this.quadrant1Fill):Ct(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:((i=this.xyChart)==null?void 0:i.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?Ct(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=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(uh,"Theme"),uh),OY=L(r=>{const e=new LY;return e.calculate(r),e},"getThemeVariables"),dh,RY=(dh=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ne("#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||Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ne(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ne(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?Ct(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||Ct(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=$(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,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||wt(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"+_]=Ct(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=Ct(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"+_]||wt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||Ct(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||i,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(i,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(i,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(i,{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)?wt(this.quadrant1Fill):Ct(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?Ct(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||i,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=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(dh,"Theme"),dh),jY=L(r=>{const e=new RY;return e.calculate(r),e},"getThemeVariables"),fh,DY=(fh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=wt(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ne(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=wt(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 i,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||Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ne(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ne(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?Ct(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||Ct(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||wt(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]=Ct(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=Ct(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]||wt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||Ct(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)?wt(this.quadrant1Fill):Ct(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:((i=this.xyChart)==null?void 0:i.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?Ct(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=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(fh,"Theme"),fh),FY=L(r=>{const e=new DY;return e.calculate(r),e},"getThemeVariables"),ph,IY=(ph=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ne(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||Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ne(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ne(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?Ct(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||Ct(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=$(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,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||wt(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"+_]||wt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||Ct(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||i,this.fillType2=this.fillType2||$(e,{h:64}),this.fillType3=this.fillType3||$(i,{h:64}),this.fillType4=this.fillType4||$(e,{h:-64}),this.fillType5=this.fillType5||$(i,{h:-64}),this.fillType6=this.fillType6||$(e,{h:128}),this.fillType7=this.fillType7||$(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||$(e,{l:-10}),this.pie5=this.pie5||$(i,{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)?wt(this.quadrant1Fill):Ct(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?Ct(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||i,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=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(ph,"Theme"),ph),$Y=L(r=>{const e=new IY;return e.calculate(r),e},"getThemeVariables"),gh,zY=(gh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=wt(this.primaryColor,16),this.tertiaryColor=$(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ne(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=wt(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 i,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||Ne(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ne(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ne(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ne(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?Ct(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||Ct(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||wt(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]||wt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||Ct(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=Ct(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)?wt(this.quadrant1Fill):Ct(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:((i=this.xyChart)==null?void 0:i.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?Ct(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=wt(this.git0,25),this.git1=wt(this.git1,25),this.git2=wt(this.git2,25),this.git3=wt(this.git3,25),this.git4=wt(this.git4,25),this.git5=wt(this.git5,25),this.git6=wt(this.git6,25),this.git7=wt(this.git7,25)):(this.git0=Ct(this.git0,25),this.git1=Ct(this.git1,25),this.git2=Ct(this.git2,25),this.git3=Ct(this.git3,25),this.git4=Ct(this.git4,25),this.git5=Ct(this.git5,25),this.git6=Ct(this.git6,25),this.git7=Ct(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 i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},L(gh,"Theme"),gh),PY=L(r=>{const e=new zY;return e.calculate(r),e},"getThemeVariables"),Ls={base:{getThemeVariables:CY},dark:{getThemeVariables:kY},default:{getThemeVariables:SY},forest:{getThemeVariables:EY},neutral:{getThemeVariables:AY},neo:{getThemeVariables:BY},"neo-dark":{getThemeVariables:OY},redux:{getThemeVariables:jY},"redux-dark":{getThemeVariables:FY},"redux-color":{getThemeVariables:$Y},"redux-dark-color":{getThemeVariables:PY}},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},mL={...On,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ls.default.getThemeVariables(),sequence:{...On.sequence,messageFont:L(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:L(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:L(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...On.gantt,tickInterval:void 0,useWidth:void 0},c4:{...On.c4,useWidth:void 0,personFont:L(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...On.flowchart,inheritDir:!1},external_personFont:L(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:L(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:L(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:L(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:L(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:L(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:L(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:L(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:L(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:L(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:L(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:L(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:L(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:L(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:L(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:L(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:L(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:L(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:L(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:L(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:L(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...On.pie,useWidth:984},xyChart:{...On.xyChart,useWidth:void 0},requirement:{...On.requirement,useWidth:void 0},packet:{...On.packet},treeView:{...On.treeView,useWidth:void 0},radar:{...On.radar},ishikawa:{...On.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...On.venn}},yL=L((r,e="")=>Object.keys(r).reduce((i,n)=>Array.isArray(r[n])?i:typeof r[n]=="object"&&r[n]!==null?[...i,e+n,...yL(r[n],"")]:[...i,e+n],[]),"keyify"),qY=new Set(yL(mL,"")),bL=mL,Ng=L(r=>{if(Bt.debug("sanitizeDirective called with",r),!(typeof r!="object"||r==null)){if(Array.isArray(r)){r.forEach(e=>Ng(e));return}for(const e of Object.keys(r)){if(Bt.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!qY.has(e)||r[e]==null){Bt.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]=="object"){Bt.debug("sanitizing object",e),Ng(r[e]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const n of i)e.includes(n)&&(Bt.debug("sanitizing css option",e),r[e]=UY(r[e]))}if(r.themeVariables)for(const e of Object.keys(r.themeVariables)){const i=r.themeVariables[e];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(r.themeVariables[e]="")}Bt.debug("After sanitization",r)}},"sanitizeDirective"),UY=L(r=>{let e=0,i=0;for(const n of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":r},"sanitizeCss"),Ch=Object.freeze(bL),Is=L(r=>!(r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())),"evaluate"),xn=Ci({},Ch),Ag,$l=[],fd=Ci({},Ch),bm=L((r,e)=>{let i=Ci({},r),n={};for(const a of e)CL(a),n=Ci(n,a);if(i=Ci(i,n),n.theme&&n.theme in Ls){const a=Ci({},Ag),o=Ci(a.themeVariables||{},n.themeVariables);i.theme&&i.theme in Ls&&(i.themeVariables=Ls[i.theme].getThemeVariables(o))}return fd=i,kL(fd),fd},"updateCurrentConfig"),HY=L(r=>(xn=Ci({},Ch),xn=Ci(xn,r),r.theme&&Ls[r.theme]&&(xn.themeVariables=Ls[r.theme].getThemeVariables(r.themeVariables)),bm(xn,$l),xn),"setSiteConfig"),WY=L(r=>{Ag=Ci({},r)},"saveConfigFromInitialize"),GY=L(r=>(xn=Ci(xn,r),bm(xn,$l),xn),"updateSiteConfig"),xL=L(()=>Ci({},xn),"getSiteConfig"),vL=L(r=>(kL(r),Ci(fd,r),Vr()),"setConfig"),Vr=L(()=>Ci({},fd),"getConfig"),CL=L(r=>{r&&(["secure",...xn.secure??[]].forEach(e=>{Object.hasOwn(r,e)&&(Bt.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e])}),Object.keys(r).forEach(e=>{e.startsWith("__")&&delete r[e]}),Object.keys(r).forEach(e=>{typeof r[e]=="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:"))&&delete r[e],typeof r[e]=="object"&&CL(r[e])}))},"sanitize"),YY=L(r=>{var e;Ng(r),r.fontFamily&&!((e=r.themeVariables)!=null&&e.fontFamily)&&(r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily}),$l.push(r),bm(xn,$l)},"addDirective"),Mg=L((r=xn)=>{$l=[],bm(r,$l)},"reset"),KY={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."},hE={},_L=L(r=>{hE[r]||(Bt.warn(KY[r]),hE[r]=!0)},"issueWarning"),kL=L(r=>{r&&(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)&&_L("LAZY_LOAD_DEPRECATED")},"checkConfig"),Xot=L(()=>{let r={};Ag&&(r=Ci(r,Ag));for(const e of $l)r=Ci(r,e);return r},"getUserDefinedConfig"),an=L(r=>{var e,i;return((e=r.flowchart)==null?void 0:e.htmlLabels)!=null&&_L("FLOWCHART_HTML_LABELS_DEPRECATED"),Is(r.htmlLabels??((i=r.flowchart)==null?void 0:i.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Yd=/<br\s*\/?>/gi,VY=L(r=>r?TL(r).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),XY=(()=>{let r=!1;return()=>{r||(wL(),r=!0)}})();function wL(){const r="data-temp-href-target";Do.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(r,e.getAttribute("target")??"")}),Do.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(r)&&(e.setAttribute("target",e.getAttribute(r)??""),e.removeAttribute(r),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}L(wL,"setupDompurifyHooks");var SL=L(r=>(XY(),Do.sanitize(r)),"removeScript"),uE=L((r,e)=>{if(an(e)){const i=e.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?r=SL(r):i!=="loose"&&(r=TL(r),r=r.replace(/</g,"<").replace(/>/g,">"),r=r.replace(/=/g,"="),r=tK(r))}return r},"sanitizeMore"),ka=L((r,e)=>r&&(e.dompurifyConfig?r=Do.sanitize(uE(r,e),e.dompurifyConfig).toString():r=Do.sanitize(uE(r,e),{FORBID_TAGS:["style"]}).toString(),r),"sanitizeText"),ZY=L((r,e)=>typeof r=="string"?ka(r,e):r.flat().map(i=>ka(i,e)),"sanitizeTextOrArray"),QY=L(r=>Yd.test(r),"hasBreaks"),JY=L(r=>r.split(Yd),"splitBreaks"),tK=L(r=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),TL=L(r=>r.replace(Yd,"#br#"),"breakToPlaceholder"),eK=L(r=>{let e="";return r&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),rK=L(function(...r){const e=r.filter(i=>!isNaN(i));return Math.max(...e)},"getMax"),iK=L(function(...r){const e=r.filter(i=>!isNaN(i));return Math.min(...e)},"getMin"),dE=L(function(r){const e=r.split(/(,)/),i=[];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];nK(o,c)&&(a=o+","+c,n++,i.pop())}i.push(aK(a))}return i.join("")},"parseGenericTypes"),Av=L((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),nK=L((r,e)=>{const i=Av(r,"~"),n=Av(e,"~");return i===1&&n===1},"shouldCombineSets"),aK=L(r=>{const e=Av(r,"~");let i=!1;if(e<=1)return r;e%2!==0&&r.startsWith("~")&&(r=r.substring(1),i=!0);const n=[...r];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 i&&n.unshift("~"),n.join("")},"processSet"),fE=L(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Mv=/\$\$(.*)\$\$/g,Td=L(r=>{var e;return(((e=r.match(Mv))==null?void 0:e.length)??0)>0},"hasKatex"),Zot=L(async(r,e)=>{const i=document.createElement("div");i.innerHTML=await EL(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",i);const a={width:i.clientWidth,height:i.clientHeight};return i.remove(),a},"calculateMathMLDimensions"),sK=L(async(r,e)=>{if(!Td(r))return r;if(!(fE()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Mv,"MathML is unsupported in this environment.");{const{default:i}=await De(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!fE()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Yd).map(a=>Td(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Mv,(a,o)=>i.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),EL=L(async(r,e)=>ka(await sK(r,e),e),"renderKatexSanitized"),Kd={getRows:VY,sanitizeText:ka,sanitizeTextOrArray:ZY,hasBreaks:QY,splitBreaks:JY,lineBreakRegex:Yd,removeScript:SL,getUrl:eK,evaluate:Is,getMax:rK,getMin:iK},oK=L(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),lK=L(function(r,e,i){let n=new Map;return i?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",r),n.set("width",e)),n},"calculateSvgSizeAttrs"),NL=L(function(r,e,i,n){const a=lK(e,i,n);oK(r,a)},"configureSvgSize"),cK=L(function(r,e,i,n){const a=e.node().getBBox(),o=a.width,c=a.height;Bt.info(`SVG bounds: ${o}x${c}`,a);let h=0,u=0;Bt.info(`Graph bounds: ${h}x${u}`,r),h=o+i*2,u=c+i*2,Bt.info(`Calculated bounds: ${h}x${u}`),NL(e,u,h,n);const d=`${a.x-i} ${a.y-i} ${a.width+2*i} ${a.height+2*i}`;e.attr("viewBox",d)},"setupGraphViewbox"),tg={},hK=L((r,e,i,n)=>{let a="";return r in tg&&tg[r]?a=tg[r]({...i,svgId:n}):Bt.warn(`No theme found for ${r}`),` & {
|
|
154
|
+
font-family: ${i.fontFamily};
|
|
155
|
+
font-size: ${i.fontSize};
|
|
156
|
+
fill: ${i.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: ${i.errorBkgColor};
|
|
184
|
+
}
|
|
185
|
+
& .error-text {
|
|
186
|
+
fill: ${i.errorTextColor};
|
|
187
|
+
stroke: ${i.errorTextColor};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
& .edge-thickness-normal {
|
|
191
|
+
stroke-width: ${i.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: ${i.lineColor};
|
|
212
|
+
stroke: ${i.lineColor};
|
|
213
|
+
}
|
|
214
|
+
& .marker.cross {
|
|
215
|
+
stroke: ${i.lineColor};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
& svg {
|
|
219
|
+
font-family: ${i.fontFamily};
|
|
220
|
+
font-size: ${i.fontSize};
|
|
221
|
+
}
|
|
222
|
+
& p {
|
|
223
|
+
margin: 0
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
${a}
|
|
227
|
+
.node .neo-node {
|
|
228
|
+
stroke: ${i.nodeBorder};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
232
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
233
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
[data-look="neo"].node path {
|
|
238
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
239
|
+
stroke-width: ${i.strokeWidth??1}px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
[data-look="neo"].node .outer-path {
|
|
243
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
[data-look="neo"].node .neo-line path {
|
|
247
|
+
stroke: ${i.nodeBorder};
|
|
248
|
+
filter: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-look="neo"].node circle{
|
|
252
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
253
|
+
filter: ${i.dropShadow?i.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: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
262
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
266
|
+
stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
|
|
267
|
+
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
${e}
|
|
271
|
+
`},"getStyles"),uK=L((r,e)=>{e!==void 0&&(tg[r]=e)},"addStylesForDiagram"),dK=hK,AL={};hY(AL,{clear:()=>fK,getAccDescription:()=>yK,getAccTitle:()=>gK,getDiagramTitle:()=>xK,setAccDescription:()=>mK,setAccTitle:()=>pK,setDiagramTitle:()=>bK});var mC="",yC="",bC="",xC=L(r=>ka(r,Vr()),"sanitizeText"),fK=L(()=>{mC="",bC="",yC=""},"clear"),pK=L(r=>{mC=xC(r).replace(/^\s+/g,"")},"setAccTitle"),gK=L(()=>mC,"getAccTitle"),mK=L(r=>{bC=xC(r).replace(/\n\s+/g,`
|
|
272
|
+
`)},"setAccDescription"),yK=L(()=>bC,"getAccDescription"),bK=L(r=>{yC=xC(r)},"setDiagramTitle"),xK=L(()=>yC,"getDiagramTitle"),pE=Bt,vK=pC,ur=Vr,Qot=vL,Jot=Ch,vC=L(r=>ka(r,ur()),"sanitizeText"),CK=cK,_K=L(()=>AL,"getCommonDb"),Bg={},Lg=L((r,e,i)=>{var n;Bg[r]&&pE.warn(`Diagram with id ${r} already registered. Overwriting.`),Bg[r]=e,i&&gL(r,i),uK(r,e.styles),(n=e.injectUtils)==null||n.call(e,pE,vK,ur,vC,CK,_K(),()=>{})},"registerDiagram"),Bv=L(r=>{if(r in Bg)return Bg[r];throw new kK(r)},"getDiagram"),mh,kK=(mh=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},L(mh,"DiagramNotFoundError"),mh);const Lv=Math.PI,Ov=2*Lv,fl=1e-6,wK=Ov-fl;function ML(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function SK(r){let e=Math.floor(r);if(!(e>=0))throw new Error(`invalid digits: ${r}`);if(e>15)return ML;const i=10**e;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*i)/i+n[a]}}class TK{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?ML:SK(e)}moveTo(e,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,i){this._append`L${this._x1=+e},${this._y1=+i}`}quadraticCurveTo(e,i,n,a){this._append`Q${+e},${+i},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,i,n,a,o,c){this._append`C${+e},${+i},${+n},${+a},${this._x1=+o},${this._y1=+c}`}arcTo(e,i,n,a,o){if(e=+e,i=+i,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-i,f=c-e,g=h-i,x=f*f+g*g;if(this._x1===null)this._append`M${this._x1=e},${this._y1=i}`;else if(x>fl)if(!(Math.abs(g*u-d*f)>fl)||!o)this._append`L${this._x1=e},${this._y1=i}`;else{let y=n-c,v=a-h,C=u*u+d*d,_=y*y+v*v,k=Math.sqrt(C),T=Math.sqrt(x),N=o*Math.tan((Lv-Math.acos((C+x-_)/(2*k*T)))/2),E=N/T,B=N/k;Math.abs(E-1)>fl&&this._append`L${e+E*f},${i+E*g}`,this._append`A${o},${o},0,0,${+(g*y>f*v)},${this._x1=e+B*u},${this._y1=i+B*d}`}}arc(e,i,n,a,o,c){if(e=+e,i=+i,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=i+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%Ov+Ov),x>wK?this._append`A${n},${n},0,1,${g},${e-h},${i-u}A${n},${n},0,1,${g},${this._x1=d},${this._y1=f}`:x>fl&&this._append`A${n},${n},0,${+(x>=Lv)},${g},${this._x1=e+n*Math.cos(o)},${this._y1=i+n*Math.sin(o)}`)}rect(e,i,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function Bc(r){return function(){return r}}const tlt=Math.abs,elt=Math.atan2,rlt=Math.cos,ilt=Math.max,nlt=Math.min,alt=Math.sin,slt=Math.sqrt,gE=1e-12,CC=Math.PI,mE=CC/2,olt=2*CC;function llt(r){return r>1?0:r<-1?CC:Math.acos(r)}function clt(r){return r>=1?mE:r<=-1?-mE:Math.asin(r)}function EK(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{const n=Math.floor(i);if(!(n>=0))throw new RangeError(`invalid digits: ${i}`);e=n}return r},()=>new TK(e)}function NK(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function BL(r){this._context=r}BL.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function pd(r){return new BL(r)}function AK(r){return r[0]}function MK(r){return r[1]}function BK(r,e){var i=Bc(!0),n=null,a=pd,o=null,c=EK(h);r=typeof r=="function"?r:r===void 0?AK:Bc(r),e=typeof e=="function"?e:e===void 0?MK:Bc(e);function h(u){var d,f=(u=NK(u)).length,g,x=!1,y;for(n==null&&(o=a(y=c())),d=0;d<=f;++d)!(d<f&&i(g=u[d],d,u))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+r(g,d,u),+e(g,d,u));if(y)return o=null,y+""||null}return h.x=function(u){return arguments.length?(r=typeof u=="function"?u:Bc(+u),h):r},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:Bc(+u),h):e},h.defined=function(u){return arguments.length?(i=typeof u=="function"?u:Bc(!!u),h):i},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 LL{constructor(e,i){this._context=e,this._x=i}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,i){switch(e=+e,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,i,e,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,e,this._y0,e,i);break}}this._x0=e,this._y0=i}}function OL(r){return new LL(r,!0)}function RL(r){return new LL(r,!1)}function Fo(){}function Og(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function xm(r){this._context=r}xm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Og(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Og(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Rv(r){return new xm(r)}function jL(r){this._context=r}jL.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:Og(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function LK(r){return new jL(r)}function DL(r){this._context=r}DL.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,n):this._context.moveTo(i,n);break;case 3:this._point=4;default:Og(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function OK(r){return new DL(r)}function FL(r,e){this._basis=new xm(r),this._beta=e}FL.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0)for(var n=r[0],a=e[0],o=r[i]-n,c=e[i]-a,h=-1,u;++h<=i;)u=h/i,this._basis.point(this._beta*r[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(r,e){this._x.push(+r),this._y.push(+e)}};const RK=(function r(e){function i(n){return e===1?new xm(n):new FL(n,e)}return i.beta=function(n){return r(+n)},i})(.85);function Rg(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function _C(r,e){this._context=r,this._k=(1-e)/6}_C.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Rg(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:Rg(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const IL=(function r(e){function i(n){return new _C(n,e)}return i.tension=function(n){return r(+n)},i})(0);function kC(r,e){this._context=r,this._k=(1-e)/6}kC.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:Rg(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const jK=(function r(e){function i(n){return new kC(n,e)}return i.tension=function(n){return r(+n)},i})(0);function wC(r,e){this._context=r,this._k=(1-e)/6}wC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Rg(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const DK=(function r(e){function i(n){return new wC(n,e)}return i.tension=function(n){return r(+n)},i})(0);function SC(r,e,i){var n=r._x1,a=r._y1,o=r._x2,c=r._y2;if(r._l01_a>gE){var h=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,u=3*r._l01_a*(r._l01_a+r._l12_a);n=(n*h-r._x0*r._l12_2a+r._x2*r._l01_2a)/u,a=(a*h-r._y0*r._l12_2a+r._y2*r._l01_2a)/u}if(r._l23_a>gE){var d=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,f=3*r._l23_a*(r._l23_a+r._l12_a);o=(o*d+r._x1*r._l23_2a-e*r._l12_2a)/f,c=(c*d+r._y1*r._l23_2a-i*r._l12_2a)/f}r._context.bezierCurveTo(n,a,o,c,r._x2,r._y2)}function $L(r,e){this._context=r,this._alpha=e}$L.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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:SC(this,r,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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zL=(function r(e){function i(n){return e?new $L(n,e):new _C(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function PL(r,e){this._context=r,this._alpha=e}PL.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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:SC(this,r,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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FK=(function r(e){function i(n){return e?new PL(n,e):new kC(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function qL(r,e){this._context=r,this._alpha=e}qL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+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:SC(this,r,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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const IK=(function r(e){function i(n){return e?new qL(n,e):new wC(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function UL(r){this._context=r}UL.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(r,e){r=+r,e=+e,this._point?this._context.lineTo(r,e):(this._point=1,this._context.moveTo(r,e))}};function $K(r){return new UL(r)}function yE(r){return r<0?-1:1}function bE(r,e,i){var n=r._x1-r._x0,a=e-r._x1,o=(r._y1-r._y0)/(n||a<0&&-0),c=(i-r._y1)/(a||n<0&&-0),h=(o*a+c*n)/(n+a);return(yE(o)+yE(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function xE(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function f0(r,e,i){var n=r._x0,a=r._y0,o=r._x1,c=r._y1,h=(o-n)/3;r._context.bezierCurveTo(n+h,a+h*e,o-h,c-h*i,o,c)}function jg(r){this._context=r}jg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:f0(this,this._t0,xE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,!(r===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,f0(this,xE(this,i=bE(this,r,e)),i);break;default:f0(this,this._t0,i=bE(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}}};function HL(r){this._context=new WL(r)}(HL.prototype=Object.create(jg.prototype)).point=function(r,e){jg.prototype.point.call(this,e,r)};function WL(r){this._context=r}WL.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,n,a,o){this._context.bezierCurveTo(e,r,n,i,o,a)}};function GL(r){return new jg(r)}function YL(r){return new HL(r)}function KL(r){this._context=r}KL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else for(var n=vE(r),a=vE(e),o=0,c=1;c<i;++o,++c)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],r[c],e[c]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function vE(r){var e,i=r.length-1,n,a=new Array(i),o=new Array(i),c=new Array(i);for(a[0]=0,o[0]=2,c[0]=r[0]+2*r[1],e=1;e<i-1;++e)a[e]=1,o[e]=4,c[e]=4*r[e]+2*r[e+1];for(a[i-1]=2,o[i-1]=7,c[i-1]=8*r[i-1]+r[i],e=1;e<i;++e)n=a[e]/o[e-1],o[e]-=n,c[e]-=n*c[e-1];for(a[i-1]=c[i-1]/o[i-1],e=i-2;e>=0;--e)a[e]=(c[e]-a[e+1])/o[e];for(o[i-1]=(r[i]+a[i-1])/2,e=0;e<i-1;++e)o[e]=2*r[e+1]-a[e+1];return[a,o]}function VL(r){return new KL(r)}function vm(r,e){this._context=r,this._t=e}vm.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function XL(r){return new vm(r,.5)}function ZL(r){return new vm(r,0)}function QL(r){return new vm(r,1)}var zK=L(r=>{var a;const{securityLevel:e}=ur();let i=_e("body");if(e==="sandbox"){const c=((a=_e(`#i${r}`).node())==null?void 0:a.contentDocument)??document;i=_e(c.body)}return i.select(`#${r}`)},"selectSvgElement");function TC(r){return typeof r>"u"||r===null}L(TC,"isNothing");function JL(r){return typeof r=="object"&&r!==null}L(JL,"isObject");function tO(r){return Array.isArray(r)?r:TC(r)?[]:[r]}L(tO,"toArray");function eO(r,e){var i,n,a,o;if(e)for(o=Object.keys(e),i=0,n=o.length;i<n;i+=1)a=o[i],r[a]=e[a];return r}L(eO,"extend");function rO(r,e){var i="",n;for(n=0;n<e;n+=1)i+=r;return i}L(rO,"repeat");function iO(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}L(iO,"isNegativeZero");var PK=TC,qK=JL,UK=tO,HK=rO,WK=iO,GK=eO,_i={isNothing:PK,isObject:qK,toArray:UK,repeat:HK,isNegativeZero:WK,extend:GK};function EC(r,e){var i="",n=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!e&&r.mark.snippet&&(i+=`
|
|
273
|
+
|
|
274
|
+
`+r.mark.snippet),n+" "+i):n}L(EC,"formatError");function _h(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=EC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}L(_h,"YAMLException$1");_h.prototype=Object.create(Error.prototype);_h.prototype.constructor=_h;_h.prototype.toString=L(function(e){return this.name+": "+EC(this,e)},"toString");var vn=_h;function eg(r,e,i,n,a){var o="",c="",h=Math.floor(a/2)-1;return n-e>h&&(o=" ... ",e=n-h+o.length),i-n>h&&(c=" ...",i=n+h-c.length),{str:o+r.slice(e,i).replace(/\t/g,"→")+c,pos:n-e+o.length}}L(eg,"getLine");function rg(r,e){return _i.repeat(" ",e-r.length)+r}L(rg,"padStart");function nO(r,e){if(e=Object.create(e||null),!r.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 i=/\r?\n|\r|\0/g,n=[0],a=[],o,c=-1;o=i.exec(r.buffer);)a.push(o.index),n.push(o.index+o[0].length),r.position<=o.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var h="",u,d,f=Math.min(r.line+e.linesAfter,a.length).toString().length,g=e.maxLength-(e.indent+f+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)d=eg(r.buffer,n[c-u],a[c-u],r.position-(n[c]-n[c-u]),g),h=_i.repeat(" ",e.indent)+rg((r.line-u+1).toString(),f)+" | "+d.str+`
|
|
275
|
+
`+h;for(d=eg(r.buffer,n[c],a[c],r.position,g),h+=_i.repeat(" ",e.indent)+rg((r.line+1).toString(),f)+" | "+d.str+`
|
|
276
|
+
`,h+=_i.repeat("-",e.indent+f+3+d.pos)+`^
|
|
277
|
+
`,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)d=eg(r.buffer,n[c+u],a[c+u],r.position-(n[c]-n[c+u]),g),h+=_i.repeat(" ",e.indent)+rg((r.line+u+1).toString(),f)+" | "+d.str+`
|
|
278
|
+
`;return h.replace(/\n$/,"")}L(nO,"makeSnippet");var YK=nO,KK=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],VK=["scalar","sequence","mapping"];function aO(r){var e={};return r!==null&&Object.keys(r).forEach(function(i){r[i].forEach(function(n){e[String(n)]=i})}),e}L(aO,"compileStyleAliases");function sO(r,e){if(e=e||{},Object.keys(e).forEach(function(i){if(KK.indexOf(i)===-1)throw new vn('Unknown option "'+i+'" is met in definition of "'+r+'" YAML type.')}),this.options=e,this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(i){return i},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=aO(e.styleAliases||null),VK.indexOf(this.kind)===-1)throw new vn('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}L(sO,"Type$1");var Wi=sO;function jv(r,e){var i=[];return r[e].forEach(function(n){var a=i.length;i.forEach(function(o,c){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=c)}),i[a]=n}),i}L(jv,"compileList");function oO(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function n(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(L(n,"collectType"),e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(n);return r}L(oO,"compileMap");function Dg(r){return this.extend(r)}L(Dg,"Schema$1");Dg.prototype.extend=L(function(e){var i=[],n=[];if(e instanceof Wi)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&&(i=i.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new vn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(o){if(!(o instanceof Wi))throw new vn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new vn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new vn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof Wi))throw new vn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Dg.prototype);return a.implicit=(this.implicit||[]).concat(i),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=jv(a,"implicit"),a.compiledExplicit=jv(a,"explicit"),a.compiledTypeMap=oO(a.compiledImplicit,a.compiledExplicit),a},"extend");var XK=Dg,ZK=new Wi("tag:yaml.org,2002:str",{kind:"scalar",construct:L(function(r){return r!==null?r:""},"construct")}),QK=new Wi("tag:yaml.org,2002:seq",{kind:"sequence",construct:L(function(r){return r!==null?r:[]},"construct")}),JK=new Wi("tag:yaml.org,2002:map",{kind:"mapping",construct:L(function(r){return r!==null?r:{}},"construct")}),tV=new XK({explicit:[ZK,QK,JK]});function lO(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}L(lO,"resolveYamlNull");function cO(){return null}L(cO,"constructYamlNull");function hO(r){return r===null}L(hO,"isNull");var eV=new Wi("tag:yaml.org,2002:null",{kind:"scalar",resolve:lO,construct:cO,predicate:hO,represent:{canonical:L(function(){return"~"},"canonical"),lowercase:L(function(){return"null"},"lowercase"),uppercase:L(function(){return"NULL"},"uppercase"),camelcase:L(function(){return"Null"},"camelcase"),empty:L(function(){return""},"empty")},defaultStyle:"lowercase"});function uO(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}L(uO,"resolveYamlBoolean");function dO(r){return r==="true"||r==="True"||r==="TRUE"}L(dO,"constructYamlBoolean");function fO(r){return Object.prototype.toString.call(r)==="[object Boolean]"}L(fO,"isBoolean");var rV=new Wi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:uO,construct:dO,predicate:fO,represent:{lowercase:L(function(r){return r?"true":"false"},"lowercase"),uppercase:L(function(r){return r?"TRUE":"FALSE"},"uppercase"),camelcase:L(function(r){return r?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function pO(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}L(pO,"isHexCode");function gO(r){return 48<=r&&r<=55}L(gO,"isOctCode");function mO(r){return 48<=r&&r<=57}L(mO,"isDecCode");function yO(r){if(r===null)return!1;var e=r.length,i=0,n=!1,a;if(!e)return!1;if(a=r[i],(a==="-"||a==="+")&&(a=r[++i]),a==="0"){if(i+1===e)return!0;if(a=r[++i],a==="b"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(!pO(r.charCodeAt(i)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(!gO(r.charCodeAt(i)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;i<e;i++)if(a=r[i],a!=="_"){if(!mO(r.charCodeAt(i)))return!1;n=!0}return!(!n||a==="_")}L(yO,"resolveYamlInteger");function bO(r){var e=r,i=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(i=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}L(bO,"constructYamlInteger");function xO(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!_i.isNegativeZero(r)}L(xO,"isInteger");var iV=new Wi("tag:yaml.org,2002:int",{kind:"scalar",resolve:yO,construct:bO,predicate:xO,represent:{binary:L(function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},"binary"),octal:L(function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},"octal"),decimal:L(function(r){return r.toString(10)},"decimal"),hexadecimal:L(function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),nV=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vO(r){return!(r===null||!nV.test(r)||r[r.length-1]==="_")}L(vO,"resolveYamlFloat");function CO(r){var e,i;return e=r.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}L(CO,"constructYamlFloat");var aV=/^[-+]?[0-9]+e/;function _O(r,e){var i;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_i.isNegativeZero(r))return"-0.0";return i=r.toString(10),aV.test(i)?i.replace("e",".e"):i}L(_O,"representYamlFloat");function kO(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||_i.isNegativeZero(r))}L(kO,"isFloat");var sV=new Wi("tag:yaml.org,2002:float",{kind:"scalar",resolve:vO,construct:CO,predicate:kO,represent:_O,defaultStyle:"lowercase"}),wO=tV.extend({implicit:[eV,rV,iV,sV]}),oV=wO,SO=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),TO=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 EO(r){return r===null?!1:SO.exec(r)!==null||TO.exec(r)!==null}L(EO,"resolveYamlTimestamp");function NO(r){var e,i,n,a,o,c,h,u=0,d=null,f,g,x;if(e=SO.exec(r),e===null&&(e=TO.exec(r)),e===null)throw new Error("Date resolve error");if(i=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(i,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(i,n,a,o,c,h,u)),d&&x.setTime(x.getTime()-d),x}L(NO,"constructYamlTimestamp");function AO(r){return r.toISOString()}L(AO,"representYamlTimestamp");var lV=new Wi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:EO,construct:NO,instanceOf:Date,represent:AO});function MO(r){return r==="<<"||r===null}L(MO,"resolveYamlMerge");var cV=new Wi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:MO}),NC=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
279
|
+
\r`;function BO(r){if(r===null)return!1;var e,i,n=0,a=r.length,o=NC;for(i=0;i<a;i++)if(e=o.indexOf(r.charAt(i)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}L(BO,"resolveYamlBinary");function LO(r){var e,i,n=r.replace(/[\r\n=]/g,""),a=n.length,o=NC,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 i=a%4*6,i===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):i===18?(h.push(c>>10&255),h.push(c>>2&255)):i===12&&h.push(c>>4&255),new Uint8Array(h)}L(LO,"constructYamlBinary");function OO(r){var e="",i=0,n,a,o=r.length,c=NC;for(n=0;n<o;n++)n%3===0&&n&&(e+=c[i>>18&63],e+=c[i>>12&63],e+=c[i>>6&63],e+=c[i&63]),i=(i<<8)+r[n];return a=o%3,a===0?(e+=c[i>>18&63],e+=c[i>>12&63],e+=c[i>>6&63],e+=c[i&63]):a===2?(e+=c[i>>10&63],e+=c[i>>4&63],e+=c[i<<2&63],e+=c[64]):a===1&&(e+=c[i>>2&63],e+=c[i<<4&63],e+=c[64],e+=c[64]),e}L(OO,"representYamlBinary");function RO(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}L(RO,"isBinary");var hV=new Wi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:BO,construct:LO,predicate:RO,represent:OO}),uV=Object.prototype.hasOwnProperty,dV=Object.prototype.toString;function jO(r){if(r===null)return!0;var e=[],i,n,a,o,c,h=r;for(i=0,n=h.length;i<n;i+=1){if(a=h[i],c=!1,dV.call(a)!=="[object Object]")return!1;for(o in a)if(uV.call(a,o))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}L(jO,"resolveYamlOmap");function DO(r){return r!==null?r:[]}L(DO,"constructYamlOmap");var fV=new Wi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:jO,construct:DO}),pV=Object.prototype.toString;function FO(r){if(r===null)return!0;var e,i,n,a,o,c=r;for(o=new Array(c.length),e=0,i=c.length;e<i;e+=1){if(n=c[e],pV.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}L(FO,"resolveYamlPairs");function IO(r){if(r===null)return[];var e,i,n,a,o,c=r;for(o=new Array(c.length),e=0,i=c.length;e<i;e+=1)n=c[e],a=Object.keys(n),o[e]=[a[0],n[a[0]]];return o}L(IO,"constructYamlPairs");var gV=new Wi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:FO,construct:IO}),mV=Object.prototype.hasOwnProperty;function $O(r){if(r===null)return!0;var e,i=r;for(e in i)if(mV.call(i,e)&&i[e]!==null)return!1;return!0}L($O,"resolveYamlSet");function zO(r){return r!==null?r:{}}L(zO,"constructYamlSet");var yV=new Wi("tag:yaml.org,2002:set",{kind:"mapping",resolve:$O,construct:zO}),PO=oV.extend({implicit:[lV,cV],explicit:[hV,fV,gV,yV]}),Io=Object.prototype.hasOwnProperty,Fg=1,qO=2,UO=3,Ig=4,p0=1,bV=2,CE=3,xV=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,vV=/[\x85\u2028\u2029]/,CV=/[,\[\]\{\}]/,HO=/^(?:!|!!|![a-z\-]+!)$/i,WO=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Dv(r){return Object.prototype.toString.call(r)}L(Dv,"_class");function va(r){return r===10||r===13}L(va,"is_EOL");function Ro(r){return r===9||r===32}L(Ro,"is_WHITE_SPACE");function en(r){return r===9||r===32||r===10||r===13}L(en,"is_WS_OR_EOL");function xl(r){return r===44||r===91||r===93||r===123||r===125}L(xl,"is_FLOW_INDICATOR");function GO(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}L(GO,"fromHexCode");function YO(r){return r===120?2:r===117?4:r===85?8:0}L(YO,"escapedHexLen");function KO(r){return 48<=r&&r<=57?r-48:-1}L(KO,"fromDecimalCode");function Fv(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
|
|
280
|
+
`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"
":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}L(Fv,"simpleEscapeSequence");function VO(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}L(VO,"charFromCodepoint");function AC(r,e,i){e==="__proto__"?Object.defineProperty(r,e,{configurable:!0,enumerable:!0,writable:!0,value:i}):r[e]=i}L(AC,"setProperty");var XO=new Array(256),ZO=new Array(256);for(cl=0;cl<256;cl++)XO[cl]=Fv(cl)?1:0,ZO[cl]=Fv(cl);var cl;function QO(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||PO,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=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}L(QO,"State$1");function MC(r,e){var i={name:r.filename,buffer:r.input.slice(0,-1),position:r.position,line:r.line,column:r.position-r.lineStart};return i.snippet=YK(i),new vn(e,i)}L(MC,"generateError");function de(r,e){throw MC(r,e)}L(de,"throwError");function Ed(r,e){r.onWarning&&r.onWarning.call(null,MC(r,e))}L(Ed,"throwWarning");var _E={YAML:L(function(e,i,n){var a,o,c;e.version!==null&&de(e,"duplication of %YAML directive"),n.length!==1&&de(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&de(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&de(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Ed(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:L(function(e,i,n){var a,o;n.length!==2&&de(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],HO.test(a)||de(e,"ill-formed tag handle (first argument) of the TAG directive"),Io.call(e.tagMap,a)&&de(e,'there is a previously declared suffix for "'+a+'" tag handle'),WO.test(o)||de(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{de(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function Os(r,e,i,n){var a,o,c,h;if(e<i){if(h=r.input.slice(e,i),n)for(a=0,o=h.length;a<o;a+=1)c=h.charCodeAt(a),c===9||32<=c&&c<=1114111||de(r,"expected valid JSON character");else xV.test(h)&&de(r,"the stream contains non-printable characters");r.result+=h}}L(Os,"captureSegment");function Iv(r,e,i,n){var a,o,c,h;for(_i.isObject(i)||de(r,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(i),c=0,h=a.length;c<h;c+=1)o=a[c],Io.call(e,o)||(AC(e,o,i[o]),n[o]=!0)}L(Iv,"mergeMappings");function vl(r,e,i,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])&&de(r,"nested arrays are not supported inside keys"),typeof a=="object"&&Dv(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Dv(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)Iv(r,e,o[d],i);else Iv(r,e,o,i);else!r.json&&!Io.call(i,a)&&Io.call(e,a)&&(r.line=c||r.line,r.lineStart=h||r.lineStart,r.position=u||r.position,de(r,"duplicated mapping key")),AC(e,a,o),delete i[a];return e}L(vl,"storeMappingPair");function Cm(r){var e;e=r.input.charCodeAt(r.position),e===10?r.position++:e===13?(r.position++,r.input.charCodeAt(r.position)===10&&r.position++):de(r,"a line break is expected"),r.line+=1,r.lineStart=r.position,r.firstTabInLine=-1}L(Cm,"readLineBreak");function oi(r,e,i){for(var n=0,a=r.input.charCodeAt(r.position);a!==0;){for(;Ro(a);)a===9&&r.firstTabInLine===-1&&(r.firstTabInLine=r.position),a=r.input.charCodeAt(++r.position);if(e&&a===35)do a=r.input.charCodeAt(++r.position);while(a!==10&&a!==13&&a!==0);if(va(a))for(Cm(r),a=r.input.charCodeAt(r.position),n++,r.lineIndent=0;a===32;)r.lineIndent++,a=r.input.charCodeAt(++r.position);else break}return i!==-1&&n!==0&&r.lineIndent<i&&Ed(r,"deficient indentation"),n}L(oi,"skipSeparationSpace");function Vd(r){var e=r.position,i;return i=r.input.charCodeAt(e),!!((i===45||i===46)&&i===r.input.charCodeAt(e+1)&&i===r.input.charCodeAt(e+2)&&(e+=3,i=r.input.charCodeAt(e),i===0||en(i)))}L(Vd,"testDocumentSeparator");function _m(r,e){e===1?r.result+=" ":e>1&&(r.result+=_i.repeat(`
|
|
281
|
+
`,e-1))}L(_m,"writeFoldedLines");function JO(r,e,i){var n,a,o,c,h,u,d,f,g=r.kind,x=r.result,y;if(y=r.input.charCodeAt(r.position),en(y)||xl(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(a=r.input.charCodeAt(r.position+1),en(a)||i&&xl(a)))return!1;for(r.kind="scalar",r.result="",o=c=r.position,h=!1;y!==0;){if(y===58){if(a=r.input.charCodeAt(r.position+1),en(a)||i&&xl(a))break}else if(y===35){if(n=r.input.charCodeAt(r.position-1),en(n))break}else{if(r.position===r.lineStart&&Vd(r)||i&&xl(y))break;if(va(y))if(u=r.line,d=r.lineStart,f=r.lineIndent,oi(r,!1,-1),r.lineIndent>=e){h=!0,y=r.input.charCodeAt(r.position);continue}else{r.position=c,r.line=u,r.lineStart=d,r.lineIndent=f;break}}h&&(Os(r,o,c,!1),_m(r,r.line-u),o=c=r.position,h=!1),Ro(y)||(c=r.position+1),y=r.input.charCodeAt(++r.position)}return Os(r,o,c,!1),r.result?!0:(r.kind=g,r.result=x,!1)}L(JO,"readPlainScalar");function tR(r,e){var i,n,a;if(i=r.input.charCodeAt(r.position),i!==39)return!1;for(r.kind="scalar",r.result="",r.position++,n=a=r.position;(i=r.input.charCodeAt(r.position))!==0;)if(i===39)if(Os(r,n,r.position,!0),i=r.input.charCodeAt(++r.position),i===39)n=r.position,r.position++,a=r.position;else return!0;else va(i)?(Os(r,n,a,!0),_m(r,oi(r,!1,e)),n=a=r.position):r.position===r.lineStart&&Vd(r)?de(r,"unexpected end of the document within a single quoted scalar"):(r.position++,a=r.position);de(r,"unexpected end of the stream within a single quoted scalar")}L(tR,"readSingleQuotedScalar");function eR(r,e){var i,n,a,o,c,h;if(h=r.input.charCodeAt(r.position),h!==34)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(h=r.input.charCodeAt(r.position))!==0;){if(h===34)return Os(r,i,r.position,!0),r.position++,!0;if(h===92){if(Os(r,i,r.position,!0),h=r.input.charCodeAt(++r.position),va(h))oi(r,!1,e);else if(h<256&&XO[h])r.result+=ZO[h],r.position++;else if((c=YO(h))>0){for(a=c,o=0;a>0;a--)h=r.input.charCodeAt(++r.position),(c=GO(h))>=0?o=(o<<4)+c:de(r,"expected hexadecimal character");r.result+=VO(o),r.position++}else de(r,"unknown escape sequence");i=n=r.position}else va(h)?(Os(r,i,n,!0),_m(r,oi(r,!1,e)),i=n=r.position):r.position===r.lineStart&&Vd(r)?de(r,"unexpected end of the document within a double quoted scalar"):(r.position++,n=r.position)}de(r,"unexpected end of the stream within a double quoted scalar")}L(eR,"readDoubleQuotedScalar");function rR(r,e){var i=!0,n,a,o,c=r.tag,h,u=r.anchor,d,f,g,x,y,v=Object.create(null),C,_,k,T;if(T=r.input.charCodeAt(r.position),T===91)f=93,y=!1,h=[];else if(T===123)f=125,y=!0,h={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=h),T=r.input.charCodeAt(++r.position);T!==0;){if(oi(r,!0,e),T=r.input.charCodeAt(r.position),T===f)return r.position++,r.tag=c,r.anchor=u,r.kind=y?"mapping":"sequence",r.result=h,!0;i?T===44&&de(r,"expected the node content, but found ','"):de(r,"missed comma between flow collection entries"),_=C=k=null,g=x=!1,T===63&&(d=r.input.charCodeAt(r.position+1),en(d)&&(g=x=!0,r.position++,oi(r,!0,e))),n=r.line,a=r.lineStart,o=r.position,zl(r,e,Fg,!1,!0),_=r.tag,C=r.result,oi(r,!0,e),T=r.input.charCodeAt(r.position),(x||r.line===n)&&T===58&&(g=!0,T=r.input.charCodeAt(++r.position),oi(r,!0,e),zl(r,e,Fg,!1,!0),k=r.result),y?vl(r,h,v,_,C,k,n,a,o):g?h.push(vl(r,null,v,_,C,k,n,a,o)):h.push(C),oi(r,!0,e),T=r.input.charCodeAt(r.position),T===44?(i=!0,T=r.input.charCodeAt(++r.position)):i=!1}de(r,"unexpected end of the stream within a flow collection")}L(rR,"readFlowCollection");function iR(r,e){var i,n,a=p0,o=!1,c=!1,h=e,u=0,d=!1,f,g;if(g=r.input.charCodeAt(r.position),g===124)n=!1;else if(g===62)n=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)p0===a?a=g===43?CE:bV:de(r,"repeat of a chomping mode identifier");else if((f=KO(g))>=0)f===0?de(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?de(r,"repeat of an indentation width identifier"):(h=e+f-1,c=!0);else break;if(Ro(g)){do g=r.input.charCodeAt(++r.position);while(Ro(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!va(g)&&g!==0)}for(;g!==0;){for(Cm(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!c||r.lineIndent<h)&&g===32;)r.lineIndent++,g=r.input.charCodeAt(++r.position);if(!c&&r.lineIndent>h&&(h=r.lineIndent),va(g)){u++;continue}if(r.lineIndent<h){a===CE?r.result+=_i.repeat(`
|
|
282
|
+
`,o?1+u:u):a===p0&&o&&(r.result+=`
|
|
283
|
+
`);break}for(n?Ro(g)?(d=!0,r.result+=_i.repeat(`
|
|
284
|
+
`,o?1+u:u)):d?(d=!1,r.result+=_i.repeat(`
|
|
285
|
+
`,u+1)):u===0?o&&(r.result+=" "):r.result+=_i.repeat(`
|
|
286
|
+
`,u):r.result+=_i.repeat(`
|
|
287
|
+
`,o?1+u:u),o=!0,c=!0,u=0,i=r.position;!va(g)&&g!==0;)g=r.input.charCodeAt(++r.position);Os(r,i,r.position,!1)}return!0}L(iR,"readBlockScalar");function $v(r,e){var i,n=r.tag,a=r.anchor,o=[],c,h=!1,u;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=o),u=r.input.charCodeAt(r.position);u!==0&&(r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,de(r,"tab characters must not be used in indentation")),!(u!==45||(c=r.input.charCodeAt(r.position+1),!en(c))));){if(h=!0,r.position++,oi(r,!0,-1)&&r.lineIndent<=e){o.push(null),u=r.input.charCodeAt(r.position);continue}if(i=r.line,zl(r,e,UO,!1,!0),o.push(r.result),oi(r,!0,-1),u=r.input.charCodeAt(r.position),(r.line===i||r.lineIndent>e)&&u!==0)de(r,"bad indentation of a sequence entry");else if(r.lineIndent<e)break}return h?(r.tag=n,r.anchor=a,r.kind="sequence",r.result=o,!0):!1}L($v,"readBlockSequence");function nR(r,e,i){var n,a,o,c,h,u,d=r.tag,f=r.anchor,g={},x=Object.create(null),y=null,v=null,C=null,_=!1,k=!1,T;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=g),T=r.input.charCodeAt(r.position);T!==0;){if(!_&&r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,de(r,"tab characters must not be used in indentation")),n=r.input.charCodeAt(r.position+1),o=r.line,(T===63||T===58)&&en(n))T===63?(_&&(vl(r,g,x,y,v,null,c,h,u),y=v=C=null),k=!0,_=!0,a=!0):_?(_=!1,a=!0):de(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),r.position+=1,T=n;else{if(c=r.line,h=r.lineStart,u=r.position,!zl(r,i,qO,!1,!0))break;if(r.line===o){for(T=r.input.charCodeAt(r.position);Ro(T);)T=r.input.charCodeAt(++r.position);if(T===58)T=r.input.charCodeAt(++r.position),en(T)||de(r,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(vl(r,g,x,y,v,null,c,h,u),y=v=C=null),k=!0,_=!1,a=!1,y=r.tag,v=r.result;else if(k)de(r,"can not read an implicit mapping pair; a colon is missed");else return r.tag=d,r.anchor=f,!0}else if(k)de(r,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.tag=d,r.anchor=f,!0}if((r.line===o||r.lineIndent>e)&&(_&&(c=r.line,h=r.lineStart,u=r.position),zl(r,e,Ig,!0,a)&&(_?v=r.result:C=r.result),_||(vl(r,g,x,y,v,C,c,h,u),y=v=C=null),oi(r,!0,-1),T=r.input.charCodeAt(r.position)),(r.line===o||r.lineIndent>e)&&T!==0)de(r,"bad indentation of a mapping entry");else if(r.lineIndent<e)break}return _&&vl(r,g,x,y,v,null,c,h,u),k&&(r.tag=d,r.anchor=f,r.kind="mapping",r.result=g),k}L(nR,"readBlockMapping");function aR(r){var e,i=!1,n=!1,a,o,c;if(c=r.input.charCodeAt(r.position),c!==33)return!1;if(r.tag!==null&&de(r,"duplication of a tag property"),c=r.input.charCodeAt(++r.position),c===60?(i=!0,c=r.input.charCodeAt(++r.position)):c===33?(n=!0,a="!!",c=r.input.charCodeAt(++r.position)):a="!",e=r.position,i){do c=r.input.charCodeAt(++r.position);while(c!==0&&c!==62);r.position<r.length?(o=r.input.slice(e,r.position),c=r.input.charCodeAt(++r.position)):de(r,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!en(c);)c===33&&(n?de(r,"tag suffix cannot contain exclamation marks"):(a=r.input.slice(e-1,r.position+1),HO.test(a)||de(r,"named tag handle cannot contain such characters"),n=!0,e=r.position+1)),c=r.input.charCodeAt(++r.position);o=r.input.slice(e,r.position),CV.test(o)&&de(r,"tag suffix cannot contain flow indicator characters")}o&&!WO.test(o)&&de(r,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{de(r,"tag name is malformed: "+o)}return i?r.tag=o:Io.call(r.tagMap,a)?r.tag=r.tagMap[a]+o:a==="!"?r.tag="!"+o:a==="!!"?r.tag="tag:yaml.org,2002:"+o:de(r,'undeclared tag handle "'+a+'"'),!0}L(aR,"readTagProperty");function sR(r){var e,i;if(i=r.input.charCodeAt(r.position),i!==38)return!1;for(r.anchor!==null&&de(r,"duplication of an anchor property"),i=r.input.charCodeAt(++r.position),e=r.position;i!==0&&!en(i)&&!xl(i);)i=r.input.charCodeAt(++r.position);return r.position===e&&de(r,"name of an anchor node must contain at least one character"),r.anchor=r.input.slice(e,r.position),!0}L(sR,"readAnchorProperty");function oR(r){var e,i,n;if(n=r.input.charCodeAt(r.position),n!==42)return!1;for(n=r.input.charCodeAt(++r.position),e=r.position;n!==0&&!en(n)&&!xl(n);)n=r.input.charCodeAt(++r.position);return r.position===e&&de(r,"name of an alias node must contain at least one character"),i=r.input.slice(e,r.position),Io.call(r.anchorMap,i)||de(r,'unidentified alias "'+i+'"'),r.result=r.anchorMap[i],oi(r,!0,-1),!0}L(oR,"readAlias");function zl(r,e,i,n,a){var o,c,h,u=1,d=!1,f=!1,g,x,y,v,C,_;if(r.listener!==null&&r.listener("open",r),r.tag=null,r.anchor=null,r.kind=null,r.result=null,o=c=h=Ig===i||UO===i,n&&oi(r,!0,-1)&&(d=!0,r.lineIndent>e?u=1:r.lineIndent===e?u=0:r.lineIndent<e&&(u=-1)),u===1)for(;aR(r)||sR(r);)oi(r,!0,-1)?(d=!0,h=o,r.lineIndent>e?u=1:r.lineIndent===e?u=0:r.lineIndent<e&&(u=-1)):h=!1;if(h&&(h=d||a),(u===1||Ig===i)&&(Fg===i||qO===i?C=e:C=e+1,_=r.position-r.lineStart,u===1?h&&($v(r,_)||nR(r,_,C))||rR(r,C)?f=!0:(c&&iR(r,C)||tR(r,C)||eR(r,C)?f=!0:oR(r)?(f=!0,(r.tag!==null||r.anchor!==null)&&de(r,"alias node should not have any properties")):JO(r,C,Fg===i)&&(f=!0,r.tag===null&&(r.tag="?")),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):u===0&&(f=h&&$v(r,_))),r.tag===null)r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);else if(r.tag==="?"){for(r.result!==null&&r.kind!=="scalar"&&de(r,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+r.kind+'"'),g=0,x=r.implicitTypes.length;g<x;g+=1)if(v=r.implicitTypes[g],v.resolve(r.result)){r.result=v.construct(r.result),r.tag=v.tag,r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);break}}else if(r.tag!=="!"){if(Io.call(r.typeMap[r.kind||"fallback"],r.tag))v=r.typeMap[r.kind||"fallback"][r.tag];else for(v=null,y=r.typeMap.multi[r.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(r.tag.slice(0,y[g].tag.length)===y[g].tag){v=y[g];break}v||de(r,"unknown tag !<"+r.tag+">"),r.result!==null&&v.kind!==r.kind&&de(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+v.kind+'", not "'+r.kind+'"'),v.resolve(r.result,r.tag)?(r.result=v.construct(r.result,r.tag),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):de(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||f}L(zl,"composeNode");function lR(r){var e=r.position,i,n,a,o=!1,c;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap=Object.create(null),r.anchorMap=Object.create(null);(c=r.input.charCodeAt(r.position))!==0&&(oi(r,!0,-1),c=r.input.charCodeAt(r.position),!(r.lineIndent>0||c!==37));){for(o=!0,c=r.input.charCodeAt(++r.position),i=r.position;c!==0&&!en(c);)c=r.input.charCodeAt(++r.position);for(n=r.input.slice(i,r.position),a=[],n.length<1&&de(r,"directive name must not be less than one character in length");c!==0;){for(;Ro(c);)c=r.input.charCodeAt(++r.position);if(c===35){do c=r.input.charCodeAt(++r.position);while(c!==0&&!va(c));break}if(va(c))break;for(i=r.position;c!==0&&!en(c);)c=r.input.charCodeAt(++r.position);a.push(r.input.slice(i,r.position))}c!==0&&Cm(r),Io.call(_E,n)?_E[n](r,n,a):Ed(r,'unknown document directive "'+n+'"')}if(oi(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,oi(r,!0,-1)):o&&de(r,"directives end mark is expected"),zl(r,r.lineIndent-1,Ig,!1,!0),oi(r,!0,-1),r.checkLineBreaks&&vV.test(r.input.slice(e,r.position))&&Ed(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&Vd(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,oi(r,!0,-1));return}if(r.position<r.length-1)de(r,"end of the stream or a document separator is expected");else return}L(lR,"readDocument");function BC(r,e){r=String(r),e=e||{},r.length!==0&&(r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
|
|
288
|
+
`),r.charCodeAt(0)===65279&&(r=r.slice(1)));var i=new QO(r,e),n=r.indexOf("\0");for(n!==-1&&(i.position=n,de(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)lR(i);return i.documents}L(BC,"loadDocuments");function _V(r,e,i){e!==null&&typeof e=="object"&&typeof i>"u"&&(i=e,e=null);var n=BC(r,i);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}L(_V,"loadAll$1");function cR(r,e){var i=BC(r,e);if(i.length!==0){if(i.length===1)return i[0];throw new vn("expected a single document in the stream, but found more")}}L(cR,"load$1");var kV=cR,wV={load:kV},hR=Object.prototype.toString,uR=Object.prototype.hasOwnProperty,LC=65279,SV=9,Nd=10,TV=13,EV=32,NV=33,AV=34,zv=35,MV=37,BV=38,LV=39,OV=42,dR=44,RV=45,$g=58,jV=61,DV=62,FV=63,IV=64,fR=91,pR=93,$V=96,gR=123,zV=124,mR=125,Gi={};Gi[0]="\\0";Gi[7]="\\a";Gi[8]="\\b";Gi[9]="\\t";Gi[10]="\\n";Gi[11]="\\v";Gi[12]="\\f";Gi[13]="\\r";Gi[27]="\\e";Gi[34]='\\"';Gi[92]="\\\\";Gi[133]="\\N";Gi[160]="\\_";Gi[8232]="\\L";Gi[8233]="\\P";var PV=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],qV=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function yR(r,e){var i,n,a,o,c,h,u;if(e===null)return{};for(i={},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=r.compiledTypeMap.fallback[c],u&&uR.call(u.styleAliases,h)&&(h=u.styleAliases[h]),i[c]=h;return i}L(yR,"compileStyleMap");function bR(r){var e,i,n;if(e=r.toString(16).toUpperCase(),r<=255)i="x",n=2;else if(r<=65535)i="u",n=4;else if(r<=4294967295)i="U",n=8;else throw new vn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+_i.repeat("0",n-e.length)+e}L(bR,"encodeHex");var UV=1,Ad=2;function xR(r){this.schema=r.schema||PO,this.indent=Math.max(1,r.indent||2),this.noArrayIndent=r.noArrayIndent||!1,this.skipInvalid=r.skipInvalid||!1,this.flowLevel=_i.isNothing(r.flowLevel)?-1:r.flowLevel,this.styleMap=yR(this.schema,r.styles||null),this.sortKeys=r.sortKeys||!1,this.lineWidth=r.lineWidth||80,this.noRefs=r.noRefs||!1,this.noCompatMode=r.noCompatMode||!1,this.condenseFlow=r.condenseFlow||!1,this.quotingType=r.quotingType==='"'?Ad:UV,this.forceQuotes=r.forceQuotes||!1,this.replacer=typeof r.replacer=="function"?r.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}L(xR,"State");function Pv(r,e){for(var i=_i.repeat(" ",e),n=0,a=-1,o="",c,h=r.length;n<h;)a=r.indexOf(`
|
|
289
|
+
`,n),a===-1?(c=r.slice(n),n=h):(c=r.slice(n,a+1),n=a+1),c.length&&c!==`
|
|
290
|
+
`&&(o+=i),o+=c;return o}L(Pv,"indentString");function zg(r,e){return`
|
|
291
|
+
`+_i.repeat(" ",r.indent*e)}L(zg,"generateNextLine");function vR(r,e){var i,n,a;for(i=0,n=r.implicitTypes.length;i<n;i+=1)if(a=r.implicitTypes[i],a.resolve(e))return!0;return!1}L(vR,"testImplicitResolving");function Md(r){return r===EV||r===SV}L(Md,"isWhitespace");function kh(r){return 32<=r&&r<=126||161<=r&&r<=55295&&r!==8232&&r!==8233||57344<=r&&r<=65533&&r!==LC||65536<=r&&r<=1114111}L(kh,"isPrintable");function qv(r){return kh(r)&&r!==LC&&r!==TV&&r!==Nd}L(qv,"isNsCharOrWhitespace");function Uv(r,e,i){var n=qv(r),a=n&&!Md(r);return(i?n:n&&r!==dR&&r!==fR&&r!==pR&&r!==gR&&r!==mR)&&r!==zv&&!(e===$g&&!a)||qv(e)&&!Md(e)&&r===zv||e===$g&&a}L(Uv,"isPlainSafe");function CR(r){return kh(r)&&r!==LC&&!Md(r)&&r!==RV&&r!==FV&&r!==$g&&r!==dR&&r!==fR&&r!==pR&&r!==gR&&r!==mR&&r!==zv&&r!==BV&&r!==OV&&r!==NV&&r!==zV&&r!==jV&&r!==DV&&r!==LV&&r!==AV&&r!==MV&&r!==IV&&r!==$V}L(CR,"isPlainSafeFirst");function _R(r){return!Md(r)&&r!==$g}L(_R,"isPlainSafeLast");function zc(r,e){var i=r.charCodeAt(e),n;return i>=55296&&i<=56319&&e+1<r.length&&(n=r.charCodeAt(e+1),n>=56320&&n<=57343)?(i-55296)*1024+n-56320+65536:i}L(zc,"codePointAt");function OC(r){var e=/^\n* /;return e.test(r)}L(OC,"needIndentIndicator");var kR=1,Hv=2,wR=3,SR=4,Dc=5;function TR(r,e,i,n,a,o,c,h){var u,d=0,f=null,g=!1,x=!1,y=n!==-1,v=-1,C=CR(zc(r,0))&&_R(zc(r,r.length-1));if(e||c)for(u=0;u<r.length;d>=65536?u+=2:u++){if(d=zc(r,u),!kh(d))return Dc;C=C&&Uv(d,f,h),f=d}else{for(u=0;u<r.length;d>=65536?u+=2:u++){if(d=zc(r,u),d===Nd)g=!0,y&&(x=x||u-v-1>n&&r[v+1]!==" ",v=u);else if(!kh(d))return Dc;C=C&&Uv(d,f,h),f=d}x=x||y&&u-v-1>n&&r[v+1]!==" "}return!g&&!x?C&&!c&&!a(r)?kR:o===Ad?Dc:Hv:i>9&&OC(r)?Dc:c?o===Ad?Dc:Hv:x?SR:wR}L(TR,"chooseScalarStyle");function ER(r,e,i,n,a){r.dump=(function(){if(e.length===0)return r.quotingType===Ad?'""':"''";if(!r.noCompatMode&&(PV.indexOf(e)!==-1||qV.test(e)))return r.quotingType===Ad?'"'+e+'"':"'"+e+"'";var o=r.indent*Math.max(1,i),c=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-o),h=n||r.flowLevel>-1&&i>=r.flowLevel;function u(d){return vR(r,d)}switch(L(u,"testAmbiguity"),TR(e,h,r.indent,c,u,r.quotingType,r.forceQuotes&&!n,a)){case kR:return e;case Hv:return"'"+e.replace(/'/g,"''")+"'";case wR:return"|"+Wv(e,r.indent)+Gv(Pv(e,o));case SR:return">"+Wv(e,r.indent)+Gv(Pv(NR(e,c),o));case Dc:return'"'+AR(e)+'"';default:throw new vn("impossible error: invalid scalar style")}})()}L(ER,"writeScalar");function Wv(r,e){var i=OC(r)?String(e):"",n=r[r.length-1]===`
|
|
292
|
+
`,a=n&&(r[r.length-2]===`
|
|
293
|
+
`||r===`
|
|
294
|
+
`),o=a?"+":n?"":"-";return i+o+`
|
|
295
|
+
`}L(Wv,"blockHeader");function Gv(r){return r[r.length-1]===`
|
|
296
|
+
`?r.slice(0,-1):r}L(Gv,"dropEndingNewline");function NR(r,e){for(var i=/(\n+)([^\n]*)/g,n=(function(){var d=r.indexOf(`
|
|
297
|
+
`);return d=d!==-1?d:r.length,i.lastIndex=d,Yv(r.slice(0,d),e)})(),a=r[0]===`
|
|
298
|
+
`||r[0]===" ",o,c;c=i.exec(r);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
|
|
299
|
+
`:"")+Yv(u,e),a=o}return n}L(NR,"foldString");function Yv(r,e){if(r===""||r[0]===" ")return r;for(var i=/ [^ ]/g,n,a=0,o,c=0,h=0,u="";n=i.exec(r);)h=n.index,h-a>e&&(o=c>a?c:h,u+=`
|
|
300
|
+
`+r.slice(a,o),a=o+1),c=h;return u+=`
|
|
301
|
+
`,r.length-a>e&&c>a?u+=r.slice(a,c)+`
|
|
302
|
+
`+r.slice(c+1):u+=r.slice(a),u.slice(1)}L(Yv,"foldLine");function AR(r){for(var e="",i=0,n,a=0;a<r.length;i>=65536?a+=2:a++)i=zc(r,a),n=Gi[i],!n&&kh(i)?(e+=r[a],i>=65536&&(e+=r[a+1])):e+=n||bR(i);return e}L(AR,"escapeString");function MR(r,e,i){var n="",a=r.tag,o,c,h;for(o=0,c=i.length;o<c;o+=1)h=i[o],r.replacer&&(h=r.replacer.call(i,String(o),h)),(Ka(r,e,h,!1,!1)||typeof h>"u"&&Ka(r,e,null,!1,!1))&&(n!==""&&(n+=","+(r.condenseFlow?"":" ")),n+=r.dump);r.tag=a,r.dump="["+n+"]"}L(MR,"writeFlowSequence");function Kv(r,e,i,n){var a="",o=r.tag,c,h,u;for(c=0,h=i.length;c<h;c+=1)u=i[c],r.replacer&&(u=r.replacer.call(i,String(c),u)),(Ka(r,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Ka(r,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=zg(r,e)),r.dump&&Nd===r.dump.charCodeAt(0)?a+="-":a+="- ",a+=r.dump);r.tag=o,r.dump=a||"[]"}L(Kv,"writeBlockSequence");function BR(r,e,i){var n="",a=r.tag,o=Object.keys(i),c,h,u,d,f;for(c=0,h=o.length;c<h;c+=1)f="",n!==""&&(f+=", "),r.condenseFlow&&(f+='"'),u=o[c],d=i[u],r.replacer&&(d=r.replacer.call(i,u,d)),Ka(r,e,u,!1,!1)&&(r.dump.length>1024&&(f+="? "),f+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Ka(r,e,d,!1,!1)&&(f+=r.dump,n+=f));r.tag=a,r.dump="{"+n+"}"}L(BR,"writeFlowMapping");function LR(r,e,i,n){var a="",o=r.tag,c=Object.keys(i),h,u,d,f,g,x;if(r.sortKeys===!0)c.sort();else if(typeof r.sortKeys=="function")c.sort(r.sortKeys);else if(r.sortKeys)throw new vn("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)x="",(!n||a!=="")&&(x+=zg(r,e)),d=c[h],f=i[d],r.replacer&&(f=r.replacer.call(i,d,f)),Ka(r,e+1,d,!0,!0,!0)&&(g=r.tag!==null&&r.tag!=="?"||r.dump&&r.dump.length>1024,g&&(r.dump&&Nd===r.dump.charCodeAt(0)?x+="?":x+="? "),x+=r.dump,g&&(x+=zg(r,e)),Ka(r,e+1,f,!0,g)&&(r.dump&&Nd===r.dump.charCodeAt(0)?x+=":":x+=": ",x+=r.dump,a+=x));r.tag=o,r.dump=a||"{}"}L(LR,"writeBlockMapping");function Vv(r,e,i){var n,a,o,c,h,u;for(a=i?r.explicitTypes:r.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(i?h.multi&&h.representName?r.tag=h.representName(e):r.tag=h.tag:r.tag="?",h.represent){if(u=r.styleMap[h.tag]||h.defaultStyle,hR.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(uR.call(h.represent,u))n=h.represent[u](e,u);else throw new vn("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');r.dump=n}return!0}return!1}L(Vv,"detectType");function Ka(r,e,i,n,a,o,c){r.tag=null,r.dump=i,Vv(r,i,!1)||Vv(r,i,!0);var h=hR.call(r.dump),u=n,d;n&&(n=r.flowLevel<0||r.flowLevel>e);var f=h==="[object Object]"||h==="[object Array]",g,x;if(f&&(g=r.duplicates.indexOf(i),x=g!==-1),(r.tag!==null&&r.tag!=="?"||x||r.indent!==2&&e>0)&&(a=!1),x&&r.usedDuplicates[g])r.dump="*ref_"+g;else{if(f&&x&&!r.usedDuplicates[g]&&(r.usedDuplicates[g]=!0),h==="[object Object]")n&&Object.keys(r.dump).length!==0?(LR(r,e,r.dump,a),x&&(r.dump="&ref_"+g+r.dump)):(BR(r,e,r.dump),x&&(r.dump="&ref_"+g+" "+r.dump));else if(h==="[object Array]")n&&r.dump.length!==0?(r.noArrayIndent&&!c&&e>0?Kv(r,e-1,r.dump,a):Kv(r,e,r.dump,a),x&&(r.dump="&ref_"+g+r.dump)):(MR(r,e,r.dump),x&&(r.dump="&ref_"+g+" "+r.dump));else if(h==="[object String]")r.tag!=="?"&&ER(r,r.dump,e,o,u);else{if(h==="[object Undefined]")return!1;if(r.skipInvalid)return!1;throw new vn("unacceptable kind of an object to dump "+h)}r.tag!==null&&r.tag!=="?"&&(d=encodeURI(r.tag[0]==="!"?r.tag.slice(1):r.tag).replace(/!/g,"%21"),r.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",r.dump=d+" "+r.dump)}return!0}L(Ka,"writeNode");function OR(r,e){var i=[],n=[],a,o;for(Pg(r,i,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(i[n[a]]);e.usedDuplicates=new Array(o)}L(OR,"getDuplicateReferences");function Pg(r,e,i){var n,a,o;if(r!==null&&typeof r=="object")if(a=e.indexOf(r),a!==-1)i.indexOf(a)===-1&&i.push(a);else if(e.push(r),Array.isArray(r))for(a=0,o=r.length;a<o;a+=1)Pg(r[a],e,i);else for(n=Object.keys(r),a=0,o=n.length;a<o;a+=1)Pg(r[n[a]],e,i)}L(Pg,"inspectNode");function HV(r,e){e=e||{};var i=new xR(e);i.noRefs||OR(r,i);var n=r;return i.replacer&&(n=i.replacer.call({"":n},"",n)),Ka(i,0,n,!0,!0)?i.dump+`
|
|
303
|
+
`:""}L(HV,"dump$1");function WV(r,e){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}L(WV,"renamed");var GV=wO,YV=wV.load;/*! Bundled license information:
|
|
304
|
+
|
|
305
|
+
js-yaml/dist/js-yaml.mjs:
|
|
306
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
307
|
+
*/var Ru=L((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";const i=r.x??0,n=r.y??0;return"translate("+-(i+r.width/2)+", "+-(n+r.height/2)+")"},"computeLabelTransform"),Hi={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},kE={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function td(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=Ur(r),e=Ur(e);const[i,n]=[r.x,r.y],[a,o]=[e.x,e.y],c=a-i,h=o-n;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}L(td,"calculateDeltaAndAngle");var Ur=L(r=>Array.isArray(r)?{x:r[0],y:r[1]}:r,"pointTransformer"),KV=L(r=>({x:L(function(e,i,n){let a=0;const o=Ur(n[0]).x<Ur(n[n.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Hi,r.arrowTypeStart)){const{angle:y,deltaX:v}=td(n[0],n[1]);a=Hi[r.arrowTypeStart]*Math.cos(y)*(v>=0?1:-1)}else if(i===n.length-1&&Object.hasOwn(Hi,r.arrowTypeEnd)){const{angle:y,deltaX:v}=td(n[n.length-1],n[n.length-2]);a=Hi[r.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(Ur(e).x-Ur(n[n.length-1]).x),h=Math.abs(Ur(e).y-Ur(n[n.length-1]).y),u=Math.abs(Ur(e).x-Ur(n[0]).x),d=Math.abs(Ur(e).y-Ur(n[0]).y),f=Hi[r.arrowTypeStart],g=Hi[r.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 Ur(e).x+a},"x"),y:L(function(e,i,n){let a=0;const o=Ur(n[0]).y<Ur(n[n.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Hi,r.arrowTypeStart)){const{angle:y,deltaY:v}=td(n[0],n[1]);a=Hi[r.arrowTypeStart]*Math.abs(Math.sin(y))*(v>=0?1:-1)}else if(i===n.length-1&&Object.hasOwn(Hi,r.arrowTypeEnd)){const{angle:y,deltaY:v}=td(n[n.length-1],n[n.length-2]);a=Hi[r.arrowTypeEnd]*Math.abs(Math.sin(y))*(v>=0?1:-1)}const c=Math.abs(Ur(e).y-Ur(n[n.length-1]).y),h=Math.abs(Ur(e).x-Ur(n[n.length-1]).x),u=Math.abs(Ur(e).y-Ur(n[0]).y),d=Math.abs(Ur(e).x-Ur(n[0]).x),f=Hi[r.arrowTypeStart],g=Hi[r.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 Ur(e).y+a},"y")}),"getLineFunctionsWithOffset"),Ep={},xi={},wE;function VV(){return wE||(wE=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.BLANK_URL=xi.relativeFirstCharacters=xi.whitespaceEscapeCharsRegex=xi.urlSchemeRegex=xi.ctrlCharactersRegex=xi.htmlCtrlEntityRegex=xi.htmlEntitiesRegex=xi.invalidProtocolRegex=void 0,xi.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,xi.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,xi.htmlCtrlEntityRegex=/&(newline|tab);/gi,xi.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,xi.urlSchemeRegex=/^.+(:|:)/gim,xi.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,xi.relativeFirstCharacters=[".","/"],xi.BLANK_URL="about:blank"),xi}var SE;function XV(){if(SE)return Ep;SE=1,Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.sanitizeUrl=o;var r=VV();function e(c){return r.relativeFirstCharacters.indexOf(c[0])>-1}function i(c){var h=c.replace(r.ctrlCharactersRegex,"");return h.replace(r.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 r.BLANK_URL;var h,u=a(c.trim());do u=i(u).replace(r.htmlCtrlEntityRegex,"").replace(r.ctrlCharactersRegex,"").replace(r.whitespaceEscapeCharsRegex,"").trim(),u=a(u),h=u.match(r.ctrlCharactersRegex)||u.match(r.htmlEntitiesRegex)||u.match(r.htmlCtrlEntityRegex)||u.match(r.whitespaceEscapeCharsRegex);while(h&&h.length>0);var d=u;if(!d)return r.BLANK_URL;if(e(d))return d;var f=d.trimStart(),g=f.match(r.urlSchemeRegex);if(!g)return d;var x=g[0].toLowerCase().trim();if(r.invalidProtocolRegex.test(x))return r.BLANK_URL;var y=f.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return y;if(x==="http:"||x==="https:"){if(!n(y))return r.BLANK_URL;var v=new URL(y);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return y}return Ep}var ZV=XV(),QV="",JV={curveBasis:Rv,curveBasisClosed:LK,curveBasisOpen:OK,curveBumpX:OL,curveBumpY:RL,curveBundle:RK,curveCardinalClosed:jK,curveCardinalOpen:DK,curveCardinal:IL,curveCatmullRomClosed:FK,curveCatmullRomOpen:IK,curveCatmullRom:zL,curveLinear:pd,curveLinearClosed:$K,curveMonotoneX:GL,curveMonotoneY:YL,curveNatural:VL,curveStep:XL,curveStepAfter:QL,curveStepBefore:ZL},tX=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,eX=L(function(r,e){const i=RR(r,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(i)){const c=i.map(h=>h.args);Ng(c),n=Ci(n,[...c])}else n=i.args;if(!n)return;let a=gC(r,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),RR=L(function(r,e=null){var i,n;try{const a=new RegExp(`[%]{2}(?![{]${tX.source})(?=[}][%]{2}).*
|
|
308
|
+
`,"ig");r=r.trim().replace(a,"").replace(/'/gm,'"'),Bt.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let o;const c=[];for(;(o=dd.exec(r))!==null;)if(o.index===dd.lastIndex&&dd.lastIndex++,o&&!e||e&&((i=o[1])!=null&&i.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:r,args:null}:c.length===1?c[0]:c}catch(a){return Bt.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),rX=L(function(r){return r.replace(dd,"")},"removeDirectives"),iX=L(function(r,e){for(const[i,n]of e.entries())if(n.match(r))return i;return-1},"isSubstringInArray");function RC(r,e){if(!r)return e;const i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return JV[i]??e}L(RC,"interpolateToCurve");function jR(r,e){const i=r.trim();if(i)return e.securityLevel!=="loose"?ZV.sanitizeUrl(i):i}L(jR,"formatUrl");var nX=L((r,...e)=>{const i=r.split("."),n=i.length-1,a=i[n];let o=window;for(let c=0;c<n;c++)if(o=o[i[c]],!o){Bt.error(`Function name: ${r} not found in window`);return}o[a](...e)},"runFunc");function jC(r,e){return!r||!e?0:Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}L(jC,"distance");function DR(r){let e,i=0;r.forEach(a=>{i+=jC(a,e),e=a});const n=i/2;return DC(r,n)}L(DR,"traverseEdge");function FR(r){return r.length===1?r[0]:DR(r)}L(FR,"calcLabelPosition");var TE=L((r,e=2)=>{const i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),DC=L((r,e)=>{let i,n=e;for(const a of r){if(i){const o=jC(a,i);if(o===0)return i;if(o<n)n-=o;else{const c=n/o;if(c<=0)return i;if(c>=1)return{x:a.x,y:a.y};if(c>0&&c<1)return{x:TE((1-c)*i.x+c*a.x,5),y:TE((1-c)*i.y+c*a.y,5)}}}i=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),aX=L((r,e,i)=>{Bt.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());const a=DC(e,25),o=r?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 IR(r,e,i){const n=structuredClone(i);Bt.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+r,o=DC(n,a),c=10+r*.5,h=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*c+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(h)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2-5):(u.x=Math.sin(h)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2),u}L(IR,"calcTerminalLabelPosition");function $R(r){let e="",i="";for(const n of r)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?i=i+n+";":e=e+n+";");return{style:e,labelStyle:i}}L($R,"getStylesFromArray");var EE=0,sX=L(()=>(EE++,"id-"+Math.random().toString(36).substr(2,12)+"-"+EE),"generateId");function zR(r){let e="";const i="0123456789abcdef",n=i.length;for(let a=0;a<r;a++)e+=i.charAt(Math.floor(Math.random()*n));return e}L(zR,"makeRandomHex");var oX=L(r=>zR(r.length),"random"),lX=L(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),cX=L(function(r,e){const i=e.text.replace(Kd.lineBreakRegex," "),[,n]=km(e.fontSize),a=r.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(i),a},"drawSimpleText"),hX=Ud((r,e,i)=>{if(!r||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Kd.lineBreakRegex.test(r)))return r;const n=r.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=Ds(`${c} `,i),d=Ds(o,i);if(u>e){const{hyphenatedStrings:x,remainingWord:y}=uX(c,e,"-",i);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(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),uX=Ud((r,e,i="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const a=[...r],o=[];let c="";return a.forEach((h,u)=>{const d=`${c}${h}`;if(Ds(d,n)>=e){const g=u+1,x=a.length===g,y=`${d}${i}`;o.push(x?d:y),c=""}else c=d}),{hyphenatedStrings:o,remainingWord:c}},(r,e,i="-",n)=>`${r}${e}${i}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function PR(r,e){return FC(r,e).height}L(PR,"calculateTextHeight");function Ds(r,e){return FC(r,e).width}L(Ds,"calculateTextWidth");var FC=Ud((r,e)=>{const{fontSize:i=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!r)return{width:0,height:0};const[,o]=km(i),c=["sans-serif",n],h=r.split(Kd.lineBreakRegex),u=[],d=_e("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 _=lX();_.text=C||QV;const k=cX(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]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),yh,dX=(yh=class{constructor(e=!1,i){this.count=0,this.count=i?i.length:0,this.next=e?()=>this.count++:()=>Date.now()}},L(yh,"InitIDGenerator"),yh),Np,fX=L(function(r){return Np=Np||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Np.innerHTML=r,unescape(Np.textContent)},"entityDecode");function IC(r){return"str"in r}L(IC,"isDetailedError");var pX=L((r,e,i,n)=>{var o;if(!n)return;const a=(o=r.node())==null?void 0:o.getBBox();a&&r.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-i).attr("class",e)},"insertTitle"),km=L(r=>{if(typeof r=="number")return[r,r+"px"];const e=parseInt(r??"",10);return Number.isNaN(e)?[void 0,void 0]:r===String(e)?[e,r+"px"]:[e,r]},"parseFontSize");function $C(r,e){return t7({},r,e)}L($C,"cleanAndMerge");var ba={assignWithDepth:Ci,wrapLabel:hX,calculateTextHeight:PR,calculateTextWidth:Ds,calculateTextDimensions:FC,cleanAndMerge:$C,detectInit:eX,detectDirective:RR,isSubstringInArray:iX,interpolateToCurve:RC,calcLabelPosition:FR,calcCardinalityPosition:aX,calcTerminalLabelPosition:IR,formatUrl:jR,getStylesFromArray:$R,generateId:sX,random:oX,runFunc:nX,entityDecode:fX,insertTitle:pX,isLabelCoordinateInPath:qR,parseFontSize:km,InitIDGenerator:dX},gX=L(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){const n=i.substring(1,i.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),Pl=L(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),hlt=L((r,e,{counter:i=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${r}_${e}_${i}${a?`_${a}`:""}`,"getEdgeId");function Ti(r){return r??null}L(Ti,"handleUndefinedAttr");function qR(r,e){const i=Math.round(r.x),n=Math.round(r.y),a=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(i.toString())||a.includes(n.toString())}L(qR,"isLabelCoordinateInPath");var zC=L(({flowchart:r})=>{var a,o;const e=((a=r==null?void 0:r.subGraphTitleMargin)==null?void 0:a.top)??0,i=((o=r==null?void 0:r.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");async function UR(r,e){const i=r.getElementsByTagName("img");if(!i||i.length===0)return;const n=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...i].map(a=>new Promise(o=>{function c(){if(a.style.display="flex",a.style.flexDirection="column",n){const h=ur().fontSize?ur().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[d=bL.fontSize]=km(h),f=d*u+"px";a.style.minWidth=f,a.style.maxWidth=f}else a.style.width="100%";o(a)}L(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}L(UR,"configureLabelImages");var mX=L(r=>{const{handDrawnSeed:e}=ur();return{fill:r,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:r,seed:e}},"solidStateFill"),Ah=L(r=>{const e=yX([...r.cssCompiledStyles||[],...r.cssStyles||[],...r.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),yX=L(r=>{const e=new Map;return r.forEach(i=>{const[n,a]=i.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),HR=L(r=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),oe=L(r=>{const{stylesArray:e}=Ah(r),i=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];HR(h)?i.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:i.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:o}},"styles2String"),se=L((r,e)=>{var u;const{themeVariables:i,handDrawnSeed:n}=ur(),{nodeBorder:a,mainBkg:o}=i,{stylesMap:c}=Ah(r);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:bX(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),bX=L(r=>{if(!r)return[0,0];const e=r.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const i=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[i,n]},"getStrokeDashArray");const xX=Object.freeze({left:0,top:0,width:16,height:16}),qg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),WR=Object.freeze({...xX,...qg}),vX=Object.freeze({...WR,body:"",hidden:!1}),CX=Object.freeze({width:null,height:null}),_X=Object.freeze({...CX,...qg}),kX=(r,e,i,n="")=>{const a=r.split(":");if(r.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 g0(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 g0(h)?h:null}if(i&&n===""){const h={provider:n,prefix:"",name:o};return g0(h,i)?h:null}return null},g0=(r,e)=>r?!!((e&&r.prefix===""||r.prefix)&&r.name):!1;function wX(r,e){const i={};!r.hFlip!=!e.hFlip&&(i.hFlip=!0),!r.vFlip!=!e.vFlip&&(i.vFlip=!0);const n=((r.rotate||0)+(e.rotate||0))%4;return n&&(i.rotate=n),i}function NE(r,e){const i=wX(r,e);for(const n in vX)n in qg?n in r&&!(n in i)&&(i[n]=qg[n]):n in e?i[n]=e[n]:n in r&&(i[n]=r[n]);return i}function SX(r,e){const i=r.icons,n=r.aliases||Object.create(null),a=Object.create(null);function o(c){if(i[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(i).concat(Object.keys(n))).forEach(o),a}function AE(r,e,i){const n=r.icons,a=r.aliases||Object.create(null);let o={};function c(h){o=NE(n[h]||a[h],o)}return c(e),i.forEach(c),NE(r,o)}function TX(r,e){if(r.icons[e])return AE(r,e,[]);const i=SX(r,[e])[e];return i?AE(r,e,i):null}const EX=/(-?[0-9.]*[0-9]+[0-9.]*)/g,NX=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ME(r,e,i){if(e===1)return r;if(i=i||100,typeof r=="number")return Math.ceil(r*e*i)/i;if(typeof r!="string")return r;const n=r.split(EX);if(n===null||!n.length)return r;const a=[];let o=n.shift(),c=NX.test(o);for(;;){if(c){const h=parseFloat(o);isNaN(h)?a.push(o):a.push(Math.ceil(h*e*i)/i)}else a.push(o);if(o=n.shift(),o===void 0)return a.join("");c=!c}}function AX(r,e="defs"){let i="";const n=r.indexOf("<"+e);for(;n>=0;){const a=r.indexOf(">",n),o=r.indexOf("</"+e);if(a===-1||o===-1)break;const c=r.indexOf(">",o);if(c===-1)break;i+=r.slice(a+1,o).trim(),r=r.slice(0,n).trim()+r.slice(c+1)}return{defs:i,content:r}}function MX(r,e){return r?"<defs>"+r+"</defs>"+e:e}function BX(r,e,i){const n=AX(r);return MX(n.defs,e+n.content+i)}const LX=r=>r==="unset"||r==="undefined"||r==="none";function OX(r,e){const i={...WR,...r},n={..._X,...e},a={left:i.left,top:i.top,width:i.width,height:i.height};let o=i.body;[i,n].forEach(C=>{const _=[],k=C.hFlip,T=C.vFlip;let N=C.rotate;k?T?N+=2:(_.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),_.push("scale(-1 1)"),a.top=a.left=0):T&&(_.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),_.push("scale(1 -1)"),a.top=a.left=0);let E;switch(N<0&&(N-=Math.floor(N/4)*4),N=N%4,N){case 1:E=a.height/2+a.top,_.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:_.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:E=a.width/2+a.left,_.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}N%2===1&&(a.left!==a.top&&(E=a.left,a.left=a.top,a.top=E),a.width!==a.height&&(E=a.width,a.width=a.height,a.height=E)),_.length&&(o=BX(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=ME(g,u/d)):(f=c==="auto"?u:c,g=h===null?ME(f,d/u):h==="auto"?d:h);const x={},y=(C,_)=>{LX(_)||(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 RX=/\sid="(\S+)"/g,BE=new Map;function jX(r){r=r.replace(/[0-9]+$/,"")||"a";const e=BE.get(r)||0;return BE.set(r,e+1),e?`${r}${e}`:r}function DX(r){const e=[];let i;for(;i=RX.exec(r);)e.push(i[1]);if(!e.length)return r;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(a=>{const o=jX(a),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),r=r.replace(new RegExp(n,"g"),""),r}function FX(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)i+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}function PC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Xl=PC();function GR(r){Xl=r}var gd={exec:()=>null};function fr(r,e=""){let i=typeof r=="string"?r:r.source,n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(rn.caret,"$1"),i=i.replace(a,c),n},getRegex:()=>new RegExp(i,e)};return n}var IX=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),rn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},$X=/^(?:[ \t]*(?:\n|$))+/,zX=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,PX=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qX=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qC=/(?:[*+-]|\d{1,9}[.)])/,YR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,KR=fr(YR).replace(/bull/g,qC).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(),UX=fr(YR).replace(/bull/g,qC).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(),UC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,HX=/^[^\n]+/,HC=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,WX=fr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",HC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),GX=fr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,qC).getRegex(),wm="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",WC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,YX=fr("^ {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",WC).replace("tag",wm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),VR=fr(UC).replace("hr",Xd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wm).getRegex(),KX=fr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",VR).getRegex(),GC={blockquote:KX,code:zX,def:WX,fences:PX,heading:qX,hr:Xd,html:YX,lheading:KR,list:GX,newline:$X,paragraph:VR,table:gd,text:HX},LE=fr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wm).getRegex(),VX={...GC,lheading:UX,table:LE,paragraph:fr(UC).replace("hr",Xd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",LE).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",wm).getRegex()},XX={...GC,html:fr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",WC).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fr(UC).replace("hr",Xd).replace("heading",` *#{1,6} *[^
|
|
309
|
+
]`).replace("lheading",KR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ZX=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,QX=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,XR=/^( {2,}|\\)\n(?!\s*$)/,JX=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Sm=/[\p{P}\p{S}]/u,YC=/[\s\p{P}\p{S}]/u,ZR=/[^\s\p{P}\p{S}]/u,tZ=fr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,YC).getRegex(),QR=/(?!~)[\p{P}\p{S}]/u,eZ=/(?!~)[\s\p{P}\p{S}]/u,rZ=/(?:[^\s\p{P}\p{S}]|~)/u,iZ=fr(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",IX?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),JR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nZ=fr(JR,"u").replace(/punct/g,Sm).getRegex(),aZ=fr(JR,"u").replace(/punct/g,QR).getRegex(),t3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",sZ=fr(t3,"gu").replace(/notPunctSpace/g,ZR).replace(/punctSpace/g,YC).replace(/punct/g,Sm).getRegex(),oZ=fr(t3,"gu").replace(/notPunctSpace/g,rZ).replace(/punctSpace/g,eZ).replace(/punct/g,QR).getRegex(),lZ=fr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ZR).replace(/punctSpace/g,YC).replace(/punct/g,Sm).getRegex(),cZ=fr(/\\(punct)/,"gu").replace(/punct/g,Sm).getRegex(),hZ=fr(/^<(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(),uZ=fr(WC).replace("(?:-->|$)","-->").getRegex(),dZ=fr("^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",uZ).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ug=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,fZ=fr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ug).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),e3=fr(/^!?\[(label)\]\[(ref)\]/).replace("label",Ug).replace("ref",HC).getRegex(),r3=fr(/^!?\[(ref)\](?:\[\])?/).replace("ref",HC).getRegex(),pZ=fr("reflink|nolink(?!\\()","g").replace("reflink",e3).replace("nolink",r3).getRegex(),OE=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,KC={_backpedal:gd,anyPunctuation:cZ,autolink:hZ,blockSkip:iZ,br:XR,code:QX,del:gd,emStrongLDelim:nZ,emStrongRDelimAst:sZ,emStrongRDelimUnd:lZ,escape:ZX,link:fZ,nolink:r3,punctuation:tZ,reflink:e3,reflinkSearch:pZ,tag:dZ,text:JX,url:gd},gZ={...KC,link:fr(/^!?\[(label)\]\((.*?)\)/).replace("label",Ug).getRegex(),reflink:fr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ug).getRegex()},Xv={...KC,emStrongRDelimAst:oZ,emStrongLDelim:aZ,url:fr(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",OE).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:fr(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",OE).getRegex()},mZ={...Xv,br:fr(XR).replace("{2,}","*").getRegex(),text:fr(Xv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ap={normal:GC,gfm:VX,pedantic:XX},ju={normal:KC,gfm:Xv,breaks:mZ,pedantic:gZ},yZ={"&":"&","<":"<",">":">",'"':""","'":"'"},RE=r=>yZ[r];function ja(r,e){if(e){if(rn.escapeTest.test(r))return r.replace(rn.escapeReplace,RE)}else if(rn.escapeTestNoEncode.test(r))return r.replace(rn.escapeReplaceNoEncode,RE);return r}function jE(r){try{r=encodeURI(r).replace(rn.percentDecode,"%")}catch{return null}return r}function DE(r,e){var o;let i=r.replace(rn.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=i.split(rn.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(rn.slashPipe,"|");return n}function Du(r,e,i){let n=r.length;if(n===0)return"";let a=0;for(;a<n&&r.charAt(n-a-1)===e;)a++;return r.slice(0,n-a)}function bZ(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return i>0?-2:-1}function FE(r,e,i,n,a){let o=e.href,c=e.title||null,h=r[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function xZ(r,e,i){let n=r.match(i.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
|
|
310
|
+
`).map(o=>{let c=o.match(i.other.beginningSpace);if(c===null)return o;let[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
|
|
311
|
+
`)}var Hg=class{constructor(e){pe(this,"options");pe(this,"rules");pe(this,"lexer");this.options=e||Xl}space(e){let i=this.rules.block.newline.exec(e);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(e){let i=this.rules.block.code.exec(e);if(i){let n=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Du(n,`
|
|
312
|
+
`)}}}fences(e){let i=this.rules.block.fences.exec(e);if(i){let n=i[0],a=xZ(n,i[3]||"",this.rules);return{type:"code",raw:n,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:a}}}heading(e){let i=this.rules.block.heading.exec(e);if(i){let n=i[2].trim();if(this.rules.other.endingHash.test(n)){let a=Du(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let i=this.rules.block.hr.exec(e);if(i)return{type:"hr",raw:Du(i[0],`
|
|
313
|
+
`)}}blockquote(e){let i=this.rules.block.blockquote.exec(e);if(i){let n=Du(i[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 i=this.rules.block.list.exec(e);if(i){let n=i[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(!(i=c.exec(e))||this.rules.block.hr.test(e))break;f=i[0],e=e.substring(f.length);let x=i[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=i[1].length+1:(C=i[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=i[1].length),v&&this.rules.other.blankLine.test(y)&&(f+=y+`
|
|
327
|
+
`,e=e.substring(y.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(C),N=this.rules.other.hrRegex(C),E=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),O=this.rules.other.htmlBeginRegex(C);for(;e;){let A=e.split(`
|
|
328
|
+
`,1)[0],M;if(y=A,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),M=y):M=y.replace(this.rules.other.tabCharGlobal," "),E.test(y)||B.test(y)||O.test(y)||T.test(y)||N.test(y))break;if(M.search(this.rules.other.nonSpaceChar)>=C||!y.trim())g+=`
|
|
329
|
+
`+M.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(x)||B.test(x)||N.test(x))break;g+=`
|
|
330
|
+
`+y}!v&&!y.trim()&&(v=!0),f+=A+`
|
|
331
|
+
`,e=e.substring(A.length+1),x=M.slice(C)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(h=!0));let _=null,k;this.options.gfm&&(_=this.rules.other.listIsTask.exec(g),_&&(k=_[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!_,checked:k,loose:!1,text:g,tokens:[]}),o.raw+=f}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter(x=>x.type==="space"),g=f.length>0&&f.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=g}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(e){let i=this.rules.block.html.exec(e);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(e){let i=this.rules.block.def.exec(e);if(i){let n=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:n,raw:i[0],href:a,title:o}}}table(e){var h;let i=this.rules.block.table.exec(e);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let n=DE(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
332
|
+
`):[],c={type:"table",raw:i[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(DE(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 i=this.rules.block.lheading.exec(e);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(e){let i=this.rules.block.paragraph.exec(e);if(i){let n=i[1].charAt(i[1].length-1)===`
|
|
333
|
+
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let i=this.rules.block.text.exec(e);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(e){let i=this.rules.inline.escape.exec(e);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(e){let i=this.rules.inline.tag.exec(e);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(e){let i=this.rules.inline.link.exec(e);if(i){let n=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let c=Du(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=bZ(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let a=i[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(a);c&&(a=c[1],o=c[3])}else o=i[3]?i[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)),FE(i,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(e,i){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=i[a.toLowerCase()];if(!o){let c=n[0].charAt(0);return{type:"text",raw:c,text:c}}return FE(n,o,n[0],this.lexer,this.rules)}}emStrong(e,i,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,i=i.slice(-1*e.length+o);(a=f.exec(i))!=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 i=this.rules.inline.code.exec(e);if(i){let n=i[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:i[0],text:n}}}br(e){let i=this.rules.inline.br.exec(e);if(i)return{type:"br",raw:i[0]}}del(e){let i=this.rules.inline.del.exec(e);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(e){let i=this.rules.inline.autolink.exec(e);if(i){let n,a;return i[2]==="@"?(n=i[1],a="mailto:"+n):(n=i[1],a=n),{type:"link",raw:i[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let i;if(i=this.rules.inline.url.exec(e)){let a,o;if(i[2]==="@")a=i[0],o="mailto:"+a;else{let c;do c=i[0],i[0]=((n=this.rules.inline._backpedal.exec(i[0]))==null?void 0:n[0])??"";while(c!==i[0]);a=i[0],i[1]==="www."?o="http://"+i[0]:o=i[0]}return{type:"link",raw:i[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let i=this.rules.inline.text.exec(e);if(i){let n=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:n}}}},ga=class Zv{constructor(e){pe(this,"tokens");pe(this,"options");pe(this,"state");pe(this,"tokenizer");pe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Xl,this.options.tokenizer=this.options.tokenizer||new Hg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:rn,block:Ap.normal,inline:ju.normal};this.options.pedantic?(i.block=Ap.pedantic,i.inline=ju.pedantic):this.options.gfm&&(i.block=Ap.gfm,this.options.breaks?i.inline=ju.breaks:i.inline=ju.gfm),this.tokenizer.rules=i}static get rules(){return{block:Ap,inline:ju}}static lex(e,i){return new Zv(i).lex(e)}static lexInline(e,i){return new Zv(i).inlineTokens(e)}lex(e){e=e.replace(rn.carriageReturn,`
|
|
334
|
+
`),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let n=this.inlineQueue[i];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(rn.tabCharGlobal," ").replace(rn.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,i))?(e=e.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);let d=i.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
|
|
335
|
+
`:i.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);let d=i.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):i.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);let d=i.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},i.push(h));continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),i.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=i.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):i.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=i.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):i.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,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){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,i))?(e=e.substring(y.raw.length),i.push(y),!0):!1))continue;if(y=this.tokenizer.escape(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.tag(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.link(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(y.raw.length);let C=i.at(-1);y.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):i.push(y);continue}if(y=this.tokenizer.emStrong(e,n,h)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.codespan(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.br(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.del(e)){e=e.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.autolink(e)){e=e.substring(y.raw.length),i.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(e))){e=e.substring(y.raw.length),i.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=i.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):i.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 i}},Wg=class{constructor(e){pe(this,"options");pe(this,"parser");this.options=e||Xl}space(e){return""}code({text:e,lang:i,escaped:n}){var c;let a=(c=(i||"").match(rn.notSpaceStart))==null?void 0:c[0],o=e.replace(rn.endingNewline,"")+`
|
|
348
|
+
`;return a?'<pre><code class="language-'+ja(a)+'">'+(n?o:ja(o,!0))+`</code></pre>
|
|
349
|
+
`:"<pre><code>"+(n?o:ja(o,!0))+`</code></pre>
|
|
350
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
351
|
+
${this.parser.parse(e)}</blockquote>
|
|
352
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:i}){return`<h${i}>${this.parser.parseInline(e)}</h${i}>
|
|
353
|
+
`}hr(e){return`<hr>
|
|
354
|
+
`}list(e){let i=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=i?"ol":"ul",c=i&&n!==1?' start="'+n+'"':"";return"<"+o+c+`>
|
|
355
|
+
`+a+"</"+o+`>
|
|
356
|
+
`}listitem(e){var n;let i="";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}):i+=a+" "}return i+=this.parser.parse(e.tokens,!!e.loose),`<li>${i}</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 i="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);i+=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
|
+
`+i+`</thead>
|
|
361
|
+
`+a+`</table>
|
|
362
|
+
`}tablerow({text:e}){return`<tr>
|
|
363
|
+
${e}</tr>
|
|
364
|
+
`}tablecell(e){let i=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+i+`</${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:i,tokens:n}){let a=this.parser.parseInline(n),o=jE(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return i&&(c+=' title="'+ja(i)+'"'),c+=">"+a+"</a>",c}image({href:e,title:i,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let o=jE(e);if(o===null)return ja(n);e=o;let c=`<img src="${e}" alt="${n}"`;return i&&(c+=` title="${ja(i)}"`),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)}},VC=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 Qv{constructor(e){pe(this,"options");pe(this,"renderer");pe(this,"textRenderer");this.options=e||Xl,this.options.renderer=this.options.renderer||new Wg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new VC}static parse(e,i){return new Qv(i).parse(e)}static parseInline(e,i){return new Qv(i).parseInline(e)}parse(e,i=!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);i?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,i=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+=i.text(u);break}case"html":{n+=i.html(u);break}case"link":{n+=i.link(u);break}case"image":{n+=i.image(u);break}case"strong":{n+=i.strong(u);break}case"em":{n+=i.em(u);break}case"codespan":{n+=i.codespan(u);break}case"br":{n+=i.br(u);break}case"del":{n+=i.del(u);break}case"text":{n+=i.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},Up,ed=(Up=class{constructor(e){pe(this,"options");pe(this,"block");this.options=e||Xl}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ga.lex:ga.lexInline}provideParser(){return this.block?ma.parse:ma.parseInline}},pe(Up,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),pe(Up,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Up),vZ=class{constructor(...e){pe(this,"defaults",PC());pe(this,"options",this.setOptions);pe(this,"parse",this.parseMarkdown(!0));pe(this,"parseInline",this.parseMarkdown(!1));pe(this,"Parser",ma);pe(this,"Renderer",Wg);pe(this,"TextRenderer",VC);pe(this,"Lexer",ga);pe(this,"Tokenizer",Hg);pe(this,"Hooks",ed);this.use(...e)}walkTokens(e,i){var a,o;let n=[];for(let c of e)switch(n=n.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)n=n.concat(this.walkTokens(u.tokens,i));for(let u of h.rows)for(let d of u)n=n.concat(this.walkTokens(d.tokens,i));break}case"list":{let h=c;n=n.concat(this.walkTokens(h.items,i));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,i))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,i)))}}return n}use(...e){let i=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=i.renderers[o.name];c?i.renderers[o.name]=function(...h){let u=o.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:i.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=i[o.level];c?c.unshift(o.tokenizer):i[o.level]=[o.tokenizer],o.start&&(o.level==="block"?i.startBlock?i.startBlock.push(o.start):i.startBlock=[o.start]:o.level==="inline"&&(i.startInline?i.startInline.push(o.start):i.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(i.childTokens[o.name]=o.childTokens)}),a.extensions=i),n.renderer){let o=this.defaults.renderer||new Wg(this.defaults);for(let c in n.renderer){if(!(c in o))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=n.renderer[h],d=o[h];o[h]=(...f)=>{let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g||""}}a.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Hg(this.defaults);for(let c in n.tokenizer){if(!(c in o))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=n.tokenizer[h],d=o[h];o[h]=(...f)=>{let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}a.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new ed;for(let c in n.hooks){if(!(c in o))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=n.hooks[h],d=o[h];ed.passThroughHooks.has(c)?o[h]=f=>{if(this.defaults.async&&ed.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(o,f);return d.call(o,x)})();let g=u.call(o,f);return d.call(o,g)}:o[h]=(...f)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(o,f);return x===!1&&(x=await d.apply(o,f)),x})();let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}a.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,c=n.walkTokens;a.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),o&&(u=u.concat(o.call(this,h))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,i){return ga.lex(e,i??this.defaults)}parser(e,i){return ma.parse(e,i??this.defaults)}parseMarkdown(e){return(i,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 i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", 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(i):i,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&&(i=o.hooks.preprocess(i));let h=(o.hooks?o.hooks.provideLexer():e?ga.lex:ga.lexInline)(i,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,i){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 i?Promise.resolve(a):a}if(i)return Promise.reject(n);throw n}}},ql=new vZ;function vr(r,e){return ql.parse(r,e)}vr.options=vr.setOptions=function(r){return ql.setOptions(r),vr.defaults=ql.defaults,GR(vr.defaults),vr};vr.getDefaults=PC;vr.defaults=Xl;vr.use=function(...r){return ql.use(...r),vr.defaults=ql.defaults,GR(vr.defaults),vr};vr.walkTokens=function(r,e){return ql.walkTokens(r,e)};vr.parseInline=ql.parseInline;vr.Parser=ma;vr.parser=ma.parse;vr.Renderer=Wg;vr.TextRenderer=VC;vr.Lexer=ga;vr.lexer=ga.lex;vr.Tokenizer=Hg;vr.Hooks=ed;vr.parse=vr;vr.options;vr.setOptions;vr.use;vr.walkTokens;vr.parseInline;ma.parse;ga.lex;function i3(r){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=Array.from(typeof r=="string"?[r]:r);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},Jv=new Map,n3=new Map,_Z=L(r=>{for(const e of r){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Bt.debug("Registering icon pack:",e.name),"loader"in e)n3.set(e.name,e.loader);else if("icons"in e)Jv.set(e.name,e.icons);else throw Bt.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),a3=L(async(r,e)=>{const i=kX(r,!0,e!==void 0);if(!i)throw new Error(`Invalid icon name: ${r}`);const n=i.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${r}`);let a=Jv.get(n);if(!a){const c=n3.get(n);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{a={...await c(),prefix:n},Jv.set(n,a)}catch(h){throw Bt.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const o=TX(a,i.name);if(!o)throw new Error(`Icon not found: ${r}`);return o},"getRegisteredIconData"),kZ=L(async r=>{try{return await a3(r),!0}catch{return!1}},"isIconAvailable"),Zd=L(async(r,e,i)=>{let n;try{n=await a3(r,e==null?void 0:e.fallbackPrefix)}catch(c){Bt.error(c),n=CZ}const a=OX(n,e),o=FX(DX(a.body),{...a.attributes,...i});return ka(o,Vr())},"getIconSVG");function s3(r,{markdownAutoWrap:e}){const n=r.replace(/<br\/>/g,`
|
|
373
|
+
`).replace(/\n{2,}/g,`
|
|
374
|
+
`);return i3(n)}L(s3,"preprocessMarkdown");function o3(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var i;return((i=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:i.map(n=>({content:n,type:"normal"})))??[]})}L(o3,"nonMarkdownToLines");function l3(r,e={}){const i=s3(r,e),n=vr.lexer(i),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
|
|
375
|
+
`).forEach((f,g)=>{g!==0&&(o++,a.push([])),f.split(" ").forEach(x=>{x=x.replace(/'/g,"'"),x&&a[o].push({content:x,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(d=>{c(d,h.type)}):h.type==="html"&&a[o].push({content:h.text,type:"normal"})}return L(c,"processNode"),n.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(d=>{c(d)}):h.type==="html"?a[o].push({content:h.text,type:"normal"}):a[o].push({content:h.raw,type:"normal"})}),a}L(l3,"markdownToLines");function c3(r){return r?`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`:""}L(c3,"nonMarkdownToHTML");function h3(r,{markdownAutoWrap:e}={}){const i=vr.lexer(r);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:(Bt.warn(`Unsupported markdown: ${a.type}`),a.raw)}return L(n,"output"),i.map(n).join("")}L(h3,"markdownToHTML");function u3(r){return Intl.Segmenter?[...new Intl.Segmenter().segment(r)].map(e=>e.segment):[...r]}L(u3,"splitTextToChars");function d3(r,e){const i=u3(e.content);return XC(r,[],i,e.type)}L(d3,"splitWordToFitWidth");function XC(r,e,i,n){if(i.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[a,...o]=i,c=[...e,a];return r([{content:c.join(""),type:n}])?XC(r,c,o,n):(e.length===0&&a&&(e.push(a),i.shift()),[{content:e.join(""),type:n},{content:i.join(""),type:n}])}L(XC,"splitWordToFitWidthRecursion");function f3(r,e){if(r.some(({content:i})=>i.includes(`
|
|
376
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Gg(r,e)}L(f3,"splitLineToFitWidth");function Gg(r,e,i=[],n=[]){if(r.length===0)return n.length>0&&i.push(n),i.length>0?i:[];let a="";r[0].content===" "&&(a=" ",r.shift());const o=r.shift()??{content:" ",type:"normal"},c=[...n];if(a!==""&&c.push({content:a,type:"normal"}),c.push(o),e(c))return Gg(r,e,i,c);if(n.length>0)i.push(n),r.unshift(o);else if(o.content){const[h,u]=d3(e,o);i.push([h]),u.content&&r.unshift(u)}return Gg(r,e,i)}L(Gg,"splitLineToFitWidthRecursion");function t1(r,e){e&&r.attr("style",e)}L(t1,"applyStyle");var IE=16384;async function p3(r,e,i,n,a=!1,o=Vr()){const c=r.append("foreignObject");c.attr("width",`${Math.min(10*i,IE)}px`),c.attr("height",`${Math.min(10*i,IE)}px`);const h=c.append("xhtml:div"),u=Td(e.label)?await EL(e.label.replace(Kd.lineBreakRegex,`
|
|
377
|
+
`),o):ka(e.label,o),d=e.isNode?"nodeLabel":"edgeLabel",f=h.append("span");f.html(u),t1(f,e.labelStyle),f.attr("class",`${d} ${n}`),t1(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY&&(h.style("max-width",i+"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===i&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",i+"px"),g=h.node().getBoundingClientRect()),c.node()}L(p3,"addHtmlSpan");function Tm(r,e,i,n=!1){const a=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-.1+"em").attr("dy",i+"em");return n&&a.attr("text-anchor","middle"),a}L(Tm,"createTspan");function g3(r,e,i){const n=r.append("text"),a=Tm(n,1,e);Em(a,i);const o=a.node().getComputedTextLength();return n.remove(),o}L(g3,"computeWidthOfText");function wZ(r,e,i){var c;const n=r.append("text"),a=Tm(n,1,e);Em(a,[{content:i,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}L(wZ,"computeDimensionOfText");function m3(r,e,i,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 i){const g=L(y=>g3(c,1.1,y)<=r,"checkWidth"),x=g(f)?[f]:f3(f,g);for(const y of x){const v=Tm(u,d,1.1,a);Em(v,y),d++}}if(n){const f=u.node().getBBox(),g=2;return h.attr("x",f.x-g).attr("y",f.y-g).attr("width",f.width+2*g).attr("height",f.height+2*g),c.node()}else return u.node()}L(m3,"createFormattedText");function e1(r){const e=/&(amp|lt|gt);/g;return r.replace(e,(i,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}L(e1,"decodeHTMLEntities");function Em(r,e){r.text(""),e.forEach((i,n)=>{const a=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");n===0?a.text(e1(i.content)):a.text(" "+e1(i.content))})}L(Em,"updateTextContentAndStyles");async function y3(r,e={}){const i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(i.push((async()=>{const h=`${o}:${c}`;return await kZ(h)?await Zd(h,void 0,{class:"label-icon"}):`<i class='${ka(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}L(y3,"replaceIconSubstring");var $s=L(async(r,e="",{style:i="",isTitle:n=!1,classes:a="",useHtmlLabels:o=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:d=!1}={},f)=>{if(Bt.debug("XYZ createText",e,i,n,a,o,h,"addSvgBackground: ",d),o){const g=c?h3(e,f):c3(e),x=await y3(Pl(g),f),y=e.replace(/\\\\/g,"\\"),v={isNode:h,label:Td(e)?y:x,labelStyle:i.replace("fill:","color:")};return await p3(r,v,u,a,d,f)}else{const g=Pl(e.replace(/<br\s*\/?>/g,"<br/>")),x=c?l3(g.replace("<br>","<br/>"),f):o3(g),y=m3(u,r,x,e?d:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");_e(y).attr("style",v)}else{const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");_e(y).select("rect").attr("style",v.replace(/background:/g,"fill:"));const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");_e(y).select("text").attr("style",C)}return n?_e(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):_e(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function m0(r,e,i){if(r&&r.length){const[n,a]=e,o=Math.PI/180*i,c=Math.cos(o),h=Math.sin(o);for(const u of r){const[d,f]=u;u[0]=(d-n)*c-(f-a)*h+n,u[1]=(d-n)*h+(f-a)*c+a}}}function SZ(r,e){return r[0]===e[0]&&r[1]===e[1]}function TZ(r,e,i,n=1){const a=i,o=Math.max(e,.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,h=[0,0];if(a)for(const d of c)m0(d,h,a);const u=(function(d,f,g){const x=[];for(const T of d){const N=[...T];SZ(N[0],N[N.length-1])||N.push([N[0][0],N[0][1]]),N.length>2&&x.push(N)}const y=[];f=Math.max(f,.1);const v=[];for(const T of x)for(let N=0;N<T.length-1;N++){const E=T[N],B=T[N+1];if(E[1]!==B[1]){const O=Math.min(E[1],B[1]);v.push({ymin:O,ymax:Math.max(E[1],B[1]),x:O===E[1]?E[0]:B[0],islope:(B[0]-E[0])/(B[1]-E[1])})}}if(v.sort(((T,N)=>T.ymin<N.ymin?-1:T.ymin>N.ymin?1:T.x<N.x?-1:T.x>N.x?1:T.ymax===N.ymax?0:(T.ymax-N.ymax)/Math.abs(T.ymax-N.ymax))),!v.length)return y;let C=[],_=v[0].ymin,k=0;for(;C.length||v.length;){if(v.length){let T=-1;for(let N=0;N<v.length&&!(v[N].ymin>_);N++)T=N;v.splice(0,T+1).forEach((N=>{C.push({s:_,edge:N})}))}if(C=C.filter((T=>!(T.edge.ymax<=_))),C.sort(((T,N)=>T.edge.x===N.edge.x?0:(T.edge.x-N.edge.x)/Math.abs(T.edge.x-N.edge.x))),(g!==1||k%f==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const N=T+1;if(N>=C.length)break;const E=C[T].edge,B=C[N].edge;y.push([[Math.round(E.x),_],[Math.round(B.x),_]])}_+=g,C.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),k++}return y})(c,o,n);if(a){for(const d of c)m0(d,h,-a);(function(d,f,g){const x=[];d.forEach((y=>x.push(...y))),m0(x,f,g)})(u,h,-a)}return u}function Qd(r,e){var i;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&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(o=a),TZ(r,a,n,o||1)}class ZC{constructor(e){this.helper=e}fillPolygons(e,i){return this._fillPolygons(e,i)}_fillPolygons(e,i){const n=Qd(e,i);return{type:"fillSketch",ops:this.renderLines(n,i)}}renderLines(e,i){const n=[];for(const a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],i));return n}}function Nm(r){const e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class EZ extends ZC{fillPolygons(e,i){let n=i.hachureGap;n<0&&(n=4*i.strokeWidth),n=Math.max(n,.1);const a=Qd(e,Object.assign({},i,{hachureGap:n})),o=Math.PI/180*i.hachureAngle,c=[],h=.5*n*Math.cos(o),u=.5*n*Math.sin(o);for(const[d,f]of a)Nm([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,i)}}}class NZ extends ZC{fillPolygons(e,i){const n=this._fillPolygons(e,i),a=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),o=this._fillPolygons(e,a);return n.ops=n.ops.concat(o.ops),n}}class AZ{constructor(e){this.helper=e}fillPolygons(e,i){const n=Qd(e,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(n,i)}dotsOnLines(e,i){const n=[];let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const c=a/4;for(const h of e){const u=Nm(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,i);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}}class MZ{constructor(e){this.helper=e}fillPolygons(e,i){const n=Qd(e,i);return{type:"fillSketch",ops:this.dashedLine(n,i)}}dashedLine(e,i){const n=i.dashOffset<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashOffset,a=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,o=[];return e.forEach((c=>{const h=Nm(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],i))}})),o}}class BZ{constructor(e){this.helper=e}fillPolygons(e,i){const n=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,a=i.zigzagOffset<0?n:i.zigzagOffset,o=Qd(e,i=Object.assign({},i,{hachureGap:n+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,i)}}zigzagLines(e,i,n){const a=[];return e.forEach((o=>{const c=Nm(o),h=Math.round(c/(2*i));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*i,y=2*(g+1)*i,v=Math.sqrt(2*Math.pow(i,2)),C=[u[0]+x*Math.cos(f),u[1]+x*Math.sin(f)],_=[u[0]+y*Math.cos(f),u[1]+y*Math.sin(f)],k=[C[0]+v*Math.cos(f+Math.PI/4),C[1]+v*Math.sin(f+Math.PI/4)];a.push(...this.helper.doubleLineOps(C[0],C[1],k[0],k[1],n),...this.helper.doubleLineOps(k[0],k[1],_[0],_[1],n))}})),a}}const mn={};class LZ{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const OZ=0,y0=1,$E=2,Mp={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function b0(r,e){return r.type===e}function QC(r){const e=[],i=(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:OZ,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:y0,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:$E,text:""},h})(r);let n="BOD",a=0,o=i[a];for(;!b0(o,$E);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return QC("M0,0"+r);a++,c=Mp[o.text],n=o.text}else b0(o,y0)?c=Mp[n]:(a++,c=Mp[o.text],n=o.text);if(!(a+c<i.length))throw new Error("Path data ended short");for(let u=a;u<a+c;u++){const d=i[u];if(!b0(d,y0))throw new Error("Param not a number: "+n+","+d.text);h[h.length]=+d.text}if(typeof Mp[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:h};e.push(u),a+=c,o=i[a],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function b3(r){let e=0,i=0,n=0,a=0;const o=[];for(const{key:c,data:h}of r)switch(c){case"M":o.push({key:"M",data:[...h]}),[e,i]=h,[n,a]=h;break;case"m":e+=h[0],i+=h[1],o.push({key:"M",data:[e,i]}),n=e,a=i;break;case"L":o.push({key:"L",data:[...h]}),[e,i]=h;break;case"l":e+=h[0],i+=h[1],o.push({key:"L",data:[e,i]});break;case"C":o.push({key:"C",data:[...h]}),e=h[4],i=h[5];break;case"c":{const u=h.map(((d,f)=>f%2?d+i:d+e));o.push({key:"C",data:u}),e=u[4],i=u[5];break}case"Q":o.push({key:"Q",data:[...h]}),e=h[2],i=h[3];break;case"q":{const u=h.map(((d,f)=>f%2?d+i:d+e));o.push({key:"Q",data:u}),e=u[2],i=u[3];break}case"A":o.push({key:"A",data:[...h]}),e=h[5],i=h[6];break;case"a":e+=h[5],i+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,i]});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]}),i=h[0];break;case"v":i+=h[0],o.push({key:"V",data:[i]});break;case"S":o.push({key:"S",data:[...h]}),e=h[2],i=h[3];break;case"s":{const u=h.map(((d,f)=>f%2?d+i:d+e));o.push({key:"S",data:u}),e=u[2],i=u[3];break}case"T":o.push({key:"T",data:[...h]}),e=h[0],i=h[1];break;case"t":e+=h[0],i+=h[1],o.push({key:"T",data:[e,i]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=n,i=a}return o}function x3(r){const e=[];let i="",n=0,a=0,o=0,c=0,h=0,u=0;for(const{key:d,data:f}of r){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;i==="C"||i==="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;i==="Q"||i==="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)&&(v3(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}i=d}return e}function Fu(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function v3(r,e,i,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{[r,e]=Fu(r,e,-f),[i,n]=Fu(i,n,-f);const V=(r-i)/2,I=(e-n)/2;let G=V*V/(a*a)+I*I/(o*o);G>1&&(G=Math.sqrt(G),a*=G,o*=G);const D=a*a,W=o*o,K=D*W-D*I*I-W*V*V,tt=D*I*I+W*V*V,nt=(h===u?-1:1)*Math.sqrt(Math.abs(K/tt));C=nt*a*I/o+(r+i)/2,_=nt*-o*V/a+(e+n)/2,y=Math.asin(parseFloat(((e-_)/o).toFixed(9))),v=Math.asin(parseFloat(((n-_)/o).toFixed(9))),r<C&&(y=Math.PI-y),i<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 V=v,I=i,G=n;v=u&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=v3(i=C+a*Math.cos(v),n=_+o*Math.sin(v),I,G,a,o,c,0,u,[v,V,C,_])}k=v-y;const T=Math.cos(y),N=Math.sin(y),E=Math.cos(v),B=Math.sin(v),O=Math.tan(k/4),A=4/3*a*O,M=4/3*o*O,F=[r,e],j=[r+A*N,e-M*T],z=[i+A*B,n-M*E],U=[i,n];if(j[0]=2*F[0]-j[0],j[1]=2*F[1]-j[1],d)return[j,z,U].concat(x);{x=[j,z,U].concat(x);const V=[];for(let I=0;I<x.length;I+=3){const G=Fu(x[I][0],x[I][1],f),D=Fu(x[I+1][0],x[I+1][1],f),W=Fu(x[I+2][0],x[I+2][1],f);V.push([G[0],G[1],D[0],D[1],W[0],W[1]])}return V}}const RZ={randOffset:function(r,e){return Ee(r,e)},randOffsetWithRange:function(r,e,i){return Yg(r,e,i)},ellipse:function(r,e,i,n,a){const o=_3(i,n,a);return r1(r,e,a,o).opset},doubleLineOps:function(r,e,i,n,a){return $o(r,e,i,n,a,!0)}};function C3(r,e,i,n,a){return{type:"path",ops:$o(r,e,i,n,a)}}function ig(r,e,i){const n=(r||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...$o(r[o][0],r[o][1],r[o+1][0],r[o+1][1],i));return e&&a.push(...$o(r[n-1][0],r[n-1][1],r[0][0],r[0][1],i)),{type:"path",ops:a}}return n===2?C3(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function jZ(r,e,i,n,a){return(function(o,c){return ig(o,!0,c)})([[r,e],[r+i,e],[r+i,e+n],[r,e+n]],a)}function zE(r,e){if(r.length){const i=typeof r[0][0]=="number"?[r]:r,n=Bp(i[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Bp(i[0],1.5*(1+.22*e.roughness),UE(e));for(let o=1;o<i.length;o++){const c=i[o];if(c.length){const h=Bp(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:Bp(c,1.5*(1+.22*e.roughness),UE(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 _3(r,e,i){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/a;let c=Math.abs(r/2),h=Math.abs(e/2);const u=1-i.curveFitting;return c+=Ee(c*u,i),h+=Ee(h*u,i),{increment:o,rx:c,ry:h}}function r1(r,e,i,n){const[a,o]=HE(n.increment,r,e,n.rx,n.ry,1,n.increment*Yg(.1,Yg(.4,1,i),i),i);let c=Kg(a,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=HE(n.increment,r,e,n.rx,n.ry,1.5,0,i),u=Kg(h,null,i);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function PE(r,e,i,n,a,o,c,h,u){const d=r,f=e;let g=Math.abs(i/2),x=Math.abs(n/2);g+=Ee(.01*g,u),x+=Ee(.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=WE(_,d,f,g,x,y,v,1,u);if(!u.disableMultiStroke){const T=WE(_,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 qE(r,e){const i=x3(b3(QC(r))),n=[];let a=[0,0],o=[0,0];for(const{key:c,data:h}of i)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(...DZ(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 x0(r,e){const i=[];for(const n of r)if(n.length){const a=e.maxRandomnessOffset||0,o=n.length;if(o>2){i.push({op:"move",data:[n[0][0]+Ee(a,e),n[0][1]+Ee(a,e)]});for(let c=1;c<o;c++)i.push({op:"lineTo",data:[n[c][0]+Ee(a,e),n[c][1]+Ee(a,e)]})}}return{type:"fillPath",ops:i}}function Lc(r,e){return(function(i,n){let a=i.fillStyle||"hachure";if(!mn[a])switch(a){case"zigzag":mn[a]||(mn[a]=new EZ(n));break;case"cross-hatch":mn[a]||(mn[a]=new NZ(n));break;case"dots":mn[a]||(mn[a]=new AZ(n));break;case"dashed":mn[a]||(mn[a]=new MZ(n));break;case"zigzag-line":mn[a]||(mn[a]=new BZ(n));break;default:a="hachure",mn[a]||(mn[a]=new ZC(n))}return mn[a]})(e,RZ).fillPolygons(r,e)}function UE(r){const e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function k3(r){return r.randomizer||(r.randomizer=new LZ(r.seed||0)),r.randomizer.next()}function Yg(r,e,i,n=1){return i.roughness*n*(k3(i)*(e-r)+r)}function Ee(r,e,i=1){return Yg(-r,r,e,i)}function $o(r,e,i,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=i1(r,e,i,n,a,!0,!1);if(c)return h;const u=i1(r,e,i,n,a,!0,!0);return h.concat(u)}function i1(r,e,i,n,a,o,c){const h=Math.pow(r-i,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*k3(a);let y=a.bowing*a.maxRandomnessOffset*(n-e)/200,v=a.bowing*a.maxRandomnessOffset*(r-i)/200;y=Ee(y,a,d),v=Ee(v,a,d);const C=[],_=()=>Ee(g,a,d),k=()=>Ee(f,a,d),T=a.preserveVertices;return c?C.push({op:"move",data:[r+(T?0:_()),e+(T?0:_())]}):C.push({op:"move",data:[r+(T?0:Ee(f,a,d)),e+(T?0:Ee(f,a,d))]}),c?C.push({op:"bcurveTo",data:[y+r+(i-r)*x+_(),v+e+(n-e)*x+_(),y+r+2*(i-r)*x+_(),v+e+2*(n-e)*x+_(),i+(T?0:_()),n+(T?0:_())]}):C.push({op:"bcurveTo",data:[y+r+(i-r)*x+k(),v+e+(n-e)*x+k(),y+r+2*(i-r)*x+k(),v+e+2*(n-e)*x+k(),i+(T?0:k()),n+(T?0:k())]}),C}function Bp(r,e,i){if(!r.length)return[];const n=[];n.push([r[0][0]+Ee(e,i),r[0][1]+Ee(e,i)]),n.push([r[0][0]+Ee(e,i),r[0][1]+Ee(e,i)]);for(let a=1;a<r.length;a++)n.push([r[a][0]+Ee(e,i),r[a][1]+Ee(e,i)]),a===r.length-1&&n.push([r[a][0]+Ee(e,i),r[a][1]+Ee(e,i)]);return Kg(n,null,i)}function Kg(r,e,i){const n=r.length,a=[];if(n>3){const o=[],c=1-i.curveTightness;a.push({op:"move",data:[r[1][0],r[1][1]]});for(let h=1;h+2<n;h++){const u=r[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*r[h+1][0]-c*r[h-1][0])/6,u[1]+(c*r[h+1][1]-c*r[h-1][1])/6],o[2]=[r[h+1][0]+(c*r[h][0]-c*r[h+2][0])/6,r[h+1][1]+(c*r[h][1]-c*r[h+2][1])/6],o[3]=[r[h+1][0],r[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:[r[1][0],r[1][1]]}),a.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):n===2&&a.push(...i1(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return a}function HE(r,e,i,n,a,o,c,h){const u=[],d=[];if(h.roughness===0){r/=4,d.push([e+n*Math.cos(-r),i+a*Math.sin(-r)]);for(let f=0;f<=2*Math.PI;f+=r){const g=[e+n*Math.cos(f),i+a*Math.sin(f)];u.push(g),d.push(g)}d.push([e+n*Math.cos(0),i+a*Math.sin(0)]),d.push([e+n*Math.cos(r),i+a*Math.sin(r)])}else{const f=Ee(.5,h)-Math.PI/2;d.push([Ee(o,h)+e+.9*n*Math.cos(f-r),Ee(o,h)+i+.9*a*Math.sin(f-r)]);const g=2*Math.PI+f-.01;for(let x=f;x<g;x+=r){const y=[Ee(o,h)+e+n*Math.cos(x),Ee(o,h)+i+a*Math.sin(x)];u.push(y),d.push(y)}d.push([Ee(o,h)+e+n*Math.cos(f+2*Math.PI+.5*c),Ee(o,h)+i+a*Math.sin(f+2*Math.PI+.5*c)]),d.push([Ee(o,h)+e+.98*n*Math.cos(f+c),Ee(o,h)+i+.98*a*Math.sin(f+c)]),d.push([Ee(o,h)+e+.9*n*Math.cos(f+.5*c),Ee(o,h)+i+.9*a*Math.sin(f+.5*c)])}return[d,u]}function WE(r,e,i,n,a,o,c,h,u){const d=o+Ee(.1,u),f=[];f.push([Ee(h,u)+e+.9*n*Math.cos(d-r),Ee(h,u)+i+.9*a*Math.sin(d-r)]);for(let g=d;g<=c;g+=r)f.push([Ee(h,u)+e+n*Math.cos(g),Ee(h,u)+i+a*Math.sin(g)]);return f.push([e+n*Math.cos(c),i+a*Math.sin(c)]),f.push([e+n*Math.cos(c),i+a*Math.sin(c)]),Kg(f,null,u)}function DZ(r,e,i,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:Ee(d[0],h)),c[1]+(x?0:Ee(d[0],h))]}),f=x?[a,o]:[a+Ee(d[y],h),o+Ee(d[y],h)],u.push({op:"bcurveTo",data:[r+Ee(d[y],h),e+Ee(d[y],h),i+Ee(d[y],h),n+Ee(d[y],h),f[0],f[1]]});return u}function Iu(r){return[...r]}function GE(r,e=0){const i=r.length;if(i<3)throw new Error("A curve must have at least three points.");const n=[];if(i===3)n.push(Iu(r[0]),Iu(r[1]),Iu(r[2]),Iu(r[2]));else{const a=[];a.push(r[0],r[0]);for(let h=1;h<r.length;h++)a.push(r[h]),h===r.length-1&&a.push(r[h]);const o=[],c=1-e;n.push(Iu(a[0]));for(let h=1;h+2<a.length;h++){const u=a[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*a[h+1][0]-c*a[h-1][0])/6,u[1]+(c*a[h+1][1]-c*a[h-1][1])/6],o[2]=[a[h+1][0]+(c*a[h][0]-c*a[h+2][0])/6,a[h+1][1]+(c*a[h][1]-c*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push(o[1],o[2],o[3])}}return n}function ng(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function FZ(r,e,i){const n=ng(e,i);if(n===0)return ng(r,e);let a=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/n;return a=Math.max(0,Math.min(1,a)),ng(r,pl(e,i,a))}function pl(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function n1(r,e,i,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})(r,e)<i){const h=r[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(ng(o,c))>1&&a.push(h)):a.push(h),a.push(r[e+3])}else{const u=r[e+0],d=r[e+1],f=r[e+2],g=r[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);n1([u,x,C,k],0,i,a),n1([k,_,v,g],0,i,a)}var o,c;return a}function IZ(r,e){return Vg(r,0,r.length,e)}function Vg(r,e,i,n,a){const o=a||[],c=r[e],h=r[i-1];let u=0,d=1;for(let f=e+1;f<i-1;++f){const g=FZ(r[f],c,h);g>u&&(u=g,d=f)}return Math.sqrt(u)>n?(Vg(r,e,d+1,n,o),Vg(r,d,i,n,o)):(o.length||o.push(c),o.push(h)),o}function v0(r,e=.15,i){const n=[],a=(r.length-1)/3;for(let o=0;o<a;o++)n1(r,3*o,e,n);return i&&i>0?Vg(n,0,n.length,i):n}const Rn="none";class Xg{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,i,n){return{shape:e,sets:i||[],options:n||this.defaultOptions}}line(e,i,n,a,o){const c=this._o(o);return this._d("line",[C3(e,i,n,a,c)],c)}rectangle(e,i,n,a,o){const c=this._o(o),h=[],u=jZ(e,i,n,a,c);if(c.fill){const d=[[e,i],[e+n,i],[e+n,i+a],[e,i+a]];c.fillStyle==="solid"?h.push(x0([d],c)):h.push(Lc([d],c))}return c.stroke!==Rn&&h.push(u),this._d("rectangle",h,c)}ellipse(e,i,n,a,o){const c=this._o(o),h=[],u=_3(n,a,c),d=r1(e,i,c,u);if(c.fill)if(c.fillStyle==="solid"){const f=r1(e,i,c,u).opset;f.type="fillPath",h.push(f)}else h.push(Lc([d.estimatedPoints],c));return c.stroke!==Rn&&h.push(d.opset),this._d("ellipse",h,c)}circle(e,i,n,a){const o=this.ellipse(e,i,n,n,a);return o.shape="circle",o}linearPath(e,i){const n=this._o(i);return this._d("linearPath",[ig(e,!1,n)],n)}arc(e,i,n,a,o,c,h=!1,u){const d=this._o(u),f=[],g=PE(e,i,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=PE(e,i,n,a,o,c,!0,!1,x);y.type="fillPath",f.push(y)}else f.push((function(x,y,v,C,_,k,T){const N=x,E=y;let B=Math.abs(v/2),O=Math.abs(C/2);B+=Ee(.01*B,T),O+=Ee(.01*O,T);let A=_,M=k;for(;A<0;)A+=2*Math.PI,M+=2*Math.PI;M-A>2*Math.PI&&(A=0,M=2*Math.PI);const F=(M-A)/T.curveStepCount,j=[];for(let z=A;z<=M;z+=F)j.push([N+B*Math.cos(z),E+O*Math.sin(z)]);return j.push([N+B*Math.cos(M),E+O*Math.sin(M)]),j.push([N,E]),Lc([j],T)})(e,i,n,a,o,c,d));return d.stroke!==Rn&&f.push(g),this._d("arc",f,d)}curve(e,i){const n=this._o(i),a=[],o=zE(e,n);if(n.fill&&n.fill!==Rn)if(n.fillStyle==="solid"){const c=zE(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(...v0(GE([d[0],d[0],d[1],d[2]]),10,(1+n.roughness)/2)):c.push(...v0(GE(d),10,(1+n.roughness)/2))}c.length&&a.push(Lc([c],n))}return n.stroke!==Rn&&a.push(o),this._d("curve",a,n)}polygon(e,i){const n=this._o(i),a=[],o=ig(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(x0([e],n)):a.push(Lc([e],n))),n.stroke!==Rn&&a.push(o),this._d("polygon",a,n)}path(e,i){const n=this._o(i),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=x3(b3(QC(f))),v=[];let C=[],_=[0,0],k=[];const T=()=>{k.length>=4&&C.push(...v0(k,g)),k=[]},N=()=>{T(),C.length&&(v.push(C),C=[])};for(const{key:B,data:O}of y)switch(B){case"M":N(),_=[O[0],O[1]],C.push(_);break;case"L":T(),C.push([O[0],O[1]]);break;case"C":if(!k.length){const A=C.length?C[C.length-1]:_;k.push([A[0],A[1]])}k.push([O[0],O[1]]),k.push([O[2],O[3]]),k.push([O[4],O[5]]);break;case"Z":T(),C.push([_[0],_[1]])}if(N(),!x)return v;const E=[];for(const B of v){const O=IZ(B,x);O.length&&E.push(O)}return E})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),d=qE(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const f=qE(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(x0(u,n));else a.push(Lc(u,n));return c&&(h?u.forEach((f=>{a.push(ig(f,!1,n))})):a.push(d)),this._d("path",a,n)}opsToPath(e,i){let n="";for(const a of e.ops){const o=typeof i=="number"&&i>=0?a.data.map((c=>+c.toFixed(i))):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 i=e.sets||[],n=e.options||this.defaultOptions,a=[];for(const o of i){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,i){let n=i.fillWeight;return n<0&&(n=i.strokeWidth/2),{d:this.opsToPath(e),stroke:i.fill||Rn,strokeWidth:n,fill:Rn}}_mergedShape(e){return e.filter(((i,n)=>n===0||i.op!=="move"))}}class $Z{constructor(e,i){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Xg(i)}draw(e){const i=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const c of i)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,i,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,i,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,i,n,a="nonzero"){e.beginPath();for(const o of i.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])}}i.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,i,n,a,o){const c=this.gen.line(e,i,n,a,o);return this.draw(c),c}rectangle(e,i,n,a,o){const c=this.gen.rectangle(e,i,n,a,o);return this.draw(c),c}ellipse(e,i,n,a,o){const c=this.gen.ellipse(e,i,n,a,o);return this.draw(c),c}circle(e,i,n,a){const o=this.gen.circle(e,i,n,a);return this.draw(o),o}linearPath(e,i){const n=this.gen.linearPath(e,i);return this.draw(n),n}polygon(e,i){const n=this.gen.polygon(e,i);return this.draw(n),n}arc(e,i,n,a,o,c,h=!1,u){const d=this.gen.arc(e,i,n,a,o,c,h,u);return this.draw(d),d}curve(e,i){const n=this.gen.curve(e,i);return this.draw(n),n}path(e,i){const n=this.gen.path(e,i);return this.draw(n),n}}const Lp="http://www.w3.org/2000/svg";class zZ{constructor(e,i){this.svg=e,this.gen=new Xg(i)}draw(e){const i=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Lp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of i){let u=null;switch(h.type){case"path":u=a.createElementNS(Lp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=a.createElementNS(Lp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(a,h,n)}u&&o.appendChild(u)}return o}fillSketch(e,i,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);const o=e.createElementNS(Lp,"path");return o.setAttribute("d",this.opsToPath(i,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,i){return this.gen.opsToPath(e,i)}line(e,i,n,a,o){const c=this.gen.line(e,i,n,a,o);return this.draw(c)}rectangle(e,i,n,a,o){const c=this.gen.rectangle(e,i,n,a,o);return this.draw(c)}ellipse(e,i,n,a,o){const c=this.gen.ellipse(e,i,n,a,o);return this.draw(c)}circle(e,i,n,a){const o=this.gen.circle(e,i,n,a);return this.draw(o)}linearPath(e,i){const n=this.gen.linearPath(e,i);return this.draw(n)}polygon(e,i){const n=this.gen.polygon(e,i);return this.draw(n)}arc(e,i,n,a,o,c,h=!1,u){const d=this.gen.arc(e,i,n,a,o,c,h,u);return this.draw(d)}curve(e,i){const n=this.gen.curve(e,i);return this.draw(n)}path(e,i){const n=this.gen.path(e,i);return this.draw(n)}}var ae={canvas:(r,e)=>new $Z(r,e),svg:(r,e)=>new zZ(r,e),generator:r=>new Xg(r),newSeed:()=>Xg.newSeed()},Te=L(async(r,e,i)=>{var y,v;let n;const a=e.useHtmlLabels||Is((y=ur())==null?void 0:y.htmlLabels);i?n=i:n="node default";const o=r.insert("g").attr("class",n).attr("id",e.domId||e.id),c=o.insert("g").attr("class","label").attr("style",Ti(e.labelStyle));let h;e.label===void 0?h="":h=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,d=e.labelType==="markdown",f=await $s(c,ka(Pl(h),ur()),{useHtmlLabels:a,width:e.width||((v=ur().flowchart)==null?void 0:v.wrappingWidth),classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},ur());let g=f.getBBox();const x=((e==null?void 0:e.padding)??0)/2;if(a){const C=f.children[0],_=_e(f);await UR(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"),C0=L(async(r,e,i)=>{var u,d;const n=i.useHtmlLabels??an(ur()),a=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),o=await $s(a,ka(Pl(e),ur()),{useHtmlLabels:n,width:i.width||((d=(u=ur())==null?void 0:u.flowchart)==null?void 0:d.wrappingWidth),style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=o.getBBox();const h=i.padding/2;if(an(ur())){const f=o.children[0],g=_e(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+")"),i.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:r,bbox:c,halfPadding:h,label:a}},"insertLabel"),he=L((r,e)=>{const i=e.node().getBBox();r.width=i.width,r.height=i.height},"updateNodeBounds"),ke=L((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function ar(r){const e=r.map((i,n)=>`${n===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}L(ar,"createPathFromPoints");function zo(r,e,i,n,a,o){const c=[],u=i-r,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=r+v*u,_=x+a*Math.sin(g*(C-r));c.push({x:C,y:_})}return c}L(zo,"generateFullSineWavePoints");function Bd(r,e,i,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=r+i*Math.cos(x),v=e+i*Math.sin(x);c.push({x:-y,y:-v})}return c}L(Bd,"generateCirclePoints");function a1(r){const e=Array.from(r.childNodes).filter(u=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");i.setAttribute("d",n);const a=e.find(u=>u.getAttribute("fill")!=="none"),o=e.find(u=>u.getAttribute("stroke")!=="none"),c=L((u,d)=>(u==null?void 0:u.getAttribute(d))??void 0,"getAttr");if(a){const u={fill:c(a,"fill"),"fill-opacity":c(a,"fill-opacity")??"1"};Object.entries(u).forEach(([d,f])=>{f&&i.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&&i.setAttribute(d,f)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}L(a1,"mergePaths");var PZ=L((r,e)=>{var i=r.x,n=r.y,a=e.x-i,o=e.y-n,c=r.width/2,h=r.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:i+u,y:n+d}},"intersectRect"),Mh=PZ,qZ=L(async(r,e,i,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=ur(),h=an(c);return await $s(r,o,{style:i,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Mo=qZ,Uo=L((r,e,i,n,a)=>["M",r+a,e,"H",r+i-a,"A",a,a,0,0,1,r+i,e+a,"V",e+n-a,"A",a,a,0,0,1,r+i-a,e+n,"H",r+a,"A",a,a,0,0,1,r,e+n-a,"V",e+a,"A",a,a,0,0,1,r+a,e,"Z"].join(" "),"createRoundedRectPathD"),w3=L(async(r,e)=>{Bt.info("Creating subgraph rect for ",e.id,e);const i=ur(),{themeVariables:n,handDrawnSeed:a}=i,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=oe(e),g=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=an(i),y=g.insert("g").attr("class","cluster-label ");let v;e.labelType==="markdown"?v=await $s(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}):v=await Mo(y,e.label,e.labelStyle||"",!1,!0);let C=v.getBBox();if(an(i)){const A=v.children[0],M=_e(v);C=A.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-_/2,N=e.y-k/2;Bt.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const A=ae.svg(g),M=se(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),F=A.path(Uo(T,N,_,k,0),M);E=g.insert(()=>(Bt.debug("Rough node insert CXC",F),F),":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";")),E.select("path").attr("style",f.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",N).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:B}=zC(i);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+B})`),h){const A=y.select("span");A&&A.attr("style",h)}const O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=C.height-e.padding/2,e.intersect=function(A){return Mh(e,A)},{cluster:g,labelBBox:C}},"rect"),UZ=L((r,e)=>{const i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),n=i.insert("rect",":first-child"),a=0*e.padding,o=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const c=n.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return Mh(e,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),HZ=L(async(r,e)=>{const i=ur(),{themeVariables:n,handDrawnSeed:a}=i,{altBackground:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=n,d=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=d.insert("g",":first-child"),g=d.insert("g").attr("class","cluster-label");let x=d.append("rect");const y=await Mo(g,e.label,e.labelStyle,void 0,!0);let v=y.getBBox();if(an(i)){const F=y.children[0],j=_e(y);v=F.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,N=e.height+C-v.height-6,E=e.x-k/2,B=e.y-T/2;e.width=k;const O=e.y-e.height/2-_+v.height+2;let A;if(e.look==="handDrawn"){const F=e.cssClasses.includes("statediagram-cluster-alt"),j=ae.svg(d),z=e.rx||e.ry?j.path(Uo(E,B,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):j.rectangle(E,B,k,T,{seed:a});A=d.insert(()=>z,":first-child");const U=j.rectangle(E,O,k,N,{fill:F?o:c,fillStyle:F?"hachure":"solid",stroke:u,seed:a});A=d.insert(()=>z,":first-child"),x=d.insert(()=>U)}else A=f.insert("rect",":first-child"),A.attr("class","outer").attr("x",E).attr("y",B).attr("width",k).attr("height",T).attr("data-look",e.look),x.attr("class","inner").attr("x",E).attr("y",O).attr("width",k).attr("height",N);g.attr("transform",`translate(${e.x-v.width/2}, ${B+1-(an(i)?0:3)})`);const M=A.node().getBBox();return e.height=M.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(F){return Mh(e,F)},{cluster:d,labelBBox:v}},"roundedWithTitle"),WZ=L(async(r,e)=>{Bt.info("Creating subgraph rect for ",e.id,e);const i=ur(),{themeVariables:n,handDrawnSeed:a}=i,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=oe(e),g=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=an(i),y=g.insert("g").attr("class","cluster-label "),v=await $s(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let C=v.getBBox();if(an(i)){const A=v.children[0],M=_e(v);C=A.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,T=e.x-_/2,N=e.y-k/2;Bt.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const A=ae.svg(g),M=se(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),F=A.path(Uo(T,N,_,k,e.rx),M);E=g.insert(()=>(Bt.debug("Rough node insert CXC",F),F),":first-child"),E.select("path:nth-child(2)").attr("style",d.join(";")),E.select("path").attr("style",f.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",N).attr("width",_).attr("height",k);const{subGraphTitleTopMargin:B}=zC(i);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+B})`),h){const A=y.select("span");A&&A.attr("style",h)}const O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=C.height-e.padding/2,e.intersect=function(A){return Mh(e,A)},{cluster:g,labelBBox:C}},"kanbanSection"),GZ=L((r,e)=>{const i=ur(),{themeVariables:n,handDrawnSeed:a}=i,{nodeBorder:o}=n,c=r.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 _=ae.svg(c).rectangle(g,x,d,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});y=c.insert(()=>_,":first-child")}else{y=h.insert("rect",":first-child");let C="outer";e.look,C="divider",y.attr("class",C).attr("x",g).attr("y",x).attr("width",d).attr("height",f).attr("data-look",e.look)}const v=y.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(C){return Mh(e,C)},{cluster:c,labelBBox:{}}},"divider"),YZ=w3,KZ={rect:w3,squareRect:YZ,roundedWithTitle:HZ,noteGroup:UZ,divider:GZ,kanbanSection:WZ},S3=new Map,VZ=L(async(r,e)=>{const i=e.shape||"rect",n=await KZ[i](r,e);return S3.set(e.id,n),n},"insertCluster"),mlt=L(()=>{S3=new Map},"clear");function T3(r,e){return r.intersect(e)}L(T3,"intersectNode");var XZ=T3;function E3(r,e,i,n){var a=r.x,o=r.y,c=a-n.x,h=o-n.y,u=Math.sqrt(e*e*h*h+i*i*c*c),d=Math.abs(e*i*c/u);n.x<a&&(d=-d);var f=Math.abs(e*i*h/u);return n.y<o&&(f=-f),{x:a+d,y:o+f}}L(E3,"intersectEllipse");var N3=E3;function A3(r,e,i){return N3(r,e,e,i)}L(A3,"intersectCircle");var ZZ=A3;function M3(r,e,i,n){{const a=e.y-r.y,o=r.x-e.x,c=e.x*r.y-r.x*e.y,h=a*i.x+o*i.y+c,u=a*n.x+o*n.y+c,d=1e-6;if(h!==0&&u!==0&&s1(h,u))return;const f=n.y-i.y,g=i.x-n.x,x=n.x*i.y-i.x*n.y,y=f*r.x+g*r.y+x,v=f*e.x+g*e.y+x;if(Math.abs(y)<d&&Math.abs(v)<d&&s1(y,v))return;const C=a*g-f*o;if(C===0)return;const _=Math.abs(C/2);let k=o*x-g*c;const T=k<0?(k-_)/C:(k+_)/C;k=f*c-a*x;const N=k<0?(k-_)/C:(k+_)/C;return{x:T,y:N}}}L(M3,"intersectLine");function s1(r,e){return r*e>0}L(s1,"sameSign");var QZ=M3;function B3(r,e,i){let n=r.x,a=r.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-r.width/2-c,d=a-r.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=QZ(r,i,{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-i.x,y=f.y-i.y,v=Math.sqrt(x*x+y*y),C=g.x-i.x,_=g.y-i.y,k=Math.sqrt(C*C+_*_);return v<k?-1:v===k?0:1}),o[0]):r}L(B3,"intersectPolygon");var JZ=B3,Jt={node:XZ,circle:ZZ,ellipse:N3,polygon:JZ,rect:Mh};function L3(r,e){const{labelStyles:i}=oe(e);e.labelStyle=i;const n=ke(e);let a=n;n||(a="anchor");const o=r.insert("g").attr("class",a).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,u=ae.svg(o),d=se(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",Ti(h)),he(e,g),e.intersect=function(x){return Bt.info("Circle intersect",e,c,x),Jt.circle(e,c,x)},o}L(L3,"anchor");function o1(r,e,i,n,a,o,c){const u=(r+i)/2,d=(e+n)/2,f=Math.atan2(n-e,i-r),g=(i-r)/2,x=(n-e)/2,y=g/a,v=x/o,C=Math.sqrt(y**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const _=Math.sqrt(1-C**2),k=u+_*o*Math.sin(f)*(c?-1:1),T=d-_*a*Math.cos(f)*(c?-1:1),N=Math.atan2((e-T)/o,(r-k)/a);let B=Math.atan2((n-T)/o,(i-k)/a)-N;c&&B<0&&(B+=2*Math.PI),!c&&B>0&&(B-=2*Math.PI);const O=[];for(let A=0;A<20;A++){const M=A/19,F=N+M*B,j=k+a*Math.cos(F),z=T+o*Math.sin(F);O.push({x:j,y:z})}return O}L(o1,"generateArcPoints");function O3(r,e,i){const[n,a]=[e,i].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(r/n/2)**2))}L(O3,"calculateArcSagitta");async function R3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=L(F=>F+c,"calcTotalHeight"),u=L(F=>{const j=F/2;return[j/(2.5+F/50),j]},"calcEllipseRadius"),{shapeSvg:d,bbox:f}=await Te(r,e,ke(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:f.height),[x,y]=u(g),v=O3(g,x,y),_=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+v-v,k=g,{cssStyles:T}=e,N=[{x:_/2,y:-k/2},{x:-_/2,y:-k/2},...o1(-_/2,-k/2,-_/2,k/2,x,y,!1),{x:_/2,y:k/2},...o1(_/2,k/2,_/2,-k/2,x,y,!0)],E=ae.svg(d),B=se(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=ar(N),A=E.path(O,B),M=d.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(${x/2}, 0)`),he(e,M),e.intersect=function(F){return Jt.polygon(e,N,F)},d}L(R3,"bowTieRect");function zs(r,e,i,n){return r.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+","+i/2+")")}L(zs,"insertPolygonShape");var Op=12;async function j3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?28:a,c=e.look==="neo"?24:a,{shapeSvg:h,bbox:u}=await Te(r,e,ke(e)),d=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+Op),f=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,x=d,y=-f,v=0,C=[{x:g+Op,y},{x,y},{x,y:v},{x:g,y:v},{x:g,y:y+Op},{x:g+Op,y}];let _;const{cssStyles:k}=e;if(e.look==="handDrawn"){const T=ae.svg(h),N=se(e,{}),E=ar(C),B=T.path(E,N);_=h.insert(()=>B,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),k&&_.attr("style",k)}else _=zs(h,d,f,C);return n&&_.attr("style",n),he(e,_),e.intersect=function(T){return Jt.polygon(e,C,T)},h}L(j3,"card");function D3(r,e){const{nodeStyles:i}=oe(e);e.label="";const n=r.insert("g").attr("class",ke(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=ae.svg(n),u=se(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ar(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),e.width=28,e.height=28,e.intersect=function(x){return Jt.polygon(e,c,x)},n}L(D3,"choice");async function JC(r,e,i){const{labelStyles:n,nodeStyles:a}=oe(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await Te(r,e,ke(e)),u=16,d=(i==null?void 0:i.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=ae.svg(o),v=se(e,{}),C=y.circle(0,0,f*2,v);g=o.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",Ti(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 he(e,g),e.calcIntersect=function(y,v){const C=y.width/2;return Jt.circle(y,C,v)},e.intersect=function(y){return Bt.info("Circle intersect",e,f,y),Jt.circle(e,f,y)},o}L(JC,"circle");function F3(r){const e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),n=r*2,a={x:n/2*e,y:n/2*i},o={x:-(n/2)*e,y:n/2*i},c={x:-(n/2)*e,y:-(n/2)*i},h={x:n/2*e,y:-(n/2)*i};return`M ${o.x},${o.y} L ${h.x},${h.y}
|
|
378
|
+
M ${a.x},${a.y} L ${c.x},${c.y}`}L(F3,"createLine");function I3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i,e.label="";const a=r.insert("g").attr("class",ke(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=ae.svg(a),u=se(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,o*2,u),f=F3(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),he(e,x),e.intersect=function(y){return Bt.info("crossedCircle intersect",e,{radius:o,point:y}),Jt.circle(e,o,y)},a}L(I3,"crossedCircle");function _s(r,e,i,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=r+i*Math.cos(x),v=e+i*Math.sin(x);c.push({x:-y,y:-v})}return c}L(_s,"generateCirclePoints");async function $3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Te(r,e,ke(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=ae.svg(a),_=se(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ar(y).replace("Z",""),N=C.path(T,_),E=ar(v),B=C.path(E,{..._}),O=a.insert("g",":first-child");return O.insert(()=>B,":first-child").attr("stroke-opacity",0),O.insert(()=>N,":first-child"),O.attr("class","text"),x&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-d/2+g-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),he(e,O),e.intersect=function(A){return Jt.polygon(e,v,A)},a}L($3,"curlyBraceLeft");function ks(r,e,i,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=r+i*Math.cos(x),v=e+i*Math.sin(x);c.push({x:y,y:v})}return c}L(ks,"generateCirclePoints");async function z3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Te(r,e,ke(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=ae.svg(a),_=se(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ar(y).replace("Z",""),N=C.path(T,_),E=ar(v),B=C.path(E,{..._}),O=a.insert("g",":first-child");return O.insert(()=>B,":first-child").attr("stroke-opacity",0),O.insert(()=>N,":first-child"),O.attr("class","text"),x&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),he(e,O),e.intersect=function(A){return Jt.polygon(e,v,A)},a}L(z3,"curlyBraceRight");function Ri(r,e,i,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=r+i*Math.cos(x),v=e+i*Math.sin(x);c.push({x:-y,y:-v})}return c}L(Ri,"generateCirclePoints");async function P3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Te(r,e,ke(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=[...Ri(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},...Ri(d/2+g*2,-g,g,20,-180,-270),...Ri(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},...Ri(d/2,f/2,g,20,0,90)],v=[...Ri(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Ri(-d/2-g/2,-g,g,20,0,90),...Ri(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Ri(-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},...Ri(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},...Ri(d/2+g*2,-g,g,20,-180,-270),...Ri(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:f/2},...Ri(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},...Ri(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Ri(-d/2-g/2,-g,g,20,0,90),...Ri(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Ri(-d/2+g+g/2,f/2,g,30,-180,-270)],_=ae.svg(a),k=se(e,{fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const N=ar(y).replace("Z",""),E=_.path(N,k),O=ar(v).replace("Z",""),A=_.path(O,k),M=ar(C),F=_.path(M,{...k}),j=a.insert("g",":first-child");return j.insert(()=>F,":first-child").attr("stroke-opacity",0),j.insert(()=>E,":first-child"),j.insert(()=>A,":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))})`),he(e,j),e.intersect=function(z){return Jt.polygon(e,C,z)},a}L(P3,"curlyBraces");async function q3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(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=ae.svg(d),_=se(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=g,T=x,N=k-y,E=T/4,B=[{x:N,y:0},{x:E,y:0},{x:0,y:T/2},{x:E,y:T},{x:N,y:T},...Bd(-N,-T/2,y,50,270,90)],O=ar(B),A=C.path(O,_),M=d.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&M.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&M.selectChildren("path").attr("style",n),M.attr("transform",`translate(${-g/2}, ${-x/2})`),he(e,M),e.intersect=function(F){return Jt.polygon(e,B,F)},d}L(q3,"curvedTrapezoid");var tQ=L((r,e,i,n,a,o)=>[`M${r},${e+o}`,`a${a},${o} 0,0,0 ${i},0`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),eQ=L((r,e,i,n,a,o)=>[`M${r},${e+o}`,`M${r+i},${e+o}`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),rQ=L((r,e,i,n,a,o)=>[`M${r-i/2},${-n/2}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),YE=8,KE=8;async function U3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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<KE&&(e.width=KE);const T=_/2/(2.5+_/50);e.height=(e.height??0)-o-T*3,e.height<YE&&(e.height=YE)}const{shapeSvg:h,bbox:u,label:d}=await Te(r,e,ke(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 _=ae.svg(h),k=eQ(0,0,f,y,g,x),T=rQ(0,x,f,y,g,x),N=se(e,{}),E=_.path(k,N),B=_.path(T,se(e,{fill:"none"}));v=h.insert(()=>B,":first-child"),v=h.insert(()=>E,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const _=tQ(0,0,f,y,g,x);v=h.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",Ti(C)).attr("style",n)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),he(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=Jt.rect(e,_),T=k.x-(e.x??0);if(g!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(k.y-(e.y??0))>(e.height??0)/2-x)){let N=x*x*(1-T*T/(g*g));N>0&&(N=Math.sqrt(N)),N=x-N,_.y-(e.y??0)>0&&(N=-N),k.y+=N}return k},h}L(U3,"cylinder");async function H3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Te(r,e,ke(e)),d=h.width+a,f=h.height+o,g=f*.2,x=-d/2,y=-f/2-g/2,{cssStyles:v}=e,C=ae.svg(c),_=se(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],T=C.polygon(k.map(E=>[E.x,E.y]),_),N=c.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),u.attr("transform",`translate(${x+(e.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(e.padding??0)/2-(h.y-(h.top??0))})`),he(e,N),e.intersect=function(E){return Jt.rect(e,E)},c}L(H3,"dividedRectangle");async function W3(r,e){var y,v;const{labelStyles:i,nodeStyles:n}=oe(e),a=e.look==="neo"?12:5;e.labelStyle=i;const o=e.padding??0,c=e.look==="neo"?16:o,{shapeSvg:h,bbox:u}=await Te(r,e,ke(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=ae.svg(h),_=se(e,{roughness:.2,strokeWidth:2.5}),k=se(e,{roughness:.2,strokeWidth:1.5}),T=C.circle(0,0,d*2,_),N=C.circle(0,0,f*2,k);g=h.insert("g",":first-child"),g.attr("class",Ti(e.cssClasses)).attr("style",Ti(x)),(y=g.node())==null||y.appendChild(T),(v=g.node())==null||v.appendChild(N)}else{g=h.insert("g",":first-child");const C=g.insert("circle",":first-child"),_=g.insert("circle");g.attr("class","basic label-container").attr("style",n),C.attr("class","outer-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0),_.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return he(e,g),e.intersect=function(C){return Bt.info("DoubleCircle intersect",e,d,C),Jt.circle(e,d,C)},h}L(W3,"doublecircle");function G3(r,e,{config:{themeVariables:i}}){const{labelStyles:n,nodeStyles:a}=oe(e);e.label="",e.labelStyle=n;const o=r.insert("g").attr("class",ke(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=ae.svg(o),{nodeBorder:d}=i,f=se(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),he(e,x),e.intersect=function(y){return Bt.info("filledCircle intersect",e,{radius:c,point:y}),Jt.circle(e,c,y)},o}L(G3,"filledCircle");var VE=10,XE=10;async function Y3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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<VE&&(e.height=VE),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<XE&&(e.width=XE));const{shapeSvg:c,bbox:h,label:u}=await Te(r,e,ke(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=ae.svg(c),C=se(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=ar(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,he(e,T),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(N){return Bt.info("Triangle intersect",e,x,N),Jt.polygon(e,x,N)},c}L(Y3,"flippedTriangle");function K3(r,e,{dir:i,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=oe(e);e.label="";const c=r.insert("g").attr("class",ke(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);i==="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=ae.svg(c),y=se(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),he(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 Jt.rect(e,k)},c}L(K3,"forkJoin");async function V3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(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=ae.svg(u),C=se(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-f/2,y:-g/2},{x:f/2-x,y:-g/2},...Bd(-f/2+x,0,x,50,90,270),{x:f/2-x,y:g/2},{x:-f/2,y:g/2}],k=ar(_),T=v.path(k,C),N=u.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",n),he(e,N),e.intersect=function(E){return Bt.info("Pill intersect",e,{radius:x,point:E}),Jt.polygon(e,_,E)},u}L(V3,"halfRoundedRectangle");var iQ=L((r,e,i,n,a)=>[`M${r+a},${e}`,`L${r+i-a},${e}`,`L${r+i},${e-n/2}`,`L${r+i-a},${e-n}`,`L${r+a},${e-n}`,`L${r},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function X3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e),a=e.look==="neo"?3.5:4;e.labelStyle=i;const o=e.padding??0,c=70,h=32,u=e.look==="neo"?c:o,d=e.look==="neo"?h:o;if(e.width||e.height){const N=(e.height??0)/a;e.width=((e==null?void 0:e.width)??0)-2*N-d,e.height=(e.height??0)-u}const{shapeSvg:f,bbox:g}=await Te(r,e,ke(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=ae.svg(f),N=se(e,{}),E=iQ(0,0,v,x,y),B=T.path(E,N);_=f.insert(()=>B,":first-child").attr("transform",`translate(${-v/2}, ${x/2})`),k&&_.attr("style",k)}else _=zs(f,v,x,C);return n&&_.attr("style",n),e.width=v,e.height=x,he(e,_),e.intersect=function(T){return Jt.polygon(e,C,T)},f}L(X3,"hexagon");async function Z3(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.label="",e.labelStyle=i;const{shapeSvg:a}=await Te(r,e,ke(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=ae.svg(a),d=se(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=ar(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})`),he(e,y),e.intersect=function(v){return Bt.info("Pill intersect",e,{points:f}),Jt.polygon(e,f,v)},a}L(Z3,"hourglass");async function Q3(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=oe(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 Te(r,e,"icon-shape default"),x=e.pos==="t",y=h,v=h,{nodeBorder:C}=i,{stylesMap:_}=Ah(e),k=-v/2,T=-y/2,N=e.label?8:0,E=ae.svg(d),B=se(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=E.rectangle(k,T,v,y,B),A=Math.max(v,f.width),M=y+f.height+N,F=E.rectangle(-A/2,-M/2,A,M,{...B,fill:"transparent",stroke:"none"}),j=d.insert(()=>O,":first-child"),z=d.insert(()=>F);if(e.icon){const U=d.append("g");U.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const V=U.node().getBBox(),I=V.width,G=V.height,D=V.x,W=V.y;U.attr("transform",`translate(${-I/2-D},${x?f.height/2+N/2-G/2-W:-f.height/2-N/2-G/2-W})`),U.attr("style",`color: ${_.get("stroke")??C};`)}return g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${x?-M/2:M/2-f.height})`),j.attr("transform",`translate(0,${x?f.height/2+N/2:-f.height/2-N/2})`),he(e,z),e.intersect=function(U){if(Bt.info("iconSquare intersect",e,U),!e.label)return Jt.rect(e,U);const V=e.x??0,I=e.y??0,G=e.height??0;let D=[];return x?D=[{x:V-f.width/2,y:I-G/2},{x:V+f.width/2,y:I-G/2},{x:V+f.width/2,y:I-G/2+f.height+N},{x:V+v/2,y:I-G/2+f.height+N},{x:V+v/2,y:I+G/2},{x:V-v/2,y:I+G/2},{x:V-v/2,y:I-G/2+f.height+N},{x:V-f.width/2,y:I-G/2+f.height+N}]:D=[{x:V-v/2,y:I-G/2},{x:V+v/2,y:I-G/2},{x:V+v/2,y:I-G/2+y},{x:V+f.width/2,y:I-G/2+y},{x:V+f.width/2/2,y:I+G/2},{x:V-f.width/2,y:I+G/2},{x:V-f.width/2,y:I-G/2+y},{x:V-v/2,y:I-G/2+y}],Jt.polygon(e,D,U)},d}L(Q3,"icon");async function J3(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=oe(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 Te(r,e,"icon-shape default"),x=20,y=e.label?8:0,v=e.pos==="t",{nodeBorder:C,mainBkg:_}=i,{stylesMap:k}=Ah(e),T=ae.svg(d),N=se(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const E=k.get("fill");N.stroke=E??_;const B=d.append("g");e.icon&&B.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const O=B.node().getBBox(),A=O.width,M=O.height,F=O.x,j=O.y,z=Math.max(A,M)*Math.SQRT2+x*2,U=T.circle(0,0,z,N),V=Math.max(z,f.width),I=z+f.height+y,G=T.rectangle(-V/2,-I/2,V,I,{...N,fill:"transparent",stroke:"none"}),D=d.insert(()=>U,":first-child"),W=d.insert(()=>G);return B.attr("transform",`translate(${-A/2-F},${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?-I/2:I/2-f.height})`),D.attr("transform",`translate(0,${v?f.height/2+y/2:-f.height/2-y/2})`),he(e,W),e.intersect=function(K){return Bt.info("iconSquare intersect",e,K),Jt.rect(e,K)},d}L(J3,"iconCircle");async function t5(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=oe(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 Te(r,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:k}=i,{stylesMap:T}=Ah(e),N=-C/2,E=-v/2,B=e.label?8:0,O=ae.svg(d),A=se(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const F=O.path(Uo(N,E,C,v,5),A),j=Math.max(C,f.width),z=v+f.height+B,U=O.rectangle(-j/2,-z/2,j,z,{...A,fill:"transparent",stroke:"none"}),V=d.insert(()=>F,":first-child").attr("class","icon-shape2"),I=d.insert(()=>U);if(e.icon){const G=d.append("g");G.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=G.node().getBBox(),W=D.width,K=D.height,tt=D.x,nt=D.y;G.attr("transform",`translate(${-W/2-tt},${y?f.height/2+B/2-K/2-nt:-f.height/2-B/2-K/2-nt})`),G.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-z/2:z/2-f.height})`),V.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),he(e,I),e.intersect=function(G){if(Bt.info("iconSquare intersect",e,G),!e.label)return Jt.rect(e,G);const D=e.x??0,W=e.y??0,K=e.height??0;let tt=[];return y?tt=[{x:D-f.width/2,y:W-K/2},{x:D+f.width/2,y:W-K/2},{x:D+f.width/2,y:W-K/2+f.height+B},{x:D+C/2,y:W-K/2+f.height+B},{x:D+C/2,y:W+K/2},{x:D-C/2,y:W+K/2},{x:D-C/2,y:W-K/2+f.height+B},{x:D-f.width/2,y:W-K/2+f.height+B}]:tt=[{x:D-C/2,y:W-K/2},{x:D+C/2,y:W-K/2},{x:D+C/2,y:W-K/2+v},{x:D+f.width/2,y:W-K/2+v},{x:D+f.width/2/2,y:W+K/2},{x:D-f.width/2,y:W+K/2},{x:D-f.width/2,y:W-K/2+v},{x:D-C/2,y:W-K/2+v}],Jt.polygon(e,tt,G)},d}L(t5,"iconRounded");async function e5(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=oe(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 Te(r,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:k}=i,{stylesMap:T}=Ah(e),N=-C/2,E=-v/2,B=e.label?8:0,O=ae.svg(d),A=se(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const M=T.get("fill");A.stroke=M??k;const F=O.path(Uo(N,E,C,v,.1),A),j=Math.max(C,f.width),z=v+f.height+B,U=O.rectangle(-j/2,-z/2,j,z,{...A,fill:"transparent",stroke:"none"}),V=d.insert(()=>F,":first-child"),I=d.insert(()=>U);if(e.icon){const G=d.append("g");G.html(`<g>${await Zd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=G.node().getBBox(),W=D.width,K=D.height,tt=D.x,nt=D.y;G.attr("transform",`translate(${-W/2-tt},${y?f.height/2+B/2-K/2-nt:-f.height/2-B/2-K/2-nt})`),G.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-z/2:z/2-f.height})`),V.attr("transform",`translate(0,${y?f.height/2+B/2:-f.height/2-B/2})`),he(e,I),e.intersect=function(G){if(Bt.info("iconSquare intersect",e,G),!e.label)return Jt.rect(e,G);const D=e.x??0,W=e.y??0,K=e.height??0;let tt=[];return y?tt=[{x:D-f.width/2,y:W-K/2},{x:D+f.width/2,y:W-K/2},{x:D+f.width/2,y:W-K/2+f.height+B},{x:D+C/2,y:W-K/2+f.height+B},{x:D+C/2,y:W+K/2},{x:D-C/2,y:W+K/2},{x:D-C/2,y:W-K/2+f.height+B},{x:D-f.width/2,y:W-K/2+f.height+B}]:tt=[{x:D-C/2,y:W-K/2},{x:D+C/2,y:W-K/2},{x:D+C/2,y:W-K/2+v},{x:D+f.width/2,y:W-K/2+v},{x:D+f.width/2/2,y:W+K/2},{x:D-f.width/2,y:W+K/2},{x:D-f.width/2,y:W-K/2+v},{x:D-C/2,y:W-K/2+v}],Jt.polygon(e,tt,G)},d}L(e5,"iconSquare");async function r5(r,e,{config:{flowchart:i}}){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}=oe(e);e.labelStyle=c;const h=i==null?void 0:i.wrappingWidth;e.defaultWidth=i==null?void 0:i.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 Te(r,e,"image-shape default"),v=e.pos==="t",C=-d/2,_=-f/2,k=e.label?8:0,T=ae.svg(g),N=se(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const E=T.rectangle(C,_,d,f,N),B=Math.max(d,x.width),O=f+x.height+k,A=T.rectangle(-B/2,-O/2,B,O,{...N,fill:"none",stroke:"none"}),M=g.insert(()=>E,":first-child"),F=g.insert(()=>A);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?O/2-f:-O/2})`)}return y.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${v?-f/2-x.height/2-k/2:f/2-x.height/2+k/2})`),M.attr("transform",`translate(0,${v?x.height/2+k/2:-x.height/2-k/2})`),he(e,F),e.intersect=function(j){if(Bt.info("iconSquare intersect",e,j),!e.label)return Jt.rect(e,j);const z=e.x??0,U=e.y??0,V=e.height??0;let I=[];return v?I=[{x:z-x.width/2,y:U-V/2},{x:z+x.width/2,y:U-V/2},{x:z+x.width/2,y:U-V/2+x.height+k},{x:z+d/2,y:U-V/2+x.height+k},{x:z+d/2,y:U+V/2},{x:z-d/2,y:U+V/2},{x:z-d/2,y:U-V/2+x.height+k},{x:z-x.width/2,y:U-V/2+x.height+k}]:I=[{x:z-d/2,y:U-V/2},{x:z+d/2,y:U-V/2},{x:z+d/2,y:U-V/2+f},{x:z+x.width/2,y:U-V/2+f},{x:z+x.width/2/2,y:U+V/2},{x:z-x.width/2,y:U+V/2},{x:z-x.width/2,y:U-V/2+f},{x:z-d/2,y:U-V/2+f}],Jt.polygon(e,I,j)},g}L(r5,"imageSquare");async function i5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Te(r,e,ke(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=ae.svg(h),C=se(e,{}),_=ar(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),y&&x.attr("style",y)}else x=zs(h,d,f,g);return n&&x.attr("style",n),e.width=d,e.height=f,he(e,x),e.intersect=function(v){return Jt.polygon(e,g,v)},h}L(i5,"inv_trapezoid");async function Jd(r,e,i){const{labelStyles:n,nodeStyles:a}=oe(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await Te(r,e,ke(e)),h=Math.max(c.width+i.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(c.height+i.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(i!=null&&i.rx&&i.ry&&(x=i.rx,y=i.ry),e.look==="handDrawn"){const C=ae.svg(o),_=se(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",Ti(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",Ti(x)).attr("ry",Ti(y)).attr("x",d).attr("y",f).attr("width",h).attr("height",u);return he(e,g),e.calcIntersect=function(C,_){return Jt.rect(C,_)},e.intersect=function(C){return Jt.rect(e,C)},o}L(Jd,"drawRect");async function n5(r,e){const{shapeSvg:i,bbox:n,label:a}=await Te(r,e,"label"),o=i.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),he(e,o),e.intersect=function(u){return Jt.rect(e,u)},i}L(n5,"labelRect");async function a5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Te(r,e,ke(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=ae.svg(h),C=se(e,{}),_=ar(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),y&&x.attr("style",y)}else x=zs(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,he(e,x),e.intersect=function(v){return Jt.polygon(e,g,v)},h}L(a5,"lean_left");async function s5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Te(r,e,ke(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=ae.svg(h),C=se(e,{}),_=ar(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),y&&x.attr("style",y)}else x=zs(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,he(e,x),e.intersect=function(v){return Jt.polygon(e,g,v)},h}L(s5,"lean_right");function o5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.label="",e.labelStyle=i;const a=r.insert("g").attr("class",ke(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=ae.svg(a),g=se(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ar(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})`),he(e,v),e.intersect=function(C){return Bt.info("lightningBolt intersect",e,C),Jt.polygon(e,d,C)},a}L(o5,"lightningBolt");var nQ=L((r,e,i,n,a,o,c)=>[`M${r},${e+o}`,`a${a},${o} 0,0,0 ${i},0`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`,`M${r},${e+o+c}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),aQ=L((r,e,i,n,a,o,c)=>[`M${r},${e+o}`,`M${r+i},${e+o}`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`,`M${r},${e+o+c}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),sQ=L((r,e,i,n,a,o)=>[`M${r-i/2},${-n/2}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),ZE=10,QE=10;async function l5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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<QE&&(e.width=QE);const N=k/2/(2.5+k/50);e.height=(e.height??0)-c-N*3,e.height<ZE&&(e.height=ZE)}const{shapeSvg:h,bbox:u,label:d}=await Te(r,e,ke(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=ae.svg(h),T=aQ(0,0,f,y,g,x,v),N=sQ(0,x,f,y,g,x),E=se(e,{}),B=k.path(T,E),O=k.path(N,E);h.insert(()=>O,":first-child").attr("class","line"),C=h.insert(()=>B,":first-child"),C.attr("class","basic label-container"),_&&C.attr("style",_)}else{const k=nQ(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",Ti(_)).attr("style",n)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-f/2}, ${-(y/2+x)})`),he(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=Jt.rect(e,k),N=T.x-(e.x??0);if(g!=0&&(Math.abs(N)<(e.width??0)/2||Math.abs(N)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-x)){let E=x*x*(1-N*N/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,k.y-(e.y??0)>0&&(E=-E),T.y+=E}return T},h}L(l5,"linedCylinder");async function c5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;if(e.width||e.height){const E=e.width;e.width=(E??0)*10/11-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:d}=await Te(r,e,ke(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=ae.svg(h),_=se(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:-f/2-f/2*.1,y:-y/2},{x:-f/2-f/2*.1,y:y/2},...zo(-f/2-f/2*.1,y/2,f/2+f/2*.1,y/2,x,.8),{x:f/2+f/2*.1,y:-y/2},{x:-f/2-f/2*.1,y:-y/2},{x:-f/2,y:-y/2},{x:-f/2,y:y/2*1.1},{x:-f/2,y:-y/2}],T=C.polygon(k.map(E=>[E.x,E.y]),_),N=h.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(0,${-x/2})`),d.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*.1/2-(u.x-(u.left??0))},${-g/2+(e.padding??0)-x/2-(u.y-(u.top??0))})`),he(e,N),e.intersect=function(E){return Jt.polygon(e,k,E)},h}L(c5,"linedWaveEdgedRect");async function h5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(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=ae.svg(u),N=se(e,{}),E=[{x:C-h,y:_+h},{x:C-h,y:_+v+h},{x:C+y-h,y:_+v+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_+v-h},{x:C+y+h,y:_+v-h},{x:C+y+h,y:_-h},{x:C+h,y:_-h},{x:C+h,y:_},{x:C,y:_},{x:C,y:_+h}],B=[{x:C,y:_+h},{x:C+y-h,y:_+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_},{x:C,y:_}];e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const O=ar(E);let A=T.path(O,N);const M=ar(B);let F=T.path(M,N);e.look!=="handDrawn"&&(A=a1(A),F=a1(F));const j=u.insert("g",":first-child");return j.insert(()=>A),j.insert(()=>F),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))})`),he(e,j),e.intersect=function(z){return Jt.polygon(e,E,z)},u}L(h5,"multiRect");async function u5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Te(r,e,ke(e)),h=e.padding??0,u=e.look==="neo"?16:h,d=e.look==="neo"?12:h;let f=!0;(e.width||e.height)&&(f=!1,e.width=((e==null?void 0:e.width)??0)-u*2,e.height=((e==null?void 0:e.height)??0)-d*3);const g=Math.max(o.width,(e==null?void 0:e.width)??0)+u*2,x=Math.max(o.height,(e==null?void 0:e.height)??0)+d*3,y=e.look==="neo"?x/4:x/8,v=x+(f?y/2:-y/2),C=-g/2,_=-v/2,k=10,{cssStyles:T}=e,N=zo(C-k,_+v+k,C+g-k,_+v+k,y,.8),E=N==null?void 0:N[N.length-1],B=[{x:C-k,y:_+k},{x:C-k,y:_+v+k},...N,{x:C+g-k,y:E.y-k},{x:C+g,y:E.y-k},{x:C+g,y:E.y-2*k},{x:C+g+k,y:E.y-2*k},{x:C+g+k,y:_-k},{x:C+k,y:_-k},{x:C+k,y:_},{x:C,y:_},{x:C,y:_+k}],O=[{x:C,y:_+k},{x:C+g-k,y:_+k},{x:C+g-k,y:E.y-k},{x:C+g,y:E.y-k},{x:C+g,y:_},{x:C,y:_}],A=ae.svg(a),M=se(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const F=ar(B),j=A.path(F,M),z=ar(O),U=A.path(z,M),V=a.insert(()=>j,":first-child");return V.insert(()=>U),V.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&V.selectAll("path").attr("style",n),V.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))})`),he(e,V),e.intersect=function(I){return Jt.polygon(e,B,I)},a}L(u5,"multiWaveEdgedRectangle");async function d5(r,e,{config:{themeVariables:i}}){const{labelStyles:n,nodeStyles:a}=oe(e);e.labelStyle=n,e.useHtmlLabels||an(Vr())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await Te(r,e,ke(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=ae.svg(c),C=se(e,{fill:i.noteBkgColor,stroke:i.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))})`),he(e,k),e.intersect=function(T){return Jt.rect(e,T)},c}L(d5,"note");var oQ=L((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function f5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await Te(r,e,ke(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=ae.svg(a),v=se(e,{}),C=oQ(0,0,u),_=y.path(C,v);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),x&&g.attr("style",x)}else g=zs(a,u,u,f),g.attr("transform",`translate(${-u/2+d}, ${u/2})`);return n&&g.attr("style",n),he(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=Jt.polygon(y,_,v);return{x:k.x-.5,y:k.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}L(f5,"question");async function p5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(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=ae.svg(h),T=se(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const N=ar(C),E=k.path(N,T),B=h.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${-v/2},0)`),d.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),he(e,B),e.intersect=function(O){return Jt.polygon(e,C,O)},h}L(p5,"rect_left_inv_arrow");async function g5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const o=r.insert("g").attr("class",a).attr("id",e.domId||e.id),c=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",n),u=e.description,d=e.label,f=await Mo(h,d,e.labelStyle,!0,!0);let g={width:0,height:0};if(an(ur())){const M=f.children[0],F=_e(f);g=M.getBoundingClientRect(),F.attr("width",g.width),F.attr("height",g.height)}Bt.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],_=_e(v);g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height);const k=(e.padding||0)/2;_e(v).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+k+5)+")"),_e(f).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-k+3)+")");const T=g.width+(e.padding||0),N=g.height+(e.padding||0),E=-g.width/2-k,B=-g.height/2-k;let O,A;if(e.look==="handDrawn"){const M=ae.svg(o),F=se(e,{}),j=M.path(Uo(E,B,T,N,e.rx||0),F),z=M.line(-g.width/2-k,-g.height/2-k+y.height+k,g.width/2+k,-g.height/2-k+y.height+k,F);A=o.insert(()=>(Bt.debug("Rough node insert CXC",j),z),":first-child"),O=o.insert(()=>(Bt.debug("Rough node insert CXC",j),j),":first-child")}else O=c.insert("rect",":first-child"),A=c.insert("line"),O.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-k).attr("y",-g.height/2-k).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),A.attr("class","divider").attr("x1",-g.width/2-k).attr("x2",g.width/2+k).attr("y1",-g.height/2-k+y.height+k).attr("y2",-g.height/2-k+y.height+k);return he(e,O),e.intersect=function(M){return Jt.rect(e,M)},o}L(g5,"rectWithTitle");async function m5(r,e,{config:{themeVariables:i}}){const n=(i==null?void 0:i.radius)??5,a={rx:n,ry:n,labelPaddingX:((e==null?void 0:e.padding)??0)*1,labelPaddingY:((e==null?void 0:e.padding)??0)*1};return Jd(r,e,a)}L(m5,"roundedRect");var hl=8;async function y5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Te(r,e,ke(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,_=ae.svg(c),k=se(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x:y,y:v},{x:y+g,y:v},{x:y+g,y:v+x},{x:y-hl,y:v+x},{x:y-hl,y:v},{x:y,y:v},{x:y,y:v+x}],N=_.polygon(T.map(B=>[B.x,B.y]),k),E=c.insert(()=>N,":first-child");return E.attr("class","basic label-container outer-path").attr("style",Ti(C)),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),C&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${hl/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),he(e,E),e.intersect=function(B){return Jt.rect(e,B)},c}L(y5,"shadedProcess");async function b5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(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=ae.svg(h),T=se(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const N=[{x:v,y:C},{x:v,y:C+y},{x:v+x,y:C+y},{x:v+x,y:C-y/2}],E=ar(N),B=k.path(E,T),O=h.insert(()=>B,":first-child");return O.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",_),n&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",n),O.attr("transform",`translate(0, ${y/4})`),d.attr("transform",`translate(${-x/2+(e.padding??0)-(u.x-(u.left??0))}, ${-y/4+(e.padding??0)-(u.y-(u.top??0))})`),he(e,O),e.intersect=function(A){return Jt.polygon(e,N,A)},h}L(b5,"slopedRect");async function x5(r,e){const i=e.padding??0,n=e.look==="neo"?16:i*2,a=e.look==="neo"?12:i,o={rx:0,ry:0,labelPaddingX:e.labelPaddingX??n,labelPaddingY:a};return Jd(r,e,o)}L(x5,"squareRect");async function v5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?20:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Te(r,e,ke(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=ae.svg(h),v=se(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-f/2+g,y:-d/2},{x:f/2-g,y:-d/2},...Bd(-f/2+g,0,g,50,90,270),{x:f/2-g,y:d/2},...Bd(f/2-g,0,g,50,270,450)],_=ar(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),he(e,T),e.intersect=function(N){return Jt.polygon(e,C,N)},h}L(v5,"stadium");async function C5(r,e){const i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Jd(r,e,i)}L(C5,"state");function _5(r,e,{config:{themeVariables:i}}){var T,N;const{labelStyles:n,nodeStyles:a}=oe(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:d}=i;(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=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=ae.svg(f),x=se(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),v=h??u,C=(e.width??0)*5/14,_=g.circle(0,0,C,{...x,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),k=f.insert(()=>y,":first-child");if(k.insert(()=>_),e.look!=="handDrawn"&&k.attr("class","outer-path"),o&&k.selectAll("path").attr("style",o),a&&k.selectAll("path").attr("style",a),e.width<25&&d&&e.look!=="handDrawn"){const E=((N=(T=r.node())==null?void 0:T.ownerSVGElement)==null?void 0:N.id)??"",B=E?`${E}-drop-shadow-small`:"drop-shadow-small";k.attr("style",`filter:url(#${B})`)}return he(e,k),e.intersect=function(E){return Jt.circle(e,(e.width??0)/2,E)},f}L(_5,"stateEnd");function k5(r,e,{config:{themeVariables:i}}){var h,u;const{lineColor:n,nodeShadow:a}=i;(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=r.insert("g").attr("class","node default").attr("id",e.domId||e.id);let c;if(e.look==="handDrawn"){const f=ae.svg(o).circle(0,0,e.width,mX(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=r.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 he(e,c),e.intersect=function(d){return Jt.circle(e,(e.width??7)/2,d)},o}L(k5,"stateStart");var Oc=8;async function w5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(e)),d=((e==null?void 0:e.width)??u.width)+2*Oc+o,f=((e==null?void 0:e.height)??u.height)+c,g=d-2*Oc,x=f,y=-d/2,v=-f/2,C=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){const _=ae.svg(h),k=se(e,{}),T=_.rectangle(y,v,g+16,x,k),N=_.line(y+Oc,v,y+Oc,v+x,k),E=_.line(y+Oc+g,v,y+Oc+g,v+x,k);h.insert(()=>N,":first-child"),h.insert(()=>E,":first-child");const B=h.insert(()=>T,":first-child"),{cssStyles:O}=e;B.attr("class","basic label-container").attr("style",Ti(O)),he(e,B)}else{const _=zs(h,g,x,C);n&&_.attr("style",n),he(e,_)}return e.intersect=function(_){return Jt.polygon(e,C,_)},h}L(w5,"subroutine");var _0=.2;async function S5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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-_0*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await Te(r,e,ke(e)),d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,f=_0*d,g=_0*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=ae.svg(h),N=se(e,{}),E=[{x:C-f/2,y:_},{x:C+y+f/2,y:_},{x:C+y+f/2,y:_+v},{x:C-f/2,y:_+v}],B=[{x:C+y-f/2,y:_+v},{x:C+y+f/2,y:_+v},{x:C+y+f/2,y:_+v-g}];e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const O=ar(E),A=T.path(O,N),M=ar(B),F=T.path(M,{...N,fillStyle:"solid"}),j=h.insert(()=>F,":first-child");return j.insert(()=>A,":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),he(e,j),e.intersect=function(z){return Jt.polygon(e,E,z)},h}L(S5,"taggedRect");async function T5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await Te(r,e,ke(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=ae.svg(a),C=se(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-h/2-h/2*.1,y:x/2},...zo(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,d,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],k=-h/2+h/2*.1,T=-x/2-g*.4,N=[{x:k+h-f,y:(T+u)*1.3},{x:k+h,y:T+u-g},{x:k+h,y:(T+u)*.9},...zo(k+h,(T+u)*1.25,k+h-f,(T+u)*1.3,-u*.02,.5)],E=ar(_),B=v.path(E,C),O=ar(N),A=v.path(O,{...C,fillStyle:"solid"}),M=a.insert(()=>A,":first-child");return M.insert(()=>B,":first-child"),M.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),he(e,M),e.intersect=function(F){return Jt.polygon(e,_,F)},a}L(T5,"taggedWaveEdgedRectangle");async function E5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await Te(r,e,ke(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),he(e,f),e.intersect=function(g){return Jt.rect(e,g)},a}L(E5,"text");var lQ=L((r,e,i,n,a,o)=>`M${r},${e}
|
|
379
|
+
a${a},${o} 0,0,1 0,${-n}
|
|
380
|
+
l${i},0
|
|
381
|
+
a${a},${o} 0,0,1 0,${n}
|
|
382
|
+
M${i},${-n}
|
|
383
|
+
a${a},${o} 0,0,0 0,${n}
|
|
384
|
+
l${-i},0`,"createCylinderPathD"),cQ=L((r,e,i,n,a,o)=>[`M${r},${e}`,`M${r+i},${e}`,`a${a},${o} 0,0,0 0,${-n}`,`l${-i},0`,`a${a},${o} 0,0,0 0,${n}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),hQ=L((r,e,i,n,a,o)=>[`M${r+i/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),JE=5,tN=10;async function N5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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<JE&&(e.height=JE);const k=C/2/(2.5+C/50);e.width=(e.width??0)-o-k*3,e.width<tN&&(e.width=tN)}const{shapeSvg:c,bbox:h,label:u}=await Te(r,e,ke(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=ae.svg(c),_=cQ(0,0,x,d,g,f),k=hQ(0,0,x,d,g,f),T=C.path(_,se(e,{})),N=C.path(k,se(e,{fill:"none"}));v=c.insert(()=>N,":first-child"),v=c.insert(()=>T,":first-child"),v.attr("class","basic label-container"),y&&v.attr("style",y)}else{const C=lQ(0,0,x,d,g,f);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Ti(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))})`),he(e,v),e.intersect=function(C){const _=Jt.rect(e,C),k=_.y-(e.y??0);if(f!=0&&(Math.abs(k)<(e.height??0)/2||Math.abs(k)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-g)){let T=g*g*(1-k*k/(f*f));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,C.x-(e.x??0)>0&&(T=-T),_.x+=T}return _},c}L(N5,"tiltedCylinder");async function A5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=(e.look==="neo",a),c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Te(r,e,ke(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=ae.svg(h),C=se(e,{}),_=ar(g),k=v.path(_,C);x=h.insert(()=>k,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),y&&x.attr("style",y)}else x=zs(h,f,d,g);return n&&x.attr("style",n),e.width=f,e.height=d,he(e,x),e.intersect=function(v){return Jt.polygon(e,g,v)},h}L(A5,"trapezoid");async function M5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(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=ae.svg(d),C=se(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=ar(_),T=v.path(k,C),N=d.insert(()=>T,":first-child");return N.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",n),he(e,N),e.intersect=function(E){return Jt.polygon(e,_,E)},d}L(M5,"trapezoidalPentagon");var eN=10,rN=10;async function B5(r,e){var E;const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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<rN&&(e.width=rN),e.height=(e==null?void 0:e.height)??0,e.height<eN&&(e.height=eN));const{shapeSvg:c,bbox:h,label:u}=await Te(r,e,ke(e)),d=Is((E=ur().flowchart)==null?void 0:E.htmlLabels),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+o,g=e!=null&&e.height?e==null?void 0:e.height:f+h.height,x=g,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:v}=e,C=ae.svg(c),_=se(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=ar(y),T=C.path(k,_),N=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&N.selectChildren("path").attr("style",n),e.width=f,e.height=g,he(e,N),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(e.padding??0)/(d?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(B){return Bt.info("Triangle intersect",e,y,B),Jt.polygon(e,y,B)},c}L(B5,"triangle");async function L5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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 Te(r,e,ke(e)),g=(e!=null&&e.width?e==null?void 0:e.width:d.width)+(o??0)*2,x=(e!=null&&e.height?e==null?void 0:e.height:d.height)+(c??0)*2,y=e.look==="neo"?x/4:x/8,v=x+(h?y:-y),{cssStyles:C}=e,k=14-g,T=k>0?k/2:0,N=ae.svg(u),E=se(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=[{x:-g/2-T,y:v/2},...zo(-g/2-T,v/2,g/2+T,v/2,y,.8),{x:g/2+T,y:-v/2},{x:-g/2-T,y:-v/2}],O=ar(B),A=N.path(O,E),M=u.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(0,${-y/2})`),f.attr("transform",`translate(${-g/2+(e.padding??0)-(d.x-(d.left??0))},${-x/2+(e.padding??0)-y-(d.y-(d.top??0))})`),he(e,M),e.intersect=function(F){return Jt.polygon(e,B,F)},u}L(L5,"waveEdgedRectangle");async function O5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?20:a;if(e.width||e.height){e.width=(e==null?void 0:e.width)??0,e.width<20&&(e.width=20),e.height=(e==null?void 0:e.height)??0,e.height<10&&(e.height=10);const E=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-E*(20/9)),e.width=e.width-o*2}const{shapeSvg:h,bbox:u}=await Te(r,e,ke(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=ae.svg(h),C=se(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=ar(_),T=v.path(k,C),N=h.insert(()=>T,":first-child");return N.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),he(e,N),e.intersect=function(E){return Jt.polygon(e,_,E)},h}L(O5,"waveRectangle");var ei=10;async function R5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;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-ei,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-ei,10));const{shapeSvg:c,bbox:h,label:u}=await Te(r,e,ke(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+ei,f=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+ei,g=d-ei,x=f-ei,y=-g/2,v=-x/2,{cssStyles:C}=e,_=ae.svg(c),k=se(e,{}),T=[{x:y-ei,y:v-ei},{x:y-ei,y:v+x},{x:y+g,y:v+x},{x:y+g,y:v-ei}],N=`M${y-ei},${v-ei} L${y+g},${v-ei} L${y+g},${v+x} L${y-ei},${v+x} L${y-ei},${v-ei}
|
|
385
|
+
M${y-ei},${v} L${y+g},${v}
|
|
386
|
+
M${y},${v-ei} L${y},${v+x}`;e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=_.path(N,k),B=c.insert(()=>E,":first-child");return B.attr("transform",`translate(${ei/2}, ${ei/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)+ei/2-(h.x-(h.left??0))}, ${-(h.height/2)+ei/2-(h.y-(h.top??0))})`),he(e,B),e.intersect=function(O){return Jt.polygon(e,T,O)},c}L(R5,"windowPane");var iN=new Set(["redux-color","redux-dark-color"]),uQ=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function t_(r,e){var st,kt,it,H;const i=e;i.alias&&(e.label=i.alias);const{theme:n,themeVariables:a}=Vr(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:J}=Vr(),{background:vt}=J,At={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${vt}`]};await t_(r,At)}const d=Vr();e.useHtmlLabels=d.htmlLabels;let f=((st=d.er)==null?void 0:st.diagramPadding)??10,g=((kt=d.er)==null?void 0:kt.entityPadding)??6;const{cssStyles:x}=e,{labelStyles:y,nodeStyles:v}=oe(e);if(i.attributes.length===0&&e.label){const J={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5};Ds(e.label,d)+J.labelPaddingX*2<d.er.minEntityWidth&&(e.width=d.er.minEntityWidth);const vt=await Jd(r,e,J);if(n!=null&&iN.has(n)){const At=i.colorIndex??0;vt.attr("data-color-id",`color-${At%u.length}`)}if(!Is(d.htmlLabels)){const At=vt.select("text"),qt=(it=At.node())==null?void 0:it.getBBox();At.attr("transform",`translate(${-qt.width/2}, 0)`)}return vt}d.htmlLabels||(f*=1.25,g*=1.25);let C=ke(e);C||(C="node default");const _=r.insert("g").attr("class",C).attr("id",e.domId||e.id),k=await Fc(_,e.label??"",d,0,0,["name"],y);k.height+=g;let T=0;const N=[],E=[];let B=0,O=0,A=0,M=0,F=!0,j=!0;for(const J of i.attributes){const vt=await Fc(_,J.type,d,0,T,["attribute-type"],y);B=Math.max(B,vt.width+f);const At=await Fc(_,J.name,d,0,T,["attribute-name"],y);O=Math.max(O,At.width+f);const qt=await Fc(_,J.keys.join(),d,0,T,["attribute-keys"],y);A=Math.max(A,qt.width+f);const ie=await Fc(_,J.comment,d,0,T,["attribute-comment"],y);M=Math.max(M,ie.width+f);const Dt=Math.max(vt.height,At.height,qt.height,ie.height)+g;E.push({yOffset:T,rowHeight:Dt}),T+=Dt}let z=4;A<=f&&(F=!1,A=0,z--),M<=f&&(j=!1,M=0,z--);const U=_.node().getBBox();if(k.width+f*2-(B+O+A+M)>0){const J=k.width+f*2-(B+O+A+M);B+=J/z,O+=J/z,A>0&&(A+=J/z),M>0&&(M+=J/z)}const V=B+O+A+M,I=ae.svg(_),G=se(e,{});e.look!=="handDrawn"&&(G.roughness=0,G.fillStyle="solid");let D=0;E.length>0&&(D=E.reduce((J,vt)=>J+((vt==null?void 0:vt.rowHeight)??0),0));const W=Math.max(U.width+f*2,(e==null?void 0:e.width)||0,V),K=Math.max((D??0)+k.height,(e==null?void 0:e.height)||0),tt=-W/2,nt=-K/2;if(_.selectAll("g:not(:first-child)").each((J,vt,At)=>{const qt=_e(At[vt]),ie=qt.attr("transform");let Dt=0,Ht=0;if(ie){const Zt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ie);Zt&&(Dt=parseFloat(Zt[1]),Ht=parseFloat(Zt[2]),qt.attr("class").includes("attribute-name")?Dt+=B:qt.attr("class").includes("attribute-keys")?Dt+=B+O:qt.attr("class").includes("attribute-comment")&&(Dt+=B+O+A))}qt.attr("transform",`translate(${tt+f/2+Dt}, ${Ht+nt+k.height+g/2})`)}),_.select(".name").attr("transform","translate("+-k.width/2+", "+(nt+g/2)+")"),n!=null&&iN.has(n)){const J=i.colorIndex??0;_.attr("data-color-id",`color-${J%u.length}`)}const Y=I.rectangle(tt,nt,W,K,G),rt=_.insert(()=>Y,":first-child").attr("class","outer-path").attr("style",x.join(""));N.push(0);for(const[J,vt]of E.entries()){const qt=(J+1)%2===0&&vt.yOffset!==0,ie=I.rectangle(tt,k.height+nt+(vt==null?void 0:vt.yOffset),W,vt==null?void 0:vt.rowHeight,{...G,fill:qt?o:c,stroke:h});_.insert(()=>ie,"g.label").attr("style",x.join("")).attr("class",`row-rect-${qt?"even":"odd"}`)}const ft=1e-4;let ct=Ic(tt,k.height+nt,W+tt,k.height+nt,ft),xt=I.polygon(ct.map(J=>[J.x,J.y]),G);if(_.insert(()=>xt).attr("class","divider"),ct=Ic(B+tt,k.height+nt,B+tt,K+nt,ft),xt=I.polygon(ct.map(J=>[J.x,J.y]),G),_.insert(()=>xt).attr("class","divider"),F){const J=B+O+tt;ct=Ic(J,k.height+nt,J,K+nt,ft),xt=I.polygon(ct.map(vt=>[vt.x,vt.y]),G),_.insert(()=>xt).attr("class","divider")}if(j){const J=B+O+A+tt;ct=Ic(J,k.height+nt,J,K+nt,ft),xt=I.polygon(ct.map(vt=>[vt.x,vt.y]),G),_.insert(()=>xt).attr("class","divider")}for(const J of N){const vt=k.height+nt+J;ct=Ic(tt,vt,W+tt,vt,ft),xt=I.polygon(ct.map(At=>[At.x,At.y]),G),_.insert(()=>xt).attr("class","divider")}if(he(e,rt),v&&e.look!=="handDrawn")if(n!=null&&uQ.has(n))_.selectAll("path").attr("style",v);else{const J=v.split(";"),vt=(H=J==null?void 0:J.filter(At=>At.includes("stroke")))==null?void 0:H.map(At=>`${At}`).join("; ");_.selectAll("path").attr("style",vt??""),_.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(J){return Jt.rect(e,J)},_}L(t_,"erBox");async function Fc(r,e,i,n=0,a=0,o=[],c=""){const h=r.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",c);e!==dE(e)&&(e=dE(e),e=e.replaceAll("<","<").replaceAll(">",">"));const u=h.node().appendChild(await $s(h,e,{width:Ds(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("<")||e.includes(">")){let f=u.children[0];for(f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">")}let d=u.getBBox();if(Is(i.htmlLabels)){const f=u.children[0];f.style.textAlign="start";const g=_e(u);d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}L(Fc,"addText");function Ic(r,e,i,n,a){return r===i?[{x:r-a/2,y:e},{x:r+a/2,y:e},{x:i+a/2,y:n},{x:i-a/2,y:n}]:[{x:r,y:e-a/2},{x:r,y:e+a/2},{x:i,y:n+a/2},{x:i,y:n-a/2}]}L(Ic,"lineToPolygon");async function j5(r,e,i,n,a=i.class.padding??12){const o=n?0:3,c=r.insert("g").attr("class",ke(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 rd(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await rd(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();x=v.height,d=c.insert("g").attr("class","members-group text");let C=0;for(const T of e.members){const N=await rd(d,T,C,[T.parseClassifier()]);C+=N+o}y=d.node().getBBox().height,y<=0&&(y=a/2),f=c.insert("g").attr("class","methods-group text");let _=0;for(const T of e.methods){const N=await rd(f,T,_,[T.parseClassifier()]);_+=N+o}let k=c.node().getBBox();if(h!==null){const T=h.node().getBBox();h.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),k=c.node().getBBox(),d.attr("transform",`translate(0, ${g+x+a*2})`),k=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+(y?y+a*4:a*2)})`),k=c.node().getBBox(),{shapeSvg:c,bbox:k}}L(j5,"textHelper");async function rd(r,e,i,n=[]){const a=r.insert("g").attr("class","label").attr("style",n.join("; ")),o=Vr();let c="useHtmlLabels"in e?e.useHtmlLabels:Is(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),Td(h)&&(c=!0);const u=await $s(a,vC(Pl(h)),{width:Ds(h,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let d,f=1;if(c){const g=u.children[0],x=_e(u);f=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(f+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const v=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(C=>new Promise(_=>{function k(){var T;if(C.style.display="flex",C.style.flexDirection="column",v){const N=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,B=parseInt(N,10)*5+"px";C.style.minWidth=B,C.style.maxWidth=B}else C.style.width="100%";_(C)}L(k,"setupImage"),setTimeout(()=>{C.complete&&k()}),C.addEventListener("error",k),C.addEventListener("load",k)})))}d=g.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height)}else{n.includes("font-weight: bolder")&&_e(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)+i)+")"),d.height}L(rd,"addText");async function D5(r,e){var I,G;const i=ur(),{themeVariables:n}=i,{useGradient:a}=n,o=i.class.padding??12,c=o,h=e.useHtmlLabels??Is(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:d,bbox:f}=await j5(r,e,i,h,c),{labelStyles:g,nodeStyles:x}=oe(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=((I=u.styles)==null?void 0:I.join(";"))||x||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((G=i.class)!=null&&G.hideEmptyMembersBox),C=ae.svg(d),_=se(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=Math.max(e.width??0,f.width);let T=Math.max(e.height??0,f.height);const N=(e.height??0)>f.height;u.members.length===0&&u.methods.length===0?T+=c:u.members.length>0&&u.methods.length===0&&(T+=c*2);const E=-k/2,B=-T/2;let O=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;N&&(O=o*2);const A=C.rectangle(E-o,B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0),k+2*o,T+2*o+O,_),M=d.insert(()=>A,":first-child");M.attr("class","basic label-container outer-path");const F=M.node().getBBox(),j=d.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,z=d.select(".label-group").node().getBBox().height-(v?o/2:0)||0,U=d.select(".members-group").node().getBBox().height-(v?o/2:0)||0,V=(j+z+B+o-(B-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each((D,W,K)=>{var ct,xt;const tt=_e(K[W]),nt=tt.attr("transform");let Y=0;if(nt){const kt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(nt);kt&&(Y=parseFloat(kt[2]))}let rt=Y+B+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(tt.attr("class").includes("methods-group")){const st=Math.max(U,c/2);N?rt=Math.max(V,j+z+st+B+c*2+o)+c*2:rt=j+z+st+B+c*4+o}u.members.length===0&&u.methods.length===0&&((ct=i.class)!=null&&ct.hideEmptyMembersBox)&&(u.annotations.length>0?rt=Y-c:rt=Y),h||(rt-=4);let ft=E;(tt.attr("class").includes("label-group")||tt.attr("class").includes("annotation-group"))&&(ft=-((xt=tt.node())==null?void 0:xt.getBBox().width)/2||0,d.selectAll("text").each(function(st,kt,it){window.getComputedStyle(it[kt]).textAnchor==="middle"&&(ft=0)})),tt.attr("transform",`translate(${ft}, ${rt})`)}),u.members.length>0||u.methods.length>0||v){const D=j+z+B+o,W=C.line(F.x,D,F.x+F.width,D+.001,_);d.insert(()=>W).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+z+U+B+c*2+o,W=C.line(F.x,N?Math.max(V,D):D,F.x+F.width,(N?Math.max(V,D):D)+.001,_);d.insert(()=>W).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*([^;]*)/),W=D.exec(y);if(W){const K=W[0].replace("color","fill");d.selectAll("tspan").attr("style",K)}else if(g){const K=D.exec(g);if(K){const tt=K[0].replace("color","fill");d.selectAll("tspan").attr("style",tt)}}}return he(e,M),e.intersect=function(D){return Jt.rect(e,D)},d}L(D5,"classBox");async function F5(r,e){var F,j;const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,d=ke(e),{themeVariables:f}=ur(),{borderColorArray:g,requirementEdgeLabelBackground:x}=f,y=r.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 z=await Da(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,C,e.labelStyle);C+=z;const U=await Da(y,`${a.text?`Text: ${a.text}`:""}`,C,e.labelStyle);C+=U;const V=await Da(y,`${a.risk?`Risk: ${a.risk}`:""}`,C,e.labelStyle);C+=V,await Da(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,C,e.labelStyle)}else{const z=await Da(y,`${o.type?`Type: ${o.type}`:""}`,C,e.labelStyle);C+=z,await Da(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,e.labelStyle)}const k=(((F=y.node())==null?void 0:F.getBBox().width)??200)+c,T=(((j=y.node())==null?void 0:j.getBBox().height)??200)+c,N=-k/2,E=-T/2,B=ae.svg(y),O=se(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const A=B.rectangle(N,E,k,T,O),M=y.insert(()=>A,":first-child");if(M.attr("class","basic label-container outer-path").attr("style",n),g!=null&&g.length){const z=e.colorIndex??0;y.attr("data-color-id",`color-${z%g.length}`)}if(y.selectAll(".label").each((z,U,V)=>{const I=_e(V[U]),G=I.attr("transform");let D=0,W=0;if(G){const Y=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(G);Y&&(D=parseFloat(Y[1]),W=parseFloat(Y[2]))}const K=W-T/2;let tt=N+c/2;(U===0||U===1)&&(tt=D),I.attr("transform",`translate(${tt}, ${K+c})`)}),C>v+_+h){const z=E+v+_+h;let U;if(e.look==="neo"){const G=[[N,z],[N+k,z],[N+k,z+.001],[N,z+.001]];U=B.polygon(G,O)}else U=B.line(N,z,N+k,z,O);y.insert(()=>U).attr("class","divider")}return he(e,M),e.intersect=function(z){return Jt.rect(e,z)},n&&e.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}L(F5,"requirementBox");async function Da(r,e,i,n=""){if(e==="")return 0;const a=r.insert("g").attr("class","label").attr("style",n),o=ur(),c=o.htmlLabels??!0,h=await $s(a,vC(Pl(e)),{width:Ds(e,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},o);let u;if(c){const d=h.children[0],f=_e(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+i})`),u.height}L(Da,"addText");var dQ=L(r=>{switch(r){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 I5(r,e,{config:i}){var U,V;const{labelStyles:n,nodeStyles:a}=oe(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:d}=await Te(r,e,ke(e)),f=e.padding||10;let g="",x;"ticket"in e&&e.ticket&&((U=i==null?void 0:i.kanban)!=null&&U.ticketBaseUrl)&&(g=(V=i==null?void 0:i.kanban)==null?void 0:V.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 C0(x,"ticket"in e&&e.ticket||"",y):{label:v,bbox:C}=await C0(h,"ticket"in e&&e.ticket||"",y);const{label:_,bbox:k}=await C0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,N=(e==null?void 0:e.width)||0,E=Math.max(C.height,k.height)/2,B=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+E,O=-N/2,A=-B/2;d.attr("transform","translate("+(f-N/2)+", "+(-E-u.height/2)+")"),v.attr("transform","translate("+(f-N/2)+", "+(-E+u.height/2)+")"),_.attr("transform","translate("+(f+N/2-k.width-2*o)+", "+(-E+u.height/2)+")");let M;const{rx:F,ry:j}=e,{cssStyles:z}=e;if(e.look==="handDrawn"){const I=ae.svg(h),G=se(e,{}),D=F||j?I.path(Uo(O,A,N,B,F||0),G):I.rectangle(O,A,N,B,G);M=h.insert(()=>D,":first-child"),M.attr("class","basic label-container").attr("style",z||null)}else{M=h.insert("rect",":first-child"),M.attr("class","basic label-container __APA__").attr("style",a).attr("rx",F??5).attr("ry",j??5).attr("x",O).attr("y",A).attr("width",N).attr("height",B);const I="priority"in e&&e.priority;if(I){const G=h.append("line"),D=O+2,W=A+Math.floor((F??0)/2),K=A+B-Math.floor((F??0)/2);G.attr("x1",D).attr("y1",W).attr("x2",D).attr("y2",K).attr("stroke-width","4").attr("stroke",dQ(I))}}return he(e,M),e.height=B,e.intersect=function(I){return Jt.rect(e,I)},h}L(I5,"kanbanItem");async function $5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Te(r,e,ke(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=ae.svg(a),N=se(e,{}),E=T.path(k,N);_=a.insert(()=>E,":first-child"),_.attr("class","basic label-container").attr("style",Ti(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})`),he(e,_),e.calcIntersect=function(T,N){return Jt.rect(T,N)},e.intersect=function(T){return Bt.info("Bang intersect",e,T),Jt.rect(e,T)},a}L($5,"bang");async function z5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Te(r,e,ke(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=ae.svg(a),T=se(e,{}),N=k.path(_,T);C=a.insert(()=>N,":first-child"),C.attr("class","basic label-container").attr("style",Ti(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})`),he(e,C),e.calcIntersect=function(k,T){return Jt.rect(k,T)},e.intersect=function(k){return Bt.info("Cloud intersect",e,k),Jt.rect(e,k)},a}L(z5,"cloud");async function P5(r,e){const{labelStyles:i,nodeStyles:n}=oe(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Te(r,e,ke(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()),he(e,x),e.calcIntersect=function(y,v){return Jt.rect(y,v)},e.intersect=function(y){return Jt.rect(e,y)},a}L(P5,"defaultMindmapNode");async function q5(r,e){const i={padding:e.padding??0};return JC(r,e,i)}L(q5,"mindmapCircle");var fQ=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:x5},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:m5},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:v5},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:w5},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:U3},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:JC},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:$5},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:z5},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:f5},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:X3},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:s5},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:a5},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:A5},{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:i5},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:W3},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:E5},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:j3},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:y5},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:k5},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:_5},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:K3},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Z3},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:$3},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:z3},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:P3},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:o5},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:L5},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:V3},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:N5},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:l5},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:q3},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:H3},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:B5},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:R5},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:G3},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:M5},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Y3},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:b5},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:u5},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:h5},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:R3},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:I3},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:T5},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:S5},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:O5},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:p5},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:c5}],pQ=L(()=>{const e=[...Object.entries({state:C5,choice:D3,note:d5,rectWithTitle:g5,labelRect:n5,iconSquare:e5,iconCircle:J3,icon:Q3,iconRounded:t5,imageSquare:r5,anchor:L3,kanbanItem:I5,mindmapCircle:q5,defaultMindmapNode:P5,classBox:D5,erBox:t_,requirementBox:F5}),...fQ.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(a=>[a,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),U5=pQ();function gQ(r){return r in U5}L(gQ,"isValidShape");var Am=new Map;async function H5(r,e,i){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?U5[e.shape]:void 0;if(!o)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;i.config.securityLevel==="sandbox"?c="_top":e.linkTarget&&(c=e.linkTarget||"_blank"),n=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),a=await o(n,e,i)}else a=await o(r,e,i),n=a;return n.attr("data-look",Ti(e.look)),e.tooltip&&a.attr("title",e.tooltip),Am.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}L(H5,"insertNode");var ylt=L((r,e)=>{Am.set(e.id,r)},"setNodeElem"),blt=L(()=>{Am.clear()},"clear"),xlt=L(r=>{const e=Am.get(r.id);Bt.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");const i=8,n=r.diff||0;return r.clusterNode?e.attr("transform","translate("+(r.x+n-r.width/2)+", "+(r.y-r.height/2-i)+")"):e.attr("transform","translate("+r.x+", "+r.y+")"),n},"positionNode"),mQ=L((r,e,i,n,a,o=!1,c)=>{e.arrowTypeStart&&nN(r,"start",e.arrowTypeStart,i,n,a,o,c),e.arrowTypeEnd&&nN(r,"end",e.arrowTypeEnd,i,n,a,o,c)},"addEdgeMarkers"),yQ={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}},bQ=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],nN=L((r,e,i,n,a,o,c=!1,h)=>{var v;const u=yQ[i],d=u&&bQ.includes(u.type);if(!u){Bt.warn(`Unknown arrow type: ${i}`);return}const f=u.type,y=`${a}_${o}-${f}${e==="start"?"Start":"End"}${c&&d?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),_=`${y}_${C}`;if(!document.getElementById(_)){const k=document.getElementById(y);if(k){const T=k.cloneNode(!0);T.id=_,T.querySelectorAll("path, circle, line").forEach(E=>{E.setAttribute("stroke",h),u.fill&&E.setAttribute("fill",h)}),(v=k.parentNode)==null||v.appendChild(T)}}r.attr(`marker-${e}`,`url(${n}#${_})`)}else r.attr(`marker-${e}`,`url(${n}#${y})`)},"addEdgeMarker"),xQ=L(r=>{var e,i;return typeof r=="string"?r:(i=(e=ur())==null?void 0:e.flowchart)==null?void 0:i.curve},"resolveEdgeCurveType"),Zg=new Map,ji=new Map,vlt=L(()=>{Zg.clear(),ji.clear()},"clear"),$u=L(r=>r?typeof r=="string"?r:r.reduce((e,i)=>e+";"+i,""):"","getLabelStyles"),vQ=L(async(r,e)=>{const i=ur();let n=an(i);const{labelStyles:a}=oe(e);e.labelStyle=a;const o=r.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",d=await $s(r,e.label,{style:$u(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},i);c.node().appendChild(d),Bt.info("abc82",e,e.labelType);let f=d.getBBox(),g=f;if(n){const y=d.children[0],v=_e(d);f=y.getBoundingClientRect(),g=f,v.attr("width",f.width),v.attr("height",f.height)}else{const y=_e(d).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",Ru(g,n)),Zg.set(e.id,o),e.width=f.width,e.height=f.height;let x;if(e.startLabelLeft){const y=r.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.startLabelLeft,$u(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=_e(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),ji.get(e.id)||ji.set(e.id,{}),ji.get(e.id).startLeft=y,id(x,e.startLabelLeft)}if(e.startLabelRight){const y=r.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.startLabelRight,$u(e.labelStyle)||"",!1,!1);x=C,v.node().appendChild(C);let _=C.getBBox();if(n){const k=C.children[0],T=_e(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),ji.get(e.id)||ji.set(e.id,{}),ji.get(e.id).startRight=y,id(x,e.startLabelRight)}if(e.endLabelLeft){const y=r.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.endLabelLeft,$u(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=_e(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),y.node().appendChild(C),ji.get(e.id)||ji.set(e.id,{}),ji.get(e.id).endLeft=y,id(x,e.endLabelLeft)}if(e.endLabelRight){const y=r.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await Mo(v,e.endLabelRight,$u(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const k=C.children[0],T=_e(C);_=k.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",Ru(_,n)),y.node().appendChild(C),ji.get(e.id)||ji.set(e.id,{}),ji.get(e.id).endRight=y,id(x,e.endLabelRight)}return d},"insertEdgeLabel");function id(r,e){an(ur())&&r&&(r.style.width=e.length*9+"px",r.style.height="12px")}L(id,"setTerminalWidth");var CQ=L((r,e)=>{Bt.debug("Moving label abc88 ",r.id,r.label,Zg.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath;const n=ur(),{subGraphTitleTotalMargin:a}=zC(n);if(r.label){const o=Zg.get(r.id);let c=r.x,h=r.y;if(i){const u=ba.calcLabelPosition(i);Bt.debug("Moving label "+r.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(r.startLabelLeft){const o=ji.get(r.id).startLeft;let c=r.x,h=r.y;if(i){const u=ba.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.startLabelRight){const o=ji.get(r.id).startRight;let c=r.x,h=r.y;if(i){const u=ba.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelLeft){const o=ji.get(r.id).endLeft;let c=r.x,h=r.y;if(i){const u=ba.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelRight){const o=ji.get(r.id).endRight;let c=r.x,h=r.y;if(i){const u=ba.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),_Q=L((r,e)=>{const i=r.x,n=r.y,a=Math.abs(e.x-i),o=Math.abs(e.y-n),c=r.width/2,h=r.height/2;return a>=c||o>=h},"outsideNode"),kQ=L((r,e,i)=>{Bt.debug(`intersection calc abc89:
|
|
439
|
+
outsidePoint: ${JSON.stringify(e)}
|
|
440
|
+
insidePoint : ${JSON.stringify(i)}
|
|
441
|
+
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);const n=r.x,a=r.y,o=Math.abs(n-i.x),c=r.width/2;let h=i.x<e.x?c-o:c+o;const u=r.height/2,d=Math.abs(e.y-i.y),f=Math.abs(e.x-i.x);if(Math.abs(a-e.y)*c>Math.abs(n-e.x)*u){let g=i.y<e.y?e.y-u-a:a-u-e.y;h=f*g/d;const x={x:i.x<e.x?i.x+h:i.x-f+h,y:i.y<e.y?i.y+d-g:i.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),Bt.debug(`abc89 top/bottom calc, Q ${d}, q ${g}, R ${f}, r ${h}`,x),x}else{i.x<e.x?h=e.x-c-n:h=n-c-e.x;let g=d*h/f,x=i.x<e.x?i.x+f-h:i.x-f+h,y=i.y<e.y?i.y+g:i.y-g;return Bt.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"),aN=L((r,e)=>{Bt.warn("abc88 cutPathAtIntersect",r,e);let i=[],n=r[0],a=!1;return r.forEach(o=>{if(Bt.info("abc88 checking point",o,e),!_Q(e,o)&&!a){const c=kQ(e,n,o);Bt.debug("abc88 inside",o,n,c),Bt.debug("abc88 intersection",c,e);let h=!1;i.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),i.some(u=>u.x===c.x&&u.y===c.y)?Bt.warn("abc88 no intersect",c,i):i.push(c),a=!0}else Bt.warn("abc88 outside",o,n),n=o,a||i.push(o)}),Bt.debug("returning points",i),i},"cutPathAtIntersect");function W5(r){const e=[],i=[];for(let n=1;n<r.length-1;n++){const a=r[n-1],o=r[n],c=r[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),i.push(n))}return{cornerPoints:e,cornerPointPositions:i}}L(W5,"extractCornerPoints");var sN=L(function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=Math.sqrt(n*n+a*a),c=i/o;return{x:e.x-c*n,y:e.y-c*a}},"findAdjacentPoint"),wQ=L(function(r){const{cornerPointPositions:e}=W5(r),i=[];for(let n=0;n<r.length;n++)if(e.includes(n)){const a=r[n-1],o=r[n+1],c=r[n],h=sN(a,c,5),u=sN(o,c,5),d=u.x-h.x,f=u.y-h.y;i.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){Bt.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 Bt.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));i.push(x,u)}else i.push(r[n]);return i},"fixCorners"),SQ=L((r,e,i)=>{const n=r-e-i,a=2,o=2,c=a+o,h=Math.floor(n/c),u=Array(h).fill(`${a} ${o}`).join(" ");return`0 ${e} ${u} ${i}`},"generateDashArray"),TQ=L(function(r,e,i,n,a,o,c,h=!1){var W;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=ur();let d=e.points,f=!1;const g=a;var x=o;const y=[];for(const K in e.cssCompiledStyles)HR(K)||y.push(e.cssCompiledStyles[K]);Bt.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])),Bt.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&&(Bt.info("to cluster abc88",i.get(e.toCluster)),d=aN(e.points,i.get(e.toCluster).node),f=!0),e.fromCluster&&(Bt.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(d,null,2)),d=aN(d.reverse(),i.get(e.fromCluster).node).reverse(),f=!0);let C=d.filter(K=>!Number.isNaN(K.y));const _=xQ(e.curve);_!=="rounded"&&(C=wQ(C));let k=pd;switch(_){case"linear":k=pd;break;case"basis":k=Rv;break;case"cardinal":k=IL;break;case"bumpX":k=OL;break;case"bumpY":k=RL;break;case"catmullRom":k=zL;break;case"monotoneX":k=GL;break;case"monotoneY":k=YL;break;case"natural":k=VL;break;case"step":k=XL;break;case"stepAfter":k=QL;break;case"stepBefore":k=ZL;break;case"rounded":k=pd;break;default:k=Rv}const{x:T,y:N}=KV(e),E=BK().x(T).y(N).curve(k);let B;switch(e.thickness){case"normal":B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible";break;default:B="edge-thickness-normal"}switch(e.pattern){case"solid":B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed";break;default:B+=" edge-pattern-solid"}let O,A=_==="rounded"?G5(Y5(C,e),5):E(C);const M=Array.isArray(e.style)?e.style:[e.style];let F=M.find(K=>K==null?void 0:K.startsWith("stroke:")),j="";e.animate&&(j="edge-animation-fast"),e.animation&&(j="edge-animation-"+e.animation);let z=!1;if(e.look==="handDrawn"){const K=ae.svg(r);Object.assign([],C);const tt=K.path(A,{roughness:.3,seed:u});B+=" transition",O=_e(tt).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",M?M.reduce((Y,rt)=>Y+";"+rt,""):"");let nt=O.attr("d");O.attr("d",nt),r.node().appendChild(O.node())}else{const K=y.join(";"),tt=M?M.reduce((xt,st)=>xt+st+";",""):"",nt=(K?K+";"+tt+";":tt)+";"+(M?M.reduce((xt,st)=>xt+";"+st,""):"");O=r.append("path").attr("d",A).attr("id",`${c}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",nt),F=(W=nt.match(/stroke:([^;]+)/))==null?void 0:W[1],z=e.animate===!0||!!e.animation||K.includes("animation");const Y=O.node(),rt=typeof Y.getTotalLength=="function"?Y.getTotalLength():0,ft=kE[e.arrowTypeStart]||0,ct=kE[e.arrowTypeEnd]||0;if(e.look==="neo"&&!z){const st=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?SQ(rt,ft,ct):`0 ${ft} ${rt-ft-ct} ${ct}`}; stroke-dashoffset: 0;`;O.attr("style",st+O.attr("style"))}}O.attr("data-edge",!0),O.attr("data-et","edge"),O.attr("data-id",e.id),O.attr("data-points",v),O.attr("data-look",Ti(e.look)),e.showPoints&&C.forEach(K=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",K.x).attr("cy",K.y)});let U="";(ur().flowchart.arrowMarkerAbsolute||ur().state.arrowMarkerAbsolute)&&(U=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,U=U.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Bt.info("arrowTypeStart",e.arrowTypeStart),Bt.info("arrowTypeEnd",e.arrowTypeEnd);const V=!z&&(e==null?void 0:e.look)==="neo";mQ(O,e,U,c,n,V,F);const I=Math.floor(d.length/2),G=d[I];ba.isLabelCoordinateInPath(G,O.attr("d"))||(f=!0);let D={};return f&&(D.updatedPath=d),D.originalPath=e.points,D},"insertEdge");function G5(r,e){if(r.length<2)return"";let i="";const n=r.length,a=1e-5;for(let o=0;o<n;o++){const c=r[o],h=r[o-1],u=r[o+1];if(o===0)i+=`M${c.x},${c.y}`;else if(o===n-1)i+=`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){i+=`L${c.x},${c.y}`;continue}const C=d/y,_=f/y,k=g/v,T=x/v,N=C*k+_*T,E=Math.max(-1,Math.min(1,N)),B=Math.acos(E);if(B<a||Math.abs(Math.PI-B)<a){i+=`L${c.x},${c.y}`;continue}const O=Math.min(e/Math.sin(B/2),y/2,v/2),A=c.x-C*O,M=c.y-_*O,F=c.x+k*O,j=c.y+T*O;i+=`L${A},${M}`,i+=`Q${c.x},${c.y} ${F},${j}`}}return i}L(G5,"generateRoundedPath");function l1(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};const i=e.x-r.x,n=e.y-r.y;return{angle:Math.atan2(n,i),deltaX:i,deltaY:n}}L(l1,"calculateDeltaAndAngle");function Y5(r,e){const i=r.map(a=>({...a}));if(r.length>=2&&Hi[e.arrowTypeStart]){const a=Hi[e.arrowTypeStart],o=r[0],c=r[1],{angle:h}=l1(o,c),u=a*Math.cos(h),d=a*Math.sin(h);i[0].x=o.x+u,i[0].y=o.y+d}const n=r.length;if(n>=2&&Hi[e.arrowTypeEnd]){const a=Hi[e.arrowTypeEnd],o=r[n-1],c=r[n-2],{angle:h}=l1(c,o),u=a*Math.cos(h),d=a*Math.sin(h);i[n-1].x=o.x-u,i[n-1].y=o.y-d}return i}L(Y5,"applyMarkerOffsetsToPoints");var EQ=L((r,e,i,n)=>{e.forEach(a=>{XQ[a](r,i,n)})},"insertMarkers"),NQ=L((r,e,i)=>{Bt.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),AQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),MQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),BQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),LQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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),r.append("defs").append("marker").attr("id",i+"_"+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),r.append("defs").append("marker").attr("id",i+"_"+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),r.append("defs").append("marker").attr("id",i+"_"+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"),OQ=L((r,e,i)=>{r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),RQ=L((r,e,i)=>{r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),jQ=L((r,e,i)=>{r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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"),r.append("marker").attr("id",i+"_"+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),r.append("marker").attr("id",i+"_"+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"),DQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),FQ=L((r,e,i)=>{const n=Vr(),{themeVariables:a}=n,{transitionColor:o}=a;r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),IQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),$Q=L((r,e,i)=>{const n=r.append("defs").append("marker").attr("id",i+"_"+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=r.append("defs").append("marker").attr("id",i+"_"+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"),zQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),r.append("defs").append("marker").attr("id",i+"_"+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"),PQ=L((r,e,i)=>{const n=r.append("defs").append("marker").attr("id",i+"_"+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=r.append("defs").append("marker").attr("id",i+"_"+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"),qQ=L((r,e,i)=>{const n=Vr(),{themeVariables:a}=n,{strokeWidth:o}=a;r.append("defs").append("marker").attr("id",i+"_"+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}`),r.append("defs").append("marker").attr("id",i+"_"+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"),UQ=L((r,e,i)=>{const n=Vr(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=r.append("defs").append("marker").attr("id",i+"_"+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=r.append("defs").append("marker").attr("id",i+"_"+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"),HQ=L((r,e,i)=>{const n=Vr(),{themeVariables:a}=n,{strokeWidth:o}=a;r.append("defs").append("marker").attr("id",i+"_"+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}`),r.append("defs").append("marker").attr("id",i+"_"+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"),WQ=L((r,e,i)=>{const n=Vr(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=r.append("defs").append("marker").attr("id",i+"_"+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=r.append("defs").append("marker").attr("id",i+"_"+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"),GQ=L((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+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"),YQ=L((r,e,i)=>{const n=Vr(),{themeVariables:a}=n,{strokeWidth:o}=a;r.append("defs").append("marker").attr("id",i+"_"+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"),KQ=L((r,e,i)=>{const n=r.append("defs").append("marker").attr("id",i+"_"+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"),VQ=L((r,e,i)=>{const n=Vr(),{themeVariables:a}=n,{strokeWidth:o}=a,c=r.append("defs").append("marker").attr("id",i+"_"+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"),XQ={extension:NQ,composition:AQ,aggregation:MQ,dependency:BQ,lollipop:LQ,point:OQ,circle:RQ,cross:jQ,barb:DQ,barbNeo:FQ,only_one:IQ,zero_or_one:$Q,one_or_more:zQ,zero_or_more:PQ,only_one_neo:qQ,zero_or_one_neo:UQ,one_or_more_neo:HQ,zero_or_more_neo:WQ,requirement_arrow:GQ,requirement_contains:KQ,requirement_arrow_neo:YQ,requirement_contains_neo:VQ},ZQ=EQ,QQ={common:Kd,getConfig:Vr,insertCluster:VZ,insertEdge:TQ,insertEdgeLabel:vQ,insertMarkers:ZQ,insertNode:H5,interpolateToCurve:RC,labelHelper:Te,log:Bt,positionEdgeLabel:CQ},Ld={},K5=L(r=>{for(const e of r)Ld[e.name]=e},"registerLayoutLoaders"),JQ=L(()=>{K5([{name:"dagre",loader:L(async()=>await De(()=>import("./dagre-KV5264BT-BcS_NAij.js"),__vite__mapDeps([5,6,7,8,9,10])),"loader")},{name:"cose-bilkent",loader:L(async()=>await De(()=>import("./cose-bilkent-S5V4N54A-DBBUVsxi.js"),__vite__mapDeps([11,12])),"loader")}])},"registerDefaultLayoutLoaders");JQ();var Clt=L(async(r,e)=>{if(!(r.layoutAlgorithm in Ld))throw new Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(const f of r.nodes){const g=f.domId||f.id;f.domId=`${r.diagramId}-${g}`}const i=Ld[r.layoutAlgorithm],n=await i.loader(),{theme:a,themeVariables:o}=r.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(r,e,QQ,{algorithm:i.algorithm})},"render"),_lt=L((r="",{fallback:e="dagre"}={})=>{if(r in Ld)return r;if(e in Ld)return Bt.warn(`Layout algorithm ${r} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${r} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),V5="comm",X5="rule",Z5="decl",tJ="@import",eJ="@namespace",rJ="@keyframes",iJ="@layer",nJ=Math.abs,md=String.fromCharCode;function Q5(r){return r.trim()}function c1(r,e,i){return r.replace(e,i)}function Wc(r,e){return r.charCodeAt(e)|0}function wh(r,e,i){return r.slice(e,i)}function za(r){return r.length}function aJ(r){return r.length}function Rp(r,e){return e.push(r),r}var Mm=1,Sh=1,J5=0,oa=0,pi=0,Bh="";function e_(r,e,i,n,a,o,c,h){return{value:r,root:e,parent:i,type:n,props:a,children:o,line:Mm,column:Sh,length:c,return:"",siblings:h}}function sJ(){return pi}function oJ(){return pi=oa>0?Wc(Bh,--oa):0,Sh--,pi===10&&(Sh=1,Mm--),pi}function Ca(){return pi=oa<J5?Wc(Bh,oa++):0,Sh++,pi===10&&(Sh=1,Mm++),pi}function Bo(){return Wc(Bh,oa)}function ag(){return oa}function Bm(r,e){return wh(Bh,r,e)}function Od(r){switch(r){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 lJ(r){return Mm=Sh=1,J5=za(Bh=r),oa=0,[]}function cJ(r){return Bh="",r}function k0(r){return Q5(Bm(oa-1,h1(r===91?r+2:r===40?r+1:r)))}function hJ(r){for(;(pi=Bo())&&pi<33;)Ca();return Od(r)>2||Od(pi)>3?"":" "}function uJ(r,e){for(;--e&&Ca()&&!(pi<48||pi>102||pi>57&&pi<65||pi>70&&pi<97););return Bm(r,ag()+(e<6&&Bo()==32&&Ca()==32))}function h1(r){for(;Ca();)switch(pi){case r:return oa;case 34:case 39:r!==34&&r!==39&&h1(pi);break;case 40:r===41&&h1(r);break;case 92:Ca();break}return oa}function dJ(r,e){for(;Ca()&&r+pi!==57;)if(r+pi===84&&Bo()===47)break;return"/*"+Bm(e,oa-1)+"*"+md(r===47?r:Ca())}function fJ(r){for(;!Od(Bo());)Ca();return Bm(r,oa)}function pJ(r){return cJ(sg("",null,null,null,[""],r=lJ(r),0,[0],r))}function sg(r,e,i,n,a,o,c,h,u){for(var d=0,f=0,g=c,x=0,y=0,v=0,C=1,_=1,k=1,T=0,N=0,E="",B=a,O=o,A=n,M=E;_;)switch(v=N,N=Ca()){case 40:v!=108&&Wc(M,g-1)==58?(T++,M+="("):M+=k0(N);break;case 41:T--,M+=")";break;case 34:case 39:case 91:M+=k0(N);break;case 9:case 10:case 13:case 32:if(T>0){M+=md(N);break}M+=hJ(v);break;case 92:M+=uJ(ag()-1,7);continue;case 47:switch(Bo()){case 42:case 47:Rp(gJ(dJ(Ca(),ag()),e,i,u),u),(Od(v||1)==5||Od(Bo()||1)==5)&&za(M)&&wh(M,-1,void 0)!==" "&&(M+=" ");break;default:M+="/"}break;case 123*C:h[d++]=za(M)*k;case 125*C:case 59:case 0:if(T>0&&N){M+=md(N);break}switch(N){case 0:case 125:_=0;case 59+f:k==-1&&(M=c1(M,/\f/g,"")),y>0&&(za(M)-g||C===0)&&Rp(y>32?lN(M+";",n,i,g-1,u):lN(c1(M," ","")+";",n,i,g-2,u),u);break;case 59:M+=";";default:if(Rp(A=oN(M,e,i,d,f,a,h,E,B=[],O=[],g,o),o),N===123)if(f===0)sg(M,e,A,A,B,o,g,h,O);else{switch(x){case 99:if(Wc(M,3)===110)break;case 108:if(Wc(M,2)===97)break;default:f=0;case 100:case 109:case 115:}f?sg(r,A,A,n&&Rp(oN(r,A,A,0,0,a,h,E,a,B=[],g,O),O),a,O,g,h,n?B:O):sg(M,A,A,A,[""],O,0,h,O)}}d=f=y=0,C=k=1,E=M="",g=c;break;case 58:g=1+za(M),y=v;default:if(C<1){if(N==123)--C;else if(N==125&&C++==0&&oJ()==125)continue}switch(M+=md(N),N*C){case 38:k=f>0?1:(M+="\f",-1);break;case 44:if(T>0)break;h[d++]=(za(M)-1)*k,k=1;break;case 64:Bo()===45&&(M+=k0(Ca())),x=Bo(),f=g=za(E=M+=fJ(ag())),N++;break;case 45:v===45&&za(M)==2&&(C=0)}}return o}function oN(r,e,i,n,a,o,c,h,u,d,f,g){for(var x=a-1,y=a===0?o:[""],v=aJ(y),C=0,_=0,k=0;C<n;++C)for(var T=0,N=wh(r,x+1,x=nJ(_=c[C])),E=r;T<v;++T)(E=Q5(_>0?y[T]+" "+N:c1(N,/&\f/g,y[T])))&&(u[k++]=E);return e_(r,e,i,a===0?X5:h,u,d,f,g)}function gJ(r,e,i,n){return e_(r,e,i,V5,md(sJ()),wh(r,2,-2),0,n)}function lN(r,e,i,n,a){return e_(r,e,i,Z5,wh(r,0,n),wh(r,n+1,-1),n,a)}function u1(r,e){for(var i="",n=0;n<r.length;n++)i+=e(r[n],n,r,e)||"";return i}function mJ(r,e,i,n){switch(r.type){case iJ:if(r.children.length)break;case tJ:case eJ:case Z5:return r.return=r.return||r.value;case V5:return"";case rJ:return r.return=r.value+"{"+u1(r.children,n)+"}";case X5:if(!za(r.value=r.props.join(",")))return""}return za(i=u1(r.children,n))?r.return=r.value+"{"+i+"}":""}var tj="c4",yJ=L(r=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(r),"detector"),bJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-fGKTGH97.js");return{diagram:e}},__vite__mapDeps([13,14]));return{id:tj,diagram:r}},"loader"),xJ={id:tj,detector:yJ,loader:bJ},vJ=xJ,ej="flowchart",CJ=L((r,e)=>{var i,n;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(r)},"detector"),_J=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-CwfPSiA0.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:ej,diagram:r}},"loader"),kJ={id:ej,detector:CJ,loader:_J},wJ=kJ,rj="flowchart-v2",SJ=L((r,e)=>{var i,n,a;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(r)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(r))},"detector"),TJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-CwfPSiA0.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:rj,diagram:r}},"loader"),EJ={id:rj,detector:SJ,loader:TJ},NJ=EJ,ij="er",AJ=L(r=>/^\s*erDiagram/.test(r),"detector"),MJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-BajnFM-6.js");return{diagram:e}},__vite__mapDeps([20,17,18,19]));return{id:ij,diagram:r}},"loader"),BJ={id:ij,detector:AJ,loader:MJ},LJ=BJ,nj="gitGraph",OJ=L(r=>/^\s*gitGraph/.test(r),"detector"),RJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-BD3bGHtr.js");return{diagram:e}},__vite__mapDeps([21,22,23,24,9,7]));return{id:nj,diagram:r}},"loader"),jJ={id:nj,detector:OJ,loader:RJ},DJ=jJ,aj="gantt",FJ=L(r=>/^\s*gantt/.test(r),"detector"),IJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-DttgldaZ.js");return{diagram:e}},__vite__mapDeps([25,26,27]));return{id:aj,diagram:r}},"loader"),$J={id:aj,detector:FJ,loader:IJ},zJ=$J,sj="info",PJ=L(r=>/^\s*info/.test(r),"detector"),qJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-CrGCfIaU.js");return{diagram:e}},__vite__mapDeps([28,24,9,7]));return{id:sj,diagram:r}},"loader"),UJ={id:sj,detector:PJ,loader:qJ},oj="pie",HJ=L(r=>/^\s*pie/.test(r),"detector"),WJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-CM8vpcY4.js");return{diagram:e}},__vite__mapDeps([29,22,24,9,7,30]));return{id:oj,diagram:r}},"loader"),GJ={id:oj,detector:HJ,loader:WJ},lj="quadrantChart",YJ=L(r=>/^\s*quadrantChart/.test(r),"detector"),KJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-DHK8pFQ0.js");return{diagram:e}},__vite__mapDeps([31,26,27]));return{id:lj,diagram:r}},"loader"),VJ={id:lj,detector:YJ,loader:KJ},XJ=VJ,cj="xychart",ZJ=L(r=>/^\s*xychart(-beta)?/.test(r),"detector"),QJ=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-DIfk5B6V.js");return{diagram:e}},__vite__mapDeps([32,26,27]));return{id:cj,diagram:r}},"loader"),JJ={id:cj,detector:ZJ,loader:QJ},ttt=JJ,hj="requirement",ett=L(r=>/^\s*requirement(Diagram)?/.test(r),"detector"),rtt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-O5-02BwJ.js");return{diagram:e}},__vite__mapDeps([33,17,18]));return{id:hj,diagram:r}},"loader"),itt={id:hj,detector:ett,loader:rtt},ntt=itt,uj="sequence",att=L(r=>/^\s*sequenceDiagram/.test(r),"detector"),stt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-DgPVR3Bj.js");return{diagram:e}},__vite__mapDeps([34,14,23]));return{id:uj,diagram:r}},"loader"),ott={id:uj,detector:att,loader:stt},ltt=ott,dj="class",ctt=L((r,e)=>{var i;return((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(r)},"detector"),htt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-Dj8SIYaT.js");return{diagram:e}},__vite__mapDeps([35,36,16,14,17,18]));return{id:dj,diagram:r}},"loader"),utt={id:dj,detector:ctt,loader:htt},dtt=utt,fj="classDiagram",ftt=L((r,e)=>{var i;return/^\s*classDiagram/.test(r)&&((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(r)},"detector"),ptt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-Dj8SIYaT.js");return{diagram:e}},__vite__mapDeps([37,36,16,14,17,18]));return{id:fj,diagram:r}},"loader"),gtt={id:fj,detector:ftt,loader:ptt},mtt=gtt,pj="state",ytt=L((r,e)=>{var i;return((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(r)},"detector"),btt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-Bca5FGdM.js");return{diagram:e}},__vite__mapDeps([38,39,17,18,6,7,8,9]));return{id:pj,diagram:r}},"loader"),xtt={id:pj,detector:ytt,loader:btt},vtt=xtt,gj="stateDiagram",Ctt=L((r,e)=>{var i;return!!(/^\s*stateDiagram-v2/.test(r)||/^\s*stateDiagram/.test(r)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},"detector"),_tt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-DIY7ac6n.js");return{diagram:e}},__vite__mapDeps([40,39,17,18]));return{id:gj,diagram:r}},"loader"),ktt={id:gj,detector:Ctt,loader:_tt},wtt=ktt,mj="journey",Stt=L(r=>/^\s*journey/.test(r),"detector"),Ttt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-BJYoD993.js");return{diagram:e}},__vite__mapDeps([41,16,14,30]));return{id:mj,diagram:r}},"loader"),Ett={id:mj,detector:Stt,loader:Ttt},Ntt=Ett,Att=L((r,e,i)=>{Bt.debug(`rendering svg for syntax error
|
|
448
|
+
`);const n=zK(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),NL(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 ${i}`)},"draw"),yj={draw:Att},Mtt=yj,Btt={db:{},renderer:yj,parser:{parse:L(()=>{},"parse")}},Ltt=Btt,bj="flowchart-elk",Ott=L((r,e={})=>{var i;return/^\s*flowchart-elk/.test(r)||/^\s*(flowchart|graph)/.test(r)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),Rtt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-CwfPSiA0.js");return{diagram:e}},__vite__mapDeps([15,16,14,17,18,19]));return{id:bj,diagram:r}},"loader"),jtt={id:bj,detector:Ott,loader:Rtt},Dtt=jtt,xj="timeline",Ftt=L(r=>/^\s*timeline/.test(r),"detector"),Itt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-C-mJxmUk.js");return{diagram:e}},__vite__mapDeps([42,30]));return{id:xj,diagram:r}},"loader"),$tt={id:xj,detector:Ftt,loader:Itt},ztt=$tt,vj="mindmap",Ptt=L(r=>/^\s*mindmap/.test(r),"detector"),qtt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-BG5rEg9o.js");return{diagram:e}},__vite__mapDeps([43,17,18]));return{id:vj,diagram:r}},"loader"),Utt={id:vj,detector:Ptt,loader:qtt},Htt=Utt,Cj="kanban",Wtt=L(r=>/^\s*kanban/.test(r),"detector"),Gtt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-BCtHyYn3.js");return{diagram:e}},__vite__mapDeps([44,16]));return{id:Cj,diagram:r}},"loader"),Ytt={id:Cj,detector:Wtt,loader:Gtt},Ktt=Ytt,_j="sankey",Vtt=L(r=>/^\s*sankey(-beta)?/.test(r),"detector"),Xtt=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-CWTRPjWg.js");return{diagram:e}},[]);return{id:_j,diagram:r}},"loader"),Ztt={id:_j,detector:Vtt,loader:Xtt},Qtt=Ztt,kj="packet",Jtt=L(r=>/^\s*packet(-beta)?/.test(r),"detector"),tet=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-CMTfUaO1.js");return{diagram:e}},__vite__mapDeps([45,22,24,9,7]));return{id:kj,diagram:r}},"loader"),eet={id:kj,detector:Jtt,loader:tet},wj="radar",ret=L(r=>/^\s*radar-beta/.test(r),"detector"),iet=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-xNrgYgGq.js");return{diagram:e}},__vite__mapDeps([46,22,24,9,7]));return{id:wj,diagram:r}},"loader"),net={id:wj,detector:ret,loader:iet},Sj="block",aet=L(r=>/^\s*block(-beta)?/.test(r),"detector"),set=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-yJn6zNZG.js");return{diagram:e}},__vite__mapDeps([47,16,10,6,7,19]));return{id:Sj,diagram:r}},"loader"),oet={id:Sj,detector:aet,loader:set},cet=oet,Tj="treeView",het=L(r=>/^\s*treeView-beta/.test(r),"detector"),uet=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-CmCCHnLC.js");return{diagram:e}},__vite__mapDeps([48,22,23,24,9,7]));return{id:Tj,diagram:r}},"loader"),det={id:Tj,detector:het,loader:uet},fet=det,Ej="architecture",pet=L(r=>/^\s*architecture/.test(r),"detector"),get=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-C58hXcUE.js");return{diagram:e}},__vite__mapDeps([49,22,24,9,7,12]));return{id:Ej,diagram:r}},"loader"),met={id:Ej,detector:pet,loader:get},yet=met,Nj="ishikawa",bet=L(r=>/^\s*ishikawa(-beta)?\b/i.test(r),"detector"),xet=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-DdanP4Cg.js");return{diagram:e}},[]);return{id:Nj,diagram:r}},"loader"),vet={id:Nj,detector:bet,loader:xet},Aj="venn",Cet=L(r=>/^\s*venn-beta/.test(r),"detector"),_et=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-EXa8McYU.js");return{diagram:e}},[]);return{id:Aj,diagram:r}},"loader"),ket={id:Aj,detector:Cet,loader:_et},wet=ket,Mj="treemap",Tet=L(r=>/^\s*treemap/.test(r),"detector"),Eet=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-Ba84raDA.js");return{diagram:e}},__vite__mapDeps([50,18,22,24,9,7,27]));return{id:Mj,diagram:r}},"loader"),Net={id:Mj,detector:Tet,loader:Eet},Bj="wardley-beta",Aet=L(r=>/^\s*wardley-beta/i.test(r),"detector"),Met=L(async()=>{const{diagram:r}=await De(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-B8qVq-Ss.js");return{diagram:e}},__vite__mapDeps([51,22,24,9,7]));return{id:Bj,diagram:r}},"loader"),Bet={id:Bj,detector:Aet,loader:Met},Let=Bet,cN=!1,Lm=L(()=>{cN||(cN=!0,Lg("error",Ltt,r=>r.toLowerCase().trim()==="error"),Lg("---",{db:{clear:L(()=>{},"clear")},styles:{},renderer:{draw:L(()=>{},"draw")},parser:{parse:L(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:L(()=>null,"init")},r=>r.toLowerCase().trimStart().startsWith("---")),Ev(Dtt,Htt,yet),Ev(vJ,Ktt,mtt,dtt,LJ,zJ,UJ,GJ,ntt,ltt,NJ,wJ,ztt,DJ,wtt,vtt,Ntt,XJ,Qtt,eet,ttt,cet,fet,net,vet,Net,wet,Let))},"addDiagrams"),Oet=L(async()=>{Bt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Il).map(async([i,{detector:n,loader:a}])=>{if(a)try{Bv(i)}catch{try{const{diagram:o,id:c}=await a();Lg(c,o,n)}catch(o){throw Bt.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Il[i],o}}}))).filter(i=>i.status==="rejected");if(e.length>0){Bt.error(`Failed to load ${e.length} external diagrams`);for(const i of e)Bt.error(i);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),Ret="graphics-document document";function Lj(r,e){r.attr("role",Ret),e!==""&&r.attr("aria-roledescription",e)}L(Lj,"setA11yDiagramInfo");function Oj(r,e,i,n){if(r.insert!==void 0){if(i){const a=`chart-desc-${n}`;r.attr("aria-describedby",a),r.insert("desc",":first-child").attr("id",a).text(i)}if(e){const a=`chart-title-${n}`;r.attr("aria-labelledby",a),r.insert("title",":first-child").attr("id",a).text(e)}}}L(Oj,"addSVGa11yTitleDescription");var Ll,d1=(Ll=class{constructor(e,i,n,a,o){this.type=e,this.text=i,this.db=n,this.parser=a,this.renderer=o}static async fromText(e,i={}){var d,f;const n=Vr(),a=gC(e,n);e=gX(e)+`
|
|
449
|
+
`;try{Bv(a)}catch{const g=xY(a);if(!g)throw new pL(`Diagram ${a} not found.`);const{id:x,diagram:y}=await g();Lg(x,y)}const{db:o,parser:c,renderer:h,init:u}=Bv(a);return c.parser&&(c.parser.yy=o),(d=o.clear)==null||d.call(o),u==null||u(n),i.title&&((f=o.setDiagramTitle)==null||f.call(o,i.title)),await c.parse(e),new Ll(a,e,o,c,h)}async render(e,i){await this.renderer.draw(this.text,e,i,this)}getParser(){return this.parser}getType(){return this.type}},L(Ll,"Diagram"),Ll),hN=[],jet=L(()=>{hN.forEach(r=>{r()}),hN=[]},"attachFunctions"),Det=L(r=>r.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Rj(r){const e=r.match(fL);if(!e)return{text:r,metadata:{}};let i=YV(e[1],{schema:GV})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};const n={};return i.displayMode&&(n.displayMode=i.displayMode.toString()),i.title&&(n.title=i.title.toString()),i.config&&(n.config=i.config),{text:r.slice(e[0].length),metadata:n}}L(Rj,"extractFrontMatter");var Fet=L(r=>r.replace(/\r\n?/g,`
|
|
450
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,i,n)=>"<"+i+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Iet=L(r=>{const{text:e,metadata:i}=Rj(r),{displayMode:n,title:a,config:o={}}=i;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:a,config:o,text:e}},"processFrontmatter"),$et=L(r=>{const e=ba.detectInit(r)??{},i=ba.detectDirective(r,"wrap");return Array.isArray(i)?e.wrap=i.some(({type:n})=>n==="wrap"):(i==null?void 0:i.type)==="wrap"&&(e.wrap=!0),{text:rX(r),directive:e}},"processDirectives");function r_(r){const e=Fet(r),i=Iet(e),n=$et(i.text),a=$C(i.config,n.directive);return r=Det(n.text),{code:r,title:i.title,config:a}}L(r_,"preprocessDiagram");function jj(r){const e=new TextEncoder().encode(r),i=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(i)}L(jj,"toBase64");var zet=5e4,Pet="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",qet="sandbox",Uet="loose",Het="http://www.w3.org/2000/svg",Wet="http://www.w3.org/1999/xlink",Get="http://www.w3.org/1999/xhtml",Yet="100%",Ket="100%",Vet="border:0;margin:0;",Xet="margin:0",Zet="allow-top-navigation-by-user-activation allow-popups",Qet='The "iframe" tag is not supported by your browser.',Jet=["foreignobject"],trt=["dominant-baseline"];function i_(r){const e=r_(r);return Mg(),YY(e.config??{}),e}L(i_,"processAndSetConfigs");async function Dj(r,e){Lm();try{const{code:i,config:n}=i_(r);return{diagramType:(await Ij(i)).type,config:n}}catch(i){if(e!=null&&e.suppressErrors)return!1;throw i}}L(Dj,"parse");var uN=L((r,e,i=[])=>`
|
|
451
|
+
.${r} ${e} { ${i.join(" !important; ")} !important; }`,"cssImportantStyles"),ert=L((r,e=new Map)=>{let i="";if(r.themeCSS!==void 0&&(i+=`
|
|
452
|
+
${r.themeCSS}`),r.fontFamily!==void 0&&(i+=`
|
|
453
|
+
:root { --mermaid-font-family: ${r.fontFamily}}`),r.altFontFamily!==void 0&&(i+=`
|
|
454
|
+
:root { --mermaid-alt-font-family: ${r.altFontFamily}}`),e instanceof Map){const c=an(r)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{rT(h.styles)||c.forEach(u=>{i+=uN(h.id,u,h.styles)}),rT(h.textStyles)||(i+=uN(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return i},"createCssStyles"),rrt=L((r,e,i,n)=>{const a=ert(r,i),o=dK(e,a,{...r.themeVariables,theme:r.theme,look:r.look},n);return u1(pJ(`${n}{${o}}`),mJ)},"createUserStyles"),irt=L((r="",e,i)=>{let n=r;return!i&&!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"),nrt=L((r="",e)=>{var a,o;const i=(o=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":Ket,n=jj(`<body style="${Xet}">${r}</body>`);return`<iframe style="width:${Yet};height:${i};${Vet}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${Zet}">
|
|
455
|
+
${Qet}
|
|
456
|
+
</iframe>`},"putIntoIFrame"),dN=L((r,e,i,n,a)=>{const o=r.append("div");o.attr("id",i),n&&o.attr("style",n);const c=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Het);return a&&c.attr("xmlns:xlink",a),c.append("g"),r},"appendDivSvgG");function f1(r,e){return r.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}L(f1,"sandboxedIframe");var art=L((r,e,i,n)=>{var a,o,c;(a=r.getElementById(e))==null||a.remove(),(o=r.getElementById(i))==null||o.remove(),(c=r.getElementById(n))==null||c.remove()},"removeExistingElements"),srt=L(async function(r,e,i){var U,V,I,G,D,W;Lm();const n=i_(e);e=n.code;const a=Vr();Bt.debug(a),e.length>((a==null?void 0:a.maxTextSize)??zet)&&(e=Pet);const o="#"+r,c="i"+r,h="#"+c,u="d"+r,d="#"+u,f=L(()=>{const tt=_e(x?h:d).node();tt&&"remove"in tt&&tt.remove()},"removeTempElements");let g=_e("body");const x=a.securityLevel===qet,y=a.securityLevel===Uet,v=a.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const K=f1(_e(i),c);g=_e(K.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=_e(i);dN(g,r,u,`font-family: ${v}`,Wet)}else{if(art(document,r,u,c),x){const K=f1(_e("body"),c);g=_e(K.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=_e("body");dN(g,r,u)}let C,_;try{C=await d1.fromText(e,{title:n.title})}catch(K){if(a.suppressErrorRendering)throw f(),K;C=await d1.fromText("error"),_=K}const k=g.select(d).node(),T=C.type,N=k.firstChild,E=N.firstChild,B=(V=(U=C.renderer).getClasses)==null?void 0:V.call(U,e,C),O=rrt(a,T,B,o),A=document.createElement("style");A.innerHTML=O,N.insertBefore(A,E);try{await C.renderer.draw(e,r,"11.14.0",C)}catch(K){throw a.suppressErrorRendering?f():Mtt.draw(e,r,"11.14.0"),K}const M=g.select(`${d} svg`),F=(G=(I=C.db).getAccTitle)==null?void 0:G.call(I),j=(W=(D=C.db).getAccDescription)==null?void 0:W.call(D);$j(T,M,F,j),g.select(`[id="${r}"]`).selectAll("foreignobject > *").attr("xmlns",Get);let z=g.select(d).node().innerHTML;if(Bt.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),z=irt(z,x,Is(a.arrowMarkerAbsolute)),x){const K=g.select(d+" svg").node();z=nrt(z,K)}else y||(z=Do.sanitize(z,{ADD_TAGS:Jet,ADD_ATTR:trt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(jet(),_)throw _;return f(),{diagramType:T,svg:z,bindFunctions:C.db.bindFunctions}},"render");function Fj(r={}){var n;const e=Ci({},r);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),WY(e),e!=null&&e.theme&&e.theme in Ls?e.themeVariables=Ls[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ls.default.getThemeVariables(e.themeVariables));const i=typeof e=="object"?HY(e):xL();pC(i.logLevel),Lm()}L(Fj,"initialize");var Ij=L((r,e={})=>{const{code:i}=r_(r);return d1.fromText(i,e)},"getDiagramFromText");function $j(r,e,i,n){Lj(e,r),Oj(e,i,n,e.attr("id"))}L($j,"addA11yInfo");var Ul=Object.freeze({render:srt,parse:Dj,getDiagramFromText:Ij,initialize:Fj,getConfig:Vr,setConfig:vL,getSiteConfig:xL,updateSiteConfig:GY,reset:L(()=>{Mg()},"reset"),globalReset:L(()=>{Mg(Ch)},"globalReset"),defaultConfig:Ch});pC(Vr().logLevel);Mg(Vr());var ort=L((r,e,i)=>{Bt.warn(r),IC(r)?(i&&i(r.str,r.hash),e.push({...r,message:r.str,error:r})):(i&&i(r),r instanceof Error&&e.push({str:r.message,message:r.message,hash:r.name,error:r}))},"handleError"),zj=L(async function(r={querySelector:".mermaid"}){try{await lrt(r)}catch(e){if(IC(e)&&Bt.error(e.str),Dn.parseError&&Dn.parseError(e),!r.suppressErrors)throw Bt.error("Use the suppressErrors option to suppress these errors"),e}},"run"),lrt=L(async function({postRenderCallback:r,querySelector:e,nodes:i}={querySelector:".mermaid"}){const n=Ul.getConfig();Bt.debug(`${r?"":"No "}Callback function found`);let a;if(i)a=i;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");Bt.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(Bt.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(Bt.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const d=`mermaid-${o.next()}`;c=u.innerHTML,c=i3(ba.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const f=ba.detectInit(c);f&&Bt.debug("Detected early reinit: ",f);try{const{svg:g,bindFunctions:x}=await Hj(d,c,u);u.innerHTML=g,r&&await r(d),x&&x(u)}catch(g){ort(g,h,Dn.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),Pj=L(function(r){Ul.initialize(r)},"initialize"),crt=L(async function(r,e,i){Bt.warn("mermaid.init is deprecated. Please use run instead."),r&&Pj(r);const n={postRenderCallback:i,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await zj(n)},"init"),hrt=L(async(r,{lazyLoad:e=!0}={})=>{Lm(),Ev(...r),e===!1&&await Oet()},"registerExternalDiagrams"),qj=L(function(){if(Dn.startOnLoad){const{startOnLoad:r}=Ul.getConfig();r&&Dn.run().catch(e=>Bt.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",qj,!1);var urt=L(function(r){Dn.parseError=r},"setParseErrorHandler"),Qg=[],w0=!1,Uj=L(async()=>{if(!w0){for(w0=!0;Qg.length>0;){const r=Qg.shift();if(r)try{await r()}catch(e){Bt.error("Error executing queue",e)}}w0=!1}},"executeQueue"),drt=L(async(r,e)=>new Promise((i,n)=>{const a=L(()=>new Promise((o,c)=>{Ul.parse(r,e).then(h=>{o(h),i(h)},h=>{var u;Bt.error("Error parsing",h),(u=Dn.parseError)==null||u.call(Dn,h),c(h),n(h)})}),"performCall");Qg.push(a),Uj().catch(n)}),"parse"),Hj=L((r,e,i)=>new Promise((n,a)=>{const o=L(()=>new Promise((c,h)=>{Ul.render(r,e,i).then(u=>{c(u),n(u)},u=>{var d;Bt.error("Error parsing",u),(d=Dn.parseError)==null||d.call(Dn,u),h(u),a(u)})}),"performCall");Qg.push(o),Uj().catch(a)}),"render"),frt=L(()=>Object.keys(Il).map(r=>({id:r})),"getRegisteredDiagramsMetadata"),Dn={startOnLoad:!0,mermaidAPI:Ul,parse:drt,render:Hj,init:crt,run:zj,registerExternalDiagrams:hrt,registerLayoutLoaders:K5,initialize:Pj,parseError:void 0,contentLoaded:qj,setParseErrorHandler:urt,detectType:gC,registerIconPacks:_Z,getRegisteredDiagramsMetadata:frt},n_=Dn;/*! Check if previously processed *//*!
|
|
457
|
+
* Wait for document loaded before starting the execution
|
|
458
|
+
*/let fN=null;function prt(r){const e="'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif";return r==="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 Wj(r){fN!==r&&(n_.initialize(prt(r)),fN=r)}function grt(r){const e=r.getAttribute("style");if(!e)return;const i=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(";");i.trim()?r.setAttribute("style",i):r.removeAttribute("style")}function Gj(r){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"];r.querySelectorAll(e.join(", ")).forEach(grt);const i=r.querySelector("style");if(i&&i.textContent){const n=i.textContent.replace(/#[\w-]+\s+\.[\w-]+\s*(?:>\s*\*|\s+span|\s+tspan)\s*\{[^}]*\}/g,"");i.textContent=n}}async function mrt(r,e){r.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=r.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 n_.render(u,h);f.innerHTML=g;const x=f.querySelector("svg");x&&(x.removeAttribute("height"),x.style.maxWidth="100%",x.style.height="auto",Gj(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 yrt(r,e,i,n="mmd"){q.useEffect(()=>{const a=r.current;if(!a||!e)return;Wj(i);let o=!1;return queueMicrotask(()=>{o||mrt(a,n)}),()=>{o=!0}},[r,e,i,n])}var S0,pN;function brt(){if(pN)return S0;pN=1;function r(Q){return Q instanceof Map?Q.clear=Q.delete=Q.set=function(){throw new Error("map is read-only")}:Q instanceof Set&&(Q.add=Q.clear=Q.delete=function(){throw new Error("set is read-only")}),Object.freeze(Q),Object.getOwnPropertyNames(Q).forEach(Tt=>{const Pt=Q[Tt],Ce=typeof Pt;(Ce==="object"||Ce==="function")&&!Object.isFrozen(Pt)&&r(Pt)}),Q}class e{constructor(Tt){Tt.data===void 0&&(Tt.data={}),this.data=Tt.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(Q){return Q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function n(Q,...Tt){const Pt=Object.create(null);for(const Ce in Q)Pt[Ce]=Q[Ce];return Tt.forEach(function(Ce){for(const gr in Ce)Pt[gr]=Ce[gr]}),Pt}const a="</span>",o=Q=>!!Q.scope,c=(Q,{prefix:Tt})=>{if(Q.startsWith("language:"))return Q.replace("language:","language-");if(Q.includes(".")){const Pt=Q.split(".");return[`${Tt}${Pt.shift()}`,...Pt.map((Ce,gr)=>`${Ce}${"_".repeat(gr+1)}`)].join(" ")}return`${Tt}${Q}`};class h{constructor(Tt,Pt){this.buffer="",this.classPrefix=Pt.classPrefix,Tt.walk(this)}addText(Tt){this.buffer+=i(Tt)}openNode(Tt){if(!o(Tt))return;const Pt=c(Tt.scope,{prefix:this.classPrefix});this.span(Pt)}closeNode(Tt){o(Tt)&&(this.buffer+=a)}value(){return this.buffer}span(Tt){this.buffer+=`<span class="${Tt}">`}}const u=(Q={})=>{const Tt={children:[]};return Object.assign(Tt,Q),Tt};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(Tt){this.top.children.push(Tt)}openNode(Tt){const Pt=u({scope:Tt});this.add(Pt),this.stack.push(Pt)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Tt){return this.constructor._walk(Tt,this.rootNode)}static _walk(Tt,Pt){return typeof Pt=="string"?Tt.addText(Pt):Pt.children&&(Tt.openNode(Pt),Pt.children.forEach(Ce=>this._walk(Tt,Ce)),Tt.closeNode(Pt)),Tt}static _collapse(Tt){typeof Tt!="string"&&Tt.children&&(Tt.children.every(Pt=>typeof Pt=="string")?Tt.children=[Tt.children.join("")]:Tt.children.forEach(Pt=>{d._collapse(Pt)}))}}class f extends d{constructor(Tt){super(),this.options=Tt}addText(Tt){Tt!==""&&this.add(Tt)}startScope(Tt){this.openNode(Tt)}endScope(){this.closeNode()}__addSublanguage(Tt,Pt){const Ce=Tt.root;Pt&&(Ce.scope=`language:${Pt}`),this.add(Ce)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(Q){return Q?typeof Q=="string"?Q:Q.source:null}function x(Q){return C("(?=",Q,")")}function y(Q){return C("(?:",Q,")*")}function v(Q){return C("(?:",Q,")?")}function C(...Q){return Q.map(Pt=>g(Pt)).join("")}function _(Q){const Tt=Q[Q.length-1];return typeof Tt=="object"&&Tt.constructor===Object?(Q.splice(Q.length-1,1),Tt):{}}function k(...Q){return"("+(_(Q).capture?"":"?:")+Q.map(Ce=>g(Ce)).join("|")+")"}function T(Q){return new RegExp(Q.toString()+"|").exec("").length-1}function N(Q,Tt){const Pt=Q&&Q.exec(Tt);return Pt&&Pt.index===0}const E=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B(Q,{joinWith:Tt}){let Pt=0;return Q.map(Ce=>{Pt+=1;const gr=Pt;let we=g(Ce),Qt="";for(;we.length>0;){const Kt=E.exec(we);if(!Kt){Qt+=we;break}Qt+=we.substring(0,Kt.index),we=we.substring(Kt.index+Kt[0].length),Kt[0][0]==="\\"&&Kt[1]?Qt+="\\"+String(Number(Kt[1])+gr):(Qt+=Kt[0],Kt[0]==="("&&Pt++)}return Qt}).map(Ce=>`(${Ce})`).join(Tt)}const O=/\b\B/,A="[a-zA-Z]\\w*",M="[a-zA-Z_]\\w*",F="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",z="\\b(0b[01]+)",U="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",V=(Q={})=>{const Tt=/^#![ ]*\//;return Q.binary&&(Q.begin=C(Tt,/.*\b/,Q.binary,/\b.*/)),n({scope:"meta",begin:Tt,end:/$/,relevance:0,"on:begin":(Pt,Ce)=>{Pt.index!==0&&Ce.ignoreMatch()}},Q)},I={begin:"\\\\[\\s\\S]",relevance:0},G={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[I]},D={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[I]},W={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/},K=function(Q,Tt,Pt={}){const Ce=n({scope:"comment",begin:Q,end:Tt,contains:[]},Pt);Ce.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 gr=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 Ce.contains.push({begin:C(/[ ]+/,"(",gr,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ce},tt=K("//","$"),nt=K("/\\*","\\*/"),Y=K("#","$"),rt={scope:"number",begin:F,relevance:0},ft={scope:"number",begin:j,relevance:0},ct={scope:"number",begin:z,relevance:0},xt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[I,{begin:/\[/,end:/\]/,relevance:0,contains:[I]}]},st={scope:"title",begin:A,relevance:0},kt={scope:"title",begin:M,relevance:0},it={begin:"\\.\\s*"+M,relevance:0};var J=Object.freeze({__proto__:null,APOS_STRING_MODE:G,BACKSLASH_ESCAPE:I,BINARY_NUMBER_MODE:ct,BINARY_NUMBER_RE:z,COMMENT:K,C_BLOCK_COMMENT_MODE:nt,C_LINE_COMMENT_MODE:tt,C_NUMBER_MODE:ft,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(Q){return Object.assign(Q,{"on:begin":(Tt,Pt)=>{Pt.data._beginMatch=Tt[1]},"on:end":(Tt,Pt)=>{Pt.data._beginMatch!==Tt[1]&&Pt.ignoreMatch()}})},HASH_COMMENT_MODE:Y,IDENT_RE:A,MATCH_NOTHING_RE:O,METHOD_GUARD:it,NUMBER_MODE:rt,NUMBER_RE:F,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:D,REGEXP_MODE:xt,RE_STARTERS_RE:U,SHEBANG:V,TITLE_MODE:st,UNDERSCORE_IDENT_RE:M,UNDERSCORE_TITLE_MODE:kt});function vt(Q,Tt){Q.input[Q.index-1]==="."&&Tt.ignoreMatch()}function At(Q,Tt){Q.className!==void 0&&(Q.scope=Q.className,delete Q.className)}function qt(Q,Tt){Tt&&Q.beginKeywords&&(Q.begin="\\b("+Q.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Q.__beforeBegin=vt,Q.keywords=Q.keywords||Q.beginKeywords,delete Q.beginKeywords,Q.relevance===void 0&&(Q.relevance=0))}function ie(Q,Tt){Array.isArray(Q.illegal)&&(Q.illegal=k(...Q.illegal))}function Dt(Q,Tt){if(Q.match){if(Q.begin||Q.end)throw new Error("begin & end are not supported with match");Q.begin=Q.match,delete Q.match}}function Ht(Q,Tt){Q.relevance===void 0&&(Q.relevance=1)}const Fe=(Q,Tt)=>{if(!Q.beforeMatch)return;if(Q.starts)throw new Error("beforeMatch cannot be used with starts");const Pt=Object.assign({},Q);Object.keys(Q).forEach(Ce=>{delete Q[Ce]}),Q.keywords=Pt.keywords,Q.begin=C(Pt.beforeMatch,x(Pt.begin)),Q.starts={relevance:0,contains:[Object.assign(Pt,{endsParent:!0})]},Q.relevance=0,delete Pt.beforeMatch},Zt=["of","and","for","in","not","or","if","then","parent","list","value"],ht="keyword";function ot(Q,Tt,Pt=ht){const Ce=Object.create(null);return typeof Q=="string"?gr(Pt,Q.split(" ")):Array.isArray(Q)?gr(Pt,Q):Object.keys(Q).forEach(function(we){Object.assign(Ce,ot(Q[we],Tt,we))}),Ce;function gr(we,Qt){Tt&&(Qt=Qt.map(Kt=>Kt.toLowerCase())),Qt.forEach(function(Kt){const ye=Kt.split("|");Ce[ye[0]]=[we,Lt(ye[0],ye[1])]})}}function Lt(Q,Tt){return Tt?Number(Tt):$t(Q)?0:1}function $t(Q){return Zt.includes(Q.toLowerCase())}const Wt={},Rt=Q=>{console.error(Q)},ne=(Q,...Tt)=>{console.log(`WARN: ${Q}`,...Tt)},Ft=(Q,Tt)=>{Wt[`${Q}/${Tt}`]||(console.log(`Deprecated as of ${Q}. ${Tt}`),Wt[`${Q}/${Tt}`]=!0)},Re=new Error;function xe(Q,Tt,{key:Pt}){let Ce=0;const gr=Q[Pt],we={},Qt={};for(let Kt=1;Kt<=Tt.length;Kt++)Qt[Kt+Ce]=gr[Kt],we[Kt+Ce]=!0,Ce+=T(Tt[Kt-1]);Q[Pt]=Qt,Q[Pt]._emit=we,Q[Pt]._multi=!0}function He(Q){if(Array.isArray(Q.begin)){if(Q.skip||Q.excludeBegin||Q.returnBegin)throw Rt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Re;if(typeof Q.beginScope!="object"||Q.beginScope===null)throw Rt("beginScope must be object"),Re;xe(Q,Q.begin,{key:"beginScope"}),Q.begin=B(Q.begin,{joinWith:""})}}function Me(Q){if(Array.isArray(Q.end)){if(Q.skip||Q.excludeEnd||Q.returnEnd)throw Rt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Re;if(typeof Q.endScope!="object"||Q.endScope===null)throw Rt("endScope must be object"),Re;xe(Q,Q.end,{key:"endScope"}),Q.end=B(Q.end,{joinWith:""})}}function kr(Q){Q.scope&&typeof Q.scope=="object"&&Q.scope!==null&&(Q.beginScope=Q.scope,delete Q.scope)}function Lr(Q){kr(Q),typeof Q.beginScope=="string"&&(Q.beginScope={_wrap:Q.beginScope}),typeof Q.endScope=="string"&&(Q.endScope={_wrap:Q.endScope}),He(Q),Me(Q)}function Ge(Q){function Tt(Qt,Kt){return new RegExp(g(Qt),"m"+(Q.case_insensitive?"i":"")+(Q.unicodeRegex?"u":"")+(Kt?"g":""))}class Pt{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Kt,ye){ye.position=this.position++,this.matchIndexes[this.matchAt]=ye,this.regexes.push([ye,Kt]),this.matchAt+=T(Kt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Kt=this.regexes.map(ye=>ye[1]);this.matcherRe=Tt(B(Kt,{joinWith:"|"}),!0),this.lastIndex=0}exec(Kt){this.matcherRe.lastIndex=this.lastIndex;const ye=this.matcherRe.exec(Kt);if(!ye)return null;const mr=ye.findIndex((ln,Yi)=>Yi>0&&ln!==void 0),wr=this.matchIndexes[mr];return ye.splice(0,mr),Object.assign(ye,wr)}}class Ce{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Kt){if(this.multiRegexes[Kt])return this.multiRegexes[Kt];const ye=new Pt;return this.rules.slice(Kt).forEach(([mr,wr])=>ye.addRule(mr,wr)),ye.compile(),this.multiRegexes[Kt]=ye,ye}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Kt,ye){this.rules.push([Kt,ye]),ye.type==="begin"&&this.count++}exec(Kt){const ye=this.getMatcher(this.regexIndex);ye.lastIndex=this.lastIndex;let mr=ye.exec(Kt);if(this.resumingScanAtSamePosition()&&!(mr&&mr.index===this.lastIndex)){const wr=this.getMatcher(0);wr.lastIndex=this.lastIndex+1,mr=wr.exec(Kt)}return mr&&(this.regexIndex+=mr.position+1,this.regexIndex===this.count&&this.considerAll()),mr}}function gr(Qt){const Kt=new Ce;return Qt.contains.forEach(ye=>Kt.addRule(ye.begin,{rule:ye,type:"begin"})),Qt.terminatorEnd&&Kt.addRule(Qt.terminatorEnd,{type:"end"}),Qt.illegal&&Kt.addRule(Qt.illegal,{type:"illegal"}),Kt}function we(Qt,Kt){const ye=Qt;if(Qt.isCompiled)return ye;[At,Dt,Lr,Fe].forEach(wr=>wr(Qt,Kt)),Q.compilerExtensions.forEach(wr=>wr(Qt,Kt)),Qt.__beforeBegin=null,[qt,ie,Ht].forEach(wr=>wr(Qt,Kt)),Qt.isCompiled=!0;let mr=null;return typeof Qt.keywords=="object"&&Qt.keywords.$pattern&&(Qt.keywords=Object.assign({},Qt.keywords),mr=Qt.keywords.$pattern,delete Qt.keywords.$pattern),mr=mr||/\w+/,Qt.keywords&&(Qt.keywords=ot(Qt.keywords,Q.case_insensitive)),ye.keywordPatternRe=Tt(mr,!0),Kt&&(Qt.begin||(Qt.begin=/\B|\b/),ye.beginRe=Tt(ye.begin),!Qt.end&&!Qt.endsWithParent&&(Qt.end=/\B|\b/),Qt.end&&(ye.endRe=Tt(ye.end)),ye.terminatorEnd=g(ye.end)||"",Qt.endsWithParent&&Kt.terminatorEnd&&(ye.terminatorEnd+=(Qt.end?"|":"")+Kt.terminatorEnd)),Qt.illegal&&(ye.illegalRe=Tt(Qt.illegal)),Qt.contains||(Qt.contains=[]),Qt.contains=[].concat(...Qt.contains.map(function(wr){return or(wr==="self"?Qt:wr)})),Qt.contains.forEach(function(wr){we(wr,ye)}),Qt.starts&&we(Qt.starts,Kt),ye.matcher=gr(ye),ye}if(Q.compilerExtensions||(Q.compilerExtensions=[]),Q.contains&&Q.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Q.classNameAliases=n(Q.classNameAliases||{}),we(Q)}function Ze(Q){return Q?Q.endsWithParent||Ze(Q.starts):!1}function or(Q){return Q.variants&&!Q.cachedVariants&&(Q.cachedVariants=Q.variants.map(function(Tt){return n(Q,{variants:null},Tt)})),Q.cachedVariants?Q.cachedVariants:Ze(Q)?n(Q,{starts:Q.starts?n(Q.starts):null}):Object.isFrozen(Q)?n(Q):Q}var me="11.11.1";class sr extends Error{constructor(Tt,Pt){super(Tt),this.name="HTMLInjectionError",this.html=Pt}}const $e=i,Er=n,ve=Symbol("nomatch"),Or=7,Xr=function(Q){const Tt=Object.create(null),Pt=Object.create(null),Ce=[];let gr=!0;const we="Could not find the language '{}', did you forget to load/include a language module?",Qt={disableAutodetect:!0,name:"Plain text",contains:[]};let Kt={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function ye(pt){return Kt.noHighlightRe.test(pt)}function mr(pt){let It=pt.className+" ";It+=pt.parentNode?pt.parentNode.className:"";const Gt=Kt.languageDetectRe.exec(It);if(Gt){const ue=mi(Gt[1]);return ue||(ne(we.replace("{}",Gt[1])),ne("Falling back to no-highlight mode for this block.",pt)),ue?Gt[1]:"no-highlight"}return It.split(/\s+/).find(ue=>ye(ue)||mi(ue))}function wr(pt,It,Gt){let ue="",Ke="";typeof It=="object"?(ue=pt,Gt=It.ignoreIllegals,Ke=It.language):(Ft("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ft("10.7.0",`Please use highlight(code, options) instead.
|
|
459
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Ke=pt,ue=It),Gt===void 0&&(Gt=!0);const br={code:ue,language:Ke};X("before:highlight",br);const rr=br.result?br.result:ln(br.language,br.code,Gt);return rr.code=br.code,X("after:highlight",rr),rr}function ln(pt,It,Gt,ue){const Ke=Object.create(null);function br(Ut,le){return Ut.keywords[le]}function rr(){if(!Yt.keywords){Ye.addText(Qe);return}let Ut=0;Yt.keywordPatternRe.lastIndex=0;let le=Yt.keywordPatternRe.exec(Qe),Ie="";for(;le;){Ie+=Qe.substring(Ut,le.index);const Je=Ot.case_insensitive?le[0].toLowerCase():le[0],Kr=br(Yt,Je);if(Kr){const[Un,Lh]=Kr;if(Ye.addText(Ie),Ie="",Ke[Je]=(Ke[Je]||0)+1,Ke[Je]<=Or&&(Fi+=Lh),Un.startsWith("_"))Ie+=le[0];else{const nf=Ot.classNameAliases[Un]||Un;Qr(le[0],nf)}}else Ie+=le[0];Ut=Yt.keywordPatternRe.lastIndex,le=Yt.keywordPatternRe.exec(Qe)}Ie+=Qe.substring(Ut),Ye.addText(Ie)}function Yr(){if(Qe==="")return;let Ut=null;if(typeof Yt.subLanguage=="string"){if(!Tt[Yt.subLanguage]){Ye.addText(Qe);return}Ut=ln(Yt.subLanguage,Qe,!0,lr[Yt.subLanguage]),lr[Yt.subLanguage]=Ut._top}else Ut=li(Qe,Yt.subLanguage.length?Yt.subLanguage:null);Yt.relevance>0&&(Fi+=Ut.relevance),Ye.__addSublanguage(Ut._emitter,Ut.language)}function Be(){Yt.subLanguage!=null?Yr():rr(),Qe=""}function Qr(Ut,le){Ut!==""&&(Ye.startScope(le),Ye.addText(Ut),Ye.endScope())}function zn(Ut,le){let Ie=1;const Je=le.length-1;for(;Ie<=Je;){if(!Ut._emit[Ie]){Ie++;continue}const Kr=Ot.classNameAliases[Ut[Ie]]||Ut[Ie],Un=le[Ie];Kr?Qr(Un,Kr):(Qe=Un,rr(),Qe=""),Ie++}}function la(Ut,le){return Ut.scope&&typeof Ut.scope=="string"&&Ye.openNode(Ot.classNameAliases[Ut.scope]||Ut.scope),Ut.beginScope&&(Ut.beginScope._wrap?(Qr(Qe,Ot.classNameAliases[Ut.beginScope._wrap]||Ut.beginScope._wrap),Qe=""):Ut.beginScope._multi&&(zn(Ut.beginScope,le),Qe="")),Yt=Object.create(Ut,{parent:{value:Yt}}),Yt}function Ps(Ut,le,Ie){let Je=N(Ut.endRe,Ie);if(Je){if(Ut["on:end"]){const Kr=new e(Ut);Ut["on:end"](le,Kr),Kr.isMatchIgnored&&(Je=!1)}if(Je){for(;Ut.endsParent&&Ut.parent;)Ut=Ut.parent;return Ut}}if(Ut.endsWithParent)return Ps(Ut.parent,le,Ie)}function Ja(Ut){return Yt.matcher.regexIndex===0?(Qe+=Ut[0],1):(Us=!0,0)}function Wo(Ut){const le=Ut[0],Ie=Ut.rule,Je=new e(Ie),Kr=[Ie.__beforeBegin,Ie["on:begin"]];for(const Un of Kr)if(Un&&(Un(Ut,Je),Je.isMatchIgnored))return Ja(le);return Ie.skip?Qe+=le:(Ie.excludeBegin&&(Qe+=le),Be(),!Ie.returnBegin&&!Ie.excludeBegin&&(Qe=le)),la(Ie,Ut),Ie.returnBegin?0:le.length}function Ni(Ut){const le=Ut[0],Ie=It.substring(Ut.index),Je=Ps(Yt,Ut,Ie);if(!Je)return ve;const Kr=Yt;Yt.endScope&&Yt.endScope._wrap?(Be(),Qr(le,Yt.endScope._wrap)):Yt.endScope&&Yt.endScope._multi?(Be(),zn(Yt.endScope,Ut)):Kr.skip?Qe+=le:(Kr.returnEnd||Kr.excludeEnd||(Qe+=le),Be(),Kr.excludeEnd&&(Qe=le));do Yt.scope&&Ye.closeNode(),!Yt.skip&&!Yt.subLanguage&&(Fi+=Yt.relevance),Yt=Yt.parent;while(Yt!==Je.parent);return Je.starts&&la(Je.starts,Ut),Kr.returnEnd?0:le.length}function Pn(){const Ut=[];for(let le=Yt;le!==Ot;le=le.parent)le.scope&&Ut.unshift(le.scope);Ut.forEach(le=>Ye.openNode(le))}let yt={};function jt(Ut,le){const Ie=le&&le[0];if(Qe+=Ut,Ie==null)return Be(),0;if(yt.type==="begin"&&le.type==="end"&&yt.index===le.index&&Ie===""){if(Qe+=It.slice(le.index,le.index+1),!gr){const Je=new Error(`0 width match regex (${pt})`);throw Je.languageName=pt,Je.badRule=yt.rule,Je}return 1}if(yt=le,le.type==="begin")return Wo(le);if(le.type==="illegal"&&!Gt){const Je=new Error('Illegal lexeme "'+Ie+'" for mode "'+(Yt.scope||"<unnamed>")+'"');throw Je.mode=Yt,Je}else if(le.type==="end"){const Je=Ni(le);if(Je!==ve)return Je}if(le.type==="illegal"&&Ie==="")return Qe+=`
|
|
460
|
+
`,1;if(qs>1e5&&qs>le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Qe+=Ie,Ie.length}const Ot=mi(pt);if(!Ot)throw Rt(we.replace("{}",pt)),new Error('Unknown language: "'+pt+'"');const Vt=Ge(Ot);let Pe="",Yt=ue||Vt;const lr={},Ye=new Kt.__emitter(Kt);Pn();let Qe="",Fi=0,qn=0,qs=0,Us=!1;try{if(Ot.__emitTokens)Ot.__emitTokens(It,Ye);else{for(Yt.matcher.considerAll();;){qs++,Us?Us=!1:Yt.matcher.considerAll(),Yt.matcher.lastIndex=qn;const Ut=Yt.matcher.exec(It);if(!Ut)break;const le=It.substring(qn,Ut.index),Ie=jt(le,Ut);qn=Ut.index+Ie}jt(It.substring(qn))}return Ye.finalize(),Pe=Ye.toHTML(),{language:pt,value:Pe,relevance:Fi,illegal:!1,_emitter:Ye,_top:Yt}}catch(Ut){if(Ut.message&&Ut.message.includes("Illegal"))return{language:pt,value:$e(It),illegal:!0,relevance:0,_illegalBy:{message:Ut.message,index:qn,context:It.slice(qn-100,qn+100),mode:Ut.mode,resultSoFar:Pe},_emitter:Ye};if(gr)return{language:pt,value:$e(It),illegal:!1,relevance:0,errorRaised:Ut,_emitter:Ye,_top:Yt};throw Ut}}function Yi(pt){const It={value:$e(pt),illegal:!1,relevance:0,_top:Qt,_emitter:new Kt.__emitter(Kt)};return It._emitter.addText(pt),It}function li(pt,It){It=It||Kt.languages||Object.keys(Tt);const Gt=Yi(pt),ue=It.filter(mi).filter(cn).map(Be=>ln(Be,pt,!1));ue.unshift(Gt);const Ke=ue.sort((Be,Qr)=>{if(Be.relevance!==Qr.relevance)return Qr.relevance-Be.relevance;if(Be.language&&Qr.language){if(mi(Be.language).supersetOf===Qr.language)return 1;if(mi(Qr.language).supersetOf===Be.language)return-1}return 0}),[br,rr]=Ke,Yr=br;return Yr.secondBest=rr,Yr}function ci(pt,It,Gt){const ue=It&&Pt[It]||Gt;pt.classList.add("hljs"),pt.classList.add(`language-${ue}`)}function Rr(pt){let It=null;const Gt=mr(pt);if(ye(Gt))return;if(X("before:highlightElement",{el:pt,language:Gt}),pt.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",pt);return}if(pt.children.length>0&&(Kt.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(pt)),Kt.throwUnescapedHTML))throw new sr("One of your code blocks includes unescaped HTML.",pt.innerHTML);It=pt;const ue=It.textContent,Ke=Gt?wr(ue,{language:Gt,ignoreIllegals:!0}):li(ue);pt.innerHTML=Ke.value,pt.dataset.highlighted="yes",ci(pt,Gt,Ke.language),pt.result={language:Ke.language,re:Ke.relevance,relevance:Ke.relevance},Ke.secondBest&&(pt.secondBest={language:Ke.secondBest.language,relevance:Ke.secondBest.relevance}),X("after:highlightElement",{el:pt,result:Ke,text:ue})}function Zr(pt){Kt=Er(Kt,pt)}const kn=()=>{Sn(),Ft("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function In(){Sn(),Ft("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let wn=!1;function Sn(){function pt(){Sn()}if(document.readyState==="loading"){wn||window.addEventListener("DOMContentLoaded",pt,!1),wn=!0;return}document.querySelectorAll(Kt.cssSelector).forEach(Rr)}function Ei(pt,It){let Gt=null;try{Gt=It(Q)}catch(ue){if(Rt("Language definition for '{}' could not be registered.".replace("{}",pt)),gr)Rt(ue);else throw ue;Gt=Qt}Gt.name||(Gt.name=pt),Tt[pt]=Gt,Gt.rawDefinition=It.bind(null,Q),Gt.aliases&&Ki(Gt.aliases,{languageName:pt})}function $n(pt){delete Tt[pt];for(const It of Object.keys(Pt))Pt[It]===pt&&delete Pt[It]}function Ea(){return Object.keys(Tt)}function mi(pt){return pt=(pt||"").toLowerCase(),Tt[pt]||Tt[Pt[pt]]}function Ki(pt,{languageName:It}){typeof pt=="string"&&(pt=[pt]),pt.forEach(Gt=>{Pt[Gt.toLowerCase()]=It})}function cn(pt){const It=mi(pt);return It&&!It.disableAutodetect}function yi(pt){pt["before:highlightBlock"]&&!pt["before:highlightElement"]&&(pt["before:highlightElement"]=It=>{pt["before:highlightBlock"](Object.assign({block:It.el},It))}),pt["after:highlightBlock"]&&!pt["after:highlightElement"]&&(pt["after:highlightElement"]=It=>{pt["after:highlightBlock"](Object.assign({block:It.el},It))})}function yr(pt){yi(pt),Ce.push(pt)}function te(pt){const It=Ce.indexOf(pt);It!==-1&&Ce.splice(It,1)}function X(pt,It){const Gt=pt;Ce.forEach(function(ue){ue[Gt]&&ue[Gt](It)})}function St(pt){return Ft("10.7.0","highlightBlock will be removed entirely in v12.0"),Ft("10.7.0","Please use highlightElement now."),Rr(pt)}Object.assign(Q,{highlight:wr,highlightAuto:li,highlightAll:Sn,highlightElement:Rr,highlightBlock:St,configure:Zr,initHighlighting:kn,initHighlightingOnLoad:In,registerLanguage:Ei,unregisterLanguage:$n,listLanguages:Ea,getLanguage:mi,registerAliases:Ki,autoDetection:cn,inherit:Er,addPlugin:yr,removePlugin:te}),Q.debugMode=function(){gr=!1},Q.safeMode=function(){gr=!0},Q.versionString=me,Q.regex={concat:C,lookahead:x,either:k,optional:v,anyNumberOfTimes:y};for(const pt in J)typeof J[pt]=="object"&&r(J[pt]);return Object.assign(Q,J),Q},Nr=Xr({});return Nr.newInstance=()=>Xr({}),S0=Nr,Nr.HighlightJS=Nr,Nr.default=Nr,S0}var T0,gN;function xrt(){if(gN)return T0;gN=1;function r(e){const i=e.regex,n=i.concat(/[\p{L}_]/u,i.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:i.concat(/</,i.lookahead(i.concat(n,i.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:f}]},{className:"tag",begin:i.concat(/<\//,i.lookahead(i.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return T0=r,T0}var E0,mN;function vrt(){if(mN)return E0;mN=1;function r(e){const i=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:i.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},c=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),h={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(u);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},g={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),C={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},_=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],T={match:/(\/[a-z._-]+)+/},N=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:_,literal:k,built_in:[...N,...E,"set","shopt",...B,...O]},contains:[v,e.SHEBANG(),C,x,c,h,T,u,d,f,g,n]}}return E0=r,E0}var N0,yN;function Crt(){if(yN)return N0;yN=1;function r(e){const i=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",h="("+a+"|"+i.optional(o)+"[a-zA-Z_]\\w*"+i.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:i.optional(o)+e.IDENT_RE,relevance:0},v=i.optional(o)+e.IDENT_RE+"\\s*\\(",k={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},T=[x,u,n,e.C_BLOCK_COMMENT_MODE,g,f],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:T.concat([{begin:/\(/,end:/\)/,keywords:k,contains:T.concat(["self"]),relevance:0}]),relevance:0},E={begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:k,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:k,disableAutodetect:!0,illegal:"</",contains:[].concat(N,E,T,[x,{begin:e.IDENT_RE+"::",keywords:k},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:x,strings:f,keywords:k}}}return N0=r,N0}var A0,bN;function _rt(){if(bN)return A0;bN=1;function r(e){const i=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",h="(?!struct)("+a+"|"+i.optional(o)+"[a-zA-Z_]\\w*"+i.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:i.optional(o)+e.IDENT_RE,relevance:0},v=i.optional(o)+e.IDENT_RE+"\\s*\\(",C=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],B={type:_,keyword:C,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},O={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:i.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,i.lookahead(/(<[^<>]+>|)\s*\(/))},A=[O,x,u,n,e.C_BLOCK_COMMENT_MODE,g,f],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:B,contains:A.concat([{begin:/\(/,end:/\)/,keywords:B,contains:A.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:B,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:B,relevance:0},{begin:v,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:B,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:B,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,F,O,A,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:B,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:B},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return A0=r,A0}var M0,xN;function krt(){if(xN)return M0;xN=1;function r(e){const i=["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:i,literal:a},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:h},v=e.inherit(y,{illegal:/\n/}),C={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},_={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},k=e.inherit(_,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});y.contains=[_,C,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],v.contains=[k,C,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[f,_,C,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},N={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},E=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",B={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:h,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},T,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,N,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,N,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+E+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:h,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,N],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,relevance:0,contains:[T,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},B]}}return M0=r,M0}var B0,vN;function wrt(){if(vN)return B0;vN=1;const r=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"],i=["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,...i],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=r(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 B0=u,B0}var L0,CN;function Srt(){if(CN)return L0;CN=1;function r(e){const i=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:i.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 L0=r,L0}var O0,_N;function Trt(){if(_N)return O0;_N=1;function r(e){const i=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:i.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:i.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 O0=r,O0}var R0,kN;function Ert(){if(kN)return R0;kN=1;function r(e){const i=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=i.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=i.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:i.concat(/<<[-~]?'?/,i.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",C={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:h}]},A=[x,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:h},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:h},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:n}],relevance:0},C,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:h},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);g.contains=A,_.contains=A;const z=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:h,contains:A}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:h,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(z).concat(f).concat(A)}}return R0=r,R0}var j0,wN;function Nrt(){if(wN)return j0;wN=1;function r(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 j0=r,j0}var D0,SN;function Art(){if(SN)return D0;SN=1;function r(e){const i=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:i.concat(n,i.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return D0=r,D0}var F0,TN;function Mrt(){if(TN)return F0;TN=1;function r(e){const i=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=i.either(d,f,g),y=i.concat(x,"(\\s*\\.\\s*",x,")*",i.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 F0=r,F0}var I0,EN;function Brt(){if(EN)return I0;EN=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[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 I0=o,I0}var $0,NN;function Lrt(){if(NN)return $0;NN=1;const r="[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"],i=["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=(kt,{after:it})=>{const H="</"+kt[0].slice(1);return kt.input.indexOf(H,it)!==-1},x=r,y={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,C={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(kt,it)=>{const H=kt[0].length+kt.index,J=kt.input[H];if(J==="<"||J===","){it.ignoreMatch();return}J===">"&&(g(kt,{after:H})||it.ignoreMatch());let vt;const At=kt.input.substring(H);if(vt=At.match(/^\s*=/)){it.ignoreMatch();return}if((vt=At.match(/^\s+extends\s+/))&&vt.index===0){it.ignoreMatch();return}}},_={$pattern:r,keyword:e,literal:i,built_in:h,"variable.language":c},k="[0-9](_?[0-9])*",T=`\\.(${k})`,N="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${N})((${T})|\\.)?|(${T}))[eE][+-]?(${k})\\b`},{begin:`\\b(${N})\\b((${T})\\b|\\.)?|(${T})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},B={className:"subst",begin:"\\$\\{",end:"\\}",keywords:_,contains:[]},O={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"css"}},M={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,B],subLanguage:"graphql"}},F={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,B]},z={className:"comment",variants:[d.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:x+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),d.C_BLOCK_COMMENT_MODE,d.C_LINE_COMMENT_MODE]},U=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,O,A,M,F,{match:/\$\d+/},E];B.contains=U.concat({begin:/\{/,end:/\}/,keywords:_,contains:["self"].concat(U)});const V=[].concat(z,B.contains),I=V.concat([{begin:/(\s*)\(/,end:/\)/,keywords:_,contains:["self"].concat(V)}]),G={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:I},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"}}]},W={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]}},K={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},tt={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 Y(kt){return f.concat("(?!",kt.join("|"),")")}const rt={match:f.concat(/\b/,Y([...o,"super","import"].map(kt=>`${kt}\\s*\\(`)),x,f.lookahead(/\s*\(/)),className:"title.function",relevance:0},ft={begin:f.concat(/\./,f.lookahead(f.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ct={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},G]},xt="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",st={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(xt)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[G]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:_,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:W},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),K,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,O,A,M,F,z,{match:/\$\d+/},E,W,{scope:"attr",match:x+f.lookahead(":"),relevance:0},st,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[z,d.REGEXP_MODE,{className:"function",begin:xt,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:y.begin,end:y.end},{match:v},{begin:C.begin,"on:begin":C.isTrulyOpeningTag,end:C.end}],subLanguage:"xml",contains:[{begin:C.begin,end:C.end,skip:!0,contains:["self"]}]}]},tt,{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},ft,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[G]},rt,nt,D,ct,{match:/\$[(.]/}]}}return $0=u,$0}var z0,AN;function Ort(){if(AN)return z0;AN=1;function r(e){const i={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:[i,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return z0=r,z0}var P0,MN;function Rrt(){if(MN)return P0;MN=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[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 P0=a,P0}var q0,BN;function jrt(){if(BN)return q0;BN=1;const r=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"],i=["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,...i],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=r(f),x=u,y="and or not only",v="[\\w-]+",C="("+v+"|@\\{"+v+"\\})",_=[],k=[],T=function(V){return{className:"string",begin:"~?"+V+".*?"+V}},N=function(V,I,G){return{className:V,begin:I,relevance:G}},E={$pattern:/[a-z-]+/,keyword:y,attribute:a.join(" ")},B={begin:"\\(",end:"\\)",contains:k,keywords:E,relevance:0};k.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,T("'"),T('"'),g.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},g.HEXCOLOR,B,N("variable","@@?"+v,10),N("variable","@\\{"+v+"\\}"),N("built_in","~?`[^`]*?`"),{className:"attribute",begin:v+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},g.IMPORTANT,{beginKeywords:"and not"},g.FUNCTION_DISPATCH);const O=k.concat({begin:/\{/,end:/\}/,contains:_}),A={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(k)},M={begin:C+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:k}}]},F={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:E,returnEnd:!0,contains:k,relevance:0}},j={className:"variable",variants:[{begin:"@"+v+"\\s*:",relevance:15},{begin:"@"+v}],starts:{end:"[;}]",returnEnd:!0,contains:O}},z={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:C,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,A,N("keyword","all\\b"),N("variable","@\\{"+v+"\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},g.CSS_NUMBER_MODE,N("selector-tag",C,0),N("selector-id","#"+C),N("selector-class","\\."+C,0),N("selector-tag","&",0),g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:O},{begin:"!important"},g.FUNCTION_DISPATCH]},U={begin:v+`:(:)?(${x.join("|")})`,returnBegin:!0,contains:[z]};return _.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,F,j,U,M,z,A,g.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:_}}return q0=d,q0}var U0,LN;function Drt(){if(LN)return U0;LN=1;function r(e){const i="\\[=*\\[",n="\\]=*\\]",a={begin:i,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+i+")","$"),e.COMMENT("--"+i,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:i,end:n,contains:[a],relevance:5}])}}return U0=r,U0}var H0,ON;function Frt(){if(ON)return H0;ON=1;function r(e){const i={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]},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:[i,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:[i]};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,i,n,a,o,c,h]}}return H0=r,H0}var W0,RN;function Irt(){if(RN)return W0;RN=1;function r(e){const i=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:i.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,c,d],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(_,k,T="\\1")=>{const N=T==="\\1"?T:i.concat(T,k);return i.concat(i.concat("(?:",_,")"),k,/(?:\\.|[^\\\/])*?/,N,/(?:\\.|[^\\\/])*?/,T,a)},v=(_,k,T)=>i.concat(i.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",i.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",i.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 W0=r,W0}var G0,jN;function $rt(){if(jN)return G0;jN=1;function r(e){const i={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:[i,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 G0=r,G0}var Y0,DN;function zrt(){if(DN)return Y0;DN=1;function r(e){const i=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=i.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=i.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),c=i.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"],N=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],B={keyword:T,literal:(G=>{const D=[];return G.forEach(W=>{D.push(W),W.toLowerCase()===W?D.push(W.toUpperCase()):D.push(W.toLowerCase())}),D})(k),built_in:N},O=G=>G.map(D=>D.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,i.concat(v,"+"),i.concat("(?!",O(N).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},M=i.concat(a,"\\b(?!\\()"),F={variants:[{match:[i.concat(/::/,i.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,i.concat(/::/,i.lookahead(/(?!class\b)/)),M],scope:{1:"title.class",3:"variable.constant"}},{match:[o,i.concat("::",i.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},j={scope:"attr",match:i.concat(a,i.lookahead(":"),i.lookahead(/(?!::)/))},z={relevance:0,begin:/\(/,end:/\)/,keywords:B,contains:[j,h,F,e.C_BLOCK_COMMENT_MODE,C,_,A]},U={relevance:0,match:[/\b/,i.concat("(?!fn\\b|function\\b|",O(T).join("\\b|"),"|",O(N).join("\\b|"),"\\b)"),a,i.concat(v,"*"),i.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[z]};z.contains.push(U);const V=[j,F,e.C_BLOCK_COMMENT_MODE,C,_,A],I={begin:i.concat(/#\[\s*\\?/,i.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",...V]},...V,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:B,contains:[I,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},h,U,F,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:B,contains:["self",I,h,F,e.C_BLOCK_COMMENT_MODE,C,_]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},C,_]}}return Y0=r,Y0}var K0,FN;function Prt(){if(FN)return K0;FN=1;function r(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 K0=r,K0}var V0,IN;function qrt(){if(IN)return V0;IN=1;function r(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return V0=r,V0}var X0,$N;function Urt(){if($N)return X0;$N=1;function r(e){const i=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:i.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 X0=r,X0}var Z0,zN;function Hrt(){if(zN)return Z0;zN=1;function r(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Z0=r,Z0}var Q0,PN;function Wrt(){if(PN)return Q0;PN=1;function r(e){const i=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=i.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=i.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:i.lookahead(i.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 Q0=r,Q0}var J0,qN;function Grt(){if(qN)return J0;qN=1;function r(e){const i=e.regex,n=/(r#)?/,a=i.concat(n,e.UNDERSCORE_IDENT_RE),o=i.concat(n,e.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:i.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,i.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 J0=r,J0}var tx,UN;function Yrt(){if(UN)return tx;UN=1;const r=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"],i=["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,...i],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=r(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 tx=u,tx}var ex,HN;function Krt(){if(HN)return ex;HN=1;function r(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return ex=r,ex}var rx,WN;function Vrt(){if(WN)return rx;WN=1;function r(e){const i=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],h=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,C=[...f,...d].filter(O=>!g.includes(O)),_={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},T={match:i.concat(/\b/,i.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function N(O){return i.concat(/\b/,i.either(...O.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const E={scope:"keyword",match:N(y),relevance:0};function B(O,{exceptions:A,when:M}={}){const F=M;return A=A||[],O.map(j=>j.match(/\|\d+$/)||A.includes(j)?j:F(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:B(C,{when:O=>O.length<3}),literal:c,type:u,built_in:x},contains:[{scope:"type",match:N(h)},E,T,_,a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}return rx=r,rx}var ix,GN;function Xrt(){if(GN)return ix;GN=1;function r(M){return M?typeof M=="string"?M:M.source:null}function e(M){return i("(?=",M,")")}function i(...M){return M.map(j=>r(j)).join("")}function n(M){const F=M[M.length-1];return typeof F=="object"&&F.constructor===Object?(M.splice(M.length-1,1),F):{}}function a(...M){return"("+(n(M).capture?"":"?:")+M.map(z=>r(z)).join("|")+")"}const o=M=>i(/\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]/),_=i(v,C,"*"),k=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),T=a(k,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),N=i(k,T,"*"),E=i(/[A-Z]/,T,"*"),B=["attached","autoclosure",i(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",i(/objc\(/,N,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],O=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function A(M){const F={match:/\s+/,relevance:0},j=M.COMMENT("/\\*","\\*/",{contains:["self"]}),z=[M.C_LINE_COMMENT_MODE,j],U={match:[/\./,a(...c,...h)],className:{2:"keyword"}},V={match:i(/\./,a(...d)),relevance:0},I=d.filter(ve=>typeof ve=="string").concat(["_|0"]),G=d.filter(ve=>typeof ve!="string").concat(u).map(o),D={variants:[{className:"keyword",match:a(...G,...h)}]},W={$pattern:a(/\b\w+/,/#\w+/),keyword:I.concat(x),literal:f},K=[U,V,D],tt={match:i(/\./,a(...y)),relevance:0},nt={className:"built_in",match:i(/\b/,a(...y),/(?=\()/)},Y=[tt,nt],rt={match:/->/,relevance:0},ft={className:"operator",relevance:0,variants:[{match:_},{match:`\\.(\\.|${C})+`}]},ct=[rt,ft],xt="([0-9]_*)+",st="([0-9a-fA-F]_*)+",kt={className:"number",relevance:0,variants:[{match:`\\b(${xt})(\\.(${xt}))?([eE][+-]?(${xt}))?\\b`},{match:`\\b0x(${st})(\\.(${st}))?([pP][+-]?(${xt}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},it=(ve="")=>({className:"subst",variants:[{match:i(/\\/,ve,/[0\\tnr"']/)},{match:i(/\\/,ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),H=(ve="")=>({className:"subst",match:i(/\\/,ve,/[\t ]*(?:[\r\n]|\r\n)/)}),J=(ve="")=>({className:"subst",label:"interpol",begin:i(/\\/,ve,/\(/),end:/\)/}),vt=(ve="")=>({begin:i(ve,/"""/),end:i(/"""/,ve),contains:[it(ve),H(ve),J(ve)]}),At=(ve="")=>({begin:i(ve,/"/),end:i(/"/,ve),contains:[it(ve),J(ve)]}),qt={className:"string",variants:[vt(),vt("#"),vt("##"),vt("###"),At(),At("#"),At("##"),At("###")]},ie=[M.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[M.BACKSLASH_ESCAPE]}],Dt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ie},Ht=ve=>{const Or=i(ve,/\//),Xr=i(/\//,ve);return{begin:Or,end:Xr,contains:[...ie,{scope:"comment",begin:`#(?!.*${Xr})`,end:/$/}]}},Fe={scope:"regexp",variants:[Ht("###"),Ht("##"),Ht("#"),Dt]},Zt={match:i(/`/,N,/`/)},ht={className:"variable",match:/\$\d+/},ot={className:"variable",match:`\\$${T}+`},Lt=[Zt,ht,ot],$t={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:O,contains:[...ct,kt,qt]}]}},Wt={scope:"keyword",match:i(/@/,a(...B),e(a(/\(/,/\s+/)))},Rt={scope:"meta",match:i(/@/,N)},ne=[$t,Wt,Rt],Ft={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:i(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,T,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:i(/\s+&\s+/,e(E)),relevance:0}]},Re={begin:/</,end:/>/,keywords:W,contains:[...z,...K,...ne,rt,Ft]};Ft.contains.push(Re);const xe={match:i(N,/\s*:/),keywords:"_|0",relevance:0},He={begin:/\(/,end:/\)/,relevance:0,keywords:W,contains:["self",xe,...z,Fe,...K,...Y,...ct,kt,qt,...Lt,...ne,Ft]},Me={begin:/</,end:/>/,keywords:"repeat each",contains:[...z,Ft]},kr={begin:a(e(i(N,/\s*:/)),e(i(N,/\s+/,N,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:N}]},Lr={begin:/\(/,end:/\)/,keywords:W,contains:[kr,...z,...K,...ct,kt,qt,...ne,Ft,He],endsParent:!0,illegal:/["']/},Ge={match:[/(func|macro)/,/\s+/,a(Zt.match,N,_)],className:{1:"keyword",3:"title.function"},contains:[Me,Lr,F],illegal:[/\[/,/%/]},Ze={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Me,Lr,F],illegal:/\[|%/},or={match:[/operator/,/\s+/,_],className:{1:"keyword",3:"title"}},me={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[Ft],keywords:[...g,...f],end:/}/},sr={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},$e={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Er={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,N,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:W,contains:[Me,...K,{begin:/:/,end:/\{/,keywords:W,contains:[{scope:"title.class.inherited",match:E},...K],relevance:0}]};for(const ve of qt.variants){const Or=ve.contains.find(Nr=>Nr.label==="interpol");Or.keywords=W;const Xr=[...K,...Y,...ct,kt,qt,...Lt];Or.contains=[...Xr,{begin:/\(/,end:/\)/,contains:["self",...Xr]}]}return{name:"Swift",keywords:W,contains:[...z,Ge,Ze,sr,$e,Er,or,me,{beginKeywords:"import",end:/$/,contains:[...z],relevance:0},Fe,...K,...Y,...ct,kt,qt,...Lt,...ne,Ft,He]}}return ix=A,ix}var nx,YN;function Zrt(){if(YN)return nx;YN=1;function r(e){const i="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:i,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:i,keywords:{literal:i}},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 nx=r,nx}var ax,KN;function Qrt(){if(KN)return ax;KN=1;const r="[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"],i=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],h=[].concat(o,n,a);function u(f){const g=f.regex,x=(it,{after:H})=>{const J="</"+it[0].slice(1);return it.input.indexOf(J,H)!==-1},y=r,v={begin:"<>",end:"</>"},C=/<[A-Za-z0-9\\._:-]+\s*\/>/,_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(it,H)=>{const J=it[0].length+it.index,vt=it.input[J];if(vt==="<"||vt===","){H.ignoreMatch();return}vt===">"&&(x(it,{after:J})||H.ignoreMatch());let At;const qt=it.input.substring(J);if(At=qt.match(/^\s*=/)){H.ignoreMatch();return}if((At=qt.match(/^\s+extends\s+/))&&At.index===0){H.ignoreMatch();return}}},k={$pattern:r,keyword:e,literal:i,built_in:h,"variable.language":c},T="[0-9](_?[0-9])*",N=`\\.(${T})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",B={className:"number",variants:[{begin:`(\\b(${E})((${N})|\\.)?|(${N}))[eE][+-]?(${T})\\b`},{begin:`\\b(${E})\\b((${N})\\b|\\.)?|(${N})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},O={className:"subst",begin:"\\$\\{",end:"\\}",keywords:k,contains:[]},A={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,O],subLanguage:"xml"}},M={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,O],subLanguage:"css"}},F={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,O],subLanguage:"graphql"}},j={className:"string",begin:"`",end:"`",contains:[f.BACKSLASH_ESCAPE,O]},U={className:"comment",variants:[f.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),f.C_BLOCK_COMMENT_MODE,f.C_LINE_COMMENT_MODE]},V=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,F,j,{match:/\$\d+/},B];O.contains=V.concat({begin:/\{/,end:/\}/,keywords:k,contains:["self"].concat(V)});const I=[].concat(U,O.contains),G=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:k,contains:["self"].concat(I)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:k,contains:G},W={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"}}]},K={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]}},tt={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:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function rt(it){return g.concat("(?!",it.join("|"),")")}const ft={match:g.concat(/\b/,rt([...o,"super","import"].map(it=>`${it}\\s*\\(`)),y,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},ct={begin:g.concat(/\./,g.lookahead(g.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},xt={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},st="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",kt={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(st)],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:K},illegal:/#(?![$_A-z])/,contains:[f.SHEBANG({label:"shebang",binary:"node",relevance:5}),tt,f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,M,F,j,U,{match:/\$\d+/},B,K,{scope:"attr",match:y+g.lookahead(":"),relevance:0},kt,{begin:"("+f.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[U,f.REGEXP_MODE,{className:"function",begin:st,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},ct,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},ft,Y,W,xt,{match:/\$[(.]/}]}}function d(f){const g=f.regex,x=u(f),y=r,v=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],C={begin:[/namespace/,/\s+/,f.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},_={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:v},contains:[x.exports.CLASS_REFERENCE]},k={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},T=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],N={$pattern:r,keyword:e.concat(T),literal:i,built_in:h.concat(v),"variable.language":c},E={className:"meta",begin:"@"+y},B=(F,j,z)=>{const U=F.contains.findIndex(V=>V.label===j);if(U===-1)throw new Error("can not find mode to replace");F.contains.splice(U,1,z)};Object.assign(x.keywords,N),x.exports.PARAMS_CONTAINS.push(E);const O=x.contains.find(F=>F.scope==="attr"),A=Object.assign({},O,{match:g.concat(y,g.lookahead(/\s*\?:/))});x.exports.PARAMS_CONTAINS.push([x.exports.CLASS_REFERENCE,O,A]),x.contains=x.contains.concat([E,C,_,A]),B(x,"shebang",f.SHEBANG()),B(x,"use_strict",k);const M=x.contains.find(F=>F.label==="func.def");return M.relevance=0,Object.assign(x,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),x}return ax=d,ax}var sx,VN;function Jrt(){if(VN)return sx;VN=1;function r(e){const i=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:i.concat(/# */,i.either(c,o),/ *#/)},{begin:i.concat(/# */,u,/ *#/)},{begin:i.concat(/# */,h,/ *#/)},{begin:i.concat(/# */,i.either(c,o),/ +/,i.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 sx=r,sx}var ox,XN;function tit(){if(XN)return ox;XN=1;function r(e){e.regex;const i=e.COMMENT(/\(;/,/;\)/);i.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,i,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,h,o,e.QUOTE_STRING_MODE,d,f,u]}}return ox=r,ox}var lx,ZN;function eit(){if(ZN)return lx;ZN=1;var r=brt();return r.registerLanguage("xml",xrt()),r.registerLanguage("bash",vrt()),r.registerLanguage("c",Crt()),r.registerLanguage("cpp",_rt()),r.registerLanguage("csharp",krt()),r.registerLanguage("css",wrt()),r.registerLanguage("markdown",Srt()),r.registerLanguage("diff",Trt()),r.registerLanguage("ruby",Ert()),r.registerLanguage("go",Nrt()),r.registerLanguage("graphql",Art()),r.registerLanguage("ini",Mrt()),r.registerLanguage("java",Brt()),r.registerLanguage("javascript",Lrt()),r.registerLanguage("json",Ort()),r.registerLanguage("kotlin",Rrt()),r.registerLanguage("less",jrt()),r.registerLanguage("lua",Drt()),r.registerLanguage("makefile",Frt()),r.registerLanguage("perl",Irt()),r.registerLanguage("objectivec",$rt()),r.registerLanguage("php",zrt()),r.registerLanguage("php-template",Prt()),r.registerLanguage("plaintext",qrt()),r.registerLanguage("python",Urt()),r.registerLanguage("python-repl",Hrt()),r.registerLanguage("r",Wrt()),r.registerLanguage("rust",Grt()),r.registerLanguage("scss",Yrt()),r.registerLanguage("shell",Krt()),r.registerLanguage("sql",Vrt()),r.registerLanguage("swift",Xrt()),r.registerLanguage("yaml",Zrt()),r.registerLanguage("typescript",Qrt()),r.registerLanguage("vbnet",Jrt()),r.registerLanguage("wasm",tit()),r.HighlightJS=r,r.default=r,lx=r,lx}var rit=eit();const iit=$d(rit);function nit(r,e){q.useEffect(()=>{const i=r.current;i&&i.querySelectorAll("pre > code:not(.language-mermaid)").forEach(n=>{if(n.dataset.highlighted!=="yes")try{iit.highlightElement(n)}catch{}})},[r,e])}Oe.setOptions({gfm:!0,breaks:!0});function tf({content:r,frontmatter:e}){const i=q.useMemo(()=>Do.sanitize(Oe.parse(r)),[r]),n=q.useRef(null),{resolved:a}=Gd();yrt(n,i,a,"md-mmd"),nit(n,i);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:i}})]})}function ait({onManagePacks:r}){const{t:e}=Pr(),{data:i}=aY(),n=(i==null?void 0:i.nudge)??null,a=(i==null?void 0:i.newPacks)??[],[o,c]=q.useState(!1),h=q.useCallback(u=>{u.key==="Escape"&&o&&c(!1)},[o]);return q.useEffect(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),n?m.jsxs("div",{className:"update-badge",children:[m.jsxs("button",{className:"update-badge-trigger",onClick:()=>c(u=>!u),"aria-expanded":o,title:e("update.title"),children:[m.jsx("span",{className:"update-badge-dot"}),m.jsx("span",{className:"update-badge-label",children:e("update.available")})]}),o&&m.jsxs("div",{className:"update-badge-popover",children:[m.jsxs("div",{className:"update-badge-popover-header",children:[m.jsx("span",{className:"update-badge-popover-title",children:e("update.title")}),m.jsx("button",{className:"update-badge-dismiss",onClick:()=>c(!1),title:e("update.dismiss"),"aria-label":e("update.dismiss"),children:"×"})]}),m.jsx("div",{className:"update-badge-content",children:m.jsx(tf,{content:n})}),a.length>0&&r&&m.jsx("button",{className:"update-badge-action",onClick:()=>{r(),c(!1)},children:e("update.managePacks")})]})]}):null}const nd=[.85,.9,1,1.1,1.2],Yj="dreamcontext-zoom";function sit(){try{const r=localStorage.getItem(Yj);if(r!==null){const e=parseFloat(r);if(nd.includes(e))return e}}catch{}return 1}function oit(r){document.documentElement.style.setProperty("--zoom",String(r))}function lit({onNavigate:r}){const{theme:e,setTheme:i,resolved:n}=Gd(),{data:a}=cL(),[o,c]=q.useState(sit);q.useEffect(()=>{oit(o)},[o]);const h=(a==null?void 0:a.debt)??0,u=oL(h),d=lL(h),f=()=>{i(e==="system"?"light":e==="light"?"dark":"system")},g=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",x=nd.indexOf(o),y=x>0,v=x<nd.length-1,C=_=>{const k=x+_;if(k<0||k>=nd.length)return;const T=nd[k];c(T);try{localStorage.setItem(Yj,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(ait,{onManagePacks:r?()=>r("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 cit=[{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"}]}],Kj="dreamcontext.dashboard.sidebarCollapsed",Vj="dreamcontext.dashboard.aboutSeen",Rc=typeof window<"u"&&window.matchMedia?window.matchMedia("(max-width: 1024px)"):null;function hit(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Kj)==="1"}catch{return!1}}function uit(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Vj)==="1"}catch{return!1}}function dit({activePage:r,onNavigate:e}){const{t:i}=Pr(),[n,a]=q.useState(hit),[o,c]=q.useState((Rc==null?void 0:Rc.matches)??!1),[h,u]=q.useState(uit);q.useEffect(()=>{if(!Rc)return;const v=C=>c(C.matches);return Rc.addEventListener("change",v),()=>Rc.removeEventListener("change",v)},[]);const d=o||n,f=()=>{a(v=>{const C=!v;try{window.localStorage.setItem(Kj,C?"1":"0")}catch{}return C})},g=()=>{if(!h){u(!0);try{window.localStorage.setItem(Vj,"1")}catch{}}e("about")},x=!h&&r!=="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":i(d?"nav.expand":"nav.collapse"),title:i(d?"nav.expand":"nav.collapse"),children:[m.jsx("span",{className:"sidebar-toggle-icon",children:d?"»":"«"}),m.jsx("span",{className:"sidebar-label",children:i("nav.collapse")})]}),cit.map(v=>m.jsxs("div",{className:"sidebar-group",children:[m.jsx("span",{className:"sidebar-group-label",children:i(v.labelKey)}),m.jsx("ul",{className:"sidebar-nav",children:v.items.map(({page:C,icon:_,labelKey:k})=>{y+=1;const T=i(k);return m.jsx("li",{className:`animate-stagger animate-stagger-${y}`,children:m.jsxs("button",{className:`sidebar-item ${r===C?"sidebar-item--active":""}`,onClick:()=>e(C),title:T,"aria-current":r===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 ${r==="about"?"sidebar-item--active":""}${x?" sidebar-item--nudge":""}`,onClick:g,title:i("nav.about"),"aria-current":r==="about"?"page":void 0,children:[m.jsx("span",{className:"sidebar-icon",children:"✷"}),m.jsx("span",{className:"sidebar-label",children:i("nav.about")})]})})]})}const Xj="dreamcontext.dashboard.activePage",fit=["tasks","core","knowledge","features","sleep","brain","council","taxonomy","settings","packs","about"];function pit(){if(typeof window>"u")return"brain";try{const r=window.localStorage.getItem(Xj);if(r&&fit.includes(r))return r}catch{}return"brain"}function git({children:r}){const[e,i]=q.useState(pit),[n,a]=q.useState(null),[o,c]=q.useState(0),h=q.useCallback((f,g)=>{i(f),a(g),c(x=>x+1);try{window.localStorage.setItem(Xj,f)}catch{}},[]),u=q.useCallback(f=>{h(f,null)},[h]),d=q.useCallback(()=>a(null),[]);return m.jsxs("div",{className:"shell",children:[m.jsx(lit,{onNavigate:u}),m.jsxs("div",{className:"shell-body",children:[m.jsx(dit,{activePage:e,onNavigate:u}),m.jsx("main",{className:"shell-main",children:r({page:e,focusId:n,nonce:o,navigate:h,clearFocus:d})})]})]})}function mit(){return dr({queryKey:["tasks"],queryFn:()=>ee.get("/tasks"),select:r=>r.tasks})}function yit(){const r=Gr();return ni({mutationFn:e=>ee.post("/tasks",e),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]})}})}function Zj(){const r=Gr();return ni({mutationFn:({slug:e,updates:i})=>ee.patch(`/tasks/${e}`,i),onSuccess:(e,i)=>{r.invalidateQueries({queryKey:["tasks"]}),r.invalidateQueries({queryKey:["tasks",i.slug]})}})}function Qj(){const r=Gr();return ni({mutationFn:e=>ee.del(`/tasks/${e}`),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]})}})}function bit(){return dr({queryKey:["task-members"],queryFn:()=>ee.get("/tasks/members"),select:r=>r.members,staleTime:300*1e3})}function xit(){return dr({queryKey:["tasks-sync-status"],queryFn:()=>ee.get("/tasks/sync-status"),select:r=>r.status,refetchInterval:3e4})}function vit(){const r=Gr();return ni({mutationFn:()=>ee.post("/tasks/sync",{direction:"both"}),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]}),r.invalidateQueries({queryKey:["tasks-sync-status"]})}})}function Cit(){return dr({queryKey:["features"],queryFn:()=>ee.get("/features"),select:r=>r.features??[],staleTime:6e4})}function _it(){const r=Gr();return ni({mutationFn:({slug:e,content:i})=>ee.post(`/tasks/${e}/changelog`,{content:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]})}})}function Jj(){return dr({queryKey:["releases"],queryFn:()=>ee.get("/releases"),select:r=>r.entries.map(e=>({...e,status:e.status??"released"}))})}function tD(){return dr({queryKey:["releases"],queryFn:()=>ee.get("/releases"),select:r=>r.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function kit(){const r=Gr();return ni({mutationFn:e=>ee.post("/releases",{...e,status:"planning"}),onSuccess:()=>{r.invalidateQueries({queryKey:["releases"]})}})}function wit(){const r=Gr();return ni({mutationFn:({version:e,updates:i})=>ee.patch(`/releases/${encodeURIComponent(e)}`,i),onSuccess:()=>{r.invalidateQueries({queryKey:["releases"]})}})}const eD="dreamcontext:",rD="kanban-presets",p1=`${eD}${rD}`;function iD(r){return r?`${eD}${r}:${rD}`:p1}function Sit(r){const e=iD(r);try{const i=localStorage.getItem(e);if(i!==null){const n=JSON.parse(i);return Array.isArray(n)?n:[]}if(r){const n=localStorage.getItem(p1);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(p1);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function nD(r,e){try{localStorage.setItem(iD(r),JSON.stringify(e))}catch{}}const Jg=new Map;function a_(r){let e=Jg.get(r);return e===void 0&&(e=Sit(r),Jg.set(r,e)),e}const g1=new Set;function Tit(r){return g1.add(r),()=>{g1.delete(r)}}function aD(){for(const r of g1)r()}function Eit(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function Nit(r){return q.useSyncExternalStore(Tit,()=>a_(r))}function Ait(r,e,i){const n={id:Eit(),name:e,filters:i},o=[...a_(r),n];return Jg.set(r,o),nD(r,o),aD(),n}function Mit(r,e){const i=a_(r),n=i.filter(a=>a.id!==e);n.length!==i.length&&(Jg.set(r,n),nD(r,n),aD())}const Bit=10;function Va(r){let e=2166136261;for(let i=0;i<r.length;i++)e^=r.charCodeAt(i),e=Math.imul(e,16777619);return(e>>>0)%Bit}function ef({task:r,onClick:e,onDragStart:i,onContextMenu:n,dragging:a=!1}){return m.jsxs("div",{className:`task-card${a?" task-card--dragging":""}`,draggable:!0,onDragStart:i,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--${r.priority}`,title:`Priority: ${r.priority}`}),r.urgency&&r.urgency!=="medium"&&m.jsx("span",{className:`urgency-bar urgency-bar--${r.urgency}`,title:`Urgency: ${r.urgency}`}),m.jsx("span",{className:"task-card-name",children:r.name})]}),r.description&&m.jsxs("p",{className:"task-card-desc",children:[r.description.slice(0,100),r.description.length>100?"...":""]}),m.jsxs("div",{className:"task-card-footer",children:[r.tags.length>0&&m.jsx("div",{className:"task-card-tags",children:r.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:r.updated_at})]})]})}function Lit({label:r,color:e,tasks:i,onTaskClick:n,onTaskContextMenu:a,onDragStart:o}){const[c,h]=q.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:r}),m.jsx("span",{className:"sub-group-count",children:i.length})]}),!c&&m.jsx("div",{className:"sub-group-cards",children:i.map(u=>m.jsx(ef,{task:u,onClick:()=>n(u),onContextMenu:a?d=>a(u,d):void 0,onDragStart:d=>o(d,u)},u.slug))})]})}function QN({title:r,status:e,tasks:i,count:n,colorVar:a,onTaskClick:o,onTaskContextMenu:c,onDrop:h,subGroups:u}){const[d,f]=q.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:r}),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(Lit,{label:C.label,color:C.color,tasks:C.tasks,onTaskClick:o,onTaskContextMenu:c,onDragStart:v},C.key)):i.map(C=>m.jsx(ef,{task:C,onClick:()=>o(C),onContextMenu:c?_=>c(C,_):void 0,onDragStart:_=>v(_,C)},C.slug))})]})}function $c({trigger:r,content:e,isOpen:i,onClose:n,align:a="left",width:o}){const c=q.useRef(null),h=q.useCallback(d=>{c.current&&!c.current.contains(d.target)&&n()},[n]),u=q.useCallback(d=>{d.key==="Escape"&&n()},[n]);return q.useEffect(()=>{if(i)return document.addEventListener("mousedown",h),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",u)}},[i,h,u]),m.jsxs("div",{className:"filter-popover",ref:c,children:[r,i&&m.jsx("div",{className:`filter-popover-dropdown filter-popover-dropdown--${a}`,style:o?{width:`${o}px`}:void 0,children:e})]})}function Oit({open:r}){return m.jsx("svg",{className:`filter-chip-chevron ${r?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:m.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function zu({label:r,options:e,selected:i,onChange:n,isOpen:a,onToggle:o,onClose:c}){var k,T;const h=i.length>0,[u,d]=q.useState(""),f=q.useRef(null);q.useEffect(()=>{a?requestAnimationFrame(()=>{var N;return(N=f.current)==null?void 0:N.focus()}):d("")},[a]);const g=u.trim()?e.filter(N=>N.label.toLowerCase().includes(u.trim().toLowerCase())):e,x=N=>{i.includes(N)?n(i.filter(E=>E!==N)):n([...i,N])},y=()=>n(e.map(N=>N.value)),v=()=>n([]),C=h?i.length<=2?i.map(N=>{var E;return((E=e.find(B=>B.value===N))==null?void 0:E.label)??N}).join(", "):`${((k=e.find(N=>N.value===i[0]))==null?void 0:k.label)??i[0]} +${i.length-1}`:r,_=e.length>5;return m.jsx($c,{isOpen:a,onClose:c,trigger:m.jsxs("button",{className:`filter-chip ${h?"filter-chip--active":""}`,onClick:o,children:[h&&i.length===1&&m.jsx("span",{className:"filter-chip-dot",style:{background:(T=e.find(N=>N.value===i[0]))==null?void 0:T.color}}),m.jsx("span",{className:"filter-chip-label",children:C}),m.jsx(Oit,{open:a})]}),content:m.jsxs("div",{className:"multi-select-list",children:[_&&m.jsx("div",{className:"multi-select-search-wrap",children:m.jsx("input",{ref:f,className:"multi-select-search",placeholder:"Search...",value:u,onChange:N=>d(N.target.value)})}),m.jsxs("div",{className:"multi-select-actions",children:[m.jsx("button",{className:"multi-select-action",onClick:y,children:"All"}),m.jsx("button",{className:"multi-select-action",onClick:v,children:"None"})]}),m.jsxs("div",{className:"multi-select-options",children:[g.map(N=>m.jsxs("label",{className:"multi-select-option",children:[m.jsx("input",{type:"checkbox",checked:i.includes(N.value),onChange:()=>x(N.value)}),N.color&&m.jsx("span",{className:"filter-option-dot",style:{background:N.color}}),m.jsx("span",{className:"filter-option-label",children:N.label})]},N.value)),g.length===0&&m.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function JN(r){return String(r).padStart(2,"0")}function jo(r){return`${r.getFullYear()}-${JN(r.getMonth()+1)}-${JN(r.getDate())}`}function sD(){return jo(new Date)}function jp(r){const e=new Date;return e.setDate(e.getDate()-r),jo(e)}function Rit(){const r=new Date,e=r.getDay();return r.setDate(r.getDate()-(e===0?6:e-1)),jo(r)}function jit(){const r=new Date;return r.setDate(1),jo(r)}function Dit(){const r=new Date;return r.setMonth(0,1),jo(r)}function tA(r){return new Date(r+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Fit(){const r=sD();return[{label:"Today",from:r,to:r},{label:"Yesterday",from:jp(1),to:jp(1)},{label:"This week",from:Rit(),to:r},{label:"Last 7 days",from:jp(6),to:r},{label:"This month",from:jit(),to:r},{label:"Last 30 days",from:jp(29),to:r},{label:"This year",from:Dit(),to:r}]}const Iit=["January","February","March","April","May","June","July","August","September","October","November","December"],$it=["Mo","Tu","We","Th","Fr","Sa","Su"];function zit({dateField:r,dateFrom:e,dateTo:i,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=q.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[d,f]=q.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=q.useMemo(Fit,[]),x=q.useMemo(()=>{const E=new Date(h,d+1,0).getDate(),B=new Date(h,d,1).getDay(),O=B===0?6:B-1,A=[],M=new Date(h,d,0).getDate();for(let j=O-1;j>=0;j--){const z=M-j,U=d===0?11:d-1,V=d===0?h-1:h;A.push({date:jo(new Date(V,U,z)),day:z,isCurrentMonth:!1})}for(let j=1;j<=E;j++)A.push({date:jo(new Date(h,d,j)),day:j,isCurrentMonth:!0});const F=42-A.length;for(let j=1;j<=F;j++){const z=d===11?0:d+1,U=d===11?h+1:h;A.push({date:jo(new Date(U,z,j)),day:j,isCurrentMonth:!1})}return A},[h,d]),y=E=>{!e||e&&i?(a(E),o("")):E<e?(o(e),a(E)):o(E)},v=E=>{a(E.from),o(E.to);const B=new Date(E.from+"T00:00:00");u(B.getFullYear()),f(B.getMonth())},C=()=>{a(""),o("")},_=()=>{d===0?(f(11),u(E=>E-1)):f(E=>E-1)},k=()=>{d===11?(f(0),u(E=>E+1)):f(E=>E+1)},T=sD(),N=g.find(E=>E.from===e&&E.to===i);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 ${r==="updated_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("updated_at"),children:"Updated"}),m.jsx("button",{className:`mini-cal-field-btn ${r==="created_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("created_at"),children:"Created"})]}),m.jsx("div",{className:"mini-cal-presets",children:g.map(E=>m.jsx("button",{className:`mini-cal-preset ${(N==null?void 0:N.label)===E.label?"mini-cal-preset--active":""}`,onClick:()=>v(E),children:E.label},E.label))}),m.jsx("div",{className:"mini-cal-divider"}),m.jsxs("div",{className:"mini-cal-nav-row",children:[m.jsx("button",{className:"mini-cal-nav-btn",onClick:_,"aria-label":"Previous month",children:m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),m.jsxs("span",{className:"mini-cal-month-label",children:[Iit[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:[$it.map(E=>m.jsx("div",{className:"mini-cal-day-label",children:E},E)),x.map((E,B)=>{const O=E.date===e,A=E.date===i,M=e&&i&&E.date>e&&E.date<i,F=O&&!i,j=O||A,z=["mini-cal-day",!E.isCurrentMonth&&"mini-cal-day--outside",E.date===T&&"mini-cal-day--today",j&&"mini-cal-day--selected",O&&i&&"mini-cal-day--range-start",A&&e&&"mini-cal-day--range-end",M&&"mini-cal-day--in-range",F&&"mini-cal-day--single"].filter(Boolean).join(" ");return m.jsx("button",{className:z,onClick:()=>y(E.date),children:E.day},B)})]}),(e||i)&&m.jsxs("div",{className:"mini-cal-footer",children:[m.jsxs("span",{className:"mini-cal-range-text",children:[e&&m.jsx("span",{children:tA(e)}),e&&i&&e!==i&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mini-cal-arrow",children:"→"}),m.jsx("span",{children:tA(i)})]}),e&&!i&&m.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),m.jsx("button",{className:"mini-cal-clear-btn",onClick:C,children:"Clear"})]})]})}const tm={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function Pit(){return m.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("circle",{cx:"5.8",cy:"5.8",r:"4.3",stroke:"currentColor",strokeWidth:"1.4"}),m.jsx("path",{d:"M9 9L12.5 12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function Dp({open:r}){return m.jsx("svg",{className:`filter-chip-chevron ${r?"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 cx(){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 eA(){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 qit(){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 Uit(){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 Hit(){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 Wit(){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 Git(){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 Yit(){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 Kit(){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 Vit=[{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)"}],Xit=[{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)"}],Zit=[{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)"}],rA=[{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"}],hx=[{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 Qit(r){let e=0;return r.priorityFilter.length>0&&e++,r.statusFilter.length>0&&e++,r.urgencyFilter.length>0&&e++,r.tagFilter.length>0&&e++,r.versionFilter.length>0&&e++,r.searchQuery.trim()&&e++,(r.dateFrom||r.dateTo)&&e++,r.minRice!==null&&r.minRice!==void 0&&e++,e}function Jit(r){if(!r.dateFrom&&!r.dateTo)return null;const e=new Date().toISOString().slice(0,10);if(r.dateFrom===e&&r.dateTo===e)return"Today";const i=new Date;i.setDate(i.getDate()-1);const n=i.toISOString().slice(0,10);if(r.dateFrom===n&&r.dateTo===n)return"Yesterday";if(r.dateTo===e){const a=new Date;if(a.setDate(a.getDate()-6),r.dateFrom===a.toISOString().slice(0,10))return"Last 7 days";const o=new Date;if(o.setDate(o.getDate()-29),r.dateFrom===o.toISOString().slice(0,10))return"Last 30 days"}return"Custom"}function tnt({filters:r,onFilterChange:e,onClearFilters:i,onCreateClick:n,syncSlot:a,presets:o,onSavePreset:c,onLoadPreset:h,onDeletePreset:u,allTags:d,allVersions:f,onVersionManagerClick:g}){var j,z;const{t:x}=Pr(),[y,v]=q.useState(null),[C,_]=q.useState(""),k=Qit(r),T=q.useMemo(()=>Jit(r),[r]),N=U=>v(V=>V===U?null:U),E=()=>v(null),B=(j=rA.find(U=>U.value===r.sortField))==null?void 0:j.label,O=(z=hx.find(U=>U.value===r.groupBy))==null?void 0:z.label,A=q.useMemo(()=>d.map(U=>({value:U,label:U})),[d]),M=q.useMemo(()=>f.map(U=>({value:U,label:U})),[f]),F=q.useMemo(()=>hx.filter(U=>U.value!==r.groupBy&&U.value!=="none").concat({value:"none",label:"No sub-group"}),[r.groupBy]);return m.jsxs("div",{className:"filter-bar",children:[m.jsxs("div",{className:"filter-search",children:[m.jsx(Pit,{}),m.jsx("input",{className:"filter-search-input",placeholder:"Search tasks...",value:r.searchQuery,onChange:U=>e("searchQuery",U.target.value)}),r.searchQuery&&m.jsx("button",{className:"filter-search-clear",onClick:()=>e("searchQuery",""),children:m.jsx(eA,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx(zu,{id:"status",label:"Status",options:Vit,selected:r.statusFilter,onChange:U=>e("statusFilter",U),isOpen:y==="status",onToggle:()=>N("status"),onClose:E}),m.jsx(zu,{id:"priority",label:"Priority",options:Xit,selected:r.priorityFilter,onChange:U=>e("priorityFilter",U),isOpen:y==="priority",onToggle:()=>N("priority"),onClose:E}),m.jsx(zu,{id:"urgency",label:"Urgency",options:Zit,selected:r.urgencyFilter,onChange:U=>e("urgencyFilter",U),isOpen:y==="urgency",onToggle:()=>N("urgency"),onClose:E}),A.length>0&&m.jsx(zu,{id:"tags",label:"Tags",options:A,selected:r.tagFilter,onChange:U=>e("tagFilter",U),isOpen:y==="tags",onToggle:()=>N("tags"),onClose:E}),M.length>0&&m.jsx(zu,{id:"version",label:"Version",options:M,selected:r.versionFilter,onChange:U=>e("versionFilter",U),isOpen:y==="version",onToggle:()=>N("version"),onClose:E}),m.jsx($c,{isOpen:y==="date",onClose:E,width:320,trigger:m.jsxs("button",{className:`filter-chip ${T?"filter-chip--active":""}`,onClick:()=>N("date"),children:[m.jsx(qit,{}),m.jsx("span",{className:"filter-chip-label",children:T??"Date"}),m.jsx(Dp,{open:y==="date"})]}),content:m.jsx(zit,{dateField:r.dateField,dateFrom:r.dateFrom,dateTo:r.dateTo,onDateFieldChange:U=>e("dateField",U),onDateFromChange:U=>e("dateFrom",U),onDateToChange:U=>e("dateTo",U)})}),m.jsx($c,{isOpen:y==="minRice",onClose:E,width:220,trigger:m.jsxs("button",{className:`filter-chip ${r.minRice!==null?"filter-chip--active":""}`,onClick:()=>N("minRice"),children:[m.jsx("span",{className:"filter-chip-label",children:r.minRice!==null?`${x("filter.min_rice")} ≥ ${r.minRice}`:x("filter.min_rice")}),m.jsx(Dp,{open:y==="minRice"})]}),content:m.jsxs("div",{className:"filter-min-rice",children:[m.jsx("label",{className:"filter-min-rice-label",htmlFor:"filter-min-rice-input",children:x("filter.min_rice")}),m.jsx("input",{id:"filter-min-rice-input",type:"number",min:"0",step:"0.1",className:"field-input",value:r.minRice??"",placeholder:"e.g. 5",onChange:U=>{const V=U.target.value.trim();if(V===""){e("minRice",null);return}const I=Number(V);e("minRice",Number.isFinite(I)?I:null)}}),r.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:i,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 ${r.viewMode==="kanban"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","kanban"),title:"Kanban view",children:m.jsx(Hit,{})}),m.jsx("button",{className:`filter-view-btn ${r.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:m.jsx(Wit,{})}),m.jsx("button",{className:`filter-view-btn ${r.viewMode==="scatter"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","scatter"),title:"RICE scatter (Impact × Effort)",children:m.jsx(Git,{})}),m.jsx("button",{className:`filter-view-btn ${r.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:m.jsx(Yit,{})})]}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx($c,{isOpen:y==="sort",onClose:E,align:"right",trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>N("sort"),children:[m.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M2 4H12M4 7H10M6 10H8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),m.jsx("span",{className:"filter-chip-label",children:B}),m.jsx(Dp,{open:y==="sort"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Sort by"}),rA.map(U=>m.jsxs("button",{className:`filter-option ${r.sortField===U.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",U.value),E()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),r.sortField===U.value&&m.jsx(cx,{})]},U.value))]})}),m.jsx($c,{isOpen:y==="group",onClose:E,align:"right",trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>N("group"),children:[m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[m.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"8",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"1.5",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"8",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]}),m.jsx("span",{className:"filter-chip-label",children:O}),m.jsx(Dp,{open:y==="group"})]}),content:m.jsxs("div",{className:"filter-option-list",children:[m.jsx("div",{className:"filter-popover-section",children:"Group by"}),hx.map(U=>m.jsxs("button",{className:`filter-option ${r.groupBy===U.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",U.value),E()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),r.groupBy===U.value&&m.jsx(cx,{})]},U.value)),r.groupBy!=="none"&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"filter-popover-section",style:{marginTop:"var(--space-2)"},children:"Sub-group by"}),F.map(U=>m.jsxs("button",{className:`filter-option ${r.subGroupBy===U.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",U.value),E()},children:[m.jsx("span",{className:"filter-option-label",children:U.label}),r.subGroupBy===U.value&&m.jsx(cx,{})]},`sub-${U.value}`))]})]})}),m.jsx("div",{className:"filter-bar-divider"}),m.jsx("button",{className:"filter-chip filter-chip--subtle",onClick:g,title:"Manage versions",children:m.jsx(Kit,{})}),m.jsx($c,{isOpen:y==="views",onClose:E,align:"right",width:220,trigger:m.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>N("views"),children:[m.jsx(Uit,{}),m.jsx("span",{className:"filter-chip-label",children:"Views"}),o.length>0&&m.jsx("span",{className:"filter-chip-badge",children:o.length})]}),content:m.jsxs("div",{className:"filter-views",children:[o.length===0?m.jsx("div",{className:"filter-views-empty",children:"No saved views yet"}):m.jsx("div",{className:"filter-views-list",children:o.map(U=>m.jsxs("div",{className:"filter-views-item",children:[m.jsx("button",{className:"filter-views-load",onClick:()=>{h(U),E()},children:U.name}),m.jsx("button",{className:"filter-views-delete",onClick:()=>u(U.id),children:m.jsx(eA,{})})]},U.id))}),m.jsx("div",{className:"filter-popover-divider"}),m.jsxs("div",{className:"filter-views-save",children:[m.jsx("input",{className:"filter-views-input",placeholder:"Save current view...",value:C,onChange:U=>_(U.target.value),onKeyDown:U=>{U.key==="Enter"&&C.trim()&&(c(C.trim()),_(""))}}),m.jsx("button",{className:"filter-views-save-btn",disabled:!C.trim(),onClick:()=>{C.trim()&&(c(C.trim()),_(""))},children:"Save"})]})]})}),a,m.jsxs("button",{className:"filter-create-btn",onClick:n,children:[m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:m.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),x("tasks.create")]})]})}function ent({onClose:r}){const{t:e}=Pr(),i=yit(),{data:n}=tD(),[a,o]=q.useState(""),[c,h]=q.useState(""),[u,d]=q.useState("medium"),[f,g]=q.useState("medium"),[x,y]=q.useState(""),[v,C]=q.useState(""),[_,k]=q.useState(""),T=N=>{if(N.preventDefault(),!a.trim())return;const E=x.split(",").map(B=>B.trim()).filter(Boolean);i.mutate({name:a.trim(),description:c,priority:u,tags:E,urgency:f!=="medium"?f:void 0,why:v.trim()||void 0,version:_||void 0},{onSuccess:()=>r()})};return m.jsx("div",{className:"modal-overlay",onClick:r,children:m.jsxs("div",{className:"modal",onClick:N=>N.stopPropagation(),children:[m.jsxs("div",{className:"modal-header",children:[m.jsx("h2",{className:"modal-title",children:e("tasks.create")}),m.jsx("button",{className:"modal-close",onClick:r,children:"×"})]}),m.jsxs("form",{onSubmit:T,className:"modal-body",children:[m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.name")}),m.jsx("input",{className:"field-input",value:a,onChange:N=>o(N.target.value),placeholder:"e.g. Implement user auth",autoFocus:!0,required:!0})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.description")}),m.jsx("textarea",{className:"field-textarea",value:c,onChange:N=>h(N.target.value),placeholder:"What needs to be done?",rows:3})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.priority")}),m.jsxs("select",{className:"field-select",value:u,onChange:N=>d(N.target.value),children:[m.jsx("option",{value:"low",children:e("priority.low")}),m.jsx("option",{value:"medium",children:e("priority.medium")}),m.jsx("option",{value:"high",children:e("priority.high")}),m.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Urgency"}),m.jsxs("select",{className:"field-select",value:f,onChange:N=>g(N.target.value),children:[m.jsx("option",{value:"low",children:e("priority.low")}),m.jsx("option",{value:"medium",children:e("priority.medium")}),m.jsx("option",{value:"high",children:e("priority.high")}),m.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Version"}),m.jsxs("select",{className:"field-select",value:_,onChange:N=>k(N.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(n??[]).map(N=>m.jsx("option",{value:N.version,children:N.version},N.version))]})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:"Why"}),m.jsx("textarea",{className:"field-textarea",value:v,onChange:N=>C(N.target.value),placeholder:"Why is this task needed?",rows:2})]}),m.jsxs("label",{className:"field",children:[m.jsx("span",{className:"field-label",children:e("tasks.tags")}),m.jsx("input",{className:"field-input",value:x,onChange:N=>y(N.target.value),placeholder:"Comma-separated tags"})]}),m.jsxs("div",{className:"modal-actions",children:[m.jsx("button",{type:"button",className:"btn btn--ghost",onClick:r,children:e("tasks.cancel")}),m.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!a.trim()||i.isPending,children:i.isPending?"...":e("tasks.save")})]})]})]})})}var Pu={exports:{}},iA;function rnt(){if(iA)return Pu.exports;iA=1,Pu.exports=r,Pu.exports.addWheelListener=r,Pu.exports.removeWheelListener=e;function r(i,n,a){i.addEventListener("wheel",n,a)}function e(i,n,a){i.removeEventListener("wheel",n,a)}return Pu.exports}var qu={exports:{}},ux,nA;function int(){if(nA)return ux;nA=1;var r=4,e=.001,i=1e-7,n=10,a=11,o=1/(a-1),c=typeof Float32Array=="function";function h(C,_){return 1-3*_+3*C}function u(C,_){return 3*_-6*C}function d(C){return 3*C}function f(C,_,k){return((h(_,k)*C+u(_,k))*C+d(_))*C}function g(C,_,k){return 3*h(_,k)*C*C+2*u(_,k)*C+d(_)}function x(C,_,k,T,N){var E,B,O=0;do B=_+(k-_)/2,E=f(B,T,N)-C,E>0?k=B:_=B;while(Math.abs(E)>i&&++O<n);return B}function y(C,_,k,T){for(var N=0;N<r;++N){var E=g(_,k,T);if(E===0)return _;var B=f(_,k,T)-C;_-=B/E}return _}function v(C){return C}return ux=function(_,k,T,N){if(!(0<=_&&_<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(_===k&&T===N)return v;for(var E=c?new Float32Array(a):new Array(a),B=0;B<a;++B)E[B]=f(B*o,_,T);function O(A){for(var M=0,F=1,j=a-1;F!==j&&E[F]<=A;++F)M+=o;--F;var z=(A-E[F])/(E[F+1]-E[F]),U=M+z*o,V=g(U,_,T);return V>=e?y(A,U,_,T):V===0?U:x(A,M,M+o,_,T)}return function(M){return M===0?0:M===1?1:f(O(M),k,N)}},ux}var aA;function nnt(){if(aA)return qu.exports;aA=1;var r=int(),e={ease:r(.25,.1,.25,1),easeIn:r(.42,0,1,1),easeOut:r(0,0,.58,1),easeInOut:r(.42,0,.58,1),linear:r(0,0,1,1)};qu.exports=i,qu.exports.makeAggregateRaf=h,qu.exports.sharedScheduler=h();function i(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(F){g[F]=u[F],x[F]=d[F]-u[F]});var T=typeof f.duration=="number"?f.duration:400,N=Math.max(1,T*.06),E,B=0;return E=_.next(A),{cancel:O};function O(){_.cancel(E),E=0}function A(){var F=y(B/N);B+=1,M(F),B<=N?(E=_.next(A),v(u)):(E=0,setTimeout(function(){C(u)},0))}function M(F){k.forEach(function(j){u[j]=x[j]*F+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 qu.exports}var dx,sA;function ant(){if(sA)return dx;sA=1;function r(n){i(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 i(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 dx=r,dx}var fx,oA;function snt(){if(oA)return fx;oA=1,fx=r;function r(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:i(),f,g,x=342,y,v,C,_,k,T,N,E;return{start:O,stop:M,cancel:B};function B(){u(y),u(E)}function O(){f=n(),_=N=v=k=0,g=new Date,u(y),u(E),y=d(A)}function A(){var j=Date.now(),z=j-g;g=j;var U=n(),V=U.x-f.x,I=U.y-f.y;f=U;var G=1e3/(1+z);v=.8*V*G+.2*v,k=.8*I*G+.2*k,y=d(A)}function M(){u(y),u(E);var j=n();C=j.x,T=j.y,g=Date.now(),(v<-c||v>c)&&(_=h*v,C+=_),(k<-c||k>c)&&(N=h*k,T+=N),E=d(F)}function F(){var j=Date.now()-g,z=!1,U=0,V=0;_&&(U=-_*Math.exp(-j/x),U>.5||U<-.5?z=!0:U=_=0),N&&(V=-N*Math.exp(-j/x),V>.5||V<-.5?z=!0:V=N=0),z&&(a(C+U,T+V),E=d(F))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function i(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return fx}var px,lA;function ont(){if(lA)return px;lA=1,px=r;function r(n){if(n)return{capture:i,release:i};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 i(){}return px}var gx,cA;function lnt(){if(cA)return gx;cA=1,gx=r;function r(){this.x=0,this.y=0,this.scale=1}return gx}var Fp={exports:{}},hA;function cnt(){if(hA)return Fp.exports;hA=1,Fp.exports=r,Fp.exports.canAttach=e;function r(i,n){if(!e(i))throw new Error("svg element is required for svg.panzoom to work");var a=i.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=i.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=i.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){i.setAttribute("transform","matrix("+g.scale+" 0 0 "+g.scale+" "+g.x+" "+g.y+")")}}function e(i){return i&&i.ownerSVGElement&&i.getCTM}return Fp.exports}var Ip={exports:{}},uA;function hnt(){if(uA)return Ip.exports;uA=1,Ip.exports=r,Ip.exports.canAttach=e;function r(i,n){var a=e(i);if(!a)throw new Error("panzoom requires DOM element to be attached to the DOM tree");var o=i.parentElement;i.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:i.clientWidth,height:i.clientHeight}}function d(f){i.style.transformOrigin="0 0 0",i.style.transform="matrix("+f.scale+", 0, 0, "+f.scale+", "+f.x+", "+f.y+")"}}function e(i){return i&&i.parentElement&&i.style}return Ip.exports}var mx,dA;function unt(){if(dA)return mx;dA=1;var r=rnt(),e=nnt(),i=ant(),n=snt(),a=ont(),o=a(),c=a(!0),h=lnt(),u=cnt(),d=hnt(),f=1,g=1.75,x=300,y=200;mx=v;function v(A,M){M=M||{};var F=M.controller;if(F||(u.canAttach(A)?F=u(A,M):d.canAttach(A)&&(F=d(A,M))),!F)throw new Error("Cannot create panzoom for the current type of dom element");var j=F.getOwner(),z={x:0,y:0},U=!1,V=new h;F.initTransform&&F.initTransform(V);var I=typeof M.filterKey=="function"?M.filterKey:k,G=typeof M.pinchSpeed=="number"?M.pinchSpeed:1,D=M.bounds,W=typeof M.maxZoom=="number"?M.maxZoom:Number.POSITIVE_INFINITY,K=typeof M.minZoom=="number"?M.minZoom:0,tt=typeof M.boundsPadding=="number"?M.boundsPadding:.05,nt=typeof M.zoomDoubleClickSpeed=="number"?M.zoomDoubleClickSpeed:g,Y=M.beforeWheel||k,rt=M.beforeMouseDown||k,ft=typeof M.zoomSpeed=="number"?M.zoomSpeed:f,ct=C(M.transformOrigin),xt=M.enableTextSelection?c:o;T(D),M.autocenter&&Ze();var st,kt=0,it=0,H=0,J=null,vt=new Date,At,qt=!1,ie=!1,Dt,Ht,Fe,Zt,ht,ot;"smoothScroll"in M&&!M.smoothScroll?ot=B():ot=n(Q,li,M.smoothScroll);var Lt,$t,Wt,Rt=!1;Rr();var ne={dispose:ci,moveBy:Yi,moveTo:Tt,smoothMoveTo:ln,centerOn:wr,zoomTo:zn,zoomAbs:mr,smoothZoom:Yr,smoothZoomAbs:Be,showRectangle:Lr,pause:He,resume:Me,isPaused:kr,getTransform:or,getMinZoom:me,setMinZoom:sr,getMaxZoom:$e,setMaxZoom:Er,getTransformOrigin:ve,setTransformOrigin:Or,getZoomSpeed:Xr,setZoomSpeed:Nr};i(ne);var Ft=typeof M.initialX=="number"?M.initialX:V.x,Re=typeof M.initialY=="number"?M.initialY:V.y,xe=typeof M.initialZoom=="number"?M.initialZoom:V.scale;return(Ft!=V.x||Re!=V.y||xe!=V.scale)&&mr(Ft,Re,xe),ne;function He(){Zr(),Rt=!0}function Me(){Rt&&(Rr(),Rt=!1)}function kr(){return Rt}function Lr(yt){var jt=j.getBoundingClientRect(),Ot=Ge(jt.width,jt.height),Vt=yt.right-yt.left,Pe=yt.bottom-yt.top;if(!Number.isFinite(Vt)||!Number.isFinite(Pe))throw new Error("Invalid rectangle");var Yt=Ot.x/Vt,lr=Ot.y/Pe,Ye=Math.min(Yt,lr);V.x=-(yt.left+Vt/2)*Ye+Ot.x/2,V.y=-(yt.top+Pe/2)*Ye+Ot.y/2,V.scale=Ye}function Ge(yt,jt){if(F.getScreenCTM){var Ot=F.getScreenCTM(),Vt=Ot.a,Pe=Ot.d,Yt=Ot.e,lr=Ot.f;z.x=yt*Vt-Yt,z.y=jt*Pe-lr}else z.x=yt,z.y=jt;return z}function Ze(){var yt,jt,Ot=0,Vt=0,Pe=gr();if(Pe)Ot=Pe.left,Vt=Pe.top,yt=Pe.right-Pe.left,jt=Pe.bottom-Pe.top;else{var Yt=j.getBoundingClientRect();yt=Yt.width,jt=Yt.height}var lr=F.getBBox();if(!(lr.width===0||lr.height===0)){var Ye=jt/lr.height,Qe=yt/lr.width,Fi=Math.min(Qe,Ye);V.x=-(lr.left+lr.width/2)*Fi+yt/2+Ot,V.y=-(lr.top+lr.height/2)*Fi+jt/2+Vt,V.scale=Fi}}function or(){return V}function me(){return K}function sr(yt){K=yt}function $e(){return W}function Er(yt){W=yt}function ve(){return ct}function Or(yt){ct=C(yt)}function Xr(){return ft}function Nr(yt){if(!Number.isFinite(yt))throw new Error("Zoom speed should be a number");ft=yt}function Q(){return{x:V.x,y:V.y}}function Tt(yt,jt){V.x=yt,V.y=jt,Ce(),Pn("pan"),Kt()}function Pt(yt,jt){Tt(V.x+yt,V.y+jt)}function Ce(){var yt=gr();if(yt){var jt=!1,Ot=we(),Vt=yt.left-Ot.right;return Vt>0&&(V.x+=Vt,jt=!0),Vt=yt.right-Ot.left,Vt<0&&(V.x+=Vt,jt=!0),Vt=yt.top-Ot.bottom,Vt>0&&(V.y+=Vt,jt=!0),Vt=yt.bottom-Ot.top,Vt<0&&(V.y+=Vt,jt=!0),jt}}function gr(){if(D){if(typeof D=="boolean"){var yt=j.getBoundingClientRect(),jt=yt.width,Ot=yt.height;return{left:jt*tt,top:Ot*tt,right:jt*(1-tt),bottom:Ot*(1-tt)}}return D}}function we(){var yt=F.getBBox(),jt=Qt(yt.left,yt.top);return{left:jt.x,top:jt.y,right:yt.width*V.scale+jt.x,bottom:yt.height*V.scale+jt.y}}function Qt(yt,jt){return{x:yt*V.scale+V.x,y:jt*V.scale+V.y}}function Kt(){U=!0,st=window.requestAnimationFrame(kn)}function ye(yt,jt,Ot){if(E(yt)||E(jt)||E(Ot))throw new Error("zoom requires valid numbers");var Vt=V.scale*Ot;if(Vt<K){if(V.scale===K)return;Ot=K/V.scale}if(Vt>W){if(V.scale===W)return;Ot=W/V.scale}var Pe=Ge(yt,jt);if(V.x=Pe.x-Ot*(Pe.x-V.x),V.y=Pe.y-Ot*(Pe.y-V.y),D&&tt===1&&K===1)V.scale*=Ot,Ce();else{var Yt=Ce();Yt||(V.scale*=Ot)}Pn("zoom"),Kt()}function mr(yt,jt,Ot){var Vt=Ot/V.scale;ye(yt,jt,Vt)}function wr(yt){var jt=yt.ownerSVGElement;if(!jt)throw new Error("ui element is required to be within the scene");var Ot=yt.getBoundingClientRect(),Vt=Ot.left+Ot.width/2,Pe=Ot.top+Ot.height/2,Yt=jt.getBoundingClientRect(),lr=Yt.width/2-Vt,Ye=Yt.height/2-Pe;Yi(lr,Ye,!0)}function ln(yt,jt){Yi(yt-V.x,jt-V.y,!0)}function Yi(yt,jt,Ot){if(!Ot)return Pt(yt,jt);Lt&&Lt.cancel();var Vt={x:0,y:0},Pe={x:yt,y:jt},Yt=0,lr=0;Lt=e(Vt,Pe,{step:function(Ye){Pt(Ye.x-Yt,Ye.y-lr),Yt=Ye.x,lr=Ye.y}})}function li(yt,jt){la(),Tt(yt,jt)}function ci(){Zr()}function Rr(){j.addEventListener("mousedown",pt,{passive:!1}),j.addEventListener("dblclick",St,{passive:!1}),j.addEventListener("touchstart",Ei,{passive:!1}),j.addEventListener("keydown",wn,{passive:!1}),r.addWheelListener(j,br,{passive:!1}),Kt()}function Zr(){r.removeWheelListener(j,br),j.removeEventListener("mousedown",pt),j.removeEventListener("keydown",wn),j.removeEventListener("dblclick",St),j.removeEventListener("touchstart",Ei),st&&(window.cancelAnimationFrame(st),st=0),ot.cancel(),ue(),Ke(),xt.release(),Wo()}function kn(){U&&In()}function In(){U=!1,F.applyTransform(V),Pn("transform"),st=0}function wn(yt){var jt=0,Ot=0,Vt=0;if(yt.keyCode===38?Ot=1:yt.keyCode===40?Ot=-1:yt.keyCode===37?jt=1:yt.keyCode===39?jt=-1:yt.keyCode===189||yt.keyCode===109?Vt=1:(yt.keyCode===187||yt.keyCode===107)&&(Vt=-1),!I(yt,jt,Ot,Vt)){if(jt||Ot){yt.preventDefault(),yt.stopPropagation();var Pe=j.getBoundingClientRect(),Yt=Math.min(Pe.width,Pe.height),lr=.05,Ye=Yt*lr*jt,Qe=Yt*lr*Ot;Yi(Ye,Qe)}if(Vt){var Fi=Ps(Vt*100),Yt=ct?Qr():Sn();zn(Yt.x,Yt.y,Fi)}}}function Sn(){var yt=j.getBoundingClientRect();return{x:yt.width/2,y:yt.height/2}}function Ei(yt){if($n(yt),yi(),yt.touches.length===1)return mi(yt,yt.touches[0]);yt.touches.length===2&&(ht=X(yt.touches[0],yt.touches[1]),Wt=!0,Ki())}function $n(yt){M.onTouch&&!M.onTouch(yt)||(yt.stopPropagation(),yt.preventDefault())}function Ea(yt){yi(),!(M.onDoubleClick&&!M.onDoubleClick(yt))&&(yt.preventDefault(),yt.stopPropagation())}function mi(yt){it=new Date;var jt=yt.touches[0],Ot=rr(jt);At=Ot;var Vt=Ge(Ot.x,Ot.y);Dt=Vt.x,Ht=Vt.y,Fe=Dt,Zt=Ht,ot.cancel(),Ki()}function Ki(){qt||(qt=!0,document.addEventListener("touchmove",cn),document.addEventListener("touchend",te),document.addEventListener("touchcancel",te))}function cn(yt){if(yt.touches.length===1){yt.stopPropagation();var jt=yt.touches[0],Ot=rr(jt),Vt=Ge(Ot.x,Ot.y),Pe=Vt.x-Dt,Yt=Vt.y-Ht;Pe!==0&&Yt!==0&&Ja(),Dt=Vt.x,Ht=Vt.y,Yi(Pe,Yt)}else if(yt.touches.length===2){Wt=!0;var lr=yt.touches[0],Ye=yt.touches[1],Qe=X(lr,Ye),Fi=1+(Qe/ht-1)*G,qn=rr(lr),qs=rr(Ye);if(Dt=(qn.x+qs.x)/2,Ht=(qn.y+qs.y)/2,ct){var Ot=Qr();Dt=Ot.x,Ht=Ot.y}zn(Dt,Ht,Fi),ht=Qe,yt.stopPropagation(),yt.preventDefault()}}function yi(){H&&(clearTimeout(H),H=0)}function yr(yt){if(M.onClick){yi();var jt=Dt-Fe,Ot=Ht-Zt,Vt=Math.sqrt(jt*jt+Ot*Ot);Vt>5||(H=setTimeout(function(){H=0,M.onClick(yt)},x))}}function te(yt){if(yi(),yt.touches.length>0){var jt=rr(yt.touches[0]),Ot=Ge(jt.x,jt.y);Dt=Ot.x,Ht=Ot.y}else{var Vt=new Date;if(Vt-kt<x)if(ct){var jt=Qr();Yr(jt.x,jt.y,nt)}else Yr(At.x,At.y,nt);else Vt-it<y&&yr(yt);kt=Vt,Wo(),Ke()}}function X(yt,jt){var Ot=yt.clientX-jt.clientX,Vt=yt.clientY-jt.clientY;return Math.sqrt(Ot*Ot+Vt*Vt)}function St(yt){Ea(yt);var jt=rr(yt);ct&&(jt=Qr()),Yr(jt.x,jt.y,nt)}function pt(yt){if(yi(),!rt(yt)){if(J=yt,vt=new Date,qt)return yt.stopPropagation(),!1;var jt=yt.button===1&&window.event!==null||yt.button===0;if(jt){ot.cancel();var Ot=rr(yt),Vt=Ge(Ot.x,Ot.y);return Fe=Dt=Vt.x,Zt=Ht=Vt.y,document.addEventListener("mousemove",It),document.addEventListener("mouseup",Gt),xt.capture(yt.target||yt.srcElement),!1}}}function It(yt){if(!qt){Ja();var jt=rr(yt),Ot=Ge(jt.x,jt.y),Vt=Ot.x-Dt,Pe=Ot.y-Ht;Dt=Ot.x,Ht=Ot.y,Yi(Vt,Pe)}}function Gt(){var yt=new Date;yt-vt<y&&yr(J),xt.release(),Wo(),ue()}function ue(){document.removeEventListener("mousemove",It),document.removeEventListener("mouseup",Gt),ie=!1}function Ke(){document.removeEventListener("touchmove",cn),document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),ie=!1,Wt=!1,qt=!1}function br(yt){if(!Y(yt)){ot.cancel();var jt=yt.deltaY;yt.deltaMode>0&&(jt*=100);var Ot=Ps(jt);if(Ot!==1){var Vt=ct?Qr():rr(yt);zn(Vt.x,Vt.y,Ot),yt.preventDefault()}}}function rr(yt){var jt,Ot,Vt=j.getBoundingClientRect();return jt=yt.clientX-Vt.left,Ot=yt.clientY-Vt.top,{x:jt,y:Ot}}function Yr(yt,jt,Ot){var Vt=V.scale,Pe={scale:Vt},Yt={scale:Ot*Vt};ot.cancel(),la(),$t=e(Pe,Yt,{step:function(lr){mr(yt,jt,lr.scale)},done:Ni})}function Be(yt,jt,Ot){var Vt=V.scale,Pe={scale:Vt},Yt={scale:Ot};ot.cancel(),la(),$t=e(Pe,Yt,{step:function(lr){mr(yt,jt,lr.scale)},done:Ni})}function Qr(){var yt=j.getBoundingClientRect();return{x:yt.width*ct.x,y:yt.height*ct.y}}function zn(yt,jt,Ot){return ot.cancel(),la(),ye(yt,jt,Ot)}function la(){$t&&($t.cancel(),$t=null)}function Ps(yt){var jt=Math.sign(yt),Ot=Math.min(.25,Math.abs(ft*yt/128));return 1-jt*Ot}function Ja(){ie||(Pn("panstart"),ie=!0,ot.start())}function Wo(){ie&&(Wt||ot.stop(),Pn("panend"))}function Ni(){Pn("zoomend")}function Pn(yt){ne.fire(yt,ne)}}function C(A){if(A){if(typeof A=="object")return(!N(A.x)||!N(A.y))&&_(A),A;_()}}function _(A){throw console.error(A),new Error(["Cannot parse transform origin.","Some good examples:",' "center center" can be achieved with {x: 0.5, y: 0.5}',' "top center" can be achieved with {x: 0.5, y: 0}',' "bottom right" can be achieved with {x: 1, y: 1}'].join(`
|
|
463
|
+
`))}function k(){}function T(A){var M=typeof A;if(!(M==="undefined"||M==="boolean")){var F=N(A.left)&&N(A.top)&&N(A.bottom)&&N(A.right);if(!F)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function N(A){return Number.isFinite(A)}function E(A){return Number.isNaN?Number.isNaN(A):A!==A}function B(){return{start:k,stop:k,cancel:k}}function O(){if(typeof document>"u")return;var A=document.getElementsByTagName("script");if(!A)return;for(var M,F=0;F<A.length;++F){var j=A[F];if(j.src&&j.src.match(/\bpanzoom(\.min)?\.js/)){M=j;break}}if(!M)return;var z=M.getAttribute("query");if(!z)return;var U=M.getAttribute("name")||"pz",V=Date.now();I();function I(){var W=document.querySelector(z);if(!W){var K=Date.now(),tt=K-V;if(tt<2e3){setTimeout(I,100);return}console.error("Cannot find the panzoom element",U);return}var nt=G(M);console.log(nt),window[U]=v(W,nt)}function G(W){for(var K=W.attributes,tt={},nt=0;nt<K.length;++nt){var Y=K[nt],rt=D(Y);rt&&(tt[rt.name]=rt.value)}return tt}function D(W){if(W.name){var K=W.name[0]==="p"&&W.name[1]==="z"&&W.name[2]==="-";if(K){var tt=W.name.substr(3),nt=JSON.parse(W.value);return{name:tt,value:nt}}}}}return O(),mx}var dnt=unt();const oD=$d(dnt);function yx(r){return r.replace(/ı/g,"i").replace(/İ/g,"i").replace(/ş/g,"s").replace(/Ş/g,"s").replace(/ğ/g,"g").replace(/Ğ/g,"g").normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase()}function m1({value:r,options:e,placeholder:i="Select…",searchPlaceholder:n="Search…",onChange:a,allowCustom:o=!1,clearLabel:c="None"}){const[h,u]=q.useState(!1),[d,f]=q.useState(""),g=q.useRef(null),x=q.useMemo(()=>{const _=yx(d.trim());return _?e.filter(k=>yx(k.label).includes(_)||yx(k.value).includes(_)):e},[e,d]),y=e.find(_=>_.value===r),v=o&&d.trim()&&!e.some(_=>_.value===d.trim());q.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||r?"ss-value":"ss-placeholder",children:(y==null?void 0:y.label)??r??i}),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===r?" 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"})]})]})]})}Oe.setOptions({gfm:!0,breaks:!0});const fnt={"[":"]","(":")","{":"}"};function pnt(r){if(/^\s*(classDef|class|style|linkStyle|click|subgraph)\b/.test(r))return r;let e="",i=0;const n=r.length;for(;i<n;){const a=r.slice(i).match(/^(\s*[A-Za-z_]\w*\s*)([\[\(\{])/);if(!a){e+=r[i],i++;continue}const o=a[1],c=a[2],h=fnt[c],u=i+o.length+1,d=r.lastIndexOf(h);if(d<=u){e+=r[i],i++;continue}const g=r.slice(u,d).trim();if(g.startsWith('"')&&g.endsWith('"')){e+=r.slice(i,d+1),i=d+1;continue}if(g===""){e+=r.slice(i,d+1),i=d+1;continue}const x=g.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");e+=`${o}${c}"${x}"${h}`,i=d+1}return e}function gnt(r){return r.split(`
|
|
464
|
+
`).map(pnt).join(`
|
|
465
|
+
`)}const mnt=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function ynt(r,e,i){const n=r.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=mnt.exec(u);if(f){if(a===e){const[,g,,x,y]=f,v=i?"[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 bnt=/-->|---|==>|==|-\.|~~~|\.->/;function xnt(r,e,i){const n=i?"done":"todo",a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`^(\\s*)(${a})((?:\\[[^\\]]*\\]|\\([^)]*\\)|\\{[^}]*\\})?)(\\s*:::(?:done|todo|active|blocked)\\b)?\\s*$`),c=r.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)||bnt.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 vnt=[1,2,3,4,5,6,7,8,9,10],Cnt=[1,2,3,4,5],_nt=[25,50,75,100],knt=[.5,1,1.5,2,3,4,5,6,8];function wnt(r){return r==null?"":r<5?"rice-score--low":r<=15?"rice-score--mid":"rice-score--high"}function Snt({task:r,expanded:e,onToggle:i,onUpdate:n}){const{t:a}=Pr(),o=r.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=wnt(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:i,"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:"—"}),vnt.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:"—"}),_nt.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:"—"}),knt.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 zi({label:r,children:e}){return m.jsxs("div",{className:"prop-row",children:[m.jsx("span",{className:"prop-label",children:r}),m.jsx("div",{className:"prop-value",children:e})]})}function Tnt({text:r}){const[e,i]=q.useState(!1),[n,a]=q.useState(!1),o=q.useRef(null);return q.useEffect(()=>{requestAnimationFrame(()=>{const c=o.current;c&&a(c.scrollHeight>c.clientHeight+1)})},[r]),m.jsxs("span",{className:"prop-expandable",onClick:()=>i(c=>!c),children:[m.jsx("span",{ref:o,className:`prop-text ${e?"":"prop-text--clamped"}`,children:r}),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 Ent({task:r,onClose:e,initialRiceExpanded:i}){const{t:n}=Pr(),{resolved:a}=Gd(),o=Zj(),c=_it(),h=Qj(),{data:u}=bit(),{data:d}=Cit(),{data:f}=tD(),[g,x]=q.useState(""),[y,v]=q.useState(""),[C,_]=q.useState(null),[k,T]=q.useState(i??!!r.rice),[N,E]=q.useState(!1),B=H=>{_(H.message),setTimeout(()=>_(null),5e3)},O=H=>{o.mutate({slug:r.slug,updates:{status:H}},{onError:B})},A=H=>{o.mutate({slug:r.slug,updates:{priority:H}},{onError:B})},M=H=>{o.mutate({slug:r.slug,updates:{urgency:H}},{onError:B})},F=H=>{o.mutate({slug:r.slug,updates:{version:H||null}},{onError:B})},j=H=>{o.mutate({slug:r.slug,updates:{rice:H}},{onError:B})},z=(H,J)=>{const vt=H==="related_feature"?J.trim()||null:J.trim();H!=="related_feature"&&!vt||o.mutate({slug:r.slug,updates:{[H]:vt}},{onError:B})},U=H=>H.filter(J=>J.startsWith("person:")).map(J=>J.slice(7)),V=(H,J)=>[...H.filter(At=>!At.startsWith("person:")),...J.map(At=>`person:${At}`)],I=(()=>{const H=new Set(U(r.tags));return r.assignee&&H.add(r.assignee),[...H]})(),G=H=>{const J={tags:V(r.tags,H)};r.assignee&&(J.assignee=null),o.mutate({slug:r.slug,updates:J},{onError:B})},D=H=>{const J=H.trim();J&&!I.includes(J)&&G([...I,J])},W=H=>{G(I.filter(J=>J!==H))},K=()=>{window.confirm(`Delete task "${r.name}"? This propagates to the remote backend on sync.`)&&h.mutate(r.slug,{onError:B,onSuccess:()=>e==null?void 0:e()})},tt=H=>{o.mutate({slug:r.slug,updates:{due_date:H||null}},{onError:B})},nt=H=>{const J={tags:H};if(r.assignee){const vt=`person:${r.assignee}`;r.tags.includes(vt)&&!H.includes(vt)&&(J.assignee=null)}o.mutate({slug:r.slug,updates:J},{onError:B})},Y=()=>{const H=y.trim();H&&(r.tags.some(J=>J.toLowerCase()===H.toLowerCase())||nt([...r.tags,H]),v(""))},rt=H=>{H.preventDefault(),g.trim()&&c.mutate({slug:r.slug,content:g.trim()},{onSuccess:()=>x(""),onError:B})},ft=q.useMemo(()=>r.body?Oe.parse(r.body):"",[r.body]),ct=q.useRef(null),xt=q.useRef(r.body??""),st=q.useRef(r.body??"");q.useEffect(()=>{xt.current=r.body??"",st.current=r.body??""},[r.body]);const kt=q.useRef(o),it=q.useRef(B);return q.useEffect(()=>{kt.current=o,it.current=B}),q.useEffect(()=>{const H=ct.current;if(!H||!ft)return;H.querySelectorAll('input[type="checkbox"]').forEach((At,qt)=>{At.removeAttribute("disabled"),At.dataset.criterionIndex=String(qt)});const vt=At=>{const qt=At.target;if(!(qt instanceof HTMLInputElement)||qt.type!=="checkbox")return;const ie=qt.dataset.criterionIndex;if(ie===void 0)return;const Dt=Number(ie),Ht=qt.checked,Fe=st.current,Zt=ynt(Fe,Dt,Ht);if(!Zt)return;let ht=Zt.body;Zt.nodeId&&(ht=xnt(ht,Zt.nodeId,Ht)),ht!==Fe&&(st.current=ht,kt.current.mutate({slug:r.slug,updates:{body:ht}},{onError:ot=>{qt.checked=!Ht,st.current=xt.current,it.current(ot)}}))};return H.addEventListener("change",vt),()=>H.removeEventListener("change",vt)},[ft,r.slug]),q.useEffect(()=>{const H=ct.current;if(!H||!ft)return;Wj(a);let J=!1;const vt=[];let At=!1;const qt=async()=>{if(J||At)return;H.querySelectorAll(".mermaid-rendered").forEach(Ht=>{const Fe=Ht.dataset.mermaidSource;if(!Fe)return;const Zt=document.createElement("pre"),ht=document.createElement("code");ht.className="language-mermaid",ht.textContent=Fe,Zt.appendChild(ht),Ht.replaceWith(Zt)});const Dt=H.querySelectorAll("pre > code.language-mermaid");if(Dt.length!==0){for(At=!0;vt.length;){const Ht=vt.pop();try{Ht==null||Ht()}catch{}}for(let Ht=0;Ht<Dt.length&&!J;Ht++){const Fe=Dt[Ht],Zt=Fe.parentElement;if(!Zt)continue;const ht=gnt(Fe.textContent??""),ot=`mmd-${r.slug}-${Ht}-${Date.now().toString(36)}`,Lt=document.createElement("div");Lt.className="mermaid-rendered",Lt.dataset.mermaidSource=ht;const $t=document.createElement("div");$t.className="mermaid-stage",Lt.appendChild($t);const Wt=document.createElement("div");Wt.className="mermaid-controls",Wt.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
|
+
`,Lt.appendChild(Wt),Zt.replaceWith(Lt);try{const{svg:Rt,bindFunctions:ne}=await n_.render(ot,ht);if(J)break;$t.innerHTML=Rt,ne==null||ne($t),Lt.dataset.mermaidRendered="1";const Ft=$t.querySelector("svg");if(!Ft)continue;Gj(Ft);const Re=Ft.viewBox.baseVal,xe=Re&&Re.width>0?Re.width:Ft.getBoundingClientRect().width,He=Re&&Re.height>0?Re.height:Ft.getBoundingClientRect().height;Ft.removeAttribute("width"),Ft.removeAttribute("height"),Ft.style.width=`${xe}px`,Ft.style.height=`${He}px`,Ft.style.maxWidth="none",Ft.style.transformOrigin="0 0";const Me=oD(Ft,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),kr=()=>{try{const me=$t.getBoundingClientRect();if(me.width===0||me.height===0)return;const sr=32,$e=Math.min((me.width-sr)/xe,(me.height-sr)/He,1);Me.zoomAbs(0,0,1),Me.moveTo(0,0),Me.zoomAbs(0,0,$e);const Er=(me.width-xe*$e)/2,ve=(me.height-He*$e)/2;Me.moveTo(Er,ve)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(kr));const Lr=new ResizeObserver(()=>kr());Lr.observe($t);let Ge=null;const Ze=me=>{try{const sr=me.getBoundingClientRect(),$e=$t.getBoundingClientRect();if(sr.width===0)return;const Er=sr.left+sr.width/2-$e.left,ve=sr.top+sr.height/2-$e.top,Or=Math.min($e.width*.6/sr.width,$e.height*.6/sr.height,6),Xr=Me.getTransform(),Nr=Or/Xr.scale;if(Math.abs(Nr-1)<.01)return;Me.smoothZoom(Er,ve,Nr)}catch{}},or=me=>{const sr=me.target,$e=(sr==null?void 0:sr.closest("g.node, g.cluster"))??null;if(!$e){Ge&&(Ge=null,kr());return}Ge===$e?(Ge=null,kr()):(Ge=$e,Ze($e))};$t.addEventListener("click",or),Ft.querySelectorAll("g.node, g.cluster").forEach(me=>{me.style.cursor="zoom-in"}),Wt.addEventListener("click",me=>{me.stopPropagation();const sr=me.target.closest("button");if(!sr)return;const $e=$t.getBoundingClientRect(),Er=$e.width/2,ve=$e.height/2,Or=sr.getAttribute("data-act");Or==="in"?Me.smoothZoom(Er,ve,1.4):Or==="out"?Me.smoothZoom(Er,ve,1/1.4):Or==="reset"&&(Ge=null,kr())}),vt.push(()=>{Lr.disconnect(),$t.removeEventListener("click",or),Me.dispose()})}catch(Rt){if(J)break;const ne=Rt instanceof Error?Rt.message:String(Rt);$t.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${ne.replace(/[<>&]/g,Ft=>({"<":"<",">":">","&":"&"})[Ft]??Ft)}</pre>`}}At=!1}};qt();const ie=new MutationObserver(()=>{if(J||At)return;const Dt=H.querySelector("pre > code.language-mermaid"),Ht=H.querySelector(".mermaid-rendered .mermaid-stage svg");Dt&&(!Ht||Dt)&&Dt&&qt()});return ie.observe(H,{childList:!0,subtree:!0}),()=>{for(J=!0,ie.disconnect();vt.length;){const Dt=vt.pop();try{Dt==null||Dt()}catch{}}}},[ft,r.slug,a]),m.jsx("div",{className:`detail-overlay ${N?"detail-overlay--fullscreen":""}`,onClick:e,children:m.jsxs("div",{className:`detail-panel ${N?"detail-panel--fullscreen":""}`,onClick:H=>H.stopPropagation(),children:[m.jsxs("div",{className:"detail-header",children:[m.jsx("h2",{className:"detail-title",children:r.name}),m.jsxs("div",{className:"detail-header-actions",children:[m.jsx("button",{type:"button",className:"detail-icon-btn",onClick:()=>E(H=>!H),title:N?"Exit full-page view":"Open in full page","aria-label":N?"Exit full-page view":"Open in full page",children:N?m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("path",{d:"M6 3v3H3M10 3v3h3M6 13v-3H3M10 13v-3h3"})}):m.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("path",{d:"M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3"})})}),m.jsx("button",{className:"modal-close",onClick:e,"aria-label":"Close",children:"×"})]})]}),m.jsxs("div",{className:"detail-body",children:[C&&m.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:C}),m.jsxs("div",{className:"props-block",children:[m.jsx(zi,{label:"Status",children:m.jsxs("select",{className:"field-select prop-select",value:r.status,onChange:H=>O(H.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(zi,{label:n("tasks.priority"),children:m.jsxs("select",{className:"field-select prop-select",value:r.priority,onChange:H=>A(H.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(zi,{label:"Urgency",children:m.jsxs("select",{className:"field-select prop-select",value:r.urgency,onChange:H=>M(H.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(zi,{label:n("rice.title"),children:m.jsx(Snt,{task:r,expanded:k,onToggle:()=>T(H=>!H),onUpdate:j})}),m.jsx(zi,{label:"Name",children:m.jsx("input",{className:"settings-like-input prop-text-input",defaultValue:r.name,onBlur:H=>{H.target.value.trim()&&H.target.value.trim()!==r.name&&z("name",H.target.value)},onKeyDown:H=>{H.key==="Enter"&&H.target.blur()}},`name-${r.slug}-${r.name}`)}),m.jsx(zi,{label:"Summary",children:m.jsx("input",{className:"prop-text-input",defaultValue:r.description,placeholder:"One-line summary",onBlur:H=>{H.target.value.trim()&&H.target.value.trim()!==r.description&&z("description",H.target.value)},onKeyDown:H=>{H.key==="Enter"&&H.target.blur()}},`desc-${r.slug}-${r.description}`)}),m.jsx(zi,{label:"Assignees",children:m.jsxs("div",{className:"assignee-multi",children:[I.length>0&&m.jsx("div",{className:"assignee-chips",children:I.map(H=>{const J=(u??[]).find(vt=>vt.slug===H);return m.jsxs("span",{className:"assignee-chip",children:[(J==null?void 0:J.name)??H,m.jsx("button",{type:"button",className:"assignee-chip__remove","aria-label":`Remove ${(J==null?void 0:J.name)??H}`,onClick:()=>W(H),children:"×"})]},H)})}),m.jsx(m1,{value:null,options:(u??[]).filter(H=>!I.includes(H.slug)).map(H=>({value:H.slug,label:H.name,hint:H.slug})),placeholder:I.length>0?"Add assignee…":"Unassigned",searchPlaceholder:"Search people…",clearLabel:"Unassigned",allowCustom:!0,onChange:H=>{H&&D(H)}})]})}),m.jsx(zi,{label:"Feature",children:m.jsx(m1,{value:r.related_feature??null,options:(d??[]).map(H=>({value:H.slug,label:H.name??H.slug,hint:H.name?H.slug:void 0})),placeholder:"No feature",searchPlaceholder:"Search features…",clearLabel:"No feature",allowCustom:!0,onChange:H=>z("related_feature",H??"")})}),m.jsx(zi,{label:"Due",children:r.tags.some(H=>H.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:r.due_date??"",onChange:H=>tt(H.target.value)})}),m.jsx(zi,{label:"Tags",children:m.jsxs("div",{className:"prop-tags prop-tags--editable",children:[r.tags.map(H=>m.jsxs("span",{className:"task-tag","data-hue":Va(H),children:[H,m.jsx("button",{type:"button",className:"task-tag-remove","aria-label":`Remove tag ${H}`,onClick:()=>nt(r.tags.filter(J=>J!==H)),children:"×"})]},H)),m.jsx("input",{className:"task-tag-input",value:y,placeholder:"+ tag","aria-label":"Add tag",onChange:H=>v(H.target.value),onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),Y())},onBlur:Y})]})}),m.jsx(zi,{label:"Version",children:m.jsxs("select",{className:"field-select prop-select",value:r.version??"",onChange:H=>F(H.target.value),children:[m.jsx("option",{value:"",children:"No version"}),(f??[]).map(H=>m.jsx("option",{value:H.version,children:H.version},H.version)),r.version&&!(f??[]).some(H=>H.version===r.version)&&m.jsx("option",{value:r.version,children:r.version})]})}),r.description&&m.jsx(zi,{label:"Description",children:m.jsx(Tnt,{text:r.description})}),m.jsx(zi,{label:"Created",children:m.jsx("span",{className:"prop-date",children:r.created_at})}),m.jsx(zi,{label:"Updated",children:m.jsx("span",{className:"prop-date",children:r.updated_at})}),r.parent_task&&m.jsx(zi,{label:"Parent",children:m.jsx("span",{className:"prop-text",children:r.parent_task})}),m.jsx(zi,{label:"ID",children:m.jsx("code",{className:"prop-id",children:r.id})})]}),m.jsx("hr",{className:"detail-divider"}),ft?m.jsx("div",{ref:ct,className:"markdown-body",dangerouslySetInnerHTML:{__html:ft}}):m.jsx("p",{className:"detail-empty",children:"No content."}),m.jsx("hr",{className:"detail-divider"}),m.jsxs("div",{className:"changelog-section",children:[m.jsx("h3",{className:"changelog-title",children:n("tasks.changelog")}),m.jsxs("form",{onSubmit:rt,className:"changelog-add",children:[m.jsx("input",{className:"field-input",value:g,onChange:H=>x(H.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:K,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 Nnt=["critical","high"];function em(r){return Nnt.includes(r)}const y1=[{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 fA(r){const e=em(r.priority),i=em(r.urgency);return e&&i?"do":e&&!i?"schedule":!e&&i?"delegate":"eliminate"}function pA(r,e){return r&&!em(e)?"high":!r&&em(e)?"medium":null}function gA(r,e){const i=y1.find(c=>c.key===e);if(!i)return{};const n={},a=pA(i.priorityHigh,r.priority),o=pA(i.urgencyHigh,r.urgency);return a&&(n.priority=a),o&&(n.urgency=o),n}function bx(r){return!r.priority&&!r.urgency}function Ant(r){const e=[];return r.priority&&e.push(`priority → ${r.priority}`),r.urgency&&e.push(`urgency → ${r.urgency}`),e.join(" · ")}function Mnt({tasks:r,onTaskClick:e,onTaskMove:i}){const n=r.filter(T=>T.status!=="completed"),[a,o]=q.useState(null),[c,h]=q.useState(null),[u,d]=q.useState(null),f=!!i,g=c?n.find(T=>T.slug===c)??null:null,x=g?fA(g):null,y=(T,N)=>{T.dataTransfer.setData("text/plain",N.slug),T.dataTransfer.effectAllowed="move",h(N.slug)},v=()=>{h(null),o(null)},C=(T,N)=>{f&&(T.preventDefault(),T.dataTransfer.dropEffect="move",a!==N&&o(N))},_=(T,N)=>{if(!i)return;T.preventDefault();const E=T.dataTransfer.getData("text/plain");if(v(),!E)return;const B=n.find(M=>M.slug===E);if(!B)return;const O=gA(B,N);if(bx(O))return;i(E,O);const A=y1.find(M=>M.key===N);d({slug:E,name:B.name,toLabel:(A==null?void 0:A.label)??N,prev:{priority:B.priority,urgency:B.urgency}})},k=()=>{!u||!i||(i(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:y1.map(T=>{const N=n.filter(F=>fA(F)===T.key),E=a===T.key,B=x===T.key,O=E&&g?gA(g,T.key):null,A=O?bx(O)?"Already here":Ant(O):null,M=["eisenhower-quadrant",`eisenhower-quadrant--${T.key}`,E?"eisenhower-quadrant--dragover":"",B?"eisenhower-quadrant--source":"",E&&O&&bx(O)?"eisenhower-quadrant--noop":""].filter(Boolean).join(" ");return m.jsxs("div",{className:M,onDragOver:F=>C(F,T.key),onDragLeave:()=>o(F=>F===T.key?null:F),onDrop:F=>_(F,T.key),children:[m.jsxs("div",{className:"eisenhower-quadrant-header",children:[m.jsx("span",{className:"eisenhower-quadrant-dot",style:{background:`var(${T.colorVar})`}}),m.jsx("span",{className:"eisenhower-quadrant-label",children:T.label}),m.jsx("span",{className:"eisenhower-quadrant-count",children:N.length})]}),A?m.jsx("span",{className:"eisenhower-quadrant-preview",children:A}):m.jsx("span",{className:"eisenhower-quadrant-subtitle",children:T.subtitle}),m.jsxs("div",{className:"eisenhower-quadrant-cards",children:[N.map(F=>m.jsx(ef,{task:F,onClick:()=>e(F),onDragStart:j=>y(j,F),dragging:c===F.slug},F.slug)),f&&N.length===0&&m.jsx("div",{className:"eisenhower-quadrant-empty",children:"Drop tasks here"})]})]},T.key)})}),m.jsxs("div",{className:"eisenhower-x-label",children:[m.jsx("span",{className:"eisenhower-axis-hi",children:"Urgent"}),m.jsx("span",{className:"eisenhower-axis-lo",children:"Not Urgent"})]})]})}const Ae={top:32,right:24,bottom:56,left:64},mA=.5,yA=8,xx=1,bA=5,Bnt=2,Lnt=3,Ont={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function vx(r){return Math.log2(Math.max(r,.01)+1)}function Cx(r,e,i){return Math.max(e,Math.min(i,r))}function xA(r){const e=r.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function Rnt({tasks:r,onTaskClick:e}){const i=q.useRef(null),[n,a]=q.useState({width:800,height:480}),[o,c]=q.useState(!1),[h,u]=q.useState(null);q.useEffect(()=>{const j=i.current;if(!j)return;const z=new ResizeObserver(U=>{for(const V of U){const I=V.contentRect.width,G=Math.max(360,Math.min(620,I*.6));a({width:I,height:G})}});return z.observe(j),()=>z.disconnect()},[]);const d=q.useMemo(()=>r.filter(j=>j.status!=="completed"),[r]),f=q.useMemo(()=>d.filter(xA),[d]),g=q.useMemo(()=>d.filter(j=>!xA(j)),[d]),x=q.useMemo(()=>[...f].sort((j,z)=>(z.rice.score??0)-(j.rice.score??0)),[f]),y=Math.max(120,n.width-Ae.left-Ae.right),v=Math.max(120,n.height-Ae.top-Ae.bottom),C=vx(mA),k=vx(yA)-C,T=j=>{const z=(vx(Cx(j,mA,yA))-C)/k;return Ae.left+(1-z)*y},N=j=>{const z=(Cx(j,xx,bA)-xx)/(bA-xx);return Ae.top+(1-z)*v},E=j=>6+(Cx(j,1,10)-1)/9*18,B=j=>Math.max(.4,j/100),O=T(Bnt),A=N(Lnt),M=[.5,1,2,4,8],F=[1,2,3,4,5];return m.jsxs("div",{className:"rice-scatter",ref:i,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:Ae.left,y:Ae.top,width:O-Ae.left,height:A-Ae.top,className:"rice-quad rice-quad--big-bets"}),m.jsx("rect",{x:O,y:Ae.top,width:Ae.left+y-O,height:A-Ae.top,className:"rice-quad rice-quad--quick-wins"}),m.jsx("rect",{x:Ae.left,y:A,width:O-Ae.left,height:Ae.top+v-A,className:"rice-quad rice-quad--time-sinks"}),m.jsx("rect",{x:O,y:A,width:Ae.left+y-O,height:Ae.top+v-A,className:"rice-quad rice-quad--fill-ins"}),m.jsx("text",{x:Ae.left+8,y:Ae.top+18,className:"rice-quad-label",children:"Big Bets"}),m.jsx("text",{x:Ae.left+y-8,y:Ae.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),m.jsx("text",{x:Ae.left+8,y:Ae.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),m.jsx("text",{x:Ae.left+y-8,y:Ae.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),m.jsx("line",{x1:O,y1:Ae.top,x2:O,y2:Ae.top+v,className:"rice-quad-divider"}),m.jsx("line",{x1:Ae.left,y1:A,x2:Ae.left+y,y2:A,className:"rice-quad-divider"}),m.jsx("line",{x1:Ae.left,y1:Ae.top+v,x2:Ae.left+y,y2:Ae.top+v,className:"rice-axis"}),m.jsx("line",{x1:Ae.left,y1:Ae.top,x2:Ae.left,y2:Ae.top+v,className:"rice-axis"}),M.map(j=>m.jsxs("g",{children:[m.jsx("line",{x1:T(j),y1:Ae.top+v,x2:T(j),y2:Ae.top+v+4,className:"rice-axis"}),m.jsxs("text",{x:T(j),y:Ae.top+v+18,textAnchor:"middle",className:"rice-tick",children:[j,"w"]})]},`xt-${j}`)),m.jsx("text",{x:Ae.left+y/2,y:Ae.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),F.map(j=>m.jsxs("g",{children:[m.jsx("line",{x1:Ae.left-4,y1:N(j),x2:Ae.left,y2:N(j),className:"rice-axis"}),m.jsx("text",{x:Ae.left-8,y:N(j)+4,textAnchor:"end",className:"rice-tick",children:j})]},`yt-${j}`)),m.jsx("text",{transform:`translate(${Ae.left-44}, ${Ae.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),f.map(j=>{const z=j.rice,U=T(z.effort),V=N(z.impact),I=E(z.reach),G=B(z.confidence),D=Ont[j.status],W=h===j.slug;return m.jsx("circle",{cx:U,cy:V,r:I,fill:`var(${D})`,fillOpacity:G,stroke:"var(--color-bg)",strokeWidth:W?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${j.name}: reach ${z.reach}, impact ${z.impact}, confidence ${z.confidence}, effort ${z.effort} weeks, score ${z.score}`,onClick:()=>e(j),onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&(K.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 ${z.reach} · I ${z.impact} · C ${z.confidence}% · E ${z.effort}w
|
|
475
|
+
Score: ${z.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(ef,{task:j,onClick:()=>e(j),onDragStart:()=>{}},j.slug))})]})]})}function jnt({onClose:r,tasks:e}){const{data:i,isLoading:n}=Jj(),a=kit(),o=wit(),[c,h]=q.useState(""),[u,d]=q.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=(i??[]).filter(v=>v.status==="planning"),y=(i??[]).filter(v=>v.status==="released");return m.jsx("div",{className:"modal-overlay",onClick:r,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:r,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)})]}),(i??[]).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 vA={critical:0,high:1,medium:2,low:3},CA={critical:0,high:1,medium:2,low:3},lD=[{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"}],cD=[{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"}],hD=[{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 Dnt(r,e){return[...r].sort((i,n)=>{var a,o;switch(e){case"updated_at":case"created_at":return n[e].localeCompare(i[e]);case"priority":return(vA[i.priority]??9)-(vA[n.priority]??9);case"urgency":return(CA[i.urgency]??9)-(CA[n.urgency]??9);case"name":return i.name.localeCompare(n.name);case"rice":{const c=((a=i.rice)==null?void 0:a.score)??-1/0;return(((o=n.rice)==null?void 0:o.score)??-1/0)-c}}})}function Fnt(r,e){let i=r;if(e.searchQuery.trim()){const n=e.searchQuery.trim().toLowerCase();i=i.filter(a=>a.name.toLowerCase().includes(n)||a.description.toLowerCase().includes(n))}if(e.statusFilter.length>0&&(i=i.filter(n=>e.statusFilter.includes(n.status))),e.priorityFilter.length>0&&(i=i.filter(n=>e.priorityFilter.includes(n.priority))),e.urgencyFilter.length>0&&(i=i.filter(n=>e.urgencyFilter.includes(n.urgency))),e.tagFilter.length>0&&(i=i.filter(n=>n.tags.some(a=>e.tagFilter.includes(a)))),e.versionFilter.length>0&&(i=i.filter(n=>n.version!==null&&e.versionFilter.includes(n.version))),e.dateFrom||e.dateTo){const n=e.dateField;e.dateFrom&&(i=i.filter(a=>a[n].slice(0,10)>=e.dateFrom)),e.dateTo&&(i=i.filter(a=>a[n].slice(0,10)<=e.dateTo))}if(e.minRice!==null&&e.minRice!==void 0){const n=e.minRice;i=i.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 Dnt(i,e.sortField)}function _A(r){const e=r,i={...tm};for(const a of Object.keys(tm))e[a]!==void 0&&(i[a]=e[a]);const n=["statusFilter","priorityFilter","urgencyFilter","tagFilter","versionFilter"];for(const a of n){const o=e[a];typeof o=="string"?i[a]=o.trim()?[o.trim()]:[]:Array.isArray(o)||(i[a]=[])}return i.viewMode===void 0&&(i.viewMode="kanban"),i.subGroupBy===void 0&&(i.subGroupBy="none"),i.minRice===void 0&&(i.minRice=null),i}function kA(r,e){if(e==="none")return[];switch(e){case"status":return lD.map(i=>({key:i.key,label:i.labelKey,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.status===i.key)})).filter(i=>i.tasks.length>0);case"priority":return cD.map(i=>({key:i.key,label:i.label,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.priority===i.key)})).filter(i=>i.tasks.length>0);case"urgency":return hD.map(i=>({key:i.key,label:i.label,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.urgency===i.key)})).filter(i=>i.tasks.length>0);case"tags":{const i=new Map;for(const n of r)if(n.tags.length===0){const a=i.get("(untagged)")??[];a.push(n),i.set("(untagged)",a)}else for(const a of n.tags){const o=i.get(a)??[];o.push(n),i.set(a,o)}return Array.from(i.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}case"version":{const i=new Map;for(const n of r){const a=n.version??"(no version)",o=i.get(a)??[];o.push(n),i.set(a,o)}return Array.from(i.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}}return[]}function Int(r,e){return r?`dreamcontext:${r}:${e}`:`dreamcontext:${e}`}function $nt(r,e){try{const i=localStorage.getItem(r);return i===null?e:JSON.parse(i)}catch{return e}}function znt(r,e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}}function Pnt(){const{t:r}=Pr(),{projectId:e}=sL(),{data:i,isLoading:n,isError:a,error:o}=mit(),{data:c}=Jj(),h=Zj(),{data:u}=xit(),d=vit(),f=Qj(),[g,x]=q.useState(null),y=(st,kt)=>{kt.preventDefault(),x({x:kt.clientX,y:kt.clientY,task:st})},v=()=>{if(!g)return;const st=g.task;x(null),window.confirm(`Delete task "${st.name}"? This propagates to the remote backend on sync.`)&&f.mutate(st.slug,{onSuccess:()=>{M===st.slug&&F(null)}})},[C,_]=q.useState(null),k=()=>{_(null),d.mutate(void 0,{onSuccess:({report:st})=>{const kt=st.pushed+st.created+st.pulled+st.deleted+st.mirrorDeleted;_(st.skipped==="locked"?"⏳ another sync is already running":st.errors.length>0?`⚠ ${st.errors[0]}`:st.conflicts.length>0?`↕ ${kt} synced · ${st.conflicts.length} conflict(s) preserved`:kt>0?`↕ ${st.pushed+st.created} up · ${st.pulled} down`:"✓ up to date"),setTimeout(()=>_(null),6e3)},onError:st=>{_(`⚠ ${st.message}`),setTimeout(()=>_(null),6e3)}})},T=((u==null?void 0:u.pendingPush)??0)+((u==null?void 0:u.queuedOps)??0),N=u&&u.backend!=="local"?m.jsxs("div",{className:"filter-sync-wrap",children:[C&&m.jsx("span",{className:"filter-sync-note",children:C}),m.jsxs("button",{className:"filter-sync-btn",onClick:k,disabled:d.isPending,title:`Sync with ${u.backend}`,children:[m.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",className:d.isPending?"filter-sync-spin":void 0,children:[m.jsx("path",{d:"M12 7a5 5 0 0 1-9.17 2.75M2 7a5 5 0 0 1 9.17-2.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),m.jsx("path",{d:"M11.5 1.5v3h-3M2.5 12.5v-3h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),d.isPending?"Syncing…":"Sync",T>0&&!d.isPending&&m.jsx("span",{className:"filter-sync-badge",children:T})]})]}):void 0,[E,B]=q.useState(!1),[O,A]=q.useState(!1),[M,F]=q.useState(null),j=q.useMemo(()=>Int(e,"kanban-filters"),[e]),[z,U]=q.useState(()=>{const st=$nt(j,tm);return _A(st)}),V=q.useCallback(st=>{U(kt=>{const it=typeof st=="function"?st(kt):st;return znt(j,it),it})},[j]),I=Nit(e),G=q.useCallback((st,kt)=>{V(it=>({...it,[st]:kt}))},[V]),D=q.useCallback(()=>{V(st=>({...tm,sortField:st.sortField,groupBy:st.groupBy,subGroupBy:st.subGroupBy,viewMode:st.viewMode}))},[V]),W=q.useCallback(st=>{Ait(e,st,{...z})},[z,e]),K=q.useCallback(st=>{V(_A(st.filters))},[V]),tt=q.useCallback(st=>{Mit(e,st)},[e]),nt=q.useMemo(()=>Fnt(i??[],z),[i,z]),Y=q.useMemo(()=>!M||!i?null:i.find(st=>st.slug===M)??null,[M,i]),rt=q.useMemo(()=>{const st=new Set;for(const kt of i??[])for(const it of kt.tags)st.add(it);return Array.from(st).sort()},[i]),ft=q.useMemo(()=>{const st=new Set;for(const kt of i??[])kt.version&&st.add(kt.version);for(const kt of c??[])st.add(kt.version);return Array.from(st).sort()},[i,c]),ct=(st,kt,it)=>{switch(it){case"status":h.mutate({slug:st,updates:{status:kt}});break;case"priority":h.mutate({slug:st,updates:{priority:kt}});break;case"urgency":h.mutate({slug:st,updates:{urgency:kt}});break;case"tags":{const H=(i??[]).find(J=>J.slug===st);H&&!H.tags.includes(kt)&&kt!=="(untagged)"&&h.mutate({slug:st,updates:{tags:[...H.tags,kt]}})}break;case"version":h.mutate({slug:st,updates:{version:kt==="(no version)"?null:kt}});break}};if(n)return m.jsx("div",{className:"loading",children:r("common.loading")});if(a)return m.jsxs("div",{className:"error-state",children:["Failed to load tasks. ",o==null?void 0:o.message]});const xt=()=>{const{groupBy:st,subGroupBy:kt}=z,it=(H,J,vt,At,qt)=>m.jsx(QN,{title:typeof J=="string"&&J.includes(".")?r(J):J,status:H,tasks:At,count:At.length,colorVar:vt,onTaskClick:ie=>F(ie.slug),onTaskContextMenu:y,onDrop:(ie,Dt)=>ct(ie,Dt,st),staggerIndex:qt+1,subGroups:kt!=="none"?kA(At,kt):void 0},H);switch(st){case"status":return lD.map((H,J)=>it(H.key,H.labelKey,H.colorVar,nt.filter(vt=>vt.status===H.key),J));case"priority":return cD.map((H,J)=>it(H.key,H.label,H.colorVar,nt.filter(vt=>vt.priority===H.key),J));case"urgency":return hD.map((H,J)=>it(H.key,H.label,H.colorVar,nt.filter(vt=>vt.urgency===H.key),J));case"tags":{const H=new Map;for(const J of nt)if(J.tags.length===0){const vt=H.get("(untagged)")??[];vt.push(J),H.set("(untagged)",vt)}else for(const vt of J.tags){const At=H.get(vt)??[];At.push(J),H.set(vt,At)}return Array.from(H.entries()).map(([J,vt],At)=>it(J,J,"--color-brand-vivid",vt,At))}case"version":{const H=(c??[]).filter(At=>At.status==="planning").map(At=>At.version),J=(c??[]).filter(At=>At.status==="released").map(At=>At.version),vt=["(no version)",...H,...J];for(const At of nt)At.version&&!vt.includes(At.version)&&vt.push(At.version);return vt.map((At,qt)=>{const ie=nt.filter(Dt=>(Dt.version??"(no version)")===At);return ie.length===0&&At!=="(no version)"?null:it(At,At,"--color-brand-mid",ie,qt)}).filter(Boolean)}case"none":return[m.jsx(QN,{title:"All Tasks",status:"all",tasks:nt,count:nt.length,colorVar:"--color-brand-vivid",onTaskClick:H=>F(H.slug),onTaskContextMenu:y,onDrop:()=>{},subGroups:kt!=="none"?kA(nt,kt):void 0},"all")]}};return m.jsxs("div",{className:"kanban-board",children:[m.jsx(tnt,{filters:z,onFilterChange:G,onClearFilters:D,onCreateClick:()=>B(!0),presets:I,onSavePreset:W,onLoadPreset:K,onDeletePreset:tt,allTags:rt,allVersions:ft,onVersionManagerClick:()=>A(!0),syncSlot:N}),z.viewMode==="eisenhower"?m.jsx(Mnt,{tasks:nt,onTaskClick:st=>F(st.slug),onTaskMove:(st,kt)=>h.mutate({slug:st,updates:kt})}):z.viewMode==="scatter"?m.jsx(Rnt,{tasks:nt,onTaskClick:st=>F(st.slug)}):z.viewMode==="list"?m.jsx("div",{className:"task-list",children:nt.map(st=>m.jsx(ef,{task:st,onClick:()=>F(st.slug),onContextMenu:kt=>y(st,kt),onDragStart:()=>{}},st.slug))}):m.jsx("div",{className:"kanban-columns",children:xt()}),E&&m.jsx(ent,{onClose:()=>B(!1)}),O&&m.jsx(jnt,{onClose:()=>A(!1),tasks:i??[]}),Y&&m.jsx(Ent,{task:Y,onClose:()=>F(null)}),g&&m.jsx("div",{className:"task-ctx-overlay",onClick:()=>x(null),onContextMenu:st=>{st.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:st=>st.stopPropagation(),children:[m.jsx("div",{className:"task-ctx-name",children:g.task.name}),m.jsx("button",{type:"button",className:"task-ctx-item",onClick:()=>{F(g.task.slug),x(null)},children:"Open"}),m.jsx("button",{type:"button",className:"task-ctx-item task-ctx-item--danger",onClick:v,children:"Delete task"})]})})]})}function qnt(){return m.jsx("div",{children:m.jsx(Pnt,{})})}function Unt(){return dr({queryKey:["changelog"],queryFn:()=>ee.get("/changelog")})}const Hnt=25;function wA({entry:r}){const{t:e}=Pr();return m.jsxs("div",{className:"changelog-item",children:[m.jsxs("div",{className:"changelog-meta",children:[m.jsx("span",{className:"task-tag","data-hue":Va(r.type),children:r.type}),r.scope&&m.jsx("span",{className:"changelog-scope",children:r.scope}),r.breaking&&m.jsx("span",{className:"changelog-breaking",children:e("sleep.changelog.breaking")})]}),m.jsx("p",{className:"changelog-summary",children:r.summary}),r.description&&m.jsx("p",{className:"changelog-desc",children:r.description})]})}function Wnt(r){const e=[];for(const i of r){const n=e[e.length-1];n&&n.date===i.date?n.items.push(i):e.push({date:i.date,items:[i]})}return e}function Gnt(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=cL(),{data:o}=Unt();if(i||!e)return m.jsx("div",{className:"loading",children:r("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=oL(e.debt),h=lL(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,Hnt),y=Wnt(x),v=g.length-x.length;return m.jsxs("div",{className:"sleep-page",children:[m.jsx("h1",{className:"page-title",children:r("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:r("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:[r("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:[r("sleep.changelog.pending")," (",f.length,")"]}),m.jsx("div",{className:"changelog-list",children:f.map((C,_)=>m.jsx(wA,{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(wA,{entry:_},`${C.date}-${k}`))})]},C.date)),v>0&&m.jsxs("p",{className:"changelog-more",children:[v," ",r("sleep.changelog.earlier")]})]}),e.sessions.length>0&&m.jsxs("div",{className:"sleep-section",children:[m.jsxs("h2",{className:"sleep-section-title",children:[r("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 Ynt=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 _x(r){const e=r.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return Ynt.has(e)}function Knt(r){const{entities:e,relations:i}=Vnt(r),n=Xnt(r),a=new Set(e.map(f=>f.name.toLowerCase())),o=[...e,...n.filter(f=>!a.has(f.name.toLowerCase()))],c=Znt(o),h=f=>`${f.from}.${f.fromField}->${f.to}.${f.toField}`,u=new Set(i.map(h)),d=[...i,...c.filter(f=>!u.has(h(f)))];return{entities:o,relations:d}}function Vnt(r){const e=[],i=[],n=r.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 F=g.match(/\/\w+\/\{[^}]+\}/);F&&(c=F[0]);continue}const y=x.match(/^CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"']?(\w+)[`"']?\s*\(/i);if(y){d(),a=y[1],o=[],h=!0;continue}if(!h||!a)continue;if(/^\s*\)\s*;/.test(g)){d();continue}if(/^\s*--/.test(g)){const j=g.replace(/^\s*--\s?/,"").trim();if(!j||/^[═─=\-*]{3,}/.test(j))continue;if(j.startsWith(".")){const U=j.match(/^\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(U&&_x(U[2])&&u){const V=U[1],I=U[2].toLowerCase(),D=(U[3]||"").match(/--\s*(.+)$/),W=D?D[1].trim():void 0;o.push({name:`${u}.${V}`,type:I,description:W,isNested:!0,parentField:u})}continue}const z=j.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(z&&_x(z[3])){const U=z[1].replace(/\[\]$/,""),V=z[2],I=z[3].toLowerCase(),D=(z[4]||"").match(/--\s*(.+)$/),W=D?D[1].trim():void 0;u=U,o.push({name:`${U}.${V}`,type:I,description:W,isNested:!0,parentField:U});continue}continue}if(!x)continue;const C=x.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(C))continue;const _=C.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!_)continue;const k=_[1],T=_[2],N=_[3]||"";if(!_x(T))continue;const E=T.toLowerCase(),B=/PRIMARY\s+KEY/i.test(N),O=N.match(/REFERENCES\s+[`"']?(\w+)[`"']?\s*\(\s*[`"']?(\w+)[`"']?\s*\)/i);O&&i.push({from:a,fromField:k,to:O[1],toField:O[2],cardinality:"1:1"});const A=g.match(/--\s*(.+)$/),M=A?A[1].trim():void 0;(E==="jsonb"||E==="json")&&(u=k),o.push({name:k,type:E,isPrimary:B,description:M})}return d(),{entities:e,relations:i}}function Xnt(r){var o,c,h,u,d;const e=[];let i=null,n=!1;const a=r.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)){i&&i.fields.length>0&&e.push(i),i=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){i&&i.fields.length>0&&e.push(i);const _=v[2].trim();i={name:C,path:_,storageType:_.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(i){const C=y.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(C){i.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(i&&n){const C=y.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(C){const{type:k,enumValues:T}=SA(C[2].trim(),(o=C[3])==null?void 0:o.trim());i.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}=SA(_[2].trim(),(h=_[3])==null?void 0:h.trim());i.fields.push({name:_[1],type:k,enumValues:T,description:(u=_[3])==null?void 0:u.trim()});continue}}if(i&&y.startsWith("Body ")&&(i.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])&&(i.notes.push(C[1].trim()),f++)}}}return i&&i.fields.length>0&&e.push(i),e}function SA(r,e){return r.includes("|")?{type:"enum",enumValues:r.split("|").map(n=>n.trim().replace(/^"|"$/g,""))}:r==="[]"?{type:e!=null&&e.includes("string")?"string[]":"array"}:r.startsWith("[")?{type:"array"}:r==="true"||r==="false"?{type:"boolean"}:r==="null"?{type:"nullable"}:/^\d+$/.test(r)?{type:"number"}:/\d{4}-\d{2}-\d{2}/.test(r.replace(/"/g,""))?{type:"date"}:{type:"string"}}function Znt(r){const e=[];for(const i of r)for(const n of i.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=r.find(h=>h.name.toLowerCase().includes(o));if(c&&c.name!==i.name){const h=c.fields.find(u=>u.isPrimary);e.push({from:i.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=i.fields.find(o=>o.isPrimary);e.push({from:i.name,fromField:n.name,to:i.name,toField:a?a.name:"_id",cardinality:"1:1"})}}return e}function b1(r){return r.toLowerCase().replace(/\s+/g,"-")}function TA(r){return r==="enum"?"enum":r==="array"||r.endsWith("[]")||r.startsWith("array")?"array":r==="boolean"?"boolean":r==="nullable"?"nullable":r==="date"||r==="timestamp"?"date":r==="int"||r==="integer"||r==="numeric"||r==="serial"||r==="bigint"||r==="smallint"||r==="real"||r==="float"||r==="double"?"number":r==="jsonb"||r==="json"?"json":"string"}function Qnt(r,e,i){return r.isPrimary?{icon:"PK",cls:"entity-field-icon--key"}:e.some(a=>a.from===i&&a.fromField===r.name)?{icon:"FK",cls:"entity-field-icon--ref"}:null}function Jnt(r,e,i,n){if(n){const C=r.right-i.left,_=r.top+r.height*.35-i.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=r.left+r.width/2-i.left,o=e.left+e.width/2-i.left,c=r.top+r.height/2-i.top,h=e.top+e.height/2-i.top,u=Math.abs(a-o),d=Math.abs(c-h);let f,g,x,y;if(u>d){a<o?(f=r.right-i.left,x=e.left-i.left):(f=r.left-i.left,x=e.right-i.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=r.bottom-i.top,y=e.top-i.top):(g=r.top-i.top,y=e.bottom-i.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 tat({entity:r,relations:e}){const[i,n]=q.useState(new Set),a=r.storageType==="json"?"{ }":r.storageType==="table"?"SQL":"☰",o=r.fields.filter(u=>!u.isNested),c=q.useMemo(()=>{const u=new Map;for(const d of r.fields)if(d.isNested&&d.parentField){const f=u.get(d.parentField)||[];f.push(d),u.set(d.parentField,f)}return u},[r.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":b1(r.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:r.name})]}),m.jsx("span",{className:"entity-card-badge","data-storage":r.storageType,children:r.storageType})]}),r.path&&m.jsx("div",{className:"entity-card-path",title:r.path,children:r.path}),r.managedBy&&m.jsx("div",{className:"entity-card-managed",children:r.managedBy}),m.jsx("div",{className:"entity-fields",children:o.map(u=>{const d=Qnt(u,e,r.name),f=TA(u.type),g=c.get(u.name),x=i.has(u.name);return m.jsxs(q.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=TA(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)})}),r.notes.length>0&&m.jsx("div",{className:"entity-card-notes",children:r.notes.map((u,d)=>m.jsx("div",{className:"entity-card-note",children:u},d))})]})}function eat({relations:r,entities:e}){return r.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:r.map((i,n)=>{var h,u;const a=((h=e.find(d=>d.name===i.from))==null?void 0:h.name)??i.from,o=((u=e.find(d=>d.name===i.to))==null?void 0:u.name)??i.to,c=i.from===i.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}.${i.fromField} ↻ self`:`${a}.${i.fromField} → ${o}.${i.toField}`}),m.jsx("span",{className:"sql-preview-legend-cardinality",children:i.cardinality})]},n)})})]})}function uD({content:r}){const e=q.useRef(null),[i,n]=q.useState([]),[a,o]=q.useState({width:0,height:0}),c=q.useMemo(()=>Knt(r),[r]),h=q.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="${b1(g.from)}"]`),y=u.querySelector(`[data-entity="${b1(g.to)}"]`);if(!x||!y)continue;const v=x.getBoundingClientRect(),C=y.getBoundingClientRect(),{d:_,labelX:k,labelY:T}=Jnt(v,C,d,g.from===g.to);f.push({d:_,labelX:k,labelY:T,label:g.cardinality})}n(f)},[c]);return q.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"})})}),i.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(tat,{entity:u,relations:c.relations},u.name))}),m.jsx(eat,{relations:c.relations,entities:c.entities})]})}const rat={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function x1({type:r}){return m.jsx("span",{className:`json-type-badge ${rat[r]??""}`,children:r})}function v1(){return m.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function iat({data:r}){const[e,i]=q.useState("all"),[n,a]=q.useState(new Set),o=q.useMemo(()=>{const u=e==="all"?r:r.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},[r,e]),c=u=>{a(d=>{const f=new Set(d);return f.has(u)?f.delete(u):f.add(u),f})},h=q.useMemo(()=>{const u={};for(const d of r)u[d.type]=(u[d.type]||0)+1;return u},[r]);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:[r.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:()=>i(f=>f===u?"all":u),children:[m.jsx(x1,{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(x1,{type:f.type}),f.breaking&&m.jsx(v1,{}),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 nat({data:r}){const[e,i]=q.useState(new Set([0])),n=a=>{i(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:[r.length," release",r.length!==1?"s":""]})}),m.jsx("div",{className:"json-releases",children:r.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(v1,{}),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(x1,{type:g.type}),g.breaking&&m.jsx(v1,{}),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 aat({data:r,filename:e}){var a,o,c;if(!Array.isArray(r)||r.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 i=e.toLowerCase().includes("changelog"),n=e.toLowerCase().includes("release");return i&&((a=r[0])!=null&&a.type)&&((o=r[0])!=null&&o.description)?m.jsx(iat,{data:r}):n&&((c=r[0])!=null&&c.version)?m.jsx(nat,{data:r}):m.jsxs("div",{className:"json-preview",children:[m.jsx("div",{className:"json-preview-header",children:m.jsxs("span",{className:"json-preview-total",children:[r.length," items"]})}),m.jsx("div",{className:"json-generic-list",children:r.map((h,u)=>m.jsx("pre",{className:"json-generic-item",children:JSON.stringify(h,null,2)},u))})]})}function sat(r){return r.endsWith(".sql")||r.endsWith(".json")||r.endsWith(".md")}function oat({onNavigateTaxonomy:r}={}){const{t:e}=Pr(),i=Gr(),[n,a]=q.useState(null),[o,c]=q.useState(null),[h,u]=q.useState(!1),[d,f]=q.useState("preview"),{data:g,isLoading:x,isError:y,error:v}=dr({queryKey:["core"],queryFn:()=>ee.get("/core")}),{data:C}=dr({queryKey:["core",n],queryFn:()=>ee.get(`/core/${n}`),enabled:!!n}),_=ni({mutationFn:({filename:B,content:O})=>ee.put(`/core/${B}`,{content:O}),onSuccess:()=>{i.invalidateQueries({queryKey:["core"]}),u(!1)}}),k=()=>{(C==null?void 0:C.content)!==void 0&&(c(C.content),u(!0))},T=()=>{n&&o!==null&&_.mutate({filename:n,content:o})};if(x)return m.jsx("div",{className:"loading",children:e("common.loading")});if(y)return m.jsxs("div",{className:"error-state",children:["Failed to load core files. ",v==null?void 0:v.message]});const N=(g==null?void 0:g.files)??[],E=()=>{if(!n||!C)return null;if(n==="taxonomy.json"&&r)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:r,children:"Open Taxonomy page"})]});if(d==="preview"){if(n.endsWith(".sql")&&C.content)return m.jsx(uD,{content:C.content});if(n.endsWith(".json")&&C.data)return m.jsx(aat,{data:C.data,filename:n});if(n.endsWith(".md")&&C.content)return m.jsx(tf,{content:C.content,frontmatter:C.frontmatter})}return m.jsx("pre",{className:"core-viewer-content",children:C.content??JSON.stringify(C.data,null,2)})};return m.jsxs("div",{className:"core-page",children:[m.jsx("h1",{className:"page-title",children:e("core.title")}),m.jsxs("div",{className:"core-layout",children:[m.jsx("div",{className:"core-list",children:N.map((B,O)=>m.jsxs("button",{className:`core-list-item ${n===B.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(O+1,8)}`,onClick:()=>{a(B.filename),u(!1),f("preview")},children:[m.jsx("span",{className:"core-list-name",children:B.name}),m.jsx("span",{className:"core-list-type",children:B.type})]},B.filename))}),m.jsxs("div",{className:"core-detail",children:[!n&&m.jsx("div",{className:"core-empty",children:"Select a file to view."}),n&&C&&!h&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:C.filename}),m.jsxs("div",{className:"core-viewer-actions",children:[sat(n)&&m.jsxs("div",{className:"core-tabs",children:[m.jsx("button",{className:`core-tab ${d==="file"?"core-tab--active":""}`,onClick:()=>f("file"),children:"File"}),m.jsx("button",{className:`core-tab ${d==="preview"?"core-tab--active":""}`,onClick:()=>f("preview"),children:"Preview"})]}),C.type==="markdown"&&m.jsx("button",{className:"btn btn--ghost",onClick:k,children:"Edit"})]})]}),E()]}),n&&h&&m.jsxs("div",{className:"core-editor",children:[m.jsxs("div",{className:"core-editor-header",children:[m.jsxs("h2",{className:"core-viewer-title",children:["Editing: ",n]}),m.jsxs("div",{className:"core-editor-actions",children:[m.jsx("button",{className:"btn btn--ghost",onClick:()=>u(!1),children:"Cancel"}),m.jsx("button",{className:"btn btn--primary",onClick:T,disabled:_.isPending,children:_.isPending?"Saving...":"Save"})]})]}),m.jsxs("div",{className:"core-editor-split",children:[m.jsx("textarea",{className:"core-editor-textarea",value:o??"",onChange:B=>c(B.target.value)}),m.jsx("pre",{className:"core-editor-preview",children:o})]})]})]})]})]})}function lat(){return dr({queryKey:["knowledge"],queryFn:()=>ee.get("/knowledge"),select:r=>r.entries})}function cat(r){return dr({queryKey:["knowledge",r],queryFn:()=>ee.get(`/knowledge/${r}`),select:e=>e.entry,enabled:!!r})}function hat(){const r=Gr();return ni({mutationFn:({slug:e,pinned:i})=>ee.patch(`/knowledge/${e}`,{pinned:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["knowledge"]})}})}const uat='button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])';function dat({label:r,actions:e,onClose:i,children:n}){const{t:a}=Pr(),o=q.useRef(null),c=q.useRef(i);return q.useEffect(()=>{c.current=i}),q.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(uat);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":r,tabIndex:-1,children:[m.jsxs("div",{className:"fullscreen-overlay-header",children:[m.jsx("h2",{className:"fullscreen-overlay-title",children:r}),m.jsxs("div",{className:"fullscreen-overlay-actions",children:[e,m.jsx("button",{className:"fullscreen-overlay-close",onClick:i,title:a("common.close"),"aria-label":a("common.close"),children:"✕"})]})]}),m.jsx("div",{className:"fullscreen-overlay-body",children:n})]})}var kx={exports:{}},EA;function fat(){return EA||(EA=1,(function(r){var e=(function(){var i=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 i(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(i(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 i(d)})},_compress:function(u,d,f){if(u==null)return"";var g,x,y={},v={},C="",_="",k="",T=2,N=3,E=2,B=[],O=0,A=0,M;for(M=0;M<u.length;M+=1)if(C=u.charAt(M),Object.prototype.hasOwnProperty.call(y,C)||(y[C]=N++,v[C]=!0),_=k+C,Object.prototype.hasOwnProperty.call(y,_))k=_;else{if(Object.prototype.hasOwnProperty.call(v,k)){if(k.charCodeAt(0)<256){for(g=0;g<E;g++)O=O<<1,A==d-1?(A=0,B.push(f(O)),O=0):A++;for(x=k.charCodeAt(0),g=0;g<8;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<E;g++)O=O<<1|x,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,E),E++),delete v[k]}else for(x=y[k],g=0;g<E;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1;T--,T==0&&(T=Math.pow(2,E),E++),y[_]=N++,k=String(C)}if(k!==""){if(Object.prototype.hasOwnProperty.call(v,k)){if(k.charCodeAt(0)<256){for(g=0;g<E;g++)O=O<<1,A==d-1?(A=0,B.push(f(O)),O=0):A++;for(x=k.charCodeAt(0),g=0;g<8;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}else{for(x=1,g=0;g<E;g++)O=O<<1|x,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=0;for(x=k.charCodeAt(0),g=0;g<16;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1}T--,T==0&&(T=Math.pow(2,E),E++),delete v[k]}else for(x=y[k],g=0;g<E;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1;T--,T==0&&(T=Math.pow(2,E),E++)}for(x=2,g=0;g<E;g++)O=O<<1|x&1,A==d-1?(A=0,B.push(f(O)),O=0):A++,x=x>>1;for(;;)if(O=O<<1,A==d-1){B.push(f(O));break}else A++;return B.join("")},decompress:function(u){return u==null?"":u==""?null:h._decompress(u.length,32768,function(d){return u.charCodeAt(d)})},_decompress:function(u,d,f){var g=[],x=4,y=4,v=3,C="",_=[],k,T,N,E,B,O,A,M={val:f(0),position:d,index:1};for(k=0;k<3;k+=1)g[k]=k;for(N=0,B=Math.pow(2,2),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;switch(N){case 0:for(N=0,B=Math.pow(2,8),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;A=i(N);break;case 1:for(N=0,B=Math.pow(2,16),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;A=i(N);break;case 2:return""}for(g[3]=A,T=A,_.push(A);;){if(M.index>u)return"";for(N=0,B=Math.pow(2,v),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;switch(A=N){case 0:for(N=0,B=Math.pow(2,8),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;g[y++]=i(N),A=y-1,x--;break;case 1:for(N=0,B=Math.pow(2,16),O=1;O!=B;)E=M.val&M.position,M.position>>=1,M.position==0&&(M.position=d,M.val=f(M.index++)),N|=(E>0?1:0)*O,O<<=1;g[y++]=i(N),A=y-1,x--;break;case 2:return _.join("")}if(x==0&&(x=Math.pow(2,v),v++),g[A])C=g[A];else if(A===y)C=T+T.charAt(0);else return null;_.push(C),g[y++]=T+C.charAt(0),x--,T=C,x==0&&(x=Math.pow(2,v),v++)}}};return h})();r!=null?r.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})})(kx)),kx.exports}var pat=fat();const gat=/##\s*Drawing\s*```(compressed-json|json)\s*([\s\S]*?)```/;function mat(r){const e=r.match(gat);if(!e)return null;const[,i,n]=e;let a;if(i==="compressed-json"){const o=pat.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 dD(r){return r.endsWith(".excalidraw")}function yat({content:r}){const e=q.useRef(null),{resolved:i}=Gd(),[n,a]=q.useState(null);return q.useEffect(()=>{const o=e.current;if(!o)return;let c=!1,h=null,u=null;const d=mat(r);if(!d){a("Could not read the Excalidraw drawing in this file.");return}return a(null),(async()=>{try{const{exportToSvg:f}=await De(async()=>{const{exportToSvg:_}=await import("./percentages-BXMCSKIN-Cghe4Ak9.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:i==="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=oD(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 N=(_.width-x*T)/2,E=(_.height-y*T)/2;v.moveTo(N,E)}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=""}},[r,i]),n?m.jsx("div",{className:"excalidraw-error",children:n}):m.jsx("div",{className:"excalidraw-preview","data-theme":i,children:m.jsx("div",{ref:e,className:"excalidraw-stage"})})}const bat=/```sql\s*\n([\s\S]*?)```/i;function xat(r,e){if(!r.startsWith("data-structures/"))return null;const i=e.match(bat);return i?i[1]:null}function vat(r){return r.split(/[-_]/).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(" ")}function Cat(r,e){if(!e)return r.name;if(dD(r.slug)){const i=r.slug.lastIndexOf("/");return i>=0?r.slug.slice(i+1):r.slug}return r.name.startsWith(`${e}/`)?r.name.slice(e.length+1):r.name}function _at(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=lat(),o=hat(),[c,h]=q.useState(""),[u,d]=q.useState(null),[f,g]=q.useState("preview"),[x,y]=q.useState(new Set),[v,C]=q.useState(!1),{data:_}=cat(u??""),k=q.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const j=c.toLowerCase();return e.filter(z=>z.name.toLowerCase().includes(j)||z.description.toLowerCase().includes(j)||z.tags.some(U=>U.toLowerCase().includes(j)))},[e,c]),{rootEntries:T,folders:N}=q.useMemo(()=>{const j=[],z=new Map;for(const V of k){const I=V.slug.indexOf("/");if(I===-1){j.push(V);continue}const G=V.slug.slice(0,I),D=z.get(G);D?D.push(V):z.set(G,[V])}const U=[...z.entries()].sort((V,I)=>V[0].localeCompare(I[0])).map(([V,I])=>({folder:V,label:vat(V),entries:I}));return{rootEntries:j,folders:U}},[k]),E=c.trim().length>0,B=j=>E||x.has(j),O=j=>{y(z=>{const U=new Set(z);return U.has(j)?U.delete(j):U.add(j),U})},A=(j,z=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,z)}),m.jsx("button",{className:`pin-btn ${j.pinned?"pin-btn--active":""}`,onClick:U=>{U.stopPropagation(),o.mutate({slug:j.slug,pinned:!j.pinned})},title:j.pinned?r("knowledge.unpin"):r("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(U=>m.jsx("span",{className:"task-tag","data-hue":Va(U),children:U},U))})]},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"})]}),F=j=>{if(f==="preview"&&j.content){if(dD(j.slug))return m.jsx(yat,{content:j.content});const z=xat(j.slug,j.content);return z?m.jsx(uD,{content:z}):m.jsx(tf,{content:j.content})}return m.jsx("pre",{className:"core-viewer-content",children:j.content})};return i?m.jsx("div",{className:"loading",children:r("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:r("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:r("common.empty")}),N.map(j=>m.jsxs("div",{className:"knowledge-folder",children:[m.jsxs("button",{className:"knowledge-folder-header",onClick:()=>O(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(z=>A(z,j.folder))})]},j.folder)),T.map(j=>A(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:r("knowledge.fullscreen"),"aria-label":r("knowledge.fullscreen"),children:"⛶"})]})]}),v?m.jsx(dat,{label:_.name,actions:M(),onClose:()=>C(!1),children:F(_)}):F(_)]})]})]})]})}function kat(){const{t:r}=Pr(),[e,i]=q.useState(null),[n,a]=q.useState("preview"),[o,c]=q.useState(""),{data:h,isLoading:u,isError:d,error:f}=dr({queryKey:["features"],queryFn:()=>ee.get("/features")}),g=(h==null?void 0:h.features)??[],x=q.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}=dr({queryKey:["features",e],queryFn:()=>ee.get(`/features/${e}`),enabled:!!e,select:v=>v.feature});return u?m.jsx("div",{className:"loading",children:r("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:r("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:r("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:()=>{i(v.slug),a("preview")},children:[m.jsxs("div",{className:"feature-card-header",children:[m.jsx("span",{className:"feature-card-name",children:v.slug}),m.jsxs("div",{className:"feature-card-badges",children:[((_=v.freshness)==null?void 0:_.level)==="stale"&&m.jsx("span",{className:"feature-freshness feature-freshness--stale",children:"stale"}),m.jsx("span",{className:`feature-status feature-status--${v.status}`,children:v.status})]})]}),m.jsx("div",{className:"knowledge-card-tags",children:v.tags.map(k=>m.jsx("span",{className:"task-tag","data-hue":Va(k),children:k},k))})]},v.slug)})]}),m.jsxs("div",{className:"features-detail",children:[!e&&m.jsx("div",{className:"core-empty",children:"Select a feature to view."}),e&&y&&m.jsxs("div",{className:"core-viewer",children:[m.jsxs("div",{className:"core-viewer-header",children:[m.jsx("h2",{className:"core-viewer-title",children:y.slug}),m.jsx("div",{className:"core-viewer-actions",children:m.jsxs("div",{className:"core-tabs",children:[m.jsx("button",{className:`core-tab ${n==="file"?"core-tab--active":""}`,onClick:()=>a("file"),children:"File"}),m.jsx("button",{className:`core-tab ${n==="preview"?"core-tab--active":""}`,onClick:()=>a("preview"),children:"Preview"})]})})]}),m.jsxs("div",{className:"feature-meta",children:[m.jsxs("span",{children:["Status: ",y.status]}),m.jsxs("span",{children:["Created: ",y.created]}),m.jsxs("span",{children:["Updated: ",y.updated]})]}),y.related_tasks.length>0&&m.jsxs("div",{className:"feature-tasks",children:["Related tasks: ",y.related_tasks.join(", ")]}),n==="preview"&&y.content?m.jsx(tf,{content:y.content}):m.jsx("div",{className:"feature-viewer",children:y.sections.map(v=>m.jsxs("div",{className:"feature-section",children:[m.jsx("h3",{className:"feature-section-title",children:v}),m.jsx("pre",{className:"feature-section-content",children:y.sectionContents[v]||"(empty)"})]},v))})]})]})]})]})}function wat(){return dr({queryKey:["graph"],queryFn:()=>ee.get("/graph"),staleTime:3e4})}const wx="dreamcontext:";function Sat(r,e){const{projectId:i}=sL(),n=i?`${wx}${i}:${r}`:`${wx}${r}`,[a,o]=q.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(i){const u=`${wx}${r}`,d=localStorage.getItem(u);if(d!==null)return localStorage.setItem(n,d),localStorage.removeItem(u),JSON.parse(d)}}catch{}return e}),c=q.useCallback(h=>{o(u=>{const d=typeof h=="function"?h(u):h;try{localStorage.setItem(n,JSON.stringify(d))}catch{}return d})},[n]);return[a,c]}const Pc={filters:{search:"",showTags:!0,showOrphans:!0,showAttachments:!1,existingFilesOnly:!1},groups:[],display:{view:"2d",arrows:!1,textFadeThreshold:.85,nodeSize:.5,linkThickness:.5},forces:{centerStrength:.7,repelStrength:.35,linkStrength:.9,linkDistance:.35}};function Tat(r){return{centerStrength:.05+r.centerStrength*.45,repelStrength:-(30+r.repelStrength*240),linkStrength:.1+r.linkStrength*1.2,linkDistance:20+r.linkDistance*180}}function Eat(r){return{filters:{...Pc.filters,...r.filters},groups:Array.isArray(r.groups)?r.groups:Pc.groups,display:{...Pc.display,...r.display},forces:{...Pc.forces,...r.forces}}}function Nat(){const[r,e]=Sat("brain:settings:v1",Pc),i=q.useRef(!1);q.useEffect(()=>{if(i.current)return;let d=!1;return ee.get("/brain-settings").then(f=>{if(d)return;i.current=!0;const g=f.settings;g&&typeof g=="object"&&Object.keys(g).length>0&&e(Eat(g))}).catch(()=>{i.current=!0}),()=>{d=!0}},[e]);const n=q.useRef(null),a=q.useCallback(d=>{i.current&&(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{ee.put("/brain-settings",{settings:d}).catch(()=>{})},600))},[]),o=q.useCallback(d=>{e(f=>{const g=d(f);return a(g),g})},[e,a]),c=q.useCallback((d,f)=>{o(g=>({...g,[d]:{...g[d],...f}}))},[o]),h=q.useCallback(d=>{o(f=>({...f,groups:d}))},[o]),u=q.useCallback(()=>{o(()=>Pc)},[o]);return{settings:r,patch:c,setGroups:h,reset:u}}function Aat(r){const e=[];let i=0;for(;i<r.length;){const n=r[i];if(/\s/.test(n)){i++;continue}if(n==="("){e.push({type:"LPAREN"}),i++;continue}if(n===")"){e.push({type:"RPAREN"}),i++;continue}if(n==="-"&&i+1<r.length&&!/\s/.test(r[i+1])){e.push({type:"NOT"}),i++;continue}if(n==='"'){let h=i+1,u="";for(;h<r.length&&r[h]!=='"';)r[h]==="\\"&&h+1<r.length?(u+=r[h+1],h+=2):(u+=r[h],h++);e.push({type:"PHRASE",value:u}),i=h+1;continue}if(n==="/"){let h=i+1,u="";for(;h<r.length&&r[h]!=="/";)r[h]==="\\"&&h+1<r.length?(u+=r[h]+r[h+1],h+=2):(u+=r[h],h++);if(h<r.length){e.push({type:"REGEX",value:u}),i=h+1;continue}}let a=i;for(;a<r.length&&!/[\s()]/.test(r[a])&&r[a]!=='"';)a++;const o=r.slice(i,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}),i=a}return e}class Mat{constructor(e){pe(this,"pos",0);this.tokens=e}parse(){return this.parseOr()}parseOr(){var i;let e=this.parseAnd();for(;((i=this.peek())==null?void 0:i.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 i,n;const e=[];for(;this.pos<this.tokens.length&&((i=this.peek())==null?void 0:i.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 i=!1;e.type==="NOT"&&(i=!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++,i?fD(o):o}if(n.type==="WORD")return this.pos++,{type:"word",value:n.value.toLowerCase(),negated:i};if(n.type==="PHRASE")return this.pos++,{type:"phrase",value:n.value.toLowerCase(),negated:i};if(n.type==="REGEX"){this.pos++;try{return{type:"regex",value:new RegExp(n.value,"i"),negated:i}}catch{return null}}return n.type==="OP"?(this.pos++,{type:"op",op:n.value,arg:n.arg.toLowerCase(),negated:i}):(this.pos++,null)}peek(){return this.tokens[this.pos]}}function fD(r){return r.type==="and"||r.type==="or"?{...r,children:r.children.map(fD)}:{...r,negated:!r.negated}}function NA(r){const e=r.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const i=Aat(e),n=new Mat(i).parse();return{match:a=>C1(n,a),raw:e,isEmpty:!1}}function C1(r,e){switch(r.type){case"and":return r.children.every(i=>C1(i,e));case"or":return r.children.some(i=>C1(i,e));case"word":return $p(AA(e,r.value),r.negated);case"phrase":return $p(AA(e,r.value),r.negated);case"regex":return $p(Bat(e,r.value),r.negated);case"op":return $p(Lat(e,r.op,r.arg),r.negated)}}function $p(r,e){return e?!r:r}function pD(r){return[r.label,r.path,r.id,r.meta.description??"",...r.meta.tags??[]].join(" ").toLowerCase()}function AA(r,e){return pD(r).includes(e)}function Bat(r,e){return e.test(pD(r))}function Lat(r,e,i){var a;const n=i.toLowerCase();switch(e){case"path":return r.path.toLowerCase().includes(n);case"file":return(((a=r.path.split("/").pop())==null?void 0:a.toLowerCase())??r.label.toLowerCase()).includes(n);case"tag":{const o=n.replace(/^#/,"");return(r.meta.tags??[]).some(c=>c.toLowerCase()===o)||r.group==="tag"&&r.label.toLowerCase().replace(/^#/,"")===o}case"content":return(r.meta.description??"").toLowerCase().includes(n);default:return!1}}const zp={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},Sx=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function Oat({settings:r,patch:e,setGroups:i,reset:n,onClose:a}){const[o,c]=q.useState({filters:!0,groups:!0,display:!0,forces:!0}),h=u=>c(d=>({...d,[u]:!d[u]}));return m.jsxs("aside",{className:"brain-settings",children:[m.jsxs("div",{className:"brain-settings-header",children:[m.jsx("span",{className:"brain-settings-title",children:"Graph settings"}),m.jsxs("div",{className:"brain-settings-header-actions",children:[m.jsx("button",{className:"brain-settings-mini-btn",onClick:n,title:"Restore default settings",children:"↻"}),m.jsx("button",{className:"brain-settings-mini-btn",onClick:a,title:"Close",children:"×"})]})]}),m.jsxs("div",{className:"brain-settings-body",children:[m.jsxs(Pp,{label:zp.filters,open:o.filters,onToggle:()=>h("filters"),children:[m.jsx("label",{className:"brain-settings-label",children:"Search files"}),m.jsx("input",{type:"search",className:"brain-settings-input",placeholder:"Search…",value:r.filters.search,onChange:u=>e("filters",{search:u.target.value})}),m.jsxs("p",{className:"brain-settings-hint",children:["Operators: ",m.jsx("code",{children:"tag:"})," ",m.jsx("code",{children:"path:"})," ",m.jsx("code",{children:"file:"})," ",m.jsx("code",{children:"-not"})," ",m.jsx("code",{children:"OR"})," ",m.jsx("code",{children:'"phrase"'})," ",m.jsx("code",{children:"/regex/"})]}),m.jsx(Uu,{label:"Tags",checked:r.filters.showTags,onChange:u=>e("filters",{showTags:u})}),m.jsx(Uu,{label:"Attachments",checked:r.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),m.jsx(Uu,{label:"Existing files only",checked:r.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),m.jsx(Uu,{label:"Orphans",checked:r.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),m.jsx(Pp,{label:zp.groups,open:o.groups,onToggle:()=>h("groups"),children:m.jsx(jat,{groups:r.groups,onChange:i})}),m.jsxs(Pp,{label:zp.display,open:o.display,onToggle:()=>h("display"),children:[m.jsx(Rat,{label:"View",value:r.display.view==="3d"?"3d":"2d",options:[{value:"2d",label:"2D"},{value:"3d",label:"3D"}],onChange:u=>e("display",{view:u})}),m.jsx(Uu,{label:"Arrows",checked:r.display.arrows,onChange:u=>e("display",{arrows:u})}),m.jsx(ul,{label:"Text fade threshold",value:r.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),m.jsx(ul,{label:"Node size",value:r.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),m.jsx(ul,{label:"Link thickness",value:r.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),m.jsxs(Pp,{label:zp.forces,open:o.forces,onToggle:()=>h("forces"),children:[m.jsx(ul,{label:"Center force",value:r.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),m.jsx(ul,{label:"Repel force",value:r.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),m.jsx(ul,{label:"Link force",value:r.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),m.jsx(ul,{label:"Link distance",value:r.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Pp({label:r,open:e,onToggle:i,children:n}){return m.jsxs("div",{className:`brain-section ${e?"brain-section--open":""}`,children:[m.jsxs("button",{className:"brain-section-header",onClick:i,type:"button",children:[m.jsx("span",{className:"brain-section-caret",children:e?"▾":"▸"}),m.jsx("span",{children:r})]}),e&&m.jsx("div",{className:"brain-section-body",children:n})]})}function Uu({label:r,checked:e,onChange:i}){return m.jsxs("label",{className:"brain-toggle-row",children:[m.jsx("span",{children:r}),m.jsx("span",{className:`brain-toggle ${e?"brain-toggle--on":""}`,onClick:()=>i(!e),children:m.jsx("span",{className:"brain-toggle-knob"})})]})}function Rat({label:r,value:e,options:i,onChange:n}){return m.jsxs("div",{className:"brain-segmented-row",children:[m.jsx("span",{className:"brain-segmented-label",children:r}),m.jsx("div",{className:"brain-segmented",role:"tablist",children:i.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:r,value:e,onChange:i}){return m.jsxs("label",{className:"brain-slider-row",children:[m.jsx("span",{className:"brain-slider-label-text",children:r}),m.jsx("input",{type:"range",min:0,max:1,step:.01,value:e,onChange:n=>i(parseFloat(n.target.value))})]})}function jat({groups:r,onChange:e}){const[i,n]=q.useState(""),[a,o]=q.useState(null),c=()=>{const d=i.trim();if(!d)return;const f=`grp_${Math.random().toString(36).slice(2,8)}`;e([...r,{id:f,query:d,color:Sx[r.length%Sx.length]}]),n("")},h=(d,f)=>{e(r.map(g=>g.id===d?{...g,...f}:g))},u=d=>e(r.filter(f=>f.id!==d));return m.jsxs(m.Fragment,{children:[r.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:r.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:Sx.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:i,onChange:d=>n(d.target.value),onKeyDown:d=>{d.key==="Enter"&&c()}}),m.jsx("button",{className:"brain-settings-btn",onClick:c,disabled:!i.trim(),children:"New group"})]})]})}function Dat(r){return dr({queryKey:["graph","content",(r==null?void 0:r.path)??null],queryFn:()=>{if(!r||!r.path)throw new Error("No path for node");return ee.get(`/graph/content?path=${encodeURIComponent(r.path)}`)},enabled:!!(r&&r.path),staleTime:3e4})}const MA={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Fat={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},Iat={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function $at(r){return r==="task"?"tasks":r==="feature"?"features":r==="knowledge"?"knowledge":r==="soul"||r==="user"||r==="memory"||r==="core"?"core":null}function zat({node:r,onClose:e,onSelectRelated:i,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(r!=null&&r.path),u=Dat(h?r:null);if(!r)return m.jsx("aside",{className:"brain-drawer"});const d=$at(r.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:MA[r.group]}}),Fat[r.group]]}),m.jsx("h2",{className:"brain-drawer-title",children:r.label}),r.path&&m.jsx("span",{className:"brain-drawer-id",children:r.path})]}),m.jsxs("div",{className:"brain-drawer-body",children:[h&&u.isLoading&&m.jsx("p",{className:"brain-description",children:"Loading…"}),h&&u.error&&m.jsxs("p",{className:"brain-description",children:["Failed to load file: ",String(u.error)]}),(f==null?void 0:f.type)==="markdown"&&m.jsx(tf,{content:f.content,frontmatter:f.frontmatter}),(f==null?void 0:f.type)==="json"&&m.jsx("pre",{className:"brain-codeblock",children:f.data!==void 0?JSON.stringify(f.data,null,2):f.raw??"(empty)"}),(f==null?void 0:f.type)==="text"&&m.jsx("pre",{className:"brain-codeblock",children:f.content}),!h&&r.group==="tag"&&m.jsxs("p",{className:"brain-description",children:["Tag ",m.jsxs("code",{children:["#",r.label.replace(/^#/,"")]})," — ",n.length," ",n.length===1?"file":"files"," reference this tag."]}),!h&&r.group!=="tag"&&m.jsx("p",{className:"brain-description",children:r.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:()=>i(g.id),children:[m.jsx("span",{className:"brain-related-dot",style:{background:MA[g.group]}}),m.jsx("span",{children:g.label}),m.jsx("span",{className:"brain-related-kind",children:Iat[x]??x})]},`${g.id}-${x}`))})]})]}),d&&c&&m.jsx("div",{className:"brain-drawer-footer",children:m.jsxs("button",{className:"brain-btn",onClick:()=>c(d,r.id),children:["Open in ",d.charAt(0).toUpperCase()+d.slice(1)," to edit →"]})})]})}const Pat=q.lazy(()=>De(()=>import("./BrainCanvas3D-CAB2im2F.js"),__vite__mapDeps([54,53])).then(r=>({default:r.BrainCanvas3D}))),qat={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Uat={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function BA(r){return typeof r=="string"?r:r.id}function gD(r){const e=r.group==="soul"?8:r.group==="user"||r.group==="memory"?6:r.group==="tag"?3:4,i=r.__inDegree??0;return e+Math.min(14,i*1.2)}function LA(r,e){return Math.sqrt(gD(r)*e)*3}function Hat(r,e,i){for(const{group:n,parsed:a}of e)if(a.match(r))return n.color;return i[r.group]}function Wat({onNavigate:r}){const{data:e,isLoading:i,error:n}=wat(),a=Gr(),{settings:o,patch:c,setGroups:h,reset:u}=Nat(),{resolved:d}=Gd(),f=d==="dark",g=f?qat:Uat,x=q.useRef(null),y=q.useRef(void 0),[v,C]=q.useState({w:0,h:0}),[_,k]=q.useState(null),[T,N]=q.useState(null),[E,B]=q.useState(!0),O=q.useRef(!1);q.useEffect(()=>{if(!x.current)return;const it=x.current,H=()=>C({w:it.clientWidth,h:it.clientHeight});H();const J=new ResizeObserver(H);return J.observe(it),()=>J.disconnect()},[]);const A=q.useMemo(()=>NA(o.filters.search),[o.filters.search]),M=q.useMemo(()=>o.groups.map(it=>({group:it,parsed:NA(it.query)})).filter(({parsed:it})=>!it.isEmpty),[o.groups]),{filteredData:F,neighborsById:j,totalDegreeById:z,inDegreeById:U}=q.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const it=new Map,H=new Map;for(const Dt of e.nodes)it.set(Dt.id,0),H.set(Dt.id,0);for(const Dt of e.links){const Ht=typeof Dt.source=="string"?Dt.source:Dt.source.id,Fe=typeof Dt.target=="string"?Dt.target:Dt.target.id;it.set(Fe,(it.get(Fe)??0)+1),H.set(Ht,(H.get(Ht)??0)+1),H.set(Fe,(H.get(Fe)??0)+1)}const J=Dt=>(H.get(Dt)??0)===0,vt=[],At=new Set;for(const Dt of e.nodes){if(!o.filters.showTags&&Dt.group==="tag"||!o.filters.showOrphans&&J(Dt.id)||!A.isEmpty&&!A.match(Dt))continue;const Ht={...Dt};Ht.__inDegree=it.get(Dt.id)??0,Ht.__totalDegree=H.get(Dt.id)??0,Ht.__color=Hat(Dt,M,g),vt.push(Ht),At.add(Dt.id)}const qt=[],ie=new Map;for(const Dt of vt)ie.set(Dt.id,new Set);for(const Dt of e.links){const Ht=typeof Dt.source=="string"?Dt.source:Dt.source.id,Fe=typeof Dt.target=="string"?Dt.target:Dt.target.id;!At.has(Ht)||!At.has(Fe)||(qt.push({source:Ht,target:Fe,kind:Dt.kind}),ie.get(Ht).add(Fe),ie.get(Fe).add(Ht))}return{filteredData:{nodes:vt,links:qt},neighborsById:ie,totalDegreeById:H,inDegreeById:it}},[e,o.filters,A,M]),V=q.useMemo(()=>Tat(o.forces),[o.forces]),I=.4+o.display.nodeSize*2.2;q.useEffect(()=>{var At,qt,ie,Dt,Ht,Fe,Zt,ht,ot;const it=y.current;if(!it)return;const H=(At=it.d3Force)==null?void 0:At.call(it,"charge");H!=null&&H.strength&&H.strength(V.repelStrength),H!=null&&H.distanceMax&&H.distanceMax(420);const J=(qt=it.d3Force)==null?void 0:qt.call(it,"link");J&&((ie=J.strength)==null||ie.call(J,V.linkStrength),(Dt=J.distance)==null||Dt.call(J,V.linkDistance));const vt=(Ht=it.d3Force)==null?void 0:Ht.call(it,"center");vt!=null&&vt.strength&&vt.strength(V.centerStrength),(Fe=it.d3Force)==null||Fe.call(it,"collide",mH().radius(Lt=>LA(Lt,I)+4).strength(.9).iterations(2)),(Zt=it.d3Force)==null||Zt.call(it,"x",AH(0).strength(V.centerStrength*.4)),(ht=it.d3Force)==null||ht.call(it,"y",MH(0).strength(V.centerStrength*.4)),(ot=it.d3ReheatSimulation)==null||ot.call(it)},[V,I,F]),q.useEffect(()=>{O.current=!1},[e==null?void 0:e.nodes.length]),q.useEffect(()=>{if(!e||!F.nodes.length)return;const it=[];return[800,1600,2600].forEach(H=>{it.push(setTimeout(()=>{var vt;if(O.current)return;const J=y.current;J&&((vt=J.zoomToFit)==null||vt.call(J,500,80),H>=2600&&(O.current=!0))},H))}),()=>it.forEach(clearTimeout)},[e,F.nodes.length]);const G=q.useMemo(()=>F.nodes.find(it=>it.id===_)??null,[F,_]),D=q.useMemo(()=>{if(!G||!e)return[];const it=[],H=new Map(e.nodes.map(J=>[J.id,J]));for(const J of e.links){const vt=typeof J.source=="string"?J.source:J.source.id,At=typeof J.target=="string"?J.target:J.target.id;if(vt===G.id){const qt=H.get(At);qt&&it.push({node:qt,kind:J.kind})}else if(At===G.id){const qt=H.get(vt);qt&&it.push({node:qt,kind:J.kind})}}return it},[e,G]),W=it=>{k(it.id);const H=y.current;H&&typeof it.x=="number"&&typeof it.y=="number"&&(H.centerAt(it.x,it.y,400),H.zoom(Math.max(H.zoom(),2.2),400))},K=()=>a.invalidateQueries({queryKey:["graph"]});q.useEffect(()=>{const it=H=>{var At;if((At=H.target)!=null&&At.matches("input,textarea"))return;const J=y.current;if(!J)return;const vt=J.zoom();if(H.key==="+"||H.key==="=")J.zoom(vt*1.2,200);else if(H.key==="-"||H.key==="_")J.zoom(vt/1.2,200);else if(H.key.startsWith("Arrow")){const qt=H.shiftKey?120:40,ie=J.centerAt();let Dt=0,Ht=0;H.key==="ArrowUp"?Ht=-qt:H.key==="ArrowDown"?Ht=qt:H.key==="ArrowLeft"?Dt=-qt:H.key==="ArrowRight"&&(Dt=qt),J.centerAt(((ie==null?void 0:ie.x)??0)+Dt/vt,((ie==null?void 0:ie.y)??0)+Ht/vt,150)}};return window.addEventListener("keydown",it),()=>window.removeEventListener("keydown",it)},[]);const tt=T??_,nt=tt?j.get(tt)??new Set:null,Y=it=>!tt||it===tt?!1:!(nt!=null&&nt.has(it)),rt=it=>{const H=it.__color??g[it.group];return Y(it.id)?Gat(H,f?.18:.3):H},ft=it=>{const H=BA(it.source),J=BA(it.target);return tt?H===tt||J===tt?f?"rgba(220, 225, 240, 0.85)":"rgba(30, 35, 50, 0.85)":f?"rgba(140, 150, 170, 0.07)":"rgba(60, 65, 80, 0.06)":f?"rgba(140, 150, 170, 0.35)":"rgba(60, 65, 80, 0.28)"},ct=.5+o.display.linkThickness*2.5,xt=it=>it.kind==="sibling_core"||it.kind==="release_includes"?ct*1.3:ct,st=it=>gD(it)*I,kt=(1-o.display.textFadeThreshold)*.8;return m.jsxs("div",{className:"brain-page",children:[m.jsxs("header",{className:"brain-header",children:[m.jsxs("h1",{className:"brain-title",children:[m.jsx("span",{className:"brain-title-mark",children:"◉"}),"Brain"]}),e&&m.jsxs("span",{className:"brain-stats",children:[F.nodes.length,"/",e.nodes.length," nodes · ",F.links.length," links"]}),m.jsxs("div",{className:"brain-header-actions",children:[m.jsx("button",{className:"brain-btn",onClick:K,title:"Refresh",children:"↻"}),m.jsx("button",{className:`brain-btn ${E?"brain-btn--active":""}`,onClick:()=>B(it=>!it),title:"Graph settings",children:"⚙"})]})]}),m.jsxs("div",{className:"brain-canvas-wrap",ref:x,onPointerLeave:()=>N(null),onPointerDown:()=>N(null),children:[E&&m.jsx(Oat,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>B(!1)}),i&&m.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&m.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&F.nodes.length===0&&!i&&m.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&F.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&m.jsx(pm,{ref:y,graphData:F,width:v.w,height:v.h,backgroundColor:f?"#151518":"#ffffff",nodeId:"id",nodeLabel:it=>it.label,nodeColor:it=>rt(it),nodeVal:it=>st(it),nodeRelSize:3,linkColor:it=>ft(it),linkWidth:it=>xt(it),linkDirectionalArrowLength:it=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>f?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:it=>W(it),onNodeHover:it=>N(it?it.id:null),onNodeDrag:()=>N(null),onZoom:()=>N(null),onBackgroundClick:()=>{k(null),N(null)},onEngineStop:()=>{var H;if(O.current)return;const it=y.current;it&&((H=it.zoomToFit)==null||H.call(it,600,80),O.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(it,H,J)=>{if(!(it.id===T||it.id===_||tt&&(nt==null?void 0:nt.has(it.id)))&&J<kt)return;const At=it.label,qt=Math.max(10,13/Math.max(J,.7));H.font=`${qt}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,H.textAlign="center",H.textBaseline="top";const ie=LA(it,I),Dt=(it.y??0)+ie+3,Ht=Y(it.id);f?H.fillStyle=Ht?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":H.fillStyle=Ht?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",H.fillText(At,it.x??0,Dt)}}),e&&F.nodes.length>0&&v.w>0&&o.display.view==="3d"&&m.jsx(q.Suspense,{fallback:m.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:m.jsx(Pat,{graphData:F,width:v.w,height:v.h,isDark:f,nodeColor:rt,nodeVal:st,linkColor:ft,linkWidth:xt,showArrows:o.display.arrows,forces:V,nodeSizeScale:I,isDimmed:Y,neighborsById:j,onNodeClick:W,onNodeHover:it=>N(it?it.id:null),onBackgroundClick:()=>{k(null),N(null)}})}),m.jsx(zat,{node:G,onClose:()=>k(null),onSelectRelated:it=>k(it),relatedNodes:D,inDegree:G?U.get(G.id)??0:0,totalDegree:G?z.get(G.id)??0:0,onNavigate:r})]})]})}function Gat(r,e){const i=r.replace("#",""),n=parseInt(i,16),a=n>>16&255,o=n>>8&255,c=n&255;return`rgba(${a}, ${o}, ${c}, ${e})`}function Yat(){return dr({queryKey:["council"],queryFn:()=>ee.get("/council"),select:r=>r.debates})}function Kat(r){return dr({queryKey:["council",r],queryFn:()=>ee.get(`/council/${r}`),select:e=>e.debate,enabled:!!r})}function mD(r){if(!r)return null;const e=r.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 Vat(r){if(!r)return"other";const e=r.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 yD(r,e){return r.rounds.find(i=>i.round===e)??null}function bD(r){if(!r.reactions)return 0;const e=(r.reactions.match(/\*\*[a-z][a-z0-9-]+\*\*/g)??[]).length;return e>0?e:(r.reactions.match(/^####\s+/gm)??[]).length}function Xat(r,e){if(!r.reactions)return[];const i=new Set(e),n=[],a=/\*\*([a-z][a-z0-9-]+)\*\*/g;let o;for(;(o=a.exec(r.reactions))!==null;)i.has(o[1])&&!n.includes(o[1])&&n.push(o[1]);return n}function Zat(r){return r.openQuestions?(r.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function Qat(r){const e=r.frontmatter.rounds_planned||r.personas.reduce((c,h)=>Math.max(c,...h.rounds.map(u=>u.round),0),0),i=r.personas.length,n=r.personas.reduce((c,h)=>c+h.rounds.reduce((u,d)=>u+bD(d),0),0);let a=0,o=0;if(r.finalReport){const c=r.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:i,pushbacks:n,openRisks:a,minorityViews:o}}function Jat(r){let e=0;for(let i=0;i<r.length;i++)e=e*31+r.charCodeAt(i)>>>0;return e%360}const OA=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function tst(r){let e=0;for(let i=0;i<r.length;i++)e=e*31+r.charCodeAt(i)>>>0;return OA[e%OA.length]}function est(r){const e=(r||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function rst(r){const e={verdict:"",appendix:null,sections:[]},i=/^##\s+(.+?)\s*\n([\s\S]*?)(?=^##\s+|\Z)/gim;let n;for(;(n=i.exec(r))!==null;){const a=n[1].trim(),o=n[2].trim();if(!e.verdict&&/^verdict\b/i.test(a)){e.verdict=o;continue}if(/^appendix\b/i.test(a)){e.appendix||(e.appendix={heading:a,body:o});continue}e.sections.push({heading:a,body:o})}return e}function rf({slug:r,size:e=36,title:i,onClick:n}){const a=Jat(r),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=tst(r);return m.jsx("span",{className:"council-avatar",onClick:n,title:i??r,style:{width:e,height:e,fontSize:e*.45,background:o,cursor:n?"pointer":"default"},"aria-label":r,children:c})}const ist=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function nst(r,e,i){var a;if(i!=="all"&&(i==="in_progress"&&!r.status.endsWith("_running")||i==="synthesizing"&&r.status!=="synthesizing"||i==="complete"&&r.status!=="complete"||i==="promoted"&&!r.promoted_to_knowledge))return!1;if(!e.trim())return!0;const n=e.trim().toLowerCase();return!!((r.topic||"").toLowerCase().includes(n)||r.id.toLowerCase().includes(n)||(a=r.personaSlugs)!=null&&a.some(o=>o.toLowerCase().includes(n)))}function ast(r){return r==="complete"?"council-hall-status--complete":r==="synthesizing"?"council-hall-status--synth":r.endsWith("_running")?"council-hall-status--running":"council-hall-status--pending"}function sst(r){return r==="complete"?"Complete":r==="synthesizing"?"Synthesizing":r.endsWith("_running")?"In progress":"Pending"}function ost({debates:r,onOpen:e}){const{t:i}=Pr(),[n,a]=q.useState(""),[o,c]=q.useState("all"),h=q.useMemo(()=>r.filter(u=>nst(u,n,o)),[r,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:i("council.search.placeholder")})]}),m.jsx("select",{className:"council-hall-filter",value:o,onChange:u=>c(u.target.value),"aria-label":i("council.filter.status"),children:ist.map(u=>m.jsx("option",{value:u.value,children:u.label},u.value))}),m.jsxs("span",{className:"council-hall-count",children:[h.length," / ",r.length]})]}),h.length===0?m.jsx("div",{className:"council-empty",children:i("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 ${ast(u.status)}`,children:[m.jsx("span",{className:"council-hall-status-dot"}),sst(u.status)]}),m.jsxs("span",{className:"council-hall-rounds",children:["R",u.current_round,"/",u.rounds_planned]})]}),m.jsx("h3",{className:"council-hall-topic",children:u.topic||u.id}),m.jsxs("div",{className:"council-hall-foot",children:[u.personaSlugs&&u.personaSlugs.length>0&&m.jsxs("div",{className:"council-hall-avatars","aria-label":`${u.personaSlugs.length} personas`,children:[u.personaSlugs.slice(0,6).map((d,f)=>m.jsx("span",{className:"council-hall-avatar-wrap",style:{zIndex:10-f},children:m.jsx(rf,{slug:d,size:20})},d)),u.personaSlugs.length>6&&m.jsxs("span",{className:"council-hall-avatar-more",children:["+",u.personaSlugs.length-6]})]}),m.jsx("span",{className:"council-hall-date",children:u.updated_at||u.created_at}),u.promoted_to_knowledge&&m.jsx("span",{className:"council-hall-promoted",title:"Promoted to knowledge",children:"📜"})]})]},u.id))})]})}function lst(r){var e,i;if(r==="complete")return{label:"Complete",tone:"complete"};if(r==="synthesizing")return{label:"Synthesizing",tone:"synth"};if(/_running$/.test(r)){const n=(e=r.match(/^round_(\d+)_running$/))==null?void 0:e[1];return{label:n?`Round ${n} running`:"Running",tone:"running"}}if(/_complete$/.test(r)){const n=(i=r.match(/^round_(\d+)_complete$/))==null?void 0:i[1];return{label:n?`Round ${n} done`:"Round done",tone:"pending"}}return r==="created"?{label:"Created",tone:"pending"}:{label:r,tone:"pending"}}function cst({status:r,size:e="md"}){const{label:i,tone:n}=lst(r);return m.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[m.jsx("span",{className:"council-status-dot"}),i]})}function Hu({value:r,label:e,tone:i="default"}){return m.jsxs("div",{className:`council-stat-tile council-stat-tile--${i}`,children:[m.jsx("div",{className:"council-stat-value",children:r}),m.jsx("div",{className:"council-stat-label",children:e})]})}function hst({debate:r,onCiteJump:e,onAgentJump:i}){const{t:n}=Pr(),a=q.useMemo(()=>Qat(r),[r]),o=r.finalReport?rst(r.finalReport.content):null,c=r.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:r.frontmatter.topic||r.frontmatter.id}),r.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:r.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")}),r.roundLog&&m.jsxs("div",{className:"council-roundlog",children:[m.jsx("h4",{children:"Round log"}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Oe.parse(r.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:Oe.parse(o.verdict||"*No verdict section found.*")}})]}),m.jsxs("div",{className:"council-ov-stats",children:[m.jsx(Hu,{value:a.rounds,label:"rounds"}),m.jsx(Hu,{value:a.personas,label:"personas"}),m.jsx(Hu,{value:a.pushbacks,label:"pushbacks"}),m.jsx(Hu,{value:a.openRisks,label:"open risks",tone:"warning"}),m.jsx(Hu,{value:a.minorityViews,label:"dissent",tone:"dissent"})]}),o.sections.length>0&&m.jsx("div",{className:"council-ov-sections",children:o.sections.map(u=>m.jsxs("section",{className:`council-ov-card ${h(u.heading)}`,children:[m.jsx("h3",{children:u.heading}),m.jsx(ust,{text:u.body,knownSlugs:c,onCiteJump:e,onAgentJump:i})]},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:Oe.parse(o.appendix.body)}})]})]})]})}function ust({text:r,knownSlugs:e,onCiteJump:i,onAgentJump:n}){const a=[],o=new Set(e);let c=r.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=Oe.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:()=>i(C.slug,C.round),children:[m.jsx(rf,{slug:C.slug,size:14}),m.jsx("span",{children:C.slug}),m.jsxs("span",{className:"council-cite-round",children:["R",C.round]})]},`c-${g}`))}else{const C=h[v];f.push(m.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(C),children:C},`a-${g}`))}g+=3}else f.push(m.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`)),g+=1}return m.jsx("div",{className:"council-sheet-prose council-citation-prose",children:f})}function xD({model:r}){const e=est(r),i=r?r.charAt(0).toUpperCase()+r.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: ${i}`,children:i})}function dst(r,e){if(!e.trim())return!0;const i=e.trim().toLowerCase();if(r.slug.toLowerCase().includes(i))return!0;for(const n of r.rounds)if([n.executiveSummary,n.position,n.reasoning,n.reactions,n.openQuestions].filter(Boolean).join(`
|
|
479
|
+
`).toLowerCase().includes(i))return!0;return!1}function s_(r,e){if(!e.trim())return r;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return r.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function fst({debate:r,focusSlug:e}){const{t:i}=Pr(),[n,a]=q.useState(""),[o,c]=q.useState(()=>new Set),h=q.useRef(null),u=q.useMemo(()=>r.personas.filter(f=>dst(f,n)),[r.personas,n]);q.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:i("council.search.transcript")})]}),m.jsxs("span",{className:"council-transcript-count",children:[u.length," of ",r.personas.length," persona",r.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(pst,{persona:f,query:n,collapsed:o.has(f.slug),highlighted:e===f.slug,onToggle:()=>d(f.slug)},f.slug))]})]})}function pst({persona:r,query:e,collapsed:i,highlighted:n,onToggle:a}){return m.jsxs("article",{className:`council-transcript-block ${n?"is-highlighted":""}`,"data-agent":r.slug,children:[m.jsxs("header",{className:"council-transcript-block-head",onClick:a,children:[m.jsxs("div",{className:"council-transcript-block-title",children:[m.jsx(rf,{slug:r.slug,size:24}),m.jsxs("div",{children:[m.jsx("h3",{className:"council-transcript-block-name",children:r.slug}),m.jsxs("div",{className:"council-transcript-block-meta",children:[m.jsx(xD,{model:r.frontmatter.model}),r.frontmatter.aspects.slice(0,4).map(o=>m.jsx("span",{className:"council-aspect",children:o},o))]})]})]}),m.jsx("span",{className:`council-transcript-chev ${i?"":"is-open"}`,"aria-hidden":!0,children:"▸"})]}),!i&&m.jsxs("div",{className:"council-transcript-block-body",children:[r.persona&&m.jsxs("section",{className:"council-sheet-section",children:[m.jsx("h4",{children:"Persona prompt"}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:s_(Oe.parse(r.persona),e)}})]}),r.rounds.length===0&&m.jsx("div",{className:"council-sheet-empty",children:"No rounds submitted."}),r.rounds.slice().sort((o,c)=>c.round-o.round).map(o=>m.jsx(gst,{round:o,crossContext:r.crossContext[o.round]??null,query:e},o.round)),r.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:r.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 gst({round:r,crossContext:e,query:i}){const n=mD(r.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 ",r.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:s_(Oe.parse(e),i)}})]}),r.executiveSummary&&m.jsx(Wu,{title:"Executive summary",body:r.executiveSummary,query:i}),r.position&&m.jsx(Wu,{title:"Position",body:r.position,query:i}),r.reasoning&&m.jsx(Wu,{title:"Reasoning",body:r.reasoning,query:i}),r.reactions&&m.jsx(Wu,{title:"Reactions to peers",body:r.reactions,query:i}),r.openQuestions&&m.jsx(Wu,{title:"Open questions",body:r.openQuestions,query:i})]})}function Wu({title:r,body:e,query:i}){const n=s_(Oe.parse(e),i);return m.jsxs("div",{className:"council-round-sub",children:[m.jsx("h5",{className:"council-round-sub-title",children:r}),m.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:n}})]})}function vD(r,e){return e.trim()?r?[r.executiveSummary,r.position,r.reasoning].filter(Boolean).join(`
|
|
480
|
+
`).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function mst({debate:r,query:e,onQueryChange:i,selected:n,onSelectCell:a,onClearSelection:o}){const c=q.useRef(null),h=q.useMemo(()=>Array.from({length:Math.max(1,r.frontmatter.rounds_planned)},(f,g)=>g+1),[r.frontmatter.rounds_planned]),u=q.useMemo(()=>r.personas.map(f=>f.slug),[r.personas]),d=q.useMemo(()=>{if(!e.trim())return null;let f=0;for(const g of r.personas)for(const x of h)vD(yD(g,x),e)&&f++;return f},[e,r,h]);return q.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=r.personas.findIndex(C=>C.slug===n.slug);if(y===-1)return;const v=r.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<r.personas.length-1?(g.preventDefault(),a(r.personas[y+1].slug,n.round)):g.key==="ArrowUp"&&y>0&&(g.preventDefault(),a(r.personas[y-1].slug,n.round))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[n,r,o,a]),q.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=>i(f.target.value),placeholder:"Filter cells by text…"}),e&&m.jsx("button",{type:"button",className:"council-matrix-search-clear",onClick:()=>i(""),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=r.frontmatter.status===`round_${f}_running`,x=r.frontmatter.current_round>=f&&!g;return m.jsxs("div",{className:`council-round-head ${g?"is-running":""} ${x?"is-done":""}`,children:["Round ",f]},`h-${f}`)}),r.personas.map(f=>m.jsx(yst,{persona:f,rounds:h,debate:r,query:e,selected:n,knownSlugs:u,onSelectCell:a},f.slug))]})})]})}function yst({persona:r,rounds:e,debate:i,query:n,selected:a,knownSlugs:o,onSelectCell:c}){return m.jsxs(m.Fragment,{children:[m.jsxs("aside",{className:"council-matrix-row-head",children:[m.jsx(rf,{slug:r.slug,size:22}),m.jsxs("div",{className:"council-matrix-row-id",children:[m.jsx("div",{className:"council-matrix-row-name",children:r.slug}),m.jsx(xD,{model:r.frontmatter.model})]})]}),e.map(h=>{const u=yD(r,h),d=i.frontmatter.status===`round_${h}_running`,f=!!a&&a.slug===r.slug&&a.round===h,g=vD(u,n),x=!!n.trim()&&!g;return m.jsx(bst,{personaSlug:r.slug,round:h,data:u,isRunning:d,active:f,dimmed:x,knownSlugs:o,onSelect:c},h)})]})}function bst({personaSlug:r,round:e,data:i,isRunning:n,active:a,dimmed:o,knownSlugs:c,onSelect:h}){if(!i)return m.jsx("div",{className:`council-cell council-cell--empty ${n?"council-cell--pending":""} ${o?"is-dimmed":""}`,"data-persona":r,"data-round":e,children:m.jsx("span",{className:"council-cell-empty-label",children:n?"awaiting…":"— silent —"})});const u=mD(i.position),d=Vat(i.position),f=bD(i),g=Zat(i),x=Xat(i,c);return m.jsxs("button",{type:"button",className:`council-cell council-cell--${d} ${a?"is-active":""} ${o?"is-dimmed":""}`,"data-persona":r,"data-round":e,onClick:()=>h(r,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&&i.executiveSummary&&m.jsx("p",{className:"council-cell-exec",children:i.executiveSummary}),a&&m.jsxs("div",{className:"council-cell-full",children:[i.executiveSummary&&m.jsx(Gu,{title:"Executive summary",children:m.jsx("p",{children:i.executiveSummary})}),i.position&&m.jsx(Gu,{title:"Position",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:Oe.parse(i.position)}})}),i.reasoning&&m.jsx(Gu,{title:"Reasoning",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:Oe.parse(i.reasoning)}})}),i.reactions&&m.jsxs(Gu,{title:"Reactions to peers",children:[m.jsx("div",{dangerouslySetInnerHTML:{__html:Oe.parse(i.reactions)}}),x.length>0&&m.jsx("div",{className:"council-cell-react-chips",children:x.map(y=>m.jsxs("span",{className:"council-cell-react-chip",children:[m.jsx(rf,{slug:y,size:14}),m.jsx("span",{children:y})]},y))})]}),i.openQuestions&&m.jsx(Gu,{title:"Open questions",children:m.jsx("div",{dangerouslySetInnerHTML:{__html:Oe.parse(i.openQuestions)}})})]})]})}function Gu({title:r,children:e}){return m.jsxs("section",{className:"council-cell-sub",children:[m.jsx("h5",{children:r}),m.jsx("div",{className:"council-cell-sub-body",children:e})]})}function RA(r){return r==="complete"||r==="synthesizing"?"overview":"matrix"}function xst({debate:r,onBack:e}){const{t:i}=Pr(),[n,a]=q.useState(()=>RA(r.frontmatter.status)),[o,c]=q.useState(""),[h,u]=q.useState(null),[d,f]=q.useState(null);q.useEffect(()=>{a(RA(r.frontmatter.status)),c(""),u(null),f(null)},[r.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(r.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:["← ",i("council.title")]}),m.jsxs("div",{className:"council-detail-meta",children:[m.jsx(cst,{status:r.frontmatter.status}),m.jsxs("span",{className:"council-detail-rounds",children:["R",r.frontmatter.current_round,"/",r.frontmatter.rounds_planned]}),m.jsx("span",{className:"council-session-dot",children:"·"}),m.jsx("span",{className:"council-detail-date",children:r.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:r.frontmatter.id})]})]}),m.jsxs("nav",{className:"council-tabs",role:"tablist",children:[m.jsx(Tx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),m.jsx(Tx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),m.jsx(Tx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),m.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&m.jsx(hst,{debate:r,onCiteJump:g,onAgentJump:x}),n==="agents"&&m.jsx(fst,{debate:r,focusSlug:d}),n==="matrix"&&m.jsx(mst,{debate:r,query:o,onQueryChange:c,selected:h,onSelectCell:(v,C)=>u({slug:v,round:C}),onClearSelection:()=>u(null)})]})]})}function Tx({active:r,onClick:e,label:i}){return m.jsx("button",{type:"button",role:"tab","aria-selected":r,className:`council-tab ${r?"is-active":""}`,onClick:e,children:i})}function vst(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=Yat(),[o,c]=q.useState(null),{data:h,isLoading:u}=Kat(o);return i?m.jsx("div",{className:"loading",children:r("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(xst,{debate:h,onBack:()=>c(null)})]}):m.jsxs("div",{className:"council-page",children:[m.jsx("h1",{className:"page-title",children:r("council.title")}),m.jsx(ost,{debates:e??[],onOpen:c})]})}function Cst(){return dr({queryKey:["config"],queryFn:()=>ee.get("/config"),select:r=>r.config})}function _st(){const r=Gr();return ni({mutationFn:e=>ee.patch("/config",e),onSuccess:()=>{r.invalidateQueries({queryKey:["config"]})}})}function kst(){return dr({queryKey:["vaults"],queryFn:()=>ee.get("/vaults")})}function wst(){return dr({queryKey:["connections"],queryFn:()=>ee.get("/connections"),select:r=>r.connections})}function Sst(){const r=Gr();return ni({mutationFn:e=>ee.post("/connections",e),onSuccess:()=>{r.invalidateQueries({queryKey:["connections"]}),r.invalidateQueries({queryKey:["vaults"]}),r.invalidateQueries({queryKey:["launcher-status"]}),r.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function Tst(){const r=Gr();return ni({mutationFn:e=>ee.del(`/connections/${encodeURIComponent(e)}`),onSuccess:()=>{r.invalidateQueries({queryKey:["connections"]}),r.invalidateQueries({queryKey:["vaults"]}),r.invalidateQueries({queryKey:["launcher-status"]}),r.invalidateQueries({queryKey:["launcher-federation-graph"]})}})}function Est(){return dr({queryKey:["federation","inbox"],queryFn:()=>ee.get("/federation/inbox")})}function Nst(){return ni({mutationFn:()=>ee.post("/federation/sync",{})})}const jA=["out","in","both"];function Ast({shareable:r,onToggleShareable:e,shareablePending:i}){const{t:n}=Pr(),{data:a}=kst(),{data:o}=wst(),c=Sst(),h=Tst(),{data:u}=Est(),d=Nst(),[f,g]=q.useState(""),[x,y]=q.useState("both"),[v,C]=q.useState(null),_=(a==null?void 0:a.vaults)??[],k=(a==null?void 0:a.current)??null,T=o??[],N=new Set(T.map(M=>M.vault)),E=_.filter(M=>M.name!==k&&!N.has(M.name)),B=()=>{if(C(null),!f){C(n("federation.error.pick_vault"));return}c.mutate({vault:f,direction:x},{onSuccess:()=>{g(""),y("both")},onError:M=>C(M instanceof Error?M.message:String(M))})},O=(M,F)=>{c.mutate({vault:M.vault,direction:F,topics:M.topics})},A=(M,F)=>{const j=F.split(",").map(z=>z.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:r,disabled:i,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 F;return m.jsxs("li",{className:"fed-conn-item",children:[m.jsxs("div",{className:"fed-conn-head",children:[m.jsx("span",{className:"fed-conn-name",children:M.vault}),M.status==="stale"&&m.jsx("span",{className:"fed-badge fed-badge--stale",children:n("federation.stale")}),m.jsx("button",{className:"btn fed-conn-remove",onClick:()=>h.mutate(M.vault),disabled:h.isPending,children:n("federation.remove")})]}),m.jsxs("div",{className:"fed-conn-controls",children:[m.jsx("div",{className:"fed-direction",role:"group","aria-label":n("federation.direction"),children:jA.map(j=>m.jsx("button",{className:`fed-dir-btn${M.direction===j?" fed-dir-btn--active":""}`,onClick:()=>O(M,j),disabled:c.isPending,children:n(`federation.direction.${j}`)},j))}),m.jsx("input",{className:"settings-text-input fed-topics-input",defaultValue:((F=M.topics)==null?void 0:F.join(", "))??"",placeholder:n("federation.topics.placeholder"),onBlur:j=>{const z=j.target.value.split(",").map(V=>V.trim()).filter(Boolean).join(", "),U=(M.topics??[]).join(", ");z!==U&&A(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")}),E.length===0?m.jsx("p",{className:"settings-field-hint",children:n("federation.add.none")}):m.jsxs("div",{className:"fed-add-row",children:[m.jsxs("select",{className:"settings-text-input",value:f,onChange:M=>g(M.target.value),children:[m.jsx("option",{value:"",children:n("federation.add.pick")}),E.map(M=>m.jsx("option",{value:M.name,children:M.name},M.name))]}),m.jsx("div",{className:"fed-direction",role:"group","aria-label":n("federation.direction"),children:jA.map(M=>m.jsx("button",{className:`fed-dir-btn${x===M?" fed-dir-btn--active":""}`,onClick:()=>y(M),children:n(`federation.direction.${M}`)},M))}),m.jsx("button",{className:"btn btn--primary",onClick:B,disabled:c.isPending||!f,children:n("federation.connect")})]}),E.length>0&&m.jsx("p",{className:"settings-field-hint fed-dir-hint",children:n(`federation.direction.${x}.hint`)}),v&&m.jsx("p",{className:"settings-test-err",children:v})]}),m.jsxs("div",{className:"fed-inbox",children:[m.jsx("h3",{className:"fed-subtitle",children:n("federation.inbox")}),(()=>{const M=(u==null?void 0:u.pending)??[],F=(u==null?void 0:u.consumed)??[],j=(u==null?void 0:u.quarantined)??[];return M.length===0&&F.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(z=>m.jsx(DA,{entry:z,fromLabel:n("federation.inbox.from")},`p-${z.id}`))})]}),F.length>0&&m.jsxs("div",{className:"fed-inbox-group",children:[m.jsxs("h4",{className:"fed-inbox-group-title",children:[n("federation.inbox.consumed")," (",F.length,")"]}),m.jsx("ul",{className:"fed-entry-list fed-entry-list--consumed",children:F.map(z=>m.jsx(DA,{entry:z,fromLabel:n("federation.inbox.from")},`c-${z.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(z=>m.jsxs("li",{className:"fed-entry fed-entry--quarantined",children:[m.jsx("code",{className:"fed-entry-file",children:z.file}),m.jsxs("span",{className:"fed-entry-meta",children:["v",z.version]})]},`q-${z.file}`))})]})]})})()]}),m.jsxs("div",{className:"fed-preview",children:[m.jsxs("div",{className:"fed-preview-head",children:[m.jsx("button",{className:"btn",onClick:()=>d.mutate(),disabled:d.isPending,children:d.isPending?n("federation.preview.running"):n("federation.preview")}),m.jsx("p",{className:"settings-field-hint",children:n("federation.preview.hint")})]}),d.isError&&m.jsx("p",{className:"settings-test-err",children:d.error instanceof Error?d.error.message:String(d.error)}),d.data&&m.jsx(Mst,{deltas:d.data.deltas,t:n})]})]})}function DA({entry:r,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:r.title}),m.jsx("span",{className:`fed-entry-kind fed-entry-kind--${r.kind}`,children:r.kind})]}),m.jsxs("span",{className:"fed-entry-meta",children:[e," ",m.jsx("strong",{children:r.origin.vault}),r.origin.sourceTimestamp?` · ${r.origin.sourceTimestamp}`:""]})]})}function Mst({deltas:r,t:e}){return r.length===0?m.jsx("p",{className:"settings-field-hint",children:e("federation.preview.none")}):m.jsx("ul",{className:"fed-delta-list",children:r.map(i=>{let n;return i.stale?n=e("federation.preview.stale"):i.consented?i.entries.length===0?n=e("federation.preview.nodelta"):n=`${i.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:i.vault}),m.jsx("span",{className:"fed-delta-status",children:n})]}),i.entries.length>0&&m.jsx("ul",{className:"fed-entry-list",children:i.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})]})},`${i.vault}-${o}`))})]},i.vault)})})}function Bst(r){const e=[];r.metaKey&&e.push("Cmd"),r.ctrlKey&&e.push("Ctrl"),r.altKey&&e.push("Alt"),r.shiftKey&&e.push("Shift");let i=r.key;return["Meta","Control","Alt","Shift"].includes(i)||(i===" "?i="Space":i.length===1?i=i.toUpperCase():i=i.charAt(0).toUpperCase()+i.slice(1),e.length===0)?null:[...e,i].join("+")}const Lst=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],Ex={platforms:[],disableNativeMemory:!0};function Ost(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n}=Cst(),a=_st(),[o,c]=q.useState(Ex.platforms),[h,u]=q.useState(Ex.disableNativeMemory),[d,f]=q.useState(!1),[g,x]=q.useState(""),[y,v]=q.useState(""),[C,_]=q.useState(""),[k,T]=q.useState(null),[N,E]=q.useState(!1),[B,O]=q.useState(null),[A,M]=q.useState(!1),[F,j]=q.useState(!1),[z,U]=q.useState(!1),[V,I]=q.useState(()=>fC()),[G,D]=q.useState(!1),W=H=>{I(H),WG(H),Tv(H)},{data:K}=dr({queryKey:["tasks-sync-status"],queryFn:()=>ee.get("/tasks/sync-status"),select:H=>H.status}),{data:tt}=dr({queryKey:["tasks-containers"],queryFn:()=>ee.get("/tasks/containers"),select:H=>H.containers,enabled:d,staleTime:300*1e3}),nt=H=>{const J=(tt??[]).find(vt=>vt.ids.listId===H);J&&(x(J.ids.teamId),v(J.ids.spaceId),_(J.ids.listId),xt())},Y=async()=>{M(!0),O(null);try{const{result:H}=await ee.post("/tasks/provision",{});O(H.errors.length>0?`⚠ ${H.errors[0]}`:H.created.length>0?`✓ Created: ${H.created.join(", ")}${H.backfilled>0?` · backfilled ${H.backfilled} value(s)`:""}`:"✓ All recommended fields already exist.")}catch(H){O(`⚠ ${H instanceof Error?H.message:String(H)}`)}finally{M(!1)}};if(q.useEffect(()=>{var vt,At,qt;const H=e??Ex;c(H.platforms),u(H.disableNativeMemory??!0);const J=e;f((J==null?void 0:J.taskBackend)==="clickup"),x(((vt=J==null?void 0:J.clickup)==null?void 0:vt.teamId)??""),v(((At=J==null?void 0:J.clickup)==null?void 0:At.spaceId)??""),_(((qt=J==null?void 0:J.clickup)==null?void 0:qt.listId)??""),j(!1),U(!1)},[e]),i)return m.jsx("div",{className:"loading",children:r("common.loading")});if(n)return m.jsx("div",{className:"error-state",children:r("common.error")});const rt=H=>{c(J=>{const vt=J.includes(H)?J.filter(At=>At!==H):[...J,H];return j(!0),U(!1),vt})},ft=()=>{u(H=>!H),j(!0),U(!1)},ct=()=>{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),U(!0)}})},xt=()=>{j(!0),U(!1)},st=(e==null?void 0:e.shareable)===!0,kt=H=>{a.mutate({shareable:H})},it=async()=>{E(!0),T(null);try{T(await ee.post("/tasks/sync-test",{}))}catch(H){T({ok:!1,backend:"clickup",error:H instanceof Error?H.message:String(H)})}finally{E(!1)}};return m.jsxs("div",{className:"settings-page",children:[m.jsxs("div",{className:"settings-header",children:[m.jsx("h1",{className:"page-title",children:r("settings.title")}),m.jsxs("div",{className:"settings-save-row",children:[z&&!F&&m.jsx("span",{className:"settings-saved",children:r("settings.saved")}),a.isError&&m.jsx("span",{className:"settings-error",children:r("common.error")}),m.jsx("button",{className:"btn btn--primary",onClick:ct,disabled:!F||a.isPending,children:a.isPending?r("settings.saving"):r("settings.save")})]})]}),e===null&&m.jsx("div",{className:"settings-empty-notice",children:r("settings.no_config")}),m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:r("settings.platforms")}),m.jsx("div",{className:"settings-checkboxes",children:Lst.map(({id:H,labelKey:J})=>m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(H),onChange:()=>rt(H)}),m.jsx("span",{children:r(J)})]},H))})]}),m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:r("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(H=>!H),xt()}}),m.jsx("span",{children:r("settings.cloud_tasks.label")})]}),m.jsx("p",{className:"settings-field-hint",children:r("settings.cloud_tasks.hint")}),d&&m.jsxs(m.Fragment,{children:[(tt??[]).length>0&&m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:"List"}),m.jsx(m1,{value:C||null,options:(tt??[]).map(H=>({value:H.ids.listId,label:H.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:r("settings.cloud_tasks.team")}),m.jsx("input",{className:"settings-text-input",value:g,onChange:H=>{x(H.target.value),xt()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:r("settings.cloud_tasks.space")}),m.jsx("input",{className:"settings-text-input",value:y,onChange:H=>{v(H.target.value),xt()}})]}),m.jsxs("div",{className:"settings-field-row",children:[m.jsx("label",{children:r("settings.cloud_tasks.list")}),m.jsx("input",{className:"settings-text-input",value:C,onChange:H=>{_(H.target.value),xt()}})]}),m.jsx("p",{className:"settings-field-hint",children:r("settings.cloud_tasks.token_hint")}),m.jsxs("div",{className:"settings-test-row",children:[m.jsx("button",{className:"btn",onClick:it,disabled:N,children:r(N?"settings.cloud_tasks.testing":"settings.cloud_tasks.test")}),m.jsx("button",{className:"btn",onClick:Y,disabled:A,children:A?"Provisioning…":"Provision fields"}),B&&m.jsx("span",{className:"settings-field-hint",children:B}),k&&k.ok&&m.jsxs("span",{className:"settings-test-ok",children:["✓ ",k.note??`${r("settings.cloud_tasks.test_ok")} ${k.user}`]}),k&&!k.ok&&m.jsxs("span",{className:"settings-test-err",children:["✗ ",k.error]})]}),K&&K.backend!=="local"&&m.jsxs("p",{className:"settings-sync-badge",children:[r("settings.cloud_tasks.status"),": ",K.pendingPush," ",r("settings.cloud_tasks.pending"),K.conflicts>0&&` · ${K.conflicts} ${r("settings.cloud_tasks.conflicts")}`]})]})]})]}),m.jsxs("section",{className:"settings-section",children:[m.jsx("h2",{className:"settings-section-title",children:r("settings.memory")}),m.jsxs("div",{className:"settings-checkboxes",children:[m.jsxs("label",{className:"settings-checkbox-label",children:[m.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:h,onChange:ft}),m.jsx("span",{children:r("settings.native_memory.label")})]}),m.jsx("p",{className:"settings-field-hint",children:r("settings.native_memory.hint")})]})]}),m.jsx(Ast,{shareable:st,onToggleShareable:kt,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:V.enabled,onChange:()=>W({...V,enabled:!V.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."}),V.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…":V.hotkey,onFocus:()=>D(!0),onBlur:()=>D(!1),onKeyDown:H=>{H.preventDefault();const J=Bst(H);J&&(W({...V,hotkey:J}),D(!1),H.currentTarget.blur())}})]})]})]})]})}function CD(){return dr({queryKey:["packs"],queryFn:()=>ee.get("/packs")})}function Rst(){const r=Gr();return ni({mutationFn:e=>ee.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{r.invalidateQueries({queryKey:["packs"]})}})}function jst(){const r=Gr();return ni({mutationFn:e=>ee.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{r.invalidateQueries({queryKey:["packs"]})}})}function Dst(r){return"base"in r}function _D({item:r,onActionDone:e}){const{t:i}=Pr(),n=Rst(),a=jst(),o=r.installed,c=o?a:n,h=c.isPending,u=c.isError,d=i(o?"packs.action.remove":"packs.action.install"),f=i(o?"packs.action.removing":"packs.action.installing"),g=h?f:d,x=y=>{y.stopPropagation(),y.preventDefault(),!h&&c.mutate(r.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:i("packs.action.error")})]})}function Fst({item:r,onClose:e}){const{t:i}=Pr(),n=q.useCallback(a=>{a.target===a.currentTarget&&e()},[e]);return q.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":r.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:r.name}),r.installed&&m.jsx("span",{className:"packs-installed-pill",children:i("settings.packs.installed")})]}),m.jsxs("div",{className:"packs-modal-header-actions",children:[m.jsx(_D,{item:r,onActionDone:e}),m.jsx("button",{className:"packs-modal-close btn btn--ghost",type:"button",onClick:e,"aria-label":i("packs.detail.close"),children:i("packs.detail.close")})]})]}),r.description&&m.jsx("p",{className:"packs-modal-desc",children:r.description}),r.tags.length>0&&m.jsx("div",{className:"packs-modal-tags",children:r.tags.map(a=>m.jsx("span",{className:"task-tag","data-hue":Va(a),children:a},a))}),Dst(r)&&m.jsxs(m.Fragment,{children:[r.base&&m.jsxs("div",{className:"packs-modal-section",children:[m.jsx("h3",{className:"packs-modal-section-title",children:i("packs.detail.base")}),m.jsx("p",{className:"packs-modal-mono",children:r.base})]}),r.subSkills.length>0&&m.jsxs("div",{className:"packs-modal-section",children:[m.jsx("h3",{className:"packs-modal-section-title",children:i("packs.detail.subskills")}),m.jsx("ul",{className:"packs-modal-subskills",children:r.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))})]}),r.relatedAgents&&r.relatedAgents.length>0&&m.jsxs("div",{className:"packs-modal-section",children:[m.jsx("h3",{className:"packs-modal-section-title",children:i("packs.detail.agents")}),m.jsx("ul",{className:"packs-modal-agents",children:r.relatedAgents.map(a=>m.jsx("li",{className:"packs-modal-agent",children:a},a))})]})]})]})})}function FA({item:r,onClick:e}){const{t:i}=Pr(),n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e(r))};return m.jsxs("div",{className:"packs-card packs-card--clickable",role:"button",tabIndex:0,onClick:()=>e(r),onKeyDown:n,"aria-label":r.name,children:[m.jsxs("div",{className:"packs-card-header",children:[m.jsx("span",{className:"packs-card-name",children:r.name}),r.installed&&m.jsx("span",{className:"packs-installed-pill",children:i("settings.packs.installed")})]}),r.description&&m.jsx("p",{className:"packs-card-desc",children:r.description}),r.tags.length>0&&m.jsx("div",{className:"packs-card-tags",children:r.tags.map(a=>m.jsx("span",{className:"task-tag","data-hue":Va(a),children:a},a))}),m.jsx(_D,{item:r})]})}function Ist(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=CD(),[o,c]=q.useState(null);if(i)return m.jsx("div",{className:"loading",children:r("common.loading")});if(n)return m.jsxs("div",{className:"error-state",children:[r("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:r("packs.title")}),h.length===0&&u.length===0&&m.jsx("div",{className:"packs-empty",children:r("common.empty")}),h.length>0&&m.jsxs("section",{className:"packs-section",children:[m.jsx("h2",{className:"packs-section-title",children:r("packs.section.packs")}),m.jsx("div",{className:"packs-grid",children:h.map(d=>m.jsx(FA,{item:d,onClick:c},d.name))})]}),u.length>0&&m.jsxs("section",{className:"packs-section",children:[m.jsx("h2",{className:"packs-section-title",children:r("packs.section.standalone")}),m.jsx("div",{className:"packs-grid",children:u.map(d=>m.jsx(FA,{item:d,onClick:c},d.name))})]}),o!==null&&m.jsx(Fst,{item:o,onClose:()=>c(null)})]})}function $st(){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 zst(){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 Pst(r,e,i){const n=i*.6,o=Math.max(6,Math.floor((e-i*2)/n));if(r.length<=o)return[r];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 r.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 Om({spec:r,className:e,size:i="full"}){const a=q.useId().replace(/[^a-zA-Z0-9_-]/g,""),o=`fd-node-${a}`,c=`fd-dot-${a}`,h=i==="mini"?5:7;return m.jsx("div",{className:`fd fd--${i} ${e??""}`,role:"img","aria-label":r.ariaLabel,children:m.jsxs("svg",{viewBox:r.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:r.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))}),r.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]:Pst(u.sub,u.w,i==="mini"?10:12),x=15,y=u.glyph?f+6:g.length?f-8-(g.length-1)*(x/2):f,v=u.glyph?u.y+u.h-16:y+22;return m.jsxs("g",{className:`fd-node fd-node--${u.variant??"plain"}${u.breathe?" fd-node--breathe":""}`,children:[m.jsx("rect",{x:u.x,y:u.y,width:u.w,height:u.h,rx:"14",fill:`url(#${o})`,style:u.breathe&&u.breatheDelay!==void 0?{animationDelay:`${u.breatheDelay}s`}:void 0}),u.glyph&&m.jsx("text",{x:d,y:u.y+26,className:"fd-region-glyph",children:u.glyph}),m.jsx("text",{x:d,y,className:"fd-node-title",children:u.title}),g.length>0&&m.jsx("text",{x:d,y:v,className:"fd-node-sub",children:g.map((C,_)=>m.jsx("tspan",{x:d,dy:_===0?0:x,children:C},_))})]},u.id)})]})})}function sn(r,e,i,n){const a=(e+n)/2;return`M ${r} ${e} C ${r} ${a}, ${i} ${a}, ${i} ${n}`}const o_=[{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,Rm=250,kD=92,Hl=4,IA=(1200-Hl*Rm)/(Hl+1),l_=196,qst=320,Ust=qst-l_,Hst=120,wD=470,Wst=548,$A=632;function SD(r){return IA+r*(Rm+IA)}function TD(r){return SD(r)+Rm/2}function ED(r){return l_+r*Ust}const Gst=o_.map((r,e)=>{const i=e%Hl,n=Math.floor(e/Hl);return{id:`cat-${r.file}`,x:SD(i),y:ED(n),w:Rm,h:kD,title:r.file,sub:r.region,glyph:r.glyph,variant:"region",breathe:!0,breatheDelay:e*.18}}),Yst=o_.slice(0,Hl).map((r,e)=>({id:`fan-${e}`,d:sn(gl,Hst,TD(e),l_),travel:220,delay:e*.18,dur:2.6})),Kst=o_.map((r,e)=>{const i=e%Hl,n=Math.floor(e/Hl);return{id:`conv-${r.file}`,d:sn(TD(i),ED(n)+kD,gl,wD),travel:300,delay:.5+e*.12,dur:2.8}}),Vst={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"},...Gst,{id:"agent",x:gl-250,y:wD,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:$A,w:400,h:78,title:"RemSleep — parallel specialists",sub:"multi-agent consolidation",variant:"rem"}],edges:[...Yst,...Kst,{id:"agent-rem",d:`M ${gl} ${Wst} L ${gl} ${$A}`,travel:90,delay:1.6,dur:1.8},{id:"feedback",d:"M 800 671 C 1140 671, 1170 470, 1170 300 C 1170 170, 1110 170, 1010 170",dashed:!0,travel:520,delay:0,dur:4.2,label:{text:"consolidates & feeds back",x:1180,y:420,rotate:90}}]},Ia=550,jm=300,ND=116,zA=3,PA=(1100-zA*jm)/(zA+1),c_=280,Xst=196,AD=470,Zst=540,qA=596;function MD(r){return PA+r*(jm+PA)}function BD(r){return MD(r)+jm/2}const h_=[{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"}],Qst=h_.map((r,e)=>({id:r.id,x:MD(e),y:c_,w:jm,h:ND,title:r.title,sub:r.sub,variant:"region",breathe:!0,breatheDelay:e*.25})),Jst=h_.map((r,e)=>({id:`fan-${r.id}`,d:sn(Ia,Xst,BD(e),c_),travel:200,delay:e*.3,dur:2.4})),tot=h_.map((r,e)=>({id:`conv-${r.id}`,d:sn(BD(e),c_+ND,Ia,AD),travel:200,delay:.9+e*.2,dur:2.4})),eot={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"},...Qst,{id:"converge",x:Ia-220,y:AD,w:440,h:70,title:"system knowledge updated",sub:"reports stitched into one summary",variant:"agent"},{id:"sleep-done",x:Ia-130,y:qA,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},...Jst,...tot,{id:"converge-done",d:`M ${Ia} ${Zst} L ${Ia} ${qA}`,travel:64,delay:1.8,dur:1.8}]},_1=230,LD=230,UA=132,k1=[{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"}],rot=k1.map(r=>({id:r.id,x:r.x,y:_1-UA/2,w:LD,h:UA,title:r.title,sub:r.sub,variant:r.variant})),iot=k1.slice(0,-1).map((r,e)=>{const i=k1[e+1],n=r.x+LD,a=i.x;return{id:`pipe-${r.id}`,d:`M ${n} ${_1} L ${a} ${_1}`,travel:a-n,delay:e*.4,dur:2.2}}),not={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:rot,edges:iot},aot=[{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 sot(){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(Om,{spec:Vst}),m.jsx("div",{className:"hiw2-steps",children:aot.map(r=>m.jsxs("div",{className:"hiw2-step",children:[m.jsx("span",{className:"hiw2-step-n",children:r.n}),m.jsx("h3",{className:"hiw2-step-title",children:r.title}),m.jsx("p",{className:"hiw2-step-body",children:r.body})]},r.n))})]})}const oot=[{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"}],lot=[{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 cot(){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(Om,{spec:eot}),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:oot.map(r=>m.jsxs("li",{className:"sleepf-debt-row",children:[m.jsx("span",{className:"sleepf-debt-level",children:r.level}),m.jsx("span",{className:"sleepf-debt-range",children:r.range}),m.jsx("span",{className:"sleepf-debt-note",children:r.note})]},r.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:lot.map(r=>m.jsxs("li",{className:"sleepf-spec-row",children:[m.jsx("code",{className:"sleepf-spec-name",children:r.name}),m.jsx("span",{className:`sleepf-spec-badge${r.always?" sleepf-spec-badge--always":""}`,children:r.always?"always fires":"conditional"}),m.jsx("span",{className:"sleepf-spec-domain",children:r.domain})]},r.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 hot=[{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 uot(){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(Om,{spec:not}),m.jsx("div",{className:"recallf-stages",children:hot.map(r=>m.jsxs("article",{className:"recallf-stage",children:[m.jsxs("div",{className:"recallf-stage-head",children:[m.jsx("span",{className:"recallf-stage-n",children:r.n}),m.jsx("span",{className:"recallf-stage-tag",children:r.tag})]}),m.jsx("h3",{className:"recallf-stage-title",children:r.title}),m.jsx("p",{className:"recallf-stage-body",children:r.body})]},r.n))})]})}const HA=[{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 dot(){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:HA.map((r,e)=>m.jsxs("li",{className:"arch-stratum",style:{"--i":e,"--n":HA.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:r.glyph}),m.jsxs("div",{className:"arch-meta",children:[m.jsxs("div",{className:"arch-meta-top",children:[m.jsx("code",{className:"arch-file",children:r.file}),m.jsx("span",{className:"arch-region",children:r.region}),m.jsx("span",{className:"arch-brain",children:r.brain})]}),m.jsx("p",{className:"arch-desc",children:r.desc})]}),r.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:r.rides.label}),m.jsx("span",{className:"arch-rides-desc",children:r.rides.desc})]}):null]})]},r.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 fot(r){return"base"in r}function WA({item:r}){const e=fot(r)?"pack":"standalone",i=e==="pack"?"pack":r.tags[0]??"standalone";return m.jsxs("li",{className:"marquee-card",children:[m.jsx("span",{className:`marquee-chip marquee-chip--${e}`,children:i}),m.jsx("span",{className:"marquee-card-name",children:r.name}),r.description&&m.jsx("p",{className:"marquee-card-desc",children:r.description})]})}function pot(){const{data:r,isLoading:e,isError:i}=CD(),n=q.useMemo(()=>r?[...r.packs,...r.standalone]:[],[r]),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…"})]}):i||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(WA,{item:c},`a-${c.name}`))}),m.jsx("ul",{className:"marquee-track marquee-track--dup","aria-hidden":"true",children:n.map(c=>m.jsx(WA,{item:c},`b-${c.name}`))})]})]})}const Ho="0 0 360 170";function OD(r,e,i){return{viewBox:Ho,ariaLabel:r,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:i.title,sub:i.sub,variant:i.variant??"rem"}],edges:[{id:"a-b",d:"M 160 85 L 200 85",travel:40,dur:2}]}}const got={viewBox:Ho,ariaLabel:"Context snapshot: a SessionStart hook injects the soul, memory, active tasks and knowledge index straight into the agent with zero tool calls.",nodes:[{id:"hook",x:110,y:12,w:140,h:50,title:"SessionStart",sub:"0 tool calls",variant:"hook"},{id:"brain",x:16,y:100,w:150,h:56,title:"project brain",sub:"soul · memory · tasks",variant:"region",breathe:!0},{id:"agent",x:194,y:100,w:150,h:56,title:"your agent",sub:"oriented",variant:"agent"}],edges:[{id:"h-b",d:sn(180,62,91,100),travel:80,dur:2.2},{id:"b-a",d:"M 166 128 L 194 128",travel:28,dur:1.6,delay:.5}]},mot={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}]},yot={viewBox:Ho,ariaLabel:"RemSleep: accumulated sleep debt triggers a fan-out to three parallel specialists that consolidate the session and reset the meter.",nodes:[{id:"debt",x:108,y:10,w:144,h:46,title:"sleep debt",sub:"crosses threshold",variant:"accent"},{id:"s1",x:14,y:92,w:100,h:50,title:"sleep-tasks",variant:"region",breathe:!0},{id:"s2",x:130,y:92,w:100,h:50,title:"sleep-state",variant:"region",breathe:!0,breatheDelay:.2},{id:"s3",x:246,y:92,w:100,h:50,title:"sleep-product",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"d-1",d:sn(180,56,64,92),travel:90,dur:2.2},{id:"d-2",d:"M 180 56 L 180 92",travel:36,dur:1.8,delay:.2},{id:"d-3",d:sn(180,56,296,92),travel:90,dur:2.2,delay:.4}]},bot={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:[]},xot={viewBox:Ho,ariaLabel:"Tag-based relation graph: knowledge, features and tasks link through shared tags into a navigable brain view.",nodes:[{id:"tag",x:110,y:58,w:140,h:54,title:"shared tag",sub:"the edge",variant:"accent",breathe:!0},{id:"k",x:14,y:10,w:110,h:44,title:"knowledge",variant:"region"},{id:"f",x:236,y:10,w:110,h:44,title:"features",variant:"region"},{id:"t",x:125,y:122,w:110,h:40,title:"tasks",variant:"region"}],edges:[{id:"k-tag",d:sn(69,54,150,58),travel:90,dur:2.4},{id:"f-tag",d:sn(291,54,210,58),travel:90,dur:2.4,delay:.4},{id:"t-tag",d:"M 180 122 L 180 112",travel:12,dur:1.6,delay:.8}]},vot={viewBox:Ho,ariaLabel:"Task management: each task carries a LIFO changelog viewable as a Kanban board, an Eisenhower matrix, or RICE-scored.",nodes:[{id:"task",x:16,y:50,w:130,h:70,title:"task .md",sub:"LIFO changelog",variant:"hook"},{id:"views",x:200,y:24,w:144,h:44,title:"Kanban",variant:"region",breathe:!0},{id:"eis",x:200,y:74,w:144,h:40,title:"Eisenhower",variant:"region",breathe:!0,breatheDelay:.2},{id:"rice",x:200,y:120,w:144,h:40,title:"RICE score",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"t-k",d:sn(146,85,272,46),travel:90,dur:2.2},{id:"t-e",d:"M 146 85 L 200 94",travel:56,dur:2,delay:.3},{id:"t-r",d:sn(146,85,272,140),travel:90,dur:2.2,delay:.6}]},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:sn(180,58,64,96),travel:90,dur:2.2},{id:"m-b",d:"M 180 58 L 180 96",travel:38,dur:1.8,delay:.2},{id:"m-c",d:sn(180,58,296,96),travel:90,dur:2.2,delay:.4}]},_ot={viewBox:"0 0 400 232",ariaLabel:"Council: three persona sub-agents debate each other in a cycle — each sees the others’ reasoning, round after round — then the debate converges into a synthesizer that writes one decision report.",nodes:[{id:"p1",x:70,y:14,w:96,h:46,title:"persona",sub:"lens A",variant:"region",breathe:!0},{id:"p2",x:18,y:118,w:96,h:46,title:"persona",sub:"lens B",variant:"region",breathe:!0,breatheDelay:.25},{id:"p3",x:130,y:118,w:96,h:46,title:"persona",sub:"lens C",variant:"region",breathe:!0,breatheDelay:.5},{id:"syn",x:286,y:70,w:104,h:72,title:"synthesizer",sub:"decision report",variant:"rem"}],edges:[{id:"p1-p2",d:"M 96 60 L 80 118",travel:60,dur:1.8},{id:"p2-p3",d:"M 114 141 L 130 141",travel:16,dur:1.1,delay:.3,label:{text:"↻ rounds",x:118,y:95}},{id:"p3-p1",d:"M 178 118 L 152 60",travel:60,dur:1.8,delay:.6},{id:"p1-syn",d:sn(166,40,286,96),travel:130,dur:2.4,delay:.4},{id:"p3-syn",d:sn(226,136,286,116),travel:76,dur:2.2,delay:.9}]},kot={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}}]},wot=OD("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"}),Sot=OD("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"}),RD=[{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:got},{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:mot},{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:yot},{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:bot},{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:Sot},{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:xot},{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:vot},{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:wot},{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:_ot},{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:kot},{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:"✦"}],w1=RD.filter(r=>r.defaultOpen),GA=RD.filter(r=>!r.defaultOpen),ta=w1.length,Nx=16,Tot=62,Eot=.72,Not=40,Aot=140,Mot=8;function Bot(){const[r,e]=q.useState(0),i=q.useId(),n=q.useRef([]),a=q.useRef([]),o=q.useRef([]),c=q.useRef(null),h=q.useRef(null),u=q.useRef(null),d=q.useRef(!1),f=q.useRef(0),g=_=>`${i}-tab-${_}`,x=_=>`${i}-panel-${_}`,y=q.useCallback(_=>{const k=Math.max(0,Math.min(ta-1,_));k!==f.current&&(f.current=k,e(k))},[]);q.useLayoutEffect(()=>{const _=c.current,k=h.current;if(!_||!k)return;d.current=window.matchMedia("(prefers-reduced-motion: reduce)").matches;const T=_.closest(".shell-main")??null,N=T??window;let E=0;const B=()=>{E=0;const F=_.getBoundingClientRect(),j=T?T.getBoundingClientRect().top:0,z=F.height-k.offsetHeight;if(z<=0)return;const U=Math.max(0,Math.min(1,(j+Nx-F.top)/z));u.current&&(u.current.style.transform=`scaleX(${U})`);const V=U*(ta-1);for(let I=0;I<ta;I++){const G=a.current[I];if(!G)continue;const D=I-V,W=Math.abs(D);G.style.opacity=String(Math.max(0,1-W/Eot)),G.style.transform=d.current?"none":`translate3d(0, ${D*Not}px, 0)`;const K=W<.5;G.style.zIndex=K?"2":"1",G.style.pointerEvents=K?"auto":"none";const tt=W<1.05;o.current[I]!==tt&&(o.current[I]=tt,G.classList.toggle("feat-panel--near",tt))}y(Math.round(V))};let O=0;const A=()=>{if(!T)return;const F=_.getBoundingClientRect(),j=F.height-k.offsetHeight;if(j<=0)return;const z=(T.getBoundingClientRect().top+Nx-F.top)/j;if(z<=.012||z>=.988)return;const V=(Math.round(z*(ta-1))/(ta-1)-z)*j;Math.abs(V)<Mot||T.scrollTo({top:T.scrollTop+V,behavior:d.current?"auto":"smooth"})},M=()=>{E||(E=requestAnimationFrame(B)),O&&clearTimeout(O),O=window.setTimeout(A,Aot)};return N.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M),B(),()=>{N.removeEventListener("scroll",M),window.removeEventListener("resize",M),E&&cancelAnimationFrame(E),O&&clearTimeout(O)}},[y]);const v=q.useCallback(_=>{const k=c.current,T=h.current,N=k==null?void 0:k.closest(".shell-main");if(!k||!T||!N){y(_);return}const E=k.getBoundingClientRect(),B=E.height-T.offsetHeight;if(B<=0){y(_);return}const A=_/(ta-1)*B-(N.getBoundingClientRect().top+Nx-E.top);N.scrollTo({top:N.scrollTop+A,behavior:d.current?"auto":"smooth"})},[y]);function C(_){var T;let k=f.current;if(_.key==="ArrowDown"||_.key==="ArrowRight")k=(f.current+1)%ta;else if(_.key==="ArrowUp"||_.key==="ArrowLeft")k=(f.current-1+ta)%ta;else if(_.key==="Home")k=0;else if(_.key==="End")k=ta-1;else return;_.preventDefault(),y(k),(T=n.current[k])==null||T.focus(),v(k)}return m.jsxs("section",{className:"about-section feat-section",children:[m.jsx("div",{className:"feat-scroller",ref:c,style:{"--feat-track-h":`${ta*Tot}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(r+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:w1.map((_,k)=>{const T=k===r;return m.jsxs("button",{ref:N=>{n.current[k]=N},id:g(k),role:"tab",type:"button","aria-selected":T,"aria-controls":x(k),tabIndex:T?0:-1,className:`feat-rail-item${T?" feat-rail-item--active":""}`,onClick:()=>{y(k),v(k)},children:[m.jsx("span",{className:"feat-rail-title",children:_.title}),_.tag&&m.jsx("span",{className:"feat-rail-tag",children:_.tag})]},_.id)})})]}),m.jsx("div",{className:"feat-stage",children:w1.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!==r,tabIndex:k===r?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(Om,{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:GA.length})]}),m.jsx("div",{className:"feat-more-grid",children:GA.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 Lot=[{cmd:"dreamcontext init",hint:"# set up the brain"},{cmd:"dreamcontext dashboard",hint:"# open this dashboard"},{cmd:"dreamcontext sleep",hint:"# consolidate the session"}];function Oot(){return m.jsxs("section",{className:"closing","aria-labelledby":"closing-heading",children:[m.jsx("h2",{className:"closing-title",id:"closing-heading",children:"So — what is this?"}),m.jsxs("p",{className:"closing-body",children:[m.jsx("strong",{children:"dreamcontext"})," is a small CLI that gives your AI coding agents a structured, persistent brain across sessions. It pre-loads what matters, keeps a living map of your project, and consolidates new knowledge as you go — so you stop paying, every single session, to re-teach the agent what it already learned."]}),m.jsx("div",{className:"closing-cmds",role:"list",children:Lot.map(r=>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:r.cmd}),m.jsx("span",{className:"closing-cmd-hint",children:r.hint})]},r.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 Rot(){return m.jsxs("div",{className:"about","data-testid":"about-page",children:[m.jsx($st,{}),m.jsx(zst,{}),m.jsx(sot,{}),m.jsx(cot,{}),m.jsx(uot,{}),m.jsx(dot,{}),m.jsx(pot,{}),m.jsx(Bot,{}),m.jsx(Oot,{})]})}function jot(){return dr({queryKey:["taxonomy"],queryFn:()=>ee.get("/taxonomy")})}const Dot={domain:"Domain",layer:"Layer",kind:"Kind",topic:"Topic"};function YA({tag:r,count:e,dimmed:i}){return m.jsxs("span",{className:`taxonomy-chip${i?" taxonomy-chip--dim":""}`,"data-hue":Va(r),title:e>0?`${e} use${e===1?"":"s"}`:"unused",children:[m.jsx("span",{className:"taxonomy-chip-label",children:r}),e>0&&m.jsx("span",{className:"taxonomy-chip-count",children:e})]})}function qp({label:r,count:e,children:i,defaultOpen:n=!1}){const[a,o]=q.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:r}),m.jsx("span",{className:"taxonomy-expandable-badge",children:e})]}),a&&m.jsx("div",{className:"taxonomy-expandable-body",children:i})]})}function Fot(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=jot();if(i)return m.jsx("div",{className:"loading",children:r("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:r("taxonomy.title")}),m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Faceted Tags"}),m.jsx("div",{className:"taxonomy-facets",children:u.map(f=>{const g=o.facetTags[f]??[];return g.length===0?null:m.jsxs("div",{className:"taxonomy-facet-group",children:[m.jsx("span",{className:"taxonomy-facet-label",children:Dot[f]??f}),m.jsx("div",{className:"taxonomy-chip-cluster",children:g.map(x=>{const y=c[x]??0;return m.jsx(YA,{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(YA,{tag:f,count:g,dimmed:g===0},f)})})]}),Object.keys(o.aliases).length>0&&m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Aliases"}),m.jsx("div",{className:"taxonomy-alias-list",children:Object.entries(o.aliases).map(([f,g])=>m.jsxs("div",{className:"taxonomy-alias-pair",children:[m.jsx("span",{className:"taxonomy-chip taxonomy-chip--alias","data-hue":Va(f),children:m.jsx("span",{className:"taxonomy-chip-label",children:f})}),m.jsx("span",{className:"taxonomy-alias-arrow","aria-hidden":"true",children:"→"}),m.jsx("span",{className:"taxonomy-chip","data-hue":Va(g),children:m.jsx("span",{className:"taxonomy-chip-label",children:g})})]},f))})]}),m.jsxs("section",{className:"taxonomy-section",children:[m.jsx("h2",{className:"taxonomy-section-heading",children:"Drift Audit"}),d?m.jsxs("div",{className:"taxonomy-healthy",children:[m.jsx("span",{className:"taxonomy-healthy-icon",children:"✓"}),m.jsx("span",{children:"Taxonomy healthy — no drift detected."})]}):m.jsxs("div",{className:"taxonomy-audit-panel",children:[m.jsx(qp,{label:"Untagged docs",count:h.untagged.length,defaultOpen:h.untagged.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.untagged.map(f=>m.jsx("li",{className:"taxonomy-audit-item",children:m.jsx("code",{children:f})},f))})}),m.jsx(qp,{label:"Non-canonical tags",count:h.nonCanonical.length,defaultOpen:h.nonCanonical.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.nonCanonical.map((f,g)=>m.jsxs("li",{className:"taxonomy-audit-item taxonomy-audit-item--suggest",children:[m.jsx("code",{className:"taxonomy-audit-doc",children:f.doc}),m.jsx("span",{className:"taxonomy-audit-tag",children:f.tag}),f.suggestion!==f.tag&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"taxonomy-alias-arrow","aria-hidden":"true",children:"→"}),m.jsx("span",{className:"taxonomy-audit-suggestion",children:f.suggestion})]})]},g))})}),m.jsx(qp,{label:"Orphan tags",count:h.orphan.length,defaultOpen:h.orphan.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.orphan.map(f=>m.jsx("li",{className:"taxonomy-audit-item",children:m.jsx("span",{className:"taxonomy-audit-tag",children:f})},f))})}),m.jsx(qp,{label:"Near-duplicates",count:h.nearDups.length,defaultOpen:h.nearDups.length>0,children:m.jsx("ul",{className:"taxonomy-audit-list",children:h.nearDups.map(([f,g],x)=>m.jsxs("li",{className:"taxonomy-audit-item taxonomy-audit-item--pair",children:[m.jsx("span",{className:"taxonomy-audit-tag",children:f}),m.jsx("span",{className:"taxonomy-alias-arrow","aria-hidden":"true",children:"≈"}),m.jsx("span",{className:"taxonomy-audit-tag",children:g})]},x))})})]})]})]})}const Iot=["tasks.members","tasks.delete","tasks.sync"];function $ot(){const{data:r}=dr({queryKey:["health"],queryFn:()=>ee.get("/health"),staleTime:6e4,retry:1});if(!r)return null;const e=r.capabilities??[];return Iot.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 KA=new vI({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function zot({nav:r}){const e=(i,n)=>{const a={tasks:"tasks",features:"features",knowledge:"knowledge",core:"core"};r.navigate(a[i],n)};switch(r.page){case"brain":return m.jsx(Wat,{onNavigate:e});case"tasks":return m.jsx(qnt,{});case"sleep":return m.jsx(Gnt,{});case"core":return m.jsx(oat,{onNavigateTaxonomy:()=>r.navigate("taxonomy",null)});case"knowledge":return m.jsx(_at,{});case"features":return m.jsx(kat,{});case"council":return m.jsx(vst,{});case"settings":return m.jsx(Ost,{});case"packs":return m.jsx(Ist,{});case"taxonomy":return m.jsx(Fot,{});case"about":return m.jsx(Rot,{})}}class Ax extends q.Component{constructor(){super(...arguments);pe(this,"state",{error:null})}static getDerivedStateFromError(i){return{error:i}}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 jD=new URLSearchParams(window.location.search),S1=jD.get("vault"),Pot=jD.get("capture")==="1";S1&&bM(S1);function qot(){return q.useEffect(()=>{GG().then(e=>Tv(e));const r=e=>{(e.key===null||e.key===JB)&&Tv(fC())};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[]),null}function Uot(){return Pot?m.jsx(Ax,{children:m.jsx(tY,{})}):S1?m.jsx(Ax,{children:m.jsx(l2,{client:KA,children:m.jsx(nY,{children:m.jsx(lE,{children:m.jsxs(rY,{children:[m.jsx($ot,{}),m.jsx(git,{children:r=>m.jsx(zot,{nav:r})})]})})})})}):m.jsx(Ax,{children:m.jsx(l2,{client:KA,children:m.jsxs(lE,{children:[m.jsx(qot,{}),m.jsx(BW,{})]})})})}X4.createRoot(document.getElementById("root")).render(m.jsx(q.StrictMode,{children:m.jsx(Uot,{})}));export{AL as $,Jot as A,Oo as B,hY as C,Vr as D,CK as E,$C as F,bL as G,oX as H,zK as I,GV as J,SY as K,Td as L,Zot as M,km as N,eK as O,EL as P,dE as Q,BK as R,Rv as S,sX as T,Yd as U,Ta as V,wt as W,Ct as X,cK as Y,QV as Z,L as _,gK as a,z9 as a$,EK as a0,mE as a1,gE as a2,olt as a3,rlt as a4,alt as a5,nlt as a6,tlt as a7,CC as a8,slt as a9,CQ as aA,vQ as aB,LB as aC,ZH as aD,wZ as aE,dL as aF,NK as aG,$d as aH,Xot as aI,sm as aJ,mg as aK,hP as aL,XM as aM,Zd as aN,_Z as aO,CZ as aP,QH as aQ,D1 as aR,xo as aS,Cd as aT,w2 as aU,kz as aV,XP as aW,iB as aX,nB as aY,$9 as aZ,gg as a_,elt as aa,Bc as ab,clt as ac,llt as ad,ilt as ae,VZ as af,H5 as ag,xlt as ah,KV as ai,an as aj,$s as ak,Ru as al,zC as am,$R as an,Pl as ao,UR as ap,Le as aq,Ya as ar,ae as as,ZQ as at,blt as au,vlt as av,mlt as aw,he as ax,ylt as ay,TQ as az,pK as b,bg as b$,Eh as b0,dl as b1,jq as b2,W2 as b3,_a as b4,FP as b5,H1 as b6,L9 as b7,P9 as b8,Nh as b9,EH as bA,bU as bB,fe as bC,JH as bD,yU as bE,cB as bF,iT as bG,Bl as bH,b$ as bI,lt as bJ,q as bK,mH as bL,AH as bM,MH as bN,m as bO,I2 as bP,HP as bQ,ZP as bR,tq as bS,am as bT,U9 as bU,U1 as bV,ZM as bW,t7 as bX,$q as bY,Uq as bZ,Ud as b_,VP as ba,QP as bb,Y9 as bc,qP as bd,q1 as be,rT as bf,oe as bg,HR as bh,n_ as bi,Cn as bj,mz as bk,j1 as bl,DM as bm,qd as bn,$M as bo,Vot as bp,j2 as bq,R2 as br,cY as bs,ki as bt,ant as bu,xr as bv,G1 as bw,NH as bx,TH as by,bH as bz,ur as c,qo as c0,eT as c1,W1 as c2,QM as c3,av as c4,Wot as c5,De as c6,sM as c7,Y4 as c8,Yot as c9,E1 as ca,Got as cb,_e as d,NL as e,Ci as f,yK as g,Ds as h,ka as i,ZV as j,Kd as k,Bt as l,PR as m,Qot as n,_lt as o,bK as p,xK as q,Clt as r,mK as s,YV as t,ba as u,gQ as v,hX as w,hlt as x,Do as y,fK as z};
|