@inkeep/open-knowledge 0.6.0-beta.9 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +37 -1
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +101 -33
- package/dist/cli.mjs +40 -40
- package/dist/config-schema.json +20 -0
- package/dist/config.project.schema.json +20 -0
- package/dist/constants-BqW_5Zct.mjs +2 -0
- package/dist/{dist-soQLoIV1.mjs → dist-C3d5vMka.mjs} +152 -61
- package/dist/dist-DHCla-dZ.mjs +1 -0
- package/dist/{git-handle-DwfYp_z--CfyPz4Dz.mjs → git-handle-CjyGVy33-CK0dYQ8y.mjs} +2 -2
- package/dist/git-handle-CjyGVy33-DVACqhWk.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-BG3i7h4P.mjs → init-DbKyc-NP.mjs} +7 -7
- package/dist/init-_Gb8p_KN.mjs +1 -0
- package/dist/loader-BorPcYdC.mjs +1 -0
- package/dist/{loader-4X5eR4wo.mjs → loader-DPtC9EX7.mjs} +3 -3
- package/dist/preview-BSw2DxmP.mjs +1 -0
- package/dist/{preview-fk1DB9JQ.mjs → preview-DKceAysF.mjs} +2 -2
- package/dist/public/assets/ActivityModeContent-f87lu1R1.js +2 -0
- package/dist/public/assets/{ActivityPanelDiffView-BN3fSrLi.js → ActivityPanelDiffView-LNHry3BJ.js} +2 -2
- package/dist/public/assets/ConsentDialogBody-RTxXUjwn.js +2 -0
- package/dist/public/assets/DocumentContext-BVFYhVUK.js +58 -0
- package/dist/public/assets/GraphPanel-0aB3TF2C.js +46 -0
- package/dist/public/assets/McpConsentDialogBody-cnhKG6kN.js +1 -0
- package/dist/public/assets/SettingsDialogBody-B_UH7Jye.js +7 -0
- package/dist/public/assets/{SourceEditor-_oSCmouY.js → SourceEditor-C3ri5HiW.js} +2 -2
- package/dist/public/assets/{_baseFor-BQ6FmUXQ.js → _baseFor-B3FCzyNW.js} +1 -1
- package/dist/public/assets/{agent-presence-DUe_PdKt.js → agent-presence-DxGcS3q2.js} +1 -1
- package/dist/public/assets/{arc-BTYHqK6I.js → arc-GOD6SLHR.js} +1 -1
- package/dist/public/assets/architecture-YZFGNWBL-B2pJrg2X.js +1 -0
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-BeBUNHfZ.js → architectureDiagram-Q4EWVU46-CIVh0TLx.js} +1 -1
- package/dist/public/assets/{blockDiagram-DXYQGD6D-DsdTvw8_.js → blockDiagram-DXYQGD6D-Cg-UHasz.js} +1 -1
- package/dist/public/assets/button-DenIdY-r.js +1 -0
- package/dist/public/assets/{c4Diagram-AHTNJAMY-C-rFnJCR.js → c4Diagram-AHTNJAMY-KFeHAAOO.js} +1 -1
- package/dist/public/assets/channel-BqqURnVG.js +1 -0
- package/dist/public/assets/{checkbox-DlLMG5cc.js → checkbox-BSqPN8L7.js} +1 -1
- package/dist/public/assets/{chunk-2KRD3SAO-C0VEmSSK.js → chunk-2KRD3SAO-ChBquZUZ.js} +1 -1
- package/dist/public/assets/{chunk-336JU56O-gb9mgyWz.js → chunk-336JU56O-DHqaXNrn.js} +2 -2
- package/dist/public/assets/chunk-426QAEUC-CuPmuy8t.js +1 -0
- package/dist/public/assets/{chunk-4BX2VUAB-CqFQlA48.js → chunk-4BX2VUAB-Dagml-_v.js} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-SWtNUTYl.js → chunk-4TB4RGXK-QLafKs7A.js} +1 -1
- package/dist/public/assets/chunk-55IACEB6-BRPDx2aU.js +1 -0
- package/dist/public/assets/{chunk-5FUZZQ4R-CwnM4vYi.js → chunk-5FUZZQ4R-DoG5zk7O.js} +1 -1
- package/dist/public/assets/{chunk-5PVQY5BW-D1dRE2Kl.js → chunk-5PVQY5BW--zDnbXdQ.js} +1 -1
- package/dist/public/assets/{chunk-67CJDMHE-DaOHFcoK.js → chunk-67CJDMHE-BDDJCVvR.js} +1 -1
- package/dist/public/assets/{chunk-7N4EOEYR-DxJSpCGX.js → chunk-7N4EOEYR-DcM-tXJf.js} +1 -1
- package/dist/public/assets/{chunk-AA7GKIK3-Ck4Wrqot.js → chunk-AA7GKIK3-CIk9DOam.js} +1 -1
- package/dist/public/assets/{chunk-BSJP7CBP-c353z_ln.js → chunk-BSJP7CBP-CC13npHT.js} +1 -1
- package/dist/public/assets/{chunk-CIAEETIT-fgTeYGb2.js → chunk-CIAEETIT-B7rpgB3I.js} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-DgNhZfoF.js → chunk-EDXVE4YY-BfT15Ufb.js} +1 -1
- package/dist/public/assets/{chunk-ENJZ2VHE-BuXqjNcc.js → chunk-ENJZ2VHE-DEtEhITq.js} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-c2vVGInH.js → chunk-FMBD7UC4-DXl_nUYs.js} +1 -1
- package/dist/public/assets/{chunk-FOC6F5B3-CH9dNZl0.js → chunk-FOC6F5B3-wEKzMqND.js} +1 -1
- package/dist/public/assets/{chunk-ICPOFSXX-JDKZSS0Z.js → chunk-ICPOFSXX-C8AElYY_.js} +2 -2
- package/dist/public/assets/{chunk-K5T4RW27-DPAjYSpe.js → chunk-K5T4RW27-DcJgbIMU.js} +1 -1
- package/dist/public/assets/{chunk-KGLVRYIC-BKUgXOPp.js → chunk-KGLVRYIC-kNC4I9ls.js} +1 -1
- package/dist/public/assets/{chunk-LIHQZDEY-CWn5kZJ_.js → chunk-LIHQZDEY-B0zYcYPV.js} +1 -1
- package/dist/public/assets/{chunk-ORNJ4GCN-BETATk1q.js → chunk-ORNJ4GCN-S_3Y_0FS.js} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-Dj48iVpu.js → chunk-OYMX7WX6-CX3nrwxJ.js} +1 -1
- package/dist/public/assets/chunk-QZHKN3VN-CTZ4su3-.js +1 -0
- package/dist/public/assets/{chunk-U2HBQHQK-CHYJZdMm.js → chunk-U2HBQHQK-CfAyyLJz.js} +1 -1
- package/dist/public/assets/{chunk-X2U36JSP-CXEQobKO.js → chunk-X2U36JSP-CmACymAN.js} +1 -1
- package/dist/public/assets/{chunk-XPW4576I-BQtjckSw.js → chunk-XPW4576I-D1s3NdKZ.js} +1 -1
- package/dist/public/assets/{chunk-YZCP3GAM-CjxtydJy.js → chunk-YZCP3GAM-CiWxV9XS.js} +1 -1
- package/dist/public/assets/{chunk-ZZ45TVLE-D0y4RiW0.js → chunk-ZZ45TVLE-B7t5_MqN.js} +1 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-DrN_pUa5.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-C1MJ1Ukt.js +1 -0
- package/dist/public/assets/clone-CecJCxEU.js +1 -0
- package/dist/public/assets/{collapsible-DfUFsfqv.js → collapsible-BhpeB6tu.js} +1 -1
- package/dist/public/assets/compiler-runtime-Cs91PcD2.js +1 -0
- package/dist/public/assets/config-validation-events-BQa42yM4.js +11 -0
- package/dist/public/assets/{cose-bilkent-S5V4N54A-D7YGD8wq.js → cose-bilkent-S5V4N54A-BjJ-OKPr.js} +1 -1
- package/dist/public/assets/{dagre-DMcENKoE.js → dagre-BuFRtOcC.js} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-BqnXUWtP.js → dagre-KV5264BT-BpBW6R71.js} +1 -1
- package/dist/public/assets/{diagram-5BDNPKRD-vW7QcnnV.js → diagram-5BDNPKRD-B5phtkJp.js} +1 -1
- package/dist/public/assets/{diagram-G4DWMVQ6-Da6SwXmu.js → diagram-G4DWMVQ6-tjReW6yx.js} +1 -1
- package/dist/public/assets/{diagram-MMDJMWI5-dI7u2q2_.js → diagram-MMDJMWI5-b4CgKryF.js} +1 -1
- package/dist/public/assets/{diagram-TYMM5635-CPHmeIdk.js → diagram-TYMM5635-D5B0g2lj.js} +1 -1
- package/dist/public/assets/dialog-C1dBa8-m.js +45 -0
- package/dist/public/assets/{dist-BPdgMMrT.js → dist-CadHdAvi.js} +1 -1
- package/dist/public/assets/{dist-Wjnnj7ws.js → dist-CdAufVHw.js} +1 -1
- package/dist/public/assets/{dist-rBb7QGSM.js → dist-Cwt7KtW7.js} +1 -1
- package/dist/public/assets/{dist-DBGkcnST.js → dist-DRBAXDc3.js} +1 -1
- package/dist/public/assets/{dist-ChXyuS-V.js → dist-DkR43q3h.js} +1 -1
- package/dist/public/assets/{dist-BzP1Tn1M.js → dist-sw9fzKjM.js} +1 -1
- package/dist/public/assets/{dist-J4_ocm9a.js → dist-y5PvfJVO.js} +1 -1
- package/dist/public/assets/{erDiagram-SMLLAGMA-DitwrtLX.js → erDiagram-SMLLAGMA-CRJz10Jv.js} +1 -1
- package/dist/public/assets/{flatten-ptFIxnDZ.js → flatten-BWAerz3O.js} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-C0gFyX_S.js → flowDiagram-DWJPFMVM-BDCJTgJ7.js} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-tiotNOZI.js → ganttDiagram-T4ZO3ILL-cPQKlGYc.js} +1 -1
- package/dist/public/assets/gitGraph-7Q5UKJZL-BMann5g7.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-DMvh5XLj.js → gitGraphDiagram-UUTBAWPF-BMyjc352.js} +1 -1
- package/dist/public/assets/{graphlib-BrqdZy8t.js → graphlib-BU8FnRz1.js} +1 -1
- package/dist/public/assets/index-7FUClmdK.css +1 -0
- package/dist/public/assets/index-ItRM_S62.js +1915 -0
- package/dist/public/assets/info-OMHHGYJF-CKMkwFH6.js +1 -0
- package/dist/public/assets/{infoDiagram-42DDH7IO-DKk8uvIK.js → infoDiagram-42DDH7IO-BZ6v5y-j.js} +1 -1
- package/dist/public/assets/{isEmpty-Dff4GQVw.js → isEmpty-Cairwk5V.js} +1 -1
- package/dist/public/assets/isSymbol-BKUBGC2u.js +1 -0
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-CdKANno1.js → ishikawaDiagram-UXIWVN3A-DA7_P2Up.js} +1 -1
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-DbR4q1G1.js → journeyDiagram-VCZTEJTY-CzZoB161.js} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-dx60koQU.js → kanban-definition-6JOO6SKY-DKg7pXv1.js} +1 -1
- package/dist/public/assets/{label-D2tjsHNp.js → label-DCMZaJ38.js} +1 -1
- package/dist/public/assets/{line--3PJLF7I.js → line-DGc-MCyQ.js} +1 -1
- package/dist/public/assets/{linear-B5hCL-s4.js → linear-D6wzOaQP.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-DfyX5Z2V.js → mermaid-parser.core-Bm2u0Ges.js} +2 -2
- package/dist/public/assets/{mermaid.core-3naqvDT_.js → mermaid.core-DRx0wZe0.js} +3 -3
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-B6GzcY6Y.js → mindmap-definition-QFDTVHPH-C9GRZxO6.js} +1 -1
- package/dist/public/assets/{now-y3Cm704C.js → now-BN_Nj6nz.js} +1 -1
- package/dist/public/assets/{ordinal-CdtiT3iH.js → ordinal-Dk6d5Y-0.js} +1 -1
- package/dist/public/assets/packet-4T2RLAQJ-DXn_0fd3.js +1 -0
- package/dist/public/assets/{panel-CxlToFCs.js → panel-BNBODYwB.js} +1 -1
- package/dist/public/assets/pie-ZZUOXDRM-BdZBZPW9.js +1 -0
- package/dist/public/assets/{pieDiagram-DEJITSTG-DpAjvB-E.js → pieDiagram-DEJITSTG-L6I3ft9Z.js} +1 -1
- package/dist/public/assets/prop-types-C7ZcPhvT.js +495 -0
- package/dist/public/assets/{propagation-api-CobBjsTC.js → propagation-api-3kmMXRwS.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-Cfy7zW3N.js → quadrantDiagram-34T5L4WZ-Dp2IeEPC.js} +1 -1
- package/dist/public/assets/radar-PYXPWWZC-yUE2OrUV.js +1 -0
- package/dist/public/assets/{reduce-C8tvPXVb.js → reduce-CSWSFqzz.js} +1 -1
- package/dist/public/assets/{requirementDiagram-MS252O5E-Bq0qocwq.js → requirementDiagram-MS252O5E-BxNWyIZg.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-Cs_gUjif.js → sankeyDiagram-XADWPNL6-CRn0_xkw.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-mAj4_C_D.js → sequenceDiagram-FGHM5R23-Drkjb1j4.js} +1 -1
- package/dist/public/assets/{src-BqeO7p9A.js → src-DZeiyxTL.js} +1 -1
- package/dist/public/assets/{stateDiagram-FHFEXIEX-Dl7UQcWR.js → stateDiagram-FHFEXIEX-BBUFKS0u.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BtYsWsIg.js +1 -0
- package/dist/public/assets/target-navigation-intent-B_XxwO2E.js +1 -0
- package/dist/public/assets/{telemetry-impl-4gFdQtY5.js → telemetry-impl-DPRMO_b_.js} +2 -2
- package/dist/public/assets/{textarea-CzzwWKq0.js → textarea-C_bHQrXh.js} +1 -1
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-BsJlKEZE.js → timeline-definition-GMOUNBTQ-CLoe9y-z.js} +1 -1
- package/dist/public/assets/toggle-group-vVm0xmLD.js +1 -0
- package/dist/public/assets/treeView-SZITEDCU-BjJ_gnFc.js +1 -0
- package/dist/public/assets/treemap-W4RFUUIX-DiV984fD.js +1 -0
- package/dist/public/assets/typing-burst-detector-CC-taYRN.js +2 -0
- package/dist/public/assets/{vennDiagram-DHZGUBPP-8a9bTsJc.js → vennDiagram-DHZGUBPP-q2zdiy4F.js} +1 -1
- package/dist/public/assets/wardley-RL74JXVD-DbPCtCHV.js +1 -0
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-C_5vGuXg.js → wardleyDiagram-NUSXRM2D-Njg6YHso.js} +1 -1
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-C-11ks2d.js → xychartDiagram-5P7HB3ND-Ct8Wgp45.js} +1 -1
- package/dist/public/index.html +28 -29
- package/dist/{repair-launch-json-ChOioNjY.mjs → repair-launch-json-C0A-MS1q.mjs} +2 -2
- package/dist/{repair-mcp-configs-KXG6sJju.mjs → repair-mcp-configs-C-anXKkD.mjs} +2 -2
- package/dist/schemas/v0/config.project.schema.json +20 -0
- package/dist/{server-lock-D7DXNVql-BRVVzA6T.mjs → server-lock-BniQ3qki-CadPGoZN.mjs} +1 -1
- package/dist/server-lock-BniQ3qki-DjKtnzVr.mjs +1 -0
- package/dist/{src-C-7gHcnB.mjs → src-D4AydmJF.mjs} +2 -2
- package/dist/{start-vBx0y7gg.mjs → start-BW-lqkFX.mjs} +2 -2
- package/dist/start-CK8Xftdg.mjs +1 -0
- package/package.json +2 -2
- package/dist/constants-CkYsa36O.mjs +0 -2
- package/dist/dist-7_PKsuCz.mjs +0 -1
- package/dist/git-handle-DwfYp_z--DreW3fNC.mjs +0 -1
- package/dist/init-CGZULhvc.mjs +0 -1
- package/dist/loader-DOJXinKb.mjs +0 -1
- package/dist/preview-DCei46zt.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-DMKML_zC.js +0 -2
- package/dist/public/assets/ConsentDialogBody-C5uHYfEW.js +0 -2
- package/dist/public/assets/DocumentContext-CP8suU6i.js +0 -62
- package/dist/public/assets/GraphPanel-Dk9s6BR5.js +0 -46
- package/dist/public/assets/McpConsentDialogBody-BfIuibLb.js +0 -1
- package/dist/public/assets/SettingsDialogBody-DD8SsPLc.js +0 -7
- package/dist/public/assets/architecture-YZFGNWBL-haHjZ-W1.js +0 -1
- package/dist/public/assets/button-JrGyO3-P.js +0 -1
- package/dist/public/assets/channel-BrrATp5X.js +0 -1
- package/dist/public/assets/chunk-426QAEUC-WS9k1tU2.js +0 -1
- package/dist/public/assets/chunk-55IACEB6-mJDPihNE.js +0 -1
- package/dist/public/assets/chunk-QZHKN3VN-B5CMAE_s.js +0 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-CQWW9Gah.js +0 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-BLv6Pgu5.js +0 -1
- package/dist/public/assets/clone-bY7YorPK.js +0 -1
- package/dist/public/assets/compiler-runtime-CVnuRdak.js +0 -1
- package/dist/public/assets/config-validation-events-OLcd2xaS.js +0 -10
- package/dist/public/assets/dialog-bA5Nvc2p.js +0 -45
- package/dist/public/assets/dist-CQw2y-s3.js +0 -1
- package/dist/public/assets/doc-hash-BrKkCdCz.js +0 -423
- package/dist/public/assets/gitGraph-7Q5UKJZL-EPtzLtdn.js +0 -1
- package/dist/public/assets/index-CXzfIokG.css +0 -1
- package/dist/public/assets/index-DoV-kWhK.js +0 -1916
- package/dist/public/assets/info-OMHHGYJF-DhGHQOTJ.js +0 -1
- package/dist/public/assets/isSymbol-DIRIUNhN.js +0 -1
- package/dist/public/assets/packet-4T2RLAQJ-dOkbaGJi.js +0 -1
- package/dist/public/assets/pie-ZZUOXDRM-7mxWmZMD.js +0 -1
- package/dist/public/assets/radar-PYXPWWZC-CYrvwt0c.js +0 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BBPg5CA6.js +0 -1
- package/dist/public/assets/target-navigation-intent-B5Xuyiwx.js +0 -1
- package/dist/public/assets/toggle-group-Dzandm58.js +0 -1
- package/dist/public/assets/treeView-SZITEDCU-bf7fN5vg.js +0 -1
- package/dist/public/assets/treemap-W4RFUUIX-DeijdxYt.js +0 -1
- package/dist/public/assets/typing-burst-detector-tbQ3pXg5.js +0 -2
- package/dist/public/assets/wardley-RL74JXVD-XbGOizT8.js +0 -1
- package/dist/server-lock-D7DXNVql-B5nINglj.mjs +0 -1
- package/dist/start-CNPhu259.mjs +0 -1
- /package/dist/public/assets/{__vite-browser-external-CCyf2WTU.js → __vite-browser-external-Bet_nOzq.js} +0 -0
- /package/dist/public/assets/{array-B4rubdDx.js → array-DfeqBzds.js} +0 -0
- /package/dist/public/assets/{colors-DTkp5rhC.js → colors-CuFmRbNJ.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-lL68JtBB.js → cytoscape.esm-C3hcpWGW.js} +0 -0
- /package/dist/public/assets/{defaultLocale-VDKImYxX.js → defaultLocale-CmG7Nywc.js} +0 -0
- /package/dist/public/assets/{dist-Df8SLnPf.js → dist-GFox5lpz.js} +0 -0
- /package/dist/public/assets/{go-D1ad2i41.js → go-BjDSeE19.js} +0 -0
- /package/dist/public/assets/{init-B4uw1rya.js → init-D-V7N9g_.js} +0 -0
- /package/dist/public/assets/{isObjectLike-DkPsJ8ZC.js → isObjectLike-HLvQwJYx.js} +0 -0
- /package/dist/public/assets/{katex-qwlL5fSd.js → katex-DX-tM4Fr.js} +0 -0
- /package/dist/public/assets/{mcp-consent-store-DncCuarR.js → mcp-consent-store-19Boxoxe.js} +0 -0
- /package/dist/public/assets/{min-DTUJKQNu.js → min-CHzARyU6.js} +0 -0
- /package/dist/public/assets/{path-flVp2dgl.js → path-Bf8MP5yP.js} +0 -0
- /package/dist/public/assets/{pdf-zy6UKR6F.js → pdf-wFLJduM2.js} +0 -0
- /package/dist/public/assets/{pdf.worker-CETvIAHl.js → pdf.worker-CP44mBOj.js} +0 -0
- /package/dist/public/assets/{project-paths-6yNxfBJd.js → project-paths-eyh51nmQ.js} +0 -0
- /package/dist/public/assets/{rough.esm-pmFy2cex.js → rough.esm-Di0388iR.js} +0 -0
- /package/dist/public/assets/{shell-FUK9YCOo.js → shell-184Lov7C.js} +0 -0
- /package/dist/public/assets/{src-CdWhPaRj.js → src-Dz70a8sm.js} +0 -0
- /package/dist/public/assets/{stex-BUy0wSq4.js → stex-DxnLy7rA.js} +0 -0
- /package/dist/public/assets/{trace-api-3dczfLSc.js → trace-api-CiCjX4Sz.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-BSTW6KzM.js → w3c-keyname-B5t0fahT.js} +0 -0
|
@@ -0,0 +1,1915 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./telemetry-impl-DPRMO_b_.js","./chunk-CFjPhJqf.js","./preload-helper-2ej06EnG.js","./trace-api-CiCjX4Sz.js","./propagation-api-3kmMXRwS.js","./ConsentDialogBody-RTxXUjwn.js","./compiler-runtime-Cs91PcD2.js","./button-DenIdY-r.js","./checkbox-BSqPN8L7.js","./dialog-C1dBa8-m.js","./collapsible-BhpeB6tu.js","./textarea-C_bHQrXh.js","./project-paths-eyh51nmQ.js","./McpConsentDialogBody-cnhKG6kN.js","./label-DCMZaJ38.js","./mcp-consent-store-19Boxoxe.js","./ActivityPanelDiffView-LNHry3BJ.js","./ActivityPanelDiffView-legcy4jI.css","./GraphPanel-0aB3TF2C.js","./prop-types-C7ZcPhvT.js","./w3c-keyname-B5t0fahT.js","./toggle-group-vVm0xmLD.js","./panel-BNBODYwB.js","./min-CHzARyU6.js","./src-Dz70a8sm.js","./colors-CuFmRbNJ.js","./ordinal-Dk6d5Y-0.js","./init-D-V7N9g_.js","./isObjectLike-HLvQwJYx.js","./now-BN_Nj6nz.js","./isSymbol-BKUBGC2u.js","./target-navigation-intent-B_XxwO2E.js","./ActivityModeContent-f87lu1R1.js","./DocumentContext-BVFYhVUK.js","./dist-Cwt7KtW7.js","./dist-sw9fzKjM.js","./dist-DkR43q3h.js","./dist-y5PvfJVO.js","./dist-CadHdAvi.js","./stex-DxnLy7rA.js","./DocumentContext-B0sQn39F.css","./agent-presence-DxGcS3q2.js","./SettingsDialogBody-B_UH7Jye.js","./config-validation-events-BQa42yM4.js","./SourceEditor-C3ri5HiW.js","./typing-burst-detector-CC-taYRN.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e,t}from"./chunk-CFjPhJqf.js";import{t as n}from"./preload-helper-2ej06EnG.js";import{a as r,i,n as a,o,r as s,t as c}from"./compiler-runtime-Cs91PcD2.js";import{$ as l,$t as u,A as d,An as f,At as p,B as m,Bn as h,Bt as g,C as _,Cn as v,Ct as y,Dn as b,Dt as x,En as S,Et as C,Fn as w,Ft as T,G as E,Gn as D,Gt as O,Hn as k,Ht as A,In as j,It as M,J as N,Jn as P,Jt as F,K as I,Kn as L,Kt as R,L as z,Ln as B,Lt as V,Mn as H,Mt as U,Nn as W,Nt as G,On as K,Ot as ee,Pn as q,Pt as te,Q as ne,Qn as re,R as ie,Rn as ae,Rt as oe,S as se,Sn as ce,St as le,T as J,Tn as ue,Tt as de,U as fe,Un as pe,Ut as me,V as he,Vn as ge,Vt as _e,W as ve,Wn as ye,Wt as be,X as xe,Xn as Se,Xt as Ce,Y as we,Yn as Te,Yt as Ee,Z as De,Zn as Oe,Zt as ke,_ as Ae,_n as je,a as Me,ar as Ne,at as Pe,bn as Fe,bt as Ie,c as Le,ct as Re,d as ze,dn as Be,dt as Ve,er as Y,et as He,f as Ue,fn as We,ft as Ge,g as Ke,gn as qe,hn as Je,ht as Ye,i as Xe,ir as Ze,it as Qe,j as $e,jn as et,jt as tt,kn as nt,kt as rt,l as it,lt as at,m as ot,mn as st,mt as ct,n as lt,nr as ut,nt as dt,o as ft,or as pt,ot as mt,p as ht,pn as gt,pt as _t,q as vt,qn as yt,qt as bt,r as xt,rr as St,rt as Ct,s as wt,sr as Tt,st as Et,t as Dt,tt as Ot,u as kt,ut as At,vn as jt,vt as Mt,w as Nt,wn as Pt,wt as Ft,x as It,xn as Lt,xt as Rt,yn as zt,yt as Bt,z as Vt,zn as Ht,zt as Ut}from"./DocumentContext-BVFYhVUK.js";import{A as Wt,C as Gt,D as Kt,E as qt,O as Jt,S as Yt,T as Xt,_ as Zt,a as Qt,b as $t,c as en,d as tn,f as nn,g as rn,h as an,i as on,k as sn,l as cn,m as ln,n as un,o as dn,p as fn,r as pn,s as mn,t as hn,u as gn,v as _n,w as vn,x as yn,y as bn}from"./panel-BNBODYwB.js";import{$ as xn,$n as Sn,$r as Cn,A as wn,An as Tn,B as En,C as Dn,Ci as On,Cn as kn,Cr as An,Ct as jn,D as Mn,E as Nn,En as Pn,Er as Fn,Et as In,Fn as Ln,G as Rn,Gt as zn,H as Bn,Hr as Vn,It as Hn,K as Un,Kr as Wn,Ln as Gn,M as Kn,Mn as qn,Mr as Jn,Nr as Yn,O as Xn,Ot as Zn,Pr as Qn,Q as $n,R as er,Si as tr,Sn as nr,Sr as rr,St as ir,T as ar,Tn as or,Tr as sr,U as cr,Un as lr,Ur as ur,V as dr,Vn as fr,Vr as pr,W as mr,Wn as hr,Xt as gr,Yr as _r,Z as vr,_ as yr,_n as br,_t as xr,a as Sr,bi as Cr,br as wr,c as Tr,d as Er,f as Dr,fn as Or,fr as kr,gn as Ar,hn as jr,i as Mr,j as Nr,jn as Pr,jr as Fr,k as Ir,kn as Lr,kr as Rr,kt as zr,l as Br,ln as Vr,mn as Hr,mt as Ur,n as Wr,ni as Gr,nr as Kr,o as qr,p as Jr,q as Yr,qr as Xr,qt as Zr,r as Qr,ri as $r,rn as ei,rt as ti,s as ni,ti as ri,u as ii,vi as X,vt as ai,w as oi,wn as si,wr as ci,wt as li,xi as ui,xt as di,y as fi,yi as pi,yr as mi,z as hi,zn as gi}from"./prop-types-C7ZcPhvT.js";import{C as _i,S as vi,d as yi,g as bi,l as xi,m as Si,o as Ci,p as wi,t as Ti,w as Ei,x as Di}from"./button-DenIdY-r.js";import{a as Oi,c as ki,d as Ai,f as ji,i as Mi,l as Ni,m as Pi,n as Fi,o as Ii,p as Li,r as Ri,s as zi,t as Bi,u as Vi}from"./agent-presence-DxGcS3q2.js";import{$ as Hi,A as Ui,At as Wi,B as Gi,Bt as Ki,C as qi,Ct as Ji,D as Yi,Dt as Xi,E as Zi,Et as Qi,F as $i,Ft as ea,G as ta,H as na,I as ra,It as ia,J as aa,K as oa,L as sa,M as ca,Mt as la,N as ua,Nt as da,O as fa,Ot as pa,P as ma,Pt as ha,Q as ga,R as _a,Rt as va,S as ya,St as ba,T as xa,Tt as Sa,U as Ca,V as wa,W as Ta,X as Ea,Y as Da,Z as Oa,_ as ka,_t as Aa,a as ja,at as Ma,b as Na,bt as Pa,ct as Fa,dt as Ia,et as La,ft as Ra,g as za,gt as Ba,h as Va,ht as Ha,it as Ua,j as Wa,jt as Ga,k as Ka,kt as qa,lt as Ja,m as Ya,mt as Xa,nt as Za,o as Qa,ot as $a,p as eo,pt as to,q as no,r as ro,rt as io,st as ao,t as oo,tt as so,u as co,ut as lo,v as uo,vt as fo,w as po,wt as mo,x as ho,xt as go,y as _o,yt as vo,z as yo,zt as bo}from"./config-validation-events-BQa42yM4.js";import{n as xo,r as So,s as Co,t as wo}from"./toggle-group-vVm0xmLD.js";import{C as To,S as Eo,a as Do,b as Oo,c as ko,d as Ao,f as jo,h as Mo,i as No,m as Po,n as Fo,o as Io,p as Lo,s as Ro,t as zo,u as Bo,x as Vo}from"./dialog-C1dBa8-m.js";import{a as Ho,i as Uo,n as Wo,r as Go,t as Ko}from"./collapsible-BhpeB6tu.js";import{t as qo}from"./checkbox-BSqPN8L7.js";import{t as Jo}from"./label-DCMZaJ38.js";import{i as Yo,n as Xo,r as Zo}from"./project-paths-eyh51nmQ.js";import{n as Qo,t as $o}from"./mcp-consent-store-19Boxoxe.js";import{$ as es,At as ts,Ct as ns,Dt as rs,Ft as is,I as as,It as os,J as ss,Mt as cs,Ot as ls,Pt as us,Q as ds,Tt as fs,X as ps,Z as ms,at as hs,bt as gs,c as _s,jt as vs,k as ys,w as bs}from"./dist-sw9fzKjM.js";import{n as xs}from"./dist-DkR43q3h.js";import{n as Ss,o as Cs,r as ws,t as Ts}from"./typing-burst-detector-CC-taYRN.js";import{t as Es}from"./target-navigation-intent-B_XxwO2E.js";import"./textarea-C_bHQrXh.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function Ds(){({BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1})?.VITE_OTEL_ENABLED===`true`&&n(()=>import(`./telemetry-impl-DPRMO_b_.js`).then(e=>e.install()),__vite__mapDeps([0,1,2,3,4]),import.meta.url)}function Os(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{rn(e,()=>t.signal,()=>n=!0)},u=bn(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?_n:Zt;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?As:ks,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:ks(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function ks(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function As(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var js=class extends nn{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ms(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=fn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),an.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ms(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ns=class extends Wt{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new js({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ps(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ps(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ps(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Ps(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){an.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Gt(t,e))}findAll(e={}){return this.getAll().filter(t=>Gt(e,t))}notify(e){an.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return an.batch(()=>Promise.all(e.map(e=>e.continue().catch(Xt))))}};function Ps(e){return e.options.scope?.id}var Fs=class extends Wt{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Yt(r,t),a=this.get(i);return a||(a=new tn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){an.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>vn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>vn(e,t)):t}notify(e){an.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){an.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){an.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Is=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Fs,this.#t=e.mutationCache||new Ns,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=sn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ln.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Kt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=$t(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return an.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;an.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return an.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=an.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Xt).catch(Xt)}invalidateQueries(e,t={}){return an.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=an.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Xt)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Xt)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Kt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xt).catch(Xt)}fetchInfiniteQuery(e){return e.behavior=Os(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xt).catch(Xt)}ensureInfiniteQueryData(e){return e.behavior=Os(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ln.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(yn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{qt(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(yn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{qt(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Yt(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Jt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ls=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Rs=t(((e,t)=>{t.exports=Ls()})),zs=t((e=>{var t=Rs(),n=r(),i=Ei();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],R=-1;function z(e){return{current:e}}function B(e){0>R||(e.current=L[R],L[R]=null,R--)}function V(e,t){R++,L[R]=e.current,e.current=t}var H=z(null),U=z(null),W=z(null),G=z(null);function K(e,t){switch(V(W,t),V(U,e),V(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(H),V(H,e)}function ee(){B(H),B(U),B(W)}function q(e){e.memoizedState!==null&&V(G,e);var t=H.current,n=Hd(t,e.type);t!==n&&(V(U,e),V(H,n))}function te(e){U.current===e&&(B(H),B(U)),G.current===e&&(B(G),Qf._currentValue=I)}var ne,re;function ie(e){if(ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ne=t&&t[1]||``,re=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+ne+e+re}var ae=!1;function oe(e,t){if(!e||ae)return``;ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ie(n):``}function se(e,t){switch(e.tag){case 26:case 27:case 5:return ie(e.type);case 16:return ie(`Lazy`);case 13:return e.child!==t&&t!==null?ie(`Suspense Fallback`):ie(`Suspense`);case 19:return ie(`SuspenseList`);case 0:case 15:return oe(e.type,!1);case 11:return oe(e.type.render,!1);case 1:return oe(e.type,!0);case 31:return ie(`Activity`);default:return``}}function ce(e){try{var t=``,n=null;do t+=se(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var le=Object.prototype.hasOwnProperty,J=t.unstable_scheduleCallback,ue=t.unstable_cancelCallback,de=t.unstable_shouldYield,fe=t.unstable_requestPaint,pe=t.unstable_now,me=t.unstable_getCurrentPriorityLevel,he=t.unstable_ImmediatePriority,ge=t.unstable_UserBlockingPriority,_e=t.unstable_NormalPriority,ve=t.unstable_LowPriority,ye=t.unstable_IdlePriority,be=t.log,xe=t.unstable_setDisableYieldValue,Se=null,Ce=null;function we(e){if(typeof be==`function`&&xe(e),Ce&&typeof Ce.setStrictMode==`function`)try{Ce.setStrictMode(Se,e)}catch{}}var Te=Math.clz32?Math.clz32:Oe,Ee=Math.log,De=Math.LN2;function Oe(e){return e>>>=0,e===0?32:31-(Ee(e)/De|0)|0}var ke=256,Ae=262144,je=4194304;function Me(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ne(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Me(n))):i=Me(o):i=Me(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Me(n))):i=Me(o)):i=Me(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Pe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Ie(){var e=je;return je<<=1,!(je&62914560)&&(je=4194304),e}function Le(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Re(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Te(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Be(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Be(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Te(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ve(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Te(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Y(e,t){var n=t&-t;return n=n&42?1:He(n),(n&(e.suspendedLanes|t))===0?n:0}function He(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ue(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function We(){var e=F.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function Ge(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Ke=Math.random().toString(36).slice(2),qe=`__reactFiber$`+Ke,Je=`__reactProps$`+Ke,Ye=`__reactContainer$`+Ke,Xe=`__reactEvents$`+Ke,Ze=`__reactListeners$`+Ke,Qe=`__reactHandles$`+Ke,$e=`__reactResources$`+Ke,et=`__reactMarker$`+Ke;function tt(e){delete e[qe],delete e[Je],delete e[Xe],delete e[Ze],delete e[Qe]}function nt(e){var t=e[qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ye]||n[qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[qe])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function rt(e){if(e=e[qe]||e[Ye]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function it(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function at(e){var t=e[$e];return t||=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ot(e){e[et]=!0}var st=new Set,ct={};function lt(e,t){ut(e,t),ut(e+`Capture`,t)}function ut(e,t){for(ct[e]=t,e=0;e<t.length;e++)st.add(t[e])}var dt=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]*$`),ft={},pt={};function mt(e){return le.call(pt,e)?!0:le.call(ft,e)?!1:dt.test(e)?pt[e]=!0:(ft[e]=!0,!1)}function ht(e,t,n){if(mt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function gt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function _t(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function vt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function bt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xt(e){if(!e._valueTracker){var t=yt(e)?`checked`:`value`;e._valueTracker=bt(e,t,``+e[t])}}function St(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=yt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ct(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var wt=/[\n"\\]/g;function Tt(e){return e.replace(wt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Et(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+vt(t)):e.value!==``+vt(t)&&(e.value=``+vt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ot(e,o,vt(n)):Ot(e,o,vt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+vt(s):e.removeAttribute(`name`)}function Dt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){xt(e);return}n=n==null?``:``+vt(n),t=t==null?n:``+vt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),xt(e)}function Ot(e,t,n){t===`number`&&Ct(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function kt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+vt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function At(e,t,n){if(t!=null&&(t=``+vt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+vt(n)}function jt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=vt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),xt(e)}function Mt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nt=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 Pt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Nt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ft(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Pt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Pt(e,o,t[o])}function It(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 Lt=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`]]),Rt=/^[\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 zt(e){return Rt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Bt(){}var Vt=null;function Ht(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ut=null,Wt=null;function Gt(e){var t=rt(e);if(t&&(e=t.stateNode)){var n=e[Je]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Et(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Tt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Je]||null;if(!i)throw Error(a(90));Et(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&St(r)}break a;case`textarea`:At(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&kt(e,!!n.multiple,t,!1)}}}var Kt=!1;function qt(e,t,n){if(Kt)return e(t,n);Kt=!0;try{return e(t)}finally{if(Kt=!1,(Ut!==null||Wt!==null)&&(_u(),Ut&&(t=Ut,e=Wt,Wt=Ut=null,Gt(t),e)))for(t=0;t<e.length;t++)Gt(e[t])}}function Jt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Je]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var Yt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Xt=!1;if(Yt)try{var Zt={};Object.defineProperty(Zt,`passive`,{get:function(){Xt=!0}}),window.addEventListener(`test`,Zt,Zt),window.removeEventListener(`test`,Zt,Zt)}catch{Xt=!1}var Qt=null,$t=null,en=null;function tn(){if(en)return en;var e,t=$t,n=t.length,r,i=`value`in Qt?Qt.value:Qt.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return en=i.slice(e,1<r?1-r:void 0)}function nn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function rn(){return!0}function an(){return!1}function on(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?rn:an,this.isPropagationStopped=an,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(sn),ln=p({},sn,{view:0,detail:0}),un=on(ln),dn,fn,pn,mn=p({},ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==pn&&(pn&&e.type===`mousemove`?(dn=e.screenX-pn.screenX,fn=e.screenY-pn.screenY):fn=dn=0,pn=e),dn)},movementY:function(e){return`movementY`in e?e.movementY:fn}}),hn=on(mn),gn=on(p({},mn,{dataTransfer:0})),_n=on(p({},ln,{relatedTarget:0})),vn=on(p({},sn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=on(p({},sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),bn=on(p({},sn,{data:0})),xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Sn={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`},Cn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Cn[e])?!!t[e]:!1}function Tn(){return wn}var En=on(p({},ln,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Sn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return e.type===`keypress`?nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Dn=on(p({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),On=on(p({},ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),kn=on(p({},sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=on(p({},mn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),jn=on(p({},sn,{newState:0,oldState:0})),Mn=[9,13,27,32],Nn=Yt&&`CompositionEvent`in window,Pn=null;Yt&&`documentMode`in document&&(Pn=document.documentMode);var Fn=Yt&&`TextEvent`in window&&!Pn,In=Yt&&(!Nn||Pn&&8<Pn&&11>=Pn),Ln=` `,Rn=!1;function zn(e,t){switch(e){case`keyup`:return Mn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Bn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Vn=!1;function Hn(e,t){switch(e){case`compositionend`:return Bn(t);case`keypress`:return t.which===32?(Rn=!0,Ln):null;case`textInput`:return e=t.data,e===Ln&&Rn?null:e;default:return null}}function Un(e,t){if(Vn)return e===`compositionend`||!Nn&&zn(e,t)?(e=tn(),en=$t=Qt=null,Vn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return In&&t.locale!==`ko`?null:t.data;default:return null}}var Wn={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 Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Wn[e.type]:t===`textarea`}function Kn(e,t,n,r){Ut?Wt?Wt.push(r):Wt=[r]:Ut=r,t=Td(t,`onChange`),0<t.length&&(n=new cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var qn=null,Jn=null;function Yn(e){_d(e,0)}function Xn(e){if(St(it(e)))return e}function Zn(e,t){if(e===`change`)return t}var Qn=!1;if(Yt){var $n;if(Yt){var er=`oninput`in document;if(!er){var tr=document.createElement(`div`);tr.setAttribute(`oninput`,`return;`),er=typeof tr.oninput==`function`}$n=er}else $n=!1;Qn=$n&&(!document.documentMode||9<document.documentMode)}function nr(){qn&&(qn.detachEvent(`onpropertychange`,rr),Jn=qn=null)}function rr(e){if(e.propertyName===`value`&&Xn(Jn)){var t=[];Kn(t,Jn,e,Ht(e)),qt(Yn,t)}}function ir(e,t,n){e===`focusin`?(nr(),qn=t,Jn=n,qn.attachEvent(`onpropertychange`,rr)):e===`focusout`&&nr()}function ar(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Xn(Jn)}function or(e,t){if(e===`click`)return Xn(t)}function sr(e,t){if(e===`input`||e===`change`)return Xn(t)}function cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var lr=typeof Object.is==`function`?Object.is:cr;function ur(e,t){if(lr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!le.call(t,i)||!lr(e[i],t[i]))return!1}return!0}function dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n=dr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=dr(n)}}function pr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ct(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ct(e.document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var gr=Yt&&`documentMode`in document&&11>=document.documentMode,_r=null,vr=null,yr=null,br=!1;function xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;br||_r==null||_r!==Ct(r)||(r=_r,`selectionStart`in r&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yr&&ur(yr,r)||(yr=r,r=Td(vr,`onSelect`),0<r.length&&(t=new cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=_r)))}function Sr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Cr={animationend:Sr(`Animation`,`AnimationEnd`),animationiteration:Sr(`Animation`,`AnimationIteration`),animationstart:Sr(`Animation`,`AnimationStart`),transitionrun:Sr(`Transition`,`TransitionRun`),transitionstart:Sr(`Transition`,`TransitionStart`),transitioncancel:Sr(`Transition`,`TransitionCancel`),transitionend:Sr(`Transition`,`TransitionEnd`)},wr={},Tr={};Yt&&(Tr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Cr.animationend.animation,delete Cr.animationiteration.animation,delete Cr.animationstart.animation),`TransitionEvent`in window||delete Cr.transitionend.transition);function Er(e){if(wr[e])return wr[e];if(!Cr[e])return e;var t=Cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Tr)return wr[e]=t[n];return e}var Dr=Er(`animationend`),Or=Er(`animationiteration`),kr=Er(`animationstart`),Ar=Er(`transitionrun`),jr=Er(`transitionstart`),Mr=Er(`transitioncancel`),Nr=Er(`transitionend`),Pr=new Map,Fr=`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(` `);Fr.push(`scrollEnd`);function Ir(e,t){Pr.set(e,t),lt(t,[e])}var Lr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Rr=[],zr=0,Br=0;function Vr(){for(var e=zr,t=Br=zr=0;t<e;){var n=Rr[t];Rr[t++]=null;var r=Rr[t];Rr[t++]=null;var i=Rr[t];Rr[t++]=null;var a=Rr[t];if(Rr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Gr(n,i,a)}}function Hr(e,t,n,r){Rr[zr++]=e,Rr[zr++]=t,Rr[zr++]=n,Rr[zr++]=r,Br|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ur(e,t,n,r){return Hr(e,t,n,r),Kr(e)}function Wr(e,t){return Hr(e,null,null,t),Kr(e)}function Gr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Te(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Kr(e){if(50<cu)throw cu=0,lu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qr={};function Jr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(e,t,n,r){return new Jr(e,t,n,r)}function Xr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zr(e,t){var n=e.alternate;return n===null?(n=Yr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Qr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $r(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)Xr(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,H.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=Yr(31,n,t,i),e.elementType=D,e.lanes=o,e;case _:return ei(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=Yr(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=Yr(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=Yr(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=Yr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ei(e,t,n,r){return e=Yr(7,e,r,t),e.lanes=n,e}function ti(e,t,n){return e=Yr(6,e,null,t),e.lanes=n,e}function ni(e){var t=Yr(18,null,null,0);return t.stateNode=e,t}function ri(e,t,n){return t=Yr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ii=new WeakMap;function X(e,t){if(typeof e==`object`&&e){var n=ii.get(e);return n===void 0?(t={value:e,source:t,stack:ce(t)},ii.set(e,t),t):n}return{value:e,source:t,stack:ce(t)}}var ai=[],oi=0,si=null,ci=0,li=[],ui=0,di=null,fi=1,pi=``;function mi(e,t){ai[oi++]=ci,ai[oi++]=si,si=e,ci=t}function hi(e,t,n){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,di=e;var r=fi;e=pi;var i=32-Te(r)-1;r&=~(1<<i),n+=1;var a=32-Te(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,fi=1<<32-Te(t)+i|n<<i|r,pi=a+e}else fi=1<<a|n<<i|r,pi=e}function gi(e){e.return!==null&&(mi(e,1),hi(e,1,0))}function _i(e){for(;e===si;)si=ai[--oi],ai[oi]=null,ci=ai[--oi],ai[oi]=null;for(;e===di;)di=li[--ui],li[ui]=null,pi=li[--ui],li[ui]=null,fi=li[--ui],li[ui]=null}function vi(e,t){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,fi=t.id,pi=t.overflow,di=e}var yi=null,bi=null,xi=!1,Si=null,Ci=!1,wi=Error(a(519));function Ti(e){throw Mi(X(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),wi}function Di(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[qe]=e,t[Je]=r,n){case`dialog`:vd(`cancel`,t),vd(`close`,t);break;case`iframe`:case`object`:case`embed`:vd(`load`,t);break;case`video`:case`audio`:for(n=0;n<hd.length;n++)vd(hd[n],t);break;case`source`:vd(`error`,t);break;case`img`:case`image`:case`link`:vd(`error`,t),vd(`load`,t);break;case`details`:vd(`toggle`,t);break;case`input`:vd(`invalid`,t),Dt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:vd(`invalid`,t);break;case`textarea`:vd(`invalid`,t),jt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&(vd(`beforetoggle`,t),vd(`toggle`,t)),r.onScroll!=null&&vd(`scroll`,t),r.onScrollEnd!=null&&vd(`scrollend`,t),r.onClick!=null&&(t.onclick=Bt),t=!0):t=!1,t||Ti(e,!0)}function Oi(e){for(yi=e.return;yi;)switch(yi.tag){case 5:case 31:case 13:Ci=!1;return;case 27:case 3:Ci=!0;return;default:yi=yi.return}}function ki(e){if(e!==yi)return!1;if(!xi)return Oi(e),xi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&bi&&Ti(e),Oi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));bi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));bi=uf(e)}else t===27?(t=bi,Zd(e.type)?(e=lf,lf=null,bi=e):bi=t):bi=yi?cf(e.stateNode.nextSibling):null;return!0}function Ai(){bi=yi=null,xi=!1}function ji(){var e=Si;return e!==null&&(Jl===null?Jl=e:Jl.push.apply(Jl,e),Si=null),e}function Mi(e){Si===null?Si=[e]:Si.push(e)}var Ni=z(null),Pi=null,Fi=null;function Ii(e,t,n){V(Ni,t._currentValue),t._currentValue=n}function Li(e){e._currentValue=Ni.current,B(Ni)}function Ri(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function zi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ri(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ri(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Bi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;lr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===G.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&zi(t,e,n,r),t.flags|=262144}function Vi(e){for(e=e.firstContext;e!==null;){if(!lr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Hi(e){Pi=e,Fi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ui(e){return Gi(Pi,e)}function Wi(e,t){return Pi===null&&Hi(e),Gi(e,t)}function Gi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Fi===null){if(e===null)throw Error(a(308));Fi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Fi=Fi.next=t;return n}var Ki=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},qi=t.unstable_scheduleCallback,Ji=t.unstable_NormalPriority,Yi={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xi(){return{controller:new Ki,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&qi(Ji,function(){e.controller.abort()})}var Qi=null,$i=0,ea=0,ta=null;function na(e,t){if(Qi===null){var n=Qi=[];$i=0,ea=ld(),ta={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return $i++,t.then(ra,ra),t}function ra(){if(--$i===0&&Qi!==null){ta!==null&&(ta.status=`fulfilled`);var e=Qi;Qi=null,ea=0,ta=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ia(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var aa=P.S;P.S=function(e,t){Zl=pe(),typeof t==`object`&&t&&typeof t.then==`function`&&na(e,t),aa!==null&&aa(e,t)};var oa=z(null);function sa(){var e=oa.current;return e===null?Ml.pooledCache:e}function ca(e,t){t===null?V(oa,oa.current):V(oa,t.pool)}function la(){var e=sa();return e===null?null:{parent:Yi._currentValue,pool:e}}var ua=Error(a(460)),da=Error(a(474)),fa=Error(a(542)),pa={then:function(){}};function ma(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ha(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Bt,Bt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e;default:if(typeof t.status==`string`)t.then(Bt,Bt);else{if(e=Ml,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e}throw _a=t,ua}}function ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(_a=e,ua):e}}var _a=null;function va(){if(_a===null)throw Error(a(459));var e=_a;return _a=null,e}function ya(e){if(e===ua||e===fa)throw Error(a(483))}var ba=null,xa=0;function Sa(e){var t=xa;return xa+=1,ba===null&&(ba=[]),ha(ba,e,t)}function Ca(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function wa(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ta(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Zr(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ti(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&ga(a)===t.type)?(t=i(t,n.props),Ca(t,n),t.return=e,t):(t=$r(n.type,n.key,n.props,null,e.mode,r),Ca(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ri(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ei(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ti(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=$r(t.type,t.key,t.props,null,e.mode,n),Ca(n,t),n.return=e,n;case g:return t=ri(t,e.mode,n),t.return=e,t;case E:return t=ga(t),f(e,t,n)}if(N(t)||A(t))return t=ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Sa(t),n);if(t.$$typeof===x)return f(e,Wi(e,t),n);wa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=ga(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Sa(n),r);if(n.$$typeof===x)return p(e,t,Wi(e,n),r);wa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=ga(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Sa(r),i);if(r.$$typeof===x)return m(e,t,n,Wi(t,r),i);wa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),xi&&mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return xi&&mi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),xi&&mi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),xi&&mi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return xi&&mi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),xi&&mi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ga(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ca(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=$r(o.type,o.key,o.props,null,e.mode,c),Ca(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ri(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ga(o),b(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Sa(o),c);if(o.$$typeof===x)return b(e,r,Wi(e,o),c);wa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=ti(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{xa=0;var i=b(e,t,n,r);return ba=null,i}catch(t){if(t===ua||t===fa)throw t;var a=Yr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ea=Ta(!0),Da=Ta(!1),Oa=!1;function ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Aa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,jl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Kr(e),Gr(e,null,n),t}return Hr(e,r,t,n),Kr(e)}function Na(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ve(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Fa=!1;function Ia(){if(Fa){var e=ta;if(e!==null)throw e}}function La(e,t,n,r){Fa=!1;var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Pl&f)===f:(r&f)===f){f!==0&&f===ea&&(Fa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Oa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Hl|=o,e.lanes=o,e.memoizedState=d}}function Ra(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ra(n[e],t)}var Ba=z(null),Va=z(0);function Ha(e,t){e=Bl,V(Va,e),V(Ba,t),Bl=e|t.baseLanes}function Ua(){V(Va,Bl),V(Ba,Ba.current)}function Wa(){Bl=Va.current,B(Ba),B(Va)}var Ga=z(null),Ka=null;function qa(e){var t=e.alternate;V(Qa,Qa.current&1),V(Ga,e),Ka===null&&(t===null||Ba.current!==null||t.memoizedState!==null)&&(Ka=e)}function Ja(e){V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)}function Ya(e){e.tag===22?(V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)):Xa(e)}function Xa(){V(Qa,Qa.current),V(Ga,Ga.current)}function Za(e){B(Ga),Ka===e&&(Ka=null),B(Qa)}var Qa=z(0);function $a(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eo=0,to=null,no=null,ro=null,io=!1,ao=!1,oo=!1,so=0,co=0,lo=null,uo=0;function fo(){throw Error(a(321))}function po(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function mo(e,t,n,r,i,a){return eo=a,to=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?js:Ms,oo=!1,a=n(r,i),oo=!1,ao&&(a=go(t,n,r,i)),ho(e),a}function ho(e){P.H=As;var t=no!==null&&no.next!==null;if(eo=0,ro=no=to=null,io=!1,co=0,lo=null,t)throw Error(a(300));e===null||qs||(e=e.dependencies,e!==null&&Vi(e)&&(qs=!0))}function go(e,t,n,r){to=e;var i=0;do{if(ao&&(lo=null),co=0,ao=!1,25<=i)throw Error(a(301));if(i+=1,ro=no=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ns,o=t(n,r)}while(ao);return o}function _o(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?wo(t):t,e=e.useState()[0],(no===null?null:no.memoizedState)!==e&&(to.flags|=1024),t}function vo(){var e=so!==0;return so=0,e}function yo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function bo(e){if(io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}io=!1}eo=0,ro=no=to=null,ao=!1,co=so=0,lo=null}function xo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ro===null?to.memoizedState=ro=e:ro=ro.next=e,ro}function So(){if(no===null){var e=to.alternate;e=e===null?null:e.memoizedState}else e=no.next;var t=ro===null?to.memoizedState:ro.next;if(t!==null)ro=t,no=e;else{if(e===null)throw to.alternate===null?Error(a(467)):Error(a(310));no=e,e={memoizedState:no.memoizedState,baseState:no.baseState,baseQueue:no.baseQueue,queue:no.queue,next:null},ro===null?to.memoizedState=ro=e:ro=ro.next=e}return ro}function Co(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wo(e){var t=co;return co+=1,lo===null&&(lo=[]),e=ha(lo,e,t),t=to,(ro===null?t.memoizedState:ro.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?js:Ms),e}function To(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return wo(e);if(e.$$typeof===x)return Ui(e)}throw Error(a(438,String(e)))}function Eo(e){var t=null,n=to.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=to.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Co(),to.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=O;return t.index++,n}function Do(e,t){return typeof t==`function`?t(e):t}function Oo(e){return ko(So(),no,e)}function ko(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(eo&f)===f:(Pl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ea&&(d=!0);else if((eo&p)===p){u=u.next,p===ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,to.lanes|=p,Hl|=p;f=u.action,oo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,to.lanes|=f,Hl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!lr(o,e.memoizedState)&&(qs=!0,d&&(n=ta,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ao(e){var t=So(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);lr(o,t.memoizedState)||(qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function jo(e,t,n){var r=to,i=So(),o=xi;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!lr((no||i).memoizedState,n);if(s&&(i.memoizedState=n,qs=!0),i=i.queue,ns(Po.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||ro!==null&&ro.memoizedState.tag&1){if(r.flags|=2048,Zo(9,{destroy:void 0},No.bind(null,r,i,n,t),null),Ml===null)throw Error(a(349));o||eo&127||Mo(r,t,n)}return n}function Mo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=to.updateQueue,t===null?(t=Co(),to.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function No(e,t,n,r){t.value=n,t.getSnapshot=r,Fo(t)&&Io(e)}function Po(e,t,n){return n(function(){Fo(t)&&Io(e)})}function Fo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch{return!0}}function Io(e){var t=Wr(e,2);t!==null&&fu(t,e,2)}function Lo(e){var t=xo();if(typeof e==`function`){var n=e;if(e=n(),oo){we(!0);try{n()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:e},t}function Ro(e,t,n,r){return e.baseState=n,ko(e,no,typeof r==`function`?r:Do)}function zo(e,t,n,r,i){if(Ds(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Bo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Bo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Vo(e,t,s)}catch(n){Uo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Vo(e,t,a)}catch(n){Uo(e,t,n)}}function Vo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ho(e,t,n)},function(n){return Uo(e,t,n)}):Ho(e,t,n)}function Ho(e,t,n){t.status=`fulfilled`,t.value=n,Wo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Bo(e,n)))}function Uo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Wo(t),t=t.next;while(t!==r)}e.action=null}function Wo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Go(e,t){return t}function Ko(e,t){if(xi){var n=Ml.formState;if(n!==null){a:{var r=to;if(xi){if(bi){b:{for(var i=bi,a=Ci;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){bi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ti(r)}r=!1}r&&(t=n[0])}}return n=xo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:t},n.queue=r,n=ws.bind(null,to,r),r.dispatch=n,r=Lo(!1),a=Es.bind(null,to,!1,r.queue),r=xo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=zo.bind(null,to,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function qo(e){return Jo(So(),no,e)}function Jo(e,t,n){if(t=ko(e,t,Go)[0],e=Oo(Do)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=wo(t)}catch(e){throw e===ua?fa:e}else r=t;t=So();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(to.flags|=2048,Zo(9,{destroy:void 0},Yo.bind(null,i,n),null)),[r,a,e]}function Yo(e,t){e.action=t}function Xo(e){var t=So(),n=no;if(n!==null)return Jo(t,n,e);So(),t=t.memoizedState,n=So();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Zo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=to.updateQueue,t===null&&(t=Co(),to.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Qo(){return So().memoizedState}function $o(e,t,n,r){var i=xo();to.flags|=e,i.memoizedState=Zo(1|t,{destroy:void 0},n,r===void 0?null:r)}function es(e,t,n,r){var i=So();r=r===void 0?null:r;var a=i.memoizedState.inst;no!==null&&r!==null&&po(r,no.memoizedState.deps)?i.memoizedState=Zo(t,a,n,r):(to.flags|=e,i.memoizedState=Zo(1|t,a,n,r))}function ts(e,t){$o(8390656,8,e,t)}function ns(e,t){es(2048,8,e,t)}function rs(e){to.flags|=4;var t=to.updateQueue;if(t===null)t=Co(),to.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function is(e){var t=So().memoizedState;return rs({ref:t,nextImpl:e}),function(){if(jl&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function as(e,t){return es(4,2,e,t)}function os(e,t){return es(4,4,e,t)}function ss(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,n){n=n==null?null:n.concat([e]),es(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&po(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&po(t,r[1]))return r[0];if(r=e(),oo){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r}function fs(e,t,n){return n===void 0||eo&1073741824&&!(Pl&261930)?e.memoizedState=t:(e.memoizedState=n,e=du(),to.lanes|=e,Hl|=e,n)}function ps(e,t,n,r){return lr(n,t)?n:Ba.current===null?!(eo&42)||eo&1073741824&&!(Pl&261930)?(qs=!0,e.memoizedState=n):(e=du(),to.lanes|=e,Hl|=e,t):(e=fs(e,n,r),lr(e,t)||(qs=!0),e)}function ms(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Es(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ts(e,t,ia(c,r),uu(e)):Ts(e,t,r,uu(e))}catch(n){Ts(e,t,{then:function(){},status:`rejected`,reason:n},uu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function hs(){}function gs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=_s(e).queue;ms(e,i,t,I,n===null?hs:function(){return vs(e),n(r)})}function _s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vs(e){var t=_s(e);t.next===null&&(t=e.alternate.memoizedState),Ts(e,t.next.queue,{},uu())}function ys(){return Ui(Qf)}function bs(){return So().memoizedState}function xs(){return So().memoizedState}function Ss(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=uu();e=ja(n);var r=Ma(t,e,n);r!==null&&(fu(r,t,n),Na(r,t,n)),t={cache:Xi()},e.payload=t;return}t=t.return}}function Cs(e,t,n){var r=uu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ds(e)?Os(t,n):(n=Ur(e,t,n,r),n!==null&&(fu(n,e,r),ks(n,t,r)))}function ws(e,t,n){Ts(e,t,n,uu())}function Ts(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))Os(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,lr(s,o))return Hr(e,t,i,0),Ml===null&&Vr(),!1}catch{}if(n=Ur(e,t,i,r),n!==null)return fu(n,e,r),ks(n,t,r),!0}return!1}function Es(e,t,n,r){if(r={lane:2,revertLane:ld(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ds(e)){if(t)throw Error(a(479))}else t=Ur(e,n,r,2),t!==null&&fu(t,e,2)}function Ds(e){var t=e.alternate;return e===to||t!==null&&t===to}function Os(e,t){ao=io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ks(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ve(e,n)}}var As={readContext:Ui,use:To,useCallback:fo,useContext:fo,useEffect:fo,useImperativeHandle:fo,useLayoutEffect:fo,useInsertionEffect:fo,useMemo:fo,useReducer:fo,useRef:fo,useState:fo,useDebugValue:fo,useDeferredValue:fo,useTransition:fo,useSyncExternalStore:fo,useId:fo,useHostTransitionStatus:fo,useFormState:fo,useActionState:fo,useOptimistic:fo,useMemoCache:fo,useCacheRefresh:fo};As.useEffectEvent=fo;var js={readContext:Ui,use:To,useCallback:function(e,t){return xo().memoizedState=[e,t===void 0?null:t],e},useContext:Ui,useEffect:ts,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),$o(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $o(4194308,4,e,t)},useInsertionEffect:function(e,t){$o(4,2,e,t)},useMemo:function(e,t){var n=xo();t=t===void 0?null:t;var r=e();if(oo){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=xo();if(n!==void 0){var i=n(t);if(oo){we(!0);try{n(t)}finally{we(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Cs.bind(null,to,e),[r.memoizedState,e]},useRef:function(e){var t=xo();return e={current:e},t.memoizedState=e},useState:function(e){e=Lo(e);var t=e.queue,n=ws.bind(null,to,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ls,useDeferredValue:function(e,t){return fs(xo(),e,t)},useTransition:function(){var e=Lo(!1);return e=ms.bind(null,to,e.queue,!0,!1),xo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=to,i=xo();if(xi){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Ml===null)throw Error(a(349));Pl&127||Mo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ts(Po.bind(null,r,o,e),[e]),r.flags|=2048,Zo(9,{destroy:void 0},No.bind(null,r,o,n,t),null),n},useId:function(){var e=xo(),t=Ml.identifierPrefix;if(xi){var n=pi,r=fi;n=(r&~(1<<32-Te(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=so++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=uo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ys,useFormState:Ko,useActionState:Ko,useOptimistic:function(e){var t=xo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Es.bind(null,to,!0,n),n.dispatch=t,[e,t]},useMemoCache:Eo,useCacheRefresh:function(){return xo().memoizedState=Ss.bind(null,to)},useEffectEvent:function(e){var t=xo(),n={impl:e};return t.memoizedState=n,function(){if(jl&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Ms={readContext:Ui,use:To,useCallback:us,useContext:Ui,useEffect:ns,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Oo,useRef:Qo,useState:function(){return Oo(Do)},useDebugValue:ls,useDeferredValue:function(e,t){return ps(So(),no.memoizedState,e,t)},useTransition:function(){var e=Oo(Do)[0],t=So().memoizedState;return[typeof e==`boolean`?e:wo(e),t]},useSyncExternalStore:jo,useId:bs,useHostTransitionStatus:ys,useFormState:qo,useActionState:qo,useOptimistic:function(e,t){return Ro(So(),no,e,t)},useMemoCache:Eo,useCacheRefresh:xs};Ms.useEffectEvent=is;var Ns={readContext:Ui,use:To,useCallback:us,useContext:Ui,useEffect:ns,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Ao,useRef:Qo,useState:function(){return Ao(Do)},useDebugValue:ls,useDeferredValue:function(e,t){var n=So();return no===null?fs(n,e,t):ps(n,no.memoizedState,e,t)},useTransition:function(){var e=Ao(Do)[0],t=So().memoizedState;return[typeof e==`boolean`?e:wo(e),t]},useSyncExternalStore:jo,useId:bs,useHostTransitionStatus:ys,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){var n=So();return no===null?(n.baseState=e,[e,n.queue.dispatch]):Ro(n,no,e,t)},useMemoCache:Eo,useCacheRefresh:xs};Ns.useEffectEvent=is;function Ps(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=uu(),i=ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(fu(t,e,r),Na(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=uu(),i=ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(fu(t,e,r),Na(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=uu(),r=ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ma(e,r,n),t!==null&&(fu(t,e,n),Na(t,e,n))}};function Is(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!ur(n,r)||!ur(i,a):!0}function Ls(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Fs.enqueueReplaceState(t,t.state,null)}function zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Bs(e){Lr(e)}function Vs(e){console.error(e)}function Hs(e){Lr(e)}function Us(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ws(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Z(e,t,n){return n=ja(n),n.tag=3,n.payload={element:null},n.callback=function(){Us(e,t)},n}function Q(e){return e=ja(e),e.tag=3,e}function Gs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ws(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ws(t,n,r),typeof i!=`function`&&(eu===null?eu=new Set([this]):eu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ks(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Bi(t,n,i,!0),n=Ga.current,n!==null){switch(n.tag){case 31:case 13:return Ka===null?wu():n.alternate===null&&Vl===0&&(Vl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Uu(e,r,i)),!1;case 22:return n.flags|=65536,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Uu(e,r,i)),!1}throw Error(a(435,n.tag))}return Uu(e,r,i),wu(),!1}if(xi)return t=Ga.current,t===null?(r!==wi&&(t=Error(a(423),{cause:r}),Mi(X(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=X(r,n),i=Z(e.stateNode,r,i),Pa(e,i),Vl!==4&&(Vl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==wi&&(e=Error(a(422),{cause:r}),Mi(X(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=X(o,n),ql===null?ql=[o]:ql.push(o),Vl!==4&&(Vl=2),t===null)return!0;r=X(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Z(n.stateNode,r,e),Pa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(eu===null||!eu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Q(i),Gs(i,e,n,r),Pa(n,i),!1}n=n.return}while(n!==null);return!1}var $=Error(a(461)),qs=!1;function Js(e,t,n,r){t.child=e===null?Da(t,null,n,r):Ea(t,e.child,n,r)}function Ys(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Hi(t),r=mo(e,t,n,o,a,i),s=vo(),e!==null&&!qs?(yo(e,t,i),yc(e,t,i)):(xi&&s&&gi(t),t.flags|=1,Js(e,t,r,i),t.child)}function Xs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Xr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Zs(e,t,a,r,i)):(e=$r(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!bc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?ur:n,n(o,r)&&e.ref===t.ref)return yc(e,t,i)}return t.flags|=1,e=Zr(a,r),e.ref=t.ref,e.return=t,t.child=e}function Zs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(ur(a,r)&&e.ref===t.ref)if(qs=!1,t.pendingProps=r=a,bc(e,i))e.flags&131072&&(qs=!0);else return t.lanes=e.lanes,yc(e,t,i)}return ac(e,t,n,r,i)}function Qs(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ec(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ca(t,a===null?null:a.cachePool),a===null?Ua():Ha(t,a),Ya(t);else return r=t.lanes=536870912,ec(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ca(t,null),Ua(),Xa(t)):(ca(t,a.cachePool),Ha(t,a),Xa(t),t.memoizedState=null);return Js(e,t,i,n),t.child}function $s(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ec(e,t,n,r,i){var a=sa();return a=a===null?null:{parent:Yi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ca(t,null),Ua(),Ya(t),e!==null&&Bi(e,t,r,!0),t.childLanes=i,null}function tc(e,t){return t=mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nc(e,t,n){return Ea(t,e.child,null,n),e=tc(t,t.pendingProps),e.flags|=2,Za(t),t.memoizedState=null,e}function rc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(xi){if(r.mode===`hidden`)return e=tc(t,r),t.lanes=536870912,$s(null,e);if(Ja(t),(e=bi)?(e=rf(e,Ci),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=ni(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return t.lanes=536870912,null}return tc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ja(t),i)if(t.flags&256)t.flags&=-257,t=nc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(qs||Bi(e,t,n,!1),i=(n&e.childLanes)!==0,qs||i){if(r=Ml,r!==null&&(s=Y(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Wr(e,s),fu(r,e,s),$;wu(),t=nc(e,t,n)}else e=o.treeContext,bi=cf(s.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=tc(t,r),t.flags|=4096;return t}return e=Zr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ic(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ac(e,t,n,r,i){return Hi(t),n=mo(e,t,n,r,void 0,i),r=vo(),e!==null&&!qs?(yo(e,t,i),yc(e,t,i)):(xi&&r&&gi(t),t.flags|=1,Js(e,t,n,i),t.child)}function oc(e,t,n,r,i,a){return Hi(t),t.updateQueue=null,n=go(t,r,n,i),ho(e),r=vo(),e!==null&&!qs?(yo(e,t,a),yc(e,t,a)):(xi&&r&&gi(t),t.flags|=1,Js(e,t,n,a),t.child)}function sc(e,t,n,r,i){if(Hi(t),t.stateNode===null){var a=qr,o=n.contextType;typeof o==`object`&&o&&(a=Ui(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Fs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ka(t),o=n.contextType,a.context=typeof o==`object`&&o?Ui(o):qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ps(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Fs.enqueueReplaceState(a,a.state,null),La(t,r,a,i),Ia(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=qr,typeof u==`object`&&u&&(o=Ui(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ls(t,a,r,o),Oa=!1;var f=t.memoizedState;a.state=f,La(t,r,a,i),Ia(),l=t.memoizedState,s||f!==l||Oa?(typeof d==`function`&&(Ps(t,n,d,r),l=t.memoizedState),(c=Oa||Is(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Aa(e,t),o=t.memoizedProps,u=zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=qr,typeof l==`object`&&l&&(c=Ui(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ls(t,a,r,c),Oa=!1,f=t.memoizedState,a.state=f,La(t,r,a,i),Ia();var p=t.memoizedState;o!==d||f!==p||Oa||e!==null&&e.dependencies!==null&&Vi(e.dependencies)?(typeof s==`function`&&(Ps(t,n,s,r),p=t.memoizedState),(u=Oa||Is(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Vi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ic(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,n,i)):Js(e,t,n,i),t.memoizedState=a.state,e=t.child):e=yc(e,t,i),e}function cc(e,t,n,r){return Ai(),t.flags|=256,Js(e,t,n,r),t.child}var lc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uc(e){return{baseLanes:e,cachePool:la()}}function dc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Gl),e}function fc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Qa.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(xi){if(i?qa(t):Xa(t),(e=bi)?(e=rf(e,Ci),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=ni(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(Xa(t),i=t.mode,c=mc({mode:`hidden`,children:c},i),r=ei(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=uc(n),r.childLanes=dc(e,s,n),t.memoizedState=lc,$s(null,r)):(qa(t),pc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(qa(t),t.flags&=-257,t=hc(e,t,n)):t.memoizedState===null?(Xa(t),c=r.fallback,i=t.mode,r=mc({mode:`visible`,children:r.children},i),c=ei(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ea(t,e.child,null,n),r=t.child,r.memoizedState=uc(n),r.childLanes=dc(e,s,n),t.memoizedState=lc,t=$s(null,r)):(Xa(t),t.child=e.child,t.flags|=128,t=null);else if(qa(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Mi({value:r,source:null,stack:null}),t=hc(e,t,n)}else if(qs||Bi(e,t,n,!1),s=(n&e.childLanes)!==0,qs||s){if(s=Ml,s!==null&&(r=Y(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Wr(e,r),fu(s,e,r),$;af(c)||wu(),t=hc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,bi=cf(c.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=pc(t,r.children),t.flags|=4096);return t}return i?(Xa(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=Zr(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ei(c,i,n,null),c.flags|=2):c=Zr(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,$s(null,r),r=t.child,c=e.child.memoizedState,c===null?c=uc(n):(i=c.cachePool,i===null?i=la():(l=Yi._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=dc(e,s,n),t.memoizedState=lc,$s(e.child,r)):(qa(t),n=e.child,e=n.sibling,n=Zr(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function pc(e,t){return t=mc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function mc(e,t){return e=Yr(22,e,null,t),e.lanes=0,e}function hc(e,t,n){return Ea(t,e.child,null,n),e=pc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ri(e.return,t,n)}function _c(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function vc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Qa.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,V(Qa,o),Js(e,t,r,n),r=xi?ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gc(e,n,t);else if(e.tag===19)gc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&$a(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),_c(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&$a(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}_c(t,!0,n,null,a,r);break;case`together`:_c(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function yc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Bi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=Zr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Vi(e))):!0}function xc(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ii(t,Yi,e.memoizedState.cache),Ai();break;case 27:case 5:q(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ii(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ja(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(qa(t),e=yc(e,t,n),e===null?null:e.sibling):fc(e,t,n):(qa(t),t.flags|=128,null);qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Bi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return vc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(Qa,Qa.current),r)break;return null;case 22:return t.lanes=0,Qs(e,t,n,t.pendingProps);case 24:Ii(t,Yi,e.memoizedState.cache)}return yc(e,t,n)}function Sc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)qs=!0;else{if(!bc(e,n)&&!(t.flags&128))return qs=!1,xc(e,t,n);qs=!!(e.flags&131072)}else qs=!1,xi&&t.flags&1048576&&hi(t,ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ga(t.elementType),t.type=e,typeof e==`function`)Xr(e)?(r=zs(e,r),t.tag=1,t=sc(null,t,e,r,n)):(t.tag=0,t=ac(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=Ys(null,t,e,r,n);break a}else if(i===T){t.tag=14,t=Xs(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return ac(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=zs(r,t.pendingProps),sc(e,t,r,i,n);case 3:a:{if(K(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Aa(e,t),La(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ii(t,Yi,r),r!==o.cache&&zi(t,[Yi],n,!0),Ia(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=cc(e,t,r,n);break a}else if(r!==i){i=X(Error(a(424)),t),Mi(i),t=cc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(bi=cf(e.firstChild),yi=t,xi=!0,Si=null,Ci=!0,n=Da(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ai(),r===i){t=yc(e,t,n);break a}Js(e,t,r,n)}t=t.child}return t;case 26:return ic(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:xi||(n=t.type,e=t.pendingProps,r=Bd(W.current).createElement(n),r[qe]=t,r[Je]=e,Pd(r,n,e),ot(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return q(t),e===null&&xi&&(r=t.stateNode=ff(t.type,t.pendingProps,W.current),yi=t,Ci=!0,i=bi,Zd(t.type)?(lf=i,bi=cf(r.firstChild)):bi=i),Js(e,t,t.pendingProps.children,n),ic(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xi&&((i=r=bi)&&(r=tf(r,t.type,t.pendingProps,Ci),r===null?i=!1:(t.stateNode=r,yi=t,bi=cf(r.firstChild),Ci=!1,i=!0)),i||Ti(t)),q(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(i,o)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=mo(e,t,_o,null,null,n),Qf._currentValue=i),ic(e,t),Js(e,t,r,n),t.child;case 6:return e===null&&xi&&((e=n=bi)&&(n=nf(n,t.pendingProps,Ci),n===null?e=!1:(t.stateNode=n,yi=t,bi=null,e=!0)),e||Ti(t)),null;case 13:return fc(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ea(t,null,r,n):Js(e,t,r,n),t.child;case 11:return Ys(e,t,t.type,t.pendingProps,n);case 7:return Js(e,t,t.pendingProps,n),t.child;case 8:return Js(e,t,t.pendingProps.children,n),t.child;case 12:return Js(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ii(t,t.type,r.value),Js(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Hi(t),i=Ui(i),r=r(i),t.flags|=1,Js(e,t,r,n),t.child;case 14:return Xs(e,t,t.type,t.pendingProps,n);case 15:return Zs(e,t,t.type,t.pendingProps,n);case 19:return vc(e,t,n);case 31:return rc(e,t,n);case 22:return Qs(e,t,n,t.pendingProps);case 24:return Hi(t),r=Ui(Yi),e===null?(i=sa(),i===null&&(i=Ml,o=Xi(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},ka(t),Ii(t,Yi,i)):((e.lanes&n)!==0&&(Aa(e,t),La(t,null,null,n),Ia()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Ii(t,Yi,r),r!==i.cache&&zi(t,[Yi],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ii(t,Yi,r))),Js(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Cc(e){e.flags|=4}function wc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(xu())e.flags|=8192;else throw _a=pa,da}else e.flags&=-16777217}function Tc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(xu())e.flags|=8192;else throw _a=pa,da}function Ec(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ie(),e.lanes|=t,Kl|=t)}function Dc(e,t){if(!xi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Oc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kc(e,t,n){var r=t.pendingProps;switch(_i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oc(t),null;case 1:return Oc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Li(Yi),ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ki(t)?Cc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ji())),Oc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Cc(t),o===null?(Oc(t),wc(t,i,null,r,n)):(Oc(t),Tc(t,o))):o?o===e.memoizedState?(Oc(t),t.flags&=-16777217):(Cc(t),Oc(t),Tc(t,o)):(e=e.memoizedProps,e!==r&&Cc(t),Oc(t),wc(t,i,e,r,n)),null;case 27:if(te(t),n=W.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Cc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Oc(t),null}e=H.current,ki(t)?Di(t,e):(e=ff(i,r,n),t.stateNode=e,Cc(t))}return Oc(t),null;case 5:if(te(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Cc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Oc(t),null}if(o=H.current,ki(t))Di(t,o);else{var s=Bd(W.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[qe]=t,o[Je]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Cc(t)}}return Oc(t),wc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Cc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=W.current,ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=yi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[qe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ti(t,!0)}else e=Bd(e).createTextNode(r),e[qe]=t,t.stateNode=e}return Oc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ki(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[qe]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Oc(t),e=!1}else n=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Za(t),t):(Za(t),null);if(t.flags&128)throw Error(a(558))}return Oc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[qe]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Oc(t),i=!1}else i=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Za(t),t):(Za(t),null)}return Za(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ec(t,t.updateQueue),Oc(t),null);case 4:return ee(),e===null&&xd(t.stateNode.containerInfo),Oc(t),null;case 10:return Li(t.type),Oc(t),null;case 19:if(B(Qa),r=t.memoizedState,r===null)return Oc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Dc(r,!1);else{if(Vl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=$a(e),o!==null){for(t.flags|=128,Dc(r,!1),e=o.updateQueue,t.updateQueue=e,Ec(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Qr(n,e),n=n.sibling;return V(Qa,Qa.current&1|2),xi&&mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&pe()>Ql&&(t.flags|=128,i=!0,Dc(r,!1),t.lanes=4194304)}else{if(!i)if(e=$a(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Ec(t,e),Dc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!xi)return Oc(t),null}else 2*pe()-r.renderingStartTime>Ql&&n!==536870912&&(t.flags|=128,i=!0,Dc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Oc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=pe(),e.sibling=null,n=Qa.current,V(Qa,i?n&1|2:n&1),xi&&mi(t,r.treeForkCount),e);case 22:case 23:return Za(t),Wa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Oc(t),t.subtreeFlags&6&&(t.flags|=8192)):Oc(t),n=t.updateQueue,n!==null&&Ec(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(oa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Li(Yi),Oc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Ac(e,t){switch(_i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Li(Yi),ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return te(t),null;case 31:if(t.memoizedState!==null){if(Za(t),t.alternate===null)throw Error(a(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Za(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Qa),null;case 4:return ee(),null;case 10:return Li(t.type),null;case 22:case 23:return Za(t),Wa(),e!==null&&B(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Li(Yi),null;case 25:return null;default:return null}}function jc(e,t){switch(_i(t),t.tag){case 3:Li(Yi),ee();break;case 26:case 27:case 5:te(t);break;case 4:ee();break;case 31:t.memoizedState!==null&&Za(t);break;case 13:Za(t);break;case 19:B(Qa);break;case 10:Li(t.type);break;case 22:case 23:Za(t),Wa(),e!==null&&B(oa);break;case 24:Li(Yi)}}function Mc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Hu(t,t.return,e)}}function Nc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Hu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Hu(t,t.return,e)}}function Pc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{za(t,n)}catch(t){Hu(e,e.return,t)}}}function Fc(e,t,n){n.props=zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Hu(e,t,n)}}function Ic(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Hu(e,t,n)}}function Lc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Hu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Hu(e,t,n)}else n.current=null}function Rc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Hu(e,e.return,t)}}function zc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[Je]=t}catch(t){Hu(e,e.return,t)}}function Bc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Vc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Bc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Bt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,n),e=e.sibling;e!==null;)Hc(e,t,n),e=e.sibling}function Uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function Wc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[qe]=e,t[Je]=n}catch(t){Hu(e,e.return,t)}}var Gc=!1,Kc=!1,qc=!1,Jc=typeof WeakSet==`function`?WeakSet:Set,Yc=null;function Xc(e,t){if(e=e.containerInfo,Rd=sp,e=mr(e),hr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,Yc=t;Yc!==null;)if(t=Yc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Yc=e;else for(;Yc!==null;){switch(t=Yc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=zs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Hu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,Yc=e;break}Yc=t.return}}function Zc(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:fl(e,n),r&4&&Mc(5,n);break;case 1:if(fl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Hu(n,n.return,e)}else{var i=zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Hu(n,n.return,e)}}r&64&&Pc(n),r&512&&Ic(n,n.return);break;case 3:if(fl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{za(e,t)}catch(e){Hu(n,n.return,e)}}break;case 27:t===null&&r&4&&Wc(n);case 26:case 5:fl(e,n),t===null&&r&4&&Rc(n),r&512&&Ic(n,n.return);break;case 12:fl(e,n);break;case 31:fl(e,n),r&4&&rl(e,n);break;case 13:fl(e,n),r&4&&il(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ku.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Gc,!r){t=t!==null&&t.memoizedState!==null||Kc,i=Gc;var a=Kc;Gc=r,(Kc=t)&&!a?ml(e,n,(n.subtreeFlags&8772)!=0):fl(e,n),Gc=i,Kc=a}break;case 30:break;default:fl(e,n)}}function Qc(e){var t=e.alternate;t!==null&&(e.alternate=null,Qc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var $c=null,el=!1;function tl(e,t,n){for(n=n.child;n!==null;)nl(e,t,n),n=n.sibling}function nl(e,t,n){if(Ce&&typeof Ce.onCommitFiberUnmount==`function`)try{Ce.onCommitFiberUnmount(Se,n)}catch{}switch(n.tag){case 26:Kc||Lc(n,t),tl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Kc||Lc(n,t);var r=$c,i=el;Zd(n.type)&&($c=n.stateNode,el=!1),tl(e,t,n),pf(n.stateNode),$c=r,el=i;break;case 5:Kc||Lc(n,t);case 6:if(r=$c,i=el,$c=null,tl(e,t,n),$c=r,el=i,$c!==null)if(el)try{($c.nodeType===9?$c.body:$c.nodeName===`HTML`?$c.ownerDocument.body:$c).removeChild(n.stateNode)}catch(e){Hu(n,t,e)}else try{$c.removeChild(n.stateNode)}catch(e){Hu(n,t,e)}break;case 18:$c!==null&&(el?(e=$c,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd($c,n.stateNode));break;case 4:r=$c,i=el,$c=n.stateNode.containerInfo,el=!0,tl(e,t,n),$c=r,el=i;break;case 0:case 11:case 14:case 15:Nc(2,n,t),Kc||Nc(4,n,t),tl(e,t,n);break;case 1:Kc||(Lc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Fc(n,t,r)),tl(e,t,n);break;case 21:tl(e,t,n);break;case 22:Kc=(r=Kc)||n.memoizedState!==null,tl(e,t,n),Kc=r;break;default:tl(e,t,n)}}function rl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Hu(t,t.return,e)}}}function il(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Hu(t,t.return,e)}}function al(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jc),t;default:throw Error(a(435,e.tag))}}function ol(e,t){var n=al(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=qu.bind(null,e,t);t.then(r,r)}})}function sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){$c=c.stateNode,el=!1;break a}break;case 5:$c=c.stateNode,el=!1;break a;case 3:case 4:$c=c.stateNode.containerInfo,el=!0;break a}c=c.return}if($c===null)throw Error(a(160));nl(o,s,i),$c=null,el=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ll(t,e),t=t.sibling}var cl=null;function ll(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sl(t,e),ul(e),r&4&&(Nc(3,e,e.return),Mc(3,e),Nc(5,e,e.return));break;case 1:sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),r&64&&Gc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=cl;if(sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[et]||o[qe]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Pd(o,r,n),o[qe]=e,ot(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[qe]=e,ot(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&zc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),n!==null&&r&4&&zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),e.flags&32){i=e.stateNode;try{Mt(i,``)}catch(t){Hu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,zc(e,i,n===null?i:n.memoizedProps)),r&1024&&(qc=!0);break;case 6:if(sl(t,e),ul(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Hu(e,e.return,t)}}break;case 3:if(Bf=null,i=cl,cl=gf(t.containerInfo),sl(t,e),cl=i,ul(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Hu(e,e.return,t)}qc&&(qc=!1,dl(e));break;case 4:r=cl,cl=gf(e.stateNode.containerInfo),sl(t,e),ul(e),cl=r;break;case 12:sl(t,e),ul(e);break;case 31:sl(t,e),ul(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ol(e,r)));break;case 13:sl(t,e),ul(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Xl=pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ol(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Gc,d=Kc;if(Gc=u||i,Kc=d||l,sl(t,e),Kc=d,Gc=u,ul(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Gc||Kc||pl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Hu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Hu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Hu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ol(e,n))));break;case 19:sl(t,e),ul(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ol(e,r)));break;case 30:break;case 21:break;default:sl(t,e),ul(e)}}function ul(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Bc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Uc(e,Vc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Mt(o,``),n.flags&=-33),Uc(e,Vc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Hc(e,Vc(e),s);break;default:throw Error(a(161))}}catch(t){Hu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;dl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zc(e,t.alternate,t),t=t.sibling}function pl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nc(4,t,t.return),pl(t);break;case 1:Lc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Fc(t,t.return,n),pl(t);break;case 27:pf(t.stateNode);case 26:case 5:Lc(t,t.return),pl(t);break;case 22:t.memoizedState===null&&pl(t);break;case 30:pl(t);break;default:pl(t)}e=e.sibling}}function ml(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:ml(i,a,n),Mc(4,a);break;case 1:if(ml(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Hu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ra(c[i],s)}catch(e){Hu(r,r.return,e)}}n&&o&64&&Pc(a),Ic(a,a.return);break;case 27:Wc(a);case 26:case 5:ml(i,a,n),n&&r===null&&o&4&&Rc(a),Ic(a,a.return);break;case 12:ml(i,a,n);break;case 31:ml(i,a,n),n&&o&4&&rl(i,a);break;case 13:ml(i,a,n),n&&o&4&&il(i,a);break;case 22:a.memoizedState===null&&ml(i,a,n),Ic(a,a.return);break;case 30:break;default:ml(i,a,n)}t=t.sibling}}function hl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Zi(n))}function gl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function _l(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vl(e,t,n,r),t=t.sibling}function vl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:_l(e,t,n,r),i&2048&&Mc(9,t);break;case 1:_l(e,t,n,r);break;case 3:_l(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e)));break;case 12:if(i&2048){_l(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Hu(t,t.return,e)}}else _l(e,t,n,r);break;case 31:_l(e,t,n,r);break;case 13:_l(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?_l(e,t,n,r):(a._visibility|=2,yl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?_l(e,t,n,r):bl(e,t),i&2048&&hl(o,t);break;case 24:_l(e,t,n,r),i&2048&&gl(t.alternate,t);break;default:_l(e,t,n,r)}}function yl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:yl(a,o,s,c,i),Mc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,yl(a,o,s,c,i)):u._visibility&2?yl(a,o,s,c,i):bl(a,o),i&&l&2048&&hl(o.alternate,o);break;case 24:yl(a,o,s,c,i),i&&l&2048&&gl(o.alternate,o);break;default:yl(a,o,s,c,i)}t=t.sibling}}function bl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:bl(n,r),i&2048&&hl(r.alternate,r);break;case 24:bl(n,r),i&2048&&gl(r.alternate,r);break;default:bl(n,r)}t=t.sibling}}var xl=8192;function Sl(e,t,n){if(e.subtreeFlags&xl)for(e=e.child;e!==null;)Cl(e,t,n),e=e.sibling}function Cl(e,t,n){switch(e.tag){case 26:Sl(e,t,n),e.flags&xl&&e.memoizedState!==null&&Gf(n,cl,e.memoizedState,e.memoizedProps);break;case 5:Sl(e,t,n);break;case 3:case 4:var r=cl;cl=gf(e.stateNode.containerInfo),Sl(e,t,n),cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=xl,xl=16777216,Sl(e,t,n),xl=r):Sl(e,t,n));break;default:Sl(e,t,n)}}function wl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Tl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yc=r,Ol(r,e)}wl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)El(e),e=e.sibling}function El(e){switch(e.tag){case 0:case 11:case 15:Tl(e),e.flags&2048&&Nc(9,e,e.return);break;case 3:Tl(e);break;case 12:Tl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Dl(e)):Tl(e);break;default:Tl(e)}}function Dl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yc=r,Ol(r,e)}wl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nc(8,t,t.return),Dl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Dl(t));break;default:Dl(t)}e=e.sibling}}function Ol(e,t){for(;Yc!==null;){var n=Yc;switch(n.tag){case 0:case 11:case 15:Nc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Zi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Yc=r;else a:for(n=e;Yc!==null;){r=Yc;var i=r.sibling,a=r.return;if(Qc(r),r===n){Yc=null;break a}if(i!==null){i.return=a,Yc=i;break a}Yc=a}}}var kl={getCacheForType:function(e){var t=Ui(Yi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ui(Yi).controller.signal}},Al=typeof WeakMap==`function`?WeakMap:Map,jl=0,Ml=null,Nl=null,Pl=0,Fl=0,Il=null,Ll=!1,Rl=!1,zl=!1,Bl=0,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=null,Jl=null,Yl=!1,Xl=0,Zl=0,Ql=1/0,$l=null,eu=null,tu=0,nu=null,ru=null,iu=0,au=0,ou=null,su=null,cu=0,lu=null;function uu(){return jl&2&&Pl!==0?Pl&-Pl:P.T===null?We():ld()}function du(){if(Gl===0)if(!(Pl&536870912)||xi){var e=Ae;Ae<<=1,!(Ae&3932160)&&(Ae=262144),Gl=e}else Gl=536870912;return e=Ga.current,e!==null&&(e.flags|=32),Gl}function fu(e,t,n){(e===Ml&&(Fl===2||Fl===9)||e.cancelPendingCommit!==null)&&(yu(e,0),gu(e,Pl,Gl,!1)),Re(e,n),(!(jl&2)||e!==Ml)&&(e===Ml&&(!(jl&2)&&(Ul|=n),Vl===4&&gu(e,Pl,Gl,!1)),td(e))}function pu(e,t,n){if(jl&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Pe(e,t),i=r?Du(e,t):Tu(e,t,!0),o=r;do{if(i===0){Rl&&!r&&gu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!hu(n)){i=Tu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=ql;var l=c.current.memoizedState.isDehydrated;if(l&&(yu(c,s).flags|=256),s=Tu(c,s,!1),s!==2){if(zl&&!l){c.errorRecoveryDisabledLanes|=o,Ul|=o,i=4;break a}o=Jl,Jl=i,o!==null&&(Jl===null?Jl=o:Jl.push.apply(Jl,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){yu(e,0),gu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:gu(r,t,Gl,!Ll);break a;case 2:Jl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=Xl+300-pe(),10<i)){if(gu(r,t,Gl,!Ll),Ne(r,0,!0)!==0)break a;iu=t,r.timeoutHandle=Kd(mu.bind(null,r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,o,`Throttled`,-0,0),i);break a}mu(r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,o,null,-0,0)}}break}while(1);td(e)}function mu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bt},Cl(t,a,d);var m=(a&62914560)===a?Xl-pe():(a&4194048)===a?Zl-pe():0;if(m=qf(d,m),m!==null){iu=a,e.cancelPendingCommit=m(Pu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),gu(e,a,o,!l);return}}Pu(e,t,a,n,r,i,o,s,c)}function hu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!lr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gu(e,t,n,r){t&=~Wl,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Te(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Be(e,n,t)}function _u(){return jl&6?!0:(nd(0,!1),!1)}function vu(){if(Nl!==null){if(Fl===0)var e=Nl.return;else e=Nl,Fi=Pi=null,bo(e),ba=null,xa=0,e=Nl;for(;e!==null;)jc(e.alternate,e),e=e.return;Nl=null}}function yu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),iu=0,vu(),Ml=e,Nl=n=Zr(e.current,null),Pl=t,Fl=0,Il=null,Ll=!1,Rl=Pe(e,t),zl=!1,Kl=Gl=Wl=Ul=Hl=Vl=0,Jl=ql=null,Yl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Te(r),a=1<<i;t|=e[i],r&=~a}return Bl=t,Vr(),n}function bu(e,t){to=null,P.H=As,t===ua||t===fa?(t=va(),Fl=3):t===da?(t=va(),Fl=4):Fl=t===$?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Il=t,Nl===null&&(Vl=1,Us(e,X(t,e.current)))}function xu(){var e=Ga.current;return e===null?!0:(Pl&4194048)===Pl?Ka===null:(Pl&62914560)===Pl||Pl&536870912?e===Ka:!1}function Su(){var e=P.H;return P.H=As,e===null?As:e}function Cu(){var e=P.A;return P.A=kl,e}function wu(){Vl=4,Ll||(Pl&4194048)!==Pl&&Ga.current!==null||(Rl=!0),!(Hl&134217727)&&!(Ul&134217727)||Ml===null||gu(Ml,Pl,Gl,!1)}function Tu(e,t,n){var r=jl;jl|=2;var i=Su(),a=Cu();(Ml!==e||Pl!==t)&&($l=null,yu(e,t)),t=!1;var o=Vl;a:do try{if(Fl!==0&&Nl!==null){var s=Nl,c=Il;switch(Fl){case 8:vu(),o=6;break a;case 3:case 2:case 9:case 6:Ga.current===null&&(t=!0);var l=Fl;if(Fl=0,Il=null,ju(e,s,c,l),n&&Rl){o=0;break a}break;default:l=Fl,Fl=0,Il=null,ju(e,s,c,l)}}Eu(),o=Vl;break}catch(t){bu(e,t)}while(1);return t&&e.shellSuspendCounter++,Fi=Pi=null,jl=r,P.H=i,P.A=a,Nl===null&&(Ml=null,Pl=0,Vr()),o}function Eu(){for(;Nl!==null;)ku(Nl)}function Du(e,t){var n=jl;jl|=2;var r=Su(),i=Cu();Ml!==e||Pl!==t?($l=null,Ql=pe()+500,yu(e,t)):Rl=Pe(e,t);a:do try{if(Fl!==0&&Nl!==null){t=Nl;var o=Il;b:switch(Fl){case 1:Fl=0,Il=null,ju(e,t,o,1);break;case 2:case 9:if(ma(o)){Fl=0,Il=null,Au(t);break}t=function(){Fl!==2&&Fl!==9||Ml!==e||(Fl=7),td(e)},o.then(t,t);break a;case 3:Fl=7;break a;case 4:Fl=5;break a;case 7:ma(o)?(Fl=0,Il=null,Au(t)):(Fl=0,Il=null,ju(e,t,o,7));break;case 5:var s=null;switch(Nl.tag){case 26:s=Nl.memoizedState;case 5:case 27:var c=Nl;if(s?Wf(s):c.stateNode.complete){Fl=0,Il=null;var l=c.sibling;if(l!==null)Nl=l;else{var u=c.return;u===null?Nl=null:(Nl=u,Mu(u))}break b}}Fl=0,Il=null,ju(e,t,o,5);break;case 6:Fl=0,Il=null,ju(e,t,o,6);break;case 8:vu(),Vl=6;break a;default:throw Error(a(462))}}Ou();break}catch(t){bu(e,t)}while(1);return Fi=Pi=null,P.H=r,P.A=i,jl=n,Nl===null?(Ml=null,Pl=0,Vr(),Vl):0}function Ou(){for(;Nl!==null&&!de();)ku(Nl)}function ku(e){var t=Sc(e.alternate,e,Bl);e.memoizedProps=e.pendingProps,t===null?Mu(e):Nl=t}function Au(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=oc(n,t,t.pendingProps,t.type,void 0,Pl);break;case 11:t=oc(n,t,t.pendingProps,t.type.render,t.ref,Pl);break;case 5:bo(t);default:jc(n,t),t=Nl=Qr(t,Bl),t=Sc(n,t,Bl)}e.memoizedProps=e.pendingProps,t===null?Mu(e):Nl=t}function ju(e,t,n,r){Fi=Pi=null,bo(t),ba=null,xa=0;var i=t.return;try{if(Ks(e,i,t,n,Pl)){Vl=1,Us(e,X(n,e.current)),Nl=null;return}}catch(t){if(i!==null)throw Nl=i,t;Vl=1,Us(e,X(n,e.current)),Nl=null;return}t.flags&32768?(xi||r===1?e=!0:Rl||Pl&536870912?e=!1:(Ll=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ga.current,r!==null&&r.tag===13&&(r.flags|=16384))),Nu(t,e)):Mu(t)}function Mu(e){var t=e;do{if(t.flags&32768){Nu(t,Ll);return}e=t.return;var n=kc(t.alternate,t,Bl);if(n!==null){Nl=n;return}if(t=t.sibling,t!==null){Nl=t;return}Nl=t=e}while(t!==null);Vl===0&&(Vl=5)}function Nu(e,t){do{var n=Ac(e.alternate,e);if(n!==null){n.flags&=32767,Nl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Nl=e;return}Nl=e=n}while(e!==null);Vl=6,Nl=null}function Pu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do zu();while(tu!==0);if(jl&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Br,ze(e,n,o,s,c,l),e===Ml&&(Nl=Ml=null,Pl=0),ru=t,nu=e,iu=n,au=o,ou=i,su=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Ju(_e,function(){return Bu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=jl,jl|=4;try{Xc(e,t,n)}finally{jl=s,F.p=i,P.T=r}}tu=1,Fu(),Iu(),Lu()}}function Fu(){if(tu===1){tu=0;var e=nu,t=ru,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=jl;jl|=4;try{ll(t,e);var a=zd,o=mr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&pr(s.ownerDocument.documentElement,s)){if(c!==null&&hr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=fr(s,h),v=fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{jl=i,F.p=r,P.T=n}}e.current=t,tu=2}}function Iu(){if(tu===2){tu=0;var e=nu,t=ru,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=jl;jl|=4;try{Zc(e,t.alternate,t)}finally{jl=i,F.p=r,P.T=n}}tu=3}}function Lu(){if(tu===4||tu===3){tu=0,fe();var e=nu,t=ru,n=iu,r=su;t.subtreeFlags&10256||t.flags&10256?tu=5:(tu=0,ru=nu=null,Ru(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(eu=null),Ue(n),t=t.stateNode,Ce&&typeof Ce.onCommitFiberRoot==`function`)try{Ce.onCommitFiberRoot(Se,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}iu&3&&zu(),td(e),i=e.pendingLanes,n&261930&&i&42?e===lu?cu++:(cu=0,lu=e):cu=0,nd(0,!1)}}function Ru(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function zu(){return Fu(),Iu(),Lu(),Bu()}function Bu(){if(tu!==5)return!1;var e=nu,t=au;au=0;var n=Ue(iu),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=ou,ou=null;var o=nu,s=iu;if(tu=0,ru=nu=null,iu=0,jl&6)throw Error(a(331));var c=jl;if(jl|=4,El(o.current),vl(o,o.current,s,n),jl=c,nd(0,!1),Ce&&typeof Ce.onPostCommitFiberRoot==`function`)try{Ce.onPostCommitFiberRoot(Se,o)}catch{}return!0}finally{F.p=i,P.T=r,Ru(e,t)}}function Vu(e,t,n){t=X(n,t),t=Z(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Re(e,2),td(e))}function Hu(e,t,n){if(e.tag===3)Vu(e,e,n);else for(;t!==null;){if(t.tag===3){Vu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(eu===null||!eu.has(r))){e=X(n,e),n=Q(2),r=Ma(t,n,2),r!==null&&(Gs(n,r,t,e),Re(r,2),td(r));break}}t=t.return}}function Uu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Al;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(zl=!0,i.add(n),e=Wu.bind(null,e,t,n),t.then(e,e))}function Wu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ml===e&&(Pl&n)===n&&(Vl===4||Vl===3&&(Pl&62914560)===Pl&&300>pe()-Xl?!(jl&2)&&yu(e,0):Wl|=n,Kl===Pl&&(Kl=0)),td(e)}function Gu(e,t){t===0&&(t=Ie()),e=Wr(e,t),e!==null&&(Re(e,t),td(e))}function Ku(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gu(e,n)}function qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Gu(e,n)}function Ju(e,t){return J(e,t)}var Yu=null,Xu=null,Zu=!1,Qu=!1,$u=!1,ed=0;function td(e){e!==Xu&&e.next===null&&(Xu===null?Yu=Xu=e:Xu=Xu.next=e),Qu=!0,Zu||(Zu=!0,cd())}function nd(e,t){if(!$u&&Qu){$u=!0;do for(var n=!1,r=Yu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Te(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,sd(r,a))}else a=Pl,a=Ne(r,r===Ml?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Pe(r,a)||(n=!0,sd(r,a));r=r.next}while(n);$u=!1}}function rd(){id()}function id(){Qu=Zu=!1;var e=0;ed!==0&&Gd()&&(e=ed);for(var t=pe(),n=null,r=Yu;r!==null;){var i=r.next,a=ad(r,t);a===0?(r.next=null,n===null?Yu=i:n.next=i,i===null&&(Xu=n)):(n=r,(e!==0||a&3)&&(Qu=!0)),r=i}tu!==0&&tu!==5||nd(e,!1),ed!==0&&(ed=0)}function ad(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Te(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Fe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ml,n=Pl,n=Ne(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Fl===2||Fl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ue(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Pe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ue(r),Ue(n)){case 2:case 8:n=ge;break;case 32:n=_e;break;case 268435456:n=ye;break;default:n=_e}return r=od.bind(null,e),n=J(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ue(r),e.callbackPriority=2,e.callbackNode=null,2}function od(e,t){if(tu!==0&&tu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(zu()&&e.callbackNode!==n)return null;var r=Pl;return r=Ne(e,e===Ml?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(pu(e,r,t),ad(e,pe()),e.callbackNode!=null&&e.callbackNode===n?od.bind(null,e):null)}function sd(e,t){if(zu())return null;pu(e,t,!0)}function cd(){Yd(function(){jl&6?J(he,rd):id()})}function ld(){if(ed===0){var e=ea;e===0&&(e=ke,ke<<=1,!(ke&261888)&&(ke=256)),ed=e}return ed}function ud(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:zt(``+e)}function dd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function fd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=ud((i[Je]||null).action),o=r.submitter;o&&(t=(t=o[Je]||null)?ud(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ed!==0){var e=o?dd(i,o):new FormData(i);gs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?dd(i,o):new FormData(i),gs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var pd=0;pd<Fr.length;pd++){var md=Fr[pd];Ir(md.toLowerCase(),`on`+(md[0].toUpperCase()+md.slice(1)))}Ir(Dr,`onAnimationEnd`),Ir(Or,`onAnimationIteration`),Ir(kr,`onAnimationStart`),Ir(`dblclick`,`onDoubleClick`),Ir(`focusin`,`onFocus`),Ir(`focusout`,`onBlur`),Ir(Ar,`onTransitionRun`),Ir(jr,`onTransitionStart`),Ir(Mr,`onTransitionCancel`),Ir(Nr,`onTransitionEnd`),ut(`onMouseEnter`,[`mouseout`,`mouseover`]),ut(`onMouseLeave`,[`mouseout`,`mouseover`]),ut(`onPointerEnter`,[`pointerout`,`pointerover`]),ut(`onPointerLeave`,[`pointerout`,`pointerover`]),lt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),lt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),lt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),lt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),lt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),lt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var hd=`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(` `),gd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(hd));function _d(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Lr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Lr(e)}i.currentTarget=null,a=c}}}}function vd(e,t){var n=t[Xe];n===void 0&&(n=t[Xe]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,st.forEach(function(t){t!==`selectionchange`&&(gd.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!Xt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=nt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}qt(function(){var r=a,i=Ht(n),o=[];a:{var c=Pr.get(e);if(c!==void 0){var l=cn,u=e;switch(e){case`keypress`:if(nn(n)===0)break a;case`keydown`:case`keyup`:l=En;break;case`focusin`:u=`focus`,l=_n;break;case`focusout`:u=`blur`,l=_n;break;case`beforeblur`:case`afterblur`:l=_n;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=hn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=On;break;case Dr:case Or:case kr:l=vn;break;case Nr:l=kn;break;case`scroll`:case`scrollend`:l=un;break;case`wheel`:l=An;break;case`copy`:case`cut`:case`paste`:l=yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Dn;break;case`toggle`:case`beforetoggle`:l=jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Jt(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Vt&&(u=n.relatedTarget||n.fromElement)&&(nt(u)||u[Ye]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?nt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=hn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Dn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:it(l),h=u==null?c:it(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,nt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(o,c,l,d,!1),u!==null&&f!==null&&Dd(o,f,u,d,!0)}}a:{if(c=r?it(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Zn;else if(Gn(c))if(Qn)v=sr;else{v=ar;var y=ir}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&It(r.elementType)&&(v=Zn):v=or;if(v&&=v(e,r)){Kn(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ot(c,`number`,c.value)}switch(y=r?it(r):window,e){case`focusin`:(Gn(y)||y.contentEditable===`true`)&&(_r=y,vr=r,yr=null);break;case`focusout`:yr=vr=_r=null;break;case`mousedown`:br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:br=!1,xr(o,n,i);break;case`selectionchange`:if(gr)break;case`keydown`:case`keyup`:xr(o,n,i)}var b;if(Nn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Vn?zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(In&&n.locale!==`ko`&&(Vn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Vn&&(b=tn()):(Qt=i,$t=`value`in Qt?Qt.value:Qt.textContent,Vn=!0)),y=Td(r,x),0<y.length&&(x=new bn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Bn(n),b!==null&&(x.data=b)))),(b=Fn?Hn(e,n):Un(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new bn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),fd(o,e,r,n,i)}_d(o,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Jt(e,n),i!=null&&r.unshift(wd(e,i,a)),i=Jt(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Jt(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=Jt(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
|
|
10
|
+
`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Mt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Mt(e,``+r);break;case`className`:gt(e,`class`,r);break;case`tabIndex`:gt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:gt(e,n,r);break;case`style`:Ft(e,r,o);break;case`data`:if(t!==`object`){gt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=zt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,i.name,i,null),Md(e,t,`formEncType`,i.formEncType,i,null),Md(e,t,`formMethod`,i.formMethod,i,null),Md(e,t,`formTarget`,i.formTarget,i,null)):(Md(e,t,`encType`,i.encType,i,null),Md(e,t,`method`,i.method,i,null),Md(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Bt);break;case`onScroll`:r!=null&&vd(`scroll`,e);break;case`onScrollEnd`:r!=null&&vd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=zt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:vd(`beforetoggle`,e),vd(`toggle`,e),ht(e,`popover`,r);break;case`xlinkActuate`:_t(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:_t(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:_t(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:_t(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:_t(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:_t(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:_t(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:_t(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:_t(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:ht(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Lt.get(n)||n,ht(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:Ft(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Mt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Mt(e,``+r);break;case`onScroll`:r!=null&&vd(`scroll`,e);break;case`onScrollEnd`:r!=null&&vd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Bt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[Je]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):ht(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:vd(`error`,e),vd(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Md(e,t,o,s,n,null)}}i&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:vd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Md(e,t,r,d,n,null)}}Dt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in vd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&kt(e,!!r,n,!0):kt(e,!!r,t,!1);return;case`textarea`:for(s in vd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Md(e,t,s,c,n,null)}jt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:vd(`beforetoggle`,e),vd(`toggle`,e),vd(`cancel`,e),vd(`close`,e);break;case`iframe`:case`object`:vd(`load`,e);break;case`video`:case`audio`:for(r=0;r<hd.length;r++)vd(hd[r],e);break;case`image`:vd(`error`,e),vd(`load`,e);break;case`details`:vd(`toggle`,e);break;case`embed`:case`source`:case`link`:vd(`error`,e),vd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Md(e,t,u,r,n,null)}return;default:if(It(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Et(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?kt(e,!!n,n?[]:``,!1):kt(e,!!n,t,!0)):kt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Md(e,t,s,i,r,o)}At(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(It(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=F.d;F.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=_u();return e||t}function yf(e){var t=rt(e);t!==null&&t.tag===5&&t.type===`form`?vs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Tt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),ot(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Tt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Tt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Tt(n.imageSizes)+`"]`)):i+=`[href="`+Tt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),ot(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Tt(r)+`"][href="`+Tt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),ot(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=at(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);ot(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=at(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ot(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=at(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ot(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=W.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=at(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=at(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=at(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Tt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),ot(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Tt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Tt(n.href)+`"]`);if(r)return t.instance=r,ot(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ot(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,ot(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),ot(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,ot(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),ot(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[et]||a[qe]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ot(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),ot(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=Le(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Le(0),this.hiddenUpdates=Le(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Yr(3,null,null,t),e.current=a,a.stateNode=e,t=Xi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ka(a),e}function tp(e){return e?(e=qr,e):qr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ma(e,r,t),n!==null&&(fu(n,e,t),Na(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Wr(e,67108864);t!==null&&fu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=uu();t=He(t);var n=Wr(e,t);n!==null&&fu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,up(e,t,n,r)}finally{F.p=a,P.T=i}}function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,up(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=rt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Me(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Te(o);s.entanglements[1]|=c,o&=~c}td(a),!(jl&6)&&(Ql=pe()+500,nd(0,!1))}}break;case 31:case 13:s=Wr(a,2),s!==null&&fu(s,a,2),_u(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=Ht(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=nt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){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(me()){case he:return 2;case ge:return 8;case _e:case ve:return 32;case ye:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=rt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=nt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,Ge(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,Ge(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Vt=r,n.target.dispatchEvent(r),Vt=null}else return t=rt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=rt(n);a!==null&&(e.splice(t,3),t-=3,gs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Je]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Je]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,uu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),_u(),t[Ye]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=We();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(a(527,Lp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Se=zp.inject(Rp),Ce=zp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Bs,s=Vs,c=Hs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[Ye]=t.current,xd(e),new Fp(t)}})),Bs=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=zs()})),Vs=_i(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),Hs=_i(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Us=_i(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),Ws=_i(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),Z=o(),Q=e(r(),1),Gs=e(Ei(),1),Ks=Bs(),$=c(),qs=[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]];_i(`bot`,qs);var Js=_i(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),Ys=_i(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),Xs=_i(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Zs=_i(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Qs=_i(`cloud-off`,[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),$s=_i(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),ec=_i(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),tc=_i(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),nc=_i(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),rc=_i(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),ic=_i(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),ac=_i(`diamond`,[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]),oc=_i(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),sc=_i(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),cc=_i(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),lc=_i(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),uc=_i(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),dc=_i(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),fc=_i(`fold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]),pc=_i(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),mc=_i(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),hc=_i(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),gc=_i(`grid-2x2-x`,[[`path`,{d:`M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3`,key:`11za1p`}],[`path`,{d:`m16 16 5 5`,key:`8tpb07`}],[`path`,{d:`m16 21 5-5`,key:`193jll`}]]),_c=_i(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),vc=_i(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),yc=_i(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),bc=_i(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),xc=_i(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Sc=_i(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Cc=_i(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),wc=_i(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Tc=_i(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Ec=_i(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),Dc=_i(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Oc=_i(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),kc=_i(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Ac=_i(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),jc=_i(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),Mc=_i(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),Nc=_i(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Pc=_i(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),Fc=_i(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Ic=_i(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),Lc=_i(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),Rc=_i(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),zc=_i(`replace-all`,[[`path`,{d:`M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`zg1ipl`}],[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`txt6k4`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Bc=_i(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Vc=_i(`rows-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}]]),Hc=_i(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Uc=_i(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Wc=_i(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),Gc=_i(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),Kc=_i(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),qc=_i(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),Jc=_i(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Yc=_i(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),Xc=_i(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),Zc=_i(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),Qc=_i(`table-properties`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),$c=_i(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),el=_i(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),tl=_i(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),nl=_i(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),rl=_i(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),il=_i(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),al=_i(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]);function ol(e,t){return e instanceof Error&&e.message?e.message:t}async function sl(e,t,n,r=`action`){try{n(null),await e()}catch(e){console.error(`[${r}] action failed:`,e),n(ol(e,t))}}async function cl(e,t,n=Vo,r=`action`){await sl(e,t,e=>{e!==null&&n.error(e)},r)}function ll(e){return`https://github.com/${e.owner}/${e.repo}.git`}function ul(e){let t=e.toLowerCase().trim();return t.endsWith(`/`)&&(t=t.slice(0,-1)),t.endsWith(`.git`)&&(t=t.slice(0,-4)),t}function dl(e,t){let n=ul(ll(t));for(let t of e)if(t.missing!==!0&&t.gitRemoteUrl&&ul(t.gitRemoteUrl)===n)return t;return null}function fl(e){return`https://github.com/${e.owner}/${e.repo}.git`}function pl(e,t){switch(e.kind){case`ok`:return null;case`not-git`:return`This folder doesn't contain a git repository. Pick a different folder?`;case`wrong-repo`:return`This folder is a clone of ${e.actualOwner}/${e.actualRepo}, not ${t.owner}/${t.repo}. Pick a different folder?`;case`no-origin`:case`non-github`:case`symlink-escape`:return`This folder isn't a clone of ${t.owner}/${t.repo}. Pick a different folder?`}}function ml(e){return e.kind===`unsupported-version`?{kind:`unsupported-version`,message:`Update Open Knowledge to open this share.`}:e.kind===`invalid`?{kind:`invalid`,message:`Invalid share URL.`}:null}function hl(e){return e.kind===`ok`?{owner:e.owner,repo:e.repo,branch:e.branch,path:e.path,blobUrl:e.blobUrl}:null}function gl(e){let t=[`[receive]`];return e.q1_hit!==void 0&&t.push(`q1_hit=${e.q1_hit}`),e.q2_path!==void 0&&t.push(`q2_path=${e.q2_path}`),e.folder_validate!==void 0&&t.push(`folder_validate=${e.folder_validate}`),e.branch_action!==void 0&&t.push(`branch_action=${e.branch_action}`),e.branch!==void 0&&t.push(`branch=${e.branch}`),e.branch_match!==void 0&&t.push(`branch_match=${e.branch_match}`),e.doc_check!==void 0&&t.push(`doc_check=${e.doc_check}`),e.branch_dialog_action!==void 0&&t.push(`branch_dialog_action=${e.branch_dialog_action}`),t.join(` `)}function _l(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}async function vl(e,t){let n;try{n=dl(await t.listRecent(),{owner:e.owner,repo:e.repo})}catch{return{kind:`miss`}}if(!n)return{kind:`miss`};try{if((await t.validateLocalFolder({folderPath:n.path,owner:e.owner,repo:e.repo})).kind!==`ok`)return{kind:`miss`}}catch{return{kind:`miss`}}let r;try{r=await t.readHeadBranch(n.path)}catch(e){r={currentBranch:null,headSha:null,detached:!1},console.warn(`[receive] q1_branch_check=failed reason=readHeadBranch-threw — mismatch detection skipped, falling through to silent dispatch`,e instanceof Error?e.message:e)}let i=_l(e.branch,r);if(i===`false`||i===`detached`)return{kind:`branch-mismatch`,projectPath:n.path,currentBranch:r.currentBranch,headSha:r.headSha,detached:r.detached};let a;try{a=await t.checkDocExists({projectPath:n.path,docPath:e.path})}catch(e){a=`unreadable`,console.warn(`[receive] q1_doc_check=failed reason=checkDocExists-threw — gate skipped, falling through to silent dispatch`,e instanceof Error?e.message:e)}if(a===`missing`)return{kind:`doc-missing-on-branch`,projectPath:n.path,currentBranch:r.currentBranch,docPath:e.path};try{return await t.open({path:n.path,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkDoc:e.path,pendingBranch:e.branch}),{kind:`hit`}}catch{return{kind:`miss`}}}function yl(e){let t=/\/([^/]+?)(?:\.git)?\/?$/.exec(e);return t?t[1]:`repo`}function bl(e){return{async getAuthStatus(){return e.authQueryTransport.status()},async startSignIn(){return e.openSignIn()},async runClone({url:t,branch:n}){let r=await e.bridge.dialog.openFolder();if(!r)return{kind:`cancelled`};let i=yl(t),a=`${r.replace(/\/$/,``)}/${i}`,o=Vo.loading(X._({id:`GXf9hG`,values:{repoName:i}}),{duration:1/0}),s=typeof n==`string`&&n.length>0?n:null,c=e.cloneTransport.start({url:t,dir:a,branch:s});try{for await(let e of c.events){if(e.type===`progress`){let t=e.phase,n=Math.round(e.pct);Vo.loading(X._({id:`GXf9hG`,values:{repoName:i}}),{id:o,description:X._({id:`SCzAbA`,values:{phase:t,pct:n}}),duration:1/0});continue}if(e.type===`branch-fallback`){console.log(gl({branch_action:`fallback`,branch:e.branch})),Vo.info(X._({id:`3JYy1p`,values:{0:e.branch}}),{duration:8e3});continue}if(e.type===`complete`)return Vo.success(X._({id:`IRv9cH`,values:{repoName:i}}),{id:o,duration:4e3}),{kind:`ok`,dir:e.dir};if(e.type===`error`){let t=e.message;return Vo.error(X._({id:`usidp7`,values:{failureMessage:t}}),{id:o,duration:8e3}),{kind:`error`}}}return Vo.error(X._({id:`PZt2Ds`}),{id:o,duration:8e3}),{kind:`error`}}catch(e){let t=e instanceof Error?e.message:X._({id:`29VNqC`});return Vo.error(X._({id:`mHzJ0v`,values:{message:t}}),{id:o,duration:8e3}),{kind:`error`}}}}}async function xl(e){try{let t=await e.json(),n=zn.safeParse(t);if(n.success)return n.data.title}catch{}}async function Sl(e,t){return fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})})}function Cl(e){let t=e.split(`
|
|
11
|
+
`);for(let e=t.length-1;e>=0;e--){let n=t[e]?.trim();if(n)try{let e=JSON.parse(n);if(e&&typeof e==`object`)return e}catch{}}return null}function wl(){return{async status(e){let t=e?.host??`github.com`,n=await Sl(`/api/local-op/auth/status`,e);if(!n.ok)return{authenticated:!1,host:t,error:await xl(n)};let r=await n.json(),i=typeof r.host==`string`?r.host:t;if(r.authenticated===!0&&typeof r.login==`string`){let e=r.tier===`A`||r.tier===`B`||r.tier===`C`?r.tier:void 0;return{authenticated:!0,host:i,login:r.login,tier:e,name:typeof r.name==`string`?r.name:void 0,email:typeof r.email==`string`?r.email:void 0}}return{authenticated:!1,host:i,error:typeof r.error==`string`?r.error:void 0}},async repos(e){let t=e?.host??`github.com`,n=await Sl(`/api/local-op/auth/repos`,e);if(!n.ok)return{ok:!1,error:await xl(n)??`Failed to fetch repositories`};let r=Cl(await n.text());if(r&&r.type===`error`&&r.problem&&typeof r.problem==`object`){let e=r.problem;return{ok:!1,error:e.detail||e.title||`Failed to fetch repositories`}}if(!r||!Array.isArray(r.repos))return{ok:!1,error:`Failed to fetch repositories`};let i=[];for(let e of r.repos){let t=e;typeof t?.full_name==`string`&&typeof t.clone_url==`string`&&i.push({full_name:t.full_name,clone_url:t.clone_url,private:t.private===!0})}return{ok:!0,host:typeof r.host==`string`?r.host:t,repos:i}}}}function Tl(e){return{status:t=>e.localOp.authStatus(t),repos:t=>e.localOp.authRepos(t)}}function El(){return{start(e){return ia((t,n)=>{(async()=>{try{let r=await fetch(`/api/local-op/clone`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,dir:e.dir||void 0,branch:typeof e.branch==`string`&&e.branch.length>0?e.branch:void 0}),signal:n});if(!r.ok){let e=`Clone failed — check the URL and try again (${r.status})`;try{let t=await r.json(),n=zn.safeParse(t);n.success&&(e=`Clone failed: ${n.data.title}`)}catch{}t({type:`error`,message:e});return}if(!r.body){t({type:`error`,message:`Clone failed — empty response body`});return}let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{done:e,value:r}=await i.read();if(e)break;o+=a.decode(r,{stream:!0});let s=o.split(`
|
|
12
|
+
`);o=s.pop()??``;for(let e of s){if(!e.trim())continue;let n;try{n=JSON.parse(e)}catch{console.warn(`[clone-transport] Dropped unparseable NDJSON line:`,e.slice(0,100));continue}if(n&&typeof n==`object`&&n.type===`error`&&`problem`in n){let e=n.problem;t({type:`error`,message:e?.detail||e?.title||`Unknown error`});break}t(n)}if(n.aborted)break}n.aborted||t({type:`error`,message:`Clone stream ended unexpectedly — check if the clone completed`})}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;t({type:`error`,message:`Clone failed — connection error`})}})()})}}}function Dl(e){return{start(t){let n=typeof t.branch==`string`&&t.branch.length>0?t.branch:null;return e.localOp.clone.start({url:t.url,dir:t.dir,branch:n})}}}var Ol=`ContextMenu`,[kl,Al]=wi(Ol,[da]),jl=da(),[Ml,Nl]=kl(Ol),Pl=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Q.useState(!1),c=jl(t),l=Ci(r),u=Q.useCallback(e=>{s(e),l(e)},[l]);return(0,Z.jsx)(Ml,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Z.jsx)(pa,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};Pl.displayName=Ol;var Fl=`ContextMenuTrigger`,Il=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=Nl(Fl,n),o=jl(n),s=Q.useRef({x:0,y:0}),c=Q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Q.useRef(0),u=Q.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Q.useEffect(()=>u,[u]),Q.useEffect(()=>void(r&&u()),[r,u]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Aa,{...o,virtualRef:c}),(0,Z.jsx)(Si.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:yi(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:yi(e.onPointerDown,du(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:yi(e.onPointerMove,du(u)),onPointerCancel:r?e.onPointerCancel:yi(e.onPointerCancel,du(u)),onPointerUp:r?e.onPointerUp:yi(e.onPointerUp,du(u))})]})});Il.displayName=Fl;var Ll=`ContextMenuPortal`,Rl=e=>{let{__scopeContextMenu:t,...n}=e,r=jl(t);return(0,Z.jsx)(Sa,{...r,...n})};Rl.displayName=Ll;var zl=`ContextMenuContent`,Bl=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Nl(zl,n),a=jl(n),o=Q.useRef(!1);return(0,Z.jsx)(Pa,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Bl.displayName=zl;var Vl=`ContextMenuGroup`,Hl=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(go,{...i,...r,ref:t})});Hl.displayName=Vl;var Ul=`ContextMenuLabel`,Wl=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(mo,{...i,...r,ref:t})});Wl.displayName=Ul;var Gl=`ContextMenuItem`,Kl=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(ba,{...i,...r,ref:t})});Kl.displayName=Gl;var ql=`ContextMenuCheckboxItem`,Jl=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(vo,{...i,...r,ref:t})});Jl.displayName=ql;var Yl=`ContextMenuRadioGroup`,Xl=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(Qi,{...i,...r,ref:t})});Xl.displayName=Yl;var Zl=`ContextMenuRadioItem`,Ql=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(Xi,{...i,...r,ref:t})});Ql.displayName=Zl;var $l=`ContextMenuItemIndicator`,eu=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(Ji,{...i,...r,ref:t})});eu.displayName=$l;var tu=`ContextMenuSeparator`,nu=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(qa,{...i,...r,ref:t})});nu.displayName=tu;var ru=`ContextMenuArrow`,iu=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(fo,{...i,...r,ref:t})});iu.displayName=ru;var au=`ContextMenuSub`,ou=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=jl(t),[s,c]=xi({prop:i,defaultProp:a??!1,onChange:r,caller:au});return(0,Z.jsx)(Wi,{...o,open:s,onOpenChange:c,children:n})};ou.displayName=au;var su=`ContextMenuSubTrigger`,cu=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(la,{...i,...r,ref:t})});cu.displayName=su;var lu=`ContextMenuSubContent`,uu=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=jl(n);return(0,Z.jsx)(Ga,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});uu.displayName=lu;function du(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var fu=Pl,pu=Il,mu=Rl,hu=Bl,gu=Kl,_u=Jl,vu=eu,yu=nu,bu=ou,xu=cu,Su=uu;function Cu(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.okDesktop;if(!e)return;let t=!1;return e.state.query().then(e=>{t||n(e.channel)}).catch(wu),()=>{t=!0}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={channel:t},e[2]=t,e[3]=a),a}function wu(e){console.warn(`[use-update-channel] bridge.state.query() failed`,e)}function Tu(e){let t=(0,$.c)(6),{className:n}=e,{_:r}=i(),{channel:a}=Cu();if(a!==`beta`)return null;let o;t[0]===r?o=t[1]:(o=r({id:`9fhQRL`}),t[0]=r,t[1]=o);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(s,{id:`cSCbv3`}),t[2]=c):c=t[2];let l;return t[3]!==n||t[4]!==o?(l=(0,Z.jsx)(ce,{variant:`secondary`,"aria-label":o,"data-testid":`beta-badge`,className:n,children:c}),t[3]=n,t[4]=o,t[5]=l):l=t[5],l}function Eu(e){switch(e){case`receiving`:return{id:`qbfj1f`};case`resolving`:return{id:`adsMWO`};case`checking`:return{id:`1HBhDS`};case`init`:return{id:`LlHqdU`};case`done`:return{id:`bD8I7O`};default:return{id:`25Pw6a`}}}function Du(e){let t=e.trim();if(/^[\w.-]+\/[\w.-]+$/.test(t))return t.split(`/`)[1];try{return new URL(t.replace(/^git@([^:]+):/,`https://$1/`)).pathname.replace(/\.git$/,``).split(`/`).pop()??`repo`}catch{return t.split(`/`).pop()?.replace(/\.git$/,``)??`repo`}}var Ou=null;function ku(e){let t=(0,$.c)(99),{open:n,onOpenChange:r,onSignIn:a,onCloneComplete:o,transport:c,authQueryTransport:l,pickParentFolder:u,initialUrl:d}=e,{_:f}=i(),p;t[0]===c?p=t[1]:(p=c??El(),t[0]=c,t[1]=p);let m=p,h;t[2]===l?h=t[3]:(h=l??wl(),t[2]=l,t[3]=h);let g=h,_=u!==void 0,[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(``),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(Ou),[O,k]=(0,Q.useState)(!1),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(-1),P=(0,Q.useRef)(null),F=(0,Q.useRef)(null),I=(0,Q.useRef)(null),L=(0,Q.useId)(),R;t[4]!==n||t[5]!==g?(R=()=>{if(!n)return;let e=!1;return g.status().then(t=>{Ou=t.authenticated,e||D(t.authenticated)}).catch(()=>{Ou=!1,e||D(!1)}),()=>{e=!0}},t[4]=n,t[5]=g,t[6]=R):R=t[6];let z;t[7]===n?z=t[8]:(z=[n],t[7]=n,t[8]=z),(0,Q.useEffect)(R,z);let B;t[9]!==E||t[10]!==n||t[11]!==g?(B=()=>{if(!E||!n)return;let e=!1;return T(!0),g.repos().then(t=>{e||(C(t.ok?t.repos:[]),T(!1))}).catch(()=>{e||(C([]),T(!1))}),()=>{e=!0}},t[9]=E,t[10]=n,t[11]=g,t[12]=B):B=t[12];let V;t[13]!==E||t[14]!==n?(V=[E,n],t[13]=E,t[14]=n,t[15]=V):V=t[15],(0,Q.useEffect)(B,V);let H,U;t[16]!==d||t[17]!==n||t[18]!==_?(H=()=>{if(!n||!d||(y(d),_))return;let e=Du(d);e&&x(`~/Documents/${e}`)},U=[n,d,_],t[16]=d,t[17]=n,t[18]=_,t[19]=H,t[20]=U):(H=t[19],U=t[20]),(0,Q.useEffect)(H,U);let W,G;t[21]!==M||t[22]!==L?(G=()=>{M<0||document.getElementById(`${L}-opt-${M}`)?.scrollIntoView({block:`nearest`})},W=[M,L],t[21]=M,t[22]=L,t[23]=W,t[24]=G):(W=t[23],G=t[24]),(0,Q.useEffect)(G,W);let K;t[25]===_?K=t[26]:(K=function(e){if(y(e),j(!0),N(-1),_)return;let t=Du(e);t&&x(`~/Documents/${t}`)},t[25]=_,t[26]=K);let ee=K,q;t[27]===_?q=t[28]:(q=function(e){if(y(e.clone_url),_)return;let t=e.full_name.split(`/`)[1];x(`~/Documents/${t}`)},t[27]=_,t[28]=q);let te=q,ne;t[29]!==f||t[30]!==b||t[31]!==o||t[32]!==r||t[33]!==u||t[34]!==m||t[35]!==v?(ne=async function(){let e=v.trim();if(!e){Vo.error(f({id:`FTUGgh`}));return}let t=b||``;if(u){k(!0);let n=await u();if(!n){k(!1);return}let r=Du(e);t=`${n.replace(/\/$/,``)}/${r}`}else k(!0);let n=Vo.loading(f({id:`2tgFCe`}),{duration:1/0});F.current=n;let i=m.start({url:e,dir:t});P.current=i.cancel;try{let e=i.events[Symbol.asyncIterator](),t=await e.next();for(;!t.done;){let i=t.value;if(i.type===`progress`){let e=f(Eu(i.phase));Vo.loading(`${e} — ${i.pct}%`,{id:n})}else if(i.type===`complete`){Vo.success(f({id:`u_lS4C`}),{id:n}),r(!1),k(!1),P.current=null;let e=`port`in i?i.port:void 0;o?o({port:e,dir:i.dir}):e!==void 0&&(window.location.href=`http://localhost:${e}`);return}else if(i.type===`error`){let e=i.message;Vo.error(f({id:`eFJkVt`,values:{cloneError:e}}),{id:n}),k(!1),P.current=null;return}t=await e.next()}Vo.error(f({id:`Tz9pJB`}),{id:n}),k(!1),P.current=null}catch(e){console.error(`[CloneDialog] clone iteration failed:`,e),Vo.error(f({id:`K9J00P`}),{id:n}),k(!1),P.current=null}},t[29]=f,t[30]=b,t[31]=o,t[32]=r,t[33]=u,t[34]=m,t[35]=v,t[36]=ne):ne=t[36];let re=ne,ie;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(ie=function(){P.current?.(),P.current=null,k(!1),Vo.dismiss(F.current??void 0)},t[37]=ie):ie=t[37];let ae=ie,oe;t[38]!==O||t[39]!==r||t[40]!==_?(oe=function(e){O||(r(e),e||(y(``),_||x(``),j(!1),N(-1)))},t[38]=O,t[39]=r,t[40]=_,t[41]=oe):oe=t[41];let se=oe,ce;t[42]===te?ce=t[43]:(ce=function(e){te(e),j(!1),N(-1),I.current?.focus()},t[42]=te,t[43]=ce);let le=ce,J=E===null||w&&S===null,ue;if(t[44]!==S||t[45]!==v){let e=v.trim().toLowerCase(),n;t[47]===S?n=t[48]:(n=S??[],t[47]=S,t[48]=n),ue=n.filter(t=>`${t.full_name} ${t.clone_url}`.toLowerCase().includes(e)),t[44]=S,t[45]=v,t[46]=ue}else ue=t[46];let de=ue,fe;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(fe=/:\/\/|^git@|\.git$/i,t[49]=fe):fe=t[49];let pe;t[50]===v?pe=t[51]:(pe=fe.test(v.trim()),t[50]=v,t[51]=pe);let me=pe,he=E===!0&&S!==null&&de.length===0&&!me,ge=A&&E!==!1&&!O&&(J||de.length>0||he),_e=de.length,ve=`${L}-loading`,ye,be;t[52]===_e?(ye=t[53],be=t[54]):(ye=()=>{N(e=>e>=_e?_e-1:e)},be=[_e],t[52]=_e,t[53]=ye,t[54]=be),(0,Q.useEffect)(ye,be);let xe;t[55]!==M||t[56]!==O||t[57]!==ge||t[58]!==le||t[59]!==de?(xe=function(e){if(!O)if(e.key===`ArrowDown`){if(e.preventDefault(),!ge){j(!0);return}N(e=>Math.min(e+1,de.length-1))}else e.key===`ArrowUp`?(e.preventDefault(),N(Fu)):e.key===`Enter`?ge&&M>=0&&M<de.length&&(e.preventDefault(),le(de[M])):e.key===`Escape`&&ge&&(e.preventDefault(),e.stopPropagation(),j(!1),N(-1))},t[55]=M,t[56]=O,t[57]=ge,t[58]=le,t[59]=de,t[60]=xe):xe=t[60];let Se=xe,Ce;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,Z.jsx)(Ro,{children:(0,Z.jsx)(ko,{children:(0,Z.jsx)(s,{id:`VdXv4D`})})}),t[61]=Ce):Ce=t[61];let we;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(`label`,{htmlFor:`clone-source`,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`IreQBq`})}),t[62]=we):we=t[62];let Te;t[63]!==f||t[64]!==M||t[65]!==O||t[66]!==Se||t[67]!==ee||t[68]!==E||t[69]!==L||t[70]!==ve||t[71]!==a||t[72]!==ge||t[73]!==J||t[74]!==S||t[75]!==le||t[76]!==de||t[77]!==v?(Te=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[we,E===!1?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Uo,{id:`clone-source`,placeholder:f({id:`Xv_ijG`}),value:v,onChange:e=>ee(e.target.value),disabled:O}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-1sm text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`9oE4C3`})}),(0,Z.jsx)(Ti,{variant:`link`,className:`h-auto p-0`,onClick:()=>a?.(),disabled:O,children:(0,Z.jsx)(s,{id:`gtmbUO`})})]})]}):(0,Z.jsxs)(jt,{open:ge,onOpenChange:j,children:[(0,Z.jsx)(zt,{asChild:!0,children:(0,Z.jsx)(Uo,{id:`clone-source`,ref:I,role:`combobox`,"aria-expanded":ge,"aria-controls":ge?J?ve:L:void 0,"aria-activedescendant":M>=0?`${L}-opt-${M}`:void 0,"aria-autocomplete":`list`,autoComplete:`off`,placeholder:f({id:`R0jJzV`}),value:v,onChange:e=>ee(e.target.value),onFocus:()=>j(!0),onKeyDown:Se,disabled:O})}),(0,Z.jsx)(Fe,{align:`start`,sideOffset:4,className:`w-(--radix-popover-trigger-width) max-h-56 overflow-y-auto overscroll-y-contain subtle-scrollbar p-0`,onOpenAutoFocus:Pu,onCloseAutoFocus:Nu,onInteractOutside:e=>{I.current?.contains(e.target)&&e.preventDefault()},onWheel:Mu,onTouchMove:ju,children:J?(0,Z.jsxs)(`output`,{id:ve,className:`flex flex-col gap-1.5 px-3 py-2`,"aria-label":f({id:`8XQRON`}),children:[(0,Z.jsx)(Ha,{className:`h-4 w-2/3`}),(0,Z.jsx)(Ha,{className:`h-4 w-1/2`}),(0,Z.jsx)(Ha,{className:`h-4 w-3/4`}),(0,Z.jsx)(Ha,{className:`h-4 w-2/5`})]}):(0,Z.jsx)(`div`,{id:L,role:`listbox`,"aria-label":f({id:`KX1MZR`}),className:`py-1`,children:de.length===0?(0,Z.jsx)(`div`,{role:`presentation`,className:`px-3 py-2 text-xs text-muted-foreground`,children:S&&S.length===0?(0,Z.jsx)(s,{id:`cOSAfL`}):(0,Z.jsx)(s,{id:`8eW0WQ`})}):de.map((e,t)=>(0,Z.jsxs)(`div`,{id:`${L}-opt-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===M,onMouseDown:Au,onMouseEnter:()=>N(t),onClick:()=>le(e),className:vi(`flex cursor-default items-center gap-2 px-3 py-1.5 text-sm`,t===M&&`bg-accent text-accent-foreground`),children:[e.private?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Tc,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`n5n_vi`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Cr,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`NuH1jp`})})]}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.full_name})]},e.full_name))})})]})]}),t[63]=f,t[64]=M,t[65]=O,t[66]=Se,t[67]=ee,t[68]=E,t[69]=L,t[70]=ve,t[71]=a,t[72]=ge,t[73]=J,t[74]=S,t[75]=le,t[76]=de,t[77]=v,t[78]=Te):Te=t[78];let Ee;t[79]!==O||t[80]!==b||t[81]!==_?(Ee=!_&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{htmlFor:`clone-path`,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`Gp_twO`})}),(0,Z.jsx)(Uo,{id:`clone-path`,placeholder:`~/Documents/repo-name`,value:b,onChange:e=>x(e.target.value),disabled:O})]}),t[79]=O,t[80]=b,t[81]=_,t[82]=Ee):Ee=t[82];let De;t[83]!==Te||t[84]!==Ee?(De=(0,Z.jsx)(Fo,{children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[Te,Ee]})}),t[83]=Te,t[84]=Ee,t[85]=De):De=t[85];let Oe;t[86]!==O||t[87]!==re||t[88]!==se||t[89]!==v||t[90]!==_?(Oe=(0,Z.jsx)(Io,{children:O?(0,Z.jsx)(Ti,{variant:`outline`,className:`font-mono uppercase`,onClick:ae,children:(0,Z.jsx)(s,{id:`dEgA5A`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ti,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>se(!1),children:(0,Z.jsx)(s,{id:`dEgA5A`})}),(0,Z.jsx)(Ti,{onClick:()=>void re(),disabled:!v.trim(),"aria-describedby":_?`clone-picker-hint`:void 0,children:(0,Z.jsx)(s,{id:`9UQ730`})}),_&&(0,Z.jsx)(`span`,{id:`clone-picker-hint`,className:`sr-only`,children:(0,Z.jsx)(s,{id:`EvPX7f`})})]})}),t[86]=O,t[87]=re,t[88]=se,t[89]=v,t[90]=_,t[91]=Oe):Oe=t[91];let ke;t[92]!==De||t[93]!==Oe?(ke=(0,Z.jsxs)(No,{className:`sm:max-w-lg`,children:[Ce,De,Oe]}),t[92]=De,t[93]=Oe,t[94]=ke):ke=t[94];let Ae;return t[95]!==se||t[96]!==n||t[97]!==ke?(Ae=(0,Z.jsx)(zo,{open:n,onOpenChange:se,children:ke}),t[95]=se,t[96]=n,t[97]=ke,t[98]=Ae):Ae=t[98],Ae}function Au(e){return e.preventDefault()}function ju(e){return e.stopPropagation()}function Mu(e){return e.stopPropagation()}function Nu(e){return e.preventDefault()}function Pu(e){return e.preventDefault()}function Fu(e){return Math.max(e-1,-1)}var Iu=(0,Q.lazy)(()=>n(()=>import(`./ConsentDialogBody-RTxXUjwn.js`),__vite__mapDeps([5,1,6,7,8,9,10,11,12]),import.meta.url));function Lu(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(Zo.subscribe,zu,Ru))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(Iu,{})}),e[0]=t):t=e[0],t}function Ru(){return!1}function zu(){return Zo.getSnapshot()!==null}var Bu=180,Vu=5e3;function Hu(e,t){if(e===``||t===``)return``;let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return`${e.replace(/[/\\]+$/,``)}${n}${t}`}function Uu(e){if(e===``)return``;let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function Wu(e){if(e===``)return``;let t=e.replace(/[/\\]+$/,``);if(t===``)return``;let n=t.match(/[/\\][^/\\]+$/);if(n===null)return``;let r=t.length-n[0].length;return r===0?t[0]??``:t.slice(0,r)}function Gu(e){let{parent:t,sanitizedName:n,enclosingProject:r,enclosingGit:i,targetState:a}=e;return t===``||n===``?{kind:`idle`}:r===null?i===null?a===`exists-nonempty`?{kind:`block-nonempty`}:{kind:`free`}:{kind:`confirm-git`,gitRoot:i.gitRoot}:{kind:`block-nested`,rootPath:r.rootPath}}function Ku(e){let t=e instanceof Error?e.message:String(e);for(let e of Ur)if(t.startsWith(`${e}:`)||t.includes(`${e}: `))return e===`nested-project`||e===`target-not-empty`?{reason:e}:{reason:e,message:t};return{reason:`unknown`,message:t}}function qu(e){switch(e.reason){case`nested-project`:return{id:`ScwcF2`};case`target-not-empty`:return{id:`e8L17t`};case`invalid-args`:return{id:`6bTTAN`};case`mkdir-failed`:return{id:`gJR87V`};case`git-init-failed`:return{id:`4CfgPM`};case`init-failed`:return{id:`l17ab4`};case`discovery-failed`:return{id:`ThmUrC`};case`unknown`:return{id:`AddR83`}}}function Ju(e){let t=(0,$.c)(160),{open:n,onOpenChange:r,bridge:a}=e,{_:o}=i(),c=(0,Q.useId)(),[l,u]=(0,Q.useState)(``),[d,f]=(0,Q.useState)(``),[p,m]=(0,Q.useState)(td),h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h={kind:`idle`},t[0]=h):h=t[0];let[g,_]=(0,Q.useState)(h),[v,y]=(0,Q.useState)(`idle`),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(null),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w={kind:`idle`},t[1]=w):w=t[1];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(0),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(``),N;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(N=new Set,t[2]=N):N=t[2];let P=(0,Q.useRef)(N),F=(0,Q.useRef)(null),I=(0,Q.useRef)(null),L=(0,Q.useRef)(null),R=(0,Q.useRef)(0),z,B;t[3]!==a||t[4]!==n?(z=()=>{if(!n)return;P.current.clear(),C(null),_({kind:`idle`}),y(`idle`),x(!1),u(``),m(new Set(xn)),E({kind:`idle`}),A(!1),M(``),R.current+=1;let e=!1;f(``),a.fs.defaultProjectsRoot().then(t=>{e||f(t)}).catch(ed);let t=requestAnimationFrame(()=>{L.current?.focus()});return()=>{e=!0,cancelAnimationFrame(t)}},B=[n,a],t[3]=a,t[4]=n,t[5]=z,t[6]=B):(z=t[5],B=t[6]),(0,Q.useEffect)(z,B);let V;t[7]!==a||t[8]!==k||t[9]!==n||t[10]!==l||t[11]!==j?(V=()=>{if(!n)return;if(I.current!==null&&clearTimeout(I.current),F.current!==null&&F.current.abort(),l===``){_({kind:`idle`}),y(`idle`);return}let e=j.trim(),t=k&&e!==``,r=t?l:Wu(l),i=rr(t?e:Uu(l));if(r===``||i===``){_({kind:`idle`}),y(`idle`);return}let o=Hu(r,i),s=new AbortController;return F.current=s,I.current=setTimeout(()=>{y(`in-flight`),Promise.all([a.fs.findEnclosingProjectRoot(r),a.fs.findEnclosingGitRoot(r),a.fs.folderState(o)]).then(e=>{let[t,n,a]=e;if(s.signal.aborted)return;y(`idle`);let o=Gu({parent:r,sanitizedName:i,enclosingProject:t,enclosingGit:n,targetState:a});_(o),o.kind===`block-nonempty`&&A(!0)}).catch(e=>{s.signal.aborted||(console.warn(`[CreateProjectDialog] cascade probe failed:`,e),y(`idle`),_({kind:`free`}))})},Bu),()=>{I.current!==null&&clearTimeout(I.current),s.abort()}},t[7]=a,t[8]=k,t[9]=n,t[10]=l,t[11]=j,t[12]=V):V=t[12];let H;t[13]!==a||t[14]!==k||t[15]!==n||t[16]!==l||t[17]!==D||t[18]!==j?(H=[n,l,a,D,k,j],t[13]=a,t[14]=k,t[15]=n,t[16]=l,t[17]=D,t[18]=j,t[19]=H):H=t[19],(0,Q.useEffect)(V,H);let U,W;t[20]===n?(U=t[21],W=t[22]):(U=()=>{if(!n)return;let e=()=>O($u);return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},W=[n],t[20]=n,t[21]=U,t[22]=W),(0,Q.useEffect)(U,W);let G=(0,Q.useRef)(`idle`),K,ee;t[23]===v?(K=t[24],ee=t[25]):(K=()=>{G.current=v},ee=[v],t[23]=v,t[24]=K,t[25]=ee),(0,Q.useEffect)(K,ee);let q,te;t[26]!==g.kind||t[27]!==n?(q=()=>{if(!n||g.kind!==`confirm-git`)return;let e=setInterval(()=>{G.current!==`in-flight`&&O(Qu)},Vu);return()=>clearInterval(e)},te=[n,g.kind],t[26]=g.kind,t[27]=n,t[28]=q,t[29]=te):(q=t[28],te=t[29]),(0,Q.useEffect)(q,te);let ne;t[30]!==g.gitRoot||t[31]!==g.kind||t[32]!==T.gitRoot||t[33]!==T.kind?(ne=()=>{if(g.kind!==`confirm-git`){T.kind!==`idle`&&(R.current+=1,E({kind:`idle`}));return}T.kind===`confirming`&&T.gitRoot!==g.gitRoot&&E({kind:`idle`}),T.kind===`pending`&&T.gitRoot!==g.gitRoot&&(R.current+=1,E({kind:`idle`}))},t[30]=g.gitRoot,t[31]=g.kind,t[32]=T.gitRoot,t[33]=T.kind,t[34]=ne):ne=t[34];let re;t[35]!==g||t[36]!==T?(re=[g,T],t[35]=g,t[36]=T,t[37]=re):re=t[37],(0,Q.useEffect)(ne,re);let ie;t[38]!==a||t[39]!==g.kind||t[40]!==n?(ie=()=>{if(!n)return;let e=null;g.kind===`block-nested`?e=`nested`:g.kind===`block-nonempty`?e=`nonempty`:g.kind===`confirm-git`&&(e=`git-confirm`),e!==null&&(P.current.has(e)||(P.current.add(e),a.project.recordCreateNewBannerShown(e).catch(Zu)))},t[38]=a,t[39]=g.kind,t[40]=n,t[41]=ie):ie=t[41];let ae;t[42]!==a||t[43]!==g||t[44]!==n?(ae=[n,g,a],t[42]=a,t[43]=g,t[44]=n,t[45]=ae):ae=t[45],(0,Q.useEffect)(ie,ae);let oe,se,ce,le,J,ue,de;t[46]!==k||t[47]!==l||t[48]!==j?(ue=j.trim(),J=k&&ue!==``,oe=l===``?``:J?ue:Uu(l),le=l===``?``:rr(oe),se=l!==``&&le!==oe&&le!==``,ce=l!==``&&oe!==``&&le===``,de=J?Hu(l,le):l,t[46]=k,t[47]=l,t[48]=j,t[49]=oe,t[50]=se,t[51]=ce,t[52]=le,t[53]=J,t[54]=ue,t[55]=de):(oe=t[49],se=t[50],ce=t[51],le=t[52],J=t[53],ue=t[54],de=t[55]);let fe=de,pe=!b&&l!==``&&le!==``&&v===`idle`&&(g.kind===`free`||g.kind===`confirm-git`),me;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(me=function(e){m(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[56]=me):me=t[56];let he=me,ge;t[57]!==a||t[58]!==d?(ge=async function(){try{let e=await a.dialog.openFolder(d===``?void 0:{defaultPath:d});if(e===null)return;u(e),O(Xu),C(null),A(!1),M(``)}catch(e){console.warn(`[CreateProjectDialog] dialog.openFolder failed:`,e)}},t[57]=a,t[58]=d,t[59]=ge):ge=t[59];let _e=ge,ve;t[60]!==a||t[61]!==pe||t[62]!==p||t[63]!==r||t[64]!==l||t[65]!==le||t[66]!==J?(ve=async function(e){if(e.preventDefault(),pe){x(!0),C(null);try{await a.project.createNew({parent:J?l:Wu(l),name:le,editors:Array.from(p)}),r(!1)}catch(e){C(Ku(e)),x(!1)}}},t[60]=a,t[61]=pe,t[62]=p,t[63]=r,t[64]=l,t[65]=le,t[66]=J,t[67]=ve):ve=t[67];let ye=ve,be;t[68]!==b||t[69]!==r?(be=function(e){b||r(e)},t[68]=b,t[69]=r,t[70]=be):be=t[70];let xe=be,Se;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(Se=async function(e){E({kind:`confirming`,gitRoot:e})},t[71]=Se):Se=t[71];let Ce=Se,we;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(we=async function(){E({kind:`idle`})},t[72]=we):we=t[72];let Te=we,Ee;t[73]===a?Ee=t[74]:(Ee=async function(e){let t=R.current+1;R.current=t,E({kind:`pending`,gitRoot:e});try{if(await a.fs.removeGitFolder(e),R.current!==t)return;O(Yu),E({kind:`idle`})}catch(e){let n=e;if(R.current!==t)return;let r=n instanceof Error?n.message:String(n);console.error(`[CreateProjectDialog] bridge.fs.removeGitFolder failed:`,n),E({kind:`error`,message:r})}},t[73]=a,t[74]=Ee);let De=Ee,Oe;t[75]!==a||t[76]!==r?(Oe=async function(e){r(!1);try{await a.project.open({path:e,target:`new-window`,entryPoint:`create-new-nested-redirect`})}catch(e){console.warn(`[CreateProjectDialog] project.open failed:`,e)}},t[75]=a,t[76]=r,t[77]=Oe):Oe=t[77];let ke=Oe,Ae;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,Z.jsx)(ko,{children:(0,Z.jsx)(s,{id:`wbv9xO`})}),t[78]=Ae):Ae=t[78];let je;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,Z.jsxs)(Ro,{children:[Ae,(0,Z.jsx)(Do,{children:(0,Z.jsx)(s,{id:`WEzuMq`})})]}),t[79]=je):je=t[79];let Me;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,Z.jsx)(Jo,{htmlFor:`create-location`,children:(0,Z.jsx)(s,{id:`wJijgU`})}),t[80]=Me):Me=t[80];let Ne;t[81]===_e?Ne=t[82]:(Ne=()=>void _e(),t[81]=_e,t[82]=Ne);let Pe;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,Z.jsx)(s,{id:`O2UpM1`}),t[83]=Pe):Pe=t[83];let Fe;t[84]!==b||t[85]!==Ne?(Fe=(0,Z.jsx)(`div`,{className:`flex items-stretch gap-2`,children:(0,Z.jsx)(Ti,{id:`create-location`,ref:L,type:`button`,variant:`outline`,disabled:b,onClick:Ne,"aria-describedby":`create-target-caption`,"data-testid":`create-browse`,children:Pe})}),t[84]=b,t[85]=Ne,t[86]=Fe):Fe=t[86];let Ie;t[87]===fe?Ie=t[88]:(Ie=fe===``?(0,Z.jsx)(s,{id:`i_grbe`}):fe,t[87]=fe,t[88]=Ie);let Le;t[89]===Ie?Le=t[90]:(Le=(0,Z.jsx)(`p`,{id:`create-target-caption`,className:`text-1sm text-muted-foreground`,"aria-live":`polite`,"data-testid":`create-target-caption`,children:Ie}),t[89]=Ie,t[90]=Le);let Re;t[91]!==Fe||t[92]!==Le?(Re=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Me,Fe,Le]}),t[91]=Fe,t[92]=Le,t[93]=Re):Re=t[93];let ze;t[94]!==b||t[95]!==g.kind||t[96]!==k||t[97]!==se||t[98]!==ce||t[99]!==le||t[100]!==J||t[101]!==j||t[102]!==ue?(ze=k?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`create-subfolder-rescue`,children:[(0,Z.jsx)(Jo,{htmlFor:`create-subfolder-name`,children:(0,Z.jsx)(s,{id:`NYUhy5`})}),(0,Z.jsx)(Uo,{id:`create-subfolder-name`,value:j,placeholder:`my-project`,onChange:e=>M(e.target.value),disabled:b,autoFocus:!0,"aria-invalid":J&&(ce||g.kind===`block-nonempty`),"data-testid":`create-subfolder-input`}),ue===``?(0,Z.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:`text-1sm text-muted-foreground`,"data-testid":`create-subfolder-empty-error`,children:(0,Z.jsx)(s,{id:`hJu2pH`})}):ce?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-subfolder-erased-error`,children:(0,Z.jsx)(s,{id:`JUamR6`})}):g.kind===`block-nonempty`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-subfolder-taken-error`,children:(0,Z.jsx)(s,{id:`tCelbM`,values:{sanitized:le},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):se?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`KnoB--`,values:{sanitized:le},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null]}):null,t[94]=b,t[95]=g.kind,t[96]=k,t[97]=se,t[98]=ce,t[99]=le,t[100]=J,t[101]=j,t[102]=ue,t[103]=ze):ze=t[103];let Be;t[104]!==k||t[105]!==oe||t[106]!==se||t[107]!==le?(Be=!k&&se?(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,"data-testid":`create-banner-sanitize-diverged`,children:(0,Z.jsx)(s,{id:`z2G3EK`,values:{rawName:oe,sanitized:le},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`}),1:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[104]=k,t[105]=oe,t[106]=se,t[107]=le,t[108]=Be):Be=t[108];let Ve;t[109]!==k||t[110]!==oe||t[111]!==ce?(Ve=!k&&ce?(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,"data-testid":`create-banner-sanitize-erased`,children:(0,Z.jsx)(s,{id:`cBbVqQ`,values:{rawName:oe},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[109]=k,t[110]=oe,t[111]=ce,t[112]=Ve):Ve=t[112];let Y;t[113]!==g||t[114]!==De||t[115]!==ke||t[116]!==T?(Y=(0,Z.jsx)(nd,{cascade:g,onOpenNested:ke,removeGitState:T,onRequestRemoveGit:Ce,onCancelRemoveGit:Te,onConfirmRemoveGit:De}),t[113]=g,t[114]=De,t[115]=ke,t[116]=T,t[117]=Y):Y=t[117];let He;t[118]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,Z.jsx)(`legend`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`0YEbfk`})}),t[118]=He):He=t[118];let Ue;t[119]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`prHfed`})}),t[119]=Ue):Ue=t[119];let We;t[120]!==b||t[121]!==p?(We=xn.map(e=>{let t=`create-editor-${e}`;return(0,Z.jsxs)(Jo,{htmlFor:t,className:`text-sm font-normal`,children:[(0,Z.jsx)(qo,{id:t,checked:p.has(e),onCheckedChange:()=>he(e),disabled:b,"data-testid":`create-editor-${e}`}),(0,Z.jsx)(`span`,{children:li[e]})]},e)}),t[120]=b,t[121]=p,t[122]=We):We=t[122];let Ge;t[123]===We?Ge=t[124]:(Ge=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col space-y-2 pb-2`,children:[He,Ue,We]}),t[123]=We,t[124]=Ge);let Ke;t[125]!==o||t[126]!==S?(Ke=S===null?null:(0,Z.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-submit-error`,children:o(qu(S))}),t[125]=o,t[126]=S,t[127]=Ke):Ke=t[127];let qe;t[128]!==c||t[129]!==ye||t[130]!==Re||t[131]!==ze||t[132]!==Be||t[133]!==Ve||t[134]!==Y||t[135]!==Ge||t[136]!==Ke?(qe=(0,Z.jsx)(Fo,{className:`space-y-6`,children:(0,Z.jsxs)(`form`,{id:c,onSubmit:ye,"data-testid":`create-project-form`,className:`space-y-6`,children:[Re,ze,Be,Ve,Y,Ge,Ke]})}),t[128]=c,t[129]=ye,t[130]=Re,t[131]=ze,t[132]=Be,t[133]=Ve,t[134]=Y,t[135]=Ge,t[136]=Ke,t[137]=qe):qe=t[137];let Je;t[138]===r?Je=t[139]:(Je=()=>r(!1),t[138]=r,t[139]=Je);let Ye;t[140]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,Z.jsx)(s,{id:`dEgA5A`}),t[140]=Ye):Ye=t[140];let Xe;t[141]!==b||t[142]!==Je?(Xe=(0,Z.jsx)(Ti,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:Je,disabled:b,"data-testid":`create-cancel`,children:Ye}),t[141]=b,t[142]=Je,t[143]=Xe):Xe=t[143];let Ze=!pe,Qe;t[144]===b?Qe=t[145]:(Qe=b?(0,Z.jsx)(s,{id:`E9bKSA`}):(0,Z.jsx)(s,{id:`hYgDIe`}),t[144]=b,t[145]=Qe);let $e;t[146]!==c||t[147]!==Ze||t[148]!==Qe?($e=(0,Z.jsx)(Ti,{type:`submit`,form:c,disabled:Ze,"data-testid":`create-submit`,children:Qe}),t[146]=c,t[147]=Ze,t[148]=Qe,t[149]=$e):$e=t[149];let et;t[150]!==Xe||t[151]!==$e?(et=(0,Z.jsxs)(Io,{children:[Xe,$e]}),t[150]=Xe,t[151]=$e,t[152]=et):et=t[152];let tt;t[153]!==qe||t[154]!==et?(tt=(0,Z.jsxs)(No,{className:`sm:max-w-lg`,"data-testid":`create-project-dialog`,children:[je,qe,et]}),t[153]=qe,t[154]=et,t[155]=tt):tt=t[155];let nt;return t[156]!==xe||t[157]!==n||t[158]!==tt?(nt=(0,Z.jsx)(zo,{open:n,onOpenChange:xe,children:tt}),t[156]=xe,t[157]=n,t[158]=tt,t[159]=nt):nt=t[159],nt}function Yu(e){return e+1}function Xu(e){return e+1}function Zu(){}function Qu(e){return e+1}function $u(e){return e+1}function ed(e){console.warn(`[CreateProjectDialog] defaultProjectsRoot probe failed:`,e)}function td(){return new Set(xn)}function nd(e){let t=(0,$.c)(37),{cascade:n,onOpenNested:r,removeGitState:i,onRequestRemoveGit:a,onCancelRemoveGit:o,onConfirmRemoveGit:c}=e;if(n.kind===`idle`||n.kind===`free`||n.kind===`block-nonempty`)return null;if(n.kind===`block-nested`){let{rootPath:e}=n,i;t[0]===e?i=t[1]:(i=Uu(e),t[0]=e,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o={rootPath:e},t[2]=e,t[3]=o);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c={0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})},t[4]=c):c=t[4];let l;t[5]===o?l=t[6]:(l=(0,Z.jsx)(`p`,{className:`mb-2`,children:(0,Z.jsx)(s,{id:`aIgBKf`,values:o,components:c})}),t[5]=o,t[6]=l);let u;t[7]!==r||t[8]!==e?(u=()=>r(e),t[7]=r,t[8]=e,t[9]=u):u=t[9];let d;t[10]===a?d=t[11]:(d=(0,Z.jsx)(s,{id:`1Ta7Fd`,values:{basename:a}}),t[10]=a,t[11]=d);let f;t[12]!==u||t[13]!==d?(f=(0,Z.jsx)(Ti,{type:`button`,variant:`outline`,size:`sm`,onClick:u,"data-testid":`create-banner-nested-open`,children:d}),t[12]=u,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==l||t[16]!==f?(p=(0,Z.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-banner-nested`,children:[l,f]}),t[15]=l,t[16]=f,t[17]=p):p=t[17],p}if(n.kind===`confirm-git`){let{gitRoot:e}=n,r;if(t[18]!==e){let n;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=/\/+$/,t[20]=n):n=t[20],r=e.replace(n,``),t[18]=e,t[19]=r}else r=t[19];let l=`${r}/.git`,u=i.kind===`error`?i.message:null,d;t[21]===e?d=t[22]:(d={gitRoot:e},t[21]=e,t[22]=d);let f;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(f={0:(0,Z.jsx)(`code`,{}),1:(0,Z.jsx)(`code`,{})},t[23]=f):f=t[23];let p;t[24]===d?p=t[25]:(p=(0,Z.jsx)(`p`,{children:(0,Z.jsx)(s,{id:`5o4lc1`,values:d,components:f})}),t[24]=d,t[25]=p);let m;t[26]!==e||t[27]!==o||t[28]!==c||t[29]!==a||t[30]!==u||t[31]!==i.kind||t[32]!==l?(m=i.kind===`idle`||i.kind===`error`?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,Z.jsx)(Ti,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e),"data-testid":`create-banner-git-remove`,children:(0,Z.jsx)(s,{id:`YTLmTM`,components:{0:(0,Z.jsx)(`code`,{})}})}),i.kind===`error`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`create-banner-git-remove-error`,children:(0,Z.jsx)(s,{id:`SkMZlS`,values:{targetGitPath:l,removeGitError:u},components:{0:(0,Z.jsx)(`code`,{})}})}):null]}):(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 rounded border border-blue-400/60 bg-white/40 p-2 dark:border-blue-600/60 dark:bg-black/20`,"data-testid":`create-banner-git-remove-confirm`,children:[(0,Z.jsx)(`p`,{className:`text-xs`,children:(0,Z.jsx)(s,{id:`WZ-vBy`,values:{targetGitPath:l},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsx)(Ti,{type:`button`,variant:`destructive`,size:`sm`,disabled:i.kind===`pending`,onClick:()=>c(e),"data-testid":`create-banner-git-remove-confirm-button`,children:i.kind===`pending`?(0,Z.jsx)(s,{id:`0-31GV`}):(0,Z.jsx)(s,{id:`v-h2hx`,values:{targetGitPath:l}})}),(0,Z.jsx)(Ti,{type:`button`,variant:`outline`,size:`sm`,disabled:i.kind===`pending`,onClick:o,"data-testid":`create-banner-git-remove-cancel`,children:(0,Z.jsx)(s,{id:`dEgA5A`})})]})]}),t[26]=e,t[27]=o,t[28]=c,t[29]=a,t[30]=u,t[31]=i.kind,t[32]=l,t[33]=m):m=t[33];let h;return t[34]!==p||t[35]!==m?(h=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-900 dark:border-blue-700 dark:bg-blue-950 dark:text-blue-200`,"data-testid":`create-banner-git-confirm`,children:[p,m]}),t[34]=p,t[35]=m,t[36]=h):h=t[36],h}return null}function rd(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`GitHub`}),r=(0,Z.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function id(e){let t=(0,$.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`Open Knowledge icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`g`,{filter:`url(#filter0_d_ok)`,children:[(0,Z.jsx)(`path`,{d:`M66.8902 16.1017C58.2694 3.86669 46.1739 -0.690239 29.9182 2.17749C21.3995 3.67813 13.4602 9.555 8.67934 17.9009C3.93974 26.1701 2.98514 35.6533 6.05714 43.9166C9.31574 52.6868 16.7168 58.4752 24.2299 63.4231C25.7973 64.4562 26.1351 65.7172 26.3551 68.9896C26.5221 71.4625 26.799 75.6011 30.6842 77.7204C31.8176 78.3372 33.0648 78.6515 34.3946 78.6515C37.0796 78.6515 39.4033 77.3649 40.5189 76.7482C47.1049 73.1046 68.8878 59.7147 72.6453 40.4027C74.3444 31.6679 70.9797 21.9019 66.8922 16.1017H66.8902Z`,fill:`white`}),(0,Z.jsx)(`path`,{d:`M37.4214 71.154C28.7888 75.929 36.787 64.0397 27.7458 58.0843C21.6372 54.0616 14.788 49.0568 12.0499 41.6911C6.74463 27.4192 17.5438 10.8473 31.028 8.47262C45.1977 5.97613 54.6946 9.8947 61.6635 19.7844C65.2089 24.8167 67.6013 32.8365 66.3658 39.1828C63.6906 52.9341 49.073 64.7075 37.4214 71.154Z`,fill:`#69A3FF`}),(0,Z.jsx)(`path`,{d:`M52.7244 29.2638C53.4665 28.5217 54.6697 28.5217 55.4119 29.2638V29.2638C56.154 30.0059 56.154 31.2091 55.4119 31.9513L49.2589 38.1042L46.5715 35.4167L52.7244 29.2638Z`,fill:`#D5E5FF`}),(0,Z.jsx)(`path`,{d:`M55.4119 38.8821C56.154 39.6242 56.154 40.8274 55.4119 41.5696V41.5696C54.6698 42.3117 53.4665 42.3117 52.7244 41.5696L46.5715 35.4166L49.259 32.7292L55.4119 38.8821Z`,fill:`#D5E5FF`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`defs`,{children:(0,Z.jsxs)(`filter`,{id:`filter0_d_ok`,x:`-9.53674e-07`,y:`-0.0799994`,width:`77.3817`,height:`85.8743`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,Z.jsx)(`feFlood`,{floodOpacity:`0`,result:`BackgroundImageFix`}),(0,Z.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,Z.jsx)(`feOffset`,{dy:`2.85714`}),(0,Z.jsx)(`feGaussianBlur`,{stdDeviation:`2.14286`}),(0,Z.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,Z.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow_ok`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow_ok`,result:`shape`})]})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,Z.jsxs)(`svg`,{role:`img`,"aria-label":`Open Knowledge icon`,fill:`none`,height:24,width:24,viewBox:`0 0 78 80`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var ad=(0,Q.lazy)(()=>n(()=>import(`./McpConsentDialogBody-cnhKG6kN.js`),__vite__mapDeps([13,1,6,7,8,9,14,15]),import.meta.url));function od(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(Qo.subscribe,cd,sd))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(ad,{})}),e[0]=t):t=e[0],t}function sd(){return!1}function cd(){return Qo.getSnapshot()!==null}function ld(e){let t=e.shareFileExists,n=e.dirtyConflicts.conflicts,r=e.dirtyConflicts.files;return t&&!n?{kind:`A`,openCurrentEnabled:!0,switchEnabled:!0,conflictingFiles:r}:!t&&!n?{kind:`B`,openCurrentEnabled:!1,switchEnabled:!0,conflictingFiles:r}:t&&n?{kind:`C`,openCurrentEnabled:!0,switchEnabled:!1,conflictingFiles:r}:{kind:`D`,openCurrentEnabled:!1,switchEnabled:!1,conflictingFiles:r}}function ud(e){return e.detached?e.currentHeadSha:e.currentBranch??`HEAD`}function dd(e){if(e.ok)return{action:`await-cc1`};switch(e.reason){case`dirty-conflict`:return{action:`rerender-conflict`,files:e.files??[]};case`branch-not-found`:return{action:`dismiss-with-toast`,reason:`branch-not-found`};case`fetch-failed`:case`checkout-failed`:return{action:`stay-with-toast`,reason:e.reason};default:{let t=e.reason;throw Error(`Unhandled CheckoutFailureReason: ${String(t)}`)}}}var fd={phase:`loading`};function pd(e,t){return e.phase===`loading`?t===null?{phase:`error`}:{phase:`ready`,info:t}:e}function md(e,t){return e.phase===`ready`?{phase:`switching`,info:e.info,pendingDoc:t}:e}function hd(e,t){if(e.phase!==`switching`)return{state:e};if(t===null)return{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`proxy-null`}};let n=dd(t);return n.action===`await-cc1`?{state:{phase:`awaiting-cc1-recycle`,pendingDoc:e.pendingDoc}}:n.action===`rerender-conflict`?{state:{phase:`ready`,info:{...e.info,dirtyConflicts:{conflicts:!0,files:n.files.slice()}}}}:n.action===`dismiss-with-toast`?{state:{phase:`dismissed`,reason:n.reason},sideEffect:{kind:`toast`,reason:n.reason}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:n.reason}}}function gd(){let e=null,t=new Set,n=!1,r=null;function i(){for(let e of t)e()}function a(){e!==null&&(e=null,i())}return{install({bridge:t}){if(t)return n?r??void 0:(n=!0,r=t.onShareReceived(t=>{e=t,i()}),()=>{r?.(),r=null,n=!1,a()})},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dismiss(){a()}}}var _d=gd();function vd(e){return _d.install(e)}function yd(e){let t=(0,$.c)(188),{bridge:n,cloneController:r,store:a}=e,o=a===void 0?_d:a,{_:c}=i(),l=(0,Q.useSyncExternalStore)(o.subscribe,o.getSnapshot,Ad),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(null),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(fd),E=(0,Q.useRef)(!1),D=(0,Q.useRef)(!1),O=(0,Q.useRef)(!1),k=(0,Q.useRef)(!1),A;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{d(!1),p(!1),h(null),_(!1),y(!1),x(null),C(null),T(fd),k.current=!1,E.current=!1,D.current=!1,O.current=!1},t[0]=A):A=t[0];let j;t[1]===l?j=t[2]:(j=[l],t[1]=l,t[2]=j),(0,Q.useEffect)(A,j);let M;t[3]!==m||t[4]!==r||t[5]!==l||t[6]!==u?(M=()=>{r&&(!l||l.kind!==`ok`||u&&m===null&&(k.current||(k.current=!0,_(!0),r.getAuthStatus().then(e=>{h(e)}).catch(()=>{h({authenticated:!1,host:`github.com`})}).finally(()=>{_(!1)}))))},t[3]=m,t[4]=r,t[5]=l,t[6]=u,t[7]=M):M=t[7];let N;t[8]!==m||t[9]!==l||t[10]!==u?(N=[l,u,m],t[8]=m,t[9]=l,t[10]=u,t[11]=N):N=t[11],(0,Q.useEffect)(M,N);let P,F;t[12]!==l||t[13]!==o?(P=()=>{if(!l)return;let e=ml(l);e&&(Vo.error(e.message),o.dismiss())},F=[l,o],t[12]=l,t[13]=o,t[14]=P,t[15]=F):(P=t[14],F=t[15]),(0,Q.useEffect)(P,F);let I,L;t[16]!==n||t[17]!==l||t[18]!==u||t[19]!==o?(I=()=>{if(!l||l.kind!==`ok`||u)return;let e=!1;return vl(l,Pd(n)).then(t=>{if(!e){if(t.kind===`hit`){console.log(gl({q1_hit:!0,branch_match:`true`})),o.dismiss();return}if(t.kind===`branch-mismatch`){console.log(gl({q1_hit:!0,branch_match:t.detached?`detached`:`false`})),x({projectPath:t.projectPath,currentBranch:t.currentBranch,headSha:t.headSha,detached:t.detached}),d(!0);return}if(t.kind===`doc-missing-on-branch`){console.log(gl({q1_hit:!0,branch_match:`true`,doc_check:`missing`})),C({projectPath:t.projectPath,currentBranch:t.currentBranch,docPath:t.docPath}),d(!0);return}console.log(gl({q1_hit:!1})),d(!0)}}),()=>{e=!0}},L=[l,u,n,o],t[16]=n,t[17]=l,t[18]=u,t[19]=o,t[20]=I,t[21]=L):(I=t[20],L=t[21]),(0,Q.useEffect)(I,L);let R;t[22]!==c||t[23]!==b||t[24]!==w.phase||t[25]!==n||t[26]!==l||t[27]!==o?(R=()=>{if(w.phase!==`awaiting-cc1-recycle`||!b||!l||l.kind!==`ok`)return;let e=l.branch;if(!e){o.dismiss();return}if(O.current)return;O.current=!0;let t=!1;return n.project.awaitBranchSwitched({projectPath:b.projectPath,branch:e,timeoutMs:3e4}).then(r=>{if(!t){if(r.ok){console.log(gl({branch_dialog_action:`branch-switch-complete`,branch:e})),n.project.open({path:b.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkDoc:l.path,pendingBranch:e}).catch(kd),o.dismiss();return}console.log(gl({branch_dialog_action:`branch-switch-timeout`,branch:e})),Vo.error(c({id:`zr7ADI`})),o.dismiss()}}).catch(()=>{t||(Vo.error(c({id:`zr7ADI`})),o.dismiss())}),()=>{t=!0}},t[22]=c,t[23]=b,t[24]=w.phase,t[25]=n,t[26]=l,t[27]=o,t[28]=R):R=t[28];let z;t[29]!==b||t[30]!==w.phase||t[31]!==l?(z=[w.phase,b,l],t[29]=b,t[30]=w.phase,t[31]=l,t[32]=z):z=t[32],(0,Q.useEffect)(R,z);let B;t[33]!==b||t[34]!==n||t[35]!==l?(B=()=>{!b||!l||l.kind!==`ok`||(E.current||(E.current=!0,n.project.open({path:b.projectPath,target:`new-window`,entryPoint:`share-receive`}).catch(Od)),D.current||(D.current=!0,n.project.fetchBranchInfo({projectPath:b.projectPath,branch:l.branch,docPath:l.path}).then(e=>{T(t=>pd(t,e))}).catch(()=>{T(Dd)})))},t[33]=b,t[34]=n,t[35]=l,t[36]=B):B=t[36];let V;t[37]!==b||t[38]!==l?(V=[b,l],t[37]=b,t[38]=l,t[39]=V):V=t[39],(0,Q.useEffect)(B,V);let H,U,G,K,ee,q,te,ne,re,ie;if(t[40]!==c||t[41]!==g||t[42]!==m?.authenticated||t[43]!==b||t[44]!==w.info||t[45]!==w.phase||t[46]!==n||t[47]!==r||t[48]!==v||t[49]!==S||t[50]!==l||t[51]!==f||t[52]!==u||t[53]!==o){ie=Symbol.for(`react.early_return_sentinel`);bb0:{if(q=l?hl(l):null,!q){ie=null;break bb0}let e={owner:q.owner,repo:q.repo};if(!u){ie=null;break bb0}G=async function(){if(!q)return;if(console.log(gl({q2_path:`clone`})),!r){Vo.info(c({id:`27XW26`}),{action:{label:c({id:`B3NAZC`}),onClick:()=>{n.navigator.open()}},duration:8e3});return}if(!m?.authenticated||v)return;y(!0);let t=fl(e),i;try{i=await r.runClone({url:t,branch:q.branch})}catch{Vo.error(c({id:`jnXr0e`})),y(!1);return}if(y(!1),i.kind===`ok`){try{await n.project.open({path:i.dir,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkDoc:q.path})}catch{Vo.error(c({id:`438Fca`}))}o.dismiss();return}};let i;t[64]!==g||t[65]!==r?(i=async function(){if(!(!r||g)){_(!0);try{let e=await r.startSignIn();_(!1),e!==null&&h(e)}catch{_(!1)}}},t[64]=g,t[65]=r,t[66]=i):i=t[66],ee=i,K=async function(){if(!(!q||f)){p(!0),console.log(gl({q2_path:`local`}));try{for(;;){let t=await n.dialog.openFolder();if(!t)break;let r=await n.share.validateLocalFolder({folderPath:t,owner:e.owner,repo:e.repo});if(console.log(gl({folder_validate:r.kind})),r.kind===`ok`){await n.project.open({path:t,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkDoc:q.path}),o.dismiss();break}let i=pl(r,e);i&&Vo.error(i)}}catch{Vo.error(c({id:`rlUzXK`}))}p(!1)}};let a=function(){!q||!b||(console.log(gl({branch_dialog_action:`open-current`,branch:q.branch})),n.project.open({path:b.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkDoc:q.path}).catch(Ed),o.dismiss())},d=function(){!q||!b||w.phase===`ready`&&ld(w.info).switchEnabled&&(console.log(gl({branch_dialog_action:`switch`,branch_action:`switch`,branch:q.branch})),T(e=>md(e,q.path)),n.project.runCheckout({projectPath:b.projectPath,branch:q.branch}).then(e=>{let t=null,n=!1;T(r=>{let{state:i,sideEffect:a}=hd(r,e);return a&&(t=a.reason,n=i.phase===`dismissed`),i}),t===`branch-not-found`?Vo.error(c({id:`hbNg4Y`,values:{0:q.branch}})):t===`fetch-failed`?Vo.error(c({id:`bWLmRK`})):(t===`checkout-failed`||t===`proxy-null`)&&Vo.error(c({id:`TKaWtw`,values:{0:q.branch}})),n&&o.dismiss()}).catch(()=>{T(Td),Vo.error(c({id:`TKaWtw`,values:{0:q.branch}}))}))},x;t[67]===o?x=t[68]:(x=function(){console.log(gl({branch_dialog_action:`cancel`})),o.dismiss()},t[67]=o,t[68]=x);let C=x;if(S){let e=S.currentBranch??`HEAD`,n;t[69]===o?n=t[70]:(n=e=>{e||o.dismiss()},t[69]=o,t[70]=n);let r;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(ko,{children:(0,Z.jsx)(s,{id:`7kJ8LU`})}),t[71]=r):r=t[71];let i=(0,Z.jsxs)(Ro,{children:[r,(0,Z.jsx)(Do,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`f8jU-L`,values:{0:q.owner,1:q.repo,2:q.path}})}),(0,Z.jsx)(Md,{owner:q.owner,repo:q.repo,path:q.path,branch:q.branch})]}),a;t[72]===e?a=t[73]:(a={currentBranchLabel:e},t[72]=e,t[73]=a);let c;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(c={0:(0,Z.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-foreground/80`})},t[74]=c):c=t[74];let l;t[75]===a?l=t[76]:(l=(0,Z.jsx)(Fo,{children:(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`C_KeJm`,values:a,components:c})})}),t[75]=a,t[76]=l);let u;t[77]===o?u=t[78]:(u=()=>{o.dismiss()},t[77]=o,t[78]=u);let d;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(s,{id:`yz7wBu`}),t[79]=d):d=t[79];let f;t[80]===u?f=t[81]:(f=(0,Z.jsx)(Io,{children:(0,Z.jsx)(Ti,{type:`button`,variant:`default`,onClick:u,"data-testid":`share-receive-doc-missing-close`,children:d})}),t[80]=u,t[81]=f);let p;t[82]!==i||t[83]!==l||t[84]!==f?(p=(0,Z.jsxs)(No,{className:`sm:max-w-xl`,"data-testid":`share-receive-doc-missing-dialog`,onInteractOutside:wd,onPointerDownOutside:Cd,children:[i,l,f]}),t[82]=i,t[83]=l,t[84]=f,t[85]=p):p=t[85];let m;t[86]!==n||t[87]!==p?(m=(0,Z.jsx)(zo,{open:!0,onOpenChange:n,children:p}),t[86]=n,t[87]=p,t[88]=m):m=t[88],ie=m;break bb0}if(b){let e=q.branch,n;t[89]!==b.currentBranch||t[90]!==b.detached||t[91]!==b.headSha||t[92]!==w.info||t[93]!==w.phase?(n=w.phase===`ready`||w.phase===`switching`?ud(w.info):b.detached?b.headSha??`HEAD`:b.currentBranch??`HEAD`,t[89]=b.currentBranch,t[90]=b.detached,t[91]=b.headSha,t[92]=w.info,t[93]=w.phase,t[94]=n):n=t[94];let r=n,i=w.phase===`ready`||w.phase===`switching`?ld(w.info):null,o=w.phase===`switching`||w.phase===`awaiting-cc1-recycle`,l;t[95]!==c||t[96]!==b.detached||t[97]!==r?(l=b.detached?c({id:`HDvj8K`,values:{currentLabel:r}}):c({id:`yEHRcs`,values:{currentLabel:r}}),t[95]=c,t[96]=b.detached,t[97]=r,t[98]=l):l=t[98];let u=l,f=c({id:`w17YhW`,values:{shareBranch:e}}),p=w.phase===`loading`,m=w.phase===`error`,h;t[99]===C?h=t[100]:(h=e=>{e||C()},t[99]=C,t[100]=h);let g;t[101]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(ko,{children:(0,Z.jsx)(s,{id:`PHRoEJ`})}),t[101]=g):g=t[101];let _=(0,Z.jsxs)(Ro,{children:[g,(0,Z.jsx)(Do,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`f8jU-L`,values:{0:q.owner,1:q.repo,2:q.path}})}),(0,Z.jsx)(Md,{owner:q.owner,repo:q.repo,path:q.path,branch:q.branch})]}),v=p?(0,Z.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-receive-branch-switch-loading`,children:[(0,Z.jsx)(W,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`jerqF0`})]}):m?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`7t0mNx`})}):i?.kind===`B`||i?.kind===`D`?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`DOSkSZ`,values:{shareBranch:e,currentLabel:r},components:{0:(0,Z.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,Z.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`1RnNJW`,values:{shareBranch:e,currentLabel:r},components:{0:(0,Z.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,Z.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-foreground/80`})}})}),y=i&&!i.switchEnabled&&i.conflictingFiles.length>0?(0,Z.jsxs)(`div`,{className:`mt-3 rounded-md border border-border bg-muted/30 p-3 text-xs`,"data-testid":`share-receive-branch-switch-conflict`,children:[(0,Z.jsx)(`p`,{className:`font-medium text-foreground/90`,children:(0,Z.jsx)(s,{id:`n2lRue`})}),(0,Z.jsx)(`ul`,{id:`share-receive-branch-conflict-files`,className:`mt-1 list-disc space-y-0.5 pl-5 text-muted-foreground`,children:i.conflictingFiles.map(bd)})]}):null,x;t[102]===o?x=t[103]:(x=o?(0,Z.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-receive-branch-switch-switching`,role:`status`,"aria-live":`polite`,children:[(0,Z.jsx)(W,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`CU3AiE`})]}):null,t[102]=o,t[103]=x);let S;t[104]!==v||t[105]!==y||t[106]!==x?(S=(0,Z.jsxs)(Fo,{children:[v,y,x]}),t[104]=v,t[105]=y,t[106]=x,t[107]=S):S=t[107];let T;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(s,{id:`dEgA5A`}),t[108]=T):T=t[108];let E;t[109]===C?E=t[110]:(E=(0,Z.jsx)(Ti,{variant:`ghost`,onClick:C,"data-testid":`share-receive-branch-switch-cancel`,children:T}),t[109]=C,t[110]=E);let D=(0,Z.jsxs)(Io,{children:[E,i?.openCurrentEnabled?(0,Z.jsx)(Ti,{variant:`secondary`,onClick:a,disabled:o,"data-testid":`share-receive-branch-switch-open-current`,children:u}):null,(0,Z.jsx)(Ti,{onClick:d,disabled:!i?.switchEnabled||o,"aria-disabled":!i?.switchEnabled||o,"aria-describedby":i&&!i.switchEnabled&&i.conflictingFiles.length>0?`share-receive-branch-conflict-files`:void 0,"data-testid":`share-receive-branch-switch-switch`,children:o?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(W,{className:`mr-2 h-4 w-4 animate-spin`,"aria-hidden":`true`}),f]}):f})]}),O;t[111]!==_||t[112]!==S||t[113]!==D?(O=(0,Z.jsxs)(No,{className:`sm:max-w-xl`,"data-testid":`share-receive-branch-switch-dialog`,onInteractOutside:Sd,onPointerDownOutside:xd,children:[_,S,D]}),t[111]=_,t[112]=S,t[113]=D,t[114]=O):O=t[114];let k;t[115]!==h||t[116]!==O?(k=(0,Z.jsx)(zo,{open:!0,onOpenChange:h,children:O}),t[115]=h,t[116]=O,t[117]=k):k=t[117],ie=k;break bb0}H=r!==void 0&&m?.authenticated===!0&&!v;let E;t[118]!==c||t[119]!==m?.authenticated||t[120]!==r||t[121]!==v?(E=v?c({id:`YjhKI5`}):r&&m?.authenticated===!1?c({id:`lanW9H`}):c({id:`LE7t79`}),t[118]=c,t[119]=m?.authenticated,t[120]=r,t[121]=v,t[122]=E):E=t[122],U=E,te=q.owner,ne=q.repo,re=ll(e)}t[40]=c,t[41]=g,t[42]=m?.authenticated,t[43]=b,t[44]=w.info,t[45]=w.phase,t[46]=n,t[47]=r,t[48]=v,t[49]=S,t[50]=l,t[51]=f,t[52]=u,t[53]=o,t[54]=H,t[55]=U,t[56]=G,t[57]=K,t[58]=ee,t[59]=q,t[60]=te,t[61]=ne,t[62]=re,t[63]=ie}else H=t[54],U=t[55],G=t[56],K=t[57],ee=t[58],q=t[59],te=t[60],ne=t[61],re=t[62],ie=t[63];if(ie!==Symbol.for(`react.early_return_sentinel`))return ie;let ae=re,oe=m?.authenticated?m.login:void 0,se;t[123]===o?se=t[124]:(se=e=>{e||o.dismiss()},t[123]=o,t[124]=se);let ce;t[125]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,Z.jsx)(ko,{children:(0,Z.jsx)(s,{id:`PHRoEJ`})}),t[125]=ce):ce=t[125];let le=q.path?` — ${q.path}`:null,J;t[126]!==q.owner||t[127]!==q.repo||t[128]!==le?(J=(0,Z.jsxs)(Do,{className:`sr-only`,children:[q.owner,`/`,q.repo,le]}),t[126]=q.owner,t[127]=q.repo,t[128]=le,t[129]=J):J=t[129];let ue;t[130]!==q.branch||t[131]!==q.owner||t[132]!==q.path||t[133]!==q.repo?(ue=(0,Z.jsx)(Md,{owner:q.owner,repo:q.repo,path:q.path,branch:q.branch}),t[130]=q.branch,t[131]=q.owner,t[132]=q.path,t[133]=q.repo,t[134]=ue):ue=t[134];let de;t[135]!==J||t[136]!==ue?(de=(0,Z.jsxs)(Ro,{children:[ce,J,ue]}),t[135]=J,t[136]=ue,t[137]=de):de=t[137];let fe;t[138]===G?fe=t[139]:(fe=()=>{G()},t[138]=G,t[139]=fe);let pe=r!==void 0&&!H,me=r!==void 0&&!H,he;t[140]===U?he=t[141]:(he=(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:U}),t[140]=U,t[141]=he);let ge;t[142]!==te||t[143]!==ne?(ge=(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`jGJy-9`,values:{shareOwner:te,shareRepo:ne}})}),t[142]=te,t[143]=ne,t[144]=ge):ge=t[144];let _e;t[145]!==fe||t[146]!==pe||t[147]!==me||t[148]!==he||t[149]!==ge?(_e=(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-clone`,className:`flex flex-col items-start gap-2 rounded-lg border-2 border-primary/40 bg-card p-4 text-left transition hover:border-primary hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-primary/40 disabled:hover:bg-card`,onClick:fe,disabled:pe,"aria-disabled":me,children:[he,ge]}),t[145]=fe,t[146]=pe,t[147]=me,t[148]=he,t[149]=ge,t[150]=_e):_e=t[150];let ve;t[151]===K?ve=t[152]:(ve=()=>{K()},t[151]=K,t[152]=ve);let ye=f||v,be;t[153]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:(0,Z.jsx)(s,{id:`HfI1dR`})}),t[153]=be):be=t[153];let xe;t[154]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`_qD6mn`})}),t[154]=xe):xe=t[154];let Se;t[155]!==ve||t[156]!==ye?(Se=(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-local`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-card p-4 text-left transition hover:border-foreground/50 hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:ve,disabled:ye,children:[be,xe]}),t[155]=ve,t[156]=ye,t[157]=Se):Se=t[157];let Ce;t[158]!==_e||t[159]!==Se?(Ce=(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[_e,Se]}),t[158]=_e,t[159]=Se,t[160]=Ce):Ce=t[160];let we;t[161]!==g||t[162]!==m||t[163]!==r||t[164]!==ee||t[165]!==oe?(we=r?(0,Z.jsx)(`div`,{className:`mt-3 flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-xs`,"data-testid":`share-receive-auth-banner`,children:m===null?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`OZtLT5`})}):m.authenticated?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`95uxb3`,values:{signedInLogin:oe},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground/90`})}})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`MtR6ZK`})}),(0,Z.jsx)(`button`,{type:`button`,"data-testid":`share-receive-signin`,className:`font-medium text-primary underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded`,onClick:()=>{ee()},disabled:g,children:g?(0,Z.jsx)(s,{id:`PKLY-1`}):(0,Z.jsx)(s,{id:`gtmbUO`})})]})}):null,t[161]=g,t[162]=m,t[163]=r,t[164]=ee,t[165]=oe,t[166]=we):we=t[166];let Te;t[167]===ae?Te=t[168]:(Te={lookingForUrl:ae},t[167]=ae,t[168]=Te);let Ee;t[169]===Symbol.for(`react.memo_cache_sentinel`)?(Ee={0:(0,Z.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-foreground/80`})},t[169]=Ee):Ee=t[169];let De;t[170]===Te?De=t[171]:(De=(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`RJ3a8Z`,values:Te,components:Ee})}),t[170]=Te,t[171]=De);let Oe;t[172]!==Ce||t[173]!==we||t[174]!==De?(Oe=(0,Z.jsxs)(Fo,{children:[Ce,we,De]}),t[172]=Ce,t[173]=we,t[174]=De,t[175]=Oe):Oe=t[175];let ke;t[176]===o?ke=t[177]:(ke=()=>o.dismiss(),t[176]=o,t[177]=ke);let Ae;t[178]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,Z.jsx)(s,{id:`dEgA5A`}),t[178]=Ae):Ae=t[178];let je;t[179]===ke?je=t[180]:(je=(0,Z.jsx)(Io,{children:(0,Z.jsx)(Ti,{variant:`outline`,className:`font-mono uppercase`,onClick:ke,children:Ae})}),t[179]=ke,t[180]=je);let Me;t[181]!==de||t[182]!==Oe||t[183]!==je?(Me=(0,Z.jsxs)(No,{className:`sm:max-w-xl`,"data-testid":`share-receive-dialog`,children:[de,Oe,je]}),t[181]=de,t[182]=Oe,t[183]=je,t[184]=Me):Me=t[184];let Ne;return t[185]!==se||t[186]!==Me?(Ne=(0,Z.jsx)(zo,{open:!0,onOpenChange:se,children:Me}),t[185]=se,t[186]=Me,t[187]=Ne):Ne=t[187],Ne}function bd(e){return(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`code`,{className:`text-foreground/80`,children:e})},e)}function xd(e){e.preventDefault()}function Sd(e){e.preventDefault()}function Cd(e){e.preventDefault()}function wd(e){e.preventDefault()}function Td(e){return hd(e,null).state}function Ed(e){console.warn(`[receive] warm-focus-dispatch-failed branch_action=open-current`,e instanceof Error?e.message:e)}function Dd(e){return pd(e,null)}function Od(){}function kd(e){console.warn(`[receive] warm-focus-dispatch-failed branch_action=switch`,e instanceof Error?e.message:e)}function Ad(){return null}var jd=new Set([`main`,`master`]);function Md(e){let t=(0,$.c)(15),{owner:n,repo:r,path:i,branch:a}=e,o;t[0]===a?o=t[1]:(o=a!==``&&!jd.has(a),t[0]=a,t[1]=o);let c=o,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(s,{id:`IreQBq`}),t[2]=l):l=t[2];let u;t[3]!==n||t[4]!==r?(u=(0,Z.jsx)(Nd,{label:l,children:(0,Z.jsxs)(`span`,{className:`min-w-0 truncate`,children:[n,`/`,r]})}),t[3]=n,t[4]=r,t[5]=u):u=t[5];let d;t[6]===i?d=t[7]:(d=i?(0,Z.jsx)(Nd,{label:(0,Z.jsx)(s,{id:`J2eKUI`}),children:(0,Z.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:i})}):null,t[6]=i,t[7]=d);let f;t[8]!==a||t[9]!==c?(f=c?(0,Z.jsx)(Nd,{label:(0,Z.jsx)(s,{id:`ssuwjF`}),children:(0,Z.jsx)(`span`,{className:`min-w-0 truncate font-mono`,"data-testid":`share-receive-metadata-branch`,children:a})}):null,t[8]=a,t[9]=c,t[10]=f):f=t[10];let p;return t[11]!==u||t[12]!==d||t[13]!==f?(p=(0,Z.jsxs)(`dl`,{className:`space-y-2 text-xs text-muted-foreground`,"data-testid":`share-receive-metadata`,children:[u,d,f]}),t[11]=u,t[12]=d,t[13]=f,t[14]=p):p=t[14],p}function Nd(e){let t=(0,$.c)(7),{label:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(`dt`,{className:`w-20 shrink-0 font-mono uppercase tracking-wide text-2xs`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Z.jsx)(`dd`,{className:`min-w-0 text-foreground`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Z.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Pd(e){return{listRecent:()=>e.project.listRecent(),validateLocalFolder:t=>e.share.validateLocalFolder(t),readHeadBranch:t=>e.project.readHeadBranch(t),checkDocExists:t=>e.project.checkDocExists(t),open:t=>e.project.open(t)}}var Fd=(e,t,n)=>sl(e,t,n,`NavigatorApp`);function Id(e,t){return e.filter(e=>e.path!==t)}function Ld(e){let t=(0,$.c)(108),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[a,o]=(0,Q.useState)(r),[c,l]=(0,Q.useState)(!0),[u,d]=(0,Q.useState)(null),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(!1),[_,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(null),w=typeof window<`u`&&window.okDesktop!=null,[T,E]=(0,Q.useState)(`auth`),{theme:D}=On(),{_:O}=i();v(n,D??`system`);let k;t[1]!==O||t[2]!==n.project?(k=()=>{let e=!1;return n.project.listRecent().then(t=>{e||o(t)}).catch(t=>{console.error(`[NavigatorApp] listRecent failed:`,t),e||d(t instanceof Error?t.message:O({id:`fYKgzG`}))}).finally(()=>{e||l(!1)}),()=>{e=!0}},t[1]=O,t[2]=n.project,t[3]=k):k=t[3];let A;t[4]!==O||t[5]!==n?(A=[n,O],t[4]=O,t[5]=n,t[6]=A):A=t[6],(0,Q.useEffect)(k,A);let j;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(j=(e,t)=>Fd(e,t,d),t[7]=j):j=t[7];let M=j,N;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>m(!0),t[8]=N):N=t[8];let P=N,F;t[9]!==O||t[10]!==n?(F=()=>M(async()=>{let e=await n.dialog.openFolder();e&&await Bd(n,e,`pick-existing`)},O({id:`gmJ0An`})),t[9]=O,t[10]=n,t[11]=F):F=t[11];let I=F,R;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>g(!0),t[12]=R):R=t[12];let z=R,B;t[13]!==O||t[14]!==n?(B=e=>M(async()=>{await Bd(n,e,`recents`)},O({id:`SUOoXn`})),t[13]=O,t[14]=n,t[15]=B):B=t[15];let V=B,H;t[16]!==O||t[17]!==n.project?(H=e=>M(async()=>{await n.project.removeRecent(e),o(t=>Id(t,e))},O({id:`viwC-K`})),t[16]=O,t[17]=n.project,t[18]=H):H=t[18];let U=H,G;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 z-10 h-9 ${w?`[-webkit-app-region:drag]`:``}`,"data-electron-drag":w?``:void 0,"data-testid":`nav-chrome-row`}),t[19]=G):G=t[19];let K;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Z.jsx)(id,{className:`size-12 shrink-0`}),t[20]=K):K=t[20];let ee;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`font-medium text-xl tracking-tight`,children:`Open Knowledge`}),(0,Z.jsx)(Tu,{})]}),t[21]=ee):ee=t[21];let q;t[22]===n.appVersion?q=t[23]:(q=(0,Z.jsxs)(`header`,{className:`shrink-0 flex-wrap flex items-center gap-2.5`,children:[K,(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[ee,(0,Z.jsxs)(`p`,{className:`text-muted-foreground text-xs font-mono`,children:[`v`,n.appVersion]})]})]}),t[22]=n.appVersion,t[23]=q);let te;t[24]===O?te=t[25]:(te=O({id:`wbv9xO`}),t[24]=O,t[25]=te);let ne;t[26]===O?ne=t[27]:(ne=O({id:`fRv-ei`}),t[26]=O,t[27]=ne);let re;t[28]!==te||t[29]!==ne?(re=(0,Z.jsx)(Rd,{title:te,description:ne,onClick:z,dataTestId:`nav-create-new`,Icon:f}),t[28]=te,t[29]=ne,t[30]=re):re=t[30];let ie;t[31]===O?ie=t[32]:(ie=O({id:`WPwDin`}),t[31]=O,t[32]=ie);let ae;t[33]===O?ae=t[34]:(ae=O({id:`tUvUfp`}),t[33]=O,t[34]=ae);let oe;t[35]!==I||t[36]!==ie||t[37]!==ae?(oe=(0,Z.jsx)(Rd,{title:ie,description:ae,onClick:I,dataTestId:`nav-open`,Icon:L}),t[35]=I,t[36]=ie,t[37]=ae,t[38]=oe):oe=t[38];let se;t[39]===O?se=t[40]:(se=O({id:`VdXv4D`}),t[39]=O,t[40]=se);let ce;t[41]===O?ce=t[42]:(ce=O({id:`JOcPqH`}),t[41]=O,t[42]=ce);let le;t[43]!==se||t[44]!==ce?(le=(0,Z.jsx)(Rd,{title:se,description:ce,onClick:P,dataTestId:`nav-clone`,Icon:rd}),t[43]=se,t[44]=ce,t[45]=le):le=t[45];let J;t[46]!==re||t[47]!==oe||t[48]!==le?(J=(0,Z.jsxs)(`section`,{className:`grid shrink-0 sm:grid-cols-3 gap-3`,children:[re,oe,le]}),t[46]=re,t[47]=oe,t[48]=le,t[49]=J):J=t[49];let ue;t[50]===u?ue=t[51]:(ue=u===null?null:(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2`,"data-testid":`nav-error-banner`,role:`alert`,children:[(0,Z.jsx)(`span`,{className:`text-red-700 text-xs dark:text-red-300`,children:u}),(0,Z.jsx)(Ti,{type:`button`,variant:`link`,size:`sm`,onClick:()=>d(null),className:`h-auto p-0 text-red-700 text-xs dark:text-red-300`,"data-testid":`nav-error-dismiss`,children:(0,Z.jsx)(s,{id:`1QfxQT`})})]}),t[50]=u,t[51]=ue);let de;t[52]!==c||t[53]!==V||t[54]!==U||t[55]!==a?(de=c?(0,Z.jsx)(`section`,{className:`flex shrink-0 flex-col items-center`,children:(0,Z.jsx)(W,{className:`size-4 animate-spin text-muted-foreground/60`})}):a.length>0?(0,Z.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[(0,Z.jsx)(`h2`,{className:`mb-2 shrink-0 font-medium text-muted-foreground font-mono text-xs uppercase tracking-wide`,children:(0,Z.jsx)(s,{id:`CCTop_`})}),(0,Z.jsx)(`ul`,{className:`min-h-0 max-h-48 subtle-scrollbar scroll-fade-mask overflow-y-auto space-y-0.5 -mx-4`,"data-testid":`nav-recent-list`,children:a.map(e=>(0,Z.jsx)(zd,{project:e,onOpen:()=>V(e.path),onRemove:()=>U(e.path)},e.path))})]}):null,t[52]=c,t[53]=V,t[54]=U,t[55]=a,t[56]=de):de=t[56];let fe;t[57]!==q||t[58]!==J||t[59]!==ue||t[60]!==de?(fe=(0,Z.jsx)(`div`,{className:`mx-auto flex h-full w-full max-w-5xl flex-col overflow-hidden px-12 py-12`,children:(0,Z.jsxs)(`div`,{className:`my-auto flex min-h-0 flex-col space-y-10`,children:[q,J,ue,de]})}),t[57]=q,t[58]=J,t[59]=ue,t[60]=de,t[61]=fe):fe=t[61];let pe,me;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Z.jsx)(od,{}),me=(0,Z.jsx)(Lu,{}),t[62]=pe,t[63]=me):(pe=t[62],me=t[63]);let he;t[64]!==n||t[65]!==h?(he=(0,Z.jsx)(Ju,{open:h,onOpenChange:g,bridge:n}),t[64]=n,t[65]=h,t[66]=he):he=t[66];let ge;t[67]===S?ge=t[68]:(ge=e=>{y(e),e||(x(!1),S&&(S(null),C(null)))},t[67]=S,t[68]=ge);let _e;t[69]===n?_e=t[70]:(_e=ea(n),t[69]=n,t[70]=_e);let ve=T===`identity`,ye;t[71]!==b||t[72]!==S?(ye=e=>{y(!1),b&&(x(!1),m(!0)),S&&(S({authenticated:!0,host:`github.com`,login:e.login}),C(null))},t[71]=b,t[72]=S,t[73]=ye):ye=t[73];let be;t[74]!==_||t[75]!==ge||t[76]!==_e||t[77]!==ve||t[78]!==ye?(be=(0,Z.jsx)(Ba,{open:_,onOpenChange:ge,transport:_e,identityPrompt:ve,onSuccess:ye}),t[74]=_,t[75]=ge,t[76]=_e,t[77]=ve,t[78]=ye,t[79]=be):be=t[79];let xe;t[80]===n?xe=t[81]:(xe=Dl(n),t[80]=n,t[81]=xe);let Se;t[82]===n?Se=t[83]:(Se=Tl(n),t[82]=n,t[83]=Se);let Ce;t[84]===n.dialog?Ce=t[85]:(Ce=()=>n.dialog.openFolder(),t[84]=n.dialog,t[85]=Ce);let we;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(we=()=>{m(!1),E(`auth`),x(!0),y(!0)},t[86]=we):we=t[86];let Te;t[87]!==O||t[88]!==n?(Te=e=>{let{dir:t}=e;M(()=>Bd(n,t,`pick-existing`),O({id:`iSnkwB`}))},t[87]=O,t[88]=n,t[89]=Te):Te=t[89];let Ee;t[90]!==p||t[91]!==xe||t[92]!==Se||t[93]!==Ce||t[94]!==Te?(Ee=(0,Z.jsx)(ku,{open:p,onOpenChange:m,transport:xe,authQueryTransport:Se,pickParentFolder:Ce,onSignIn:we,onCloneComplete:Te}),t[90]=p,t[91]=xe,t[92]=Se,t[93]=Ce,t[94]=Te,t[95]=Ee):Ee=t[95];let De;if(t[96]!==n){let e;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>new Promise(e=>{C(()=>e),y(!0)}),t[98]=e):e=t[98],De=bl({bridge:n,authQueryTransport:Tl(n),cloneTransport:Dl(n),openSignIn:e}),t[96]=n,t[97]=De}else De=t[97];let Oe;t[99]!==n||t[100]!==De?(Oe=(0,Z.jsx)(yd,{bridge:n,cloneController:De}),t[99]=n,t[100]=De,t[101]=Oe):Oe=t[101];let ke;return t[102]!==fe||t[103]!==he||t[104]!==be||t[105]!==Ee||t[106]!==Oe?(ke=(0,Z.jsxs)(`div`,{className:`relative flex h-screen w-screen flex-col overflow-hidden bg-primary-foreground dark:bg-background text-foreground`,children:[G,fe,pe,me,he,be,Ee,Oe]}),t[102]=fe,t[103]=he,t[104]=be,t[105]=Ee,t[106]=Oe,t[107]=ke):ke=t[107],ke}function Rd(e){let t=(0,$.c)(14),{title:n,description:r,onClick:i,dataTestId:a,Icon:o}=e,s;t[0]===o?s=t[1]:(s=o?(0,Z.jsx)(o,{className:`size-4 shrink-0 text-muted-foreground`}):null,t[0]=o,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,Z.jsx)(`span`,{className:`font-medium text-gray-700 dark:text-foreground text-sm`,children:n}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs leading-snug`,children:r}),t[7]=r,t[8]=u);let d;return t[9]!==a||t[10]!==i||t[11]!==l||t[12]!==u?(d=(0,Z.jsxs)(Ti,{type:`button`,variant:`outline`,onClick:i,"data-testid":a,className:`h-auto flex-col items-start justify-start gap-1.5 whitespace-normal bg-card px-4 py-3.5 text-left`,children:[l,u]}),t[9]=a,t[10]=i,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function zd(e){let t=(0,$.c)(31),{project:n,onOpen:r,onRemove:a}=e,{_:o}=i(),{name:c}=n,l=n.missing,u=n.missing&&`opacity-50`,d;t[0]===u?d=t[1]:(d=vi(`h-auto min-w-0 flex-1 justify-between gap-2 py-3.5 pl-4 pr-2 text-left hover:bg-transparent`,u),t[0]=u,t[1]=d);let f;t[2]===n.name?f=t[3]:(f=(0,Z.jsx)(`span`,{className:`font-medium text-sm text-gray-700 dark:text-foreground`,children:n.name}),t[2]=n.name,t[3]=f);let p;t[4]===n.path?p=t[5]:(p=(0,Z.jsx)(`span`,{className:`truncate w-full text-muted-foreground text-xs`,children:n.path}),t[4]=n.path,t[5]=p);let m;t[6]!==f||t[7]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1 truncate`,children:[f,p]}),t[6]=f,t[7]=p,t[8]=m):m=t[8];let h;t[9]===n.missing?h=t[10]:(h=n.missing?(0,Z.jsx)(ce,{className:`text-2xs rounded-sm`,variant:`warning`,children:(0,Z.jsx)(s,{id:`VU3Nrn`})}):null,t[9]=n.missing,t[10]=h);let g;t[11]!==r||t[12]!==n.missing||t[13]!==d||t[14]!==m||t[15]!==h?(g=(0,Z.jsxs)(Ti,{type:`button`,variant:`ghost`,onClick:r,disabled:l,className:d,children:[m,h]}),t[11]=r,t[12]=n.missing,t[13]=d,t[14]=m,t[15]=h,t[16]=g):g=t[16];let _;t[17]!==o||t[18]!==c?(_=o({id:`hDoLrm`,values:{projectName:c}}),t[17]=o,t[18]=c,t[19]=_):_=t[19];let v;t[20]===o?v=t[21]:(v=o({id:`Es-eZU`}),t[20]=o,t[21]=v);let y=`nav-recent-remove-${n.path}`,b;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Z.jsx)(Eo,{"aria-hidden":`true`}),t[22]=b):b=t[22];let x;t[23]!==a||t[24]!==v||t[25]!==y||t[26]!==_?(x=(0,Z.jsx)(Ti,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:a,"aria-label":_,title:v,className:`pointer-events-none mr-2 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100`,"data-testid":y,children:b}),t[23]=a,t[24]=v,t[25]=y,t[26]=_,t[27]=x):x=t[27];let S;return t[28]!==x||t[29]!==g?(S=(0,Z.jsxs)(`li`,{className:`group flex items-center justify-between rounded-lg hover:bg-accent`,children:[g,x]}),t[28]=x,t[29]=g,t[30]=S):S=t[30],S}async function Bd(e,t,n){await e.project.open({path:t,target:`new-window`,entryPoint:n})}var Vd=e=>{let t=(0,$.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=On(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,Z.jsx)(ui,{className:`size-4`}),info:(0,Z.jsx)(h,{className:`size-4`}),warning:(0,Z.jsx)(pi,{className:`size-4`}),error:(0,Z.jsx)(Oc,{className:`size-4`}),loading:(0,Z.jsx)(W,{className:`size-4 animate-spin`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsx)(Oo,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c};function Hd(e){let{apiOrigin:t}=e;if(!t)return;let n=Symbol.for(`ok.desktop.fetchRewrite`);if(window.fetch[n])return;let r=window.fetch.bind(window),i=((e,n)=>{if(typeof e==`string`)return r(Ud(e,t),n);if(e instanceof URL)return e.pathname.startsWith(`/api/`)&&(e.origin===window.location.origin||e.protocol===`file:`)?r(t+(e.pathname+e.search+e.hash),n):r(e,n);try{let i=new URL(e.url,window.location.origin);if(i.pathname.startsWith(`/api/`)){let a=i.pathname+i.search+i.hash;return r(new Request(t+a,e),n)}}catch{}return r(e,n)});i[n]=!0,window.fetch=i}function Ud(e,t){return e.startsWith(`/api/`)?t+e:e}var Wd=JSON.parse(`{"-3Qbv7":[["count","plural",{"one":["matches ","#"," file"],"other":["matches ","#"," files"]}]],"-8PP0T":["Match case"],"-KCZ6n":["Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here."],"-QCLWk":["Templates available"],"-YV1Uo":["Pattern ",["patternNumber"]],"-g6KIS":["Unrecognized link"],"-gdcIo":["Auto-sync is on — your commits push and remote changes pull on intervals."],"-i7ik4":["Collapse burst ",["burstNumber"]," diff"],"-lCAuQ":["Loading graph"],"0-31GV":["Removing"],"02P3hL":["Upload failed: ",["message"]],"04RA0-":["Failed to enable sync — ",["detail"]],"07q4Qk":["File sidebar"],"0BB9ID":["No headings yet."],"0NA4b3":["Keep my version"],"0R4wMK":["External Link"],"0S9PW_":["Open in claude.ai →"],"0YEbfk":["Connect to AI tools"],"0eHrMb":["Could not complete delete"],"0kTAXe":["Open source: ",["mirrorSrc"]],"0rwwOn":["By tag"],"0t0bbC":["Could not save sync preference: ",["detail"]],"0wswKc":["Horizontal rule that divides sections."],"0xnmlQ":["Repository name"],"0yL--g":["Review conflicts"],"12F9WL":["(no id)"],"16D5Zj":["Are you sure you want to delete ",["itemName"],"? This action cannot be undone."],"170Js2":["Hide panel"],"1EcCom":[["keyName"]," value"],"1GhYxC":["of ",["totalPages"]],"1HBhDS":["Checking out files"],"1QfxQT":["Dismiss"],"1RluQD":["Show replace"],"1RnNJW":["This doc was shared from branch <0>",["shareBranch"],"</0>. You're currently on <1>",["currentLabel"],"</1>."],"1TNIig":["Open"],"1Ta7Fd":["Open ",["basename"]],"1WgmEM":["Failed to load template: ",["errorMessage"]],"1ZpfyB":["Open with AI ",["displayName"],", ",["hint"]],"1bDVu5":["Workspace Command Palette"],"1di5fu":["Document not found"],"1nke1r":["Open ",["0"]," on GitHub (opens in a new tab)"],"2277Tu":["Collapse graph"],"237hSL":["Ended"],"25Pw6a":["Cloning"],"27XW26":["Clone happens in the Project Navigator. Reclick the share link there."],"29VNqC":["Unknown error"],"2BBAbc":["List"],"2FYpfJ":["More"],"2IXDgU":["Upload file"],"2QM24L":["All tags"],"2Xs2jo":["Switch Project"],"2YZwPB":["Forward-links response did not match expected shape."],"2Znqb1":[" (missing)"],"2fkdnR":["Nothing to undo on this file"],"2n3oDU":["Project-level pages ordered by inbound link count, up to ",["FULLSCREEN_HUB_LIMIT"]," results."],"2q_Q7x":["Visibility"],"2ryd91":["Failed to rename property"],"2tgFCe":["Starting clone"],"2vIPtm":["Open link in new tab"],"2wxgft":["Rename"],"322lyb":["Highlight tips, warnings, and notes."],"34qyH5":["Could not reach server"],"379t2h":["Unified diff"],"38foVZ":["Loading diff"],"3B1qRl":["All conflicts resolved — sync resuming"],"3Fcb0I":["Open graph"],"3Ib6FN":["Move down"],"3J7d2N":["Big section heading."],"3JYy1p":["Branch ",["0"]," no longer exists. Cloned to default branch."],"3SDfZl":["<0>Mirror — pick a source.</0> Set <1>src</1> + <2>anchor</2> via the property panel to point at a <3><MirrorSource></3> elsewhere."],"3VsNTI":["Loading document"],"3YvS-c":["New tab"],"3_6U6f":["Connect to GitHub"],"3__SjS":["breadcrumb"],"3a_Bd7":["Open source doc: ",["mirrorSrc"]],"3h5zMp":["Something went wrong loading the settings panel."],"3iyGWF":["Open recent project"],"3oh0nQ":["Nested .okignore error in ",["path"]],"3pU8e-":["Pin tab"],"3wiBAs":["Where should it live?"],"3xAYsR":["External changes pending"],"3zyg_A":["Ignore patterns"],"438Fca":["Cloned successfully, but could not open the project."],"44DSl0":["Already have a git repository? Add it with <0>git remote add origin <url></0> in this project's folder. This page updates automatically once a remote is detected."],"44_vJP":[["deleteCount","plural",{"one":["Delete"],"other":["Delete ","#"," Items"]}]],"45MZFs":["Commands"],"484LKL":["Remove link"],"48uGTI":["Failed to load docs. Press Escape and re-open to retry."],"4CfgPM":["Project folder created, but git init failed. Try again."],"4D0mcB":[["resolvedCount"]," of ",["total"]," resolved"],"4DLo0T":["Before you enable it"],"4TzU0n":["Initialize"],"4UMKtb":["Failed to load folder defaults: ",["message"]],"4buZWd":["Inherited from ",["path"]],"4etMqs":[["files","plural",{"one":["#"," file"],"other":["#"," files"]}]],"4g19V6":["Failed to update property"],"4hJhzz":["Table"],"4jDd0j":["Anyone can see"],"4nj6n8":["/api/config returned HTTP ",["code"]],"4uNLmk":["Pulling"],"4xtLTl":["Hidden folder “",["basename"],"”"],"50Y3WA":["No defaults declared. Add a property to set a value every doc in this folder inherits."],"56WWtu":["Couldn't load starter packs: ",["error"]],"56xUL1":["Property name"],"5Ajb15":["The formula <0>c = √(a² + b²)</0> renders inline."],"5ClEAu":["Inline hashtag for cross-doc grouping."],"5D3Ior":["Hide folder"],"5F5HYj":[["ahead"]," ahead, ",["behind"]," behind"],"5GRxoA":["Search files, folders, and commands for the current workspace."],"5Q9-G-":["Document panel"],"5QGTaA":["Could not copy relative path"],"5SwVv1":["Not installed"],"5Tk8Fb":["Loading files"],"5dPlsv":["Allowed substitutions: ",["substitutionTokens"]],"5kWklo":["(some may already be hidden by other rules)"],"5lWFkC":["Sign in"],"5m2Eho":["Create note from ",["label"]],"5o4lc1":["Open Knowledge will be initialized at <0>",["gitRoot"],"</0> — the parent of your new folder, because it contains a <1>.git</1> folder (one project per git repo)."],"5qNxOe":[["count","plural",{"one":["#"," item could not be moved to the Trash. Do you want to permanently delete instead?"],"other":["#"," items could not be moved to the Trash. Do you want to permanently delete instead?"]}]],"5wV2qQ":["and more"],"5wyYmS":["Instantiate as <0>",["writeDocumentExample"],"</0>. This template is located at <1>",["templatePath"],"</1>."],"5y_9lO":["Waiting for authorization"],"62Pc08":["Install for Claude Chat & Cowork (Desktop App)"],"67f-3g":["Duplicate succeeded but the sidebar may be out of date — refresh to resync"],"6Aih4U":["Offline"],"6HP-XF":["Resolve conflicts"],"6O626z":["No headings match \\"",["trimmedAnchorQuery"],"\\""],"6Pxqwv":["No project templates yet. Create one to make it available everywhere in this project. Folder-scoped templates live on each folder's overview page."],"6Uau97":["Skip"],"6V3Ea3":["Copied"],"6VqW-1":["Remove ",["keyName"]],"6WdDG7":["Page"],"6YtxFj":["Name"],"6_ZOw4":["Copied full path"],"6bTTAN":["Invalid input — pick a different folder."],"6cR-PU":["Already open"],"6caB2T":["Connect an existing repository"],"6cuT_1":["Open date picker for ",["keyName"]],"6fGjTz":["Show fewer"],"6gRgw8":["Retry"],"6hfDJr":["Server error: ",["status"]],"6iDEWA":["Show panel"],"6ibbCg":["Create your first file"],"6lBXm5":["Key \\"",["trimmed"],"\\" already resolves here"],"6nB8LV":["Paste a personal access token"],"6q0rnH":["writing"],"6u9LvN":[["days","plural",{"one":["#"," day ago"],"other":["#"," days ago"]}]],"6vEr3W":["Link target"],"7-NvM7":["This permanently removes the template from this project's .ok/templates/ directory. Agents and folders that reference it by name will fail until it's recreated."],"74-bX-":["A pull quote stands out from the surrounding text."],"74eHt-":["No file or folder selected"],"75Y1dk":["Horizontal pill strip + active panel below; click a pill to switch panels."],"77SdEP":["Delete ",["itemName"]],"7Fkcej":["+ Add ",["addChildName"]],"7H4UHD":["Documents tagged <0>#",["tagName"],"</0>"],"7JtSLi":["Failed to delete path"],"7KeV5F":["Undo all failed: ",["message"]],"7OwvEL":["Show HTML preview"],"7PzzBU":["User"],"7_bFEL":["Drag ",["patternText"]," to reorder"],"7d1a0d":["Public"],"7kJ8LU":["File not found on this branch"],"7qRHf0":["Install for Claude Chat & Cowork"],"7rQXBC":["Pulls may overwrite uncommitted local file changes."],"7t0mNx":["Could not read branch state for this project. Open the project window and try again."],"81H_23":["Add properties"],"8F1i42":["Page not found"],"8FqTCr":[["chunksRemaining","plural",{"one":["#"," unresolved hunk"],"other":["#"," unresolved hunks"]}]],"8OxKZy":["Move succeeded but the sidebar may be out of date — refresh to resync"],"8RtNI0":["Failed to load documents"],"8TLE9g":["Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live."],"8XQ7Ib":["Pick an owner"],"8XQRON":["Loading repositories"],"8XS8nG":["Open in your favorite AI editor."],"8_brI5":["Name is required"],"8eW0WQ":["No matching repositories."],"8fRyLo":["Invalid patch payload"],"8fc_3j":["Protected branch — cannot push"],"8nOdkO":["Align center"],"8tjQCz":["Explore"],"92rbk2":["Mirror loading <0>",["mirrorRef"],"</0>"],"95uxb3":["Signed in as <0>@",["signedInLogin"],"</0>"],"96G6Re":["New folder"],"97df0_":["Checkpoint failed — try again"],"9Bd18D":["Failed to load hub pages"],"9NC_MT":["Couldn't open ",["CLAUDE_WEB_FALLBACK_LABEL"]," in your browser."],"9NJWgv":["Backlinks"],"9PQysm":["Hide advanced"],"9R7pRC":["No tags match \\"",["trimmed"],"\\". Continue typing to create one."],"9UQ730":["Clone"],"9Uv1CD":["Restore this auto-save"],"9bCiQ8":["No pages are missing incoming graph links."],"9clcD5":["Open documents tagged #",["chip"]],"9euN0m":[["count","plural",{"one":["#"," more cross-doc participant"],"other":["#"," more cross-doc participants"]}]],"9fhQRL":["Beta channel"],"9fvog2":["Preview unavailable: ",["errorDetail"]],"9jnjV0":["Embed an audio file with native player controls."],"9npOH9":["Open file"],"9o1bIV":[["behind"]," behind"],"9oE4C3":["Browse your repos:"],"9zb2WA":["Connecting"],"A1taO8":["Search"],"A5CYnd":["Broken link"],"A5hiCy":["Create template"],"A67Uwj":["Still loading"],"A6h5b-":["File duplicated"],"AMyJts":["This path is on an external volume (/Volumes/...). Open Knowledge will lose track of files when the drive ejects."],"AThCb_":["Open Knowledge manages the <0>open-knowledge</0> MCP server name, the <1>open-knowledge-ui</1> launch config, and <2>ok</2> / <3>open-knowledge</3> on PATH (including OK-owned symlinks). Using a custom wrapper? Register it under a different name."],"AVW-K9":["Failed to load orphan pages"],"AVoO4B":["Open <0>",["verificationUri"],"</0> and enter this code:"],"AWOSPo":["Zoom in"],"AddR83":["Could not create project. Try again or pick a different location."],"AeHuzT":["# One pattern per line.\\n# Examples:\\n# drafts/\\n# *.draft.md\\n# !keep.md"],"AiNMQ7":["This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."],"Am78jY":["Drag ",["keyName"]," to reorder"],"AoX5ld":[["folders","plural",{"one":["#"," folder"],"other":["#"," folders"]}]],"ArBWJf":["Undo last edit"],"B11p-O":["Edit markdown link"],"B2DrPb":["Auto-save"],"B3NAZC":["Open Navigator"],"B4_ipX":[["conflictCount","plural",{"one":["#"," file conflicted"],"other":["#"," files conflicted"]}]],"BAH4qX":["Selected graph item"],"BBtVak":["Collapse All"],"BD0XSC":["Failed to load project templates"],"BEkF-P":[["userName"],", ",["tabCount","plural",{"one":["#"," concurrent tab"],"other":["#"," concurrent tabs"]}]],"BGHHtQ":["Single page"],"BH56dn":["Custom display text"],"BHW0EW":["No templates resolve here. Add one to seed new docs in this folder."],"BJpGCq":["Open in Terminal"],"BQu9Pg":["Symlink"],"BY-g4_":["Add pattern"],"Bdha5y":["Publishing..."],"BeWTQy":["Loading starter packs"],"Bx4EXG":["Actions for ",["label"]],"BymzO4":["Document outline"],"C0NPNd":["Add Open Knowledge to your AI tools"],"C9TBvF":["No Outgoing"],"CCTop_":["Recent"],"CKyk7Q":["Go back"],"COr1Y7":["Pick <0>openknowledge.skill</0> from your <1>Downloads</1> folder. It enables automatically."],"CU3AiE":["Switching branches"],"CXj9C-":["New property name"],"C_KeJm":["This document doesn't exist on your local copy of branch <0>",["currentBranchLabel"],"</0>. Your branch may be behind the remote — pull the latest changes from GitHub, then reopen this link."],"ClDdyg":["Link to an external URL."],"CvsD6Y":["via ",["viaTags"]],"D4H2N6":["Remove ",["tag"]],"D8OV7J":["Only collaborators"],"DFfRbX":["Sync status: ",["syncStateLabel"]," — git identity unset"],"DId6MT":["Project-level pages with no outgoing graph edges."],"DOSkSZ":["This doc was shared from branch <0>",["shareBranch"],"</0>. It doesn't exist on your current branch (<1>",["currentLabel"],"</1>)."],"DPfwMq":["Done"],"DVh_Tb":["Failed to clean up after trash"],"DYwdxG":["Could not open Terminal"],"D_WKe_":["Click an agent's avatar in the presence bar to view their session."],"DeDYLr":["Unrecognized wiki link"],"DhLHEb":["Failed to load activity"],"DiFKSL":["Counting markdown files"],"Dnn2XG":["Automatic"],"DrYM2Z":["Sync disabled"],"DskIkK":["Sign-in stream ended without confirmation — please try again"],"Dw1T_W":["Rename ",["label"]],"E2Mv-X":["Copy source"],"E7BhZn":["Blank note"],"E9bKSA":["Creating"],"EBVbtP":["Could not duplicate item"],"EDm3wJ":["Loading diff renderer"],"EL_YRd":["Mirror of <0>api-spec</0>"],"EOjU5V":["Inline Math Properties"],"ETyvvg":["No language match."],"E_BHoD":["Could not move \\"",["targetName"],"\\" to the Trash. Do you want to permanently delete instead?"],"EcJiTs":["Sign in required"],"EcM3k7":["Failed to clean up pending ",["kind"]],"EeRZnZ":["Expand burst ",["burstNumber"]," diff"],"EgMJem":["Lands at <0>",["targetPath"],"</0>. Agents resolve it via leaf → root walk-up — closest-wins on filename collision."],"El7NbA":["Heading 2"],"Eq_ODN":["Merge aborted — sync paused"],"EqrC_R":["Undo failed: ",["message"]],"Es-eZU":["Remove from recent projects"],"Ev2r9A":["No results"],"EvPX7f":["Opens a folder picker to choose where to clone the repository."],"Evq3lu":["Orphan mode"],"EyBnQi":["Working tree has uncommitted changes"],"F-NRCj":["Add property"],"F4IYWe":["Share doc"],"F4vEsL":["Sync status: ",["syncStateLabel"]],"F6pfE9":["Active"],"FCxvG5":["First item"],"FEr96N":["Theme"],"FF5rwn":["Connect Open Knowledge to other tools you use."],"FP8DWL":["Create failed: ",["error"]],"FQlArb":["project template"],"FRYB1Q":["/api/config returned a malformed body"],"FTUGgh":["Enter a repository URL or owner/repo"],"FUMerq":["Could not enable sync: ",["detail"]],"FaBZwp":["File extensions are managed automatically - please rename without changing the extension"],"FjkaiT":["Zoom out"],"Fqr8BP":["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],"FvpFSZ":["Reveal in Finder, ",["hint"]],"Fxf4jq":["Description (optional)"],"FyW0WO":["Authorize in browser"],"G-JBA1":["Source mode requires a live connection — your edits are saved and will appear when you reconnect."],"G1Gw0v":["New template"],"G1XxbZ":["Checkbox"],"G7-rf8":["Pattern syntax error: ",["message"]],"G7cMuO":["HTML preview"],"GA-UkN":[["keyName"]," type: ",["typeLabel"],". Click to change."],"GDvlUT":["Role"],"GGsM4y":["Selected in graph"],"GJ3011":["Use ",["ext"]," extension"],"GK-IRZ":["Undo buttons are disabled — per-session state has been garbage-collected."],"GQDSBN":["Layout options"],"GUYwCr":["Dismiss notice"],"GUpclA":["Created if missing; reused if it exists."],"GXf9hG":["Cloning ",["repoName"],"..."],"G_686w":["Task List"],"G_mWXb":["Filter languages"],"GamjcN":["Template saved"],"GemPfn":["Failed to parse forward-links error response (HTTP ",["status"],")"],"Gfr4fu":["Server can't open documents"],"GgQgML":["You picked your home directory. Open Knowledge will index everything in your home tree — large and may surface personal files."],"GhjUB_":["Reconnected"],"GjElCU":["Select a file from the sidebar, or pick where to edit alongside your agent."],"Gp_twO":["Local path"],"GsBUCk":["Loading settings"],"GuqOb1":["Failed to load headings"],"Gx0VS1":["e.g. drafts/ or *.draft.md"],"H0WlWQ":["Grid of rows and columns with a header row."],"H86f9p":["Collapse"],"HDvj8K":["Open on current checkout (",["currentLabel"],")"],"HGNCsl":["Connection lost — keep this tab open, your edits will sync when reconnected"],"HIb0vl":["Network error — please try again"],"HM56Bx":["Creating..."],"HNnVG1":["No other recent projects."],"HP5ML3":["Sign in to GitHub to continue."],"HRU-eL":["You picked ~/Documents. Open Knowledge will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope."],"HXFyWD":["Split diff"],"H_Plo-":["article"],"HdkSiO":["New file"],"HfI1dR":["I already have it locally →"],"Hl89Qd":["Loading templates"],"HlmZBk":["Documents response did not match expected shape."],"HpK_8d":["Reload"],"HptUxX":["Number"],"Hrz9NY":["Wiki link"],"I1gRhX":["Failed to rename"],"I23A-U":["Template \\"",["name"],"\\" deleted"],"I5AfhE":["Sync status unavailable — server unreachable."],"IA1wNb":["The Claude Desktop App didn't open the file. Is it installed? (",["msg"],")"],"IA6JW2":["Detecting"],"IInnZo":["Conflict"],"IKoTAC":["Keep disabled"],"INEQsp":["Items to be created"],"IQPyrD":["Missing page — click to create"],"IR6Txi":["Align left"],"IRv9cH":["Cloned ",["repoName"],"."],"IX7-sq":["Something went wrong opening \\"",["docName"],"\\"."],"IX_qeH":["Folder defaults"],"IajAbS":["Add a starter pack"],"If0crP":["Open with AI ",["targetDisplayName"],", ",["hint"]],"IgTwLt":["Open this document in the editor and collapse the graph."],"Ik-gP0":["Heading H",["level"],": ",["text"]],"IlEstu":["Sync server error — try again in a moment."],"IrB5AK":["Server-side cleanup failed for ",["failedCount","plural",{"one":["#"," item"],"other":["#"," items"]}]],"IrYrzq":["Save version"],"IreQBq":["Repository"],"Ix0K8o":["Hide external URL nodes"],"J2MgzQ":["Undo all edits on ",["docName"]],"J2Mv98":["Name (e.g. ",["login"],")"],"J2eKUI":["File"],"J8rWRM":["Keep team's version"],"JCxGEX":["No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."],"JE21eh":["Symlink to ",["targetPath"]],"JK-Ave":["Hide thumbnails"],"JLUTgi":["No tags yet — author \`#tagname\` in any doc to populate the index."],"JLzQi_":["Close ",["accessibleLabel"]],"JOcPqH":["Bring a remote repository onto this machine."],"JUamR6":["This name has no characters that are safe for a folder identifier. Try a name with at least one letter or number."],"JVgg1-":["This permanently removes ",["path"],". Agents that reference this template by name will fail until it's recreated or shadowed by an ancestor."],"JWsZlx":["Open a project to edit."],"JZ8cO6":["Light, dark, or follow the OS."],"Jejur6":["Couldn't load document"],"Jhj_lh":["Modify the link target, anchor, and display label."],"Jqqevv":["System error"],"JtD-Br":["Page link"],"K-a33w":["Start writing to create this page"],"K1ckLX":["Failed to create folder"],"K6jjWB":[["packName"]," was already set up. Nothing to do."],"K9J00P":["Clone failed — connection error"],"KDuPiY":["Uploading ",["fileName"]],"KDw4GX":["Try again"],"KRJ6xh":["No tags yet. Continue typing to create one."],"KX1MZR":["Your repositories"],"KYcZ6Y":["Above"],"KZLdgR":["See <0>#design-docs</0> for the latest specs."],"KZkHZv":["Signed in as @",["login"]],"K_vT1F":["Upstream sync"],"K_wz1u":["Show Hidden Files"],"KaFCD3":["Open this link in a new tab and collapse the graph."],"Kh1n4a":["<",["componentName"],"> isn't a known component. Copy the source to use it elsewhere, or delete the block."],"KnoB--":["Will be saved as <0>",["sanitized"],"</0>."],"KujtjC":["Find"],"L-rMC9":["Reset to default"],"L1ZE3M":["Document statistics"],"L3CEC1":["this item"],"L6Hhh6":["(root)"],"L8fKuc":["Run this in your terminal"],"L9Y9Om":["Top linked pages"],"LCUy_N":["Session ended"],"LE7t79":["Clone to a new folder"],"LKOLNn":["No AI agents installed"],"LNum6A":[["minutes"]," min ago"],"LRgZAt":[["owner"],"/",["name"]," already exists"],"LUbzI-":["This template lives at an ancestor folder — deleting affects every folder under that ancestor that does not shadow it locally."],"LXdWeS":["Medium section heading."],"Lcehxn":["Save resolution"],"LlHqdU":["Initializing project"],"LpB85N":["Plain"],"LtI9AS":["Owner"],"LtSYdi":["Reveal in Finder"],"Lu_dOh":["Tree View Options"],"M3ytY_":["This looks like a drive root (e.g., C:\\\\). Scaffolding here will scan an entire drive."],"M5mfAe":["Add tag"],"MCjC9A":["Delete ",["deleteDescriptorLabel"]],"MHrjPM":["Title"],"MKOVhz":["Enable git auto-sync"],"MTs6g3":["Couldn't reconnect after server restart"],"MUBR8r":["Rename succeeded but the tabstrip may be out of date — refresh to resync"],"MV-Dkb":["Found ",["countDisplay"]," markdown files"],"MVxpbf":["Find and replace"],"MW64zN":["New File"],"MWrUEd":["Undo all"],"MZoxVx":["Failed to load tags. Press Escape and re-open to retry."],"Mb_20S":["Visual"],"Md709y":["Loading ",["fileName"]],"MmDDWK":["Recently opened"],"Mnavhe":[["propPanelDescriptorLabel"]," Properties"],"MtR6ZK":["Not signed in to GitHub."],"N1YYa7":["Loading image"],"N2FcBE":["Synced"],"N2S1rs":["Empty"],"N2eHWq":["Code Block"],"N3_ozB":["Hubs"],"NIWAux":["No docs registered under #",["tagDocsName"],"."],"NO7baa":["Red = your version (ours). Green = team's version (theirs). Accept each hunk to take theirs, reject to keep yours, then save."],"NOHyEE":["Retry push"],"NORKZU":["Pattern warnings: ",["summary"]],"NRSLBe":[["diffMin"],"m ago"],"NSnIUP":["Two-page (even)"],"NYUhy5":["Subfolder name"],"NkXEFS":["Restore failed — document unchanged"],"NmPNJJ":["Copy code"],"Nn4GgW":["Will be created as <0>",["sanitizedName"],"</0>"],"NnQapF":["Open with AI ",["targetDisplayName"]],"Nu4DdT":["Sync"],"Nu4oKW":["Description"],"NuH1jp":["Public repository"],"Nv3mUj":["Show advanced"],"NvOvTi":["Create in <0>",["dirDisplay"],"</0>"],"Nx7BWE":["Git auto-sync"],"NxW-md":["Resize ",["handleKey"]],"NzFvyK":["Session ended — undo unavailable"],"O0Z2Xr":["Outgoing"],"O2UpM1":["Browse"],"O3oNi5":["Email"],"O7_W_a":["Open with AI"],"OD0FCX":["Hidden “",["basename"],"”"],"ODD5Jc":["Edit ",["templateLabel"]],"ODGGlj":["Folder name: ",["detail"]],"OETysD":["No hub pages yet. Hubs appear once pages accumulate inbound graph links."],"OJTOUj":["Requires ",["brand"],"."],"OJeiSH":["Failed to add property"],"OKQe56":[["entryCount","plural",{"one":["Hide ","#"," auto-save"],"other":["Hide ","#"," auto-saves"]}]],"ONPvOb":["Loading agent activity"],"ONgEZF":["Loading headings for ",["pageTarget"]],"OTF92M":["Label <0>(optional display text)</0>"],"OYHzN1":["Tags"],"OYnx7O":["Path cannot start with \\"/\\""],"OZtLT5":["Checking GitHub sign-in..."],"OlAl5i":["Expand all"],"OmHTGj":["Disable git auto-sync"],"On0aF2":["Website"],"Oo_WWc":["No pages found"],"Oos8fo":["Copy command"],"Oxyd5f":["Pick a name"],"P-ye9o":["Could not open folder picker"],"P3NS4G":["Pattern syntax error (line ",["lineNumber"],"): ",["message"]],"P47EWZ":["Could not update sidebar settings"],"P6lAT3":["Folder target: ",["linkTitle"],". Click to open the overview."],"P7rM0l":["Checkpoint version"],"P8yDjG":["Name can’t be empty, \\".\\", \\"..\\", or contain / or \\\\"],"PHRoEJ":["Open shared document"],"PKLY-1":["Opening..."],"PMyJ9C":["No edit session yet"],"PQCdtv":["\\"",["docName"],"\\" doesn't exist."],"PVUn_c":["Open folder"],"PXXeW8":["Restore this auto-save?"],"PZt2Ds":["Clone ended unexpectedly."],"PauP7d":["Failed to load file (HTTP ",["status"],")"],"PdA9NZ":[["ahead"]," ahead"],"PdaL3B":["Failed to abort merge"],"PiH3UR":["Copied!"],"PkeYXL":["Expanded graph mode"],"Pkw7J9":["This folder is empty."],"Pyp1NA":["Restore to this point?"],"Q5fqMz":["Connection error — try again"],"Q6hhn8":["Preferences"],"Q8A-U_":["Connected to"],"QDZbvN":[["diffDays"],"d ago"],"QI4KgP":[["fileLabel"]," · ",["folderLabel"]],"QQghPu":["Install in Claude Desktop"],"QWT-Z9":["Read the <0>docs<1> ↗</1></0> for details."],"QcpeeE":["Navigate to ",["docName"]],"QqBQu1":["Label <0>(visible link text)</0>"],"QyioBP":["Move up"],"R0jJzV":["Paste URL, owner/repo, or search your repos"],"R4RGjs":["If this repo is shared, your in-progress edits become visible to collaborators as soon as they sync."],"RDrXh4":["Configure user, project, and integration settings."],"RFQ1Yx":["Restore this version"],"RGkNeJ":["Initialize a starter pack"],"RJ3a8Z":["Looking for <0>",["lookingForUrl"],"</0>."],"RN62Q8":["We'll build <0>openknowledge.skill</0>, save it to <1>~/Downloads</1>, and open the Claude Desktop App for you."],"RSqaSd":["Project root"],"RfHNf8":["Open activity panel for ",["tooltipName"]],"Rj01Fz":["Links"],"RlCInP":["Slash commands"],"RmBY0A":["No git remote"],"RobAKV":["Update the destination and optional section anchor."],"RqHing":["Could not reach the sync server — check your connection."],"Ruuu3v":["Open with built-in text editor"],"Rx5ReQ":["Rename ",["keyName"]],"S6l5dv":["Could not start creating a new item"],"S9Vnum":["Remove ",["patternText"]],"SCoBBH":["Tag suggestions"],"SCzAbA":[["phase"]," — ",["pct"],"%"],"SEYWYq":["Undo all edits on this file?"],"SFN6dN":["Heading 3"],"SUOoXn":["Failed to open project."],"SYfHmN":["Unpin tab"],"Sc1bKE":["Local collaboration data for \\"",["docName"],"\\" could not be cleared in time. Reload to retry."],"ScUTHW":["Open Containing Folder, ",["hint"]],"ScwcF2":["A project already exists at this location. Pick a different parent folder."],"SiUUCS":["Next match"],"SkMZlS":["Couldn't remove <0>",["targetGitPath"],"</0>: ",["removeGitError"]],"SrOuyg":["Document panels"],"T-4cw2":["Pick a layout that matches what you're building. Each pack ships with folders, templates, and agent-readable descriptions. You can mix and match later."],"T-654M":["Loading PDF"],"T67A0Y":["Auto-sync pushes/pulls commits to your git remote on intervals and on save. Toggling on requires confirmation."],"TJnkyf":["ok ui responded but server.lock has no port yet"],"TKQ7K-":["Install"],"TKaWtw":["Could not switch to ",["0"],". Try switching manually."],"TP9_K5":["Token"],"TXrEYR":["No templates resolve here. Add one in this folder's Templates section, or in Settings → Templates."],"Ta25TG":["No history yet"],"ThmUrC":["Could not finalize project setup. Try again."],"Tjc1pH":["Section <0>(optional heading anchor)</0>"],"TmKshB":["Invalid token — check that it has repo scope"],"TvY_XA":["Documentation"],"Tz0i8g":["Settings"],"Tz9pJB":["Clone stream ended unexpectedly — check if the clone completed"],"U2Kx6T":["Close all unpinned"],"U2pMtf":["tag-name"],"U3IvM5":["Full guide"],"U5Spo9":["Content directory must be inside the project"],"U8CD-l":["Copy full path, No workspace"],"UBv8UK":["Delete Permanently"],"UFIkhA":[["count","plural",{"one":["#"," page has conflicting changes."],"other":["#"," pages have conflicting changes."]}]],"UG-Phk":["Frontmatter YAML is malformed; fix in source mode to recover."],"UL8A9w":["Tag"],"UQAp48":["Search templates"],"URmyfc":["Details"],"UTZ97u":["Selection must be inside the project"],"UVLlMV":["Couldn't reach GitHub. Try again?"],"UYcGIW":["Connecting — waiting for collab server"],"Ua78MH":["no response"],"Uci-Ph":["Ordered List"],"Ud0Pj9":["<0>Mirror source removed.</0> The doc <1>",["src"],"</1> is no longer available."],"UkQGhd":["Hide replace"],"Up2_7p":["Copy full path"],"Uuj_R4":["New from template"],"Uw6ERJ":["Couldn't copy: ",["detail"]],"UyROxs":[["mins","plural",{"one":["#"," min ago"],"other":["#"," min ago"]}]],"V7QxyT":["Connection dropped"],"VU3Nrn":["Missing"],"VUijjF":["Embed an image with optional alt text."],"VbqhBI":["Already at ",["assetContentPath"]," — reusing."],"VdXv4D":["Clone from GitHub"],"W-ntoW":["heading-slug"],"W1qRuM":["This document is already active in the editor. Use Open to collapse the graph."],"W5A0Ly":["An unexpected error occurred."],"W8uemY":["Pick a starter pack to scaffold folders, templates, and AI-readable rules."],"W8vpBM":["starter pack"],"W9_Bub":["Local changes overlap with incoming sync"],"WD6cag":["Recent projects"],"WEzuMq":["Create a new Open Knowledge project in the folder of your choice."],"WL6puM":["Path resolves outside project"],"WMIKXK":["Are you sure you want to delete ",["targetCount"]," selected items? Folders and all files inside them will be deleted. This action cannot be undone."],"WPwDin":["Open folder on disk"],"WRNXKp":["Searching"],"WZ-vBy":["Permanently deletes <0>",["targetGitPath"],"</0> and all its git history. Working files stay in place. If the parent git repo is intentional (e.g. you cloned it), cancel and pick a location outside it."],"WamGNs":["Failed to load PDF: ",["error"]],"WcWS__":["Download file"],"Wcv-Zi":["Make this knowledge base available as a Claude Skill."],"Wgmlsw":["Fetching"],"Wh0im4":["editing [[",["realCurrentDoc"],"]]"],"WqLq6M":["Open with AI ",["displayName"]],"Wt5W56":["Sync is off — your edits will not sync to the remote repository."],"Wtw22s":["Installing"],"WyXG7w":["Close all"],"Wyxs0x":["Path cannot contain \\"..\\""],"X0ttSN":["No tags match \\"",["tagListQuery"],"\\"."],"X8kjQX":["Re-authenticate with GitHub"],"X9VpsP":["Loading folder contents"],"XDzAnp":["Opens in a new tab"],"XPJ0sN":[["settingsDescriptorLabel"]," properties"],"XPqe3B":["Create new tag #",["tagValue"]],"XRuL0i":["Create page"],"XU0OXn":["Enable auto-sync"],"XW18jo":["Page headings response did not match success schema"],"XYlJJT":["Setting up"],"Xet9MX":["Failed to load backlinks"],"XfzqjK":["template \\"",["name"],"\\""],"Xl-UUg":["guides/install or https://example.com"],"XopE_I":["Failed to parse backlinks error response (HTTP ",["status"],")"],"XpIZmv":["Fenced code block with monospace text."],"XtRoxT":["Page ",["pageNumber"]],"XvPJaT":["Diff layout"],"Xv_ijG":["https://github.com/owner/repo or owner/repo"],"XyNe7f":["Electron bridge unavailable. Refresh and try again."],"XyOUTJ":["Exit merge"],"Y-Urt2":["Block math equation rendered with KaTeX from a LaTeX source string."],"Y8ViJx":["A newer version may have been deployed since this tab opened."],"YGIi_c":["Reinstall"],"YPFBfr":[["detail"]," - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"YTLmTM":["Remove the parent <0>.git</0> folder"],"Y_kL7X":["Customize how the editor looks and behaves."],"Yea-K5":["Restore to this point"],"YjhKI5":["Cloning..."],"YlDuro":["Fit height"],"YsEYYS":[["behind","plural",{"one":["#"," commit behind"],"other":["#"," commits behind"]}]],"YwPUUP":["This pack is already set up here."],"Z1LF1M":["Sharing a doc needs a GitHub repository. Create one for this project."],"Z2M5XM":["Reason: ",["reason"]," (",["osDetail"],")"],"Z3FXyt":["Loading..."],"Z5h97D":["Hide files and folders from your knowledge base. Hidden items don’t appear in the file tree, search, or AI tools. <0>Learn more about patterns</0>."],"Z7fox7":["Actions for ",["rowLabel"]],"Z8KDox":["Enter a folder name (e.g. brain)."],"Z8lGw6":["Share"],"Z9BoIy":["opens in browser with prompt pre-filled"],"ZBYKxv":["Reverts every change this agent made to <0>",["docName"],"</0> this session (",["burstCount","plural",{"one":["#"," burst"],"other":["#"," bursts"]}],"). Other files and writers are unaffected."],"ZLQol-":["You can turn this on later in <0>Settings → Sync</0>."],"ZNK2Tq":["root"],"ZU8VV_":["Remove failed: ",["error"]],"ZWgr0b":["In a subfolder"],"ZWolSV":["You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want."],"ZWyHmq":["This project"],"ZhhOwV":["Quote"],"ZmGmNh":["Let's set up your project."],"Zon_qG":["Mirror source <0>",["label"],"</0>"],"ZptNUh":["Show ",["hidden"]," more"],"ZsGpr_":["Paste link"],"Zul8Ry":["never"],"_4rAQI":["Recovered from an external change",["sizeSuffix"]],"_6IEmc":["Open in Terminal, No workspace"],"_7UQ7y":["Whole word"],"_K2CvV":["Template"],"_N2eSU":["org"],"_TDESN":["Network error - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"_TF8ep":["Failed to render PDF"],"_fL4nz":["Checkpoint saved"],"_qD6mn":["Pick the folder where you've cloned it."],"_rP3HI":[["minutes"],"m ago"],"a5Gha5":["Local changes blocked the merge"],"a5W0q0":["Are you sure you want to delete ",["folderName"],"/ and all files inside? This action cannot be undone."],"a9OzSn":["No pages found for \\"",["trimmedQuery"],"\\""],"aA51jP":["Open in claude.ai, opens in browser with prompt pre-filled"],"aE2_XM":["One pattern per line — appended to <0>.okignore</0>."],"aIgBKf":["Can't nest projects. An Open Knowledge project already exists at <0>",["rootPath"],"</0>. Choose a location outside it, or open that project instead."],"aM23Wr":["page-name"],"aOp3hw":["Couldn't move to Trash"],"aWlJai":["Starting sign-in flow"],"a_u4ck":["Loading tags"],"aalx4E":["Editing broken MDX source: ",["reason"]],"abiHje":["Delete selected items"],"adsMWO":["Resolving deltas"],"aoa6xA":["network error (is \`ok ui\` running?)"],"av_PD9":["you"],"b392Dr":["Expand All"],"b3Thhd":["Upload failed"],"b4AQFK":["Open activity panel for ",["tooltipName"],", editing ",["realCurrentDoc"]],"b4itZn":["Working"],"bBE5tC":["Detected on this machine"],"bD8I7O":["Complete"],"bGQplw":["Body"],"bGa3Fk":["Uploading file"],"bHboUQ":["Edit template"],"bS_boY":["Replace current match"],"bUUVED":["Asset"],"bWLmRK":["Could not fetch branch. Check your connection."],"bcDHUM":[["descriptorLabel"]," — render error, source editable below"],"bmC18N":["Clearing local collaboration data for \\"",["docName"],"\\" before reconnecting."],"brCtGB":["History unavailable"],"bwil08":["Building <0>openknowledge.skill</0> and opening the Claude Desktop App"],"c5f7sm":["Code block language: ",["currentLabel"],". Click to change."],"c5rF4v":["What is this knowledge base for?"],"c8iK2Y":["No templates found."],"cBbVqQ":["The folder name <0>",["rawName"],"</0> can't be used as a project identifier — it has no characters left after sanitization. Click Browse to pick a folder whose name contains at least one alphanumeric character."],"cF9DyA":["Reconnecting after server restart"],"cIptmH":["In the Claude Desktop App"],"cKjLuT":["(project + user)"],"cOSAfL":["No repositories found on your GitHub account."],"cSCbv3":["BETA"],"cUK8lW":[["conflictCount","plural",{"one":["#"," conflict"],"other":["#"," conflicts"]}]],"cVUTnt":["Template \\"",["trimmedName"],"\\" created"],"cZGNlb":["Add another pattern"],"cdm00A":["No Incoming"],"cklVjM":["Timeline"],"cnGeoo":["Delete"],"cqA3od":["Link to another page in this project."],"cqQyPB":["Folder name"],"csDS2L":["Available"],"ct2kv5":["No headings in ",["pageTarget"]],"d2uTPx":["Server error (HTTP ",["status"],")"],"d5rK4X":[["chars","plural",{"one":["char"],"other":["chars"]}]],"dD7NPy":["Outline"],"dDpCOp":["Rename succeeded but the sidebar may be out of date — refresh to resync"],"dEgA5A":["Cancel"],"dEkpQr":["Hide code"],"dGaH3A":["Create a token at <0>github.com/settings/tokens</0> with <1>repo</1> scope."],"dOHMA0":["Failed to move"],"dOxPd4":["Footnote"],"dTaauv":["Reason: ",["reason"]],"dURmlQ":["\\"frontmatter\\" is a reserved property name"],"dbhUX1":["Hide this file"],"dbtjJh":["(opens in new tab)"],"dprWmL":["Anchor in this page"],"dr1vFs":["Replace all matches"],"dw_dUJ":["Failed to duplicate path"],"e0NrBM":["Project"],"e1hptq":["Embed a video with native player controls."],"e6vu79":["Failed to abort merge — connection error"],"e8L17t":["A non-empty folder already exists at this path. Pick a different folder."],"e8zRrb":["Show Files"],"eBIT9h":["Paste failed.",["restoreSuffix"]],"eFJkVt":["Clone failed: ",["cloneError"]],"eNQGRb":["Inline LaTeX math rendered with KaTeX."],"ePK91l":["Edit"],"eSu2Xn":["Writes a project-MCP config for each selected tool; Claude also gets <0>.claude/launch.json</0>."],"ehLu5O":["Open in Terminal, ",["hint"]],"emgiet":["Authoritative content; mirrored verbatim everywhere it's referenced."],"ensWZc":["or start from scratch <0/>"],"euc6Ns":["Duplicate"],"evs0iw":["Tags matching \\"",["tagListQuery"],"\\""],"f65AOQ":["Start from"],"f8jU-L":[["0"],"/",["1"]," — ",["2"]],"fG0X0e":["Install ",["brand"]," →"],"fIgqfQ":["Reinstalling"],"fJgQHX":["Failed to create file"],"fRv-ei":["Start a new Open Knowledge project."],"fVcm9t":[["0","plural",{"one":["#"," doc"],"other":["#"," docs"]}]],"fWi7pn":["Initialize starter pack"],"fX82Jn":["Open Knowledge will create a <0>.ok/</0> folder here to track this project's metadata."],"fYKgzG":["Failed to load recent projects."],"fYjgXu":["Unordered list of items."],"fiMNLl":["Sync settings not yet loaded — try again in a moment"],"fqSfXY":["Replace"],"g1tOCu":["Required. Title is the agent menu surface."],"g4XBm0":["Small section heading."],"g58Kwy":["<",["descriptorLabel"],"> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block."],"gGVP4q":["Click <0>+</0> <1/> <2>Create skill</2> <3/> <4>Upload skill</4>."],"gJR87V":["Could not create the project folder. Pick a different folder."],"gUlRQj":["Orphans"],"gYz2ep":["Expires in ",["timeLabel"]],"gcV0dI":["The folders and templates are in place; there's nothing left to scaffold."],"gg3Rpy":["Restore this version?"],"ggm6JX":["This page doesn't exist yet. Open it to create the page in the editor and collapse the graph."],"ggs9f8":["Search files, folders, or commands"],"ghYcYZ":["File extension"],"gijbne":["Failed to rename path"],"gljvbT":[["words","plural",{"one":["word"],"other":["words"]}]],"gmJ0An":["Failed to open folder."],"gp3I7-":["Before syncing, set your identity for git commits:"],"gsePqm":["Save Version"],"gtmbUO":["Sign in to GitHub"],"h06R3C":["No pages are missing outgoing graph links."],"h6EvY-":["This will replace the current document content with the version from <0>",["relative"]," (",["absoluteTime"],", ",["entrySha"],")</0> by <1>",["authorName"],"</1>. Your current content is already saved in the timeline — you can restore it anytime."],"h7FzJC":["Link-graph response did not match expected shape."],"hA8GQ6":["Will replace existing Open Knowledge entry"],"hBMK4W":["Project templates"],"hDKtoF":[["diffHrs"],"h ago"],"hDoLrm":["Remove ",["projectName"]," from recent projects"],"hGmuTc":["Docs tagged #",["tagDocsName"]],"hHMv6l":["Delete block"],"hJu2pH":["This folder already has files. Add a name to create a new subfolder inside it."],"hSySVc":["Install handoff failed: ",["msg"]],"hXbSxc":["Asset: ",["title"]],"hYDc6B":["Name cannot be empty"],"hYFQsG":["Validating"],"hYgDIe":["Create"],"hZoBHK":["Empty starting content"],"h_HYHD":["Opened ",["displayName"]," in your browser."],"haHgQj":["Copied relative path"],"hbNg4Y":["Branch ",["0"]," no longer exists on the remote."],"he3ygx":["Copy"],"hmUQVj":["Letters, digits, <0>_</0>, <1>-</1> only — no slashes, dots, spaces, or <2>.md</2>."],"hpDtUm":["External wiki link"],"hwFOFD":["Settings failed to load"],"hxBHxQ":["A line with a footnote<0><1>[1]</1></0> and a definition shown below."],"hxEUVJ":["Initialize ",["selectedPackName"]],"hynz2K":["Download started"],"hz7n6T":["Open Containing Folder"],"i1flq_":["Wiki link suggestions"],"i3f2kh":["No matching commands."],"i8dKs-":["Show all files"],"i92eAT":["We'll create a repository and start syncing — no terminal needed."],"i9toLO":["Agent configuration file"],"iDZtvM":["Failed to load templates: ",["message"]],"iEQQyu":["Agent"],"iEYxO4":["Show thumbnails"],"iH8pgl":["Back"],"iKSP5j":["Word wrap"],"iMCW9z":["Publish & copy link"],"iNFKkm":["No diff."],"iOHg1t":["Open embedded URL in new tab"],"iSnkwB":["Failed to open cloned project."],"iTlqm3":[["ahead","plural",{"one":["#"," commit ahead"],"other":["#"," commits ahead"]}]],"iTylMl":["Templates"],"i_grbe":["Click Browse to pick or create a project folder."],"idD8Ev":["Saved"],"ifUfKj":["Some pages have conflicting changes."],"ig5vUe":["Failed to load file"],"igaaxe":["Resolving: ",["file"]],"iilQXA":["Folder duplicated"],"iqIDv4":["Sync status unavailable"],"iqugog":["Initialize failed: ",["errorDetail"]],"isRobC":["New"],"iuTKci":["No edits yet."],"iycx_A":["Pushing"],"j6LB7S":["This project's running server doesn't support live editing. Restart Open Knowledge to fix."],"j9Vqvc":["inherited"],"jEdF24":["Missing page: ",["linkTitle"],". Click to create."],"jGJy-9":["Downloads ",["shareOwner"],"/",["shareRepo"]," from GitHub."],"jRHdCz":["Failed to load PDF"],"jSY41h":["\\"",["docName"],"\\" took too long. Check your connection."],"jTLWxh":["Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox)."],"jerqF0":["Loading branch state"],"jhtG3I":[" Your selection has been restored."],"jjmuxV":["Lost connection to the main process"],"jjtmV_":["First file name"],"jnXr0e":["Clone failed. Please try again."],"jol95m":["Failed to open Project Navigator."],"k9jDvw":[["entryCount","plural",{"one":["Show ","#"," auto-save"],"other":["Show ","#"," auto-saves"]}]],"kDuh1E":["Path resolves outside the project"],"kFLlsI":["Insert a footnote reference + matching definition stub."],"kNqMMd":["Folder"],"kUn-CN":["Sync off"],"kV2YZv":["Don't see <0>Skills</0>? Enable <1>Settings <2/> Capabilities <3/> Code execution and file creation</1> first."],"kYL1lH":["Agent activity"],"keNFEd":["Set identity"],"kj9pAE":["Creating page"],"kknhfj":["No changes"],"kmKqZg":["Clusters"],"knjOzA":["Tag value"],"kolRU1":["Do you want to permanently delete instead?"],"ktATCe":["Could not launch Terminal"],"l17ab4":["Could not write project files. Try a different location."],"l3mSlL":["Append-only timeline"],"lAiyU_":["Only the current document uses <0>#",["tag"],"</0>."],"lGs_bQ":["Page <0>*</0>"],"lHwYMr":["Server error: ",["status"]," ",["statusText"]],"lIn9L9":["Disable sync"],"lPzyrU":["All hunks resolved"],"lXKZGw":["Heading 1"],"lZAiSP":["Backlinks response did not match expected shape."],"l_UFPv":["Properties"],"lanW9H":["Sign in to clone"],"lb_UU4":["Sync now"],"lhjq3G":["Reset ",["labelText"]," to default"],"ll2yNl":["Content directory"],"lrhetp":["+ ",["overflow"]," more"],"ls1N1w":["(missing)"],"lsOFZR":[["webFallbackLabel"],", opens in browser with prompt pre-filled"],"lyWa43":["Project-level disconnected pages"],"m16xKo":["Add"],"m2T1Xj":["Tag #",["tagValue"],", ",["uses"]],"m4v3XT":["Undo last edit on ",["docName"]],"m6YGpY":["Active panel content for the selected tab shows here."],"mGaZwZ":["See the full install guide"],"mHzJ0v":["Clone failed: ",["message"]],"mKZODc":["Adds the Open Knowledge skill to the <0>Claude Desktop App</0> so it's available in Chat and Cowork sessions."],"mNY1G6":["Undo all edits"],"mSJ3Rn":["Computing scaffold plan"],"mWVJRX":["Collapsible section with a clickable summary."],"mYGY3B":["Date"],"mYLRjR":["You picked ~/Desktop. Open Knowledge will index everything on your desktop."],"mZHJju":["Link to a page"],"maDWIB":["Mirror source <0>api-spec</0>"],"makN88":["No patterns yet. Type a folder or file name below to start hiding files."],"mdKFEy":["You cancelled loading \\"",["docName"],"\\"."],"mdzKSV":[["nodeCount","plural",{"one":["#"," node"],"other":["#"," nodes"]}]],"mf37rL":["Retrying"],"mmpzAq":["Wrap long lines in the markdown source editor."],"mqSwZH":["<0>Mirror anchor not found.</0> No <1>",["mirrorSourceTag"],"</1> exists in <2>",["src"],"</2>."],"muWKMD":["No response — try again"],"n2lRue":["Commit or stash changes to switch:"],"n5n_vi":["Private repository"],"n6hXUm":["Auto-sync periodically fetches, pulls, and pushes commits to your remote git repository so your edits stay in sync across machines."],"n7aopT":["Editor mode"],"nNYV3Y":["and ",["remaining"]," more"],"nWv1ja":["Manage hidden files in Settings → Ignore patterns."],"nYKerc":["(user-level only)"],"nYeBmY":[["hours"],"h ago"],"nbfdhU":["Integrations"],"nft48x":["Stored at <0>.ok/templates/</0> in this project. Available in every folder (folder-scoped templates can override by filename)."],"njBeMm":["Both"],"njU86j":["Property \\"",["trimmed"],"\\" already exists"],"noH1JX":["Couldn't reach collab server — ",["errorDetail"],". Try <0>ok status</0> or check <1>.ok/local/last-spawn-error.log</1>."],"nrGWJ7":["Git identity isn't set — commits use a default author. Set yours so teammates see your name."],"nzaV6Q":["Page thumbnails"],"o2yoFu":["Reveal in Finder, No workspace"],"o49mDZ":["Loading timeline history"],"o4dcAf":["Reveal in File Explorer, ",["hint"]],"oBXkm2":["Delete code block"],"oJl7eO":["Unknown component: ",["componentName"]," — source editable below"],"ogAuyr":["Back to document view"],"omXJcU":["Close others"],"oqB2ez":["Previous match"],"otE4aj":["Show external URL nodes"],"outYNy":["Duplicate name \\"",["keyName"],"\\""],"ovIGrT":["Local collaboration data for \\"",["docName"],"\\" could not be cleared. Reload to retry."],"p0Iq25":["Insert link"],"p2LEhJ":["Personal access token"],"p9sdCy":["New ignore pattern"],"pAgkuZ":["Reopening \\"",["docName"],"\\" with a fresh local collaboration cache."],"pAlxX6":["Open this folder with Open Knowledge"],"pHYP6v":["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pRc-Im":["Undone all edits on ",["docName"]],"pWT04I":["Checking..."],"pWbsW6":["Loading docs"],"pZAs1T":["Failed to load outgoing links"],"pbwTg6":[["seconds"],"s ago"],"pcfY8r":["opens in browser"],"pckX1A":[["0","plural",{"one":["#"," use"],"other":["#"," uses"]}]],"pd0UH2":["Align right"],"pdHb22":["GitHub App"],"pha01Y":["Project-level pages with no incoming graph edges."],"pkAft1":["Search failed."],"pmKdif":["Failed: ",["loadError"]],"prHfed":["Each selected tool gets an Open Knowledge MCP entry."],"q2kXMG":["Inline Math"],"q6-JVU":["Loading pages"],"q7zsRM":["Couldn't save version — try again"],"qAQVSD":["Page headings response was not JSON"],"qAhFeg":[["userName"]," · ",["tabCount","plural",{"one":["#"," tab"],"other":["#"," tabs"]}]],"qDCkgN":["Show code"],"qNOgUu":["Edits at the source land here — no copy-paste drift."],"qUB_o_":["Auto-sync is off — your edits stay local until you commit and push manually."],"qXBTvV":["A template named <0>",["trimmedName"],"</0> already resolves here (likely inherited). Saving creates a <1>local</1> shadow that supersedes it for this folder."],"qXg5W9":["File saves to <0>~/Downloads/openknowledge.skill</0>."],"qXsafh":["Publish to GitHub"],"q_9EcE":["Enable git auto-sync?"],"qaHyRJ":[["linkCount","plural",{"one":["#"," link"],"other":["#"," links"]}]],"qbfj1f":["Receiving objects"],"qdBUHP":["Couldn't load ",["fileName"]],"qi1F96":["Reveal in File Explorer"],"qioCwA":["Jump to page ",["pageNumber"]],"qjHMHf":["Failed to disable sync — ",["detail"]],"qo4zCg":["Path cannot contain backslashes"],"qvWGzP":["Collapse all"],"qvcK7S":["Open Knowledge will create commits and push them to your remote automatically. If you do not want automatic commits in your git history, you should not enable auto-sync."],"r4R7AZ":["Network error during cleanup"],"r51jLC":["File saved & Claude Desktop App opened"],"rEnIww":["Published to ",["ownerLogin"],"/",["repoName"],"."],"rQRrkB":["yesterday"],"rVgSRB":["Collapse ",["docName"]],"rVxu1k":["No pages link here yet."],"rXz97P":["Numbered list of items."],"rZ9HZq":["To do"],"rdE6_3":["Version saved"],"rdU729":["Layout"],"rfFpcF":["Remove ",["chip"]],"rlUzXK":["Could not validate folder. Please try again."],"roAe2K":["Link URL"],"roiUQQ":["This page doesn't link to anything yet."],"rssK8c":["Ignore patterns (raw text)"],"s-MGs7":["Resources"],"s-XOaI":["File name"],"s1c0ja":["Bullet List"],"s3caR3":["Deleting"],"sE7R19":["Could not load templates: ",["templatesError"],". You can still create a blank note."],"sER-bs":["Files"],"sJK6pq":["Permission denied"],"sJWhgo":["Unknown component: ",["unregisteredComponentName"]],"sOxZaS":["Failed to load graph"],"saIASg":["Second item"],"saYiIO":["Path cannot contain null bytes"],"snrVQ7":["probe failed"],"ssuwjF":["Branch"],"sxkWRg":["Advanced"],"t-JXbf":["Notion-style inline row for a downloadable file. Drag-drop also works."],"t18QYR":["Unpin ",["accessibleLabel"]],"t2TkQ3":["Sync paused — resolve conflicts to resume."],"tAPZEx":["Below"],"tCelbM":["A folder named <0>",["sanitized"],"</0> already has files at this location. Pick a different name."],"tP5DDk":["Apply link"],"tUvUfp":["Use a folder you already have."],"tW_yvQ":["Expand ",["docName"]],"tX5yOZ":["New Folder"],"tXkhj_":["Start"],"t_YqKh":["Remove"],"tfDRzk":["Save"],"tfi40B":["Failed to create page"],"tgWuMB":["Modified"],"u-9fWA":["See <0>Architecture</0> for the system overview."],"u3BOHd":[["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"u3YnKw":["Could not construct share URL."],"u6Hp4N":["Markdown"],"uF9ruK":["Saving"],"uH_S-u":[["loadErrorTitle"],": ",["message"]],"uKRYiW":["Sync status unavailable — server error."],"uM6jnS":["Restore failed"],"uQNW00":["Detached HEAD — checkout a branch to resume"],"uWx2ZP":["Last sync"],"uZAG7T":["Auto-saved before a concurrent edit",["sizeSuffix"]],"u_lS4C":["Clone complete — opening project"],"uhJEA2":[["count","plural",{"one":["#"," more participant"],"other":["#"," more participants"]}]],"un8kBM":["Creating page: ",["linkTitle"],"."],"ur2XSb":["Visual editor"],"usidp7":["Clone failed: ",["failureMessage"]],"uuoHOU":["Command failed."],"uynXup":[["tokens","plural",{"one":["token"],"other":["tokens"]}]],"v-h2hx":["Delete ",["targetGitPath"]],"v3rxMX":["Review and resolve"],"v41fCm":["File not found"],"vEJDlt":["The file is in your Trash; the file-watcher will reconcile."],"vIxrEk":["Fit width"],"vLyv1R":["Hide"],"vMkXsd":[["keyName"]," type: ",["typeLabel"]," (inherited from folder defaults; not editable here)"],"vPYaz3":["Scaffold directly under this project."],"vY54W_":["Terminal.app not found"],"vcXTn3":["Failed to resolve ",["file"]],"ve8vEM":["Code expired — please try again"],"vfRlCI":["Could not copy full path"],"viwC-K":["Failed to remove project."],"vv7kpg":["Cancelled"],"vvWZnu":["Diff unavailable"],"w17YhW":["Switch to ",["shareBranch"]," and open"],"w3tVpc":["No links yet. Add wiki links or markdown links to build a graph."],"w3vFfL":["Hide Files"],"w7nm4K":["Indented blockquote for citations."],"wDiu1-":["Resolve manually"],"wJijgU":["Location"],"wJo9oS":["Close find"],"wQp1V3":["Mirror of <0>",["src"],"</0>"],"wTcjov":["No workspace"],"wXO4Tg":[["hrs"],"h ago"],"wbv9xO":["Create new project"],"wbwHYD":["Enable sync"],"wlwXUk":["You picked ~/Downloads. Files there are usually transient — consider a stable folder instead."],"wmds63":["No conflicts found."],"wndeIl":["Project-level pages with neither incoming nor outgoing graph edges."],"wrzAcD":["Terminal took too long to respond"],"wvbc1r":["Couldn't open document"],"x2fr_j":["Graph"],"x3-2ta":[["packName"]," initialized (",["projectEntries","plural",{"one":["#"," entry"],"other":["#"," entries"]}],")"],"x57cJf":["Open link"],"xCdTnb":["Close new tab"],"xDBki3":["Heading suggestions"],"xG4tb6":["Lost connection to \\"",["docName"],"\\"."],"xHGM4U":["Hide HTML preview"],"xK291b":["Two-page (odd)"],"xNyj3h":["Reinstall for Claude Chat & Cowork"],"xOTzt5":["just now"],"xSVO3J":["What gets created"],"xWEvuo":["Ask AI"],"xXo8FT":["Save failed: ",["error"]],"xYMPyY":["Paste was incomplete — ",["chunksCompleted"]," of ",["totalChunks"]," chunks landed.",["restoreSuffix"]],"xbdtfY":["Markdown source"],"xc4g25":["Parse failed"],"xeiujy":["Text"],"xhlFsx":["Inherited — set a value here to replace it."],"xiv-dW":["No files yet."],"xloBjn":["Relative Path"],"xsZhu-":["Page number"],"xzktOa":["Edit wiki link"],"y1t8bQ":["Settings sections"],"yCX4jp":[" Your selection could not be restored."],"yEHRcs":["Open on ",["currentLabel"]],"yKu_3Y":["Restore"],"yLq4w4":["Separator"],"yOGrCR":["Delete failed: ",["error"]],"yQE2r9":["Loading"],"yWWThY":["Asset reference"],"yXiaxB":["Assets cannot be renamed from the sidebar"],"yYR6za":["Display text"],"ygLG1e":["Assets cannot be moved from the sidebar"],"ysxgu8":["project"],"yu8Pzy":["Not detected"],"yutJKi":["Checklist with checkboxes."],"yvHDYG":["Claude Desktop"],"yz7wBu":["Close"],"yzF66j":["Link"],"yzGPkm":["Expand graph"],"z0a2EA":["Diagram from Mermaid source — flowchart, sequence, class, state, ER, gantt, pie."],"z2G3EK":["<0>",["rawName"],"</0> has characters unsafe for the on-disk identifier, so the project will be created as <1>",["sanitized"],"</1>. Click Browse to pick a safer name."],"z2funE":["Full Path"],"z5pqI8":["Cannot upload: no document is open"],"z60Lgn":["Saves the file to <0>~/Downloads/openknowledge.skill</0> and opens the Claude Desktop App. Requires Node.js or Bun on your PATH."],"zAsDLY":["Graph visualization of document links"],"zLGXna":["No starter packs available."],"zLak8b":["Activate new tab"],"zXZ0sB":["Open Knowledge initializes at <0>",["projectDir"],"</0> — the parent of <1>",["pickedRelative"],"</1> because it contains a <2>.git</2> folder (one .ok/ per git repo). <3>Content directory</3> defaults to <4>.</4> (the whole repo); type a sub-folder to narrow it."],"zXZJoN":["Add token"],"zZ_I5K":["Open project menu"],"zd00pH":["Copy Path"],"zgSFyG":["External link"],"zkz0Fg":["Set up syncing"],"zlErBl":["Page headings error response did not match RFC 9457"],"zo3Dl7":["Toggle thumbnails"],"zr7ADI":["Branch switch timed out — try opening the doc manually."],"zwBp5t":["Private"]}`),Gd=`en`;X.load(Gd,Wd),X.activate(Gd);function Kd(e,t){let n=`#/${encodeURIComponent(e)}`;return t==null||t===``?n:`${n}?branch=${encodeURIComponent(t)}`}function qd(e){let t=e.bridge;if(!t)return;let n=e.setHash??(e=>{window.location.hash=e});return t.onDeepLink(e=>{n(Kd(e.doc,e.branch))})}var Jd=4e3,Yd=1440*60*1e3;function Xd(e){let t=e.bridge;if(t&&t.onboarding)return t.onboarding.onToast(e=>{if(e.kind===`ancestor-promote`){Vo.success(`Opened existing Open Knowledge project at ${e.ancestorPath}`,{duration:Jd});return}if(e.kind===`startup-reclaim`){let t=[];if(e.mcp.status===`repaired`){let n=e.mcp.editors.map(e=>li[e]??e).join(`, `);t.push(`repaired ${n} MCP integration`)}else e.mcp.status===`failed`&&t.push(`MCP auto-repair failed`);e.path.status===`installed`&&t.push(e.path.summary),e.path.status===`failed`&&t.push(`PATH install failed: ${e.path.summary}`);let n=t.length>0?t.join(`; `):`Open Knowledge integrations checked.`,r=e.mcp.status===`failed`||e.path.status===`failed`;Vo[r?`error`:`success`](n,{duration:r?Yd:Jd});return}let t=Xo(e.gitRoot,e.pickedPath)??e.pickedPath;Vo.success(`Initialized Open Knowledge at ${e.gitRoot} — opened parent of ${t} because it contains a .git folder`,{duration:Jd})})}var Zd=!1;function Qd(e,t,n,r){let i=e[t];if(typeof i!=`function`){console.warn(`[cold-mount-instrumentation] target missing method "${t}"`);return}e[t]=function(...e){let t=performance.now(),a,o=!1;try{return a=i.apply(this,e),o=!0,a}finally{let e=performance.now()-t,i;if(o&&r)try{i=r(this,a,t,e)}catch(e){i={"instrumentation-error":e instanceof Error?e.message:String(e)}}try{qe(n,{durationMs:Math.round(e*1e3)/1e3,threw:!o,...i},{startTime:t,duration:e})}catch{}}}}function $d(e){return e?.doc?typeof e.doc.nodeSize==`number`?e.doc.nodeSize:e.doc.content&&typeof e.doc.content.size==`number`?e.doc.content.size:null:null}var ef=0,tf=0,nf=0,rf=0,af=null,of=[`linkResolutionDecoration$`],sf=new WeakSet,cf=new WeakSet;function lf(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function uf(){return!1}function df(){return!uf()}function ff(e,t){if(df())return t;let n=`ok/cold/nodeview-factory-${lf(e)}`;return function(...r){let i=performance.now();try{return t(...r)}finally{let t=performance.now()-i;qe(n,{nodeType:e,durationMs:Math.round(t*1e3)/1e3},{startTime:i,duration:t})}}}function pf(e){if(df())return;let t=e.state.plugins;for(let e of t){if(cf.has(e))continue;let t=e.spec?.key?.key;if(!t||!of.some(e=>t.startsWith(e)))continue;let n=e.props,r=n.decorations;if(typeof r!=`function`){cf.add(e);continue}let i=`ok/cold/decoration-${lf(t.replace(/\$\d*$/,``))}`;n.decorations=function(...e){let n=performance.now();try{return r.apply(this,e)}finally{let e=performance.now()-n;qe(i,{pluginKey:t,durationMs:Math.round(e*1e3)/1e3},{startTime:n,duration:e})}},cf.add(e)}}function mf(e){if(df())return;let t=e._props?.nodeViews;if(!(!t||typeof t!=`object`))for(let[e,n]of Object.entries(t)){if(typeof n!=`function`||n.__okWrapped===!0)continue;let r=ff(e,n);r.__okWrapped=!0,t[e]=r}}function hf(e){return df()?e:e.map(e=>{let t=e.name??`unknown`,n=lf(t);return e.extend({onBeforeCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;qe(`ok/cold/ext-${n}-on-before-create`,{ext:t,hook:`onBeforeCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;qe(`ok/cold/ext-${n}-on-create`,{ext:t,hook:`onCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onUpdate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;qe(`ok/cold/ext-${n}-on-update`,{ext:t,hook:`onUpdate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onDestroy(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;qe(`ok/cold/ext-${n}-on-destroy`,{ext:t,hook:`onDestroy`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}}})})}function gf(){if(!Zd){Zd=!0,Qd(Yn.prototype,`mount`,`ok/cold/editor-mount`,(e,t,n,r)=>{let i=e;return df()||(af=performance.now()),{elementDefault:i.options?.element?.nodeName??null,docSize:$d(i.editorState),durationMs:r}}),Qd(Yn.prototype,`createView`,`ok/cold/editor-create-view`,e=>{let t=e;return!df()&&!sf.has(e)&&t.view&&(pf(t.view),mf(t.view),sf.add(e)),{docSize:$d(t.editorState)}}),Qd(Yn.prototype,`createNodeViews`,`ok/cold/create-node-views`,(e,t,n,r)=>{rf+=1;let i=e;return!df()&&i.view&&mf(i.view),{docSize:$d(i.view),seq:rf,durationMs:r}}),Qd(Cn.prototype,`updateState`,`ok/cold/pm-update-state`,(e,t,n,r)=>(tf+=1,{seq:tf,docSize:$d(e.state),durationMs:r})),Qd(Cn.prototype,`setProps`,`ok/cold/pm-set-props`,(e,t,n,r)=>(nf+=1,{seq:nf,docSize:$d(e.state),durationMs:r})),Qd(Ee.prototype,`_forceRerender`,`ok/cold/force-rerender`,(e,t,n,r)=>{ef+=1;let i=e,a=(()=>{try{return i.type?.toArray?i.type.toArray().length:null}catch{return null}})();return{seq:ef,topLevelYElements:a,durationMs:r}}),Qd(We.prototype,`init`,`ok/cold/ec-init`,e=>({editorPresent:!!e.props?.editor}));try{typeof PerformanceObserver<`u`&&new PerformanceObserver(e=>{for(let t of e.getEntries()){let e=t.name;if((e===`first-paint`||e===`first-contentful-paint`)&&(qe(e===`first-paint`?`ok/cold/paint-fp`:`ok/cold/paint-fcp`,{entryType:t.entryType,startTime:Math.round(t.startTime*1e3)/1e3},{startTime:t.startTime,duration:0}),!df()&&e===`first-paint`&&af!==null)){let e=af,n=Math.max(0,t.startTime-e);qe(`ok/cold/append-to-paint`,{paintEntryType:t.entryType,durationMs:Math.round(n*1e3)/1e3,paintAt:Math.round(t.startTime*1e3)/1e3},{startTime:e,duration:n}),af=null}}}).observe({type:`paint`,buffered:!0})}catch{}globalThis.__okColdMountInstrumented=!0}}var _f=`Relaunch`,vf=`Release notes`,yf=`Updates paused`,bf=`Download`,xf=`Reset to defaults`,Sf=`Relaunch failed — please restart manually`,Cf=`Recovery action failed — please try again`;function wf(e,t){let n=t instanceof Error&&t.message?t.message:``;return n?`${e}: ${n}`:e}function Tf(e){return`Version ${e} ready to install`}function Ef(e){return`Updated to Version ${e}`}function Df(e){return`Your settings and recent projects were saved by a newer build than this one (v${e}). Reset to defaults to continue.`}var Of=0,kf=0,Af=1,jf=2,Mf=3,Nf=6e4;function Pf(e,t,n=()=>{},r=Nf){let i=[],a=new Set;return i.push(e.onUpdateDownloaded(({version:r})=>{let i=`update-downloaded`;t({id:i,body:Tf(r),priority:jf,action:{label:_f,onClick:()=>{e.update.relaunchNow().then(()=>{n(i)},e=>{t({id:`relaunch-error-${r}`,body:wf(Sf,e),variant:`error`,priority:Af})})}}})})),i.push(e.onWhatsNew(({version:i,releaseUrl:o})=>{let s=`whats-new-${i}`;t({id:s,body:Ef(i),priority:Mf,action:{label:vf,onClick:()=>{e.shell.openExternal(o)}}});let c=setTimeout(()=>{a.delete(c),n(s)},r);a.add(c)})),i.push(e.onUpdateStuckHint(({downloadUrl:n})=>{t({id:`update-stuck-hint`,body:yf,priority:kf,action:{label:bf,onClick:()=>{e.shell.openExternal(n)}}})})),()=>{for(let e of i)e();for(let e of a)clearTimeout(e);a.clear()}}function Ff(e,t,n,r=()=>{}){let i=`schema-incompatibility-${t.persistedSchemaVersion}`,a=`schema-incompatibility-error-${t.persistedSchemaVersion}`,o=e=>{r(i),n({id:a,body:wf(Cf,e),variant:`error`,priority:Of})};n({id:i,body:Df(t.currentBuild),priority:Of,action:{label:xf,onClick:()=>{e.state.resetIncompatible().then(()=>{r(i)},o)}}})}var If=[],Lf=new Set,Rf=!1;function zf(){for(let e of Lf)e()}function Bf(e){let t=If.findIndex(t=>t.id===e.id);if(t===-1)If=[...If,e];else{let n=If.slice();n[t]=e,If=n}zf()}function Vf(e){let t=If.filter(t=>t.id!==e);t.length!==If.length&&(If=t,zf())}function Hf(){return If}function Uf(e){return Lf.add(e),()=>{Lf.delete(e)}}function Wf(){if(Rf||typeof window>`u`)return;let e=window.okDesktop;e&&(Rf=!0,Pf(e,Bf,Vf),e.state.query().then(t=>{t.schemaIncompatibility&&Ff(e,t.schemaIncompatibility,Bf,Vf)},e=>{console.warn(`[update-notices-store] bridge.state.query() failed`,e)}))}var Gf=`ok-omnibar-recents-v1`,Kf=10;function qf(e){return typeof e==`object`&&!!e&&(e.kind===`file`||e.kind===`folder`)&&typeof e.path==`string`&&typeof e.lastOpenedAt==`string`}function Jf(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Yf(e,t){return`${e}:${t}`}function Xf(e){let t=Jf(e);if(!t)return[];try{let e=t.getItem(Gf);if(!e)return[];let n=JSON.parse(e);return Array.isArray(n)?n.filter(qf).slice(0,Kf):[]}catch{return[]}}function Zf(e,t){let n=Jf(t);if(n)try{n.setItem(Gf,JSON.stringify(e.slice(0,Kf)))}catch(e){console.warn(`[omnibar] Failed to save recent entries:`,e)}}function Qf(e,t){return[t,...e.filter(e=>e.kind!==t.kind||e.path!==t.path)].slice(0,Kf)}function $f(e,t){return e.filter(e=>t.has(Yf(e.kind,e.path)))}var ep=50,tp=30,np=``,rp=null;function ip(e){return e.trim().toLowerCase()}function ap(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function op(e){let t=e.trim();return t?[...new Set(t.split(/\s+/).filter(Boolean))].sort((e,t)=>t.length-e.length):[]}function sp(e,t,n=new Map,r=new Map){let i=[];for(let t of e){let e=r.get(t)?.modified,a=n.get(t);i.push({kind:`file`,path:t,name:Rr(t),...a?{title:a}:{},...e?{modifiedTs:Date.parse(e)}:{}})}for(let e of t)i.push({kind:`folder`,path:e,name:Rr(e)});return i.sort((e,t)=>{let n=e.path.localeCompare(t.path);return n===0?e.kind===t.kind?0:e.kind===`folder`?-1:1:n}),i}function cp(e){return Tn({kind:e.kind===`file`?`page`:`folder`,path:e.path,title:e.title??e.name,modifiedTs:e.modifiedTs??0})}function lp(e){return{entries:e,byId:new Map(e.map(e=>[`${e.kind===`file`?`page`:`folder`}:${e.path}`,e])),corpus:Lr(e.map(cp))}}function up(e){return e.map(e=>`${e.kind}\u0000${e.path}\u0000${e.title??``}\u0000${e.modifiedTs??0}`).join(``)}function dp(e){let t=up(e);return rp&&np===t?rp:(np=t,rp=lp(e),rp)}function fp(e,t,n=ep){return pp(dp(e),t,n)}function pp(e,t,n=ep){let r=ip(t);return r?An(e.corpus,r,{intent:`omnibar`,limit:n,scopes:[`page`,`folder`]}).map(t=>e.byId.get(t.document.id)).filter(e=>e!==void 0):e.entries.slice(0,20)}function mp(e,t){let n=op(t);if(n.length===0||e.length===0)return[{text:e,match:!1,start:0}];let r=RegExp(`(${n.map(ap).join(`|`)})`,`gi`),i=[],a=0;for(let t of e.matchAll(r)){let n=t.index??0;n>a&&i.push({text:e.slice(a,n),match:!1,start:a}),i.push({text:t[0],match:!0,start:n}),a=n+t[0].length}return a<e.length&&i.push({text:e.slice(a),match:!1,start:a}),i.length>0?i:[{text:e,match:!1,start:0}]}function hp(e){if(e.kind!==`page`&&e.kind!==`folder`||typeof e.path!=`string`)return null;let t=Rr(e.path);return{kind:e.kind===`page`?`file`:`folder`,path:e.path,name:t,...e.title&&{title:e.title},...e.snippet&&{snippet:e.snippet},...typeof e.score==`number`&&{score:e.score}}}async function gp(e,t={}){let n=e.trim();if(!n)return[];let r=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:n,intent:`full_text`,scopes:[`page`,`folder`,`content`],limit:t.limit??tp}),signal:t.signal});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(Xn(e)??`Search failed with status ${r.status}`)}return((await r.json()).results??[]).map(hp).filter(e=>!!e)}function _p(e,t,n=[]){let r=ip(t);return r?ip([e,...n].join(` `)).includes(r):!0}var vp=`tag:`;function yp(e,t){if(!e.toLowerCase().startsWith(`tag:`))return{kind:`normal`,query:e};let n=e.slice(4).replace(/^\s+/,``).trim();return n&&t.has(n)?{kind:`tag-docs`,tagName:n}:{kind:`tag-list`,query:n}}function bp(e,t){return bt(e,t)}var xp=R;async function Sp(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/tags/${e} responded with ${t.status}`);let n=await t.json();return Array.isArray(n.docs)?n.docs:[]}var Cp=`open-knowledge:doc-panel-tab`,wp=null;function Tp(){let e=wp;return wp=null,e}function Ep(e,t=typeof window>`u`?new EventTarget:window){wp=e,t.dispatchEvent(new CustomEvent(Cp,{detail:{tab:e}}))}function Dp(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(Cp,n),()=>t.removeEventListener(Cp,n)}var Op=[`.md`,`.mdx`];function kp(e){let t=e.toLowerCase();for(let e of Op)if(t.endsWith(e))return e;return null}function Ap(e){let t=kp(e);return t?e.slice(0,-t.length):e}var jp=`__blank__`,Mp={local:0,inherited:1};function Np(e){return[...e].sort((e,t)=>{let n=Mp[e.scope]-Mp[t.scope];if(n!==0)return n;let r=(e.title??e.name).toLowerCase(),i=(t.title??t.name).toLowerCase();return r.localeCompare(i)})}function Pp(e){return e.trim()?e.includes(`..`)?`dotdot`:e.startsWith(`/`)?`leading-slash`:e.includes(`\\`)?`backslash`:e.includes(`\0`)?`null-byte`:null:`empty`}function Fp(e){switch(e){case`empty`:return{id:`hYDc6B`};case`dotdot`:return{id:`Wyxs0x`};case`leading-slash`:return{id:`OYnx7O`};case`backslash`:return{id:`qo4zCg`};case`null-byte`:return{id:`saYiIO`}}}function Ip(e){let t=e.fileName.trim(),n=kp(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function Lp(e){let t=e.target;return t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.isContentEditable?!1:!!((e.metaKey||e.ctrlKey)&&e.altKey&&e.key.toLowerCase()===`n`)}function Rp(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function zp(e){let t=(0,$.c)(136),{open:n,onOpenChange:r,kind:a,initialDir:o,suggestedName:c,initialTemplate:l,description:u,onCreated:d,folderConfig:f}=e,{_:p}=i(),{addPage:m}=ii(),h=Xa(f?null:o),g=f??h,[_,v]=(0,Q.useState)(``),[y,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(`.md`),[C,w]=(0,Q.useState)(jp),[T,E]=(0,Q.useState)(null),[D,O]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(null),j=(0,Q.useId)(),N=(0,Q.useId)(),P=(0,Q.useId)(),F=(0,Q.useId)(),I=(0,Q.useId)(),[L,R]=(0,Q.useState)(!1),z=(0,Q.useRef)(null),B=(0,Q.useRef)(null),V,H;t[0]!==l||t[1]!==a||t[2]!==n||t[3]!==c?(V=()=>{if(n){E(null),A(null),O(!1),b(``),w(a===`file`&&l?l:jp),R(!1);let e=a===`file`?c??`untitled`:`index`,t=kp(e);S(t??`.md`),v(t?Ap(e):e)}},H=[n,a,c,l],t[0]=l,t[1]=a,t[2]=n,t[3]=c,t[4]=V,t[5]=H):(V=t[4],H=t[5]),(0,Q.useEffect)(V,H);let U;t[6]!==g.state.data||t[7]!==g.state.status?(U=g.state.status===`ready`?Np(g.state.data.folder.templates_available??[]):[],t[6]=g.state.data,t[7]=g.state.status,t[8]=U):U=t[8];let W=U,G;t[9]!==g.state.data||t[10]!==g.state.status||t[11]!==n||t[12]!==C?(G=()=>{n&&C!==jp&&g.state.status===`ready`&&((g.state.data.folder.templates_available??[]).some(e=>e.name===C)||w(jp))},t[9]=g.state.data,t[10]=g.state.status,t[11]=n,t[12]=C,t[13]=G):G=t[13];let K;t[14]!==g.state||t[15]!==n||t[16]!==C?(K=[n,C,g.state],t[14]=g.state,t[15]=n,t[16]=C,t[17]=K):K=t[17],(0,Q.useEffect)(G,K);let ee=a===`file`,q=g.state.status===`loading`||g.state.status===`idle`,te=g.state.status===`error`?g.state.message:null,ne;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(e){let t=kp(e);t?(S(t),v(Ap(e))):v(e),E(null)},t[18]=ne):ne=t[18];let re=ne,ie;t[19]!==x||t[20]!==_||t[21]!==y||t[22]!==o||t[23]!==a?(ie=function(){return Ip({kind:a,initialDir:o,fileName:_,fileExtension:x,folderName:y})},t[19]=x,t[20]=_,t[21]=y,t[22]=o,t[23]=a,t[24]=ie):ie=t[24];let ae=ie,oe;t[25]!==p||t[26]!==_||t[27]!==y||t[28]!==a?(oe=function(){if(a===`folder`){let e=Pp(y.trim());if(e)return{message:p({id:`ODGGlj`,values:{detail:p(Fp(e))}}),field:`folder`}}let e=Pp(_.trim());return e?{message:p(Fp(e)),field:`file`}:null},t[25]=p,t[26]=_,t[27]=y,t[28]=a,t[29]=oe):oe=t[29];let se=oe,ce;t[30]!==D||t[31]!==_||t[32]!==y||t[33]!==a?(ce=D||!_.trim()||a===`folder`&&!y.trim(),t[30]=D,t[31]=_,t[32]=y,t[33]=a,t[34]=ce):ce=t[34];let le=ce,J;t[35]!==p||t[36]!==m||t[37]!==ae||t[38]!==se||t[39]!==a||t[40]!==d||t[41]!==r||t[42]!==C?(J=async function(){let e=se();if(e){E(e.message),A(e.field);return}O(!0),E(null),A(null);let t=ae(),n=a===`file`&&C!==jp?C:void 0,i={path:t};n!==void 0&&(i.template=n);try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)}),t=e.status,n=await M(e,p({id:`d2uTPx`,values:{status:t}}));if(!n.ok){O(!1),E(n.title),A(`form`);return}let o=ai.safeParse(n.body);if(O(!1),!o.success){E(p(a===`folder`?{id:`K1ckLX`}:{id:`fJgQHX`})),A(`form`);return}let s=o.data.docName;r(!1),window.location.hash=`#/${s}`,m(s),yr([`files`,`backlinks`,`graph`]),d?.(s)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),O(!1),E(p({id:`HIb0vl`})),A(`form`)}},t[35]=p,t[36]=m,t[37]=ae,t[38]=se,t[39]=a,t[40]=d,t[41]=r,t[42]=C,t[43]=J):J=t[43];let ue=J,de;t[44]!==p||t[45]!==o?(de=o||p({id:`L6Hhh6`}),t[44]=p,t[45]=o,t[46]=de):de=t[46];let fe=de,pe;t[47]===a?pe=t[48]:(pe=(0,Z.jsx)(ko,{children:a===`file`?(0,Z.jsx)(s,{id:`HdkSiO`}):(0,Z.jsx)(s,{id:`96G6Re`})}),t[47]=a,t[48]=pe);let me;t[49]!==u||t[50]!==fe?(me=u??(0,Z.jsx)(s,{id:`NvOvTi`,values:{dirDisplay:fe},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})}}),t[49]=u,t[50]=fe,t[51]=me):me=t[51];let he;t[52]===me?he=t[53]:(he=(0,Z.jsx)(Do,{children:me}),t[52]=me,t[53]=he);let ge;t[54]!==pe||t[55]!==he?(ge=(0,Z.jsxs)(Ro,{children:[pe,he]}),t[54]=pe,t[55]=he,t[56]=ge):ge=t[56];let _e;t[57]!==C||t[58]!==ee||t[59]!==F||t[60]!==L||t[61]!==I||t[62]!==W||t[63]!==te||t[64]!==q?(_e=ee&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{id:F,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`f65AOQ`})}),te?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,children:(0,Z.jsx)(s,{id:`sE7R19`,values:{templatesError:te}})}):null,(0,Z.jsx)(Vp,{triggerId:I,labelledById:F,open:L,onOpenChange:R,value:C,onValueChange:w,templates:W,loading:q}),!q&&!te&&W.length===0?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`TXrEYR`})}):null]}),t[57]=C,t[58]=ee,t[59]=F,t[60]=L,t[61]=I,t[62]=W,t[63]=te,t[64]=q,t[65]=_e):_e=t[65];let ve;t[66]!==p||t[67]!==T||t[68]!==k||t[69]!==j||t[70]!==N||t[71]!==y||t[72]!==a?(ve=a===`folder`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:N,children:(0,Z.jsx)(s,{id:`cqQyPB`})}),(0,Z.jsx)(Uo,{ref:B,id:N,value:y,onChange:e=>{b(e.target.value),E(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":T&&(k===`folder`||k===`form`)?j:void 0,"aria-invalid":T&&(k===`folder`||k===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=Pp(y.trim());if(t){E(p({id:`ODGGlj`,values:{detail:p(Fp(t))}})),A(`folder`);return}z.current?.focus()}}})]}),t[66]=p,t[67]=T,t[68]=k,t[69]=j,t[70]=N,t[71]=y,t[72]=a,t[73]=ve):ve=t[73];let ye;t[74]===a?ye=t[75]:(ye=a===`folder`?(0,Z.jsx)(s,{id:`jjtmV_`}):(0,Z.jsx)(s,{id:`s-XOaI`}),t[74]=a,t[75]=ye);let be;t[76]!==P||t[77]!==ye?(be=(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:P,children:ye}),t[76]=P,t[77]=ye,t[78]=be):be=t[78];let xe;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(xe=e=>re(e.target.value),t[79]=xe):xe=t[79];let Se=a===`file`,Ce=T&&(k===`file`||k===`form`)?j:void 0,we=T&&(k===`file`||k===`form`)?!0:void 0,Te;t[80]!==ue||t[81]!==le?(Te=e=>{e.key===`Enter`&&!le&&ue()},t[80]=ue,t[81]=le,t[82]=Te):Te=t[82];let Ee;t[83]!==P||t[84]!==_||t[85]!==Se||t[86]!==Ce||t[87]!==we||t[88]!==Te?(Ee=(0,Z.jsx)(Uo,{ref:z,id:P,value:_,onChange:xe,placeholder:`my-note`,autoFocus:Se,"aria-describedby":Ce,"aria-invalid":we,onFocus:Bp,onKeyDown:Te,className:`flex-1`}),t[83]=P,t[84]=_,t[85]=Se,t[86]=Ce,t[87]=we,t[88]=Te,t[89]=Ee):Ee=t[89];let De;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(De=e=>{(e===`.md`||e===`.mdx`)&&S(e)},t[90]=De):De=t[90];let Oe;t[91]===p?Oe=t[92]:(Oe=p({id:`ghYcYZ`}),t[91]=p,t[92]=Oe);let ke;t[93]===p?ke=t[94]:(ke=Op.map(e=>(0,Z.jsx)(xo,{value:e,"aria-label":p({id:`GJ3011`,values:{ext:e}}),children:e},e)),t[93]=p,t[94]=ke);let Ae;t[95]!==x||t[96]!==Oe||t[97]!==ke?(Ae=(0,Z.jsx)(wo,{type:`single`,value:x,onValueChange:De,variant:`outline`,"aria-label":Oe,className:`shrink-0`,children:ke}),t[95]=x,t[96]=Oe,t[97]=ke,t[98]=Ae):Ae=t[98];let je;t[99]!==Ee||t[100]!==Ae?(je=(0,Z.jsxs)(`div`,{className:`flex items-stretch gap-2`,children:[Ee,Ae]}),t[99]=Ee,t[100]=Ae,t[101]=je):je=t[101];let Me;t[102]!==T||t[103]!==j?(Me=T&&(0,Z.jsx)(`p`,{id:j,role:`alert`,className:`text-1sm text-destructive`,children:T}),t[102]=T,t[103]=j,t[104]=Me):Me=t[104];let Ne;t[105]!==be||t[106]!==je||t[107]!==Me?(Ne=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[be,je,Me]}),t[105]=be,t[106]=je,t[107]=Me,t[108]=Ne):Ne=t[108];let Pe;t[109]!==_e||t[110]!==ve||t[111]!==Ne?(Pe=(0,Z.jsx)(Fo,{children:(0,Z.jsxs)(`div`,{className:`space-y-6`,children:[_e,ve,Ne]})}),t[109]=_e,t[110]=ve,t[111]=Ne,t[112]=Pe):Pe=t[112];let Fe;t[113]===r?Fe=t[114]:(Fe=()=>r(!1),t[113]=r,t[114]=Fe);let Ie;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,Z.jsx)(s,{id:`dEgA5A`}),t[115]=Ie):Ie=t[115];let Le;t[116]!==D||t[117]!==Fe?(Le=(0,Z.jsx)(Ti,{variant:`outline`,className:`font-mono uppercase`,onClick:Fe,disabled:D,children:Ie}),t[116]=D,t[117]=Fe,t[118]=Le):Le=t[118];let Re;t[119]===D?Re=t[120]:(Re=D?(0,Z.jsx)(s,{id:`E9bKSA`}):(0,Z.jsx)(s,{id:`hYgDIe`}),t[119]=D,t[120]=Re);let ze;t[121]!==ue||t[122]!==le||t[123]!==Re?(ze=(0,Z.jsx)(Ti,{onClick:ue,disabled:le,children:Re}),t[121]=ue,t[122]=le,t[123]=Re,t[124]=ze):ze=t[124];let Be;t[125]!==Le||t[126]!==ze?(Be=(0,Z.jsxs)(Io,{children:[Le,ze]}),t[125]=Le,t[126]=ze,t[127]=Be):Be=t[127];let Ve;t[128]!==ge||t[129]!==Pe||t[130]!==Be?(Ve=(0,Z.jsxs)(No,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[ge,Pe,Be]}),t[128]=ge,t[129]=Pe,t[130]=Be,t[131]=Ve):Ve=t[131];let Y;return t[132]!==r||t[133]!==n||t[134]!==Ve?(Y=(0,Z.jsx)(zo,{open:n,onOpenChange:r,children:Ve}),t[132]=r,t[133]=n,t[134]=Ve,t[135]=Y):Y=t[135],Y}function Bp(e){return Rp(e.currentTarget)}function Vp(e){let t=(0,$.c)(66),{triggerId:n,labelledById:r,open:a,onOpenChange:o,value:c,onValueChange:l,templates:u,loading:d}=e,{_:f}=i(),p=(0,Q.useId)(),m;if(t[0]!==u||t[1]!==c){let e;t[3]===c?e=t[4]:(e=e=>e.name===c,t[3]=c,t[4]=e),m=u.find(e),t[0]=u,t[1]=c,t[2]=m}else m=t[2];let h=m,_=c===jp,v=a?p:void 0,y=`${r} ${n}`,b;t[5]!==_||t[6]!==d||t[7]!==h?.name||t[8]!==h?.title||t[9]!==c?(b=d?(0,Z.jsx)(s,{id:`Hl89Qd`}):_?(0,Z.jsx)(s,{id:`E7BhZn`}):h?.title??h?.name??c,t[5]=_,t[6]=d,t[7]=h?.name,t[8]=h?.title,t[9]=c,t[10]=b):b=t[10];let x;t[11]===b?x=t[12]:(x=(0,Z.jsx)(`span`,{className:`truncate`,children:b}),t[11]=b,t[12]=x);let S;t[13]!==_||t[14]!==d||t[15]!==h?(S=!d&&!_&&h?(0,Z.jsx)(Gp,{entry:h}):null,t[13]=_,t[14]=d,t[15]=h,t[16]=S):S=t[16];let C;t[17]!==x||t[18]!==S?(C=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[x,S]}),t[17]=x,t[18]=S,t[19]=C):C=t[19];let w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(Xs,{className:`ml-2 size-4 shrink-0 opacity-50`,"aria-hidden":`true`}),t[20]=w):w=t[20];let T;t[21]!==d||t[22]!==a||t[23]!==v||t[24]!==y||t[25]!==C||t[26]!==n?(T=(0,Z.jsx)(Lt,{asChild:!0,children:(0,Z.jsxs)(Ti,{id:n,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":a,"aria-haspopup":`listbox`,"aria-controls":v,"aria-labelledby":y,disabled:d,className:`w-full justify-between font-normal`,children:[C,w]})}),t[21]=d,t[22]=a,t[23]=v,t[24]=y,t[25]=C,t[26]=n,t[27]=T):T=t[27];let E;t[28]===f?E=t[29]:(E=f({id:`UQAp48`}),t[28]=f,t[29]=E);let D;t[30]===E?D=t[31]:(D=(0,Z.jsx)(A,{placeholder:E}),t[30]=E,t[31]=D);let O;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(g,{children:(0,Z.jsx)(s,{id:`c8iK2Y`})}),t[32]=O):O=t[32];let k;t[33]!==o||t[34]!==l?(k=()=>{l(jp),o(!1)},t[33]=o,t[34]=l,t[35]=k):k=t[35];let j=c===jp?`opacity-100`:`opacity-0`,M;t[36]===j?M=t[37]:(M=vi(`mt-1 size-4 shrink-0`,j),t[36]=j,t[37]=M);let N;t[38]===M?N=t[39]:(N=(0,Z.jsx)(To,{className:M,"aria-hidden":`true`}),t[38]=M,t[39]=N);let P;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`E7BhZn`})}),t[40]=P):P=t[40];let F;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[P,(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(0,Z.jsx)(s,{id:`hZoBHK`})})]}),t[41]=F):F=t[41];let I;t[42]!==k||t[43]!==N?(I=(0,Z.jsxs)(me,{value:`Blank note empty`,onSelect:k,className:`items-start gap-3`,children:[N,F]}),t[42]=k,t[43]=N,t[44]=I):I=t[44];let L;if(t[45]!==o||t[46]!==l||t[47]!==u||t[48]!==c){let e;t[50]!==o||t[51]!==l||t[52]!==c?(e=e=>{let t=e.title??e.name,n=e.title&&e.title!==e.name?e.name:void 0,r=`${e.scope}:${e.source_folder}:${e.name}`;return(0,Z.jsxs)(me,{value:r,keywords:[t,e.name,e.description??``,e.scope,e.source_folder??``],onSelect:()=>{l(e.name),o(!1)},className:`items-start gap-3`,children:[(0,Z.jsx)(To,{className:vi(`mt-1 size-4 shrink-0`,c===e.name?`opacity-100`:`opacity-0`),"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:t}),n?(0,Z.jsx)(`code`,{className:`font-mono text-2xs text-muted-foreground shrink-0`,children:n}):null,(0,Z.jsx)(Gp,{entry:e,className:`ml-auto`})]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description}):null]})]},r)},t[50]=o,t[51]=l,t[52]=c,t[53]=e):e=t[53],L=u.map(e),t[45]=o,t[46]=l,t[47]=u,t[48]=c,t[49]=L}else L=t[49];let R;t[54]!==p||t[55]!==I||t[56]!==L?(R=(0,Z.jsxs)(be,{id:p,className:`subtle-scrollbar`,children:[O,I,L]}),t[54]=p,t[55]=I,t[56]=L,t[57]=R):R=t[57];let z;t[58]!==D||t[59]!==R?(z=(0,Z.jsx)(Fe,{className:`w-[var(--radix-popover-trigger-width)] p-0`,align:`start`,onOpenAutoFocus:Wp,onWheel:Up,onTouchMove:Hp,children:(0,Z.jsxs)(oe,{children:[D,R]})}),t[58]=D,t[59]=R,t[60]=z):z=t[60];let B;return t[61]!==o||t[62]!==a||t[63]!==z||t[64]!==T?(B=(0,Z.jsxs)(jt,{open:a,onOpenChange:o,children:[T,z]}),t[61]=o,t[62]=a,t[63]=z,t[64]=T,t[65]=B):B=t[65],B}function Hp(e){e.stopPropagation()}function Up(e){e.stopPropagation()}function Wp(e){e.preventDefault(),e.currentTarget.querySelector(`[cmdk-input]`)?.focus()}function Gp(e){let t=(0,$.c)(7),{entry:n,className:r}=e;if(n.scope===`inherited`){let e;t[0]===r?e=t[1]:(e=vi(`shrink-0 text-2xs`,r),t[0]=r,t[1]=e);let i;t[2]===n.source_folder?i=t[3]:(i=n.source_folder||(0,Z.jsx)(s,{id:`ZNK2Tq`}),t[2]=n.source_folder,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,Z.jsx)(ce,{variant:`gray`,className:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}return null}function Kp(e){return e.split(`/`).pop()??e}function qp(e,t){let n=new Map;for(let e of t?.folders??[])n.set(e.path,e.summary);let r=e.created.filter(e=>e.kind===`folder`).map(e=>({kind:`folder`,name:`${e.path}/`,description:n.get(Kp(e.path))??``})),i=e.created.filter(e=>e.kind===`file`).map(e=>({kind:`file`,name:e.path,description:Kp(e.path)===`log.md`?X._({id:`l3mSlL`}):``}));return[...r,...i]}function Jp(e){let t=(0,$.c)(23),{plan:n,selectedPack:r}=e,{_:a}=i(),o,c,l,u,d,f;if(t[0]!==a||t[1]!==n||t[2]!==r){let e=[...qp(n,r)].sort(Zp),i=new Set(e.map(Xp));d=`space-y-2`,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsxs)(`h3`,{className:`flex items-center gap-1.5 text-xs font-semibold uppercase font-mono tracking-wider text-primary`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center justify-center`,children:`◇`}),(0,Z.jsx)(s,{id:`xSVO3J`})]}),t[9]=f):f=t[9],u=`overflow-hidden rounded-md border border-border/60 bg-muted/20`,t[10]===a?o=t[11]:(o=a({id:`INEQsp`}),t[10]=a,t[11]=o),c=`py-1.5`,l=e.map(e=>{let t=e.name.replace(/\/$/,``).split(`/`),n=0,r=0;for(let e=1;e<t.length;e++){let a=t.slice(0,e).join(`/`);i.has(a)&&(n++,r=e)}let a=t.slice(r).join(`/`)+(e.kind===`folder`?`/`:``),o=e.kind===`folder`;return(0,Z.jsxs)(`li`,{className:`relative flex min-w-0 items-center gap-1.5 py-1 pr-3`,style:{paddingLeft:`${12+n*16}px`},children:[Array.from({length:n},Yp),o?(0,Z.jsx)(hc,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`,strokeWidth:1.5}):(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Z.jsx)(`code`,{className:`font-mono text-1sm shrink-0 text-foreground/80`,children:a}),o&&e.description?(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{"aria-label":`Show description`,className:`flex shrink-0 cursor-help rounded outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:(0,Z.jsx)(h,{"aria-hidden":`true`,className:`size-3 text-muted-foreground/60`,strokeWidth:1.5})}),(0,Z.jsx)(wn,{children:e.description})]}):null]},e.name)}),t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=c,t[5]=l,t[6]=u,t[7]=d,t[8]=f}else o=t[3],c=t[4],l=t[5],u=t[6],d=t[7],f=t[8];let p;t[12]!==o||t[13]!==c||t[14]!==l?(p=(0,Z.jsx)(`ul`,{"aria-label":o,className:c,children:l}),t[12]=o,t[13]=c,t[14]=l,t[15]=p):p=t[15];let m;t[16]!==u||t[17]!==p?(m=(0,Z.jsx)(`div`,{className:u,children:p}),t[16]=u,t[17]=p,t[18]=m):m=t[18];let g;return t[19]!==d||t[20]!==f||t[21]!==m?(g=(0,Z.jsxs)(`section`,{className:d,children:[f,m]}),t[19]=d,t[20]=f,t[21]=m,t[22]=g):g=t[22],g}function Yp(e,t){return(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-0 bottom-0 w-px bg-border/50`,style:{left:`${12+t*16+8}px`}},`guide:${t}`)}function Xp(e){return e.name.replace(/\/$/,``)}function Zp(e,t){return e.name.localeCompare(t.name)}async function Qp(e){let t=await e.json().catch(()=>null),n=zn.safeParse(t);if(!n.success)return{kind:`internal`,message:`HTTP ${e.status}`};let r=n.data.detail??n.data.title,i=n.data.type;return i===`urn:ok:error:seed-prerequisite-missing`?{kind:`prerequisite-missing`,message:r}:i===`urn:ok:error:seed-invalid-root`?{kind:`invalid-root`,message:r}:i===`urn:ok:error:no-project-dir`?{kind:`no-project`,message:r}:{kind:`internal`,message:r}}function $p(){let e=typeof window<`u`?window.okDesktop:void 0;return e?.seed?{plan:e.seed.plan,apply:e.seed.apply,listPacks:e.seed.listPacks}:{plan:async e=>{let t=new URLSearchParams;e?.rootDir&&t.set(`rootDir`,e.rootDir),e?.packId&&t.set(`packId`,e.packId);let n=t.toString(),r=await fetch(`/api/seed/plan${n?`?${n}`:``}`);if(!r.ok)return{ok:!1,error:await Qp(r)};let i=await r.json().catch(()=>null);return i?.plan?{ok:!0,plan:i.plan}:{ok:!1,error:{kind:`internal`,message:`Malformed plan response`}}},apply:async(e,t)=>{let n=await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e,packId:t?.packId})});if(!n.ok)return{ok:!1,error:await Qp(n)};let r=await n.json().catch(()=>null);return r?.result?{ok:!0,result:r.result}:{ok:!1,error:{kind:`internal`,message:`Malformed apply response`}}},listPacks:async()=>{let e=await fetch(`/api/seed/packs`);if(!e.ok)return{ok:!1,error:{kind:`internal`,message:`HTTP ${e.status}`}};let t=await e.json().catch(()=>null);return!t||!Array.isArray(t.packs)?{ok:!1,error:{kind:`internal`,message:`Malformed listPacks response`}}:{ok:!0,packs:t.packs}}}}var em={"knowledge-base":bc,"software-lifecycle":D,"plain-notes":Xc,worldbuilding:rc,"writing-pipeline":Nc,gbrain:Dc};function tm(e){return em[e]??bc}function nm(e){let t=(0,$.c)(34),{onPackSelect:n,className:r,packs:a}=e,{_:o}=i(),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null),f=a===void 0,p,m;t[0]===f?(p=t[1],m=t[2]):(p=()=>{if(!f)return;let e=!1;return(async()=>{try{let t=await $p().listPacks();if(e)return;t.ok?l(t.packs):d(t.error.message)}catch(t){let n=t;if(e)return;d(n instanceof Error?n.message:String(n))}})(),()=>{e=!0}},m=[f],t[0]=f,t[1]=p,t[2]=m),(0,Q.useEffect)(p,m);let h=f?c:a;if(u!==null){let e;t[3]===r?e=t[4]:(e=vi(`rounded-md bg-destructive/10 p-4 text-sm text-destructive`,r),t[3]=r,t[4]=e);let n;t[5]===u?n=t[6]:(n=(0,Z.jsx)(s,{id:`56WWtu`,values:{error:u}}),t[5]=u,t[6]=n);let i;return t[7]!==e||t[8]!==n?(i=(0,Z.jsx)(`div`,{role:`alert`,className:e,children:n}),t[7]=e,t[8]=n,t[9]=i):i=t[9],i}if(h===null){let e;t[10]===r?e=t[11]:(e=vi(`grid w-full max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3`,r),t[10]=r,t[11]=e);let n;t[12]===o?n=t[13]:(n=o({id:`BeWTQy`}),t[12]=o,t[13]=n);let i;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(i=Array.from({length:6},im).map(rm),t[14]=i):i=t[14];let a;return t[15]!==e||t[16]!==n||t[17]!==i?(a=(0,Z.jsx)(`div`,{role:`status`,className:e,"aria-busy":`true`,"aria-label":n,children:i}),t[15]=e,t[16]=n,t[17]=i,t[18]=a):a=t[18],a}if(h.length===0){let e;t[19]===r?e=t[20]:(e=vi(`flex w-full max-w-5xl items-center justify-center rounded-2xl border border-dashed border-border/60 bg-muted/20 p-8 text-sm text-muted-foreground`,r),t[19]=r,t[20]=e);let n;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(s,{id:`zLGXna`}),t[21]=n):n=t[21];let i;return t[22]===e?i=t[23]:(i=(0,Z.jsx)(`div`,{role:`status`,className:e,children:n}),t[22]=e,t[23]=i),i}let g;t[24]===r?g=t[25]:(g=vi(`grid w-full max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3`,r),t[24]=r,t[25]=g);let _;if(t[26]!==n||t[27]!==h){let e;t[29]===n?e=t[30]:(e=e=>(0,Z.jsx)(am,{pack:e,onSelect:()=>n(e.id)},e.id),t[29]=n,t[30]=e),_=h.map(e),t[26]=n,t[27]=h,t[28]=_}else _=t[28];let v;return t[31]!==g||t[32]!==_?(v=(0,Z.jsx)(`div`,{className:g,children:_}),t[31]=g,t[32]=_,t[33]=v):v=t[33],v}function rm(e){return(0,Z.jsx)(sm,{},`skeleton-${e}`)}function im(e,t){return t}function am(e){let t=(0,$.c)(23),{pack:n,onSelect:r}=e,i;t[0]===n.id?i=t[1]:(i=tm(n.id),t[0]=n.id,t[1]=i);let a=i,{files:o,folders:s}=n.entryCounts,c;t[2]===a?c=t[3]:(c=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`flex size-8 items-center justify-center rounded-lg bg-primary/5 text-primary`,children:(0,Z.jsx)(a,{className:`size-4`})}),t[2]=a,t[3]=c);let l;t[4]===n.name?l=t[5]:(l=(0,Z.jsx)(`h3`,{className:`text-sm font-medium leading-tight`,children:n.name}),t[4]=n.name,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n.description?d=t[10]:(d=(0,Z.jsx)(`p`,{className:`text-1sm leading-relaxed text-muted-foreground`,children:n.description}),t[9]=n.description,t[10]=d);let f;t[11]!==u||t[12]!==d?(f=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;t[14]!==o||t[15]!==s?(p=om({files:o,folders:s}),t[14]=o,t[15]=s,t[16]=p):p=t[16];let m;t[17]===p?m=t[18]:(m=(0,Z.jsx)(`p`,{className:`mt-auto pt-2 font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:p}),t[17]=p,t[18]=m);let h;return t[19]!==r||t[20]!==f||t[21]!==m?(h=(0,Z.jsxs)(`button`,{type:`button`,onClick:r,className:`group flex h-full flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px`,children:[f,m]}),t[19]=r,t[20]=f,t[21]=m,t[22]=h):h=t[22],h}function om({files:e,folders:t}){let n=e>0?X._({id:`4etMqs`,values:{files:e}}):null,r=X._({id:`AoX5ld`,values:{folders:t}});return n?X._({id:`QI4KgP`,values:{fileLabel:n,folderLabel:r}}):r}function sm(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`size-10 animate-pulse rounded-lg bg-muted`,"aria-hidden":`true`,children:(0,Z.jsx)(W,{className:`size-5 animate-spin text-muted-foreground opacity-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6`,children:[t,(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-4 w-1/2 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-4/5 animate-pulse rounded bg-muted`})]}),(0,Z.jsx)(`div`,{className:`mt-auto h-3 w-20 animate-pulse rounded bg-muted`})]}),e[1]=n):n=e[1],n}var cm=`knowledge-base`;function lm(e){let t=(0,$.c)(68),{open:n,onOpenChange:r,onSeedApplied:a,initialPackId:o}=e,{_:c}=i(),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={kind:`loading`},t[0]=l):l=t[0];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(null),[m,h]=(0,Q.useState)(o??cm),[g,_]=(0,Q.useState)(`project-root`),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(o===void 0?`pick`:`configure`),S=(0,Q.useRef)(!0),C=f?.find(e=>e.id===m),w,T;t[1]!==n||t[2]!==f?(w=()=>{if(!n||f!==null)return;let e=!1;return(async()=>{try{let t=await $p().listPacks();if(e)return;t.ok?p(t.packs):(p([]),d({kind:`error`,message:t.error.message}))}catch(t){let n=t;if(e)return;p([]),d({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>{e=!0}},T=[n,f],t[1]=n,t[2]=f,t[3]=w,t[4]=T):(w=t[3],T=t[4]),(0,Q.useEffect)(w,T);let E,D;t[5]!==o||t[6]!==n?(E=()=>{n&&(h(o??cm),_(`project-root`),y(``),x(o===void 0?`pick`:`configure`),d({kind:`loading`}),S.current=!0)},D=[n,o],t[5]=o,t[6]=n,t[7]=E,t[8]=D):(E=t[7],D=t[8]),(0,Q.useEffect)(E,D),(0,Q.useEffect)(()=>{C&&y(C.defaultSubfolder??``)},[C]);let O;t[9]===v?O=t[10]:(O=v.trim(),t[9]=v,t[10]=O);let k=O,A=g===`subfolder`&&k===``,j,M;t[11]!==c||t[12]!==n||t[13]!==f||t[14]!==g||t[15]!==m||t[16]!==b||t[17]!==A||t[18]!==k?(j=()=>{if(!n||b!==`configure`||f===null)return;if(A){d({kind:`error`,message:c({id:`Z8KDox`})});return}let e=g===`project-root`?void 0:k,t=S.current?0:200;S.current=!1;let r=!1,i=setTimeout(()=>{r||(d(um),$p().plan({rootDir:e,packId:m}).then(e=>{if(!r){if(!e.ok){d({kind:`error`,message:e.error.message});return}d(e.plan.created.length>0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||d({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},M=[n,b,f,m,g,k,A,c],t[11]=c,t[12]=n,t[13]=f,t[14]=g,t[15]=m,t[16]=b,t[17]=A,t[18]=k,t[19]=j,t[20]=M):(j=t[19],M=t[20]),(0,Q.useEffect)(j,M);let N=async function(){if(u.kind!==`plan`)return;let e=u.plan;d({kind:`applying`,plan:e});let t;try{t=await $p().apply(e,{packId:m})}catch(t){let n=t,r=n instanceof Error?n.message:String(n);Vo.error(c({id:`iqugog`,values:{errorDetail:r}})),d({kind:`plan`,plan:e});return}if(t.ok){let e=C?.name??c({id:`W8vpBM`}),n=t.result.applied,i=c(n===0?{id:`K6jjWB`,values:{packName:e}}:{id:`x3-2ta`,values:{packName:e,projectEntries:n}});Vo.success(i),a?.(),r(!1)}else{let n=t.error.message;Vo.error(c({id:`iqugog`,values:{errorDetail:n}})),d({kind:`plan`,plan:e})}},P=o!==void 0,F=C?.name,I=c(b===`configure`&&C?{id:`hxEUVJ`,values:{selectedPackName:F}}:{id:`RGkNeJ`}),L;t[21]!==c||t[22]!==C||t[23]!==b?(L=b===`configure`&&C?C.description:c({id:`T-4cw2`}),t[21]=c,t[22]=C,t[23]=b,t[24]=L):L=t[24];let R=L,z;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(z=function(e){h(e),x(`configure`),S.current=!0},t[25]=z):z=t[25];let B=z,V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=function(){x(`pick`),d({kind:`loading`}),S.current=!0},t[26]=V):V=t[26];let H=V,U;t[27]===I?U=t[28]:(U=(0,Z.jsx)(ko,{children:I}),t[27]=I,t[28]=U);let G;t[29]===R?G=t[30]:(G=(0,Z.jsx)(Do,{children:R}),t[29]=R,t[30]=G);let K;t[31]!==U||t[32]!==G?(K=(0,Z.jsxs)(Ro,{children:[U,G]}),t[31]=U,t[32]=G,t[33]=K):K=t[33];let ee;t[34]!==f||t[35]!==u||t[36]!==g||t[37]!==C||t[38]!==b||t[39]!==v?(ee=b===`pick`?(0,Z.jsx)(Fo,{children:(0,Z.jsx)(nm,{packs:f,onPackSelect:B})}):(0,Z.jsxs)(Fo,{className:`space-y-6`,children:[(0,Z.jsx)(dm,{choice:g,subfolder:v,placeholder:C?.defaultSubfolder??`subfolder`,onChoiceChange:_,onSubfolderChange:y}),(0,Z.jsx)(fm,{phase:u,selectedPack:C})]}),t[34]=f,t[35]=u,t[36]=g,t[37]=C,t[38]=b,t[39]=v,t[40]=ee):ee=t[40];let q;t[41]!==P||t[42]!==b?(q=b===`configure`&&!P?(0,Z.jsxs)(Ti,{className:`mr-auto uppercase font-mono`,variant:`ghost`,onClick:H,children:[(0,Z.jsx)(Pi,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,Z.jsx)(s,{id:`iH8pgl`})]}):null,t[41]=P,t[42]=b,t[43]=q):q=t[43];let te;t[44]===r?te=t[45]:(te=()=>r(!1),t[44]=r,t[45]=te);let ne;t[46]===u.kind?ne=t[47]:(ne=u.kind===`already-seeded`||u.kind===`error`?(0,Z.jsx)(s,{id:`yz7wBu`}):(0,Z.jsx)(s,{id:`dEgA5A`}),t[46]=u.kind,t[47]=ne);let re;t[48]!==te||t[49]!==ne?(re=(0,Z.jsx)(Ti,{className:`uppercase font-mono`,variant:`outline`,onClick:te,children:ne}),t[48]=te,t[49]=ne,t[50]=re):re=t[50];let ie;t[51]!==N||t[52]!==u.kind||t[53]!==b||t[54]!==A?(ie=b===`configure`&&u.kind===`plan`?(0,Z.jsx)(Ti,{onClick:N,disabled:A,children:(0,Z.jsx)(s,{id:`4TzU0n`})}):b===`configure`&&u.kind===`applying`?(0,Z.jsxs)(Ti,{disabled:!0,children:[(0,Z.jsx)(W,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(s,{id:`XYlJJT`})]}):null,t[51]=N,t[52]=u.kind,t[53]=b,t[54]=A,t[55]=ie):ie=t[55];let ae;t[56]!==q||t[57]!==re||t[58]!==ie?(ae=(0,Z.jsxs)(Io,{children:[q,re,ie]}),t[56]=q,t[57]=re,t[58]=ie,t[59]=ae):ae=t[59];let oe;t[60]!==K||t[61]!==ee||t[62]!==ae?(oe=(0,Z.jsxs)(No,{className:`sm:max-w-3xl`,"data-ok-layer-spawned":``,children:[K,ee,ae]}),t[60]=K,t[61]=ee,t[62]=ae,t[63]=oe):oe=t[63];let se;return t[64]!==r||t[65]!==n||t[66]!==oe?(se=(0,Z.jsx)(zo,{open:n,onOpenChange:r,children:oe}),t[64]=r,t[65]=n,t[66]=oe,t[67]=se):se=t[67],se}function um(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function dm(e){let t=(0,$.c)(21),{choice:n,subfolder:r,placeholder:i,onChoiceChange:a,onSubfolderChange:o}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`3wiBAs`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=e=>a(e),t[1]=a,t[2]=l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Ra,{children:(0,Z.jsx)(s,{id:`RSqaSd`})}),t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Ia,{htmlFor:`seed-root-project-root`,children:(0,Z.jsxs)(Fa,{orientation:`horizontal`,children:[(0,Z.jsxs)(Ja,{children:[u,(0,Z.jsx)(lo,{className:`text-1sm`,children:(0,Z.jsx)(s,{id:`vPYaz3`})})]}),(0,Z.jsx)(ao,{value:`project-root`,id:`seed-root-project-root`})]})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(Ra,{children:(0,Z.jsx)(s,{id:`ZWgr0b`})}),t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(lo,{className:`nth-last-2:mt-0 text-1sm`,children:(0,Z.jsx)(s,{id:`GUpclA`})}),t[6]=p):p=t[6];let m;t[7]!==n||t[8]!==o||t[9]!==i||t[10]!==r?(m=n===`subfolder`&&(0,Z.jsx)(Uo,{value:r,onChange:e=>o(e.target.value),placeholder:i,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`}),t[7]=n,t[8]=o,t[9]=i,t[10]=r,t[11]=m):m=t[11];let h;t[12]===m?h=t[13]:(h=(0,Z.jsxs)(Ja,{children:[f,p,m]}),t[12]=m,t[13]=h);let g;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(ao,{value:`subfolder`,id:`seed-root-subfolder`}),t[14]=g):g=t[14];let _;t[15]===h?_=t[16]:(_=(0,Z.jsx)(Ia,{htmlFor:`seed-root-subfolder`,children:(0,Z.jsxs)(Fa,{orientation:`horizontal`,children:[h,g]})}),t[15]=h,t[16]=_);let v;return t[17]!==n||t[18]!==_||t[19]!==l?(v=(0,Z.jsxs)(`div`,{className:`space-y-2 py-1`,children:[c,(0,Z.jsxs)($a,{className:`sm:flex`,value:n,onValueChange:l,children:[d,_]})]}),t[17]=n,t[18]=_,t[19]=l,t[20]=v):v=t[20],v}function fm(e){let t=(0,$.c)(13),{phase:n,selectedPack:r}=e;if(n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-4 text-sm text-muted-foreground`,children:[(0,Z.jsx)(W,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(s,{id:`mSJ3Rn`})]}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.kind===`already-seeded`){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`font-medium`,children:(0,Z.jsx)(s,{id:`YwPUUP`})}),t[3]=e):e=t[3];let n;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`py-2 text-sm`,children:[e,(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`gcV0dI`})})]}),t[4]=n):n=t[4],n}let i;t[5]!==n.plan||t[6]!==r?(i=(0,Z.jsx)(Jp,{plan:n.plan,selectedPack:r}),t[5]=n.plan,t[6]=r,t[7]=i):i=t[7];let a;t[8]===n.plan.warnings?a=t[9]:(a=n.plan.warnings.length>0?(0,Z.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:n.plan.warnings.map(pm)}):null,t[8]=n.plan.warnings,t[9]=a);let o;return t[10]!==i||t[11]!==a?(o=(0,Z.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[i,a]}),t[10]=i,t[11]=a,t[12]=o):o=t[12],o}function pm(e){return(0,Z.jsx)(`p`,{children:e},e)}var mm=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`}],hm=mm.filter(e=>e.id!==`claude-cowork`),gm=`#settings`;function _m(e){let t=e.target;return t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.isContentEditable?!1:!!((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key===`,`)}function vm(e){return e.replace(/^#/,``)===`settings`}function ym(){return typeof window>`u`?``:window.location.hash}function bm(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(Sm),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=()=>{(0,Q.startTransition)(()=>{n(vm(ym()))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a=xm,o;return e[2]===t?o=e[3]:(o={open:t,close:a},e[2]=t,e[3]=o),o}function xm(){typeof window>`u`||vm(ym())&&window.history.back()}function Sm(){return vm(ym())}function Cm(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function wm(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=Xn(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function Tm(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?Cm(e):wm()}var Em=`ok:skill:cowork:installed`,Dm=`1`,Om=250,km=`/api/skill/install-state`;function Am(e){return`${Em}:v${e}`}var jm=new Map;async function Mm(e={},t={}){let n=t.force?`__force__`:`__default__`,r=jm.get(n);if(r)return r;let i=Nm(e,t);return jm.set(n,i),i.finally(()=>{jm.get(n)===i&&jm.delete(n)}),i}async function Nm(e,t){let n=e.installer===void 0?Tm():e.installer,r=Pm(e.storage),i=e.fetchSnapshot??Im,a=e.serverTimeoutMs??Om,o=null;if(!t.force){try{o=await Lm(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Am(o?.currentVersion??e.fallbackSkillVersion??Fm());if(!t.force&&r?.getItem(s)===Dm)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,Dm)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function Pm(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Fm(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function Im(){let e;try{e=await fetch(km,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function Lm(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function Rm(e){return Mm({},e)}function zm(){return Mm({},{force:!0})}async function Bm(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function Vm(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return Bm({target:`claude-cowork`,url:jr({mode:`cowork`},e)},n);case`claude-code`:return Bm({target:`claude-code`,url:jr({mode:`code`},e)},n);case`codex`:return Bm({target:`codex`,url:Ar(e)},n);case`cursor`:return Bm({target:`cursor`,url:br(e),workspacePath:e.projectDir},n);default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function Hm(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:Um(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:Um(e)}}}function Um(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}async function Wm(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}function Gm(e,t,n){let r=n===`\\`?t.replaceAll(`/`,`\\`):t;return`${e.endsWith(n)?e.slice(0,-1):e}${n}${r}`}function Km(e){return`${e}.md`}function qm(e){if(!e.docName||!e.workspace)return null;let t=Km(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:Gm(n,t,r)}}function Jm(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function Ym(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function Xm(e){return Hm(e.installUrl).then(()=>void 0)}function Zm(e){return`Opened in ${e}.`}function Qm(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function $m(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function eh(e,t,n,r){return t.ok?{target:e,host:n,outcome:`ok`,ts:r}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason}}function th(e){return e.docContext===null?e.folderRelativePath?or(e.folderRelativePath):kn():si(e.docContext.relativePath)}async function nh(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install Open Knowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`Open Knowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install Open Knowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:th(t)},a=await n.dispatchHandoff(i),o=eh(e,a,n.isElectronHost()?`electron`:`web`,n.now().toISOString());await n.recordHandoff(o);let s=n.getDisplayName(e);if(a.ok)n.toast.success(Zm(s));else{let i=$m(r),a=Qm(s,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{nh(e,t,n,r+1)}}})}return a}function rh(e){return mm.find(t=>t.id===e)?.displayName??e}function ih(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function ah(){return{dispatchHandoff:Vm,recordHandoff:Wm,toast:{success:e=>{Vo.success(e)},error:(e,t)=>{Vo.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>ih(),getDisplayName:rh,ensureCoworkSkillInstalled:Rm}}function oh(){return{dispatch:(e,t)=>nh(e,t,ah()),reinstallCoworkSkill:zm}}var sh=[...new Set(mm.flatMap(e=>e.schemes))];function ch(e,t){let n=t.now?.()??Date.now(),r={};for(let t of mm){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function lh(e){return ch({},e)}async function uh(e){let t=e.schemes??sh,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var dh=Object.fromEntries(sh.map(e=>[e,{installed:!1}]));async function fh(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return dh}if(!t.ok)return dh;let n;try{n=await t.json()}catch{return dh}if(typeof n!=`object`||!n||Array.isArray(n))return dh;let r=n,i={};for(let e of sh)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function ph(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function mh(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=lh({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=ch(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!ph(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function hh(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function gh(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>uh({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>fh({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function _h(){let e=(0,$.c)(5),[t,n]=(0,Q.useState)(vh),r=(0,Q.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=mh(gh());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,Q.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function vh(){return lh({isElectronHost:hh(),now:Date.now})}var yh=3e3,bh=(e,t,n)=>cl(e,t,n,`CommandPalette`);function xh(e){window.location.assign(ni(e))}function Sh(e,t){return e?.kind===`folder`||e?.kind===`folder-index`?e.folderPath:Dn(t)}function Ch(e){let t=(0,$.c)(23),{entry:n,query:r,onSelect:i}=e,a=r===void 0?``:r,o=n.kind===`folder`?L:P,s;t[0]===n?s=t[1]:(s=`title`in n&&n.title?n.title:n.path.split(`/`).pop()??n.path,t[0]=n,t[1]=s);let c=s,l=`snippet`in n?n.snippet:void 0,u=`${n.kind} ${n.path}`,d=`command-palette-nav-${n.kind}-${n.path}`,f;t[2]===o?f=t[3]:(f=(0,Z.jsx)(o,{className:`mt-0.5`}),t[2]=o,t[3]=f);let p;t[4]!==a||t[5]!==c?(p=(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:(0,Z.jsx)(wh,{query:a,text:c})}),t[4]=a,t[5]=c,t[6]=p):p=t[6];let m;t[7]!==n.path||t[8]!==a?(m=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(wh,{query:a,text:n.path})}),t[7]=n.path,t[8]=a,t[9]=m):m=t[9];let h;t[10]!==a||t[11]!==l?(h=l?(0,Z.jsx)(`span`,{className:`max-h-10 overflow-hidden text-muted-foreground text-xs leading-relaxed`,children:(0,Z.jsx)(wh,{query:a,text:l})}):null,t[10]=a,t[11]=l,t[12]=h):h=t[12];let g;t[13]!==p||t[14]!==m||t[15]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[p,m,h]}),t[13]=p,t[14]=m,t[15]=h,t[16]=g):g=t[16];let _;return t[17]!==i||t[18]!==u||t[19]!==d||t[20]!==f||t[21]!==g?(_=(0,Z.jsxs)(me,{value:u,onSelect:i,"data-testid":d,className:`items-start`,children:[f,g]}),t[17]=i,t[18]=u,t[19]=d,t[20]=f,t[21]=g,t[22]=_):_=t[22],_}function wh(e){let t=(0,$.c)(5),{text:n,query:r}=e,i;t[0]!==r||t[1]!==n?(i=mp(n,r).map(Th),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[3]=i,t[4]=a),a}function Th(e){let t=`${e.start}:${e.match?`match`:`plain`}`;return e.match?(0,Z.jsx)(`mark`,{className:`rounded-sm bg-primary/10 px-0.5 font-semibold text-primary`,children:e.text},t):(0,Z.jsx)(`span`,{children:e.text},t)}function Eh({searchResults:e,fallbackSearchResults:t,searchStatus:n}){return e.length>0?e:n===`success`?[]:t}function Dh(e){let t=(0,$.c)(151),{bridge:n,open:r,onOpenChange:a}=e,o=n===void 0?null:n,{_:c}=i(),[l,u]=(0,Q.useState)(``),d=(0,Q.useDeferredValue)(l),f=d.trim(),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],t[0]=p):p=t[0];let[m,h]=(0,Q.useState)(p),[_,v]=(0,Q.useState)(`idle`),y;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[1]=y):y=t[1];let[b,x]=(0,Q.useState)(y),S;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=[],t[2]=S):S=t[2];let[C,w]=(0,Q.useState)(S),[T,E]=(0,Q.useState)(null),[D,k]=(0,Q.useState)(!1),j;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(j=[],t[3]=j):j=t[3];let[M,N]=(0,Q.useState)(j),[F,I]=(0,Q.useState)(`idle`),R;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(R=[],t[4]=R):R=t[4];let[z,B]=(0,Q.useState)(R),[V,H]=(0,Q.useState)(`idle`),U=(0,Q.useRef)(!1),W=(0,Q.useRef)(null),G=(0,Q.useRef)(null),{activeDocName:K,activeTarget:ee}=lt(),{pages:q,pageTitles:te,pageMeta:ne,folderPaths:re}=ii(),ie=Ma(),{states:ae,refresh:oe}=_h(),{dispatch:se}=oh(),ce=qm({docName:K,workspace:ie}),le=sp(q,re,te,ne),J=$f(C,new Set(le.map(Ah))),ue=o?.config.projectPath??null,de=o?b.filter(e=>e.path!==ue):[],fe;t[5]!==K||t[6]!==ee?(fe=Sh(ee,K),t[5]=K,t[6]=ee,t[7]=fe):fe=t[7];let pe=fe,he=f===``?[]:fp(le,f,8),ge,ve;t[8]!==a||t[9]!==r?(ge=()=>{let e=function(e){e.key===`k`&&(Wn()?e.metaKey:e.ctrlKey)&&(e.preventDefault(),a(!r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},ve=[a,r],t[8]=a,t[9]=r,t[10]=ge,t[11]=ve):(ge=t[10],ve=t[11]),(0,Q.useEffect)(ge,ve);let xe,Se;t[12]!==c||t[13]!==o||t[14]!==r||t[15]!==oe?(xe=()=>{if(r){if(w(Xf()),oe(),o){let e=!1;return bh(async()=>{let t=await o.project.listRecent();e||x(t)},c({id:`fYKgzG`})),()=>{e=!0}}return}u(``),N([]),I(`idle`),U.current=!1,B([]),H(`idle`)},Se=[r,o,oe,c],t[12]=c,t[13]=o,t[14]=r,t[15]=oe,t[16]=xe,t[17]=Se):(xe=t[16],Se=t[17]),(0,Q.useEffect)(xe,Se);let Ce;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=()=>{W.current&&(W.current.scrollTop=0)},t[18]=Ce):Ce=t[18];let we;t[19]===l?we=t[20]:(we=[l],t[19]=l,t[20]=we),(0,Q.useEffect)(Ce,we);let Te=yp(d,new Set(M.map(kh))),Ee=Te.kind!==`normal`,De=Te.kind===`tag-list`?Te.query:``,Oe=Te.kind===`tag-docs`?Te.tagName:``,ke,Ae;t[21]!==Ee||t[22]!==r?(ke=()=>{if(!r||!Ee||U.current)return;U.current=!0,I(`loading`);let e=!1;return xp().then(t=>{e||(N(t),I(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tags failed`,t),N([]),I(`error`))}),()=>{e=!0}},Ae=[r,Ee],t[21]=Ee,t[22]=r,t[23]=ke,t[24]=Ae):(ke=t[23],Ae=t[24]),(0,Q.useEffect)(ke,Ae);let je=Te.kind===`tag-docs`?Te.tagName:null;(0,Q.useEffect)(()=>{if(!r||je===null){B([]),H(`idle`);return}H(`loading`),B([]);let e=!1;return Sp(je).then(t=>{e||(B(t),H(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tag docs failed`,t),B([]),H(`error`))}),()=>{e=!0}},[r,je]),(0,Q.useEffect)(()=>{if(!r||!f||Ee){h([]),v(`idle`);return}let e=new AbortController;v(`loading`);let t=!1,n=window.setTimeout(()=>{t=!0,e.abort(),h([]),v(`error`)},yh);return gp(f,{signal:e.signal}).then(e=>{window.clearTimeout(n),h(e),v(`success`)}).catch(e=>{window.clearTimeout(n),!(e instanceof Error&&e.name===`AbortError`&&!t)&&(h([]),v(`error`))}),()=>{window.clearTimeout(n),e.abort()}},[r,f,Ee]);let Me;t[25]!==c||t[26]!==a?(Me=(e,t)=>{let n=t===void 0?c({id:`uuoHOU`}):t;a(!1),bh(async()=>{await e()},n)},t[25]=c,t[26]=a,t[27]=Me):Me=t[27];let Ne=Me,Pe;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=function(e){let t={kind:e.kind,path:e.path,lastOpenedAt:new Date().toISOString()},n=Qf(Xf(),t);Zf(n),w(n)},t[28]=Pe):Pe=t[28];let Fe=Pe,Ie;t[29]===a?Ie=t[30]:(Ie=function(e){a(!1),Fe(e),xh(e.path)},t[29]=a,t[30]=Ie);let Le=Ie,Re=!Ee&&f===``&&J.length>0,ze=Eh({searchResults:m,fallbackSearchResults:he,searchStatus:_}),Be=!Ee&&ze.length>0,Ve=!Ee&&f!==``&&_===`loading`&&!Be,Y;t[31]!==c||t[32]!==d||t[33]!==Ee?(Y=!Ee&&_p(c({id:`HdkSiO`}),d,[`create file`]),t[31]=c,t[32]=d,t[33]=Ee,t[34]=Y):Y=t[34];let He=Y,Ue;t[35]!==c||t[36]!==d||t[37]!==Ee?(Ue=!Ee&&_p(c({id:`96G6Re`}),d,[`create folder`]),t[35]=c,t[36]=d,t[37]=Ee,t[38]=Ue):Ue=t[38];let We=Ue,Ge;t[39]!==c||t[40]!==K||t[41]!==d||t[42]!==Ee?(Ge=!Ee&&K!==null&&_p(c({id:`3Fcb0I`}),d,[`graph panel network`]),t[39]=c,t[40]=K,t[41]=d,t[42]=Ee,t[43]=Ge):Ge=t[43];let Ke=Ge,qe;t[44]!==c||t[45]!==d||t[46]!==Ee?(qe=!Ee&&_p(c({id:`fWi7pn`}),d,[`scaffold`,`seed`,`pack`,`starter`]),t[44]=c,t[45]=d,t[46]=Ee,t[47]=qe):qe=t[47];let Je=qe,Ye;t[48]!==c||t[49]!==o||t[50]!==d||t[51]!==Ee?(Ye=!Ee&&o!==null&&_p(c({id:`WPwDin`}),d,[`project`]),t[48]=c,t[49]=o,t[50]=d,t[51]=Ee,t[52]=Ye):Ye=t[52];let Xe=Ye,Qe;t[53]!==c||t[54]!==o||t[55]!==d||t[56]!==Ee?(Qe=!Ee&&o!==null&&_p(c({id:`2Xs2jo`}),d,[`switch project navigator projects`]),t[53]=c,t[54]=o,t[55]=d,t[56]=Ee,t[57]=Qe):Qe=t[57];let $e=Qe,et;t[58]!==c||t[59]!==d||t[60]!==Ee?(et=!Ee&&_p(c({id:`Tz0i8g`}),d,[`preferences config`]),t[58]=c,t[59]=d,t[60]=Ee,t[61]=et):et=t[61];let tt=et,nt;t[62]!==c||t[63]!==d||t[64]!==Ee?(nt=!Ee&&_p(c({id:`62Pc08`}),d,[`claude desktop install cowork`]),t[62]=c,t[63]=d,t[64]=Ee,t[65]=nt):nt=t[65];let rt=nt,it=!Ee&&o!==null&&de.length>0&&(f===``||de.some(e=>_p(`${e.name} ${e.path}`,d,[`open recent project`]))),at=!Ee&&ce!==null&&(f===``||hm.some(e=>{let t=e.displayName;return _p(c({id:`WqLq6M`,values:{displayName:t}}),d,[e.id,`agent handoff`,`open in`])})),ot=Te.kind===`tag-list`?bp(M,Te.query):[],st=Te.kind===`tag-list`&&F!==`loading`&&ot.length===0,ct=Te.kind===`tag-docs`&&V===`success`&&z.length===0,ut=Ee||Re||Be||Ve||He||We||Ke||Je||Xe||$e||tt||rt||it||at,dt;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(dt=function(e){u(`${vp}${e}`)},t[66]=dt):dt=t[66];let ft=dt,pt=Ut,mt;t[67]===c?mt=t[68]:(mt=c({id:`1bDVu5`}),t[67]=c,t[68]=mt);let ht;t[69]===c?ht=t[70]:(ht=c({id:`5GRxoA`}),t[69]=c,t[70]=ht);let gt;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(gt={shouldFilter:!1,className:`[&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4`},t[71]=gt):gt=t[71];let _t;t[72]===c?_t=t[73]:(_t=c({id:`ggs9f8`}),t[72]=c,t[73]=_t);let vt;t[74]!==l||t[75]!==_t?(vt=(0,Z.jsx)(A,{ref:G,value:l,onValueChange:u,placeholder:_t}),t[74]=l,t[75]=_t,t[76]=vt):vt=t[76];let yt;t[77]===Ee?yt=t[78]:(yt=()=>{u(Ee?``:vp),G.current?.focus()},t[77]=Ee,t[78]=yt);let bt=Ee?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,xt;t[79]===bt?xt=t[80]:(xt=vi(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,bt),t[79]=bt,t[80]=xt);let St,Ct;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,Z.jsx)(ye,{className:`size-3.5`}),Ct=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`0rwwOn`})}),t[81]=St,t[82]=Ct):(St=t[81],Ct=t[82]);let wt;t[83]!==Ee||t[84]!==yt||t[85]!==xt?(wt=(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-1.5 border-b px-3 py-2`,children:(0,Z.jsxs)(`button`,{type:`button`,onClick:yt,"data-testid":`command-palette-filter-tag`,"data-active":Ee,"aria-pressed":Ee,className:xt,children:[St,Ct]})}),t[83]=Ee,t[84]=yt,t[85]=xt,t[86]=wt):wt=t[86];let Tt=be,Et;t[87]!==Be||t[88]!==Ve?(Et=Ve&&!Be?(0,Z.jsx)(g,{children:(0,Z.jsx)(s,{id:`WRNXKp`})}):null,t[87]=Be,t[88]=Ve,t[89]=Et):Et=t[89];let Dt=ut?null:(0,Z.jsx)(g,{children:_===`error`?(0,Z.jsx)(s,{id:`pkAft1`}):(0,Z.jsx)(s,{id:`i3f2kh`})}),Ot=Te.kind===`tag-list`?(0,Z.jsxs)(_e,{heading:Te.query?c({id:`evs0iw`,values:{tagListQuery:De}}):c({id:`2QM24L`}),children:[F===`loading`?(0,Z.jsx)(g,{children:(0,Z.jsx)(s,{id:`a_u4ck`})}):null,F===`error`?(0,Z.jsx)(g,{children:(0,Z.jsx)(s,{id:`MZoxVx`})}):null,st?(0,Z.jsx)(g,{children:Te.query?c({id:`X0ttSN`,values:{tagListQuery:De}}):c({id:`JLUTgi`})}):null,ot.map(e=>(0,Z.jsxs)(me,{value:`tag ${e.name}`,onSelect:()=>ft(e.name),"data-testid":`command-palette-tag-${e.name}`,children:[(0,Z.jsx)(ye,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:(0,Z.jsx)(s,{id:`fVcm9t`,values:{0:e.count}})})]},`tag:${e.name}`))]}):null,kt=Te.kind===`tag-docs`?(0,Z.jsxs)(_e,{heading:c({id:`hGmuTc`,values:{tagDocsName:Oe}}),children:[V===`loading`?(0,Z.jsx)(g,{children:(0,Z.jsx)(s,{id:`pWbsW6`})}):null,V===`error`?(0,Z.jsx)(g,{children:(0,Z.jsx)(s,{id:`48uGTI`})}):null,ct?(0,Z.jsx)(g,{children:c({id:`NIWAux`,values:{tagDocsName:Oe}})}):null,z.map(e=>{let t=e.title||e.docName.split(`/`).pop()||e.docName,n=e.matchingTags.filter(e=>e!==Te.tagName).map(Oh).join(`, `);return(0,Z.jsxs)(me,{value:`tag-doc ${e.docName}`,onSelect:()=>{a(!1),xh(e.docName)},"data-testid":`command-palette-tag-doc-${e.docName}`,className:`items-start`,children:[(0,Z.jsx)(P,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.docName}),e.matchingTags.length>0&&e.matchingTags.some(e=>e!==Te.tagName)?(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-[11px]`,children:(0,Z.jsx)(s,{id:`CvsD6Y`,values:{viaTags:n}})}):null]})]},`tag-doc:${e.docName}`)})]}):null,At=Re?(0,Z.jsx)(_e,{heading:c({id:`MmDDWK`}),children:J.map(e=>(0,Z.jsx)(Ch,{entry:e,onSelect:()=>Le(e)},Yf(e.kind,e.path)))}):null,jt;t[90]!==c||t[91]!==K||t[92]!==a||t[93]!==E||t[94]!==k||t[95]!==He||t[96]!==We||t[97]!==Ke||t[98]!==Je?(jt=He||We||Ke||Je?(0,Z.jsxs)(_e,{heading:c({id:`45MZFs`}),children:[He?(0,Z.jsxs)(me,{value:`new file create file`,onSelect:()=>{a(!1),E(`file`)},"data-testid":`command-palette-new-file`,children:[(0,Z.jsx)(lc,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`HdkSiO`})})]}):null,We?(0,Z.jsxs)(me,{value:`new folder create folder`,onSelect:()=>{a(!1),E(`folder`)},"data-testid":`command-palette-new-folder`,children:[(0,Z.jsx)(mc,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`96G6Re`})})]}):null,Ke?(0,Z.jsxs)(me,{value:`open graph graph panel network`,onSelect:()=>{K&&(a(!1),Ep(`graph`))},"data-testid":`command-palette-open-graph`,children:[(0,Z.jsx)(Dc,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`3Fcb0I`})})]}):null,Je?(0,Z.jsxs)(me,{value:`initialize starter pack scaffold seed`,onSelect:()=>{a(!1),k(!0)},"data-testid":`command-palette-initialize-starter-pack`,children:[(0,Z.jsx)(kc,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`fWi7pn`})})]}):null]}):null,t[90]=c,t[91]=K,t[92]=a,t[93]=E,t[94]=k,t[95]=He,t[96]=We,t[97]=Ke,t[98]=Je,t[99]=jt):jt=t[99];let Mt=at?(0,Z.jsx)(_e,{heading:c({id:`O7_W_a`}),children:hm.filter(e=>{let t=e.displayName;return _p(c({id:`WqLq6M`,values:{displayName:t}}),d,[e.id,`agent handoff`,`open in`])}).map(e=>{let t=ae[e.id],n=t.installed===!0&&ce!==null,r=e.displayName,i=t.installed===null?c({id:`IA6JW2`}):t.installed===!1?c({id:`5SwVv1`}):null,o=c(i?{id:`1ZpfyB`,values:{displayName:r,hint:i}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Z.jsxs)(me,{value:`send to ai ${e.displayName} ${e.id} agent open in`,disabled:!n,onSelect:()=>{!n||!ce||(a(!1),se(e.id,ce))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":o,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`WqLq6M`,values:{displayName:r}})}),i?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:i}):null]},e.id)})}):null,Nt;t[100]!==c||t[101]!==o||t[102]!==a||t[103]!==Ne||t[104]!==rt||t[105]!==Xe||t[106]!==$e||t[107]!==tt?(Nt=Xe||$e||tt||rt?(0,Z.jsxs)(_e,{heading:c({id:`e0NrBM`}),children:[Xe&&o?(0,Z.jsxs)(me,{value:`open folder on disk project`,onSelect:()=>Ne(async()=>{let e=await o.dialog.openFolder();e&&await o.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})}),"data-testid":`command-palette-open-folder`,children:[(0,Z.jsx)(L,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`WPwDin`})}),(0,Z.jsx)(O,{children:`⌘O`})]}):null,$e&&o?(0,Z.jsxs)(me,{value:`switch-project navigator projects`,onSelect:()=>Ne(()=>o.navigator.open(),c({id:`jol95m`})),"data-testid":`command-palette-switch-project`,children:[(0,Z.jsx)(Ht,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`2Xs2jo`})}),(0,Z.jsx)(O,{children:`⌘⇧N`})]}):null,tt?(0,Z.jsxs)(me,{value:`settings preferences config`,onSelect:()=>{a(!1),window.location.hash!==`#settings`&&(window.location.hash=gm)},"data-testid":`command-palette-settings`,children:[(0,Z.jsx)(Uc,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`Tz0i8g`})}),(0,Z.jsx)(O,{children:`⌘,`})]}):null,rt?(0,Z.jsxs)(me,{value:`install claude desktop cowork app`,onSelect:()=>{a(!1),window.location.hash=`#install-claude-desktop`},"data-testid":`command-palette-install-claude-desktop`,children:[(0,Z.jsx)(bo,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`62Pc08`})})]}):null]}):null,t[100]=c,t[101]=o,t[102]=a,t[103]=Ne,t[104]=rt,t[105]=Xe,t[106]=$e,t[107]=tt,t[108]=Nt):Nt=t[108];let Pt=it&&o?(0,Z.jsx)(_e,{heading:c({id:`3iyGWF`}),children:de.filter(e=>_p(`${e.name} ${e.path}`,d,[`open recent project`])).slice(0,10).map(e=>(0,Z.jsxs)(me,{value:`${e.name} ${e.path} recent project`,disabled:e.missing,onSelect:()=>Ne(()=>o.project.open({path:e.path,target:`new-window`,entryPoint:`recents`}),c({id:`SUOoXn`})),"data-testid":`command-palette-recent-${e.path}`,className:`items-start`,children:[(0,Z.jsx)(Ze,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),(0,Z.jsxs)(`span`,{className:`truncate text-muted-foreground text-xs`,children:[e.path,e.missing?(0,Z.jsxs)(Z.Fragment,{children:[` `,(0,Z.jsx)(s,{id:`ls1N1w`})]}):null]})]})]},e.path))}):null,Ft=Be?(0,Z.jsx)(_e,{heading:c({id:`A1taO8`}),children:ze.map(e=>(0,Z.jsx)(Ch,{entry:e,query:f,onSelect:()=>Le(e)},Yf(e.kind,e.path)))}):null,It;t[109]!==Tt||t[110]!==Et||t[111]!==Dt||t[112]!==Ot||t[113]!==kt||t[114]!==At||t[115]!==jt||t[116]!==Mt||t[117]!==Nt||t[118]!==Pt||t[119]!==Ft?(It=(0,Z.jsxs)(Tt,{ref:W,className:`subtle-scrollbar`,children:[Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft]}),t[109]=Tt,t[110]=Et,t[111]=Dt,t[112]=Ot,t[113]=kt,t[114]=At,t[115]=jt,t[116]=Mt,t[117]=Nt,t[118]=Pt,t[119]=Ft,t[120]=It):It=t[120];let Lt;t[121]!==pt||t[122]!==a||t[123]!==r||t[124]!==mt||t[125]!==ht||t[126]!==gt||t[127]!==vt||t[128]!==wt||t[129]!==It?(Lt=(0,Z.jsxs)(pt,{open:r,onOpenChange:a,title:mt,description:ht,className:`sm:max-w-2xl`,commandProps:gt,children:[vt,wt,It]}),t[121]=pt,t[122]=a,t[123]=r,t[124]=mt,t[125]=ht,t[126]=gt,t[127]=vt,t[128]=wt,t[129]=It,t[130]=Lt):Lt=t[130];let Rt=T===`file`,zt;t[131]===E?zt=t[132]:(zt=e=>{e||E(null)},t[131]=E,t[132]=zt);let Bt;t[133]!==pe||t[134]!==Rt||t[135]!==zt?(Bt=(0,Z.jsx)(zp,{open:Rt,onOpenChange:zt,kind:`file`,initialDir:pe}),t[133]=pe,t[134]=Rt,t[135]=zt,t[136]=Bt):Bt=t[136];let Vt=T===`folder`,Wt;t[137]===E?Wt=t[138]:(Wt=e=>{e||E(null)},t[137]=E,t[138]=Wt);let Gt;t[139]!==pe||t[140]!==Vt||t[141]!==Wt?(Gt=(0,Z.jsx)(zp,{open:Vt,onOpenChange:Wt,kind:`folder`,initialDir:pe}),t[139]=pe,t[140]=Vt,t[141]=Wt,t[142]=Gt):Gt=t[142];let Kt;t[143]!==D||t[144]!==k?(Kt=(0,Z.jsx)(lm,{open:D,onOpenChange:k}),t[143]=D,t[144]=k,t[145]=Kt):Kt=t[145];let qt;return t[146]!==Lt||t[147]!==Bt||t[148]!==Gt||t[149]!==Kt?(qt=(0,Z.jsxs)(Z.Fragment,{children:[Lt,Bt,Gt,Kt]}),t[146]=Lt,t[147]=Bt,t[148]=Gt,t[149]=Kt,t[150]=qt):qt=t[150],qt}function Oh(e){return`#${e}`}function kh(e){return e.name}function Ah(e){return Yf(e.kind,e.path)}var jh=500;function Mh(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function Nh(e){if(e===null)return X._({id:`Ua78MH`});if(e.kind===`null-collab`)return X._({id:`TJnkyf`});if(e.code===`network`)return X._({id:`aoa6xA`});if(e.code===`invalid-body`)return X._({id:`FRYB1Q`});let t=e.code;return X._({id:`4nj6n8`,values:{code:t}})}function Ph(){let e=(0,$.c)(18),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=lt(),[a,o]=(0,Q.useState)(!1),c,l;e[0]!==n||e[1]!==t?(c=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),jh);return()=>clearTimeout(e)},l=[t,n],e[0]=n,e[1]=t,e[2]=c,e[3]=l):(c=e[2],l=e[3]),(0,Q.useEffect)(c,l);let u=Mh(t,n,a);if(u===`hidden`)return null;if(u===`terminal`){let t;e[4]===r?t=e[5]:(t=Nh(r),e[4]=r,e[5]=t);let n=t,a;e[6]===n?a=e[7]:(a={errorDetail:n},e[6]=n,e[7]=a);let o;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(o={0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`}),1:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})},e[8]=o):o=e[8];let c;e[9]===a?c=e[10]:(c=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`noH1JX`,values:a,components:o})}),e[9]=a,e[10]=c);let l;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(s,{id:`6gRgw8`}),e[11]=l):l=e[11];let u;e[12]===i?u=e[13]:(u=(0,Z.jsx)(`button`,{type:`button`,onClick:i,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900`,children:l}),e[12]=i,e[13]=u);let d;return e[14]!==c||e[15]!==u?(d=(0,Z.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[c,u]}),e[14]=c,e[15]=u,e[16]=d):d=e[16],d}let d;return e[17]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md`,children:(0,Z.jsx)(s,{id:`UYcGIW`})}),e[17]=d):d=e[17],d}async function Fh(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null),n=t.status,r=t.statusText;throw Error(Xn(e)??X._({id:`lHwYMr`,values:{status:n,statusText:r}}))}return(await t.json()).docs??[]}function Ih(){let e=(0,$.c)(18),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`idle`},e[0]=a):a=e[0];let[o,c]=(0,Q.useState)(a),l=(0,Q.useRef)(0),u,d;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{let e=function(e){let t=e.detail;if(!t||typeof t.value!=`string`)return;let r=l.current+=1;i(t.value),n(!0),c({kind:`loading`}),Fh(t.value).then(e=>{l.current===r&&c({kind:`ready`,docs:e})}).catch(e=>{l.current===r&&c({kind:`error`,message:e instanceof Error?e.message:String(e)})})};return document.addEventListener(ot,e),()=>document.removeEventListener(ot,e)},d=[],e[1]=u,e[2]=d):(u=e[1],d=e[2]),(0,Q.useEffect)(u,d);let f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=function(e){n(!1),window.location.assign(ni(e))},e[3]=f):f=e[3];let p=f,m=r??``,h;e[4]===m?h=e[5]:(h={tagName:m},e[4]=m,e[5]=h);let g;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g={0:(0,Z.jsx)(`span`,{className:`font-mono`})},e[6]=g):g=e[6];let _;e[7]===h?_=e[8]:(_=(0,Z.jsx)(Ro,{children:(0,Z.jsx)(ko,{children:(0,Z.jsx)(s,{id:`7H4UHD`,values:h,components:g})})}),e[7]=h,e[8]=_);let v=r??``,y;e[9]!==o||e[10]!==v?(y=(0,Z.jsx)(Fo,{children:(0,Z.jsx)(Lh,{fetchState:o,tag:v,onSelectDoc:p})}),e[9]=o,e[10]=v,e[11]=y):y=e[11];let b;e[12]!==_||e[13]!==y?(b=(0,Z.jsxs)(No,{children:[_,y]}),e[12]=_,e[13]=y,e[14]=b):b=e[14];let x;return e[15]!==t||e[16]!==b?(x=(0,Z.jsx)(zo,{open:t,onOpenChange:n,children:b}),e[15]=t,e[16]=b,e[17]=x):x=e[17],x}function Lh(e){let t=(0,$.c)(15),{fetchState:n,tag:r,onSelectDoc:i}=e;if(n.kind===`idle`||n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-loading`,children:(0,Z.jsx)(s,{id:`yQE2r9`})}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`p`,{className:`text-destructive text-sm`,"data-testid":`tag-dialog-error`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.docs.length===0){let e;t[3]===r?e=t[4]:(e={tag:r},t[3]=r,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n={0:(0,Z.jsx)(`span`,{className:`font-mono`})},t[5]=n):n=t[5];let i;return t[6]===e?i=t[7]:(i=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-empty`,children:(0,Z.jsx)(s,{id:`lAiyU_`,values:e,components:n})}),t[6]=e,t[7]=i),i}let a;if(t[8]!==n.docs||t[9]!==i){let e;t[11]===i?e=t[12]:(e=e=>{let t=e.matchingTags??[];return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`w-full rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring`,onClick:()=>i(e.docName),"data-testid":`tag-dialog-row`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium`,children:e.title}),e.docName===e.title?null:(0,Z.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.docName}),t.length>0?(0,Z.jsx)(`span`,{className:`mt-1 flex flex-wrap items-center gap-1`,"data-testid":`tag-dialog-row-matches`,children:t.map(Rh)}):null]})},e.docName)},t[11]=i,t[12]=e),a=n.docs.map(e),t[8]=n.docs,t[9]=i,t[10]=a}else a=t[10];let o;return t[13]===a?o=t[14]:(o=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,"data-testid":`tag-dialog-list`,children:a}),t[13]=a,t[14]=o),o}function Rh(e){return(0,Z.jsxs)(`span`,{"data-testid":`tag-dialog-row-match`,"data-tag":e,className:`tag pointer-events-none text-xs`,children:[`#`,e]},e)}var zh=`raw-mdx-nav`,Bh=`ok-editor-mode-v1`,Vh=[`wysiwyg`,`source`],Hh=`wysiwyg`;function Uh(e){return Vh.includes(e)}function Wh(e=localStorage){try{let t=e.getItem(Bh);if(t===null)return Hh;if(Uh(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return Hh}function Gh(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return Uh(n)?n:Wh(t)}function Kh(e,t=localStorage){try{return t.setItem(Bh,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function qh(){let e=(0,$.c)(3),[t,n]=(0,Q.useState)(Gh),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Kh(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Jh(e){let t=(0,$.c)(25),{open:n,onResolved:r}=e,{_:a}=i(),o=La(),c;t[0]!==a||t[1]!==r||t[2]!==o?(c=function(e){if(o===null){Vo.error(a({id:`fiMNLl`}));return}let t=o(e);if(!t.ok){let n=t.error;Vo.error(a(e?{id:`FUMerq`,values:{detail:n}}:{id:`0t0bbC`,values:{detail:n}}));return}r()},t[0]=a,t[1]=r,t[2]=o,t[3]=c):c=t[3];let l=c,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Ro,{children:(0,Z.jsx)(so,{})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Za,{}),t[5]=d):d=t[5];let f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsxs)(Fo,{children:[d,(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`ZLQol-`,components:{0:(0,Z.jsx)(`span`,{className:`font-medium`})}})})]}),t[6]=f):f=t[6];let p;t[7]===l?p=t[8]:(p=()=>l(!1),t[7]=l,t[8]=p);let m=o===null,h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(s,{id:`IKoTAC`}),t[9]=h):h=t[9];let g;t[10]!==p||t[11]!==m?(g=(0,Z.jsx)(Ti,{variant:`outline`,className:`uppercase font-mono`,onClick:p,disabled:m,children:h}),t[10]=p,t[11]=m,t[12]=g):g=t[12];let _;t[13]===l?_=t[14]:(_=()=>l(!0),t[13]=l,t[14]=_);let v=o===null,y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(s,{id:`XU0OXn`}),t[15]=y):y=t[15];let b;t[16]!==v||t[17]!==_?(b=(0,Z.jsx)(Ti,{onClick:_,disabled:v,children:y}),t[16]=v,t[17]=_,t[18]=b):b=t[18];let x;t[19]!==b||t[20]!==g?(x=(0,Z.jsxs)(No,{className:`sm:max-w-lg`,showCloseButton:!1,children:[u,f,(0,Z.jsxs)(Io,{children:[g,b]})]}),t[19]=b,t[20]=g,t[21]=x):x=t[21];let S;return t[22]!==n||t[23]!==x?(S=(0,Z.jsx)(zo,{open:n,onOpenChange:Yh,children:x}),t[22]=n,t[23]=x,t[24]=S):S=t[24],S}function Yh(){}var Xh=5;async function Zh(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=zn.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Ct(X._({id:`XopE_I`,values:{status:r}}),{status:r})}let r=ti.safeParse(n);if(!r.success)throw new Ct(X._({id:`lZAiSP`}),{status:t.status});return r.data.backlinks}async function Qh(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=zn.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Ct(X._({id:`GemPfn`,values:{status:r}}),{status:r})}let r=Zn.safeParse(n);if(!r.success)throw new Ct(X._({id:`2YZwPB`}),{status:t.status});return r.data.forwardLinks}function $h(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}function eg(e){window.location.hash=ni(e)}function tg(e){let t=(0,$.c)(9),{title:n,count:r,isLoading:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(St,{className:`size-3.5 text-muted-foreground transition-transform group-data-[state=closed]:-rotate-90`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[a,(0,Z.jsx)(mn,{children:n})]}),t[1]=n,t[2]=o);let s;t[3]!==r||t[4]!==i?(s=!i&&(0,Z.jsx)(pn,{children:r}),t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(Go,{className:`group flex w-full cursor-pointer items-center justify-between px-5 py-3 text-left transition-colors hover:bg-muted/40`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function ng(e){let t=(0,$.c)(10),{total:n,expanded:r,onToggle:i}=e;if(n<=Xh)return null;let a=n-Xh,o;t[0]===r?o=t[1]:(o=r?(0,Z.jsx)(St,{className:`size-3`}):(0,Z.jsx)(Ho,{className:`size-3`}),t[0]=r,t[1]=o);let c;t[2]!==r||t[3]!==a?(c=r?(0,Z.jsx)(s,{id:`6fGjTz`}):(0,Z.jsx)(s,{id:`ZptNUh`,values:{hidden:a}}),t[2]=r,t[3]=a,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==i||t[7]!==o||t[8]!==c?(l=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,className:`mt-2 inline-flex cursor-pointer items-center gap-1 px-3 text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:i,children:[o,c]}),t[5]=r,t[6]=i,t[7]=o,t[8]=c,t[9]=l):l=t[9],l}function rg(e){let t=(0,$.c)(35),{icon:n,iconColorClass:r,rowTooltip:i,title:a,path:o,anchor:c,snippet:l,titleHover:u,ariaLabel:d,href:f,external:p,disabled:m,onClick:h}=e,g=o!==void 0&&o!==a,_=r??`text-muted-foreground`,v;t[0]===_?v=t[1]:(v=vi(`mt-0.5 shrink-0`,_),t[0]=_,t[1]=v);let y;t[2]!==n||t[3]!==v?(y=(0,Z.jsx)(`span`,{className:v,children:n}),t[2]=n,t[3]=v,t[4]=y):y=t[4];let b=y,x;t[5]!==d||t[6]!==m||t[7]!==p||t[8]!==f||t[9]!==h||t[10]!==a||t[11]!==u?(x=f?(0,Z.jsxs)(`a`,{href:f,target:p?`_blank`:void 0,rel:p?`noopener noreferrer`:void 0,"aria-label":d,title:u,onClick:h,className:`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,children:[a,p?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` `,(0,Z.jsx)(s,{id:`dbtjJh`})]}):null]}):(0,Z.jsx)(`button`,{type:`button`,"aria-label":d,title:u,disabled:m,onClick:h,className:vi(`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,`cursor-pointer bg-transparent p-0 disabled:cursor-not-allowed disabled:opacity-60`),children:a}),t[5]=d,t[6]=m,t[7]=p,t[8]=f,t[9]=h,t[10]=a,t[11]=u,t[12]=x):x=t[12];let S=x,C;t[13]===b?C=t[14]:(C=(0,Z.jsx)(`div`,{className:`mt-px flex items-center`,children:b}),t[13]=b,t[14]=C);let w;t[15]!==c||t[16]!==o||t[17]!==g?(w=g?(0,Z.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[o,c?(0,Z.jsxs)(`span`,{className:`ml-1`,children:[`· #`,c]}):null]}):null,t[15]=c,t[16]=o,t[17]=g,t[18]=w):w=t[18];let T;t[19]===l?T=t[20]:(T=l?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground`,children:l}):null,t[19]=l,t[20]=T);let E;t[21]!==S||t[22]!==w||t[23]!==T?(E=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5 text-1sm`,children:[S,w,T]}),t[21]=S,t[22]=w,t[23]=T,t[24]=E):E=t[24];let D;t[25]!==C||t[26]!==E?(D=(0,Z.jsxs)(`div`,{className:`group relative flex items-start gap-2.5 rounded-md px-3 py-2.5 transition-colors hover:bg-muted/80`,children:[C,E]}),t[25]=C,t[26]=E,t[27]=D):D=t[27];let O=D;if(i){let e;t[28]===O?e=t[29]:(e=(0,Z.jsx)(Kn,{asChild:!0,children:O}),t[28]=O,t[29]=e);let n;t[30]===i?n=t[31]:(n=(0,Z.jsx)(wn,{side:`top`,children:i}),t[30]=i,t[31]=n);let r;return t[32]!==e||t[33]!==n?(r=(0,Z.jsxs)(Ir,{children:[e,n]}),t[32]=e,t[33]=n,t[34]=r):r=t[34],r}return O}function ig(e){let t=(0,$.c)(37),{docName:n}=e,{_:r}=i(),{folderPaths:a,pages:o,loading:c}=ii(),l,u;t[0]===n?(l=t[1],u=t[2]):(l=[`backlinks`,n],u=()=>Zh(n),t[0]=n,t[1]=l,t[2]=u);let d;t[3]!==n||t[4]!==c||t[5]!==o?(d=!c&&o.has(n),t[3]=n,t[4]=c,t[5]=o,t[6]=d):d=t[6];let f;t[7]!==l||t[8]!==u||t[9]!==d?(f={queryKey:l,queryFn:u,enabled:d},t[7]=l,t[8]=u,t[9]=d,t[10]=f):f=t[10];let{data:p,isLoading:m,error:h}=en(f),g;t[11]===p?g=t[12]:(g=p===void 0?[]:p,t[11]=p,t[12]=g);let _=g,[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(n);b!==n&&(x(n),y(!1));let S;t[13]!==_||t[14]!==v?(S=v?_:_.slice(0,Xh),t[13]=_,t[14]=v,t[15]=S):S=t[15];let C=S,w;t[16]===r?w=t[17]:(w=r({id:`9NJWgv`}),t[16]=r,t[17]=w);let T;t[18]!==_.length||t[19]!==m||t[20]!==w?(T=(0,Z.jsx)(tg,{title:w,count:_.length,isLoading:m}),t[18]=_.length,t[19]=m,t[20]=w,t[21]=T):T=t[21];let E;t[22]!==r||t[23]!==_.length||t[24]!==h||t[25]!==v||t[26]!==a||t[27]!==m||t[28]!==o||t[29]!==C?(E=h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Qt,{children:h instanceof Error?h.message:r({id:`Xet9MX`})})}):_.length===0&&!m?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(on,{children:(0,Z.jsx)(s,{id:`rVxu1k`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:C.map((e,t)=>{let n=Es(e.source,{pages:o,folderPaths:a});return(0,Z.jsx)(rg,{icon:(0,Z.jsx)(yt,{className:`size-3.5`}),title:e.title,path:$h(e.source),titleHover:e.source,anchor:e.anchor,snippet:e.snippet,href:ni(n.hashDocName,e.anchor)},`${e.source}-${t}`)})}),(0,Z.jsx)(ng,{total:_.length,expanded:v,onToggle:()=>y(ag)})]}),t[22]=r,t[23]=_.length,t[24]=h,t[25]=v,t[26]=a,t[27]=m,t[28]=o,t[29]=C,t[30]=E):E=t[30];let D;t[31]!==m||t[32]!==E?(D=(0,Z.jsx)(Wo,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":m,children:E})}),t[31]=m,t[32]=E,t[33]=D):D=t[33];let O;return t[34]!==D||t[35]!==T?(O=(0,Z.jsxs)(Ko,{defaultOpen:!0,children:[T,D]}),t[34]=D,t[35]=T,t[36]=O):O=t[36],O}function ag(e){return!e}function og(e){let t=(0,$.c)(48),{docName:n}=e,{_:r}=i(),{addPage:a,folderPaths:o,pages:c,pagesBySlug:l,loading:u}=ii(),d,f;t[0]===n?(d=t[1],f=t[2]):(d=[`forward-links`,n],f=()=>Qh(n),t[0]=n,t[1]=d,t[2]=f);let p;t[3]!==n||t[4]!==c||t[5]!==u?(p=!u&&c.has(n),t[3]=n,t[4]=c,t[5]=u,t[6]=p):p=t[6];let h;t[7]!==d||t[8]!==f||t[9]!==p?(h={queryKey:d,queryFn:f,enabled:p},t[7]=d,t[8]=f,t[9]=p,t[10]=h):h=t[10];let{data:g,isLoading:_,error:v}=en(h),y;t[11]===g?y=t[12]:(y=g===void 0?[]:g,t[11]=g,t[12]=y);let b=y,[x,S]=(0,Q.useState)(null),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(n);T!==n&&(E(n),w(!1),S(null));let D;t[13]!==C||t[14]!==b?(D=C?b:b.slice(0,Xh),t[13]=C,t[14]=b,t[15]=D):D=t[15];let O=D,k;t[16]!==r||t[17]!==a||t[18]!==x?(k=async function(e,t){if(!x){S(t);try{await ie(e,{addPage:a,onCreated:eg}),S(null)}catch(e){let t=e;Vo.error(t instanceof Error?t.message:r({id:`tfi40B`})),S(null)}}},t[16]=r,t[17]=a,t[18]=x,t[19]=k):k=t[19];let A=k,j;t[20]!==r||t[21]!==x||t[22]!==o||t[23]!==A||t[24]!==c||t[25]!==l||t[26]!==u?(j=function(e){let{title:t}=e;if(e.kind===`external`){let t=e.title===e.url;return(0,Z.jsx)(rg,{icon:(0,Z.jsx)(Co,{className:`size-3.5`}),rowTooltip:r({id:`XDzAnp`}),title:e.title,path:t?void 0:e.url,titleHover:e.url,snippet:e.snippet,href:e.url,external:!0},`ext:${e.url}`)}let n=m(e.docName,{pages:c,folderPaths:o,pagesBySlug:l}),i=!u&&n.kind===`create`,a=!u&&n.kind===`navigate`&&n.displayState===`folder`,s=$h(e.docName),d=e.title===e.docName?s:e.title,f=`doc:${e.docName}:${e.anchor??``}`,p=ni(n.kind===`navigate`?n.hashDocName:e.docName,e.anchor);if(i&&n.kind===`create`){let i={initialDir:n.initialDir,suggestedName:n.suggestedName};return(0,Z.jsx)(rg,{icon:(0,Z.jsx)(pi,{className:`size-3.5`}),iconColorClass:`text-amber-600 dark:text-amber-400`,rowTooltip:r(x===f?{id:`kj9pAE`}:{id:`IQPyrD`}),ariaLabel:r(x===f?{id:`un8kBM`,values:{linkTitle:t}}:{id:`jEdF24`,values:{linkTitle:t}}),title:d,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,disabled:x!==null,onClick:()=>void A(i,f)},f)}return a&&n.kind===`navigate`?(0,Z.jsx)(rg,{icon:(0,Z.jsx)(hc,{className:`size-3.5`}),iconColorClass:`text-sky-600 dark:text-sky-400`,ariaLabel:r({id:`P6lAT3`,values:{linkTitle:t}}),title:d,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:p},f):(0,Z.jsx)(rg,{icon:(0,Z.jsx)(yt,{className:`size-3.5`}),title:d,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:p},f)},t[20]=r,t[21]=x,t[22]=o,t[23]=A,t[24]=c,t[25]=l,t[26]=u,t[27]=j):j=t[27];let M=j,N;t[28]===r?N=t[29]:(N=r({id:`O0Z2Xr`}),t[28]=r,t[29]=N);let P;t[30]!==_||t[31]!==b.length||t[32]!==N?(P=(0,Z.jsx)(tg,{title:N,count:b.length,isLoading:_}),t[30]=_,t[31]=b.length,t[32]=N,t[33]=P):P=t[33];let F;t[34]!==r||t[35]!==v||t[36]!==C||t[37]!==_||t[38]!==b.length||t[39]!==M||t[40]!==O?(F=v?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Qt,{children:v instanceof Error?v.message:r({id:`pZAs1T`})})}):b.length===0&&!_?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(on,{children:(0,Z.jsx)(s,{id:`roiUQQ`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:O.map(M)}),(0,Z.jsx)(ng,{total:b.length,expanded:C,onToggle:()=>w(sg)})]}),t[34]=r,t[35]=v,t[36]=C,t[37]=_,t[38]=b.length,t[39]=M,t[40]=O,t[41]=F):F=t[41];let I;t[42]!==_||t[43]!==F?(I=(0,Z.jsx)(Wo,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":_,children:F})}),t[42]=_,t[43]=F,t[44]=I):I=t[44];let L;return t[45]!==P||t[46]!==I?(L=(0,Z.jsxs)(Ko,{defaultOpen:!0,children:[P,I]}),t[45]=P,t[46]=I,t[47]=L):L=t[47],L}function sg(e){return!e}function cg(e){let t=(0,$.c)(11),{docName:n,className:r}=e,i=r===void 0?``:r,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(og,{docName:n}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(to,{}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(ig,{docName:n}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,Z.jsxs)(un,{className:`px-0 py-0`,children:[a,o,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==c?(l=(0,Z.jsx)(hn,{className:i,children:c}),t[8]=i,t[9]=c,t[10]=l):l=t[10],l}var lg=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends lg{};function ug(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function dg(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function fg(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function pg(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function mg(e,t){return fg(e,t,``)}function hg(e,t){return pg(e,t,``)}function gg(e,t){return t.slice(0,_g(e,t))}function _g(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function vg(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function yg(e,t){if(t)return xg(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function bg(e,t){if(t)return xg(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function xg(e,t){if(!t)return[bg(e),yg(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=vg(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var Sg=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,Cg=RegExp(`[${Sg}]+|\\s+|[^${Sg}]`,`ug`);new class extends lg{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=vg(e,r)}else n=e.match(Cg)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&wg(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&wg(n,i,r,null,t.intlSegmenter),e}};function wg(e,t,n,r,i){if(t&&n){let[a,o]=xg(t.value,i),[s,c]=xg(n.value,i);if(e){let r=ug(a,s);e.value=pg(e.value,s,r),t.value=mg(t.value,r),n.value=mg(n.value,r)}if(r){let e=dg(o,c);r.value=fg(r.value,c,e),t.value=hg(t.value,e),n.value=hg(n.value,e)}}else if(n){if(e){let e=bg(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=bg(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=bg(r.value,i),[a,o]=xg(t.value,i),s=ug(n,a);t.value=mg(t.value,s);let c=dg(mg(n,s),o);t.value=hg(t.value,c),r.value=fg(r.value,n,c),e.value=pg(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=bg(r.value,i),n=gg(yg(t.value,i),e);t.value=hg(t.value,n)}else if(e){let n=gg(yg(e.value,i),bg(t.value,i));t.value=mg(t.value,n)}}new class extends lg{tokenize(e){let t=RegExp(`(\\r?\\n)|[${Sg}]+|[^\\S\\n\\r]+|[^${Sg}]`,`ug`);return e.match(t)||[]}};var Tg=new class extends lg{constructor(){super(...arguments),this.tokenize=Dg}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
13
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
14
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
15
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
16
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function Eg(e,t,n){return Tg.diff(e,t,n)}function Dg(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
17
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function Og(e){return e==`.`||e==`!`||e==`?`}new class extends lg{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(Og(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends lg{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends lg{constructor(){super(...arguments),this.tokenize=Dg}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(kg(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function kg(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=kg(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=kg(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends lg{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var Ag={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function jg(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;Eg(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(Eg(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||Fg(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
18
|
+
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function Mg(e,t){if(t||=Ag,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>Mg(e,t)).join(`
|
|
19
|
+
`)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
20
|
+
`)+`
|
|
21
|
+
`}function Ng(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;jg(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?Mg(e,o.headerOptions):void 0)}}))}else{let s=jg(e,t,n,r,i,a,o);return s?Mg(s,o?.headerOptions):void 0}}function Pg(e,t,n,r,i,a){return Ng(e,e,t,n,r,i,a)}function Fg(e){let t=e.endsWith(`
|
|
22
|
+
`),n=e.split(`
|
|
23
|
+
`).map(e=>e+`
|
|
24
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Ig(e,t){return`${e}\u0000${t}`}function Lg(e,t,n){let r=sr(e).body,i=sr(t).body;return r===i?``:Pg(n,r,i,``,``,{context:3})}function Rg(e,t,n){let r=(0,$.c)(8),{activeProvider:i}=lt(),a;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={status:`idle`,diff:null},r[0]=a):a=r[0];let[o,s]=(0,Q.useState)(a),c=(0,Q.useRef)(i),l;r[1]===i?l=r[2]:(l=()=>{c.current=i},r[1]=i,r[2]=l),(0,Q.useEffect)(l);let u,d;return r[3]!==n||r[4]!==t||r[5]!==e?(u=()=>{if(!e){s({status:`idle`,diff:null});return}let r=e,i=!1;return s({status:`loading`,diff:null}),(async function(){try{let e=Ig(t,r),a=n.get(e);if(a===void 0){let o=await fetch(`/api/history/${r}?docName=${encodeURIComponent(t)}`);if(i)return;if(!o.ok){s({status:`error`,diff:null});return}let c=await o.json();if(i)return;a=c.content??``,n.set(e,a)}if(i)return;let o=c.current?.document.getText(`source`).toString()??``,l=Lg(a,o,t);if(i)return;s({status:`ready`,diff:l})}catch(e){i||(console.error(`[timeline-diff] failed to load entry diff`,{sha:r,docName:t,err:e}),s({status:`error`,diff:null}))}})(),()=>{i=!0}},d=[e,t,n],r[3]=n,r[4]=t,r[5]=e,r[6]=u,r[7]=d):(u=r[6],d=r[7]),(0,Q.useEffect)(u,d),o}var zg=(0,Q.lazy)(async()=>({default:(await n(()=>import(`./ActivityPanelDiffView-LNHry3BJ.js`),__vite__mapDeps([16,1,6,17]),import.meta.url)).ActivityPanelDiffView}));function Bg(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return X._({id:`xOTzt5`});if(r<3600){let e=Math.floor(r/60);return X._({id:`UyROxs`,values:{mins:e}})}if(r<86400){let e=Math.floor(r/3600);return X._({id:`wXO4Tg`,values:{hrs:e}})}if(r<86400*2)return X._({id:`rQRrkB`});let i=Math.floor(r/86400);return i<7?X._({id:`6u9LvN`,values:{days:i}}):t.toLocaleDateString()}function Vg(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Hg(e){return e.slice(0,7)}function Ug(e){return e.type===`upstream`?X._({id:`K_vT1F`}):e.contributors.length===1?e.contributors[0].name:e.contributors.length>1?e.contributors.map(e=>e.name).join(`, `):e.author===`openknowledge-server`||e.author===`server`?X._({id:`B2DrPb`}):e.author}function Wg(e){let t=(0,$.c)(17),n,r;if(t[0]===e?(n=t[1],r=t[2]):({icon:n,...r}=e,t[0]=e,t[1]=n,t[2]=r),n===`claude`){let e;return t[3]===r?e=t[4]:(e=(0,Z.jsx)(Ai,{...r}),t[3]=r,t[4]=e),e}if(n===`cursor`){let e;return t[5]===r?e=t[6]:(e=(0,Z.jsx)(Ii,{...r}),t[5]=r,t[6]=e),e}if(n===`windsurf`){let e;return t[7]===r?e=t[8]:(e=(0,Z.jsx)(Oi,{...r}),t[7]=r,t[8]=e),e}if(n===`openai`){let e;return t[9]===r?e=t[10]:(e=(0,Z.jsx)(Ni,{...r}),t[9]=r,t[10]=e),e}if(n===`cline`){let e;return t[11]===r?e=t[12]:(e=(0,Z.jsx)(Vi,{...r}),t[11]=r,t[12]=e),e}if(n===`github`){let e;return t[13]===r?e=t[14]:(e=(0,Z.jsx)(zi,{...r}),t[13]=r,t[14]=e),e}let i=r,a;return t[15]===i?a=t[16]:(a=(0,Z.jsx)(Li,{strokeWidth:1.5,...i}),t[15]=i,t[16]=a),a}function Gg(e){let t=(0,$.c)(17),{entry:n,isDark:r}=e;if(n.type===`upstream`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(D,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[0]=e):e=t[0],e}if(n.contributors.length>0){let e=n.contributors[0],i=e.colorSeed??e.name,a;t[1]===i?a=t[2]:(a=hr(i),t[1]=i,t[2]=a);let o=a,s=r?$n[o]??vr[o]:vr[o],c;t[3]!==s||t[4]!==i?(c=s??nr(i),t[3]=s,t[4]=i,t[5]=c):c=t[5];let l=c;if(o!==`bot`){let e;t[6]===l?e=t[7]:(e={color:l},t[6]=l,t[7]=e);let n;return t[8]!==o||t[9]!==e?(n=(0,Z.jsx)(Wg,{icon:o,width:14,height:14,className:`shrink-0`,style:e}),t[8]=o,t[9]=e,t[10]=n):n=t[10],n}if(e.name===`File System`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(_c,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[11]=e):e=t[11],e}if(e.name===`Open Knowledge (service)`||e.name===`Git (upstream)`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Vs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[12]=e):e=t[12],e}let u;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(il,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[13]=u):u=t[13],u}if(n.authorEmail.includes(`agent`)||n.author.includes(`agent`)||n.authorEmail.includes(`cursor`)||n.authorEmail.includes(`claude`)){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Li,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[14]=e):e=t[14],e}if(n.author===`openknowledge-server`||n.author===`server`){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Vs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[15]=e):e=t[15],e}let i;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(il,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[16]=i):i=t[16],i}function Kg(e){let t=(0,$.c)(23),{entries:n,defaultExpanded:r,isDark:i,diffLayout:a,cache:o,docName:s,expandedShas:c,onToggleExpanded:l,onRestoreSuccess:u}=e,[d,f]=(0,Q.useState)(r),p=n.length;if(n.length===0)return null;let m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>f(qg),t[0]=m):m=t[0];let h;t[1]===d?h=t[2]:(h=d?(0,Z.jsx)(St,{className:`size-3`}):(0,Z.jsx)(Ho,{className:`size-3`}),t[1]=d,t[2]=h);let g;t[3]!==p||t[4]!==d?(g=d?X._({id:`OKQe56`,values:{entryCount:p}}):X._({id:`k9jDvw`,values:{entryCount:p}}),t[3]=p,t[4]=d,t[5]=g):g=t[5];let _;t[6]!==d||t[7]!==h||t[8]!==g?(_=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":d,className:`flex items-center gap-1.5 rounded-lg px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors text-left`,onClick:m,children:[h,g]}),t[6]=d,t[7]=h,t[8]=g,t[9]=_):_=t[9];let v;t[10]!==o||t[11]!==a||t[12]!==s||t[13]!==n||t[14]!==d||t[15]!==c||t[16]!==i||t[17]!==u||t[18]!==l?(v=d&&n.map(e=>(0,Z.jsx)(a_,{entry:e,isDark:i,diffLayout:a,cache:o,docName:s,expanded:c.has(e.sha),onToggleExpanded:l,onRestoreSuccess:u},e.sha)),t[10]=o,t[11]=a,t[12]=s,t[13]=n,t[14]=d,t[15]=c,t[16]=i,t[17]=u,t[18]=l,t[19]=v):v=t[19];let y;return t[20]!==_||t[21]!==v?(y=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[_,v]}),t[20]=_,t[21]=v,t[22]=y):y=t[22],y}function qg(e){return!e}function Jg(e){return e.checkpoint?e.checkpoint.kind:`save`}function Yg(e){let t=Jg(e);if(t===`save`)return X._({id:`gsePqm`});let n=e.checkpoint?.size??null,r=n!=null&&n>0?` (${Xg(n)})`:``;return t===`bridge-merge-loss`?X._({id:`uZAG7T`,values:{sizeSuffix:r}}):X._({id:`_4rAQI`,values:{sizeSuffix:r}})}function Xg(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/102.4)/10} KB`:`${Math.round(e/104857.6)/10} MB`}function Zg(e){return e.type===`checkpoint`?Jg(e)===`save`?`version`:`auto-save`:`wip`}function Qg(e){let t=Zg(e);return t===`version`?X._({id:`RFQ1Yx`}):t===`auto-save`?X._({id:`9Uv1CD`}):X._({id:`Yea-K5`})}function $g(e){let t=Zg(e);return t===`version`?X._({id:`gg3Rpy`}):t===`auto-save`?X._({id:`PXXeW8`}):X._({id:`Pyp1NA`})}function e_(e){let t=[];for(let n of e.contributors)if(n.summaries)for(let e of n.summaries)t.push(e);return t}function t_(e){let t=(0,$.c)(21),{summaries:n}=e,[r,i]=(0,Q.useState)(!1),a=(0,Q.useId)();if(n.length===0)return null;let o,c;t[0]===n?(o=t[1],c=t[2]):([o,...c]=n,t[0]=n,t[1]=o,t[2]=c);let l=c.length,u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),t[3]=u):u=t[3];let d;t[4]===o?d=t[5]:(d=(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[u,o]}),t[4]=o,t[5]=d);let f;t[6]!==r||t[7]!==c?(f=r&&c.map(r_),t[6]=r,t[7]=c,t[8]=f):f=t[8];let p;t[9]!==a||t[10]!==d||t[11]!==f?(p=(0,Z.jsxs)(`ul`,{id:a,className:`list-none`,children:[d,f]}),t[9]=a,t[10]=d,t[11]=f,t[12]=p):p=t[12];let m;t[13]!==r||t[14]!==l||t[15]!==a||t[16]!==c.length?(m=c.length>0&&(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:e=>{e.stopPropagation(),i(n_)},children:[r?(0,Z.jsx)(St,{className:`size-3`}):(0,Z.jsx)(Ho,{className:`size-3`}),r?(0,Z.jsx)(s,{id:`vLyv1R`}):(0,Z.jsx)(s,{id:`ZptNUh`,values:{hidden:l}})]}),t[13]=r,t[14]=l,t[15]=a,t[16]=c.length,t[17]=m):m=t[17];let h;return t[18]!==p||t[19]!==m?(h=(0,Z.jsxs)(`div`,{className:`mt-0.5`,children:[p,m]}),t[18]=p,t[19]=m,t[20]=h):h=t[20],h}function n_(e){return!e}function r_(e,t){return(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),e]},`${t}-${e}`)}function i_(e){let t=(0,$.c)(13),{sha:n,docName:r,cache:i,diffLayout:a,panelId:o}=e,c=Rg(n,r,i),l;t[0]===c.status?l=t[1]:(l=c.status===`loading`&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-xs text-muted-foreground`,children:[(0,Z.jsx)(W,{className:`size-3 animate-spin`}),(0,Z.jsx)(s,{id:`38foVZ`})]}),t[0]=c.status,t[1]=l);let u;t[2]===c.status?u=t[3]:(u=c.status===`error`&&(0,Z.jsx)(`p`,{className:`py-2 text-xs text-destructive`,children:(0,Z.jsx)(s,{id:`vvWZnu`})}),t[2]=c.status,t[3]=u);let d;t[4]!==a||t[5]!==c.diff||t[6]!==c.status?(d=c.status===`ready`&&(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-xs text-muted-foreground`,children:[(0,Z.jsx)(W,{className:`size-3 animate-spin`}),(0,Z.jsx)(s,{id:`EDm3wJ`})]}),children:(0,Z.jsx)(zg,{diff:c.diff,viewType:a})}),t[4]=a,t[5]=c.diff,t[6]=c.status,t[7]=d):d=t[7];let f;return t[8]!==o||t[9]!==l||t[10]!==u||t[11]!==d?(f=(0,Z.jsxs)(`div`,{id:o,className:`px-3 pb-2`,"data-testid":`timeline-entry-diff`,children:[l,u,d]}),t[8]=o,t[9]=l,t[10]=u,t[11]=d,t[12]=f):f=t[12],f}function a_(e){let t=(0,$.c)(130),{entry:n,prominent:r,isDark:a,diffLayout:o,cache:c,docName:l,expanded:u,onToggleExpanded:d,onRestoreSuccess:f}=e,p=r===void 0?!1:r,{_:m}=i(),h;t[0]===n.timestamp?h=t[1]:(h=Bg(n.timestamp),t[0]=n.timestamp,t[1]=h);let g=h,_;t[2]===n?_=t[3]:(_=Ug(n),t[2]=n,t[3]=_);let v=_,y;t[4]===n.timestamp?y=t[5]:(y=Vg(n.timestamp),t[4]=n.timestamp,t[5]=y);let b=y,x;t[6]===n.sha?x=t[7]:(x=Hg(n.sha),t[6]=n.sha,t[7]=x);let S=x,C=n.contributors.flatMap(o_),w;t[8]===n?w=t[9]:(w=e_(n),t[8]=n,t[9]=w);let T=w,[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(!1),A=(0,Q.useRef)(null),j=(0,Q.useId)(),M,N;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>()=>A.current?.abort(),N=[],t[10]=M,t[11]=N):(M=t[10],N=t[11]),(0,Q.useEffect)(M,N);let P;t[12]!==n.sha||t[13]!==d?(P=()=>d(n.sha),t[12]=n.sha,t[13]=d,t[14]=P):P=t[14];let F=P,I;t[15]===D?I=t[16]:(I=function(){A.current?.abort(),A.current=null,k(!1),D(!1)},t[15]=D,t[16]=I);let L=I,R;t[17]!==m||t[18]!==l||t[19]!==n.sha||t[20]!==f||t[21]!==D?(R=async function(){k(!0);let e=new AbortController;A.current=e;let t=function(){e.signal.aborted||k(!1),A.current===e&&(A.current=null)},r;try{r=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:l,commitSha:n.sha}),signal:e.signal})}catch(r){let i=r;!e.signal.aborted&&!(i instanceof DOMException&&i.name===`AbortError`)&&(console.error(`[timeline] rollback fetch failed`,{docName:l,sha:n.sha,err:i}),Vo.error(m({id:`NkXEFS`}),{duration:4e3})),t();return}if(e.signal.aborted){t();return}if(r.ok)D(!1),f();else{let e=`HTTP ${r.status}`;try{let t=zn.safeParse(await r.json());t.success&&(e=t.data.title)}catch{}console.error(`[timeline] rollback failed`,{docName:l,sha:n.sha,status:r.status,detail:e}),Vo.error(m({id:`uM6jnS`}),{description:e,duration:6e3})}t()},t[17]=m,t[18]=l,t[19]=n.sha,t[20]=f,t[21]=D,t[22]=R):R=t[22];let z=R,B;t[23]!==n||t[24]!==a||t[25]!==p?(B=p?(()=>{let e=Jg(n);return e===`bridge-merge-loss`?(0,Z.jsx)(pi,{className:`size-3.5 shrink-0 text-amber-600 dark:text-amber-400`,"aria-hidden":`true`}):e===`external-change-rescue`?(0,Z.jsx)(cc,{className:`size-3.5 shrink-0 text-sky-600 dark:text-sky-400`,"aria-hidden":`true`}):(0,Z.jsx)(ac,{className:`size-3.5 shrink-0 text-muted-foreground`})})():(0,Z.jsx)(Gg,{entry:n,isDark:a}),t[23]=n,t[24]=a,t[25]=p,t[26]=B):B=t[26];let V=B,H=u?j:void 0,U=u?`bg-muted`:`hover:bg-muted/80`,G;t[27]===U?G=t[28]:(G=[`group flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring`,U],t[27]=U,t[28]=G);let K=G.join(` `),ee;t[29]===F?ee=t[30]:(ee=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),F())},t[29]=F,t[30]=ee);let q;t[31]===V?q=t[32]:(q=(0,Z.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:V}),t[31]=V,t[32]=q);let te;t[33]!==v||t[34]!==n||t[35]!==p?(te=p?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-xs text-foreground truncate`,children:Yg(n)}),(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground/50`,children:`·`}),(0,Z.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:v})]}):(0,Z.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:v}),t[33]=v,t[34]=n,t[35]=p,t[36]=te):te=t[36];let ne;t[37]!==n.timestamp||t[38]!==g?(ne=(0,Z.jsx)(`time`,{className:`ml-auto shrink-0 text-xs text-muted-foreground/80`,dateTime:n.timestamp,title:n.timestamp,children:g}),t[37]=n.timestamp,t[38]=g,t[39]=ne):ne=t[39];let re;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px shrink-0 bg-border`}),t[40]=re):re=t[40];let ie;t[41]===n?ie=t[42]:(ie=Qg(n),t[41]=n,t[42]=ie);let ae;t[43]===D?ae=t[44]:(ae=e=>{e.stopPropagation(),D(!0)},t[43]=D,t[44]=ae);let oe;t[45]===O?oe=t[46]:(oe=O?(0,Z.jsx)(W,{className:`size-3 animate-spin`}):(0,Z.jsx)(ji,{className:`size-3`}),t[45]=O,t[46]=oe);let se;t[47]!==O||t[48]!==ie||t[49]!==ae||t[50]!==oe?(se=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`timeline-entry-restore`,"aria-label":ie,disabled:O,onClick:ae,children:oe})}),t[47]=O,t[48]=ie,t[49]=ae,t[50]=oe,t[51]=se):se=t[51];let ce;t[52]===n?ce=t[53]:(ce=Qg(n),t[52]=n,t[53]=ce);let le;t[54]===ce?le=t[55]:(le=(0,Z.jsx)(wn,{side:`top`,children:ce}),t[54]=ce,t[55]=le);let J;t[56]!==se||t[57]!==le?(J=(0,Z.jsxs)(Ir,{children:[se,le]}),t[56]=se,t[57]=le,t[58]=J):J=t[58];let ue;t[59]!==te||t[60]!==ne||t[61]!==J?(ue=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[te,ne,re,J]}),t[59]=te,t[60]=ne,t[61]=J,t[62]=ue):ue=t[62];let de;t[63]===T?de=t[64]:(de=T.length>0&&(0,Z.jsx)(t_,{summaries:T}),t[63]=T,t[64]=de);let fe=C.length>0?(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:C.join(`, `),children:C.join(`, `)}):(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:n.message,children:n.message}),pe;t[65]!==ue||t[66]!==de||t[67]!==fe?(pe=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[ue,de,fe]}),t[65]=ue,t[66]=de,t[67]=fe,t[68]=pe):pe=t[68];let me;t[69]!==u||t[70]!==F||t[71]!==H||t[72]!==K||t[73]!==ee||t[74]!==q||t[75]!==pe?(me=(0,Z.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-expanded":u,"aria-controls":H,"data-testid":`timeline-entry-expand`,className:K,onClick:F,onKeyDown:ee,children:[q,pe]}),t[69]=u,t[70]=F,t[71]=H,t[72]=K,t[73]=ee,t[74]=q,t[75]=pe,t[76]=me):me=t[76];let he;t[77]!==c||t[78]!==o||t[79]!==j||t[80]!==l||t[81]!==n.sha||t[82]!==u?(he=u&&(0,Z.jsx)(i_,{sha:n.sha,docName:l,cache:c,diffLayout:o,panelId:j}),t[77]=c,t[78]=o,t[79]=j,t[80]=l,t[81]=n.sha,t[82]=u,t[83]=he):he=t[83];let ge;t[84]!==me||t[85]!==he?(ge=(0,Z.jsxs)(`div`,{className:`flex flex-col rounded-lg`,children:[me,he]}),t[84]=me,t[85]=he,t[86]=ge):ge=t[86];let _e;t[87]!==L||t[88]!==D?(_e=e=>{e?D(!0):L()},t[87]=L,t[88]=D,t[89]=_e):_e=t[89];let ve;t[90]===n?ve=t[91]:(ve=$g(n),t[90]=n,t[91]=ve);let ye;t[92]===ve?ye=t[93]:(ye=(0,Z.jsx)(ko,{children:ve}),t[92]=ve,t[93]=ye);let be;t[94]!==b||t[95]!==v||t[96]!==S||t[97]!==g?(be={relative:g,absoluteTime:b,entrySha:S,authorName:v},t[94]=b,t[95]=v,t[96]=S,t[97]=g,t[98]=be):be=t[98];let xe;t[99]===Symbol.for(`react.memo_cache_sentinel`)?(xe={0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`}),1:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})},t[99]=xe):xe=t[99];let Se;t[100]===be?Se=t[101]:(Se=(0,Z.jsx)(Do,{children:(0,Z.jsx)(s,{id:`h6EvY-`,values:be,components:xe})}),t[100]=be,t[101]=Se);let Ce;t[102]!==ye||t[103]!==Se?(Ce=(0,Z.jsxs)(Ro,{children:[ye,Se]}),t[102]=ye,t[103]=Se,t[104]=Ce):Ce=t[104];let we;t[105]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(s,{id:`dEgA5A`}),t[105]=we):we=t[105];let Te;t[106]===L?Te=t[107]:(Te=(0,Z.jsx)(Ti,{variant:`outline`,"data-testid":`timeline-entry-restore-cancel`,onClick:L,children:we}),t[106]=L,t[107]=Te);let Ee;t[108]===z?Ee=t[109]:(Ee=()=>z(),t[108]=z,t[109]=Ee);let De;t[110]===O?De=t[111]:(De=O?(0,Z.jsx)(W,{className:`mr-2 size-4 animate-spin`}):null,t[110]=O,t[111]=De);let Oe;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,Z.jsx)(s,{id:`yKu_3Y`}),t[112]=Oe):Oe=t[112];let ke;t[113]!==O||t[114]!==Ee||t[115]!==De?(ke=(0,Z.jsxs)(Ti,{variant:`destructive`,"data-testid":`timeline-entry-restore-confirm`,disabled:O,onClick:Ee,children:[De,Oe]}),t[113]=O,t[114]=Ee,t[115]=De,t[116]=ke):ke=t[116];let Ae;t[117]!==Te||t[118]!==ke?(Ae=(0,Z.jsxs)(Io,{children:[Te,ke]}),t[117]=Te,t[118]=ke,t[119]=Ae):Ae=t[119];let je;t[120]!==Ce||t[121]!==Ae?(je=(0,Z.jsxs)(No,{children:[Ce,Ae]}),t[120]=Ce,t[121]=Ae,t[122]=je):je=t[122];let Me;t[123]!==E||t[124]!==_e||t[125]!==je?(Me=(0,Z.jsx)(zo,{open:E,onOpenChange:_e,children:je}),t[123]=E,t[124]=_e,t[125]=je,t[126]=Me):Me=t[126];let Ne;return t[127]!==ge||t[128]!==Me?(Ne=(0,Z.jsxs)(Z.Fragment,{children:[ge,Me]}),t[127]=ge,t[128]=Me,t[129]=Ne):Ne=t[129],Ne}function o_(e){return e.docs}function s_(e){let t=(0,$.c)(87),{docName:n,diffLayout:r,onDiffLayoutChange:a,onSaveVersion:o,saving:c}=e,{_:l}=i(),{resolvedTheme:u}=On(),d=u===`dark`,f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=[],t[0]=f):f=t[0];let[p,m]=(0,Q.useState)(f),[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(null),y=(0,Q.useRef)(null),[b]=(0,Q.useState)(d_),[x,S]=(0,Q.useState)(u_),C;t[1]===b?C=t[2]:(C=()=>{S(new Set),b.clear()},t[1]=b,t[2]=C);let w;t[3]===n?w=t[4]:(w=[n],t[3]=n,t[4]=w),(0,Q.useEffect)(C,w);let T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=function(e){S(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[5]=T):T=t[5];let E=T,D;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(D=function(){S(new Set)},t[6]=D):D=t[6];let O=D,k,A;t[7]!==l||t[8]!==n?(k=()=>{if(!n){m([]);return}let e=!1,t=async function(){if(n)try{let t=await fetch(`/api/history?docName=${encodeURIComponent(n)}&limit=100`);if(e)return;if(!t.ok){v(l({id:`brCtGB`}));return}let r=await t.json();if(e)return;m(r.entries??[]),v(null)}catch(t){let n=t;if(e)return;v(l({id:`brCtGB`})),console.error(`[timeline]`,n)}};return g(!0),t().finally(()=>{e||g(!1)}),y.current=setInterval(t,1e4),()=>{e=!0,y.current&&clearInterval(y.current)}},A=[n,l],t[7]=l,t[8]=n,t[9]=k,t[10]=A):(k=t[9],A=t[10]),(0,Q.useEffect)(k,A);let j,M,N,P,F,I,L,R;if(t[11]!==l||t[12]!==b||t[13]!==r||t[14]!==n||t[15]!==p||t[16]!==_||t[17]!==x||t[18]!==d||t[19]!==h||t[20]!==a||t[21]!==o||t[22]!==c){let e=[],i=[],u=!1;for(let t of p)t.type===`checkpoint`?(i.length>0&&(e.push({kind:`wip-group`,entries:i,isPreCheckpoint:!u}),i=[]),e.push({kind:`checkpoint`,entry:t}),u=!0):i.push(t);i.length>0&&e.push({kind:`wip-group`,entries:i,isPreCheckpoint:!u});let f;t[31]===p?f=t[32]:(f=p.some(l_),t[31]=p,t[32]=f);let m=!f,g=!h&&!_&&p.length>0;F=`flex h-full flex-col`;let v;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(mn,{children:(0,Z.jsx)(s,{id:`cklVjM`})}),t[33]=v):v=t[33];let y;t[34]!==l||t[35]!==r||t[36]!==g||t[37]!==a?(y=g&&(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsxs)(wo,{type:`single`,value:r,onValueChange:e=>{e&&a(e)},"aria-label":l({id:`XvPJaT`}),variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-md shrink-0`,children:[(0,Z.jsx)(xo,{value:`unified`,"aria-label":l({id:`379t2h`}),className:`size-6 px-0`,children:(0,Z.jsx)(Vc,{className:`size-3.5`})}),(0,Z.jsx)(xo,{value:`split`,"aria-label":l({id:`HXFyWD`}),className:`size-6 px-0`,children:(0,Z.jsx)(tc,{className:`size-3.5`})})]})}),(0,Z.jsx)(wn,{children:r===`unified`?(0,Z.jsx)(s,{id:`379t2h`}):(0,Z.jsx)(s,{id:`HXFyWD`})})]}),t[34]=l,t[35]=r,t[36]=g,t[37]=a,t[38]=y):y=t[38];let S;t[39]===l?S=t[40]:(S=l({id:`IrYrzq`}),t[39]=l,t[40]=S);let C;t[41]===c?C=t[42]:(C=c?(0,Z.jsx)(W,{className:`size-4 animate-spin`}):(0,Z.jsx)(Hc,{className:`size-4`}),t[41]=c,t[42]=C);let w;t[43]!==o||t[44]!==c||t[45]!==S||t[46]!==C?(w=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-sm`,onClick:o,disabled:c,"aria-label":S,className:`text-muted-foreground`,"data-testid":`timeline-save-version`,children:C})}),t[43]=o,t[44]=c,t[45]=S,t[46]=C,t[47]=w):w=t[47];let T;t[48]===c?T=t[49]:(T=(0,Z.jsx)(wn,{children:c?(0,Z.jsx)(s,{id:`uF9ruK`}):(0,Z.jsx)(s,{id:`IrYrzq`})}),t[48]=c,t[49]=T);let D;t[50]!==w||t[51]!==T?(D=(0,Z.jsxs)(Ir,{children:[w,T]}),t[50]=w,t[51]=T,t[52]=D):D=t[52],t[53]!==y||t[54]!==D?(I=(0,Z.jsxs)(dn,{children:[v,(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[y,D]})]}),t[53]=y,t[54]=D,t[55]=I):I=t[55],L=`flex-1 overflow-y-auto subtle-scrollbar scroll-fade-mask`,t[56]!==l||t[57]!==h?(R=h&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,role:`status`,"aria-busy":`true`,"aria-label":l({id:`o49mDZ`}),children:[1,2,3].map(c_)}),t[56]=l,t[57]=h,t[58]=R):R=t[58],t[59]!==_||t[60]!==h?(j=!h&&_&&(0,Z.jsx)(`div`,{className:`px-4 py-3`,children:(0,Z.jsx)(`p`,{className:`text-xs text-destructive`,children:_})}),t[59]=_,t[60]=h,t[61]=j):j=t[61],t[62]!==p.length||t[63]!==_||t[64]!==h?(M=!h&&!_&&p.length===0&&(0,Z.jsx)(`div`,{className:`px-4 py-8 text-center`,children:(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(s,{id:`Ta25TG`})})}),t[62]=p.length,t[63]=_,t[64]=h,t[65]=M):M=t[65],t[66]!==b||t[67]!==r||t[68]!==n||t[69]!==p||t[70]!==_||t[71]!==x||t[72]!==m||t[73]!==d||t[74]!==h?(N=!h&&!_&&m&&p.length>0&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,children:p.map(e=>(0,Z.jsx)(a_,{entry:e,isDark:d,diffLayout:r,cache:b,docName:n,expanded:x.has(e.sha),onToggleExpanded:E,onRestoreSuccess:O},e.sha))}),t[66]=b,t[67]=r,t[68]=n,t[69]=p,t[70]=_,t[71]=x,t[72]=m,t[73]=d,t[74]=h,t[75]=N):N=t[75],P=!h&&!_&&!m&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,children:e.map((e,t)=>e.kind===`checkpoint`?(0,Z.jsx)(a_,{entry:e.entry,prominent:!0,isDark:d,diffLayout:r,cache:b,docName:n,expanded:x.has(e.entry.sha),onToggleExpanded:E,onRestoreSuccess:O},e.entry.sha):(0,Z.jsx)(Kg,{entries:e.entries,defaultExpanded:e.isPreCheckpoint,isDark:d,diffLayout:r,cache:b,docName:n,expandedShas:x,onToggleExpanded:E,onRestoreSuccess:O},e.entries[0]?.sha??`wip-${t}`))}),t[11]=l,t[12]=b,t[13]=r,t[14]=n,t[15]=p,t[16]=_,t[17]=x,t[18]=d,t[19]=h,t[20]=a,t[21]=o,t[22]=c,t[23]=j,t[24]=M,t[25]=N,t[26]=P,t[27]=F,t[28]=I,t[29]=L,t[30]=R}else j=t[23],M=t[24],N=t[25],P=t[26],F=t[27],I=t[28],L=t[29],R=t[30];let z;t[76]!==j||t[77]!==M||t[78]!==N||t[79]!==P||t[80]!==L||t[81]!==R?(z=(0,Z.jsxs)(`div`,{className:L,children:[R,j,M,N,P]}),t[76]=j,t[77]=M,t[78]=N,t[79]=P,t[80]=L,t[81]=R,t[82]=z):z=t[82];let B;return t[83]!==F||t[84]!==I||t[85]!==z?(B=(0,Z.jsxs)(`div`,{className:F,children:[I,z]}),t[83]=F,t[84]=I,t[85]=z,t[86]=B):B=t[86],B}function c_(e){return(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5`,children:[(0,Z.jsx)(Ha,{className:`size-3.5 rounded mt-0.5 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Z.jsx)(Ha,{className:`h-3 w-28`}),(0,Z.jsx)(Ha,{className:`h-3 w-40`})]})]},e)}function l_(e){return e.type===`checkpoint`}function u_(){return new Set}function d_(){return new Mi(32)}var f_=[{id:`outline`,icon:wc},{id:`links`,icon:B},{id:`graph`,icon:Dc},{id:`timeline`,icon:Zs}];function p_(e){return e===`outline`?X._({id:`dD7NPy`}):e===`links`?X._({id:`Rj01Fz`}):e===`graph`?X._({id:`x2fr_j`}):X._({id:`cklVjM`})}function m_(){return n(()=>import(`./GraphPanel-0aB3TF2C.js`),__vite__mapDeps([18,1,19,6,3,7,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url)}var h_=(0,Q.lazy)(async()=>({default:(await m_()).GraphPanel})),g_=(0,Q.lazy)(async()=>({default:(await n(()=>import(`./ActivityModeContent-f87lu1R1.js`),__vite__mapDeps([32,1,2,33,34,35,20,36,37,38,39,19,6,3,7,4,10,9,40,41]),import.meta.url)).ActivityModeContent}));function __(e){let t=(0,$.c)(16),{docName:n,isSourceMode:r,activeTab:a,onActiveTabChange:o,mode:c,onSaveVersion:l,saving:u}=e,{_:d}=i(),[f,p]=(0,Q.useState)(`unified`),m;t[0]!==d||t[1]!==a||t[2]!==c||t[3]!==o?(m=c===`doc`?(0,Z.jsx)(`div`,{className:`flex flex-row items-center justify-center gap-3 p-2`,children:(0,Z.jsx)(wo,{type:`single`,variant:`outline`,value:a,onValueChange:e=>{e&&o(e)},"aria-label":d({id:`SrOuyg`}),children:f_.map(v_)})}):null,t[0]=d,t[1]=a,t[2]=c,t[3]=o,t[4]=m):m=t[4];let h;t[5]!==a||t[6]!==f||t[7]!==n||t[8]!==r||t[9]!==c||t[10]!==l||t[11]!==u?(h=c===`doc`?(0,Z.jsxs)(`div`,{role:`tabpanel`,id:`panel-${a}`,"aria-labelledby":`tab-${a}`,className:`min-h-0 flex-1`,children:[a===`outline`&&(0,Z.jsx)(ws,{docName:n,isSourceMode:r}),a===`links`&&(0,Z.jsx)(cg,{docName:n}),a===`graph`&&(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`-lCAuQ`})}),children:(0,Z.jsx)(h_,{activeDocName:n})}),a===`timeline`&&(0,Z.jsx)(s_,{docName:n,diffLayout:f,onDiffLayoutChange:p,onSaveVersion:l,saving:u})]}):(0,Z.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(`div`,{role:`status`,"aria-busy":`true`,className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`ONPvOb`})}),children:(0,Z.jsx)(g_,{})})}),t[5]=a,t[6]=f,t[7]=n,t[8]=r,t[9]=c,t[10]=l,t[11]=u,t[12]=h):h=t[12];let g;return t[13]!==m||t[14]!==h?(g=(0,Z.jsxs)(Z.Fragment,{children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15],g}function v_(e){let{id:t,icon:n}=e,r=p_(t);return(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(xo,{value:t,role:`tab`,id:`tab-${t}`,"aria-controls":`panel-${t}`,"aria-label":r,asChild:!0,children:(0,Z.jsx)(Kn,{children:(0,Z.jsx)(n,{})})}),(0,Z.jsx)(wn,{side:`bottom`,children:r})]},t)}function y_(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function b_(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function x_(e){return e/100*window.innerHeight}function S_(e){return e/100*window.innerWidth}function C_(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function w_({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=C_(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=b_(t,i);break;case`em`:r=y_(t,i);break;case`vh`:r=x_(i);break;case`vw`:r=S_(i);break}return r}function T_(e){return parseFloat(e.toFixed(3))}function E_({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function D_(e){let{panels:t}=e,n=E_({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=T_(w_({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=T_(w_({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=T_(w_({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=T_(w_({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function O_(e,t=`Assertion error`){if(!e)throw Error(t)}function k_(e,t){return Array.from(t).sort(e===`horizontal`?A_:j_)}function A_(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function j_(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function M_(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function N_(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function P_({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=N_(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return O_(i,`No rect found`),i}var F_;function I_(){return F_===void 0&&(F_=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),F_}function L_(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=k_(n,Array.from(t.children).filter(M_).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,P_({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=I_()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:E_({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var R_=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},z_=new Map,B_=new R_;function V_(e){z_=new Map(z_),z_.delete(e)}function H_(e,t){for(let[t]of z_)if(t.id===e)return t}function U_(e,t){for(let[t,n]of z_)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function W_(){return z_}function G_(e,t){return B_.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function K_(e,t){let n=z_.get(e);z_=new Map(z_),z_.set(e,t),B_.emit(`groupChange`,{group:e,prev:n,next:t})}function q_(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=N_(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function J_(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Y_(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:tv(e),b:tv(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();O_(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:ev($_(n.a)),b:ev($_(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var X_=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Z_(e){let t=getComputedStyle(nv(e)??e).display;return t===`flex`||t===`inline-flex`}function Q_(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Z_(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||X_.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function $_(e){let t=e.length;for(;t--;){let n=e[t];if(O_(n,`Missing node`),Q_(n))return n}return null}function ev(e){return e&&Number(getComputedStyle(e).zIndex)||0}function tv(e){let t=[];for(;e;)t.push(e),e=nv(e);return t}function nv(e){let{parentNode:t}=e;return J_(t)?t.host:t}function rv(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function iv({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!M_(n)||n.contains(e)||e.contains(n))return!0;if(Y_(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(rv(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function av(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=L_(r),a=q_(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&iv({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function ov(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function sv(e,t,n=0){return Math.abs(T_(e)-T_(t))<=n}function cv(e,t){return sv(e,t)?0:e>t?1:-1}function lv({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(cv(r,c)<0)if(a){let e=(i+c)/2;r=cv(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=T_(r),r}function uv({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(sv(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;O_(u!=null,`Invalid first pivot index`),O_(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];O_(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(O_(n!=null,`Previous layout not found for panel index ${t}`),sv(n,i)){let t=o-n;cv(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];O_(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(O_(n!=null,`Previous layout not found for panel index ${t}`),sv(n,o)){let t=n-i;cv(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];O_(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&cv(i,c)<0)if(e>0){let t=c-o,n=t/2;cv(i+e,c)<0&&(e=cv(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;cv(i-e,c)<0&&(e=cv(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];O_(e!=null,`Previous layout not found for panel index ${r}`);let a=lv({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];O_(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=lv({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!sv(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(ov(c,l))return i;{let t=e<0?d:u,r=s[t];O_(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=lv({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!sv(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];O_(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=lv({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(sv(i,s)||(t-=s-i,l[r]=s),sv(t,0))break;e>0?r--:r++}}}if(!sv(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function dv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||cv(e[n],t[n])!==0)return!1;return!0}function fv({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!sv(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];O_(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];O_(i!=null,`No layout data found for index ${e}`);let o=r[e];O_(o!=null,`No layout data found for index ${e}`);let s=lv({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!sv(a,0))for(let e=0;e<t.length;e++){let n=r[e];O_(n!=null,`No layout data found for index ${e}`);let i=n+a,o=lv({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,sv(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function pv({groupId:e,panelId:t}){let n=()=>{let t=W_();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:c,layout:l,separatorToPanels:u}=n(),d=s.panels.findIndex(e=>e.id===t),f=d===s.panels.length-1,p=fv({layout:uv({delta:f?r-e:e-r,initialLayout:l,panelConstraints:o,pivotIndices:f?[d-1,d]:[d,d+1],prevLayout:l,trigger:`imperative-api`}),panelConstraints:o});dv(l,p)||K_(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:c,layout:p,separatorToPanels:u})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&sv(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=E_({group:t});o(T_(w_({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function mv(e){e.defaultPrevented||av(e,W_()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=pv({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function hv(e){let t=W_();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function gv({groupId:e}){let t=()=>{let t=W_();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=fv({layout:e,panelConstraints:r});return n?o:(dv(o,c)||K_(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function _v(e,t){let n=hv(e),r=U_(n.id,!0),i=n.separators.find(t=>t.element===e);O_(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);O_(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=gv({groupId:n.id}).getLayout(),c=fv({layout:uv({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});dv(s,c)||K_(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels})}function vv(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=hv(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&_v(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&_v(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&_v(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&_v(t,-5);break;case`End`:e.preventDefault(),_v(t,100);break;case`Enter`:{e.preventDefault();let n=hv(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=U_(n.id,!0),o=n.separators.find(e=>e.element===t);O_(o,`Matching separator not found`);let s=a.get(o);O_(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(O_(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];_v(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=hv(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);O_(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),_v(t,-100);break}}var yv={cursorFlags:0,state:`inactive`},bv=new R_;function xv(){return yv}function Sv(e){return bv.addListener(`change`,e)}function Cv(e){let t=yv,n={...yv};n.cursorFlags=e,yv=n,bv.emit(`change`,{prev:t,next:n})}function wv(e){let t=yv;yv=e,bv.emit(`change`,{prev:t,next:e})}function Tv(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=W_(),n=av(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),wv({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}var Ev=e=>e,Dv=()=>{},Ov=1,kv=2,Av=4,jv=8,Mv=3,Nv=12,Pv;function Fv(){return Pv===void 0&&(Pv=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Pv=!0)),Pv}function Iv({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Fv()){let t=(e&Ov)!==0,n=(e&kv)!==0,r=(e&Av)!==0,i=(e&jv)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Fv()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Lv=new WeakMap;function Rv(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Lv.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(n));let r=xv();switch(r.state){case`active`:case`hover`:{let e=Iv({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}Lv.set(e,{prevStyle:t,styleSheet:n})}function zv({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=uv({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(dv(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Ov:kv;break;case`vertical`:s|=d<0?Av:jv;break}}else K_(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Mv:c|=s&Mv,t.movementY===0?c|=o&Nv:c|=s&Nv,Cv(c),Rv(e)}function Bv(e){let t=W_(),n=xv();switch(n.state){case`active`:zv({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function Vv(e){if(e.defaultPrevented)return;let t=xv(),n=W_();switch(t.state){case`active`:if(e.buttons===0){wv({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=U_(e.group.id,!0);K_(e.group,t)});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}zv({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=av(e,n);r.length===0?t.state!==`inactive`&&wv({cursorFlags:0,state:`inactive`}):wv({cursorFlags:0,hitRegions:r,state:`hover`}),Rv(e.currentTarget);break}}}function Hv(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(xv().state){case`hover`:wv({cursorFlags:0,state:`inactive`})}}function Uv(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=xv();switch(t.state){case`active`:wv({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Rv(e.currentTarget),t.hitRegions.forEach(e=>{let t=U_(e.group.id,!0);K_(e.group,t)}),e.preventDefault())}}function Wv(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=T_(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=T_((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function Gv(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=E_({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:T_(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Kv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function qv({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=T_(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=T_((r[e]??0)/a*l);else{let e=T_(l/c.length);for(let t of c)u[t]=e}return u}function Jv(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var Yv=new Map;function Xv(e){let t=!0;O_(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=E_({group:e});if(t===0)return;let n=U_(e.id);if(!n)return;let r=D_(e),i=n.defaultLayoutDeferred?Wv(r):n.layout,a=fv({layout:qv({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&dv(n.layout,a)&&Kv(n.derivedPanelConstraints,r)&&n.groupSize===t)return;K_(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else Gv(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{O_(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=E_({group:e}),s=D_(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Jv(e.panels,l)||(l=void 0));let u=fv({layout:e.mutableState.layouts[c]??l??Wv(s),panelConstraints:s}),d=e.element.ownerDocument;Yv.set(d,(Yv.get(d)??0)+1);let f=new Map;return L_(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),K_(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{O_(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,vv)}),Yv.get(d)===1&&(d.addEventListener(`dblclick`,mv,!0),d.addEventListener(`pointerdown`,Tv,!0),d.addEventListener(`pointerleave`,Bv),d.addEventListener(`pointermove`,Vv),d.addEventListener(`pointerout`,Hv),d.addEventListener(`pointerup`,Uv,!0)),function(){t=!1,Yv.set(d,Math.max(0,(Yv.get(d)??0)-1)),V_(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,vv)}),Yv.get(d)||(d.removeEventListener(`dblclick`,mv,!0),d.removeEventListener(`pointerdown`,Tv,!0),d.removeEventListener(`pointerleave`,Bv),d.removeEventListener(`pointermove`,Vv),d.removeEventListener(`pointerout`,Hv),d.removeEventListener(`pointerup`,Uv,!0)),a.disconnect()}}function Zv(){let[e,t]=(0,Q.useState)({});return[e,(0,Q.useCallback)(()=>t({}),[])]}function Qv(e){let t=(0,Q.useId)();return`${e??t}`}var $v=typeof window<`u`?Q.useLayoutEffect:Q.useEffect;function ey(e){let t=(0,Q.useRef)(e);return $v(()=>{t.current=e},[e]),(0,Q.useCallback)((...e)=>t.current?.(...e),[t])}function ty(...e){return ey(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function ny(e){let t=(0,Q.useRef)({...e});return $v(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var ry=(0,Q.createContext)(null);function iy(e,t){let n=(0,Q.useRef)({getLayout:()=>({}),setLayout:Ev});(0,Q.useImperativeHandle)(t,()=>n.current,[]),$v(()=>{Object.assign(n.current,gv({groupId:e}))})}function ay({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,Q.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=ey(e=>{dv(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=ey(e=>{dv(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e))}),_=Qv(s),v=(0,Q.useRef)(null),[y,b]=Zv(),x=(0,Q.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),S=ty(v,a);iy(_,o);let C=ey((e,t)=>{let r=xv(),i=H_(e),a=U_(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),w=ny({defaultLayout:n,disableCursor:r}),T=(0,Q.useMemo)(()=>({get disableCursor(){return!!w.disableCursor},getPanelStyles:C,id:_,orientation:u,registerPanel:e=>{let t=x.current;return t.panels=k_(u,[...t.panels,e]),b(),()=>{t.panels=t.panels.filter(t=>t!==e),b()}},registerSeparator:e=>{let t=x.current;return t.separators=k_(u,[...t.separators,e]),b(),()=>{t.separators=t.separators.filter(t=>t!==e),b()}},updatePanelProps:(e,{disabled:t})=>{let n=x.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=H_(_),i=U_(_);r&&i&&K_(r,{...i,derivedPanelConstraints:D_(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=x.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[C,_,b,u,w]),E=(0,Q.useRef)(null);return $v(()=>{let e=v.current;if(e===null)return;let t=x.current,n;if(w.defaultLayout!==void 0&&Object.keys(w.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=w.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!w.disableCursor,expandedPanelSizes:x.current.lastExpandedPanelSizes,layouts:x.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};E.current=r;let a=Xv(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=U_(r.id,!0);!o&&s.length>0&&(h(c),g(c));let l=G_(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=sv(t.collapsedSize,i[t.panelId]),a=sv(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=xv().state!==`active`;h(i),o&&g(i)});return()=>{E.current=null,a(),l()}},[i,_,g,h,u,y,w]),(0,Q.useEffect)(()=>{let e=E.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,Z.jsx)(ry.Provider,{value:T,children:(0,Z.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:S,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}ay.displayName=`Group`;function oy(){let e=(0,Q.useContext)(ry);return O_(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function sy(e,t){let{id:n}=oy(),r=(0,Q.useRef)({collapse:Dv,expand:Dv,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Dv});(0,Q.useImperativeHandle)(t,()=>r.current,[]),$v(()=>{Object.assign(r.current,pv({groupId:n,panelId:e}))})}function cy({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Qv(c),_=ny({disabled:a}),v=(0,Q.useRef)(null),y=ty(v,o),{getPanelStyles:b,id:x,orientation:S,registerPanel:C,updatePanelProps:w}=oy(),T=d!==null,E=ey((e,t,n)=>{d?.(e,c,n)});$v(()=>{let e=v.current;if(e!==null)return C({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:T?E:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}})},[s,n,r,i,T,g,h,l,u,E,C,_]),(0,Q.useEffect)(()=>{w(g,{disabled:a})},[a,g,w]),sy(g,f);let D=()=>{let e=b(x,g);if(e)return JSON.stringify(e)},O=(0,Q.useSyncExternalStore)(e=>G_(x,e),D,D),k;return k=O?JSON.parse(O):i?{flexGrow:void 0,flexShrink:void 0,flexBasis:i}:{flexGrow:1},(0,Z.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...ly,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...k},children:(0,Z.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:S===`horizontal`?`pan-y`:`pan-x`},children:e})})}cy.displayName=`Panel`;var ly={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function uy(){return(0,Q.useRef)(null)}function dy({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=fv({layout:uv({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=fv({layout:uv({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function fy({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Qv(a),l=ny({disabled:n,disableDoubleClick:r}),[u,d]=(0,Q.useState)({}),[f,p]=(0,Q.useState)(`inactive`),m=(0,Q.useRef)(null),h=ty(m,i),{disableCursor:g,id:_,orientation:v,registerSeparator:y,updateSeparatorProps:b}=oy(),x=v===`horizontal`?`vertical`:`horizontal`;$v(()=>{let e=m.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=y(t),r=Sv(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=G_(_,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(dy({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[_,c,y,l]),(0,Q.useEffect)(()=>{b(c,{disabled:n,disableDoubleClick:r})},[n,r,c,b]);let S;return n&&!g&&(S=`not-allowed`),(0,Z.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":x,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":n?`disabled`:f,"data-testid":c,id:c,ref:h,role:`separator`,style:{flexBasis:`auto`,cursor:S,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}fy.displayName=`Separator`;var py={name:`toml`,startState:function(){return{inString:!1,stringType:``,lhs:!0,inArray:0}},token:function(e,t){let n;if(!t.inString&&(n=e.match(/^('''|"""|'|")/))&&(t.stringType=n[0],t.inString=!0),e.sol()&&!t.inString&&t.inArray===0&&(t.lhs=!0),t.inString){for(;t.inString;)if(e.match(t.stringType))t.inString=!1;else if(e.peek()===`\\`)e.next(),e.next();else if(e.eol())break;else e.match(/^.[^\\\"\']*/);return t.lhs?`property`:`string`}else if(t.inArray&&e.peek()===`]`)return e.next(),t.inArray--,`bracket`;else if(t.lhs&&e.peek()===`[`&&e.skipTo(`]`))return e.next(),e.peek()===`]`&&e.next(),`atom`;else if(e.peek()===`#`)return e.skipToEnd(),`comment`;else if(e.eatSpace())return null;else if(t.lhs&&e.eatWhile(function(e){return e!=`=`&&e!=` `}))return`property`;else if(t.lhs&&e.peek()===`=`)return e.next(),t.lhs=!1,null;else if(!t.lhs&&e.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return`atom`;else if(!t.lhs&&(e.match(`true`)||e.match(`false`)))return`atom`;else if(!t.lhs&&e.peek()===`[`)return t.inArray++,e.next(),`bracket`;else if(!t.lhs&&e.match(/^\-?\d+(?:\.\d+)?/))return`number`;else e.eatSpace()||e.next();return null},languageData:{commentTokens:{line:`#`}}},my=se({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),hy=It({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function gy(e){switch(e.toLowerCase()){case`json`:return xs().language;case`toml`:return _s.define(py);default:return null}}function _y(e){let t=(0,$.c)(5),{_:n}=i(),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={status:`loading`},t[0]=r):r=t[0];let[a,o]=(0,Q.useState)(r),s,c;return t[1]!==n||t[2]!==e?(s=()=>{let t=!1,r=new AbortController;return o({status:`loading`}),fetch(e,{credentials:`same-origin`,signal:r.signal}).then(async e=>{if(!e.ok){let t=e.status;throw Error(n({id:`PauP7d`,values:{status:t}}))}return e.text()}).then(e=>{t||o({status:`loaded`,content:e})}).catch(e=>{t||e instanceof Error&&e.name===`AbortError`||o({status:`error`,message:e instanceof Error?e.message:n({id:`ig5vUe`})})}),()=>{t=!0,r.abort()}},c=[e,n],t[1]=n,t[2]=e,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,Q.useEffect)(s,c),a}function vy(e){let t=(0,$.c)(28),{src:n,fileName:r,extension:i}=e,a=(0,Q.useRef)(null),o=(0,Q.useRef)(null),{resolvedTheme:c}=On(),l=_y(n),u=l.status===`loaded`?l.content:null,d,f;if(t[0]!==i||t[1]!==u||t[2]!==c?(d=()=>{if(!a.current||u===null)return;let e=gy(i),t=c===`dark`?my:hy,n=[Ts,...e?[e]:[],ps.editable.of(!1),rs.readOnly.of(!0),ps.lineWrapping,t],r=new ps({state:rs.create({doc:u,extensions:n}),parent:a.current});return o.current=r,()=>{r.destroy(),o.current=null}},f=[u,i,c],t[0]=i,t[1]=u,t[2]=c,t[3]=d,t[4]=f):(d=t[3],f=t[4]),(0,Q.useEffect)(d,f),l.status===`loading`){let e;t[5]===r?e=t[6]:(e=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`Md709y`,values:{fileName:r}})}),t[5]=r,t[6]=e);let n;return t[7]!==i||t[8]!==r||t[9]!==e?(n=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center bg-background text-muted-foreground text-sm`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loading`,"data-text-viewer-extension":i,children:e}),t[7]=i,t[8]=r,t[9]=e,t[10]=n):n=t[10],n}if(l.status===`error`){let e;t[11]===r?e=t[12]:(e=(0,Z.jsx)(`div`,{className:`font-medium text-sm`,children:(0,Z.jsx)(s,{id:`qdBUHP`,values:{fileName:r}})}),t[11]=r,t[12]=e);let a;t[13]===l.message?a=t[14]:(a=(0,Z.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:l.message}),t[13]=l.message,t[14]=a);let o;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(s,{id:`9npOH9`}),t[15]=o):o=t[15];let c;t[16]===n?c=t[17]:(c=(0,Z.jsx)(`a`,{href:n,className:`mt-2 rounded-md border px-3 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground`,children:o}),t[16]=n,t[17]=c);let u;return t[18]!==i||t[19]!==r||t[20]!==e||t[21]!==a||t[22]!==c?(u=(0,Z.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-2 bg-background p-4 text-center`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`error`,"data-text-viewer-extension":i,children:[e,a,c]}),t[18]=i,t[19]=r,t[20]=e,t[21]=a,t[22]=c,t[23]=u):u=t[23],u}let p;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-auto`}),t[24]=p):p=t[24];let m;return t[25]!==i||t[26]!==r?(m=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loaded`,"data-text-viewer-extension":i,children:p}),t[25]=i,t[26]=r,t[27]=m):m=t[27],m}function yy(e){return Fn(`/api/asset?path=${encodeURIComponent(e)}`)}function by(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function xy(e){let t=(0,$.c)(28),{assetPath:n,mediaKind:r}=e,[i,a]=(0,Q.useState)(!1),o;t[0]===n?o=t[1]:(o=yy(n),t[0]=n,t[1]=o);let c=o,l;t[2]===n?l=t[3]:(l=n.split(`/`).pop()??n,t[2]=n,t[3]=l);let u=l,d,f,p;if(t[4]!==n||t[5]!==u||t[6]!==i||t[7]!==r||t[8]!==c){p=Symbol.for(`react.early_return_sentinel`);bb0:{let e=u.includes(`.`)?u.split(`.`).pop()??``:``;if(f=e.length>0?e.toUpperCase():`FILE`,d=i?`text`:r,d===`pdf`){let e;t[12]!==u||t[13]!==c?(e=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,Z.jsx)(xe,{src:c,title:u,fillContainer:!0})}),t[12]=u,t[13]=c,t[14]=e):e=t[14];let n;t[15]!==u||t[16]!==e?(n=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":u,children:e}),t[15]=u,t[16]=e,t[17]=n):n=t[17],p=n;break bb0}if(d===`text`){let r;t[18]===n?r=t[19]:(r=by(n),t[18]=n,t[19]=r),p=(0,Z.jsx)(vy,{src:r,fileName:u,extension:e.toLowerCase()},n);break bb0}}t[4]=n,t[5]=u,t[6]=i,t[7]=r,t[8]=c,t[9]=d,t[10]=f,t[11]=p}else d=t[9],f=t[10],p=t[11];if(p!==Symbol.for(`react.early_return_sentinel`))return p;let m;t[20]!==d||t[21]!==f||t[22]!==u||t[23]!==c?(m=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:d===`image`?(0,Z.jsx)(ne,{src:c,alt:u,draggable:!1,slotClassName:`flex h-full w-full items-center justify-center`,className:`max-h-full max-w-full`}):d===`video`?(0,Z.jsx)(`video`,{src:c,controls:!0,className:`max-h-full max-w-full`}):d===`audio`?(0,Z.jsx)(`audio`,{src:c,controls:!0,className:`w-full max-w-md`}):(0,Z.jsxs)(`div`,{className:`flex max-w-sm flex-col items-center gap-3 text-center`,children:[(0,Z.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-md border bg-muted font-medium text-muted-foreground text-sm`,children:f}),(0,Z.jsx)(`div`,{className:`max-w-full break-words font-medium text-sm`,children:u}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[(0,Z.jsx)(Ti,{asChild:!0,variant:`outline`,size:`sm`,children:(0,Z.jsx)(`a`,{href:c,children:(0,Z.jsx)(s,{id:`9npOH9`})})}),(0,Z.jsx)(Ti,{variant:`outline`,size:`sm`,onClick:()=>a(!0),"data-testid":`asset-preview-open-as-text`,children:(0,Z.jsx)(s,{id:`Ruuu3v`})})]})]})}),t[20]=d,t[21]=f,t[22]=u,t[23]=c,t[24]=m):m=t[24];let h;return t[25]!==u||t[26]!==m?(h=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":u,children:m}),t[25]=u,t[26]=m,t[27]=h):h=t[27],h}function Sy(){let e=(0,$.c)(5),{_:t}=i(),n;e[0]===t?n=e[1]:(n=t({id:`3VsNTI`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsx)(Ha,{className:`h-9 w-2/5 mt-6 mb-5`}),(0,Z.jsx)(Ha,{className:`h-4 w-full`}),(0,Z.jsx)(Ha,{className:`h-4 w-3/4`})]}),e[2]=r):r=e[2];let a;return e[3]===n?a=e[4]:(a=(0,Z.jsx)(`div`,{className:`tiptap-editor pt-10`,role:`status`,"aria-busy":`true`,"aria-label":n,children:r}),e[3]=n,e[4]=a),a}var Cy={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`};function wy(e){let t=(0,$.c)(23),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({id:r,style:a,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{resolvedTheme:o}=On(),s=Cy[r],c=s?(o===`dark`?$n[s]:void 0)??vr[s]:void 0,l;t[5]!==c||t[6]!==a?(l=c?{...a,"--ok-brand-color":c}:a,t[5]=c,t[6]=a,t[7]=l):l=t[7];let u=l,d=c&&`[&_*]:![color:var(--ok-brand-color)]`,f;t[8]!==n||t[9]!==d?(f=vi(d,n),t[8]=n,t[9]=d,t[10]=f):f=t[10];let p=f;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==p||t[12]!==u||t[13]!==i?(e=(0,Z.jsx)(Ai,{style:u,className:p,...i}),t[11]=p,t[12]=u,t[13]=i,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==p||t[16]!==u||t[17]!==i?(e=(0,Z.jsx)(ki,{style:u,className:p,...i}),t[15]=p,t[16]=u,t[17]=i,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==p||t[20]!==u||t[21]!==i?(e=(0,Z.jsx)(Ii,{style:u,className:p,...i}),t[19]=p,t[20]=u,t[21]=i,t[22]=e):e=t[22],e}return null}function Ty(e){let{installState:t}=e;return t.installed===null?X._({id:`IA6JW2`}):t.installed===!1?X._({id:`5SwVv1`}):null}function Ey(e){let{target:t,installState:n}=e;if(n.installed===null)return{enabled:!1,tooltip:null};if(n.installed===!1){let e=t.appBrandName??t.displayName;return{enabled:!1,tooltip:{message:X._({id:`OJTOUj`,values:{brand:e}}),installAction:{label:X._({id:`fG0X0e`,values:{brand:e}}),url:t.installUrl},...t.hasWebFallback?{webFallback:{label:X._({id:`0S9PW_`}),url:``}}:{}}}}return{enabled:!0,tooltip:null}}function Dy(e){return Hr(e)}function Oy(e){return X._({id:`h_HYHD`,values:{displayName:e}})}var ky=`claude.ai`;async function Ay(e,t=Hm){(await t(Hr(e))).ok?Vo.success(Oy(ky)):Vo.error(X._({id:`9NC_MT`,values:{CLAUDE_WEB_FALLBACK_LABEL:ky}}))}function jy(e){let t=(0,$.c)(68),{_:n}=i(),{target:r,installState:a,isElectronHost:o,prompt:s,onSelect:c}=e,l=e.openExternal??Hm,u=e.onWebFallbackSuccess??Ny,d=e.onWebFallbackError??My,{displayName:f}=r,p,m,h,g,_,v,y,b,x,S;if(t[0]!==n||t[1]!==a||t[2]!==o||t[3]!==c||t[4]!==d||t[5]!==u||t[6]!==l||t[7]!==s||t[8]!==r||t[9]!==f){S=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Ey({target:r,installState:a,isElectronHost:o}),i=Ty({target:r,installState:a,isElectronHost:o}),C=()=>{e.tooltip&&l(e.tooltip.installAction.url)},w;t[20]!==d||t[21]!==u||t[22]!==l||t[23]!==s||t[24]!==r?(w=()=>{(async()=>{let e=await l(Dy(s));e.ok?u(r):d(r,e.detail??e.reason)})()},t[20]=d,t[21]=u,t[22]=l,t[23]=s,t[24]=r,t[25]=w):w=t[25];let T=w;if(e.enabled){let e=`open-in-agent-item-${r.id}`,i;t[26]!==n||t[27]!==f?(i=n({id:`NnQapF`,values:{targetDisplayName:f}}),t[26]=n,t[27]=f,t[28]=i):i=t[28];let a;t[29]===r.id?a=t[30]:(a=(0,Z.jsx)(wy,{id:r.id,"aria-hidden":`true`}),t[29]=r.id,t[30]=a);let o;t[31]===r.displayName?o=t[32]:(o=(0,Z.jsx)(`span`,{children:r.displayName}),t[31]=r.displayName,t[32]=o);let s;t[33]!==c||t[34]!==i||t[35]!==a||t[36]!==o||t[37]!==e?(s=(0,Z.jsxs)(oa,{onSelect:c,"data-testid":e,"aria-label":i,children:[a,o]}),t[33]=c,t[34]=i,t[35]=a,t[36]=o,t[37]=e,t[38]=s):s=t[38],S=s;break bb0}if(!e.tooltip){let e=n(i?{id:`If0crP`,values:{targetDisplayName:f,hint:i}}:{id:`NnQapF`,values:{targetDisplayName:f}}),a;t[39]===r.id?a=t[40]:(a=(0,Z.jsx)(wy,{id:r.id,"aria-hidden":`true`}),t[39]=r.id,t[40]=a);let o;t[41]===r.displayName?o=t[42]:(o=(0,Z.jsx)(`span`,{className:`flex-1`,children:r.displayName}),t[41]=r.displayName,t[42]=o),S=(0,Z.jsxs)(oa,{disabled:!0,"data-testid":`open-in-agent-item-${r.id}`,"aria-label":e,children:[a,o,i?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:i}):null]});break bb0}let E=n(i?{id:`If0crP`,values:{targetDisplayName:f,hint:i}}:{id:`NnQapF`,values:{targetDisplayName:f}}),D=e.tooltip.webFallback?.label??``;m=Da;let O=`open-in-agent-item-${r.id}`,k;t[43]===r.id?k=t[44]:(k=(0,Z.jsx)(wy,{id:r.id,"aria-hidden":`true`,className:`mr-2`}),t[43]=r.id,t[44]=k);let A;t[45]===r.displayName?A=t[46]:(A=(0,Z.jsx)(`span`,{className:`flex-1`,children:r.displayName}),t[45]=r.displayName,t[46]=A);let j;t[47]===i?j=t[48]:(j=i?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:i}):null,t[47]=i,t[48]=j),t[49]!==E||t[50]!==k||t[51]!==A||t[52]!==j||t[53]!==O?(x=(0,Z.jsxs)(Oa,{"data-testid":O,"data-row-disabled":``,"aria-label":E,children:[k,A,j]}),t[49]=E,t[50]=k,t[51]=A,t[52]=j,t[53]=O,t[54]=x):x=t[54],p=Ea,h=`min-w-[260px]`,g=`open-in-agent-submenu-${r.id}`,_=(0,Z.jsx)(no,{className:`font-normal text-muted-foreground text-xs`,"data-testid":`open-in-agent-message-${r.id}`,children:e.tooltip.message}),t[55]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(aa,{}),t[55]=v):v=t[55],y=(0,Z.jsx)(oa,{onSelect:C,"data-testid":`open-in-agent-install-${r.id}`,children:(0,Z.jsx)(`span`,{children:e.tooltip.installAction.label})}),b=e.tooltip.webFallback?(0,Z.jsxs)(oa,{onSelect:T,"data-testid":`open-in-agent-web-fallback-${r.id}`,"aria-label":n({id:`lsOFZR`,values:{webFallbackLabel:D}}),children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:e.tooltip.webFallback.label}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:n({id:`Z9BoIy`})})]}):null}t[0]=n,t[1]=a,t[2]=o,t[3]=c,t[4]=d,t[5]=u,t[6]=l,t[7]=s,t[8]=r,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=b,t[18]=x,t[19]=S}else p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=t[16],b=t[17],x=t[18],S=t[19];if(S!==Symbol.for(`react.early_return_sentinel`))return S;let C;t[56]!==p||t[57]!==h||t[58]!==g||t[59]!==_||t[60]!==v||t[61]!==y||t[62]!==b?(C=(0,Z.jsxs)(p,{className:h,"data-testid":g,children:[_,v,y,b]}),t[56]=p,t[57]=h,t[58]=g,t[59]=_,t[60]=v,t[61]=y,t[62]=b,t[63]=C):C=t[63];let w;return t[64]!==m||t[65]!==x||t[66]!==C?(w=(0,Z.jsxs)(m,{children:[x,C]}),t[64]=m,t[65]=x,t[66]=C,t[67]=w):w=t[67],w}function My(){}function Ny(){}function Py(e){let t=(0,$.c)(12),{className:n}=e,{states:r,refresh:i}=_h(),{dispatch:a}=oh(),o=Ma(),s,c;if(t[0]!==n||t[1]!==a||t[2]!==i||t[3]!==r||t[4]!==o){let e=Jm({workspace:o});t[7]===n?s=t[8]:(s=vi(`grid w-full max-w-5xl gap-4 sm:grid-cols-3`,n),t[7]=n,t[8]=s),c=hm.map(t=>{let n=r[t.id]?.installed,o=n===!0?`installed`:n===!1?`missing`:`pending`;return(0,Z.jsx)(Fy,{target:t,status:o,onOpen:o===`installed`&&e!==null?()=>{a(t.id,e)}:void 0,onInstall:()=>{Xm(t),i()}},t.id)}),t[0]=n,t[1]=a,t[2]=i,t[3]=r,t[4]=o,t[5]=s,t[6]=c}else s=t[5],c=t[6];let l;return t[9]!==s||t[10]!==c?(l=(0,Z.jsx)(`div`,{className:s,children:c}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Fy(e){let t=(0,$.c)(22),{target:n,status:r,onOpen:i,onInstall:a}=e,o=r===`installed`?i:r===`missing`?a:void 0,s=r===`pending`||r===`installed`&&i===void 0,c=r===`installed`?`Open`:r===`missing`?`Install`:`Checking`,l;t[0]===n.id?l=t[1]:(l=(0,Z.jsx)(wy,{id:n.id,"aria-hidden":`true`,className:`size-4`}),t[0]=n.id,t[1]=l);let u;t[2]===n.displayName?u=t[3]:(u=(0,Z.jsx)(`h3`,{className:`text-sm font-medium leading-tight`,children:n.displayName}),t[2]=n.displayName,t[3]=u);let d;t[4]!==l||t[5]!==u?(d=(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[l,u]}),t[4]=l,t[5]=u,t[6]=d):d=t[6];let f;t[7]===n.tagline?f=t[8]:(f=n.tagline?(0,Z.jsx)(`p`,{className:`text-1sm leading-relaxed text-muted-foreground`,children:n.tagline}):null,t[7]=n.tagline,t[8]=f);let p;t[9]!==d||t[10]!==f?(p=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[d,f]}),t[9]=d,t[10]=f,t[11]=p):p=t[11];let m;t[12]===r?m=t[13]:(m=r===`missing`?(0,Z.jsx)(Co,{"aria-hidden":`true`,className:`size-3`}):null,t[12]=r,t[13]=m);let h;t[14]!==c||t[15]!==m?(h=(0,Z.jsxs)(`p`,{className:`mt-auto inline-flex items-center gap-1 pt-2 font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:[c,m]}),t[14]=c,t[15]=m,t[16]=h):h=t[16];let g;return t[17]!==s||t[18]!==o||t[19]!==p||t[20]!==h?(g=(0,Z.jsxs)(`button`,{type:`button`,onClick:o,disabled:s,className:`group flex h-full flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:cursor-not-allowed disabled:opacity-60`,children:[p,h]}),t[17]=s,t[18]=o,t[19]=p,t[20]=h,t[21]=g):g=t[21],g}var Iy=3100,Ly=3;function Ry(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??Ly;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var zy={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},By=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function Vy(e,t={}){let n=t.rng??Math.random,r=t.colors??By,i=zy[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var Hy=1.8,Uy=90,Wy=16,Gy=380,Ky=.025,qy=.1,Jy=.18,Yy=400,Xy=9.2736,Zy=18.1799,Qy=14.5244,$y={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function eb(e,t){let{halfWidth:n,apexLift:r}=$y[t];return`M${e-n} ${Qy+.3} Q${e} ${Qy-r}, ${e+n} ${Qy+.3}`}function tb(e){let t=1.5,n=.3;return`M${e-t} ${Qy-n} Q${e} ${Qy+1.4}, ${e+t} ${Qy-n}`}var nb=15,rb=15;function ib(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function ab(e){let t=(0,$.c)(71),{size:n,className:r,trackMouse:i,variant:a,celebrateSignal:o}=e,s=n===void 0?48:n,c=i===void 0?!0:i,l=a===void 0?`default`:a,u=o===void 0?0:o,d=(0,Q.useRef)(null),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={x:0,y:0},t[0]=m):m=t[0];let h=(0,Q.useRef)(m),[g,_]=(0,Q.useState)(0),[v,y]=(0,Q.useState)(0),b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[1]=b):b=t[1];let[x,S]=(0,Q.useState)(b),C=(0,Q.useRef)(0),w=(0,Q.useRef)(void 0),T=l===`sleeping`,E;t[2]!==g||t[3]!==T?(E=function(){if(T)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=C.current===0?1/0:e-C.current;C.current=e;let n=Ry(g,t);_(n),y(lb),S(Vy(n)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Iy)},t[2]=g,t[3]=T,t[4]=E):E=t[4];let D=E,O,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>()=>clearTimeout(w.current),k=[],t[5]=O,t[6]=k):(O=t[5],k=t[6]),(0,Q.useEffect)(O,k);let A,j;t[7]!==u||t[8]!==T?(A=()=>{u===0||T||(_(3),y(cb),S(Vy(3)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Iy))},j=[u,T],t[7]=u,t[8]=T,t[9]=A,t[10]=j):(A=t[9],j=t[10]),(0,Q.useEffect)(A,j);let M,N;t[11]!==T||t[12]!==c?(M=()=>{if(!c||T||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,l=function(){s===0&&(s=requestAnimationFrame(m))},u=function(r){e=r.clientX,t=r.clientY,n=!0,l()};function m(){s=0;let c=f.current,u=d.current;if(!c||!u){l();return}let m=n;n=!1;let g=c.getBoundingClientRect(),_=g.left+g.width/2,v=g.top+g.height*.48,y=e-_,b=t-v,x=Math.hypot(y,b),S=Math.max(-1,Math.min(1,y/Gy)),C=Math.max(-1,Math.min(1,b/Gy)),w=S*Wy,T=-C*Wy,E=0,D=0;if(x>=1){let e=Math.min(x/Uy,1)*Hy;E=y/x*e,D=b/x*e}let O=Math.abs(T-r)<.01&&Math.abs(w-i)<.01&&Math.abs(E-a)<.01&&Math.abs(D-o)<.01;if(!m&&O)return;l(),r+=(T-r)*qy,i+=(w-i)*qy,u.style.transform=`perspective(${Yy}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(E-a)*Jy,o+=(D-o)*Jy;let k=i*Ky,A=-r*Ky,j=a+k,M=o+A;h.current.x=j,h.current.y=M,p.current?.setAttribute(`transform`,`translate(${j.toFixed(3)} ${M.toFixed(3)})`)}return document.addEventListener(`mousemove`,u,{passive:!0}),l(),()=>{document.removeEventListener(`mousemove`,u),s!==0&&cancelAnimationFrame(s),s=0,d.current&&(d.current.style.transform=``),h.current={x:0,y:0},p.current?.removeAttribute(`transform`)}},N=[c,T],t[11]=T,t[12]=c,t[13]=M,t[14]=N):(M=t[13],N=t[14]),(0,Q.useEffect)(M,N);let P;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{let e=p.current;if(!e)return;let{x:t,y:n}=h.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[15]=P):P=t[15],(0,Q.useLayoutEffect)(P);let F=g>0,I=F?g:1,L=F?`ok-blob-clicked-${g}`:null,R;t[16]===r?R=t[17]:(R=vi(`ok-blob-3d-wrapper`,r),t[16]=r,t[17]=R);let z=T?`cursor-default`:`cursor-pointer`,B=`body-${v}`,V=T&&`ok-blob-sleeping`,H;t[18]!==L||t[19]!==V?(H=vi(`ok-blob-group`,V,L),t[18]=L,t[19]=V,t[20]=H):H=t[20];let U;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(`path`,{d:`M25.2339 6.78134C25.5199 7.35734 25.8179 8.47234 26.0179 9.07834C26.0189 9.08234 26.0209 9.08634 26.0219 9.09134C26.0229 9.09534 26.0249 9.10034 26.0259 9.10434C26.0539 9.19734 26.0949 9.29533 26.1519 9.41633C26.2919 9.71133 26.5269 10.1173 27.1299 11.1683C27.3259 11.4643 27.5209 11.7693 27.7119 12.0903C29.9739 15.1623 29.3259 20.1913 27.0469 22.9153C26.7779 23.2953 26.4869 23.6043 26.1889 23.8863C26.1519 23.9253 26.1129 23.9643 26.0729 24.0033C25.3159 24.7543 24.2949 25.4673 23.6129 25.8323C22.7469 26.2983 22.1349 26.5483 21.6299 26.7463C20.3649 27.3063 19.0609 27.7733 17.6569 28.0423C15.9649 28.3513 14.1939 28.4433 12.4569 28.1373C11.4779 27.9663 10.5119 27.6663 9.60891 27.2493C8.77491 26.8663 7.99192 26.3853 7.26992 25.8403C6.83592 25.5393 6.43893 25.2343 6.08093 24.9383C5.57893 24.5223 5.15993 24.1263 4.83493 23.7793C4.04993 22.9443 3.31593 21.8893 2.80893 21.0953C2.72593 20.9663 2.64792 20.8433 2.57592 20.7293C2.56192 20.7093 2.54793 20.6893 2.53393 20.6703C2.08593 20.0263 1.71892 19.3293 1.43792 18.5993C1.42892 18.5453 1.42093 18.4903 1.41293 18.4353C1.32093 17.7443 1.08292 16.9423 1.01092 15.6333C0.984921 15.0653 0.998928 14.4013 1.12393 13.6353C1.20693 13.1413 1.31993 12.9023 1.40893 12.7113C1.43593 12.6543 1.46193 12.6023 1.48593 12.5483C1.56793 12.3653 1.59392 12.1563 1.63592 11.9083C1.68992 11.5883 1.76992 11.1943 2.04592 10.7553C2.94392 9.37934 3.36792 8.81934 3.66592 8.33934C3.75592 8.20334 3.84292 8.08134 3.94192 7.96634C4.21592 7.64634 4.67693 7.29534 5.10293 7.05734C5.16693 7.02234 5.23093 6.98834 5.29193 6.95534C5.62993 6.77834 6.22592 6.30135 6.66992 5.92035C6.83692 5.77635 7.08193 5.60735 7.37393 5.40935C7.67393 5.20535 8.02593 4.96934 8.39193 4.70234C9.32093 4.02634 9.84091 3.69134 10.2599 3.42334C10.3799 3.34734 10.4919 3.27734 10.6049 3.20834C10.9609 2.98834 11.4149 2.73034 11.8869 2.48634C12.4519 2.19334 13.0469 1.92133 13.5089 1.72233C14.7399 1.30233 16.0539 1.01333 17.4169 1.00033C18.1169 0.991333 18.7939 1.16534 19.2389 1.43034C19.6869 1.69534 19.8689 2.00335 19.8039 2.23935C19.7379 2.47835 19.4399 2.63634 19.0109 2.74734C18.5789 2.85634 18.0469 2.92035 17.4889 2.96135C16.3639 3.04235 15.2399 3.36435 14.1499 3.80835C12.8199 4.35135 11.5379 5.07133 10.2719 5.84733C9.38691 6.39133 8.51192 6.97334 7.63592 7.56834C7.54492 7.63034 7.45492 7.69135 7.36492 7.75235C6.97392 8.06635 6.58293 8.38134 6.22293 8.66334C5.97893 8.85734 5.76793 9.04834 5.59393 9.21434C5.26893 9.52334 5.02393 9.74334 4.81893 9.93934C4.67793 10.0753 4.55793 10.2013 4.45593 10.3443C4.40093 10.4213 4.32992 10.5273 4.24792 10.6593C3.90492 11.1933 3.44493 12.1693 3.15393 13.1173C3.01893 13.5363 2.87991 14.0343 2.79391 14.5253C2.66591 15.2253 2.65594 15.9053 2.71994 16.2373C2.82794 16.8193 2.95593 17.4833 3.14093 18.0553C3.31293 18.6003 3.52991 19.0583 3.70791 19.2823C3.81591 19.4183 3.90394 19.5473 3.99594 19.6913C4.09394 19.8413 4.19191 20.0073 4.31091 20.2033C4.47891 20.4803 4.68592 20.8163 5.00192 21.2493C5.36492 21.7463 5.61793 22.1043 5.83493 22.4023C6.14493 22.8243 6.38591 23.1343 6.83691 23.5033C7.33891 23.9113 7.86593 24.3113 8.26693 24.6393C8.44893 24.7883 8.66993 24.9443 8.90493 25.0963C9.21593 25.2963 9.55192 25.4893 9.85592 25.6703C10.1059 25.8203 10.3059 25.9633 10.4869 26.0863C10.5429 26.1243 10.5979 26.1603 10.6519 26.1943C10.8699 26.2803 11.0929 26.3593 11.3159 26.4283C11.3539 26.4323 11.3949 26.4353 11.4369 26.4393C11.6509 26.4573 11.9089 26.4733 12.2209 26.5133C12.7169 26.5753 13.1399 26.6603 13.6019 26.7243C13.9589 26.7733 14.3409 26.8083 14.7729 26.7893C15.0729 26.7753 15.4069 26.7353 15.7389 26.6813C16.2349 26.6023 16.7179 26.4943 17.0569 26.4473C17.1499 26.4343 17.2359 26.4343 17.3209 26.4373C17.3489 26.4393 17.3799 26.4413 17.4109 26.4433C17.4119 26.4433 17.4119 26.4433 17.4129 26.4433C17.4199 26.4433 17.4279 26.4443 17.4349 26.4443C18.2329 26.2413 19.0259 25.9433 19.7959 25.5983C19.8609 25.5633 19.9259 25.5273 19.9899 25.4913C20.3059 25.3173 20.6049 25.1383 20.7869 24.9943C20.9829 24.8393 21.5189 24.5373 22.0579 24.1853C22.4109 23.9553 22.7649 23.7053 23.0369 23.4833C23.1949 23.3553 23.3689 23.2693 23.5479 23.1773C23.7129 23.0923 23.8809 23.0013 24.0349 22.8653C24.1109 22.7983 24.1869 22.7173 24.2639 22.6303C24.3309 22.5563 24.4039 22.4723 24.4759 22.3923C24.5459 22.3153 24.7199 22.1723 24.9139 21.9793C25.0079 21.8863 25.1059 21.7783 25.1909 21.6713C25.2199 21.6323 25.2489 21.5943 25.2769 21.5553C25.5919 21.0403 25.8779 20.5003 26.1019 19.9653C26.1299 19.8403 26.1379 19.7293 26.1279 19.6373C26.1199 19.5703 26.1029 19.5113 26.0839 19.4503C26.0599 19.3643 26.0329 19.2773 26.0239 19.1723C26.0169 19.0893 26.0309 19.0043 26.0629 18.9543C26.0779 18.9323 26.0969 18.9143 26.1129 18.8993C26.1329 18.8823 26.1499 18.8673 26.1569 18.8443C26.1609 18.8273 26.1579 18.8073 26.1529 18.7833C26.1459 18.7443 26.1369 18.6943 26.1539 18.6293C26.2189 18.3853 26.2869 18.1103 26.3319 17.8383C26.3829 17.5393 26.4049 17.2433 26.3949 17.0123C26.3849 16.7493 26.3909 16.3823 26.3469 16.0003C26.3179 15.7343 26.2659 15.4663 26.1979 15.2383C26.1319 15.0143 26.0219 14.7913 25.9039 14.5783C25.7629 14.3223 25.6119 14.0783 25.5169 13.8453C25.4969 13.7983 25.4999 13.7263 25.4999 13.6323C25.5009 13.5673 25.4999 13.4913 25.4919 13.4083C25.3239 13.1243 25.1459 12.8423 24.9589 12.5483C24.9479 12.5413 24.9369 12.5333 24.9249 12.5263C24.6689 12.3503 24.3139 12.1173 24.0769 11.5503C24.0179 11.4063 24.0069 11.2983 23.9969 11.1993C23.9859 11.1013 23.9799 11.0183 23.9289 10.9093C23.8709 10.7853 23.7759 10.6583 23.6709 10.4993C23.5849 10.3703 23.4899 10.2133 23.4199 10.0423C23.3819 9.95134 23.3509 9.85734 23.3329 9.75934C23.3299 9.74334 23.3269 9.72534 23.3229 9.70634C23.2899 9.52734 23.2439 9.26534 23.2409 8.98634C23.0209 8.24434 22.8339 7.48833 22.6519 6.77633C22.3429 5.57133 22.0519 4.54234 21.3329 3.95434C20.9839 3.65334 20.5689 3.35433 20.2459 3.05433C19.9259 2.75633 19.7449 2.47534 19.8019 2.23834C19.8639 2.00634 20.1589 1.82934 20.6659 1.80534C21.1699 1.78334 21.8699 1.93235 22.5209 2.39235C23.6159 3.14235 24.2029 4.38334 24.5599 5.35734C24.5829 5.40834 24.6049 5.46034 24.6259 5.51234C24.7849 5.89434 24.9529 6.22834 25.1199 6.55534C25.1579 6.63034 25.1969 6.70834 25.2339 6.78134Z`,className:`ok-blob-body`}),t[21]=U):U=t[21];let W=(F||T)&&`ok-blob-eye-hidden`,G;t[22]===W?G=t[23]:(G=vi(`ok-blob-eye`,W),t[22]=W,t[23]=G);let K;t[24]===G?K=t[25]:(K=(0,Z.jsx)(`ellipse`,{cx:Xy,cy:Qy,rx:1.2722,ry:1.9083,className:G}),t[24]=G,t[25]=K);let ee=(F||T)&&`ok-blob-eye-hidden`,q;t[26]===ee?q=t[27]:(q=vi(`ok-blob-eye ok-blob-eye-right`,ee),t[26]=ee,t[27]=q);let te;t[28]===q?te=t[29]:(te=(0,Z.jsx)(`ellipse`,{cx:Zy,cy:Qy,rx:1.2722,ry:1.9083,className:q}),t[28]=q,t[29]=te);let ne;t[30]===I?ne=t[31]:(ne=eb(Xy,I),t[30]=I,t[31]=ne);let re=(!F||T)&&`ok-blob-eye-hidden`,ie;t[32]===re?ie=t[33]:(ie=vi(`ok-blob-happy-eye`,re),t[32]=re,t[33]=ie);let ae;t[34]!==ne||t[35]!==ie?(ae=(0,Z.jsx)(`path`,{d:ne,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ie}),t[34]=ne,t[35]=ie,t[36]=ae):ae=t[36];let oe;t[37]===I?oe=t[38]:(oe=eb(Zy,I),t[37]=I,t[38]=oe);let se=(!F||T)&&`ok-blob-eye-hidden`,ce;t[39]===se?ce=t[40]:(ce=vi(`ok-blob-happy-eye`,se),t[39]=se,t[40]=ce);let le;t[41]!==oe||t[42]!==ce?(le=(0,Z.jsx)(`path`,{d:oe,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ce}),t[41]=oe,t[42]=ce,t[43]=le):le=t[43];let J;t[44]===T?J=t[45]:(J=T?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`path`,{d:tb(Xy),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,Z.jsx)(`path`,{d:tb(Zy),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[44]=T,t[45]=J);let ue;t[46]!==K||t[47]!==te||t[48]!==ae||t[49]!==le||t[50]!==J?(ue=(0,Z.jsxs)(`g`,{ref:p,children:[K,te,ae,le,J]}),t[46]=K,t[47]=te,t[48]=ae,t[49]=le,t[50]=J,t[51]=ue):ue=t[51];let de;t[52]!==B||t[53]!==H||t[54]!==ue?(de=(0,Z.jsxs)(`g`,{className:H,children:[U,ue]},B),t[52]=B,t[53]=H,t[54]=ue,t[55]=de):de=t[55];let fe;t[56]===T?fe=t[57]:(fe=T?(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,Z.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[56]=T,t[57]=fe);let pe;t[58]!==v||t[59]!==x?(pe=x.length>0&&(0,Z.jsx)(`g`,{children:x.map(ob)},`firework-${v}`),t[58]=v,t[59]=x,t[60]=pe):pe=t[60];let me;t[61]!==D||t[62]!==s||t[63]!==z||t[64]!==de||t[65]!==fe||t[66]!==pe?(me=(0,Z.jsxs)(`svg`,{ref:f,width:s,height:s,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:z,"aria-hidden":`true`,onClick:D,onMouseDown:sb,children:[de,fe,pe]}),t[61]=D,t[62]=s,t[63]=z,t[64]=de,t[65]=fe,t[66]=pe,t[67]=me):me=t[67];let he;return t[68]!==R||t[69]!==me?(he=(0,Z.jsx)(`span`,{ref:d,className:R,children:me}),t[68]=R,t[69]=me,t[70]=he):he=t[70],he}function ob(e){return(0,Z.jsx)(`circle`,{cx:nb+e.originDx,cy:rb+e.originDy,r:e.size,className:`ok-blob-firework`,style:ib(e)},e.id)}function sb(e){return e.preventDefault()}function cb(e){return e+1}function lb(e){return e+1}function ub(e){let t=(0,$.c)(12),{title:n,subtitle:r,celebrateSignal:i}=e,a;t[0]===i?a=t[1]:(a=(0,Z.jsx)(ab,{size:64,celebrateSignal:i}),t[0]=i,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,Z.jsx)(`h2`,{className:`text-2xl font-light tracking-tighter text-balance`,children:n}),t[2]=n,t[3]=o);let s;t[4]===r?s=t[5]:(s=r?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r}):null,t[4]=r,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[a,c]}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function db(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`kbd`,{"data-slot":`kbd`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fb(){let e=(0,$.c)(2),t=Wn()?`⌘ K`:`Ctrl K`,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(db,{children:t}),e[0]=n):n=e[0];let r;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[n,` `,(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`A1taO8`})})]}),e[1]=r):r=e[1],r}var pb=`open-knowledge:create-top-level-file`;function mb(){window.dispatchEvent(new CustomEvent(pb))}function hb(e){let t=()=>e();return window.addEventListener(pb,t),()=>window.removeEventListener(pb,t)}function gb(){let e=(0,$.c)(14),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(void 0),[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(0),l=(0,Q.useRef)(!1),u=(0,Q.useRef)(void 0),d,f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{let e=!1,t=async function(){try{let t=await fetch(`/api/documents`),n=await t.json().catch(bb);if(e)return;let r=t.ok?ir.safeParse(n):null;r?.success?(o(xb(r.data.documents)),l.current=!0):l.current||=(o(1),!0)}catch{!e&&!l.current&&(o(1),l.current=!0)}};t();let n=fi(e=>{e.includes(`files`)&&t()});return()=>{e=!0,n(),clearTimeout(u.current)}},f=[],e[0]=d,e[1]=f):(d=e[0],f=e[1]),(0,Q.useEffect)(d,f);let p;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=function(){clearTimeout(u.current),u.current=setTimeout(()=>c(yb),500),fetch(`/api/documents`).then(async e=>{let t=await e.json().catch(vb);if(!e.ok)return;let n=ir.safeParse(t);n.success&&o(xb(n.data.documents))}).catch(_b)},e[2]=p):p=e[2];let m=p,h=a!==null,g=a===0,_;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=function(e){n(e),e||i(void 0)},e[3]=_):_=e[3];let v=_,y;e[4]!==s||e[5]!==g||e[6]!==h?(y=h?g?(0,Z.jsx)(Sb,{celebrateSignal:s,onPackSelect:e=>{i(e),n(!0)}}):(0,Z.jsx)(Cb,{celebrateSignal:s,onAddStarterPack:()=>{n(!0)}}):null,e[4]=s,e[5]=g,e[6]=h,e[7]=y):y=e[7];let b;e[8]!==r||e[9]!==t?(b=(0,Z.jsx)(lm,{open:t,onOpenChange:v,onSeedApplied:m,initialPackId:r}),e[8]=r,e[9]=t,e[10]=b):b=e[10];let x;return e[11]!==y||e[12]!==b?(x=(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center overflow-y-auto px-6 subtle-scrollbar`,children:[y,b]}),e[11]=y,e[12]=b,e[13]=x):x=e[13],x}function _b(){}function vb(){return null}function yb(e){return e+1}function bb(){return null}function xb(e){return oi(e).filter(e=>e.kind===`document`||e.kind===`folder`).length}function Sb(e){let t=(0,$.c)(16),{celebrateSignal:n,onPackSelect:r}=e,{_:a}=i(),o;t[0]===a?o=t[1]:(o=a({id:`ZmGmNh`}),t[0]=a,t[1]=o);let c;t[2]===a?c=t[3]:(c=a({id:`W8uemY`}),t[2]=a,t[3]=c);let l;t[4]!==n||t[5]!==o||t[6]!==c?(l=(0,Z.jsx)(ub,{title:o,subtitle:c,celebrateSignal:n}),t[4]=n,t[5]=o,t[6]=c,t[7]=l):l=t[7];let u;t[8]===r?u=t[9]:(u=(0,Z.jsx)(nm,{onPackSelect:r}),t[8]=r,t[9]=u);let d;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Ti,{variant:`link`,className:`text-muted-foreground font-normal justify-end`,size:`sm`,onClick:mb,children:(0,Z.jsx)(s,{id:`ensWZc`,components:{0:(0,Z.jsx)(Ki,{"aria-hidden":`true`,className:`size-3`})}})}),t[10]=d):d=t[10];let f;t[11]===u?f=t[12]:(f=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[u,d]}),t[11]=u,t[12]=f);let p;return t[13]!==l||t[14]!==f?(p=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-10 py-12 max-w-5xl my-auto`,children:[l,f]}),t[13]=l,t[14]=f,t[15]=p):p=t[15],p}function Cb(e){let t=(0,$.c)(19),{celebrateSignal:n,onAddStarterPack:r}=e,{_:a}=i(),o;t[0]===a?o=t[1]:(o=a({id:`8XS8nG`}),t[0]=a,t[1]=o);let c;t[2]===a?c=t[3]:(c=a({id:`GjElCU`}),t[2]=a,t[3]=c);let l;t[4]!==n||t[5]!==o||t[6]!==c?(l=(0,Z.jsx)(ub,{title:o,subtitle:c,celebrateSignal:n}),t[4]=n,t[5]=o,t[6]=c,t[7]=l):l=t[7];let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Py,{}),t[8]=u):u=t[8];let d,p;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(f,{"aria-hidden":`true`,className:`size-3`}),p=(0,Z.jsx)(s,{id:`IajAbS`}),t[9]=d,t[10]=p):(d=t[9],p=t[10]);let m;t[11]===r?m=t[12]:(m=(0,Z.jsxs)(Ti,{onClick:r,variant:`link`,size:`xs`,className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground font-normal hover:text-foreground hover:no-underline`,children:[d,p]}),t[11]=r,t[12]=m);let h;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(fb,{}),t[13]=h):h=t[13];let g;t[14]===m?g=t[15]:(g=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-4`,children:[u,(0,Z.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-4`,children:[m,h]})]}),t[14]=m,t[15]=g);let _;return t[16]!==l||t[17]!==g?(_=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-10 py-12 max-w-5xl my-auto`,children:[l,g]}),t[16]=l,t[17]=g,t[18]=_):_=t[18],_}function wb(e){let t=(0,$.c)(76),{folderPath:n,state:r,onChange:a}=e,{_:o}=i(),[c,l]=(0,Q.useState)(!1),[u,d]=(0,Q.useState)(null),[p,m]=(0,Q.useState)(null);if(r.status===`idle`||r.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card p-4 space-y-3`,children:[(0,Z.jsx)(Eb,{}),(0,Z.jsx)(Ha,{className:`h-7 w-full`}),(0,Z.jsx)(Ha,{className:`h-7 w-full`}),(0,Z.jsx)(Ha,{className:`h-7 w-full`})]}),t[0]=e):e=t[0],e}if(r.status===`error`){let{message:e}=r,n;return t[1]===e?n=t[2]:(n=(0,Z.jsx)(`section`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,Z.jsx)(s,{id:`4UMKtb`,values:{message:e}})}),t[1]=e,t[2]=n),n}let h;t[3]===r.data.folder.frontmatter_defaults?h=t[4]:(h=r.data.folder.frontmatter_defaults??{},t[3]=r.data.folder.frontmatter_defaults,t[4]=h);let g=h,_;t[5]===r.data.frontmatterLocal?_=t[6]:(_=r.data.frontmatterLocal??{},t[5]=r.data.frontmatterLocal,t[6]=_);let v=_,y=r.data.frontmatterSources,b;t[7]===r.data.folder.path?b=t[8]:(b=ho(r.data.folder.path),t[7]=r.data.folder.path,t[8]=b);let x=b,S,C,w,T,E,D,O,k,A,j,M,N,P;if(t[9]!==o||t[10]!==u||t[11]!==c||t[12]!==x||t[13]!==n||t[14]!==v||t[15]!==g||t[16]!==a||t[17]!==p||t[18]!==y){let e=Object.keys(g),r=async function(e,t){let r=await qi(n,{[e]:t});if(!r.ok){let{error:e}=r;Vo.error(o({id:`xXo8FT`,values:{error:e}}));return}a()},i=async function(e){let t=await qi(n,{[e]:null});if(!t.ok){let{error:e}=t;Vo.error(o({id:`ZU8VV_`,values:{error:e}}));return}a()},f=function(e,t){let n=g[e];r(e,fa(n,t))},h;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(h=function(){d({name:``,type:`text`,value:``,error:null}),l(!1)},t[32]=h):h=t[32],w=h;let _;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(_=function(e){d(t=>{if(!t)return t;let n=e===`date`?new Date().toISOString().slice(0,10):Yi[e];return{...t,type:e,value:n,error:null}})},t[33]=_):_=t[33],E=_;let b;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(b=function(e){d(t=>t&&{...t,value:e})},t[34]=b):b=t[34],D=b;let F;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(e){d(t=>t&&{...t,name:e,error:null})},t[35]=F):F=t[35],T=F;let I;t[36]!==o||t[37]!==u||t[38]!==n||t[39]!==g||t[40]!==a?(I=async function(){if(!u)return;let e=u.name.trim();if(!e){d({...u,error:o({id:`8_brI5`})});return}if(Object.hasOwn(g,e)){d({...u,error:o({id:`6lBXm5`,values:{trimmed:e}})});return}let t=await qi(n,{[e]:u.value});if(!t.ok){d({...u,error:t.error});return}d(null),a()},t[36]=o,t[37]=u,t[38]=n,t[39]=g,t[40]=a,t[41]=I):I=t[41],O=I;let L=function(e){m({key:e,draft:e,error:null})},R=function(e){m(t=>t&&{...t,draft:e,error:null})},z=async function(){if(!p)return;let e=p.draft.trim();if(!e){m({...p,error:o({id:`8_brI5`})});return}if(e===p.key){m(null);return}if(Object.hasOwn(g,e)){m({...p,error:o({id:`6lBXm5`,values:{trimmed:e}})});return}let t=g[p.key],r=await qi(n,{[p.key]:null,[e]:t});if(!r.ok){m({...p,error:r.error});return}m(null),a()},B=function(){m(null)};P=`rounded-lg border bg-card`,C=Ko,j=!c,t[42]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>l(!e),t[42]=M):M=t[42];let V=`size-3 transition-transform ${c?``:`rotate-90`}`,H;t[43]===V?H=t[44]:(H=(0,Z.jsx)(Ho,{className:V,"aria-hidden":!0}),t[43]=V,t[44]=H);let U;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`IX_qeH`})}),t[45]=U):U=t[45];let W;t[46]===H?W=t[47]:(W=(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:[H,U]}),t[46]=H,t[47]=W);let G;t[48]===x?G=t[49]:(G=(0,Z.jsx)(`code`,{className:`text-xs text-muted-foreground font-mono cursor-text select-text`,onClick:Tb,children:x}),t[48]=x,t[49]=G),t[50]!==W||t[51]!==G?(N=(0,Z.jsxs)(Go,{className:`flex w-full cursor-pointer items-center justify-between gap-2 px-3 py-2.5 data-[state=open]:border-b border-border`,children:[W,G]}),t[50]=W,t[51]=G,t[52]=N):N=t[52],S=Wo,k=`px-2 py-2`,A=e.length===0&&!u?(0,Z.jsx)(`p`,{className:`px-1 py-1 text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`50Y3WA`})}):e.map(e=>{let t=g[e],n=Object.hasOwn(v,e);return(0,Z.jsx)(xa,{keyName:e,value:t,declared:Ka(t,Kr(t)),rename:n?{state:p?.key===e?p:null,onBegin:()=>L(e),onChangeDraft:R,onCommit:z,onCancel:B}:void 0,badge:n?null:(0,Z.jsx)(Zi,{source:y[e]??``}),isInherited:!n,onCommit:t=>void r(e,t),onChangeType:t=>f(e,t),onRemove:n?()=>void i(e):void 0},e)}),t[9]=o,t[10]=u,t[11]=c,t[12]=x,t[13]=n,t[14]=v,t[15]=g,t[16]=a,t[17]=p,t[18]=y,t[19]=S,t[20]=C,t[21]=w,t[22]=T,t[23]=E,t[24]=D,t[25]=O,t[26]=k,t[27]=A,t[28]=j,t[29]=M,t[30]=N,t[31]=P}else S=t[19],C=t[20],w=t[21],T=t[22],E=t[23],D=t[24],O=t[25],k=t[26],A=t[27],j=t[28],M=t[29],N=t[30],P=t[31];let F;t[53]!==u||t[54]!==w||t[55]!==T||t[56]!==E||t[57]!==D||t[58]!==O?(F=u?(0,Z.jsx)(po,{draft:u,onChangeName:T,onChangeType:E,onChangeValue:D,onCommit:()=>void O(),onCancel:()=>d(null)}):(0,Z.jsxs)(Ti,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`add-property-trigger`,onClick:w,className:`mt-1 flex items-center gap-1.5 rounded px-2 py-1 font-medium text-sm hover:bg-muted/50 hover:text-foreground`,children:[(0,Z.jsx)(f,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`F-NRCj`})})]}),t[53]=u,t[54]=w,t[55]=T,t[56]=E,t[57]=D,t[58]=O,t[59]=F):F=t[59];let I;t[60]!==F||t[61]!==k||t[62]!==A?(I=(0,Z.jsxs)(`div`,{className:k,children:[A,F]}),t[60]=F,t[61]=k,t[62]=A,t[63]=I):I=t[63];let L;t[64]!==S||t[65]!==I?(L=(0,Z.jsx)(S,{children:I}),t[64]=S,t[65]=I,t[66]=L):L=t[66];let R;t[67]!==C||t[68]!==L||t[69]!==j||t[70]!==M||t[71]!==N?(R=(0,Z.jsxs)(C,{open:j,onOpenChange:M,children:[N,L]}),t[67]=C,t[68]=L,t[69]=j,t[70]=M,t[71]=N,t[72]=R):R=t[72];let z;return t[73]!==R||t[74]!==P?(z=(0,Z.jsx)(`section`,{className:P,children:R}),t[73]=R,t[74]=P,t[75]=z):z=t[75],z}function Tb(e){return e.stopPropagation()}function Eb(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(pc,{className:`size-4 text-muted-foreground`,"aria-hidden":!0}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t,(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(s,{id:`IX_qeH`})})]}),e[1]=n):n=e[1],n}function Db(e){let t=e.split(`/`).pop();return t?`${e}/${t}`:null}function Ob(e,t){let n=t.get(`${e}/index`);if(n)return n;let r=Db(e);if(r){let e=t.get(r);if(e)return e}return e.split(`/`).pop()??e}function kb(e,t,n){let r=n.get(e);return r&&r!==e?r:t}function Ab(e,t){let n=`${e}/`,r=[...t.folderPaths].filter(e=>e.startsWith(n)).map(e=>({path:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({path:e,rel:n})=>({kind:`folder`,path:e,name:n,title:Ob(e,t.pageTitles)})),i=[...t.pages].filter(e=>e.startsWith(n)).map(e=>({docName:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({docName:e,rel:n})=>{let r=t.pageMeta.get(e);return{kind:`file`,path:e,name:n,title:kb(e,n,t.pageTitles),size:r?.size??0,modified:r?.modified??``}}),a=[...r,...i].sort((e,t)=>e.kind===t.kind?e.title.localeCompare(t.title)||e.name.localeCompare(t.name):e.kind===`folder`?-1:1);return{title:Ob(e,t.pageTitles),children:a}}function jb(e){let t=(0,$.c)(54),{folderPath:n,state:r,onChange:a,folderConfigHandle:o}=e,{_:c}=i(),[l,u]=(0,Q.useState)(null),[d,p]=(0,Q.useState)(null),[m,h]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1),b;t[0]!==c||t[1]!==a?(b=async function(e){_(!0);let t=await ya(e.source_folder,e.name);if(_(!1),!t.ok){let{error:e}=t;Vo.error(c({id:`yOGrCR`,values:{error:e}}));return}let{name:n}=e;Vo.success(c({id:`I23A-U`,values:{name:n}})),p(null),a()},t[0]=c,t[1]=a,t[2]=b):b=t[2];let x=b;if(r.status===`idle`||r.status===`loading`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card px-3 py-2.5 space-y-3`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(s,{id:`-QCLWk`})})}),(0,Z.jsx)(Ha,{className:`h-12 w-full`}),(0,Z.jsx)(Ha,{className:`h-12 w-full`})]}),t[3]=e):e=t[3],e}if(r.status===`error`){let{message:e}=r,n;return t[4]===e?n=t[5]:(n=(0,Z.jsx)(`section`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,Z.jsx)(s,{id:`iDZtvM`,values:{message:e}})}),t[4]=e,t[5]=n),n}let S;t[6]===r.data.folder.templates_available?S=t[7]:(S=r.data.folder.templates_available??[],t[6]=r.data.folder.templates_available,t[7]=S);let C=S,w;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(s,{id:`-QCLWk`})}),t[8]=w):w=t[8];let T;t[9]===C.length?T=t[10]:(T=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[w,(0,Z.jsx)(ce,{className:`text-xs`,variant:`secondary`,children:C.length})]}),t[9]=C.length,t[10]=T);let E;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsxs)(Ti,{variant:`ghost`,className:`font-mono uppercase`,size:`sm`,onClick:()=>y(!0),children:[(0,Z.jsx)(f,{className:`size-3.5`,"aria-hidden":!0}),(0,Z.jsx)(s,{id:`G1Gw0v`})]}),t[11]=E):E=t[11];let D;t[12]===T?D=t[13]:(D=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-1`,children:[T,E]}),t[12]=T,t[13]=D);let O;t[14]===C?O=t[15]:(O=(0,Z.jsx)(`div`,{className:`px-3 py-2.5`,children:C.length===0?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`BHW0EW`})}):(0,Z.jsx)(`ul`,{className:`space-y-1`,children:C.map(e=>(0,Z.jsx)(Nb,{template:e,onCreate:()=>h(e.name),onEdit:()=>u(e),onDelete:()=>p(e)},e.path))})}),t[14]=C,t[15]=O);let k;t[16]!==D||t[17]!==O?(k=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card`,children:[D,O]}),t[16]=D,t[17]=O,t[18]=k):k=t[18];let A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>{e||u(null)},t[19]=A):A=t[19];let j;t[20]!==l||t[21]!==n||t[22]!==a?(j=(0,Z.jsx)(uo,{folderPath:n,template:l,onOpenChange:A,onSaved:a}),t[20]=l,t[21]=n,t[22]=a,t[23]=j):j=t[23];let M=!!d,N;t[24]===g?N=t[25]:(N=e=>{!e&&!g&&p(null)},t[24]=g,t[25]=N);let P;t[26]!==c||t[27]!==d||t[28]!==g||t[29]!==x?(P=d&&(()=>{let{name:e,path:t,scope:n}=d,r=n===`inherited`?`\n\n${c({id:`LUbzI-`})}`:``;return(0,Z.jsx)(Na,{itemName:c({id:`XfzqjK`,values:{name:e}}),isSubmitting:g,onDelete:()=>x(d),customDescription:`${c({id:`JVgg1-`,values:{path:t}})}${r}`})})(),t[26]=c,t[27]=d,t[28]=g,t[29]=x,t[30]=P):P=t[30];let F;t[31]!==M||t[32]!==N||t[33]!==P?(F=(0,Z.jsx)(zo,{open:M,onOpenChange:N,children:P}),t[31]=M,t[32]=N,t[33]=P,t[34]=F):F=t[34];let I;t[35]===C?I=t[36]:(I=new Set(C.map(Mb)),t[35]=C,t[36]=I);let L;t[37]!==n||t[38]!==v||t[39]!==a||t[40]!==I?(L=(0,Z.jsx)(_o,{folderPath:n,existingNames:I,open:v,onOpenChange:y,onCreated:a}),t[37]=n,t[38]=v,t[39]=a,t[40]=I,t[41]=L):L=t[41];let R=m!==null,z;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{e||h(null)},t[42]=z):z=t[42];let B=m??void 0,V;t[43]!==o||t[44]!==n||t[45]!==R||t[46]!==B?(V=(0,Z.jsx)(zp,{open:R,onOpenChange:z,kind:`file`,initialDir:n,initialTemplate:B,folderConfig:o}),t[43]=o,t[44]=n,t[45]=R,t[46]=B,t[47]=V):V=t[47];let H;return t[48]!==j||t[49]!==F||t[50]!==L||t[51]!==V||t[52]!==k?(H=(0,Z.jsxs)(Z.Fragment,{children:[k,j,F,L,V]}),t[48]=j,t[49]=F,t[50]=L,t[51]=V,t[52]=k,t[53]=H):H=t[53],H}function Mb(e){return e.name}function Nb(e){let t=(0,$.c)(51),{template:n,onCreate:r,onEdit:a,onDelete:o}=e,{_:c}=i(),l=n.title&&n.title!==n.name,u=n.title??n.name,d;t[0]===u?d=t[1]:(d=(0,Z.jsx)(`span`,{className:`font-medium truncate`,children:u}),t[0]=u,t[1]=d);let f;t[2]!==l||t[3]!==n.name?(f=l?(0,Z.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground shrink-0`,children:n.name}):null,t[2]=l,t[3]=n.name,t[4]=f):f=t[4];let p;t[5]!==n.name||t[6]!==n.scope||t[7]!==n.source_folder?(p=n.scope===`inherited`?(0,Z.jsx)(`span`,{className:`ml-auto shrink-0`,children:(0,Z.jsx)(Zi,{source:n.source_folder,target:`templates/${n.name}.md`})}):null,t[5]=n.name,t[6]=n.scope,t[7]=n.source_folder,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[d,f,p]}),t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;t[13]===n.description?h=t[14]:(h=n.description?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground truncate mt-0.5`,children:n.description}):null,t[13]=n.description,t[14]=h);let g;t[15]!==a||t[16]!==m||t[17]!==h?(g=(0,Z.jsxs)(`button`,{type:`button`,onClick:a,className:`min-w-0 flex-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm`,children:[m,h]}),t[15]=a,t[16]=m,t[17]=h,t[18]=g):g=t[18];let _;t[19]!==c||t[20]!==u?(_=c({id:`5m2Eho`,values:{label:u}}),t[19]=c,t[20]=u,t[21]=_):_=t[21];let v,y;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(uc,{className:`size-3.5`,"aria-hidden":!0}),y=(0,Z.jsx)(s,{id:`hYgDIe`}),t[22]=v,t[23]=y):(v=t[22],y=t[23]);let b;t[24]!==r||t[25]!==_?(b=(0,Z.jsxs)(Ti,{type:`button`,variant:`ghost`,size:`sm`,className:`font-mono uppercase shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100`,onClick:r,"aria-label":_,children:[v,y]}),t[24]=r,t[25]=_,t[26]=b):b=t[26];let x;t[27]!==c||t[28]!==u?(x=c({id:`Bx4EXG`,values:{label:u}}),t[27]=c,t[28]=u,t[29]=x):x=t[29];let S;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(va,{className:`size-4`,"aria-hidden":!0}),t[30]=S):S=t[30];let C;t[31]===x?C=t[32]:(C=(0,Z.jsx)(ga,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100`,"aria-label":x,children:S})}),t[31]=x,t[32]=C);let w,T;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(et,{"aria-hidden":!0}),T=(0,Z.jsx)(s,{id:`ePK91l`}),t[33]=w,t[34]=T):(w=t[33],T=t[34]);let E;t[35]===a?E=t[36]:(E=(0,Z.jsxs)(oa,{onSelect:a,children:[w,T]}),t[35]=a,t[36]=E);let D,O;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Z.jsx)(Pt,{"aria-hidden":!0}),O=(0,Z.jsx)(s,{id:`cnGeoo`}),t[37]=D,t[38]=O):(D=t[37],O=t[38]);let k;t[39]===o?k=t[40]:(k=(0,Z.jsxs)(oa,{variant:`destructive`,onSelect:o,children:[D,O]}),t[39]=o,t[40]=k);let A;t[41]!==E||t[42]!==k?(A=(0,Z.jsxs)(ta,{align:`end`,children:[E,k]}),t[41]=E,t[42]=k,t[43]=A):A=t[43];let j;t[44]!==C||t[45]!==A?(j=(0,Z.jsxs)(Ca,{children:[C,A]}),t[44]=C,t[45]=A,t[46]=j):j=t[46];let M;return t[47]!==b||t[48]!==j||t[49]!==g?(M=(0,Z.jsxs)(`li`,{className:`group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-muted/50 text-sm`,children:[g,b,j]}),t[47]=b,t[48]=j,t[49]=g,t[50]=M):M=t[50],M}function Pb(e){let t=(0,$.c)(14),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,containerClassName:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=vi(`relative w-full overflow-x-auto subtle-scrollbar`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=vi(`w-full caption-bottom text-sm`,n),t[6]=n,t[7]=o);let s;t[8]!==i||t[9]!==o?(s=(0,Z.jsx)(`table`,{"data-slot":`table`,className:o,...i}),t[8]=i,t[9]=o,t[10]=s):s=t[10];let c;return t[11]!==a||t[12]!==s?(c=(0,Z.jsx)(`div`,{"data-slot":`table-container`,className:a,children:s}),t[11]=a,t[12]=s,t[13]=c):c=t[13],c}function Fb(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`[&_tr]:border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`thead`,{"data-slot":`table-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ib(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`[&_tr:last-child]:border-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`tbody`,{"data-slot":`table-body`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Lb(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,noHover:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(i===void 0?!1:i)&&`hover:bg-transparent`,o;t[4]!==n||t[5]!==a?(o=vi(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,a,n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,Z.jsx)(`tr`,{"data-slot":`table-row`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function Rb(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,scope:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`col`:i,o;t[4]===n?o=t[5]:(o=vi(`font-mono uppercase text-xs text-muted-foreground h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,Z.jsx)(`th`,{"data-slot":`table-head`,scope:a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function zb(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`py-3 px-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`td`,{"data-slot":`table-cell`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Bb(e){if(!e)return`—`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return X._({id:`xOTzt5`});if(r<60)return X._({id:`NRSLBe`,values:{diffMin:r}});let i=Math.floor(r/60);if(i<24)return X._({id:`hDKtoF`,values:{diffHrs:i}});let a=Math.floor(i/24);return a<30?X._({id:`QDZbvN`,values:{diffDays:a}}):t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}function Vb(e,t,n){return[...e].sort((e,r)=>{if(e.kind!==r.kind)return e.kind===`folder`?-1:1;let i=0;switch(t){case`name`:i=e.title.localeCompare(r.title)||e.name.localeCompare(r.name);break;case`modified`:{let t=e.kind===`file`?e.modified:``,n=r.kind===`file`?r.modified:``;i=t.localeCompare(n);break}}return n===`asc`?i:-i})}function Hb(e){let t=(0,$.c)(10),{label:n,sortKey:r,activeKey:i,activeDir:a,onSort:o}=e,s=i===r,c;t[0]!==o||t[1]!==r?(c=()=>o(r),t[0]=o,t[1]=r,t[2]=c):c=t[2];let l;t[3]!==a||t[4]!==s?(l=s?a===`asc`?(0,Z.jsx)(pt,{className:`ml-1 size-3`}):(0,Z.jsx)(Tt,{className:`ml-1 size-3`}):(0,Z.jsx)(Hs,{className:`ml-1 size-3 text-muted-foreground/50`}),t[3]=a,t[4]=s,t[5]=l):l=t[5];let u;return t[6]!==n||t[7]!==c||t[8]!==l?(u=(0,Z.jsxs)(Ti,{variant:`ghost`,size:`sm`,className:`-ml-3 h-8 uppercase font-mono`,onClick:c,children:[n,l]}),t[6]=n,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function Ub(e){let t=(0,$.c)(92),{folderPath:n}=e,{_:r}=i(),{folderPaths:a,loading:o,pages:c,pageTitles:l,pageMeta:u}=ii(),d=Xa(n),{state:p,refresh:m}=d,[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(`name`),[y,b]=(0,Q.useState)(`asc`);if(o){let e;t[0]===r?e=t[1]:(e=r({id:`X9VpsP`}),t[0]=r,t[1]=e);let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Ha,{className:`size-5 rounded`}),(0,Z.jsx)(Ha,{className:`h-7 w-48`})]}),(0,Z.jsx)(Ha,{className:`h-9 w-20 rounded-md`})]}),t[2]=n):n=t[2];let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(Ha,{className:`h-4 w-16`}),t[3]=i):i=t[3];let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`,children:[n,(0,Z.jsxs)(`div`,{className:`rounded-lg border`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 border-b px-4 py-3`,children:[i,(0,Z.jsx)(`div`,{className:`ml-auto`,children:(0,Z.jsx)(Ha,{className:`h-4 w-20`})})]}),[`a`,`b`,`c`,`d`].map(Kb)]})]}),t[4]=a):a=t[4];let o;return t[5]===e?o=t[6]:(o=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,role:`status`,"aria-busy":`true`,"aria-label":e,children:a}),t[5]=e,t[6]=o),o}let x,S,C,w,T,E,D,O,k,A;if(t[7]!==r||t[8]!==p||t[9]!==d||t[10]!==n||t[11]!==a||t[12]!==u||t[13]!==l||t[14]!==c||t[15]!==m||t[16]!==y||t[17]!==_){let e=Ab(n,{pages:c,pageTitles:l,pageMeta:u,folderPaths:a}),i=Vb(e.children,_,y),o;t[28]===_?o=t[29]:(o=function(e){e===_?b(Gb):(v(e),b(`asc`))},t[28]=_,t[29]=o);let h=o;A=`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,E=`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`;let j;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Z.jsx)(L,{className:`size-5 text-muted-foreground`}),t[30]=j):j=t[30];let M=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[j,(0,Z.jsx)(`h1`,{className:`text-2xl font-light tracking-tight`,children:e.title})]}),N;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Z.jsxs)(Ti,{onClick:()=>g(!0),children:[(0,Z.jsx)(f,{className:`size-4`}),(0,Z.jsx)(s,{id:`isRobC`})]}),t[31]=N):N=t[31],t[32]===M?D=t[33]:(D=(0,Z.jsx)(`div`,{className:`flex flex-col gap-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[M,N]})}),t[32]=M,t[33]=D),t[34]!==p||t[35]!==n||t[36]!==m?(O=(0,Z.jsx)(wb,{folderPath:n,state:p,onChange:m}),t[34]=p,t[35]=n,t[36]=m,t[37]=O):O=t[37],t[38]!==p||t[39]!==d||t[40]!==n||t[41]!==m?(k=(0,Z.jsx)(jb,{folderPath:n,state:p,onChange:m,folderConfigHandle:d}),t[38]=p,t[39]=d,t[40]=n,t[41]=m,t[42]=k):k=t[42],T=`rounded-lg border`,S=Pb;let P=_===`name`?y===`asc`?`ascending`:`descending`:`none`,F;t[43]===r?F=t[44]:(F=r({id:`6YtxFj`}),t[43]=r,t[44]=F);let I;t[45]!==h||t[46]!==y||t[47]!==_||t[48]!==F?(I=(0,Z.jsx)(Hb,{label:F,sortKey:`name`,activeKey:_,activeDir:y,onSort:h}),t[45]=h,t[46]=y,t[47]=_,t[48]=F,t[49]=I):I=t[49];let R;t[50]!==P||t[51]!==I?(R=(0,Z.jsx)(Rb,{"aria-sort":P,children:I}),t[50]=P,t[51]=I,t[52]=R):R=t[52];let z=_===`modified`?y===`asc`?`ascending`:`descending`:`none`,B;t[53]===r?B=t[54]:(B=r({id:`tgWuMB`}),t[53]=r,t[54]=B);let V;t[55]!==h||t[56]!==y||t[57]!==_||t[58]!==B?(V=(0,Z.jsx)(Hb,{label:B,sortKey:`modified`,activeKey:_,activeDir:y,onSort:h}),t[55]=h,t[56]=y,t[57]=_,t[58]=B,t[59]=V):V=t[59];let H;t[60]!==z||t[61]!==V?(H=(0,Z.jsx)(Rb,{className:`w-32`,"aria-sort":z,children:V}),t[60]=z,t[61]=V,t[62]=H):H=t[62],t[63]!==R||t[64]!==H?(w=(0,Z.jsx)(Fb,{children:(0,Z.jsxs)(Lb,{children:[R,H]})}),t[63]=R,t[64]=H,t[65]=w):w=t[65],x=Ib,C=i.length?i.map(Wb):(0,Z.jsx)(Lb,{children:(0,Z.jsx)(zb,{colSpan:2,className:`h-24 text-center text-muted-foreground`,children:(0,Z.jsx)(s,{id:`Pkw7J9`})})}),t[7]=r,t[8]=p,t[9]=d,t[10]=n,t[11]=a,t[12]=u,t[13]=l,t[14]=c,t[15]=m,t[16]=y,t[17]=_,t[18]=x,t[19]=S,t[20]=C,t[21]=w,t[22]=T,t[23]=E,t[24]=D,t[25]=O,t[26]=k,t[27]=A}else x=t[18],S=t[19],C=t[20],w=t[21],T=t[22],E=t[23],D=t[24],O=t[25],k=t[26],A=t[27];let j;t[66]!==x||t[67]!==C?(j=(0,Z.jsx)(x,{children:C}),t[66]=x,t[67]=C,t[68]=j):j=t[68];let M;t[69]!==S||t[70]!==w||t[71]!==j?(M=(0,Z.jsxs)(S,{children:[w,j]}),t[69]=S,t[70]=w,t[71]=j,t[72]=M):M=t[72];let N;t[73]!==M||t[74]!==T?(N=(0,Z.jsx)(`div`,{className:T,children:M}),t[73]=M,t[74]=T,t[75]=N):N=t[75];let P;t[76]!==N||t[77]!==E||t[78]!==D||t[79]!==O||t[80]!==k?(P=(0,Z.jsxs)(`div`,{className:E,children:[D,O,k,N]}),t[76]=N,t[77]=E,t[78]=D,t[79]=O,t[80]=k,t[81]=P):P=t[81];let F;t[82]!==P||t[83]!==A?(F=(0,Z.jsx)(`div`,{className:A,children:P}),t[82]=P,t[83]=A,t[84]=F):F=t[84];let I;t[85]!==h||t[86]!==d||t[87]!==n?(I=(0,Z.jsx)(zp,{open:h,onOpenChange:g,kind:`file`,initialDir:n,folderConfig:d,suggestedName:`index`}),t[85]=h,t[86]=d,t[87]=n,t[88]=I):I=t[88];let R;return t[89]!==F||t[90]!==I?(R=(0,Z.jsxs)(Z.Fragment,{children:[F,I]}),t[89]=F,t[90]=I,t[91]=R):R=t[91],R}function Wb(e){return(0,Z.jsxs)(Lb,{children:[(0,Z.jsx)(zb,{children:(0,Z.jsxs)(`a`,{href:ni(e.path),className:`flex items-center gap-2 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[e.kind===`folder`?(0,Z.jsx)(hc,{className:`size-4 shrink-0 text-muted-foreground`}):(0,Z.jsx)(yt,{className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.title})]})}),(0,Z.jsx)(zb,{className:`text-muted-foreground`,children:e.kind===`file`?Bb(e.modified):`—`})]},e.path)}function Gb(e){return e===`asc`?`desc`:`asc`}function Kb(e){return(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-4 py-3 last:border-b-0`,children:[(0,Z.jsx)(Ha,{className:`size-4 rounded`}),(0,Z.jsx)(Ha,{className:`h-4 w-40`}),(0,Z.jsx)(`div`,{className:`ml-auto`,children:(0,Z.jsx)(Ha,{className:`h-4 w-16`})})]},e)}function qb(e){let t=(0,$.c)(8),{docName:n}=e,[r,i]=(0,Q.useState)(Jb),a,o;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>de(e=>{i(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})}),o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o),!r.has(n))return null;let c;t[2]===n?c=t[3]:(c=function(){le(n)?.abort(),i(e=>{if(!e.has(n))return e;let t=new Set(e);return t.delete(n),t})},t[2]=n,t[3]=c);let l=c,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`A67Uwj`})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(s,{id:`dEgA5A`}),t[5]=d):d=t[5];let f;return t[6]===l?f=t[7]:(f=(0,Z.jsxs)(`div`,{className:`absolute inset-x-0 bottom-8 z-20 flex justify-center text-xs text-muted-foreground`,children:[u,(0,Z.jsx)(Ti,{variant:`link`,size:`sm`,className:`h-auto px-2 py-0 text-xs`,onClick:l,children:d})]}),t[6]=l,t[7]=f),f}function Jb(){return new Set}var Yb=(0,Q.createContext)(null);function Xb(e){let t=(0,$.c)(7),{children:n}=e,[r,i]=(0,Q.useState)(Zb),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=e=>{i(t=>{let n=new Map(t);return n.set(e,(t.get(e)??0)+1),n})},t[0]=a):a=t[0];let o=a,s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=e=>{i(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},t[1]=s):s=t[1];let c=s,l;t[2]===r?l=t[3]:(l={addPropertySignal:r,requestAddProperty:o,clearAddProperty:c},t[2]=r,t[3]=l);let u=l,d;return t[4]!==n||t[5]!==u?(d=(0,Z.jsx)(Yb,{value:u,children:n}),t[4]=n,t[5]=u,t[6]=d):d=t[6],d}function Zb(){return new Map}function Qb(){let e=(0,Q.use)(Yb);if(e===null)throw Error(`useProperties must be used within <PropertyProvider />`);return e}function $b(e){let t=null,n=()=>(t===null&&(t=e(),t.catch(()=>{})),t),r=(0,Q.lazy)(n);return r.preload=n,r}var ex=$b(()=>n(()=>import(`./SettingsDialogBody-B_UH7Jye.js`).then(e=>({default:e.SettingsDialogBody})),__vite__mapDeps([42,1,33,2,34,35,20,36,37,38,39,19,6,3,7,4,10,9,40,43,8,14,21,11]),import.meta.url));function tx(e){let t=(0,$.c)(9),{error:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=n instanceof Error&&/dynamically imported module|Failed to fetch/i.test(n.message)?r({id:`Y8ViJx`}):r({id:`3h5zMp`}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o=a,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`h3`,{id:`settings-body-error-title`,className:`font-heading text-base leading-none font-medium`,children:(0,Z.jsx)(s,{id:`hwFOFD`})}),t[3]=c):c=t[3];let l;t[4]===o?l=t[5]:(l=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[c,(0,Z.jsx)(`p`,{className:`max-w-xs text-sm text-muted-foreground`,children:o})]}),t[4]=o,t[5]=l);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Ti,{variant:`default`,onClick:nx,children:(0,Z.jsx)(s,{id:`HpK_8d`})}),t[6]=u):u=t[6];let d;return t[7]===l?d=t[8]:(d=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`settings-body-error-title`,"data-slot":`settings-body-error-boundary`,className:`flex h-full flex-col items-center justify-center gap-5 p-8 text-center`,children:[l,u]}),t[7]=l,t[8]=d),d}function nx(){return window.location.reload()}function rx(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(z,{fallbackRender:ax,onError:ix,children:n}),t[0]=n,t[1]=r),r}function ix(e,t){console.error(`[SettingsDialogErrorBoundary] rendered fallback for Settings body`,e,t.componentStack)}function ax(e){return(0,Z.jsx)(tx,{...e})}function ox(e){let t=(0,$.c)(64),{open:n,onOpenChange:r}=e,{_:a}=i(),{collabUrl:o}=lt(),{userBinding:c,userSynced:l,okignoreBinding:u,okignoreSynced:d}=N(),{desktopPresent:f}=ka(),[p,m]=(0,Q.useState)(`preferences`),h,g;t[0]===n?(h=t[1],g=t[2]):(h=()=>{n&&m(`preferences`)},g=[n],t[0]=n,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _=o!==null,v;t[3]===a?v=t[4]:(v=a({id:`7PzzBU`}),t[3]=a,t[4]=v);let y;t[5]===a?y=t[6]:(y=a({id:`Q6hhn8`}),t[5]=a,t[6]=y);let b;t[7]===y?b=t[8]:(b=[{id:`preferences`,label:y}],t[7]=y,t[8]=b);let x;t[9]!==v||t[10]!==b?(x={id:`user`,label:v,enabled:!0,items:b},t[9]=v,t[10]=b,t[11]=x):x=t[11];let S;t[12]===a?S=t[13]:(S=a({id:`ZWyHmq`}),t[12]=a,t[13]=S);let C;t[14]===a?C=t[15]:(C=a({id:`Nu4DdT`}),t[14]=a,t[15]=C);let w;t[16]===C?w=t[17]:(w={id:`sync`,label:C},t[16]=C,t[17]=w);let T;t[18]===a?T=t[19]:(T=a({id:`iTylMl`}),t[18]=a,t[19]=T);let E;t[20]===T?E=t[21]:(E={id:`project-templates`,label:T},t[20]=T,t[21]=E);let D;t[22]===a?D=t[23]:(D=a({id:`3zyg_A`}),t[22]=a,t[23]=D);let O;t[24]===D?O=t[25]:(O={id:`okignore`,label:D},t[24]=D,t[25]=O);let k;t[26]!==E||t[27]!==O||t[28]!==w?(k=[w,E,O],t[26]=E,t[27]=O,t[28]=w,t[29]=k):k=t[29];let A;t[30]!==_||t[31]!==k||t[32]!==S?(A={id:`project`,label:S,enabled:_,items:k},t[30]=_,t[31]=k,t[32]=S,t[33]=A):A=t[33];let j;t[34]===a?j=t[35]:(j=a({id:`nbfdhU`}),t[34]=a,t[35]=j);let M;t[36]!==a||t[37]!==f?(M=f?[{id:`claude-desktop`,label:a({id:`yvHDYG`})}]:[],t[36]=a,t[37]=f,t[38]=M):M=t[38];let P;t[39]!==j||t[40]!==M?(P={id:`integrations`,label:j,enabled:!0,items:M},t[39]=j,t[40]=M,t[41]=P):P=t[41];let F;t[42]!==A||t[43]!==P||t[44]!==x?(F=[x,A,P],t[42]=A,t[43]=P,t[44]=x,t[45]=F):F=t[45];let I=F,L;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(ko,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`Tz0i8g`})}),t[46]=L):L=t[46];let R;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(Do,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`RDrXh4`})}),t[47]=R):R=t[47];let z;t[48]!==p||t[49]!==I?(z=(0,Z.jsx)(sx,{groups:I,activeId:p,onSelect:m}),t[48]=p,t[49]=I,t[50]=z):z=t[50];let B;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,Z.jsx)(lx,{}),t[51]=B):B=t[51];let V=l?c:null,H;t[52]!==p||t[53]!==u||t[54]!==d||t[55]!==V?(H=(0,Z.jsx)(`div`,{className:`min-h-0 overflow-y-auto overscroll-contain subtle-scrollbar p-6`,children:(0,Z.jsx)(rx,{children:(0,Z.jsx)(Q.Suspense,{fallback:B,children:(0,Z.jsx)(ex,{activeId:p,userBinding:V,okignoreBinding:u,okignoreSynced:d})})})}),t[52]=p,t[53]=u,t[54]=d,t[55]=V,t[56]=H):H=t[56];let U;t[57]!==z||t[58]!==H?(U=(0,Z.jsxs)(No,{className:`grid h-[700px] max-h-[calc(100dvh-4rem)] w-[900px] max-w-[calc(100%-2rem)] grid-cols-[220px_1fr] gap-0 overflow-hidden p-0 sm:max-w-[900px]`,"data-testid":`settings-dialog`,children:[L,R,z,H]}),t[57]=z,t[58]=H,t[59]=U):U=t[59];let W;return t[60]!==r||t[61]!==n||t[62]!==U?(W=(0,Z.jsx)(zo,{open:n,onOpenChange:r,children:U}),t[60]=r,t[61]=n,t[62]=U,t[63]=W):W=t[63],W}function sx(e){let t=(0,$.c)(12),{groups:n,activeId:r,onSelect:a}=e,{_:o}=i(),s;t[0]===o?s=t[1]:(s=o({id:`y1t8bQ`}),t[0]=o,t[1]=s);let c;if(t[2]!==r||t[3]!==n||t[4]!==a){let e;t[6]!==r||t[7]!==a?(e=e=>(0,Z.jsx)(cx,{group:e,activeId:r,onSelect:a},e.id),t[6]=r,t[7]=a,t[8]=e):e=t[8],c=n.map(e),t[2]=r,t[3]=n,t[4]=a,t[5]=c}else c=t[5];let l;return t[9]!==s||t[10]!==c?(l=(0,Z.jsx)(`nav`,{"aria-label":s,className:`h-full overflow-y-auto overscroll-contain subtle-scrollbar border-r bg-muted/30 px-3 py-4`,children:c}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function cx(e){let t=(0,$.c)(28),{group:n,activeId:r,onSelect:i}=e;if(n.items.length===0)return null;let a=`settings-group-${n.id}`,o=`${a}-caption`,c=n.enabled?void 0:o,l=n.enabled?`text-muted-foreground/80`:`text-muted-foreground/50`,u;t[0]===l?u=t[1]:(u=vi(`mb-1 px-2 text-xs font-semibold uppercase tracking-wide font-mono`,l),t[0]=l,t[1]=u);let d;t[2]!==n.label||t[3]!==a||t[4]!==c||t[5]!==u?(d=(0,Z.jsx)(`h3`,{id:a,"aria-describedby":c,className:u,children:n.label}),t[2]=n.label,t[3]=a,t[4]=c,t[5]=u,t[6]=d):d=t[6];let f;t[7]!==o||t[8]!==n.enabled?(f=n.enabled?null:(0,Z.jsx)(`p`,{id:o,className:`mb-1 px-2 text-xs italic text-muted-foreground/60`,children:(0,Z.jsx)(s,{id:`JWsZlx`})}),t[7]=o,t[8]=n.enabled,t[9]=f):f=t[9];let p;if(t[10]!==r||t[11]!==o||t[12]!==n.enabled||t[13]!==n.items||t[14]!==i){let e;t[16]!==r||t[17]!==o||t[18]!==n.enabled||t[19]!==i?(e=e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`button`,{type:`button`,"aria-current":r===e.id?`page`:void 0,"aria-disabled":n.enabled?void 0:!0,"aria-describedby":n.enabled?void 0:o,tabIndex:n.enabled?0:-1,disabled:!n.enabled,onClick:()=>n.enabled&&i(e.id),"data-testid":`settings-sidebar-item-${e.id}`,className:vi(`w-full rounded px-2 py-1.5 text-left text-sm transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,r===e.id&&n.enabled?`bg-accent text-accent-foreground`:`hover:bg-accent/50`),children:e.label})},e.id),t[16]=r,t[17]=o,t[18]=n.enabled,t[19]=i,t[20]=e):e=t[20],p=n.items.map(e),t[10]=r,t[11]=o,t[12]=n.enabled,t[13]=n.items,t[14]=i,t[15]=p}else p=t[15];let m;t[21]!==a||t[22]!==p?(m=(0,Z.jsx)(`ul`,{"aria-labelledby":a,className:`space-y-0.5`,children:p}),t[21]=a,t[22]=p,t[23]=m):m=t[23];let h;return t[24]!==d||t[25]!==f||t[26]!==m?(h=(0,Z.jsxs)(`div`,{className:`mb-4`,children:[d,f,m]}),t[24]=d,t[25]=f,t[26]=m,t[27]=h):h=t[27],h}function lx(){let e=(0,$.c)(4),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`GsBUCk`})}),n=(0,Z.jsx)(Ha,{className:`h-5 w-32`}),r=(0,Z.jsx)(Ha,{className:`h-4 w-64`}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`space-y-3`,"data-testid":`settings-content-skeleton`,children:[t,n,r,(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(Ha,{className:`h-9 w-full`}),(0,Z.jsx)(Ha,{className:`h-9 w-full`})]})]}),e[3]=i):i=e[3],i}function ux(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex h-full w-full aria-[orientation=vertical]:flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(ay,{"data-slot":`resizable-panel-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function dx(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(cy,{"data-slot":`resizable-panel`,...n}),t[2]=n,t[3]=r),r}function fx(e){let t=(0,$.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({withHandle:i,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=vi(`relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,n),t[4]=n,t[5]=a);let o;t[6]===i?o=t[7]:(o=i&&(0,Z.jsx)(`div`,{className:`z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border`}),t[6]=i,t[7]=o);let s;return t[8]!==r||t[9]!==a||t[10]!==o?(s=(0,Z.jsx)(fy,{"data-slot":`resizable-handle`,className:a,...r,children:o}),t[8]=r,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function px(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Po,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function mx(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Lo,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function hx(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(jo,{"data-slot":`sheet-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function gx(e){let t=(0,$.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let c=a===void 0?`right`:a,l=o===void 0?!0:o,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(hx,{}),t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=vi(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10 motion-reduce:transition-none motion-reduce:duration-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none`,r),t[7]=r,t[8]=d);let f;t[9]===l?f=t[10]:(f=l&&(0,Z.jsx)(Bo,{"data-slot":`sheet-close`,asChild:!0,children:(0,Z.jsxs)(Ti,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,Z.jsx)(Eo,{}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`yz7wBu`})})]})}),t[9]=l,t[10]=f);let p;return t[11]!==n||t[12]!==i||t[13]!==c||t[14]!==d||t[15]!==f?(p=(0,Z.jsxs)(mx,{children:[u,(0,Z.jsxs)(Ao,{"data-slot":`sheet-content`,"data-side":c,className:d,...i,children:[n,f]})]}),t[11]=n,t[12]=i,t[13]=c,t[14]=d,t[15]=f,t[16]=p):p=t[16],p}function _x(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex flex-col gap-0.5 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`div`,{"data-slot":`sheet-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function vx(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`font-heading text-base font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(Mo,{"data-slot":`sheet-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function yx(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`div`,{"data-slot":`input-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var bx=Di(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function xx(e){let t=(0,$.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`inline-start`:i,o;t[4]!==a||t[5]!==n?(o=vi(bx({align:a}),n),t[4]=a,t[5]=n,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,Z.jsx)(`div`,{"data-slot":`input-group-addon`,"data-align":a,className:o,onMouseDown:Sx,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function Sx(e){e.target.closest(`button`)||(e.preventDefault(),e.currentTarget.parentElement?.querySelector(`input`)?.focus())}Di(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Cx(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`span`,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wx(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(Uo,{"data-slot":`input-group-control`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Tx(e){let t=(0,$.c)(119),{findInputRef:n,query:r,replacement:a,replaceOpen:o,caseSensitive:c,wholeWord:l,current:u,total:d,onQueryChange:f,onReplacementChange:p,onReplaceOpenChange:m,onCaseSensitiveChange:h,onWholeWordChange:g,onNext:_,onPrevious:v,onReplaceCurrent:y,onReplaceAll:b,onClose:x}=e,{_:S}=i(),C=r.length>0,w=d>0,T;t[0]!==S||t[1]!==u||t[2]!==w||t[3]!==C||t[4]!==d?(T=C?w?`${u} / ${d}`:S({id:`Ev2r9A`}):``,t[0]=S,t[1]=u,t[2]=w,t[3]=C,t[4]=d,t[5]=T):T=t[5];let E=T,D;t[6]!==x||t[7]!==_||t[8]!==v?(D=function(e){e.key===`Enter`?(e.preventDefault(),e.shiftKey?v():_()):e.key===`Escape`&&(e.preventDefault(),x())},t[6]=x,t[7]=_,t[8]=v,t[9]=D):D=t[9];let O=D,k;t[10]!==x||t[11]!==y?(k=function(e){e.key===`Enter`?(e.preventDefault(),y()):e.key===`Escape`&&(e.preventDefault(),x())},t[10]=x,t[11]=y,t[12]=k):k=t[12];let A=k,j;t[13]===S?j=t[14]:(j=S({id:`MVxpbf`}),t[13]=S,t[14]=j);let M;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`ok-find-input`,children:(0,Z.jsx)(s,{id:`KujtjC`})}),t[15]=M):M=t[15];let N;t[16]===f?N=t[17]:(N=e=>f(e.target.value),t[16]=f,t[17]=N);let P;t[18]===S?P=t[19]:(P=S({id:`KujtjC`}),t[18]=S,t[19]=P);let F;t[20]!==n||t[21]!==O||t[22]!==r||t[23]!==N||t[24]!==P?(F=(0,Z.jsx)(wx,{ref:n,id:`ok-find-input`,value:r,onChange:N,onKeyDown:O,placeholder:P,autoComplete:`off`,spellCheck:!1,className:`h-7 px-2 text-sm`}),t[20]=n,t[21]=O,t[22]=r,t[23]=N,t[24]=P,t[25]=F):F=t[25];let I;t[26]===S?I=t[27]:(I=S({id:`-8PP0T`}),t[26]=S,t[27]=I);let L;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(Js,{"aria-hidden":`true`}),t[28]=L):L=t[28];let R;t[29]!==c||t[30]!==h||t[31]!==I?(R=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(So,{type:`button`,variant:`segmented`,size:`sm`,"aria-label":I,pressed:c,onPressedChange:h,className:`size-6 min-w-6 px-0`,children:L})}),t[29]=c,t[30]=h,t[31]=I,t[32]=R):R=t[32];let z;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`-8PP0T`})}),t[33]=z):z=t[33];let B;t[34]===R?B=t[35]:(B=(0,Z.jsxs)(Ir,{children:[R,z]}),t[34]=R,t[35]=B);let V;t[36]===S?V=t[37]:(V=S({id:`_7UQ7y`}),t[36]=S,t[37]=V);let H;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Z.jsx)(al,{"aria-hidden":`true`}),t[38]=H):H=t[38];let U;t[39]!==g||t[40]!==V||t[41]!==l?(U=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(So,{type:`button`,variant:`segmented`,size:`sm`,"aria-label":V,pressed:l,onPressedChange:g,className:`size-6 min-w-6 px-0`,children:H})}),t[39]=g,t[40]=V,t[41]=l,t[42]=U):U=t[42];let W;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`_7UQ7y`})}),t[43]=W):W=t[43];let G;t[44]===U?G=t[45]:(G=(0,Z.jsxs)(Ir,{children:[U,W]}),t[44]=U,t[45]=G);let K;t[46]!==B||t[47]!==G?(K=(0,Z.jsxs)(xx,{align:`inline-end`,className:`gap-0.5`,children:[B,G]}),t[46]=B,t[47]=G,t[48]=K):K=t[48];let ee;t[49]!==K||t[50]!==F?(ee=(0,Z.jsxs)(yx,{className:`h-7 w-56 rounded-[min(var(--radius-md),12px)]`,children:[F,K]}),t[49]=K,t[50]=F,t[51]=ee):ee=t[51];let q;t[52]===E?q=t[53]:(q=(0,Z.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`min-w-14 px-1 text-right text-muted-foreground text-xs tabular-nums shrink-0`,children:E}),t[52]=E,t[53]=q);let te;t[54]===S?te=t[55]:(te=S({id:`oqB2ez`}),t[54]=S,t[55]=te);let ne=!w,re;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(ut,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[56]=re):re=t[56];let ie;t[57]!==v||t[58]!==te||t[59]!==ne?(ie=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":te,disabled:ne,onClick:v,children:re})}),t[57]=v,t[58]=te,t[59]=ne,t[60]=ie):ie=t[60];let ae;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`oqB2ez`})}),t[61]=ae):ae=t[61];let oe;t[62]===ie?oe=t[63]:(oe=(0,Z.jsxs)(Ir,{children:[ie,ae]}),t[62]=ie,t[63]=oe);let se;t[64]===S?se=t[65]:(se=S({id:`SiUUCS`}),t[64]=S,t[65]=se);let ce=!w,le;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Z.jsx)(St,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[66]=le):le=t[66];let J;t[67]!==_||t[68]!==se||t[69]!==ce?(J=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":se,disabled:ce,onClick:_,children:le})}),t[67]=_,t[68]=se,t[69]=ce,t[70]=J):J=t[70];let ue;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`SiUUCS`})}),t[71]=ue):ue=t[71];let de;t[72]===J?de=t[73]:(de=(0,Z.jsxs)(Ir,{children:[J,ue]}),t[72]=J,t[73]=de);let fe=o?`secondary`:`ghost`,pe;t[74]!==S||t[75]!==o?(pe=S(o?{id:`UkQGhd`}:{id:`1RluQD`}),t[74]=S,t[75]=o,t[76]=pe):pe=t[76];let me=o?`ok-replace-input`:void 0,he;t[77]!==m||t[78]!==o?(he=()=>m(!o),t[77]=m,t[78]=o,t[79]=he):he=t[79];let ge;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Z.jsx)(Bc,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[80]=ge):ge=t[80];let _e;t[81]!==o||t[82]!==fe||t[83]!==pe||t[84]!==me||t[85]!==he?(_e=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{type:`button`,variant:fe,size:`icon-sm`,"aria-label":pe,"aria-expanded":o,"aria-controls":me,onClick:he,children:ge})}),t[81]=o,t[82]=fe,t[83]=pe,t[84]=me,t[85]=he,t[86]=_e):_e=t[86];let ve;t[87]===o?ve=t[88]:(ve=(0,Z.jsx)(wn,{side:`bottom`,children:o?(0,Z.jsx)(s,{id:`UkQGhd`}):(0,Z.jsx)(s,{id:`1RluQD`})}),t[87]=o,t[88]=ve);let ye;t[89]!==_e||t[90]!==ve?(ye=(0,Z.jsxs)(Ir,{children:[_e,ve]}),t[89]=_e,t[90]=ve,t[91]=ye):ye=t[91];let be;t[92]!==S||t[93]!==A||t[94]!==w||t[95]!==b||t[96]!==y||t[97]!==p||t[98]!==o||t[99]!==a?(be=o?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`ok-replace-input`,children:(0,Z.jsx)(s,{id:`fqSfXY`})}),(0,Z.jsx)(Uo,{id:`ok-replace-input`,value:a,onChange:e=>p(e.target.value),onKeyDown:A,placeholder:S({id:`fqSfXY`}),autoComplete:`off`,spellCheck:!1,className:`h-7 w-48 rounded-[min(var(--radius-md),12px)] px-2 text-sm shadow-none focus-visible:ring-2`}),(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":S({id:`bS_boY`}),disabled:!w,onClick:y,children:(0,Z.jsx)(Bc,{"data-icon":`inline-start`,"aria-hidden":`true`})})}),(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`bS_boY`})})]}),(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":S({id:`dr1vFs`}),disabled:!w,onClick:b,children:(0,Z.jsx)(zc,{"data-icon":`inline-start`,"aria-hidden":`true`})})}),(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`dr1vFs`})})]})]}):null,t[92]=S,t[93]=A,t[94]=w,t[95]=b,t[96]=y,t[97]=p,t[98]=o,t[99]=a,t[100]=be):be=t[100];let xe;t[101]===S?xe=t[102]:(xe=S({id:`wJo9oS`}),t[101]=S,t[102]=xe);let Se;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(Eo,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[103]=Se):Se=t[103];let Ce;t[104]!==x||t[105]!==xe?(Ce=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":xe,onClick:x,children:Se})}),t[104]=x,t[105]=xe,t[106]=Ce):Ce=t[106];let we;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`yz7wBu`})}),t[107]=we):we=t[107];let Te;t[108]===Ce?Te=t[109]:(Te=(0,Z.jsxs)(Ir,{children:[Ce,we]}),t[108]=Ce,t[109]=Te);let Ee;return t[110]!==ee||t[111]!==q||t[112]!==oe||t[113]!==de||t[114]!==j||t[115]!==ye||t[116]!==be||t[117]!==Te?(Ee=(0,Z.jsxs)(`search`,{"data-testid":`find-replace-bar`,"aria-label":j,className:`pointer-events-auto flex max-w-[min(calc(100vw-1rem),720px)] touch-manipulation items-center gap-1 rounded-[calc(var(--radius)+2px)] border border-input bg-popover/95 p-1 text-popover-foreground shadow-md shadow-black/10 backdrop-blur`,children:[M,ee,q,oe,de,ye,be,Te]}),t[110]=ee,t[111]=q,t[112]=oe,t[113]=de,t[114]=j,t[115]=ye,t[116]=be,t[117]=Te,t[118]=Ee):Ee=t[118],Ee}var Ex={current:0,total:0},Dx=120,Ox=100;function kx(e){let t=(0,$.c)(2),n;return t[0]===e?n=t[1]:(n=()=>e?rt(e):null,t[0]=e,t[1]=n),(0,Q.useSyncExternalStore)(tt,n,Ax)}function Ax(){return null}function jx(e){if(!e||e.isDestroyed)return null;let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
|
|
25
|
+
`,`
|
|
26
|
+
`).trim();return i.length===0||i.length>Dx||i.includes(`
|
|
27
|
+
`)?null:i}function Mx(e,t){return(Wn()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&e.key.toLocaleLowerCase()===t}function Nx(e){let t=e.key.toLocaleLowerCase();return Wn()?e.metaKey&&e.altKey&&!e.ctrlKey&&t===`f`:e.ctrlKey&&!e.metaKey&&!e.altKey&&t===`h`}function Px(e){let t=Pe(e.state);return{current:t.matches.length===0?0:t.activeIndex+1,total:t.matches.length}}function Fx(e,t){return e.current===t.current&&e.total===t.total}function Ix(e,t,n){e&&!e.isDestroyed&&(e.commands.clearFindMatches(),e.commands.focus()),t(e=>({...e,open:!1,activeIndex:0})),n(Ex)}function Lx(e){!e||e.isDestroyed||typeof window>`u`||window.requestAnimationFrame(()=>{if(e.isDestroyed)return;let t=_(e);if(!t)return;let n=t.dom.querySelector(`.ok-find-match-active`);n instanceof HTMLElement&&n.scrollIntoView({block:`center`,inline:`nearest`,behavior:`auto`})})}function Rx(e){let t=(0,$.c)(81),{activeDocName:n,isSourceMode:r}=e,i=kx(n),a=(0,Q.useRef)(null),o=(0,Q.useRef)(null),s=(0,Q.useRef)(n),c=(0,Q.useRef)(0),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={open:!1,replaceOpen:!1,query:``,replacement:``,caseSensitive:!1,wholeWord:!1,activeIndex:0},t[0]=l):l=t[0];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(Ex),m,h;t[1]===n?(m=t[2],h=t[3]):(m=()=>{s.current!==n&&(s.current=n,d(Bx))},h=[n],t[1]=n,t[2]=m,t[3]=h),(0,Q.useEffect)(m,h);let g,_;t[4]===u.activeIndex?(g=t[5],_=t[6]):(g=()=>{c.current=u.activeIndex},_=[u.activeIndex],t[4]=u.activeIndex,t[5]=g,t[6]=_),(0,Q.useEffect)(g,_);let v,y;t[7]===i?(v=t[8],y=t[9]):(v=()=>{let e=o.current;e&&e!==i&&!e.isDestroyed&&e.commands.clearFindMatches(),o.current=i},y=[i],t[7]=i,t[8]=v,t[9]=y),(0,Q.useEffect)(v,y);let b,x;t[10]===u.open?(b=t[11],x=t[12]):(b=()=>{if(!u.open||!a.current)return;let e=requestAnimationFrame(()=>{a.current?.focus(),a.current?.select()});return()=>cancelAnimationFrame(e)},x=[u.open],t[10]=u.open,t[11]=b,t[12]=x),(0,Q.useEffect)(b,x);let S,C;t[13]!==u.open||t[14]!==r?(S=()=>{!u.open||!r||d(zx)},C=[u.open,r],t[13]=u.open,t[14]=r,t[15]=S,t[16]=C):(S=t[15],C=t[16]),(0,Q.useEffect)(S,C);let w,T;t[17]!==i||t[18]!==u.caseSensitive||t[19]!==u.open||t[20]!==u.query||t[21]!==u.wholeWord||t[22]!==r?(w=()=>{if(!i||i.isDestroyed){p(Ex);return}if(!u.open||r){i.commands.clearFindMatches(),p(Ex);return}let e=window.setTimeout(()=>{if(i.isDestroyed)return;i.commands.setFindQuery(u.query,{options:{caseSensitive:u.caseSensitive,wholeWord:u.wholeWord},activeIndex:c.current});let e=Px(i);p(t=>Fx(t,e)?t:e)},Ox);return()=>window.clearTimeout(e)},T=[i,u.open,u.query,u.caseSensitive,u.wholeWord,r],t[17]=i,t[18]=u.caseSensitive,t[19]=u.open,t[20]=u.query,t[21]=u.wholeWord,t[22]=r,t[23]=w,t[24]=T):(w=t[23],T=t[24]),(0,Q.useEffect)(w,T);let E,D;t[25]!==i||t[26]!==u.open||t[27]!==r?(E=()=>{if(!i||i.isDestroyed||!u.open||r)return;let e=()=>{let e=Pe(i.state),t=Px(i);p(e=>Fx(e,t)?e:t),d(t=>t.activeIndex===e.activeIndex?t:{...t,activeIndex:e.activeIndex})};return i.on(`transaction`,e),()=>{i.off(`transaction`,e)}},D=[i,u.open,r],t[25]=i,t[26]=u.open,t[27]=r,t[28]=E,t[29]=D):(E=t[28],D=t[29]),(0,Q.useEffect)(E,D);let O,k;t[30]!==n||t[31]!==i||t[32]!==u.open||t[33]!==r?(O=()=>{let e=function(e){let t=jx(i);d(n=>({...n,open:!0,replaceOpen:e,query:t??n.query,activeIndex:0}))},t=function(t){if(!(!n||r||t.defaultPrevented)){if(Mx(t,`f`)){t.preventDefault(),u.open?Ix(i,d,p):e(!1);return}if(Nx(t)){t.preventDefault(),e(!0);return}if(Mx(t,`g`)&&u.open){t.preventDefault(),(t.shiftKey?i?.commands.selectPreviousFindMatch():i?.commands.selectNextFindMatch())&&Lx(i);return}t.key===`Escape`&&u.open&&(t.preventDefault(),Ix(i,d,p))}};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},k=[n,i,u.open,r],t[30]=n,t[31]=i,t[32]=u.open,t[33]=r,t[34]=O,t[35]=k):(O=t[34],k=t[35]),(0,Q.useEffect)(O,k);let A;t[36]!==i||t[37]!==u.caseSensitive||t[38]!==u.query||t[39]!==u.wholeWord?(A=function(){return!i||i.isDestroyed?!1:(i.commands.setFindQuery(u.query,{options:{caseSensitive:u.caseSensitive,wholeWord:u.wholeWord},activeIndex:c.current}),!0)},t[36]=i,t[37]=u.caseSensitive,t[38]=u.query,t[39]=u.wholeWord,t[40]=A):A=t[40];let j=A,M;t[41]===i?M=t[42]:(M=function(){if(!i||i.isDestroyed)return;let e=Pe(i.state),t=Px(i);p(e=>Fx(e,t)?e:t),d(t=>t.activeIndex===e.activeIndex?t:{...t,activeIndex:e.activeIndex})},t[41]=i,t[42]=M);let N=M,P;t[43]===i?P=t[44]:(P=function(){Ix(i,d,p)},t[43]=i,t[44]=P);let F=P,I;t[45]!==j||t[46]!==i||t[47]!==N?(I=function(){!i||i.isDestroyed||(j(),i.commands.selectNextFindMatch()&&Lx(i),N())},t[45]=j,t[46]=i,t[47]=N,t[48]=I):I=t[48];let L=I,R;t[49]!==j||t[50]!==i||t[51]!==N?(R=function(){!i||i.isDestroyed||(j(),i.commands.selectPreviousFindMatch()&&Lx(i),N())},t[49]=j,t[50]=i,t[51]=N,t[52]=R):R=t[52];let z=R,B;t[53]!==j||t[54]!==i||t[55]!==u.replacement||t[56]!==N?(B=function(){!i||i.isDestroyed||(j(),i.commands.replaceCurrentFindMatch(u.replacement)&&Lx(i),N())},t[53]=j,t[54]=i,t[55]=u.replacement,t[56]=N,t[57]=B):B=t[57];let V=B,H;t[58]!==j||t[59]!==i||t[60]!==u.replacement||t[61]!==N?(H=function(){!i||i.isDestroyed||(j(),i.commands.replaceAllFindMatches(u.replacement)&&Lx(i),N())},t[58]=j,t[59]=i,t[60]=u.replacement,t[61]=N,t[62]=H):H=t[62];let U=H;if(!u.open||!n||r)return null;let W,G,K,ee,q;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>d(t=>({...t,query:e,activeIndex:0})),G=e=>d(t=>({...t,replacement:e})),K=e=>d(t=>({...t,replaceOpen:e})),ee=e=>d(t=>({...t,caseSensitive:e})),q=e=>d(t=>({...t,wholeWord:e})),t[63]=W,t[64]=G,t[65]=K,t[66]=ee,t[67]=q):(W=t[63],G=t[64],K=t[65],ee=t[66],q=t[67]);let te;return t[68]!==F||t[69]!==u.caseSensitive||t[70]!==u.query||t[71]!==u.replaceOpen||t[72]!==u.replacement||t[73]!==u.wholeWord||t[74]!==f.current||t[75]!==f.total||t[76]!==U||t[77]!==V||t[78]!==L||t[79]!==z?(te=(0,Z.jsx)(`div`,{className:`editor-content-aligned pointer-events-none absolute inset-x-0 top-2 z-30 px-2`,children:(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsx)(Tx,{findInputRef:a,query:u.query,replacement:u.replacement,replaceOpen:u.replaceOpen,caseSensitive:u.caseSensitive,wholeWord:u.wholeWord,current:f.current,total:f.total,onQueryChange:W,onReplacementChange:G,onReplaceOpenChange:K,onCaseSensitiveChange:ee,onWholeWordChange:q,onNext:L,onPrevious:z,onReplaceCurrent:V,onReplaceAll:U,onClose:F})})}),t[68]=F,t[69]=u.caseSensitive,t[70]=u.query,t[71]=u.replaceOpen,t[72]=u.replacement,t[73]=u.wholeWord,t[74]=f.current,t[75]=f.total,t[76]=U,t[77]=V,t[78]=L,t[79]=z,t[80]=te):te=t[80],te}function zx(e){return{...e,open:!1,activeIndex:0}}function Bx(e){return{...e,activeIndex:0}}var Vx=960,Hx=1024;function Ux(){let e=(0,$.c)(5),[t,n]=(0,Q.useState)(Gx),[r,i]=(0,Q.useState)(Wx),a,o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=window.matchMedia(`(max-width: ${Vx-1}px)`),t=window.matchMedia(`(max-width: ${Hx-1}px)`),r=()=>{let r=e.matches;n(r?`sheet`:`panel`),i(!r&&t.matches)};return e.addEventListener(`change`,r),t.addEventListener(`change`,r),()=>{e.removeEventListener(`change`,r),t.removeEventListener(`change`,r)}},o=[],e[0]=a,e[1]=o):(a=e[0],o=e[1]),(0,Q.useEffect)(a,o);let s;return e[2]!==r||e[3]!==t?(s={layout:t,autoCollapse:r},e[2]=r,e[3]=t,e[4]=s):s=e[4],s}function Wx(){return window.innerWidth>=Vx&&window.innerWidth<Hx}function Gx(){return window.innerWidth<Vx?`sheet`:`panel`}var Kx={words:0,chars:0,tokens:0},qx=/[ -〿-ゟ゠-ヿ㐀-䶿一-鿿豈---ក-]/,Jx=/[\p{L}\p{N}]/u,Yx=new Set([`text`,`inlineCode`,`code`,`tag`]),Xx=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),Zx=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function Qx(e,t){if(!e)return;let n=e.type;if(!Xx.has(n)){if(Yx.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
|
|
28
|
+
`));return}if(n===`wikiLink`||n===`wikiLinkEmbed`){let n=e.data?.alias??e.value??``;n&&t.push(n);return}if(Array.isArray(e.children)){for(let n of e.children)Qx(n,t);if(Zx.has(n)&&t.length>0){let e=t[t.length-1];e&&!e.endsWith(`
|
|
29
|
+
`)&&t.push(`
|
|
30
|
+
`)}}}}function $x(e){try{let t=De().parseToMdast(e),n=[];return Qx(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function eS(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))Jx.test(n)&&t++;return t}function tS(e){let t=globalThis.Intl.Segmenter;if(!t)return eS(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function nS(e){let t=qx.test(e)?1.5:4;return Math.ceil(e.length/t)}function rS(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=sr(e);if(!t.trim())return{words:0,chars:0,tokens:0};let n=$x(t);return n?{words:qx.test(n)?tS(n):eS(n),chars:n.length,tokens:nS(n)}:{words:0,chars:0,tokens:0}}var iS=300;function aS(e,t){let n=(0,$.c)(4),[r,i]=(0,Q.useState)(Kx),a,o;return n[0]!==t||n[1]!==e?(a=()=>{if(!e||!t){i(Kx);return}let n=e.document.getText(`source`),r=!1,a=null,o=function(){r||i(rS(n.toString()))};o();let s=function(){a&&clearTimeout(a),a=setTimeout(o,iS)};return n.observe(s),()=>{r=!0,n.unobserve(s),a&&clearTimeout(a)}},o=[e,t],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,Q.useEffect)(a,o),r}function oS(e){return e&&e.document.getMap(`lifecycle`).get(`status`)===`conflict`?`conflict`:null}function sS(e){let t=(0,$.c)(8),{poolEntries:n}=lt(),r;t[0]!==e||t[1]!==n?(r=e?n.find(t=>t.docName===e)??null:null,t[0]=e,t[1]=n,t[2]=r):r=t[2];let i=r?.provider??null,a;t[3]===i?a=t[4]:(a=()=>oS(i),t[3]=i,t[4]=a);let[o,s]=(0,Q.useState)(a),c,l;return t[5]===i?(c=t[6],l=t[7]):(c=()=>{if(!i){s(null);return}let e=i.document.getMap(`lifecycle`);s(oS(i));let t=()=>s(oS(i));return e.observe(t),()=>{e.unobserve(t)}},l=[i],t[5]=i,t[6]=c,t[7]=l),(0,Q.useEffect)(c,l),o}function cS(e){let t=(0,$.c)(3),[n,r]=(0,Q.useState)(`connecting`),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(`connecting`);return}let t=e.configuration.websocketProvider.status;e.isSynced?r(`synced`):r(t===`connected`?`connected`:t===`disconnected`?`disconnected`:`connecting`);let n=e=>{let{status:t}=e;r(t===`connected`?lS:t===`disconnected`?`disconnected`:`connecting`)},i=e=>{let{state:t}=e;r(t?`synced`:`connected`)},a=()=>r(`disconnected`);return e.on(`status`,n),e.on(`synced`,i),e.on(`disconnect`,a),()=>{e.off(`status`,n),e.off(`synced`,i),e.off(`disconnect`,a)}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,Q.useEffect)(i,a),n}function lS(e){return e===`synced`?`synced`:`connected`}var uS=Fr;function dS(e,t={}){let n=we(e.componentName);return n.name===`*`?t.unregisteredSuffix?`${e.componentName} (unregistered)`:e.componentName:n.displayName??n.name}var fS=200,pS=`Outside any block`;function mS(e){let t=(0,$.c)(5),{editor:n}=e,r=Ae(n),i=(0,Q.useRef)(null),a=(0,Q.useRef)(null),o=(0,Q.useRef)(!1),s,c;t[0]!==r||t[1]!==n?(s=()=>{if(a.current!==null&&(window.clearTimeout(a.current),a.current=null),!n||!i.current)return;let e=r!==null&&r.ancestorChain.length>0,t;return t=e?hS(n,r):o.current?pS:``,a.current=window.setTimeout(()=>{i.current&&(i.current.textContent=``,i.current.textContent=t),o.current=e,a.current=null},fS),()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null)}},c=[n,r],t[0]=r,t[1]=n,t[2]=s,t[3]=c):(s=t[2],c=t[3]),(0,Q.useEffect)(s,c);let l;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`div`,{ref:i,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`sr-only`}),t[4]=l):l=t[4],l}function hS(e,t){if(!t||t.ancestorChain.length===0)return``;let n=t.ancestorChain,r=n[n.length-1],i=dS(r,{unregisteredSuffix:!0});if(n.length===1)return`Selected: ${i}`;let a=n[n.length-2],o=dS(a);try{let t=e.state.doc.resolve(r.pos),n=t.index(t.depth),a=t.parent.childCount;return`Selected: ${i}, ${n+1} of ${a} in ${o}`}catch{return`Selected: ${i} in ${o}`}}function gS(){let[e]=(0,Q.useState)(gi);return e}function _S({principal:e,identity:t}){return e&&e.source===`git-config`?{type:`human`,name:Gn(e.display_name),color:nr(e.id,zr),coeditor:t.coeditor,tabId:t.tabId,principalId:e.id}:e&&e.source===`synthesized`?{type:`human`,name:t.name,color:nr(e.id,zr),coeditor:t.coeditor,tabId:t.tabId}:{type:`human`,name:t.name,color:t.color,coeditor:t.coeditor,tabId:t.tabId}}function vS(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),a=Math.max(e.right,t.right)-i,o=r-n;return new DOMRect(i,n,a,o)}var yS=class{constructor({editor:e,element:t,view:n,pluginKey:r=`bubbleMenu`,updateDelay:i=250,resizeDelay:a=60,shouldShow:o,appendTo:s,getReferencedVirtualElement:c,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:`absolute`,placement:`top`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:a}=t,{empty:o}=a,s=!i.textBetween(n,r).length&&Xr(t.selection),c=this.element.contains(document.activeElement);return!(!(e.hasFocus()||c)||o||s||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(e,t)=>{let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);!n&&!r||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=l?.scrollTarget??window,this.getReferencedVirtualElement=c,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,o&&(this.shouldShow=o),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener(`dragstart`,this.dragstartHandler),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Bn(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(Un(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Rn(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(er(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Yr(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(hi(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(cr(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(mr(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}get virtualElement(){let{selection:e}=this.editor.state,t=this.getReferencedVirtualElement?.call(this);if(t)return t;if(!this.view?.dom?.parentNode)return;let n=_r(this.view,e.from,e.to),r={getBoundingClientRect:()=>n,getClientRects:()=>[n]};if(e instanceof ri){let t=this.view.nodeDOM(e.from),n=t.dataset.nodeViewWrapper?t:t.querySelector(`[data-node-view-wrapper]`);n&&(t=n),t&&(r={getBoundingClientRect:()=>t.getBoundingClientRect(),getClientRects:()=>[t.getBoundingClientRect()]})}if(e instanceof Jn){let{$anchorCell:t,$headCell:n}=e,i=t?t.pos:n.pos,a=n?n.pos:t.pos,o=this.view.nodeDOM(i),s=this.view.nodeDOM(a);if(!o||!s)return;let c=o===s?o.getBoundingClientRect():vS(o.getBoundingClientRect(),s.getBoundingClientRect());r={getBoundingClientRect:()=>c,getClientRects:()=>[c]}}return r}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;e&&dr(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let i=!t?.selection.eq(e.state.selection),a=!t?.doc.eq(e.state.doc);this.updateHandler(e,i,a,t)}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,element:this.element,view:this.view,state:t,oldState:e,from:i,to:a})||!1}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener(`dragstart`,this.dragstartHandler),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},bS=e=>new Gr({key:typeof e.pluginKey==`string`?new $r(e.pluginKey):e.pluginKey,view:t=>new yS({view:t,...e})});Qn.create({name:`bubbleMenu`,addOptions(){return{element:null,pluginKey:`bubbleMenu`,updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[bS({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var xS=class{constructor({editor:e,element:t,view:n,pluginKey:r=`floatingMenu`,updateDelay:i=250,resizeDelay:a=60,options:o,appendTo:s,shouldShow:c}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:e,state:t})=>{let{selection:n}=t,{$anchor:r,empty:i}=n,a=r.depth===1,o=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&r.parent.childCount===0&&!this.getTextContent(r.parent);return!(!e.hasFocus()||!i||!a||!o||!this.editor.isEditable)},this.floatingUIOptions={strategy:`absolute`,placement:`right`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=o?.scrollTarget??window,this.floatingUIOptions={...this.floatingUIOptions,...o},this.element.tabIndex=0,c&&(this.shouldShow=c),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return Vn(e,{textSerializers:ur(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Bn(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(Un(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Rn(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(er(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Yr(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(hi(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(cr(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(mr(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,view:this.view,state:t,oldState:e,from:i,to:a})}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){let{selection:e}=this.editor.state,t=_r(this.view,e.from,e.to);dr({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},SS=e=>new Gr({key:typeof e.pluginKey==`string`?new $r(e.pluginKey):e.pluginKey,view:t=>new xS({view:t,...e})});Qn.create({name:`floatingMenu`,addOptions(){return{element:null,options:{},pluginKey:`floatingMenu`,updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,`updatePosition`),!0)}},addProseMirrorPlugins(){return this.options.element?[SS({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function CS(e,t){return e??new $r(t)}var wS=typeof window<`u`?Q.useLayoutEffect:Q.useEffect,TS=new Set([`left`,`opacity`,`position`,`top`,`visibility`,`width`]),ES=new Set(`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.columnCount.columns.fillOpacity.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineClamp.lineHeight.opacity.order.orphans.scale.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth.tabSize.widows.zIndex.zoom`.split(`.`)),DS=new Set([`children`,`className`,`style`]),OS=new Set([`tabIndex`]),kS=new Set([`accessKey`,`autoCapitalize`,`contentEditable`,`contextMenu`,`dir`,`draggable`,`enterKeyHint`,`hidden`,`id`,`lang`,`nonce`,`role`,`slot`,`spellCheck`,`tabIndex`,`title`,`translate`]),AS={Blur:`focusout`,DoubleClick:`dblclick`,Focus:`focusin`,MouseEnter:`mouseenter`,MouseLeave:`mouseleave`};function jS(e,t){return/^on[A-Z]/.test(e)&&typeof t==`function`}function MS(e){return e.startsWith(`aria-`)||e.startsWith(`data-`),e}function NS(e){return e.startsWith(`aria-`)||e.startsWith(`data-`)||kS.has(e)}function PS(e){return e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function FS(e){let t=e.endsWith(`Capture`),n=(t?e.slice(0,-7):e).slice(2);return{eventName:AS[n]??n.toLowerCase(),options:t?{capture:!0}:void 0}}function IS(e,t){let n=t.defaultPrevented,r=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>r},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{r=!0,t.stopPropagation()}}}),i}function LS(e){return OS.has(e)}function RS(e,t,n){if(t===`tabIndex`){e.tabIndex=Number(n);return}e[t]=n}function zS(e,t){if(t===`tabIndex`){e.removeAttribute(`tabindex`);return}let n=e[t];if(typeof n==`boolean`){e[t]=!1;return}if(typeof n==`number`){e[t]=0;return}e[t]=``}function BS(e,t){return typeof t!=`number`||t===0||e.startsWith(`--`)||ES.has(e)?String(t):`${t}px`}function VS(e,t){TS.has(t)||e.style.removeProperty(PS(t))}function HS(e,t,n){TS.has(t)||e.style.setProperty(PS(t),BS(t,n))}function US(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach(r=>{if(DS.has(r)||!NS(r)||jS(r,t[r])||jS(r,n[r]))return;let i=t[r],a=n[r];if(i===a)return;let o=MS(r);if(a==null||a===!1){LS(r)&&zS(e,r),e.removeAttribute(o);return}if(a===!0){LS(r)&&RS(e,r,!0),e.setAttribute(o,``);return}if(LS(r)){RS(e,r,a);return}e.setAttribute(o,String(a))})}function WS(e,t,n){if(t!==n){if(n){e.className=n;return}e.removeAttribute(`class`)}}function GS(e,t,n){let r=t??{},i=n??{};new Set([...Object.keys(r),...Object.keys(i)]).forEach(t=>{let n=r[t],a=i[t];if(n!==a){if(a==null){VS(e,t);return}HS(e,t,a)}})}function KS(e,t,n){t.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)});let r=[];return Object.entries(n).forEach(([t,n])=>{if(!jS(t,n))return;let{eventName:i,options:a}=FS(t),o=t=>{n(IS(e,t))};e.addEventListener(i,o,a),r.push({eventName:i,listener:o,options:a})}),r}function qS(e,t){let n=(0,Q.useRef)({}),r=(0,Q.useRef)([]);wS(()=>{let i=n.current;return WS(e,i.className,t.className),GS(e,i.style,t.style),US(e,i,t),r.current=KS(e,r.current,t),n.current=t,()=>{r.current.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)}),r.current=[]}},[e,t])}var JS=Q.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,getReferencedVirtualElement:o,options:s,children:c,...l},u)=>{let d=(0,Q.useRef)(document.createElement(`div`)),f=(0,Q.useRef)(CS(e,`bubbleMenu`)).current;qS(d.current,l),typeof u==`function`?u(d.current):u&&(u.current=d.current);let{editor:p}=gt(),m=t||p,h={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:f,shouldShow:a,getReferencedVirtualElement:o,options:s},g=(0,Q.useRef)(h);g.current=h;let[_,v]=(0,Q.useState)(!1),y=(0,Q.useRef)(!0);return(0,Q.useEffect)(()=>{if(m?.isDestroyed)return;if(!m){console.warn(`BubbleMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=d.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=bS({...g.current,editor:m,element:e});m.registerPlugin(t);let n=g.current.pluginKey;return y.current=!0,v(!0),()=>{v(!1),m.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[m]),(0,Q.useEffect)(()=>{if(!(!_||!m||m.isDestroyed)){if(y.current){y.current=!1;return}m.view.dispatch(m.state.tr.setMeta(f,{type:`updateOptions`,options:g.current}))}},[_,m,n,r,a,s,i,o,f]),(0,Gs.createPortal)(c,d.current)});Q.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,options:o,children:s,...c},l)=>{let u=(0,Q.useRef)(document.createElement(`div`)),d=(0,Q.useRef)(CS(e,`floatingMenu`)).current;qS(u.current,c),typeof l==`function`?l(u.current):l&&(l.current=u.current);let{editor:f}=gt(),p=t||f,m={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:d,shouldShow:a,options:o},h=(0,Q.useRef)(m);h.current=m;let[g,_]=(0,Q.useState)(!1),v=(0,Q.useRef)(!0);return(0,Q.useEffect)(()=>{if(p?.isDestroyed)return;if(!p){console.warn(`FloatingMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=u.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=SS({...h.current,editor:p,element:e});p.registerPlugin(t);let n=h.current.pluginKey;return v.current=!0,_(!0),()=>{_(!1),p.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[p]),(0,Q.useEffect)(()=>{if(!(!g||!p||p.isDestroyed)){if(v.current){v.current=!1;return}p.view.dispatch(p.state.tr.setMeta(d,{type:`updateOptions`,options:h.current}))}},[g,p,n,r,a,o,i,d]),(0,Gs.createPortal)(s,u.current)});var YS=[{name:`paragraph`,label:`Text`,icon:Pc,isActive:e=>e.isActive(`paragraph`)&&!e.isActive(`list`),command:e=>e.chain().focus().setParagraph().run()},{name:`heading1`,label:`Heading 1`,icon:pe,isActive:e=>e.isActive(`heading`,{level:1}),command:e=>e.chain().focus().toggleHeading({level:1}).run()},{name:`heading2`,label:`Heading 2`,icon:k,isActive:e=>e.isActive(`heading`,{level:2}),command:e=>e.chain().focus().toggleHeading({level:2}).run()},{name:`heading3`,label:`Heading 3`,icon:ge,isActive:e=>e.isActive(`heading`,{level:3}),command:e=>e.chain().focus().toggleHeading({level:3}).run()},{name:`bulletList`,label:`Bullet List`,icon:q,isActive:e=>e.isActive(`list`,{ordered:!1})&&!e.isActive(`listItem`,{checked:!0})&&!e.isActive(`listItem`,{checked:!1}),command:e=>e.chain().focus().toggleBulletList().run()},{name:`orderedList`,label:`Ordered List`,icon:j,isActive:e=>e.isActive(`list`,{ordered:!0}),command:e=>e.chain().focus().toggleOrderedList().run()},{name:`taskList`,label:`Task List`,icon:w,isActive:e=>e.isActive(`listItem`,{checked:!0})||e.isActive(`listItem`,{checked:!1}),command:e=>e.chain().focus().toggleTaskList().run()},{name:`blockquote`,label:`Quote`,icon:nt,isActive:e=>e.isActive(`blockquote`),command:e=>e.chain().focus().toggleBlockquote().run()},{name:`codeBlock`,label:`Code Block`,icon:qc,isActive:e=>e.isActive(`codeBlock`),command:e=>e.chain().focus().toggleCodeBlock().run()}];function XS(e){let t=(0,$.c)(18),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:ZS},t[0]=n,t[1]=r);let{current:i,activeStates:a}=st(r),o=i.icon,s;t[2]===o?s=t[3]:(s=(0,Z.jsx)(o,{className:`size-3.5`}),t[2]=o,t[3]=s);let c;t[4]===i.label?c=t[5]:(c=(0,Z.jsx)(`span`,{children:i.label}),t[4]=i.label,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(St,{className:`size-3 opacity-50`}),t[6]=l):l=t[6];let u;t[7]!==s||t[8]!==c?(u=(0,Z.jsx)(ga,{asChild:!0,children:(0,Z.jsxs)(Ti,{variant:`ghost`,size:`sm`,className:`gap-1 px-2 text-sm font-medium text-accent-foreground/80`,children:[s,c,l]})}),t[7]=s,t[8]=c,t[9]=u):u=t[9];let d;t[10]!==a||t[11]!==n?(d=YS.map(e=>{let t=e.icon,r=a[e.name];return(0,Z.jsxs)(oa,{className:r?`bg-accent text-accent-foreground`:``,onSelect:()=>{e.command(n)},children:[(0,Z.jsx)(t,{className:`size-4`}),(0,Z.jsx)(`span`,{children:e.label})]},e.name)}),t[10]=a,t[11]=n,t[12]=d):d=t[12];let f;t[13]===d?f=t[14]:(f=(0,Z.jsx)(ta,{align:`start`,sideOffset:8,className:`w-44 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto subtle-scrollbar`,children:d}),t[13]=d,t[14]=f);let p;return t[15]!==u||t[16]!==f?(p=(0,Z.jsxs)(Ca,{children:[u,f]}),t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function ZS(e){let t=Object.fromEntries(YS.map(t=>[t.name,t.isActive(e.editor)]));return{current:YS.find(e=>t[e.name])??YS[0],activeStates:t}}function QS(e){let t=e.state.selection.node;if(!t||t.type.name!==`jsxComponent`)return null;let n=t.attrs.componentName;if(n!==`File`&&n!==`WikiEmbedFile`)return null;let r=(t.attrs.props??{}).src;return typeof r!=`string`||r.length===0?null:r}function $S(e){let t=e.state.selection.node;if(!t)return``;let n=t.attrs.props??{},r=typeof n.alias==`string`?n.alias:``;if(r.length>0)return r;let i=typeof n.name==`string`?n.name:``;return i.length>0?i:l(typeof n.src==`string`?n.src:``)}function eC(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,n.rel=`noopener noreferrer`,n.style.display=`none`,document.body.appendChild(n),n.click(),n.remove()}function tC(e){let t=(0,$.c)(13),{editor:n}=e,{_:r}=i(),a;if(t[0]===n?a=t[1]:(a={editor:n,selector:nC},t[0]=n,t[1]=a),st(a)===null)return null;let o;t[2]===r?o=t[3]:(o=r({id:`WcWS__`}),t[2]=r,t[3]=o);let c;t[4]===n?c=t[5]:(c=e=>{e.preventDefault();let t=QS(n);t&&eC(t,$S(n))},t[4]=n,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(bo,{className:`size-3.5`}),t[6]=l):l=t[6];let u;t[7]!==o||t[8]!==c?(u=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":o,className:`text-accent-foreground`,onMouseDown:c,children:l})}),t[7]=o,t[8]=c,t[9]=u):u=t[9];let d;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(wn,{side:`bottom`,sideOffset:8,children:(0,Z.jsx)(s,{id:`WcWS__`})}),t[10]=d):d=t[10];let f;return t[11]===u?f=t[12]:(f=(0,Z.jsx)(`div`,{className:`flex items-center gap-0.5`,children:(0,Z.jsxs)(Ir,{children:[u,d]})}),t[11]=u,t[12]=f),f}function nC(e){return QS(e.editor)}function rC(e){return QS(e)!==null}var iC=[{value:`left`,label:`Align left`,icon:ue},{value:`center`,label:`Align center`,icon:b},{value:`right`,label:`Align right`,icon:S}];function aC(e){let t=e.state.selection.node;if(!t||t.type.name!==`jsxComponent`)return null;let n=t.attrs.componentName;if(n!==`img`&&n!==`CommonMarkImage`&&n!==`Embed`)return null;let r=(t.attrs.props??{}).align;return r===`left`||r===`right`||r===`center`?r:`center`}function oC(e){let t=(0,$.c)(7),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:sC},t[0]=n,t[1]=r);let i=st(r);if(i===null)return null;let a;t[2]!==i||t[3]!==n?(a=iC.map(e=>{let{value:t,label:r,icon:a}=e,o=i===t;return(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":r,"aria-pressed":o,className:o?`bg-accent text-primary`:`text-accent-foreground`,onMouseDown:e=>{e.preventDefault();let r=n.state.selection,i=r.node;if(!i||i.type.name!==`jsxComponent`)return;let a=String(i.attrs.componentName??``);if(a!==`img`&&a!==`CommonMarkImage`&&a!==`Embed`||i.attrs.kind!==`element`)return;let o=a===`CommonMarkImage`,s=r.from,c={...i.attrs.props??{},align:t},l=o?{...i.attrs,componentName:`img`,props:c,sourceDirty:!0}:{...i.attrs,props:c,sourceDirty:!0},u=n.state.tr.setNodeMarkup(s,null,l);u.setSelection(ri.create(u.doc,s)),Ke(n.view.nodeDOM(s),()=>{n.view.dispatch(u)})},children:(0,Z.jsx)(a,{className:`size-3.5`})})}),(0,Z.jsx)(wn,{side:`bottom`,sideOffset:8,children:r})]},t)}),t[2]=i,t[3]=n,t[4]=a):a=t[4];let o;return t[5]===a?o=t[6]:(o=(0,Z.jsx)(`div`,{className:`flex items-center gap-0.5`,children:a}),t[5]=a,t[6]=o),o}function sC(e){return aC(e.editor)}function cC(e){return aC(e)!==null}var lC=[{name:`bold`,icon:Ws,command:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive(`strong`),shortcut:`⌘ B`},{name:`italic`,icon:yc,command:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive(`emphasis`),shortcut:`⌘ I`},{name:`underline`,icon:tl,command:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive(`underline`),shortcut:`⌘ U`},{name:`strikethrough`,icon:Zc,command:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive(`strike`),shortcut:`⌘ ⇧ X`},{name:`code`,icon:ec,command:e=>e.chain().focus().toggleCode().run(),isActive:e=>e.isActive(`code`),shortcut:`⌘ E`},{name:`highlight`,icon:vc,command:e=>e.chain().focus().toggleHighlight().run(),isActive:e=>e.isActive(`highlight`),shortcut:`⌘ ⇧ H`}];function uC(e){let t=(0,$.c)(7),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:dC},t[0]=n,t[1]=r);let i=st(r),a;t[2]!==i||t[3]!==n?(a=lC.map(e=>{let t=e.icon,r=i[e.name];return(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":e.name,className:r?`bg-accent text-primary`:`text-accent-foreground`,onMouseDown:t=>{t.preventDefault(),e.command(n)},children:(0,Z.jsx)(t,{className:`size-3.5`})})}),(0,Z.jsxs)(wn,{side:`bottom`,sideOffset:8,children:[(0,Z.jsx)(`span`,{className:`capitalize`,children:e.name}),(0,Z.jsx)(db,{children:Wn()?e.shortcut:e.shortcut.replace(`⌘`,`Ctrl`)})]})]},e.name)}),t[2]=i,t[3]=n,t[4]=a):a=t[4];let o;return t[5]===a?o=t[6]:(o=(0,Z.jsx)(`div`,{className:`flex items-center gap-0.5`,children:a}),t[5]=a,t[6]=o),o}function dC(e){return Object.fromEntries(lC.map(t=>[t.name,t.isActive(e.editor)]))}function fC(e){let t=(0,$.c)(60),{editor:n}=e,{_:r}=i(),[a,o]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(``),u=(0,Q.useRef)(null),d;t[0]===n?d=t[1]:(d=n.isActive(`link`),t[0]=n,t[1]=d);let f=d,p;t[2]===n?p=t[3]:(p=n.getAttributes(`link`).href??``,t[2]=n,t[3]=p);let m=p,h,g;t[4]===n?(h=t[5],g=t[6]):(h=()=>{let e=function(){n.state.selection.empty&&o(!1)};return n.on(`selectionUpdate`,e),()=>{n.off(`selectionUpdate`,e)}},g=[n],t[4]=n,t[5]=h,t[6]=g),(0,Q.useEffect)(h,g);let _,v;t[7]!==m||t[8]!==a?(_=()=>{a&&(l(m),requestAnimationFrame(()=>u.current?.focus()))},v=[a,m],t[7]=m,t[8]=a,t[9]=_,t[10]=v):(_=t[9],v=t[10]),(0,Q.useEffect)(_,v);let y;t[11]!==n||t[12]!==f||t[13]!==c?(y=function(){c.trim()?n.chain().focus().setLink({href:c.trim()}).run():f&&n.chain().focus().unsetLink().run(),o(!1)},t[11]=n,t[12]=f,t[13]=c,t[14]=y):y=t[14];let b=y,x;t[15]===n?x=t[16]:(x=function(){n.chain().focus().unsetLink().run(),o(!1)},t[15]=n,t[16]=x);let S=x,C;t[17]!==b||t[18]!==n?(C=function(e){e.key===`Enter`&&(e.preventDefault(),b()),e.key===`Escape`&&(e.preventDefault(),o(!1),n.chain().focus().run())},t[17]=b,t[18]=n,t[19]=C):C=t[19];let w=C;if(a){let e;t[20]===r?e=t[21]:(e=r({id:`ZsGpr_`}),t[20]=r,t[21]=e);let n;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(n=e=>l(e.target.value),t[22]=n):n=t[22];let i;t[23]===r?i=t[24]:(i=r({id:`roAe2K`}),t[23]=r,t[24]=i);let a;t[25]!==w||t[26]!==e||t[27]!==i||t[28]!==c?(a=(0,Z.jsx)(`input`,{ref:u,type:`url`,placeholder:e,value:c,onChange:n,onKeyDown:w,"aria-label":i,className:`h-5 w-44 bg-transparent text-sm border-none outline-none placeholder:text-muted-foreground`}),t[25]=w,t[26]=e,t[27]=i,t[28]=c,t[29]=a):a=t[29];let o;t[30]===r?o=t[31]:(o=r({id:`tP5DDk`}),t[30]=r,t[31]=o);let d;t[32]===b?d=t[33]:(d=()=>{b()},t[32]=b,t[33]=d);let p;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(ic,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[34]=p):p=t[34];let h;t[35]!==o||t[36]!==d?(h=(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":o,onClick:d,children:p}),t[35]=o,t[36]=d,t[37]=h):h=t[37];let g;t[38]!==a||t[39]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border bg-background px-2 py-1`,children:[a,h]}),t[38]=a,t[39]=h,t[40]=g):g=t[40];let _;t[41]!==r||t[42]!==m||t[43]!==f||t[44]!==S?(_=f&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":r({id:`2vIPtm`}),onMouseDown:e=>{e.preventDefault(),Vt(m)},children:(0,Z.jsx)(Co,{className:`size-3.5`})})}),(0,Z.jsx)(wn,{side:`bottom`,sideOffset:8,children:(0,Z.jsx)(s,{id:`2vIPtm`})})]}),(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":r({id:`484LKL`}),onMouseDown:e=>{e.preventDefault(),S()},children:(0,Z.jsx)(Pt,{className:`size-3.5`})})}),(0,Z.jsx)(wn,{side:`bottom`,sideOffset:8,children:(0,Z.jsx)(s,{id:`484LKL`})})]})]}),t[41]=r,t[42]=m,t[43]=f,t[44]=S,t[45]=_):_=t[45];let v;return t[46]!==g||t[47]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[g,_]}),t[46]=g,t[47]=_,t[48]=v):v=t[48],v}let T;t[49]===r?T=t[50]:(T=r({id:`p0Iq25`}),t[49]=r,t[50]=T);let E=f?`bg-accent text-primary`:`text-accent-foreground`,D,O;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{e.preventDefault(),o(!0)},O=(0,Z.jsx)(xc,{className:`size-3.5`}),t[51]=D,t[52]=O):(D=t[51],O=t[52]);let k;t[53]!==T||t[54]!==E?(k=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":T,className:E,onMouseDown:D,children:O})}),t[53]=T,t[54]=E,t[55]=k):k=t[55];let A;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(s,{id:`yzF66j`}),t[56]=A):A=t[56];let j;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Z.jsxs)(wn,{side:`bottom`,sideOffset:8,children:[A,(0,Z.jsx)(db,{children:Wn()?`⌘ K`:`Ctrl K`})]}),t[57]=j):j=t[57];let M;return t[58]===k?M=t[59]:(M=(0,Z.jsxs)(Ir,{children:[k,j]}),t[58]=k,t[59]=M),M}function pC({editor:e}){if(Pe(e.state).query||e.isActive(`codeBlock`))return!1;if(cC(e)||rC(e))return!0;if(e.state.selection.empty)return!1;let{from:t,to:n}=e.state.selection;return!!e.state.doc.textBetween(t,n,` `).trim()}function mC(e){let t=(0,$.c)(22),{editor:n}=e,r=(0,Q.useRef)(null),[i,a]=(0,Q.useState)(0),o=(0,Q.useRef)(null),s;t[0]===n?s=t[1]:(s={editor:n,selector:yC},t[0]=n,t[1]=s);let c=st(s),l;t[2]===n?l=t[3]:(l={editor:n,selector:vC},t[2]=n,t[3]=l);let u=st(l),d;t[4]!==n.state||t[5]!==n.view?(d=()=>{try{let{from:e,to:t}=n.state.selection;return _r(n.view,e,t)}catch{return new DOMRect}},t[4]=n.state,t[5]=n.view,t[6]=d):d=t[6];let f;if(t[7]!==n.view.dom||t[8]!==d){let e={getBoundingClientRect:d,contextElement:n.view.dom};f=()=>{let t=r.current;t&&(o.current?.(),o.current=En(e,t,()=>{dr(e,t,{placement:`top`,strategy:`fixed`,middleware:[Rn(8),Bn(),Un({padding:8})]}).then(e=>{let{x:n,y:r}=e;t.isConnected&&(t.style.position=`fixed`,t.style.left=`${n}px`,t.style.top=`${r}px`)}).catch(_C)}))},t[7]=n.view.dom,t[8]=d,t[9]=f}else f=t[9];let p=f,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{o.current?.(),o.current=null,a(gC)},t[10]=m):m=t[10];let h=m,g;t[11]===p?g=t[12]:(g={onShow:p,onHide:h,strategy:`fixed`},t[11]=p,t[12]=g);let _;t[13]!==n||t[14]!==u||t[15]!==c||t[16]!==i?(_=c?(0,Z.jsx)(oC,{editor:n},`${i}-img-align`):u?(0,Z.jsx)(tC,{editor:n},`${i}-file`):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(XS,{editor:n}),(0,Z.jsx)(to,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),(0,Z.jsx)(uC,{editor:n},i),(0,Z.jsx)(to,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),(0,Z.jsx)(fC,{editor:n},`${i}-link`)]}),t[13]=n,t[14]=u,t[15]=c,t[16]=i,t[17]=_):_=t[17];let v;return t[18]!==n||t[19]!==g||t[20]!==_?(v=(0,Z.jsx)(JS,{ref:r,editor:n,"data-testid":`bubble-menu-bar`,appendTo:hC,shouldShow:pC,updateDelay:250,options:g,className:`z-50 flex items-center gap-0.5 rounded-lg border bg-background p-1 shadow-md`,children:_}),t[18]=n,t[19]=g,t[20]=_,t[21]=v):v=t[21],v}function hC(){return document.body}function gC(e){return e+1}function _C(){}function vC(e){return rC(e.editor)}function yC(e){return cC(e.editor)}var bC=[{name:`addRowBefore`,icon:pt,label:`Add row above`,command:e=>e.chain().focus().addRowBefore().run()},{name:`addRowAfter`,icon:Tt,label:`Add row below`,command:e=>e.chain().focus().addRowAfter().run()},{name:`deleteRow`,icon:Pt,label:`Delete row`,command:e=>e.chain().focus().deleteRow().run()}],xC=[{name:`addColumnBefore`,icon:Pi,label:`Add column left`,command:e=>e.chain().focus().addColumnBefore().run()},{name:`addColumnAfter`,icon:Ki,label:`Add column right`,command:e=>e.chain().focus().addColumnAfter().run()},{name:`deleteColumn`,icon:Pt,label:`Delete column`,command:e=>e.chain().focus().deleteColumn().run()}],SC=[{name:`toggleHeaderRow`,icon:Qc,label:`Toggle header row`,command:e=>e.chain().focus().toggleHeaderRow().run()},{name:`toggleHeaderColumn`,icon:nc,label:`Toggle header column`,command:e=>e.chain().focus().toggleHeaderColumn().run()},{name:`deleteTable`,icon:gc,label:`Delete table`,command:e=>e.chain().focus().deleteTable().run()}];function CC({editor:e}){return Pe(e.state).query?!1:e.isActive(`table`)}function wC(e){let t=(0,$.c)(14),{action:n,editor:r}=e,i=n.icon,a;t[0]!==n||t[1]!==r?(a=e=>{e.preventDefault(),n.command(r)},t[0]=n,t[1]=r,t[2]=a):a=t[2];let o;t[3]===i?o=t[4]:(o=(0,Z.jsx)(i,{className:`size-3.5`}),t[3]=i,t[4]=o);let s;t[5]!==n.label||t[6]!==a||t[7]!==o?(s=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,"aria-label":n.label,className:`text-muted-foreground`,onMouseDown:a,children:o})}),t[5]=n.label,t[6]=a,t[7]=o,t[8]=s):s=t[8];let c;t[9]===n.label?c=t[10]:(c=(0,Z.jsx)(wn,{side:`bottom`,sideOffset:8,children:n.label}),t[9]=n.label,t[10]=c);let l;return t[11]!==s||t[12]!==c?(l=(0,Z.jsxs)(Ir,{children:[s,c]}),t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function TC(e){let t=(0,$.c)(13),{editor:n}=e,r;t[0]===n?r=t[1]:(r=bC.map(e=>(0,Z.jsx)(wC,{action:e,editor:n},e.name)),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(to,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),t[2]=i):i=t[2];let a;t[3]===n?a=t[4]:(a=xC.map(e=>(0,Z.jsx)(wC,{action:e,editor:n},e.name)),t[3]=n,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(to,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),t[5]=o):o=t[5];let s;t[6]===n?s=t[7]:(s=SC.map(e=>(0,Z.jsx)(wC,{action:e,editor:n},e.name)),t[6]=n,t[7]=s);let c;return t[8]!==n||t[9]!==r||t[10]!==a||t[11]!==s?(c=(0,Z.jsxs)(JS,{editor:n,"data-testid":`table-controls-menu`,shouldShow:CC,updateDelay:100,className:`flex items-center gap-0.5 rounded-lg border bg-background p-1 shadow-md`,children:[r,i,a,o,s]}),t[8]=n,t[9]=r,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}var EC=new WeakMap;function DC(e){let t=document.createElement(`span`);t.classList.add(`collaboration-cursor__caret`),t.style.borderColor=e.color;let n=document.createElement(`div`);return n.classList.add(`collaboration-cursor__label`),n.style.backgroundColor=e.color,n.style.color=Pr(e.color),n.textContent=e.name,t.append(n),t}var OC={state:`idle`,count:0,lastFiredAt:null,position:`append`,lastAgentId:null},kC=100,AC=100,jC=3,MC=250;function NC(){let e=new Hn({extensions:ci});return{mdManager:e,text:ve({mdManager:e}),html:fe({mdManager:e}),paste:I({mdManager:e}),drop:E({mdManager:e})}}function PC(e){let{provider:t,placeholder:n,prebuiltMapping:r}=e;return[...ht.map(e=>e.name===`link`||e.name===`wikiLink`||e.name===`jsxComponent`?e.configure({docName:t.configuration.name??``}):e.name===`toggleHeadings`?e.configure({getDocName:()=>t.configuration.name??null}):e),uS.configure({placeholder:n??`Type '/' for commands`,showOnlyCurrent:!0}),he.configure({document:t.document,...r?{ySyncOptions:{mapping:r}}:{}}),Qn.create({name:`imageUploadDecoration`,addProseMirrorPlugins(){return[dt]}}),Qn.create({name:`collaborationCursor`,addProseMirrorPlugins(){let e=t.awareness;if(!e)throw Error(`[TiptapEditor] HocuspocusProvider has no awareness instance — cursor plugin cannot initialize`);return[ke(e,{cursorBuilder:DC})]}})]}function FC(e){let{provider:t,clipboard:n,ctorStart:r}=e;return{onBeforeCreate:({editor:e})=>{EC.set(e,r)},onCreate:({editor:e})=>{n.html.setView(e.view);let r=EC.get(e);if(EC.delete(e),r==null)return;let i=performance.now();qe(`ok/editor/create-tiptap`,{docName:t.configuration.name??`unknown`,ytextLength:t.document.getText(`source`).length},{startTime:r,duration:Math.max(0,i-r)})},editorProps:{attributes:{class:`pt-4 pb-4 h-full`},clipboardTextParser:(e,t,r,i)=>{let a=n.mdManager.parse(e);return i.state.schema.nodeFromJSON(a).content},clipboardTextSerializer:(e,t)=>n.text(e,t),clipboardSerializer:n.html.serializer,handlePaste:(e,t)=>n.paste(e,t),handleDrop:(e,t)=>n.drop(e,t)},extensions:hf(PC(e))}}function IC(e){let{provider:t,placeholder:n,clipboard:r,ctorStart:i}=e,a=pr(PC({provider:t,placeholder:n,clipboard:r,ctorStart:i})),{doc:o,mapping:s}=Ce(t.document.getXmlFragment(`default`),a);return{...FC({provider:t,placeholder:n,clipboard:r,ctorStart:i,prebuiltMapping:s}),content:o.toJSON(),element:null}}var LC=e=>{let t=(0,$.c)(21),{provider:n,placeholder:r,isSourceMode:i,portalTarget:a}=e,o=(0,Q.useRef)(null),s=(0,Q.useRef)(OC),c=gS(),{principal:l,activeDocName:u}=lt(),d=n.configuration.name??``,[f]=(0,Q.useState)(NC),p;t[0]!==f||t[1]!==r||t[2]!==n?(p=()=>()=>({editor:new Yn(IC({provider:n,placeholder:r,clipboard:f,ctorStart:performance.now()})),ydoc:n.document,ytext:n.document.getText(`source`),provider:n}),t[0]=f,t[1]=r,t[2]=n,t[3]=p):p=t[3];let[m]=(0,Q.useState)(p),h,g;if(t[4]!==m||t[5]!==d||t[6]!==n.document){let e={viewCount:0,bytes:n.document.getText(`source`).length},r=x(d)??crypto.randomUUID();h=Q.use,g=Ft({docName:d,mountId:r,construct:m,sizeStats:e}),t[4]=m,t[5]=d,t[6]=n.document,t[7]=h,t[8]=g}else h=t[7],g=t[8];let _=h(g),v=_.editor,y,b;t[9]===_?(y=t[10],b=t[11]):(y=()=>()=>{Mt(_)},b=[_],t[9]=_,t[10]=y,t[11]=b),(0,Q.useEffect)(y,b);let S;return t[12]!==u||t[13]!==d||t[14]!==v||t[15]!==c||t[16]!==i||t[17]!==a||t[18]!==l||t[19]!==n?(S=(0,Z.jsx)(RC,{provider:n,isSourceMode:i,docName:d,activeDocName:u,identity:c,principal:l,editor:v,wrapperRef:o,flashStateRef:s,portalTarget:a}),t[12]=u,t[13]=d,t[14]=v,t[15]=c,t[16]=i,t[17]=a,t[18]=l,t[19]=n,t[20]=S):S=t[20],S},RC=e=>{let t=(0,$.c)(85),{provider:n,isSourceMode:r,docName:i,activeDocName:a,identity:o,principal:s,editor:c,wrapperRef:l,flashStateRef:u,portalTarget:d}=e,f=(0,Q.useRef)(null),m,h;t[0]===d?(m=t[1],h=t[2]):(m=()=>{let e=f.current;if(e)return e.appendChild(d),()=>{d.parentNode===e&&e.removeChild(d)}},h=[d],t[0]=d,t[1]=m,t[2]=h),(0,Q.useLayoutEffect)(m,h);let g;t[3]!==c||t[4]!==n.configuration.name?(g=()=>(Qe(c,n.configuration.name??null),()=>{Qe(c,null)}),t[3]=c,t[4]=n.configuration.name,t[5]=g):g=t[5];let v;t[6]!==c||t[7]!==n?(v=[c,n],t[6]=c,t[7]=n,t[8]=v):v=t[8],(0,Q.useEffect)(g,v);let y;t[9]!==c||t[10]!==n.configuration.name?(y=()=>{let e=n.configuration.name;if(e)return p(e,c),()=>U(e,c)},t[9]=c,t[10]=n.configuration.name,t[11]=y):y=t[11];let b;t[12]!==c||t[13]!==n?(b=[c,n],t[12]=c,t[13]=n,t[14]=b):b=t[14],(0,Q.useEffect)(y,b);let x;t[15]!==c||t[16]!==n.configuration.name?(x=()=>{},t[15]=c,t[16]=n.configuration.name,t[17]=x):x=t[17];let S;t[18]!==c||t[19]!==n?(S=[c,n],t[18]=c,t[19]=n,t[20]=S):S=t[20],(0,Q.useEffect)(x,S);let C,w;t[21]===c?(C=t[22],w=t[23]):(w=()=>{let e=zC,t=null,n=()=>{if(t||c.isDestroyed)return;let n=_(c);n&&(t=n.dom,t.addEventListener(`keydown`,e),t.addEventListener(`paste`,e),t.addEventListener(`drop`,e),t.addEventListener(`cut`,e))},r=()=>{t&&=(t.removeEventListener(`keydown`,e),t.removeEventListener(`paste`,e),t.removeEventListener(`drop`,e),t.removeEventListener(`cut`,e),null)};return _(c)?n():c.on(`create`,n),()=>{c.off(`create`,n),r()}},C=[c],t[21]=c,t[22]=C,t[23]=w),(0,Q.useEffect)(w,C);let T,E;t[24]!==i||t[25]!==c?(T=()=>{let e=!1,t=()=>{if(e||c.isDestroyed||!_(c))return;e=!0;let t=Bt(i)?.selection??null;if(t)try{let e=c.state.doc.content.size;if(t.type===`text`){let n=Math.max(0,Math.min(t.anchor,e)),r=Math.max(0,Math.min(t.head,e));c.commands.setTextSelection({from:n,to:r})}else{let n=Math.max(0,Math.min(t.from,e));c.commands.setNodeSelection(n)}}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(JSON.stringify({event:`ok-editor-selection-restore-failed`,docName:i,message:n})),qe(`ok/editor/selection-restore-failed`,{docName:i,message:n})}Ye(i)};if(_(c)){t();return}return c.on(`create`,t),()=>{c.off(`create`,t)}},E=[c,i],t[24]=i,t[25]=c,t[26]=T,t[27]=E):(T=t[26],E=t[27]),(0,Q.useEffect)(T,E);let D,O;t[28]!==u||t[29]!==n.document||t[30]!==l?(D=()=>{let e=n.document.getMap(`agent-flash`),t=Date.now(),r=0,i=null,a=null,o=null,s=()=>{let t=null;for(let[,n]of e.entries()){let e=n;e.timestamp&&(!t||e.timestamp>t.timestamp)&&(t={agentId:e.agentId??`unknown`,timestamp:e.timestamp,type:e.type??`insert`,description:e.description})}return t},c=e=>{u.current=e;let t=l.current;t&&(t.setAttribute(`data-agent-flash-state`,e.state),t.setAttribute(`data-agent-flash-count`,String(e.count)),t.setAttribute(`data-agent-flash-position`,e.position),t.setAttribute(`data-agent-flash-agent-id`,e.lastAgentId??``))},d=()=>{let e=s(),t=e?.description?.toLowerCase().includes(`prepend`)?`prepend`:`append`,n={state:`editing`,count:(u.current?.count??0)+1,lastFiredAt:Date.now(),position:t,lastAgentId:e?.agentId??null};c(n),document.dispatchEvent(new CustomEvent(`agent-flash`,{detail:n})),a&&clearTimeout(a),o&&clearTimeout(o),a=window.setTimeout(()=>{let e={...n,state:`settled`};c(e),document.dispatchEvent(new CustomEvent(`agent-flash-end`,{detail:e})),o=window.setTimeout(()=>{c({...e,state:`idle`})},300)},In)};c(OC);let f=()=>{if(qn(e),!fr(e,t)||document.visibilityState!==`visible`)return;let n=Date.now();if(t=n,n-r<500){if(!i){let e=500-(n-r);i=window.setTimeout(()=>{i=null,r=Date.now(),d()},e)}return}r=n,d()};e.observe(f);let p=()=>{document.visibilityState===`visible`?fr(e,t)&&(t=Date.now(),r=Date.now(),d()):t=Date.now()};return document.addEventListener(`visibilitychange`,p),()=>{e.unobserve(f),document.removeEventListener(`visibilitychange`,p),i&&clearTimeout(i),a&&clearTimeout(a),o&&clearTimeout(o)}},O=[n.document,u,l],t[28]=u,t[29]=n.document,t[30]=l,t[31]=D,t[32]=O):(D=t[31],O=t[32]),(0,Q.useEffect)(D,O);let k,A;t[33]!==a||t[34]!==i||t[35]!==c||t[36]!==n?(k=()=>{let e=0,t,r=null,o=null,s=null,l=function(){if(e<kC){e+=1,t=window.setTimeout(p,AC);return}r=null,o=null,e=0},u=function(e){let t=_(c);if(!t)return null;let n=CSS.escape(e);return t.dom.querySelector(`#${n}`)??t.dom.querySelector(`[data-mirror-source-id="${n}"]`)},d=function(e){let t=u(e);return t?(t.scrollIntoView({behavior:`smooth`,block:`start`}),!0):!1},f=function(e,n){let r=jC,o=()=>{t=void 0,!(i!==a||window.location.hash!==n)&&(d(e),--r,r>0&&(t=window.setTimeout(o,MC)))};t=window.setTimeout(o,MC)};function p(){if(!r||i!==a)return;let t=r,n=o;if(!n){l();return}d(t)?(s=n,r=null,o=null,e=0,f(t,n)):l()}let m=function(){if(i!==a)return;let n=window.location.hash;if(!r&&s===n)return;let c=Wr(n);if(!c){s=n;return}r=c,o=n,e=0,t!==void 0&&(clearTimeout(t),t=void 0),p()},h=function(){if(i===a){if(r){p();return}m()}};return m(),n.on(`synced`,h),c.on(`transaction`,h),window.addEventListener(`hashchange`,m),()=>{t!==void 0&&clearTimeout(t),n.off(`synced`,h),c.off(`transaction`,h),window.removeEventListener(`hashchange`,m)}},A=[n,c,i,a],t[33]=a,t[34]=i,t[35]=c,t[36]=n,t[37]=k,t[38]=A):(k=t[37],A=t[38]),(0,Q.useEffect)(k,A);let j,M;t[39]===c?(j=t[40],M=t[41]):(j=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`wysiwyg`||c.isDestroyed)return;let n=_(c);if(!n)return;let r=n.dom.querySelectorAll(`h1, h2, h3, h4, h5, h6`)[t.index];r&&r.scrollIntoView({behavior:`smooth`,block:`start`})};return window.addEventListener(Ss,e),()=>window.removeEventListener(Ss,e)},M=[c],t[39]=c,t[40]=j,t[41]=M),(0,Q.useEffect)(j,M);let N;t[42]!==a||t[43]!==i||t[44]!==o||t[45]!==r||t[46]!==s||t[47]!==n.awareness?(N=()=>{let e=n.awareness;if(e){if(i!==a){e.setLocalState(null);return}e.setLocalState({user:_S({principal:s,identity:o}),mode:r?`source`:`wysiwyg`})}},t[42]=a,t[43]=i,t[44]=o,t[45]=r,t[46]=s,t[47]=n.awareness,t[48]=N):N=t[48];let P;t[49]!==a||t[50]!==i||t[51]!==o||t[52]!==r||t[53]!==s||t[54]!==n?(P=[n,i,a,o,s,r],t[49]=a,t[50]=i,t[51]=o,t[52]=r,t[53]=s,t[54]=n,t[55]=P):P=t[55],(0,Q.useEffect)(N,P);let I,L;t[56]!==c||t[57]!==r?(I=()=>(F(c,r),()=>{F(c,!1)}),L=[c,r],t[56]=c,t[57]=r,t[58]=I,t[59]=L):(I=t[58],L=t[59]),(0,Q.useEffect)(I,L);let R;t[60]!==c||t[61]!==r?(R=!r&&(0,Z.jsx)(mC,{editor:c}),t[60]=c,t[61]=r,t[62]=R):R=t[62];let z;t[63]!==c||t[64]!==r?(z=!r&&(0,Z.jsx)(TC,{editor:c}),t[63]=c,t[64]=r,t[65]=z):z=t[65];let B;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,Z.jsx)(`div`,{ref:f,style:{display:`contents`}}),t[66]=B):B=t[66];let V;t[67]===c?V=t[68]:(V=(0,Z.jsx)(Be,{editor:c,className:`tiptap-editor-portal-content h-full`}),t[67]=c,t[68]=V);let H;t[69]!==d||t[70]!==V?(H=(0,Gs.createPortal)(V,d),t[69]=d,t[70]=V,t[71]=H):H=t[71];let W;t[72]===c?W=t[73]:(W=(0,Z.jsx)(mS,{editor:c}),t[72]=c,t[73]=W);let G;t[74]===c?G=t[75]:(G=He(c),t[74]=c,t[75]=G);let K;t[76]===G.store?K=t[77]:(K=(0,Z.jsx)(Ot,{store:G.store}),t[76]=G.store,t[77]=K);let ee;return t[78]!==R||t[79]!==z||t[80]!==H||t[81]!==W||t[82]!==K||t[83]!==l?(ee=(0,Z.jsxs)(`div`,{ref:l,className:`tiptap-editor h-full`,"data-agent-flash-state":`idle`,"data-agent-flash-count":`0`,"data-agent-flash-position":`append`,"data-agent-flash-agent-id":``,children:[R,z,B,H,W,K]}),t[78]=R,t[79]=z,t[80]=H,t[81]=W,t[82]=K,t[83]=l,t[84]=ee):ee=t[84],ee};function zC(){return Nt()}async function BC(){try{let e=await fetch(`/api/sync/conflicts`);return e.ok?{conflicts:(await e.json()).conflicts??[]}:(console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:e.status})),{conflicts:[],error:`server`})}catch(e){return console.warn(JSON.stringify({event:`conflicts-fetch-failed`,status:null,detail:e instanceof Error?e.message:String(e)})),{conflicts:[],error:`network`}}}function VC(){let e=(0,$.c)(10),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,r]=(0,Q.useState)(t),[i,a]=(0,Q.useState)(!0),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(0),l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=function(){let e=c.current+=1;BC().then(t=>{let{conflicts:n,error:i}=t;e===c.current&&(r(n),s(i??null),a(!1))})},e[1]=l):l=e[1];let u=l,d,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{u()},f=[],e[2]=d,e[3]=f):(d=e[2],f=e[3]),(0,Q.useEffect)(d,f);let p,m;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>fi(e=>{e.includes(`sync-status`)&&u()}),m=[],e[4]=p,e[5]=m):(p=e[4],m=e[5]),(0,Q.useEffect)(p,m);let h;return e[6]!==n||e[7]!==o||e[8]!==i?(h={conflicts:n,loading:i,error:o},e[6]=n,e[7]=o,e[8]=i,e[9]=h):h=e[9],h}var HC=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}offset(t,n=t){return new e(this.fromA+t,this.toA+t,this.fromB+n,this.toB+n)}};function UC(e,t,n,r,i,a){if(e==r)return[];let o=$C(e,t,n,r,i,a),s=ew(e,t+o,n,r,i+o,a);t+=o,n-=s,i+=o,a-=s;let c=n-t,l=a-i;if(!c||!l)return[new HC(t,n,i,a)];if(c>l){let o=e.slice(t,n).indexOf(r.slice(i,a));if(o>-1)return[new HC(t,t+o,i,i),new HC(t+o+l,n,a,a)]}else if(l>c){let o=r.slice(i,a).indexOf(e.slice(t,n));if(o>-1)return[new HC(t,t,i,i+o),new HC(n,n,i+o+c,a)]}if(c==1||l==1)return[new HC(t,n,i,a)];let u=nw(e,t,n,r,i,a);if(u){let[o,s,c]=u;return UC(e,t,o,r,i,s).concat(UC(e,o+c,n,r,s+c,a))}return qC(e,t,n,r,i,a)}var WC=1e9,GC=0,KC=!1;function qC(e,t,n,r,i,a){let o=n-t,s=a-i;if(WC<1e9&&Math.min(o,s)>WC*16||GC>0&&Date.now()>GC)return Math.min(o,s)>WC*64?[new HC(t,n,i,a)]:rw(e,t,n,r,i,a);let c=Math.ceil((o+s)/2);YC.reset(c),XC.reset(c);let l=(n,a)=>e.charCodeAt(t+n)==r.charCodeAt(i+a),u=(t,i)=>e.charCodeAt(n-t-1)==r.charCodeAt(a-i-1),d=(o-s)%2==0?null:XC,f=d?null:YC;for(let p=0;p<c;p++){if(p>WC||GC>0&&!(p&63)&&Date.now()>GC)return rw(e,t,n,r,i,a);let m=YC.advance(p,o,s,c,d,!1,l)||XC.advance(p,o,s,c,f,!0,u);if(m)return ZC(e,t,n,t+m[0],r,i,a,i+m[1])}return[new HC(t,n,i,a)]}var JC=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let e=0;e<this.len;e++)this.vec[e]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,t,n,r,i,a,o){for(let s=-e+this.start;s<=e-this.end;s+=2){let c=r+s,l=s==-e||s!=e&&this.vec[c-1]<this.vec[c+1]?this.vec[c+1]:this.vec[c-1]+1,u=l-s;for(;l<t&&u<n&&o(l,u);)l++,u++;if(this.vec[c]=l,l>t)this.end+=2;else if(u>n)this.start+=2;else if(i){let e=r+(t-n)-s;if(e>=0&&e<this.len&&i.vec[e]!=-1)if(a){let n=i.vec[e];if(n>=t-l)return[n,r+n-e]}else{let n=t-i.vec[e];if(l>=n)return[l,u]}}}return null}},YC=new JC,XC=new JC;function ZC(e,t,n,r,i,a,o,s){let c=!1;return!vw(e,r)&&++r==n&&(c=!0),!vw(i,s)&&++s==o&&(c=!0),c?[new HC(t,n,a,o)]:UC(e,t,r,i,a,s).concat(UC(e,r,n,i,s,o))}function QC(e,t){let n=1,r=Math.min(e,t);for(;n<r;)n<<=1;return n}function $C(e,t,n,r,i,a){if(t==n||t==a||e.charCodeAt(t)!=r.charCodeAt(i))return 0;let o=QC(n-t,a-i);for(let s=t,c=i;;){let i=s+o,l=c+o;if(i>n||l>a||e.slice(s,i)!=r.slice(c,l)){if(o==1)return s-t-+!vw(e,s);o>>=1}else if(i==n||l==a)return i-t;else s=i,c=l}}function ew(e,t,n,r,i,a){if(t==n||i==a||e.charCodeAt(n-1)!=r.charCodeAt(a-1))return 0;let o=QC(n-t,a-i);for(let s=n,c=a;;){let a=s-o,l=c-o;if(a<t||l<i||e.slice(a,s)!=r.slice(l,c)){if(o==1)return n-s-+!vw(e,s);o>>=1}else if(a==t||l==i)return n-a;else s=a,c=l}}function tw(e,t,n,r,i,a,o,s){let c=r.slice(i,a),l=null;for(;;){if(l||o<s)return l;for(let s=t+o;;){vw(e,s)||s++;let u=s+o;if(vw(e,u)||(u+=u==s+1?1:-1),u>=n)break;let d=e.slice(s,u),f=-1;for(;(f=c.indexOf(d,f+1))!=-1;){let o=$C(e,u,n,r,i+f+d.length,a),c=ew(e,t,s,r,i,i+f),p=d.length+o+c;(!l||l[2]<p)&&(l=[s-c,i+f-c,p])}s=u}if(s<0)return l;o>>=1}}function nw(e,t,n,r,i,a){let o=n-t,s=a-i;if(o<s){let o=nw(r,i,a,e,t,n);return o&&[o[1],o[0],o[2]]}return o<4||s*2<o?null:tw(e,t,n,r,i,a,Math.floor(o/4),-1)}function rw(e,t,n,r,i,a){KC=!0;let o=n-t,s=a-i,c;if(o<s){let s=tw(r,i,a,e,t,n,Math.floor(o/6),50);c=s&&[s[1],s[0],s[2]]}else c=tw(e,t,n,r,i,a,Math.floor(s/6),50);if(!c)return[new HC(t,n,i,a)];let[l,u,d]=c;return UC(e,t,l,r,i,u).concat(UC(e,l+d,n,r,u+d,a))}function iw(e,t){for(let n=1;n<e.length;n++){let r=e[n-1],i=e[n];r.toA>i.fromA-t&&r.toB>i.fromB-t&&(e[n-1]=new HC(r.fromA,i.toA,r.fromB,i.toB),e.splice(n--,1))}}function aw(e,t,n){for(;;){iw(n,1);let r=!1;for(let i=0;i<n.length;i++){let a=n[i],o,s;(o=$C(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=n[i]=new HC(a.fromA+o,a.toA,a.fromB+o,a.toB)),(s=ew(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=n[i]=new HC(a.fromA,a.toA-s,a.fromB,a.toB-s));let c=a.toA-a.fromA,l=a.toB-a.fromB;if(c&&l)continue;let u=a.fromA-(i?n[i-1].toA:0),d=(i<n.length-1?n[i+1].fromA:e.length)-a.toA;if(!u||!d)continue;let f=c?e.slice(a.fromA,a.toA):t.slice(a.fromB,a.toB);u<=f.length&&e.slice(a.fromA-u,a.fromA)==f.slice(f.length-u)?(n[i]=new HC(a.fromA-u,a.toA-u,a.fromB-u,a.toB-u),r=!0):d<=f.length&&e.slice(a.toA,a.toA+d)==f.slice(0,d)&&(n[i]=new HC(a.fromA+d,a.toA+d,a.fromB+d,a.toB+d),r=!0)}if(!r)break}return n}function ow(e,t,n){for(let r=0,i=0;i<e.length;i++){let a=e[i],o=a.toA-a.fromA,s=a.toB-a.fromB;if(o&&s||o>3||s>3){let c=i==e.length-1?t.length:e[i+1].fromA,l=a.fromA-r,u=c-a.toA,d=pw(t,a.fromA,l),f=fw(t,a.toA,u),p=a.fromA-d,m=f-a.toA;if((!o||!s)&&p&&m){let l=Math.max(o,s),[u,h,g]=o?[t,a.fromA,a.toA]:[n,a.fromB,a.toB];l>p&&t.slice(d,a.fromA)==u.slice(g-p,g)?(a=e[i]=new HC(d,d+o,a.fromB-p,a.toB-p),d=a.fromA,f=fw(t,a.toA,c-a.toA)):l>m&&t.slice(a.toA,f)==u.slice(h,h+m)&&(a=e[i]=new HC(f-o,f,a.fromB+m,a.toB+m),f=a.toA,d=pw(t,a.fromA,a.fromA-r)),p=a.fromA-d,m=f-a.toA}if(p||m)a=e[i]=new HC(a.fromA-p,a.toA+m,a.fromB-p,a.toB+m);else if(!o){let t=hw(n,a.fromB,a.toB),r,o=t<0?-1:mw(n,a.toB,a.fromB);t>-1&&(r=t-a.fromB)<=u&&n.slice(a.fromB,t)==n.slice(a.toB,a.toB+r)?a=e[i]=a.offset(r):o>-1&&(r=a.toB-o)<=l&&n.slice(a.fromB-r,a.fromB)==n.slice(o,a.toB)&&(a=e[i]=a.offset(-r))}else if(!s){let n=hw(t,a.fromA,a.toA),r,o=n<0?-1:mw(t,a.toA,a.fromA);n>-1&&(r=n-a.fromA)<=u&&t.slice(a.fromA,n)==t.slice(a.toA,a.toA+r)?a=e[i]=a.offset(r):o>-1&&(r=a.toA-o)<=l&&t.slice(a.fromA-r,a.fromA)==t.slice(o,a.toA)&&(a=e[i]=a.offset(-r))}}r=a.toA}return iw(e,3),e}var sw;try{sw=RegExp(`[\\p{Alphabetic}\\p{Number}]`,`u`)}catch{}function cw(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function lw(e,t){if(t==e.length)return 0;let n=e.charCodeAt(t);return n<192?+!!cw(n):sw?!gw(n)||t==e.length-1?+!!sw.test(String.fromCharCode(n)):sw.test(e.slice(t,t+2))?2:0:0}function uw(e,t){if(!t)return 0;let n=e.charCodeAt(t-1);return n<192?+!!cw(n):sw?!_w(n)||t==1?+!!sw.test(String.fromCharCode(n)):sw.test(e.slice(t-2,t))?2:0:0}var dw=8;function fw(e,t,n){if(t==e.length||!uw(e,t))return t;for(let r=t,i=t+n,a=0;a<dw;a++){let t=lw(e,r);if(!t||r+t>i)return r;r+=t}return t}function pw(e,t,n){if(!t||!lw(e,t))return t;for(let r=t,i=t-n,a=0;a<dw;a++){let t=uw(e,r);if(!t||r-t<i)return r;r-=t}return t}function mw(e,t,n){for(;t!=n;t--)if(e.charCodeAt(t-1)==10)return t;return-1}function hw(e,t,n){for(;t!=n;t++)if(e.charCodeAt(t)==10)return t;return-1}var gw=e=>e>=55296&&e<=56319,_w=e=>e>=56320&&e<=57343;function vw(e,t){return!t||t==e.length||!gw(e.charCodeAt(t-1))||!_w(e.charCodeAt(t))}function yw(e,t,n){let r=n?.override;return r?r(e,t):(WC=(n?.scanLimit??1e9)>>1,GC=n?.timeout?Date.now()+n.timeout:0,KC=!1,aw(e,t,UC(e,0,e.length,t,0,t.length)))}function bw(){return!KC}function xw(e,t,n){return ow(yw(e,t,n),e,t)}var Sw=ls.define({combine:e=>e[0]}),Cw=us.define(),ww=ls.define(),Tw=is.define({create(e){return null},update(e,t){for(let n of t.effects)n.is(Cw)&&(e=n.value);for(let n of t.state.facet(ww))e=n(e,t);return e}});function Ew(e){let t=e.field(Tw,!1);if(!t)return null;let n=e.facet(Sw);return{chunks:t,side:n?n.side:null}}var Dw=class e{constructor(e,t,n,r,i,a=!0){this.changes=e,this.fromA=t,this.toA=n,this.fromB=r,this.toB=i,this.precise=a}offset(t,n){return t||n?new e(this.changes,this.fromA+t,this.toA+t,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,t,n){return Aw(xw(e.toString(),t.toString(),n),e,t,0,0,bw())}static updateA(e,t,n,r,i){return Pw(Nw(e,r,!0,n.length),e,t,n,i)}static updateB(e,t,n,r,i){return Pw(Nw(e,r,!1,t.length),e,t,n,i)}};function Ow(e,t,n,r){let i=n.lineAt(e),a=r.lineAt(t);return i.to==e&&a.to==t&&e<n.length&&t<r.length?[e+1,t+1]:[i.from,a.from]}function kw(e,t,n,r){let i=n.lineAt(e),a=r.lineAt(t);return i.from==e&&a.from==t?[e,t]:[i.to+1,a.to+1]}function Aw(e,t,n,r,i,a){let o=[];for(let s=0;s<e.length;s++){let c=e[s],[l,u]=Ow(c.fromA+r,c.fromB+i,t,n),[d,f]=kw(c.toA+r,c.toB+i,t,n),p=[c.offset(-l+r,-u+i)];for(;s<e.length-1;){let a=e[s+1],[o,c]=Ow(a.fromA+r,a.fromB+i,t,n);if(o>d+1&&c>f+1)break;p.push(a.offset(-l+r,-u+i)),[d,f]=kw(a.toA+r,a.toB+i,t,n),s++}o.push(new Dw(p,l,Math.max(l,d),u,Math.max(u,f),a))}return o}var jw=1e3;function Mw(e,t,n,r){let i=0,a=e.length;for(;;){if(i==a){let r=0,a=0;i&&({toA:r,toB:a}=e[i-1]);let o=t-(n?r:a);return[r+o,a+o]}let o=i+a>>1,s=e[o],[c,l]=n?[s.fromA,s.toA]:[s.fromB,s.toB];if(c>t)a=o;else if(l<=t)i=o+1;else return r?[s.fromA,s.fromB]:[s.toA,s.toB]}}function Nw(e,t,n,r){let i=[];return t.iterChangedRanges((a,o,s,c)=>{let l=0,u=n?t.length:r,d=0,f=n?r:t.length;a>jw&&([l,d]=Mw(e,a-jw,n,!0)),o<t.length-jw&&([u,f]=Mw(e,o+jw,n,!1));let p=c-s-(o-a),m,[h,g]=n?[p,0]:[0,p];i.length&&(m=i[i.length-1]).toA>=l?i[i.length-1]={fromA:m.fromA,fromB:m.fromB,toA:u,toB:f,diffA:m.diffA+h,diffB:m.diffB+g}:i.push({fromA:l,toA:u,fromB:d,toB:f,diffA:h,diffB:g})}),i}function Pw(e,t,n,r,i){if(!e.length)return t;let a=[];for(let o=0,s=0,c=0,l=0;;o++){let u=o==e.length?null:e[o],d=u?u.fromA+s:n.length,f=u?u.fromB+c:r.length;for(;l<t.length;){let e=t[l];if(u&&(e.toA+s>d||e.toB+c>f))break;a.push(e.offset(s,c)),l++}if(!u)break;let p=u.toA+s+u.diffA,m=u.toB+c+u.diffB,h=xw(n.sliceString(d,p),r.sliceString(f,m),i);for(let e of Aw(h,n,r,d,f,bw()))a.push(e);for(s+=u.diffA,c+=u.diffB;l<t.length;){let e=t[l];if(e.fromA+s>p&&e.fromB+c>m)break;l++}}return a}var Fw={scanLimit:500},Iw=ds.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=Kw(e))}update(e){(e.docChanged||e.viewportChanged||Rw(e.startState,e.state)||zw(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=Kw(e.view))}},{decorations:e=>e.deco}),Lw=ts.low(hs({class:`cm-changeGutter`,markers:e=>e.plugin(Iw)?.gutter||vs.empty}));function Rw(e,t){return e.field(Tw,!1)!=t.field(Tw,!1)}function zw(e,t){return e.facet(Sw)!=t.facet(Sw)}var Bw=ss.line({class:`cm-changedLine`}),Vw=ss.mark({class:`cm-changedText`}),Hw=ss.mark({tagName:`ins`,class:`cm-insertedLine`}),Uw=ss.mark({tagName:`del`,class:`cm-deletedLine`}),Ww=new class extends ms{constructor(){super(...arguments),this.elementClass=`cm-changedLineGutter`}};function Gw(e,t,n,r,i,a){let o=n?e.fromA:e.fromB,s=n?e.toA:e.toB,c=0;if(o!=s){i.add(o,o,Bw),i.add(o,s,n?Uw:Hw),a&&a.add(o,o,Ww);for(let l=t.iterRange(o,s-1),u=o;!l.next().done;){if(l.lineBreak){u++,i.add(u,u,Bw),a&&a.add(u,u,Ww);continue}let t=u+l.value.length;if(r)for(;c<e.changes.length;){let r=e.changes[c],a=o+(n?r.fromA:r.fromB),s=o+(n?r.toA:r.toB),l=Math.max(u,a),d=Math.min(t,s);if(l<d&&i.add(l,d,Vw),s<t)c++;else break}u=t}}}function Kw(e){let t=e.state.field(Tw),{side:n,highlightChanges:r,markGutter:i,overrideChunk:a}=e.state.facet(Sw),o=n==`a`,s=new cs,c=i?new cs:null,{from:l,to:u}=e.viewport;for(let n of t){if((o?n.fromA:n.fromB)>=u)break;(o?n.toA:n.toB)>l&&(!a||!a(e.state,n,s,c))&&Gw(n,e.state.doc,o,r,s,c)}return{deco:s.finish(),gutter:c&&c.finish()}}var qw=class extends es{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement(`div`);return e.className=`cm-mergeSpacer`,e.style.height=this.height+`px`,e}updateDOM(e){return e.style.height=this.height+`px`,!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Jw=us.define({map:(e,t)=>e.map(t)}),Yw=is.define({create:()=>ss.none,update:(e,t)=>{for(let e of t.effects)if(e.is(Jw))return e.value;return e.map(t.changes)},provide:e=>ps.decorations.from(e)}),Xw=.01;function Zw(e,t){if(e.size!=t.size)return!1;let n=e.iter(),r=t.iter();for(;n.value;){if(n.from!=r.from||Math.abs(n.value.spec.widget.height-r.value.spec.widget.height)>1)return!1;n.next(),r.next()}return!0}function Qw(e,t,n){let r=new cs,i=new cs,a=e.state.field(Yw).iter(),o=t.state.field(Yw).iter(),s=0,c=0,l=0,u=0,d=e.viewport,f=t.viewport;for(let p=0;;p++){let m=p<n.length?n[p]:null,h=m?m.fromA:e.state.doc.length,g=m?m.fromB:t.state.doc.length;if(s<h){let n=e.lineBlockAt(s).top+l-(t.lineBlockAt(c).top+u);n<-Xw?(l-=n,r.add(s,s,ss.widget({widget:new qw(-n),block:!0,side:-1}))):n>Xw&&(u+=n,i.add(c,c,ss.widget({widget:new qw(n),block:!0,side:-1})))}if(h>s+1e3&&s<d.from&&h>d.from&&c<f.from&&g>f.from){let e=Math.min(d.from-s,f.from-c);s+=e,c+=e,p--}else if(m)s=m.toA,c=m.toB;else break;for(;a.value&&a.from<s;)l-=a.value.spec.widget.height,a.next();for(;o.value&&o.from<c;)u-=o.value.spec.widget.height,o.next()}for(;a.value;)l-=a.value.spec.widget.height,a.next();for(;o.value;)u-=o.value.spec.widget.height,o.next();let p=e.contentHeight+l-(t.contentHeight+u);p<Xw?r.add(e.state.doc.length,e.state.doc.length,ss.widget({widget:new qw(-p),block:!0,side:1})):p>Xw&&i.add(t.state.doc.length,t.state.doc.length,ss.widget({widget:new qw(p),block:!0,side:1}));let m=r.finish(),h=i.finish();Zw(m,e.state.field(Yw))||e.dispatch({effects:Jw.of(m)}),Zw(h,t.state.field(Yw))||t.dispatch({effects:Jw.of(h)})}var $w=us.define({map:(e,t)=>t.mapPos(e)}),eT=class extends es{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let t=document.createElement(`div`);return t.className=`cm-collapsedLines`,t.textContent=e.state.phrase(`$ unchanged lines`,this.lines),t.addEventListener(`click`,t=>{let n=e.posAtDOM(t.target);e.dispatch({effects:$w.of(n)});let{side:r,sibling:i}=e.state.facet(Sw);i&&i().dispatch({effects:$w.of(tT(n,e.state.field(Tw),r==`a`))})}),t}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return`collapsed-unchanged-code`}};function tT(e,t,n){let r=0,i=0;for(let a=0;;a++){let o=a<t.length?t[a]:null;if(!o||(n?o.fromA:o.fromB)>=e)return i+(e-r);[r,i]=n?[o.toA,o.toB]:[o.toB,o.toA]}}var nT=is.define({create(e){return ss.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is($w)&&(e=e.update({filter:e=>e!=n.value}));return e},provide:e=>ps.decorations.from(e)});function rT({margin:e=3,minSize:t=4}){return nT.init(n=>iT(n,e,t))}function iT(e,t,n){let r=new cs,i=e.facet(Sw).side==`a`,a=e.field(Tw),o=1;for(let s=0;;s++){let c=s<a.length?a[s]:null,l=s?o+t:1,u=c?e.doc.lineAt(i?c.fromA:c.fromB).number-1-t:e.doc.lines,d=u-l+1;if(d>=n&&r.add(e.doc.line(l).from,e.doc.line(u).to,ss.replace({widget:new eT(d),block:!0})),!c)break;o=e.doc.lineAt(Math.min(e.doc.length,i?c.toA:c.toB)).number}return r.finish()}var aT=ps.styleModule.of(new gs({".cm-mergeView":{overflowY:`auto`},".cm-mergeViewEditors":{display:`flex`,alignItems:`stretch`},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:`hidden`},".cm-merge-revert":{width:`1.6em`,flexGrow:0,flexShrink:0,position:`relative`},".cm-merge-revert button":{position:`absolute`,display:`block`,width:`100%`,boxSizing:`border-box`,textAlign:`center`,background:`none`,border:`none`,font:`inherit`,cursor:`pointer`}})),oT=ps.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:`auto !important`,overflowY:`visible !important`},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:`rgba(160, 128, 100, .08)`},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:`rgba(100, 160, 128, .08)`},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:`linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat`},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:`linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat`},"&light.cm-merge-b .cm-changedText":{background:`linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat`},"&dark.cm-merge-b .cm-changedText":{background:`linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat`},"&.cm-merge-b .cm-deletedText":{background:`#ff000033`},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:`none`},".cm-deletedChunk":{paddingLeft:`6px`,"& .cm-chunkButtons":{position:`absolute`,insetInlineEnd:`5px`},"& button":{border:`none`,cursor:`pointer`,color:`white`,margin:`0 2px`,borderRadius:`3px`,"&[name=accept]":{background:`#2a2`},"&[name=reject]":{background:`#d43`}}},".cm-collapsedLines":{padding:`5px 5px 5px 10px`,cursor:`pointer`,"&:before":{content:`"⦚"`,marginInlineEnd:`7px`},"&:after":{content:`"⦚"`,marginInlineStart:`7px`}},"&light .cm-collapsedLines":{color:`#444`,background:`linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)`},"&dark .cm-collapsedLines":{color:`#ddd`,background:`linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)`},".cm-changeGutter":{width:`3px`,paddingLeft:`1px`},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:`#e43`},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:`#fa9`},"&light.cm-merge-b .cm-changedLineGutter":{background:`#2b2`},"&dark.cm-merge-b .cm-changedLineGutter":{background:`#8f8`},".cm-inlineChangedLineGutter":{background:`#75d`}}),sT=new fs,cT=new fs,lT=class{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||Fw;let t=[ts.low(Iw),oT,aT,Yw,ps.updateListener.of(e=>{this.measuring<0&&(e.heightChanged||e.viewportChanged)&&!e.transactions.some(e=>e.effects.some(e=>e.is(Jw)))&&this.measure()})],n=[Sw.of({side:`a`,sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&n.push(Lw);let r=rs.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],ps.editorAttributes.of({class:`cm-merge-a`}),cT.of(n),t]}),i=[Sw.of({side:`b`,sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(Lw);let a=rs.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],ps.editorAttributes.of({class:`cm-merge-b`}),cT.of(i),t]});this.chunks=Dw.build(r.doc,a.doc,this.diffConf);let o=[Tw.init(()=>this.chunks),sT.of(e.collapseUnchanged?rT(e.collapseUnchanged):[])];r=r.update({effects:us.appendConfig.of(o)}).state,a=a.update({effects:us.appendConfig.of(o)}).state,this.dom=document.createElement(`div`),this.dom.className=`cm-mergeView`,this.editorDOM=this.dom.appendChild(document.createElement(`div`)),this.editorDOM.className=`cm-mergeViewEditors`;let s=e.orientation||`a-b`,c=document.createElement(`div`);c.className=`cm-mergeViewEditor`;let l=document.createElement(`div`);l.className=`cm-mergeViewEditor`,this.editorDOM.appendChild(s==`a-b`?c:l),this.editorDOM.appendChild(s==`a-b`?l:c),this.a=new ps({state:r,parent:c,root:e.root,dispatchTransactions:e=>this.dispatch(e,this.a)}),this.b=new ps({state:a,parent:l,root:e.root,dispatchTransactions:e=>this.dispatch(e,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls==`b-to-a`,e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,t){if(e.some(e=>e.docChanged)){let n=e[e.length-1],r=e.reduce((e,t)=>e.compose(t.changes),ns.empty(e[0].startState.doc.length));this.chunks=t==this.a?Dw.updateA(this.chunks,n.newDoc,this.b.state.doc,r,this.diffConf):Dw.updateB(this.chunks,this.a.state.doc,n.newDoc,r,this.diffConf),t.update([...e,n.state.update({effects:Cw.of(this.chunks)})]);let i=t==this.a?this.b:this.a;i.update([i.state.update({effects:Cw.of(this.chunks)})]),this.scheduleMeasure()}else t.update(e)}reconfigure(e){if(`diffConfig`in e&&(this.diffConf=e.diffConfig),`orientation`in e){let t=e.orientation!=`b-a`;if(t!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let e=this.a.dom.parentNode,n=this.b.dom.parentNode;e.remove(),n.remove(),this.editorDOM.insertBefore(t?e:n,this.editorDOM.firstChild),this.editorDOM.appendChild(t?n:e),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent=``)}}if(`revertControls`in e||`renderRevertControl`in e){let t=!!this.revertDOM,n=this.revertToA,r=this.renderRevert;`revertControls`in e&&(t=!!e.revertControls,n=e.revertControls==`b-to-a`),`renderRevertControl`in e&&(r=e.renderRevertControl),this.setupRevertControls(t,n,r)}let t=`highlightChanges`in e,n=`gutter`in e,r=`collapseUnchanged`in e;if(t||n||r){let i=[],a=[];if(t||n){let r=this.a.state.facet(Sw),o=n?e.gutter!==!1:r.markGutter,s=t?e.highlightChanges!==!1:r.highlightChanges;i.push(cT.reconfigure([Sw.of({side:`a`,sibling:()=>this.b,highlightChanges:s,markGutter:o}),o?Lw:[]])),a.push(cT.reconfigure([Sw.of({side:`b`,sibling:()=>this.a,highlightChanges:s,markGutter:o}),o?Lw:[]]))}if(r){let t=sT.reconfigure(e.collapseUnchanged?rT(e.collapseUnchanged):[]);i.push(t),a.push(t)}this.a.dispatch({effects:i}),this.b.dispatch({effects:a})}this.scheduleMeasure()}setupRevertControls(e,t,n){this.revertToA=t,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=n,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement(`div`),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener(`mousedown`,e=>this.revertClicked(e)),this.revertDOM.className=`cm-merge-revert`):this.revertDOM&&(this.revertDOM.textContent=``)}scheduleMeasure(){this.measuring<0&&(this.measuring=(this.dom.ownerDocument.defaultView||window).requestAnimationFrame(()=>{this.measuring=-1,this.measure()}))}measure(){Qw(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,t=e.firstChild,n=this.a.viewport,r=this.b.viewport;for(let i=0;i<this.chunks.length;i++){let a=this.chunks[i];if(a.fromA>n.to||a.fromB>r.to)break;if(a.fromA<n.from||a.fromB<r.from)continue;let o=this.a.lineBlockAt(a.fromA).top+`px`;for(;t&&+t.dataset.chunk<i;)t=uT(t);t&&t.dataset.chunk==String(i)?(t.style.top!=o&&(t.style.top=o),t=t.nextSibling):e.insertBefore(this.renderRevertButton(o,i),t)}for(;t;)t=uT(t)}renderRevertButton(e,t){let n;if(this.renderRevert)n=this.renderRevert();else{n=document.createElement(`button`);let e=this.a.state.phrase(`Revert this chunk`);n.setAttribute(`aria-label`,e),n.setAttribute(`title`,e),n.textContent=this.revertToLeft?`⇜`:`⇝`}return n.style.top=e,n.setAttribute(`data-chunk`,String(t)),n}revertClicked(e){let t=e.target,n;for(;t&&t.parentNode!=this.revertDOM;)t=t.parentNode;if(t&&(n=this.chunks[t.dataset.chunk])){let[t,r,i,a,o,s]=this.revertToA?[this.b,this.a,n.fromB,n.toB,n.fromA,n.toA]:[this.a,this.b,n.fromA,n.toA,n.fromB,n.toB],c=t.state.sliceDoc(i,Math.max(i,a-1));i!=a&&s<=r.state.doc.length&&(c+=t.state.lineBreak),r.dispatch({changes:{from:o,to:Math.min(r.state.doc.length,s),insert:c},userEvent:`revert`}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function uT(e){let t=e.nextSibling;return e.remove(),t}var dT=new class extends ms{constructor(){super(...arguments),this.elementClass=`cm-deletedLineGutter`}},fT=ts.low(hs({class:`cm-changeGutter`,markers:e=>e.plugin(Iw)?.gutter||vs.empty,widgetMarker:(e,t)=>t instanceof _T?dT:null}));function pT(e){let t=typeof e.original==`string`?os.of(e.original.split(/\r?\n/)):e.original,n=e.diffConfig||Fw;return[ts.low(Iw),ST,oT,ps.editorAttributes.of({class:`cm-merge-b`}),ww.of((e,t)=>{let r=t.effects.find(e=>e.is(mT));return r&&(e=Dw.updateA(e,r.value.doc,t.startState.doc,r.value.changes,n)),t.docChanged&&(e=Dw.updateB(e,t.state.field(hT),t.newDoc,t.changes,n)),e}),Sw.of({highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1,syntaxHighlightDeletions:e.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:e.mergeControls??!0,overrideChunk:e.allowInlineDiffs?OT:void 0,side:`b`}),hT.init(()=>t),e.gutter===!1?[]:fT,e.collapseUnchanged?rT(e.collapseUnchanged):[],Tw.init(e=>Dw.build(t,e.doc,n))]}var mT=us.define(),hT=is.define({create:()=>os.empty,update(e,t){for(let n of t.effects)n.is(mT)&&(e=n.value.doc);return e}}),gT=new WeakMap,_T=class extends es{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||=this.buildDOM(e)}};function vT(e,t,n){let r=gT.get(t.changes);if(r)return r;let i=ss.widget({block:!0,side:-1,widget:new _T(r=>{let{highlightChanges:i,syntaxHighlightDeletions:a,syntaxHighlightDeletionsMaxLength:o,mergeControls:s}=e.facet(Sw),c=document.createElement(`div`);if(c.className=`cm-deletedChunk`,s){let t=c.appendChild(document.createElement(`div`));t.className=`cm-chunkButtons`;let n=e=>{e.preventDefault(),yT(r,r.posAtDOM(c))},i=e=>{e.preventDefault(),bT(r,r.posAtDOM(c))};if(typeof s==`function`)t.appendChild(s(`accept`,n)),t.appendChild(s(`reject`,i));else{let r=t.appendChild(document.createElement(`button`));r.name=`accept`,r.textContent=e.phrase(`Accept`),r.onmousedown=n;let a=t.appendChild(document.createElement(`button`));a.name=`reject`,a.textContent=e.phrase(`Reject`),a.onmousedown=i}}if(n||t.fromA>=t.toA)return c;let l=r.state.field(hT).sliceString(t.fromA,t.endA),u=a&&e.facet(ys),d=h(),f=t.changes,p=0,m=!1;function h(){let e=c.appendChild(document.createElement(`div`));return e.className=`cm-deletedLine`,e.appendChild(document.createElement(`del`))}function g(e,t,n){for(let r=e;r<t;){if(l.charAt(r)==`
|
|
31
|
+
`){d.firstChild||d.appendChild(document.createElement(`br`)),d=h(),r++;continue}let e=t,a=n+(m?` cm-deletedText`:``),o=!1,s=l.indexOf(`
|
|
32
|
+
`,r);if(s>-1&&s<t&&(e=s),i&&p<f.length){let t=Math.max(0,m?f[p].toA:f[p].fromA);t<=e&&(e=t,m&&p++,o=!0)}if(e>r){let t=document.createTextNode(l.slice(r,e));if(a){let e=d.appendChild(document.createElement(`span`));e.className=a,e.appendChild(t)}else d.appendChild(t);r=e}o&&(m=!m)}}if(u&&t.toA-t.fromA<=o){let t=u.parser.parse(l),n=0;as(t,{style:t=>bs(e,t)},(e,t,r)=>{e>n&&g(n,e,``),g(e,t,r),n=t}),g(n,l.length,``)}else g(0,l.length,``);return d.firstChild||d.appendChild(document.createElement(`br`)),c})});return gT.set(t.changes,i),i}function yT(e,t){let{state:n}=e,r=t??n.selection.main.head,i=e.state.field(Tw).find(e=>e.fromB<=r&&e.endB>=r);if(!i)return!1;let a=e.state.sliceDoc(i.fromB,Math.max(i.fromB,i.toB-1)),o=e.state.field(hT);i.fromB!=i.toB&&i.toA<=o.length&&(a+=e.state.lineBreak);let s=ns.of({from:i.fromA,to:Math.min(o.length,i.toA),insert:a},o.length);return e.dispatch({effects:mT.of({doc:s.apply(o),changes:s}),userEvent:`accept`}),!0}function bT(e,t){let{state:n}=e,r=t??n.selection.main.head,i=n.field(Tw).find(e=>e.fromB<=r&&e.endB>=r);if(!i)return!1;let a=n.field(hT).sliceString(i.fromA,Math.max(i.fromA,i.toA-1));return i.fromA!=i.toA&&i.toB<=n.doc.length&&(a+=n.lineBreak),e.dispatch({changes:{from:i.fromB,to:Math.min(n.doc.length,i.toB),insert:a},userEvent:`revert`}),!0}function xT(e){let t=new cs;for(let n of e.field(Tw)){let r=e.facet(Sw).overrideChunk&&wT(e,n);t.add(n.fromB,n.fromB,vT(e,n,!!r))}return t.finish()}var ST=is.define({create:e=>xT(e),update(e,t){return t.state.field(Tw,!1)==t.startState.field(Tw,!1)?e:xT(t.state)},provide:e=>ps.decorations.from(e)}),CT=new WeakMap;function wT(e,t){let n=CT.get(t);if(n!==void 0)return n;n=null;let r=e.field(hT),i=e.doc,a=r.lineAt(t.endA).number-r.lineAt(t.fromA).number+1,o=i.lineAt(t.endB).number-i.lineAt(t.fromB).number+1;abort:if(a==o&&a<10){let e=[],i=0,o=t.fromA,s=t.fromB;for(let n of t.changes){if(n.fromA<n.toA){i+=n.toA-n.fromA;let t=r.sliceString(o+n.fromA,o+n.toA);if(/\n/.test(t))break abort;e.push(ss.widget({widget:new TT(t),side:-1}).range(s+n.fromB))}n.fromB<n.toB&&e.push(Vw.range(s+n.fromB,s+n.toB))}i<t.endA-t.fromA-a*2&&(n=e)}return CT.set(t,n),n}var TT=class extends es{constructor(e){super(),this.text=e}eq(e){return this.text==e.text}toDOM(e){let t=document.createElement(`del`);return t.className=`cm-deletedText`,t.textContent=this.text,t}},ET=new class extends ms{constructor(){super(...arguments),this.elementClass=`cm-inlineChangedLineGutter`}},DT=ss.line({class:`cm-inlineChangedLine`});function OT(e,t,n,r){let i=wT(e,t),a=0;if(!i)return!1;for(let o=e.doc.lineAt(t.fromB);;){for(r&&r.add(o.from,o.from,ET),n.add(o.from,o.from,DT);a<i.length&&i[a].to<=o.to;){let e=i[a++];n.add(e.from,e.to,e.value)}if(o.to>=t.endB)break;o=e.doc.lineAt(o.to+1)}return!0}var kT=se({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),AT=It({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function jT(e){let t=(0,$.c)(24),{oldContent:n,newContent:r,layout:a,conflictMode:o,oursOverride:c,onResolve:l,onAbort:u}=e,{_:f}=i(),p=c??r,m=(0,Q.useRef)(null),h=(0,Q.useRef)(null),{resolvedTheme:g}=On(),_=(0,Q.useRef)(l),v=(0,Q.useRef)(u),[y,b]=(0,Q.useState)(null),x;t[0]!==u||t[1]!==l?(x=()=>{_.current=l,v.current=u},t[0]=u,t[1]=l,t[2]=x):x=t[2],(0,Q.useEffect)(x);let S,C;t[3]!==o||t[4]!==p||t[5]!==a||t[6]!==n||t[7]!==g?(S=()=>{if(!m.current)return;let e=g===`dark`?kT:AT,t=[ps.editable.of(!1),rs.readOnly.of(!0)],r=[Ts,J(),...t,e,ps.lineWrapping];if(h.current&&=(h.current.destroy(),null),o){let t=new ps({doc:p,extensions:[Ts,J(),ps.editable.of(!1),e,ps.lineWrapping,pT({original:n,highlightChanges:!0,gutter:!0,mergeControls:!0,collapseUnchanged:{margin:3,minSize:4}}),ps.updateListener.of(e=>{let t=Ew(e.state);b(t?t.chunks.length:0)})],parent:m.current});h.current=t;let r=Ew(t.state);b(r?r.chunks.length:0)}else a===`split`?h.current=new lT({a:{doc:n,extensions:r},b:{doc:p,extensions:r},parent:m.current,highlightChanges:!0,gutter:!0,collapseUnchanged:{margin:3,minSize:4}}):h.current=new ps({doc:p,extensions:[...r,pT({original:n,highlightChanges:!0,gutter:!0,mergeControls:!1,collapseUnchanged:{margin:3,minSize:4}})],parent:m.current});return()=>{h.current&&=(h.current.destroy(),null)}},C=[n,p,a,g,o],t[3]=o,t[4]=p,t[5]=a,t[6]=n,t[7]=g,t[8]=S,t[9]=C):(S=t[8],C=t[9]),(0,Q.useEffect)(S,C);let w;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(w=function(){let e=h.current;!e||!(e instanceof ps)||_.current?.(e.state.doc.toString())},t[10]=w):w=t[10];let T=w,E;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(E=function(){let e=h.current;!e||!(e instanceof ps)||d(e)},t[11]=E):E=t[11];let D=E,O=y===0,k;t[12]!==f||t[13]!==y?(k=y===null?``:y===0?f({id:`lPzyrU`}):X._({id:`8FqTCr`,values:{chunksRemaining:y}}),t[12]=f,t[13]=y,t[14]=k):k=t[14];let A=k,j;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Z.jsx)(`div`,{ref:m,className:`diff-view min-h-0 flex-1 overflow-y-auto subtle-scrollbar`}),t[15]=j):j=t[15];let M;t[16]!==O||t[17]!==o||t[18]!==A||t[19]!==u||t[20]!==l?(M=o&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2 border-t shrink-0`,children:[(0,Z.jsx)(`span`,{className:`text-xs ${O?`text-emerald-600 dark:text-emerald-400`:`text-muted-foreground`}`,children:A}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&(0,Z.jsx)(Ti,{variant:`ghost`,size:`sm`,onClick:u,children:(0,Z.jsx)(s,{id:`XyOUTJ`})}),(0,Z.jsx)(Ti,{variant:`outline`,size:`sm`,onClick:D,children:`Undo`}),l&&(0,Z.jsx)(Ti,{variant:`default`,size:`sm`,disabled:!O,onClick:T,children:(0,Z.jsx)(s,{id:`Lcehxn`})})]})]}),t[16]=O,t[17]=o,t[18]=A,t[19]=u,t[20]=l,t[21]=M):M=t[21];let N;return t[22]===M?N=t[23]:(N=(0,Z.jsxs)(`div`,{className:`flex flex-col h-full`,children:[j,M]}),t[22]=M,t[23]=N),N}async function MT(e,t,n){try{let r={file:e,strategy:t};n!==void 0&&(r.content=n);let i=await fetch(`/api/sync/resolve-conflict`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});if(i.ok)return{ok:!0};let a;try{let e=await i.json();typeof e.detail==`string`?a=e.detail:typeof e.title==`string`&&(a=e.title)}catch{}return{ok:!1,detail:a}}catch(n){let r=n instanceof Error?n.message:String(n);return console.warn(JSON.stringify({event:`conflict-resolve-dispatch-failed`,file:e,strategy:t,detail:r})),{ok:!1,detail:r}}}async function NT(e,t){return MT(e,`content`,t)}async function PT(e){try{let t=await fetch(`/api/sync/conflict-content?file=${encodeURIComponent(e)}&source=ytext`);if(!t.ok){let n;try{let e=await t.json();typeof e.detail==`string`?n=e.detail:typeof e.title==`string`&&(n=e.title)}catch{}return console.warn(JSON.stringify({event:`conflict-content-fetch-failed`,file:e,status:t.status,detail:n})),null}let n=await t.json();return{base:n.base??``,ours:n.ours??``,theirs:n.theirs??``}}catch(t){return console.warn(JSON.stringify({event:`conflict-content-fetch-failed`,file:e,status:null,detail:t instanceof Error?t.message:String(t)})),null}}function FT(e){let t=(0,$.c)(24),{docName:n}=e,{conflicts:r,loading:i}=VC(),a;if(t[0]!==r||t[1]!==n){let e;t[3]===n?e=t[4]:(e=e=>Sr(e.file)===n,t[3]=n,t[4]=e),a=r.find(e),t[0]=r,t[1]=n,t[2]=a}else a=t[2];let o=a,s=o?.file??`${n}.md`,[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(!1),f,p;t[5]===n?(f=t[6],p=t[7]):(f=()=>(console.warn(JSON.stringify({event:`editor-area-swap-to-diffview`,"doc.name":n})),()=>{console.warn(JSON.stringify({event:`editor-area-swap-from-diffview`,"doc.name":n}))}),p=[n],t[5]=n,t[6]=f,t[7]=p),(0,Q.useEffect)(f,p);let m=i||o===void 0,h,g;t[8]!==m||t[9]!==s?(h=()=>{if(m)return;let e=!1;return l(null),d(!1),PT(s).then(t=>{e||(t===null?d(!0):l(t))}),()=>{e=!0}},g=[s,m],t[8]=m,t[9]=s,t[10]=h,t[11]=g):(h=t[10],g=t[11]),(0,Q.useEffect)(h,g);let _;t[12]===s?_=t[13]:(_=async function(e){let t=await NT(s,e);t.ok||Vo.error(`Failed to save resolution for ${s}`,{description:t.detail})},t[12]=s,t[13]=_);let v=_;if(u){let e;return t[14]===s?e=t[15]:(e=(0,Z.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-sm text-muted-foreground`,children:[`Couldn't load conflict content for `,s,`. Try reloading the page.`]}),t[14]=s,t[15]=e),e}if(c===null){let e;return t[16]===s?e=t[17]:(e=(0,Z.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-sm text-muted-foreground`,children:[`Loading conflict for `,s]}),t[16]=s,t[17]=e),e}let y;t[18]===v?y=t[19]:(y=e=>void v(e),t[18]=v,t[19]=y);let b;return t[20]!==c.ours||t[21]!==c.theirs||t[22]!==y?(b=(0,Z.jsx)(jT,{oldContent:c.theirs,newContent:c.ours,layout:`unified`,conflictMode:!0,onResolve:y}),t[20]=c.ours,t[21]=c.theirs,t[22]=y,t[23]=b):b=t[23],b}function IT(e){let t=(0,$.c)(2),{docName:n,provider:r,children:i}=e;(0,Q.use)(kt(n,r));let a;return t[0]===i?a=t[1]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[0]=i,t[1]=a),a}var LT=`__back-nav__`;function RT(e){return e instanceof Le||e instanceof ft||e instanceof Me||e instanceof Xe||e instanceof wt||e instanceof Rt?e.docName:null}function zT(e){if(e instanceof Le){let t=e.docName;return{title:X._({id:`Jejur6`}),summary:X._({id:`jSY41h`,values:{docName:t}})}}if(e instanceof ft){let t=e.docName;return{title:X._({id:`V7QxyT`}),summary:X._({id:`xG4tb6`,values:{docName:t}})}}if(e instanceof Me){let t=e.docName;return{title:X._({id:`1di5fu`}),summary:X._({id:`PQCdtv`,values:{docName:t}})}}if(e instanceof Xe){let t=e.docName;return{title:X._({id:`wvbc1r`}),summary:X._({id:`IX7-sq`,values:{docName:t}})}}if(e instanceof wt)return{title:X._({id:`Gfr4fu`}),summary:X._({id:`j6LB7S`})};if(e instanceof Rt){let t=e.docName;return{title:X._({id:`vv7kpg`}),summary:X._({id:`mdKFEy`,values:{docName:t}})}}let t=e instanceof Error&&e.message?e.message:X._({id:`W5A0Ly`});return{title:X._({id:`29VNqC`}),summary:t}}function BT(e){let t=(0,$.c)(28),{error:n,resetErrorBoundary:r,activeDocName:i,previousDocName:a,onNavigateBack:o}=e,c;t[0]===n?c=t[1]:(c=zT(n),t[0]=n,t[1]=c);let{title:l,summary:u}=c,d=!!a&&!!o,f=(0,Q.useRef)(null),p,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{f.current?.focus()},m=[],t[2]=p,t[3]=m):(p=t[2],m=t[3]),(0,Q.useEffect)(p,m);let h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(ab,{size:80,variant:`sleeping`}),t[4]=h):h=t[4];let g;t[5]===l?g=t[6]:(g=(0,Z.jsx)(`h2`,{id:`document-error-title`,className:`text-2xl font-light tracking-tighter text-balance`,children:l}),t[5]=l,t[6]=g);let _;t[7]===u?_=t[8]:(_=(0,Z.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:u}),t[7]=u,t[8]=_);let v;t[9]!==g||t[10]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[g,_]}),t[9]=g,t[10]=_,t[11]=v):v=t[11];let y;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(s,{id:`KDw4GX`}),t[12]=y):y=t[12];let b;t[13]===r?b=t[14]:(b=(0,Z.jsx)(Ti,{ref:f,variant:`default`,onClick:r,children:y}),t[13]=r,t[14]=b);let x;t[15]!==i||t[16]!==d||t[17]!==n||t[18]!==o||t[19]!==a||t[20]!==r?(x=d?(0,Z.jsx)(Ti,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>{!a||!o||(it(RT(n)??i),o(a),r(LT))},children:(0,Z.jsx)(s,{id:`CKyk7Q`})}):null,t[15]=i,t[16]=d,t[17]=n,t[18]=o,t[19]=a,t[20]=r,t[21]=x):x=t[21];let S;t[22]!==x||t[23]!==b?(S=(0,Z.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[b,x]}),t[22]=x,t[23]=b,t[24]=S):S=t[24];let C;return t[25]!==S||t[26]!==v?(C=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`document-error-title`,"data-slot":`document-error-boundary`,className:`flex h-full flex-col items-center justify-center gap-8 p-8 text-center`,children:[h,v,S]}),t[25]=S,t[26]=v,t[27]=C):C=t[27],C}function VT(e){let t=(0,$.c)(17),{activeDocName:n,previousDocName:r,onNavigateBack:i,onRecycle:a,children:o}=e,s;t[0]!==n||t[1]!==i||t[2]!==r?(s=e=>(0,Z.jsx)(BT,{...e,activeDocName:n,previousDocName:r,onNavigateBack:i}),t[0]=n,t[1]=i,t[2]=r,t[3]=s):s=t[3];let c;t[4]===n?c=t[5]:(c=[n],t[4]=n,t[5]=c);let l;t[6]!==n||t[7]!==a?(l=e=>{if(e.reason===`imperative-api`){if(Array.isArray(e.args)&&e.args[0]===LT){console.warn(`[DocumentErrorBoundary] back-nav reset (no recycle)`);return}a(n),console.warn(`[DocumentErrorBoundary] retry recycled ${n}`)}else console.warn(`[DocumentErrorBoundary] reset by key change (${e.prev?.[0]} → ${e.next?.[0]})`)},t[6]=n,t[7]=a,t[8]=l):l=t[8];let u;t[9]===n?u=t[10]:(u=e=>{console.error(`[DocumentErrorBoundary] rendered fallback for ${n}: ${zT(e).title}`,e)},t[9]=n,t[10]=u);let d;return t[11]!==o||t[12]!==s||t[13]!==c||t[14]!==l||t[15]!==u?(d=(0,Z.jsx)(z,{fallbackRender:s,resetKeys:c,onReset:l,onError:u,children:o}),t[11]=o,t[12]=s,t[13]=c,t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function HT(e){let t=e.document.getText(`source`).toString(),{map:n,parseError:r}=wr(t);return{map:n,keys:mi(t),parseError:r}}function UT(e){let t=(0,$.c)(175),{provider:n}=e,{_:r}=i(),[a,o]=(0,Q.useState)(null),c;t[0]===n?c=t[1]:(c=()=>HT(n),t[0]=n,t[1]=c);let[l,u]=(0,Q.useState)(c),d,p;t[2]===n?(d=t[3],p=t[4]):(d=()=>{let e=Or(n);o(e),u(e.current());let t=e.subscribe(e=>{u(e)});return()=>{t(),e.dispose(),o(t=>t===e?null:t)}},p=[n],t[2]=n,t[3]=d,t[4]=p),(0,Q.useEffect)(d,p);let m=l.map,h=l.keys,g=l.parseError,[_,v]=(0,Q.useState)(!1),y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y={},t[5]=y):y=t[5];let[b,x]=(0,Q.useState)(y),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(null),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E={},t[6]=E):E=t[6];let[D,O]=(0,Q.useState)(E),k;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(k={},t[7]=k):k=t[7];let[A,j]=(0,Q.useState)(k),M=n.configuration.name??``,N;t[8]===M?N=t[9]:(N=qT(M),t[8]=M,t[9]=N);let P=N,F;t[10]===M?F=t[11]:(F=GT(M),t[10]=M,t[11]=F);let I=Xa(P?null:F),L;t[12]!==I||t[13]!==P?(L=!P&&I.state.status===`ready`?I.state.data.folder.frontmatter_defaults??{}:{},t[12]=I,t[13]=P,t[14]=L):L=t[14];let R=L,z;t[15]!==I||t[16]!==P?(z=!P&&I.state.status===`ready`?I.state.data.frontmatterSources:{},t[15]=I,t[16]=P,t[17]=z):z=t[17];let B=z,V;t[18]!==r||t[19]!==a?(V=function(e){if(!a)return{ok:!1,error:r({id:`9zb2WA`})};let t=a.patch(e);if(t.ok)return{ok:!0};if(t.error.code===`WRITE_ERROR`)return console.warn(`[PropertyPanel] binding write error:`,t.error.detail),{ok:!1,error:t.error.detail};let n=Ln(t.error);return{ok:!1,error:t.error.issues[0]?.message??r({id:`8fRyLo`}),fieldErrors:Object.keys(n).length>0?n:void 0}},t[18]=r,t[19]=a,t[20]=V):V=t[20];let H=V,U;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(U=function(e){O(t=>{if(!Object.hasOwn(t,e))return t;let n={...t};return delete n[e],n})},t[21]=U):U=t[21];let W=U,G;t[22]===r?G=t[23]:(G=function(e,t){if(e.ok)return;let n=e.error??r({id:`4g19V6`}),i=e.fieldErrors??{};O(e=>{let r={...e};for(let e of t)r[e]=i[e]??n;return r}),j(e=>{let n={...e};for(let e of t)n[e]=(n[e]??0)+1;return n})},t[22]=r,t[23]=G);let K=G,ee;t[24]!==H||t[25]!==K?(ee=function(e,t){W(e),K(H({[e]:t}),[e])},t[24]=H,t[25]=K,t[26]=ee):ee=t[26];let q=ee,te;t[27]!==H||t[28]!==K?(te=function(e){W(e),K(H({[e]:null}),[e])},t[27]=H,t[28]=K,t[29]=te):te=t[29];let ne=te,re;t[30]!==r||t[31]!==a?(re=function(e,t){if(!a)return{ok:!1,error:r({id:`9zb2WA`})};if(e===t)return{ok:!0};let n=a.rename(e,t);if(n.ok)return{ok:!0};if(n.error.code===`WRITE_ERROR`)return{ok:!1,error:n.error.detail};let i=Ln(n.error);return{ok:!1,error:n.error.issues[0]?.message??r({id:`I1gRhX`}),fieldErrors:Object.keys(i).length>0?i:void 0}},t[30]=r,t[31]=a,t[32]=re):re=t[32];let ie=re,ae;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ae=function(e,t){return`${e} ${t}`},t[33]=ae):ae=t[33];let oe=ae,se;t[34]!==a||t[35]!==h?(se=function(e){if(!a)return;let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let r=h.map((e,t)=>oe(e,t)),i=r.indexOf(t),o=r.indexOf(n);if(i<0||o<0)return;let s=h.slice(),[c]=s.splice(i,1);if(!c)return;s.splice(o,0,c);let l=a.reorder(s);l.ok||console.warn(`[PropertyPanel] reorder failed:`,l.error)},t[34]=a,t[35]=h,t[36]=se):se=t[36];let ce=se,le;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(le={activationConstraint:{distance:4}},t[37]=le):le=t[37];let J;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(J={coordinateGetter:ua},t[38]=J):J=t[38];let ue=wa(Gi(_a,le),Gi(sa,J)),de;t[39]!==R||t[40]!==q||t[41]!==m?(de=function(e,t){let n=m[e]??JT(R[e]);if(n===void 0)return;x(n=>({...n,[e]:t}));let r=fa(n,t);(!Object.hasOwn(m,e)||!WT(n,r))&&q(e,r)},t[39]=R,t[40]=q,t[41]=m,t[42]=de):de=t[42];let fe=de,pe;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(pe=function(){C({name:``,type:`text`,value:``,error:null}),v(!1)},t[43]=pe):pe=t[43];let me=pe,{addPropertySignal:he,clearAddProperty:ge}=Qb(),_e;t[44]!==he||t[45]!==M?(_e=he.get(M)??0,t[44]=he,t[45]=M,t[46]=_e):_e=t[46];let ve=_e,ye,be;t[47]===ve?(ye=t[48],be=t[49]):(ye=()=>{ve>0&&(C({name:``,type:`text`,value:``,error:null}),v(!1))},be=[ve],t[47]=ve,t[48]=ye,t[49]=be),(0,Q.useEffect)(ye,be);let xe,Se;t[50]!==ge||t[51]!==M?(xe=()=>()=>ge(M),Se=[M,ge],t[50]=ge,t[51]=M,t[52]=xe,t[53]=Se):(xe=t[52],Se=t[53]),(0,Q.useEffect)(xe,Se);let Ce;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=function(e){C(t=>{if(!t)return t;let n=e===`date`?new Date().toISOString().slice(0,10):Yi[e];return{...t,type:e,value:n,error:null}})},t[54]=Ce):Ce=t[54];let we=Ce,Te;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Te=function(e){C(t=>t&&{...t,value:e})},t[55]=Te):Te=t[55];let Ee=Te,De;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(De=function(e){C(t=>t&&{...t,name:e,error:null})},t[56]=De):De=t[56];let Oe=De,ke;t[57]!==r||t[58]!==S||t[59]!==H||t[60]!==m?(ke=function(){if(!S)return;let e=S.name.trim();if(!e){C({...S,error:r({id:`8_brI5`})});return}if(e===`frontmatter`){C({...S,error:r({id:`dURmlQ`})});return}if(Object.hasOwn(m,e)){C({...S,error:r({id:`njU86j`,values:{trimmed:e}})});return}let t=H({[e]:S.value});if(t.ok){C(null);return}let n=t.fieldErrors?.[e],i=t.error??r({id:`OJeiSH`});C({...S,error:n??i})},t[57]=r,t[58]=S,t[59]=H,t[60]=m,t[61]=ke):ke=t[61];let Ae=ke,je;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(je=function(){C(null)},t[62]=je):je=t[62];let Me=je,Ne;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=function(e){T({key:e,draft:e,error:null})},t[63]=Ne):Ne=t[63];let Pe=Ne,Fe;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=function(e){T(t=>t&&{...t,draft:e,error:null})},t[64]=Fe):Fe=t[64];let Ie=Fe,Le;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(Le=function(){T(null)},t[65]=Le):Le=t[65];let Re=Le,ze;t[66]!==r||t[67]!==m||t[68]!==ie||t[69]!==w?(ze=function(){if(!w)return;let e=w.draft.trim();if(!e){T(null);return}if(e===w.key){T(null);return}if(e===`frontmatter`){T({...w,error:r({id:`dURmlQ`})});return}if(Object.hasOwn(m,e)){T({...w,error:r({id:`njU86j`,values:{trimmed:e}})});return}let t=ie(w.key,e);if(t.ok){x(t=>{if(!Object.hasOwn(t,w.key))return t;let n={...t};return n[e]=n[w.key],delete n[w.key],n}),W(w.key),T(null);return}let n=t.fieldErrors?.[e]??t.fieldErrors?.[w.key]??t.error??r({id:`2ryd91`});T({...w,error:n})},t[66]=r,t[67]=m,t[68]=ie,t[69]=w,t[70]=ze):ze=t[70];let Be=ze,Ve;t[71]!==m||t[72]!==h?(Ve=h.length>0?h:Object.keys(m),t[71]=m,t[72]=h,t[73]=Ve):Ve=t[73];let Y=Ve,He;if(t[74]!==Y){He=new Map;for(let e of Y)He.set(e,(He.get(e)??0)+1);t[74]=Y,t[75]=He}else He=t[75];let Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et;if(t[76]!==S||t[77]!==R||t[78]!==B||t[79]!==_||t[80]!==q||t[81]!==Be||t[82]!==He||t[83]!==D||t[84]!==ce||t[85]!==m||t[86]!==b||t[87]!==g||t[88]!==ne||t[89]!==w||t[90]!==Y||t[91]!==A||t[92]!==ue||t[93]!==fe){et=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Object.keys(R).filter(e=>!Object.hasOwn(m,e)).sort();if(Y.length===0&&e.length===0&&!S&&!g){et=null;break bb0}Qe=`property-panel editor-content-aligned pt-4 pb-4 text-sm`,$e=`property-panel`,We=Ko,Ye=!_,t[106]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=e=>v(!e),t[106]=Xe):Xe=t[106];let n=!_,r;t[107]===n?r=t[108]:(r=(0,Z.jsx)(Ho,{"data-expanded":n,className:`size-3.5 shrink-0 text-muted-foreground transition-transform duration-150 ease-out data-[expanded=true]:rotate-90`}),t[107]=n,t[108]=r);let i;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`l_UFPv`})}),t[109]=i):i=t[109],t[110]===r?Ze=t[111]:(Ze=(0,Z.jsx)(Go,{asChild:!0,children:(0,Z.jsxs)(Ti,{type:`button`,variant:`ghost`,className:`mb-1.5 flex h-auto w-fit bg-transparent! items-center gap-1 px-1 py-0.5 text-base font-medium text-foreground hover:bg-transparent hover:text-foreground`,children:[r,i]})}),t[110]=r,t[111]=Ze),Ue=Wo,Ge=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,t[112]===g?Ke=t[113]:(Ke=g?(0,Z.jsxs)(`div`,{role:`alert`,"data-testid":`property-panel-yaml-error`,className:`mb-1 flex items-start gap-1.5 rounded border border-destructive/30 bg-destructive/5 px-2 py-1.5 text-[11px] text-destructive`,children:[(0,Z.jsx)(pi,{className:`size-3.5 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(s,{id:`UG-Phk`}),(0,Z.jsx)(`span`,{className:`block text-[10px] opacity-80`,children:g})]})]}):null,t[112]=g,t[113]=Ke);let a;if(t[114]!==Y){let e;t[116]===Symbol.for(`react.memo_cache_sentinel`)?(e=(e,t)=>oe(e,t),t[116]=e):e=t[116],a=Y.map(e),t[114]=Y,t[115]=a}else a=t[115];let o;if(t[117]!==q||t[118]!==Be||t[119]!==He||t[120]!==D||t[121]!==m||t[122]!==b||t[123]!==ne||t[124]!==w||t[125]!==Y||t[126]!==A||t[127]!==fe){let e;t[129]!==q||t[130]!==Be||t[131]!==He||t[132]!==D||t[133]!==m||t[134]!==b||t[135]!==ne||t[136]!==w||t[137]!==A||t[138]!==fe?(e=(e,t)=>{let n=m[e];if(n===void 0)return null;let r=b[e]??Kr(n),i=w?.key===e?w:null,a=(He.get(e)??0)>1;return(0,Z.jsx)(xa,{sortableId:oe(e,t),keyName:e,value:n,declared:r,error:D[e]??null,resetCounter:A[e]??0,isDuplicate:a,rename:{state:i,onBegin:()=>Pe(e),onChangeDraft:Ie,onCommit:Be,onCancel:Re},onCommit:t=>q(e,t),onChangeType:t=>fe(e,t),onRemove:()=>ne(e)},`${e}-${t}`)},t[129]=q,t[130]=Be,t[131]=He,t[132]=D,t[133]=m,t[134]=b,t[135]=ne,t[136]=w,t[137]=A,t[138]=fe,t[139]=e):e=t[139],o=Y.map(e),t[117]=q,t[118]=Be,t[119]=He,t[120]=D,t[121]=m,t[122]=b,t[123]=ne,t[124]=w,t[125]=Y,t[126]=A,t[127]=fe,t[128]=o}else o=t[128];let c;t[140]!==a||t[141]!==o?(c=(0,Z.jsx)(Ui,{items:a,strategy:$i,children:o}),t[140]=a,t[141]=o,t[142]=c):c=t[142],t[143]!==ce||t[144]!==ue||t[145]!==c?(qe=(0,Z.jsx)(ra,{sensors:ue,collisionDetection:yo,onDragEnd:ce,children:c}),t[143]=ce,t[144]=ue,t[145]=c,t[146]=qe):qe=t[146];let l;t[147]!==R||t[148]!==B||t[149]!==q||t[150]!==D||t[151]!==A||t[152]!==fe?(l=e=>{let t=R[e],n=JT(t),r=Kr(n),i=B[e]??``;return(0,Z.jsx)(xa,{keyName:e,value:n,declared:r,error:D[e]??null,resetCounter:A[e]??0,isInherited:!0,badge:(0,Z.jsx)(Zi,{source:i}),onCommit:t=>q(e,t),onChangeType:t=>fe(e,t)},`inherited-${e}`)},t[147]=R,t[148]=B,t[149]=q,t[150]=D,t[151]=A,t[152]=fe,t[153]=l):l=t[153],Je=e.map(l)}t[76]=S,t[77]=R,t[78]=B,t[79]=_,t[80]=q,t[81]=Be,t[82]=He,t[83]=D,t[84]=ce,t[85]=m,t[86]=b,t[87]=g,t[88]=ne,t[89]=w,t[90]=Y,t[91]=A,t[92]=ue,t[93]=fe,t[94]=Ue,t[95]=We,t[96]=Ge,t[97]=Ke,t[98]=qe,t[99]=Je,t[100]=Ye,t[101]=Xe,t[102]=Ze,t[103]=Qe,t[104]=$e,t[105]=et}else Ue=t[94],We=t[95],Ge=t[96],Ke=t[97],qe=t[98],Je=t[99],Ye=t[100],Xe=t[101],Ze=t[102],Qe=t[103],$e=t[104],et=t[105];if(et!==Symbol.for(`react.early_return_sentinel`))return et;let tt;t[154]!==r||t[155]!==S||t[156]!==Ae?(tt=S?(0,Z.jsx)(po,{draft:S,onChangeName:Oe,onChangeType:we,onChangeValue:Ee,onCommit:Ae,onCancel:Me}):(0,Z.jsxs)(`div`,{className:`mt-1 flex items-center gap-1`,children:[(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),(0,Z.jsxs)(Ti,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`add-property-trigger`,onClick:me,"aria-label":r({id:`F-NRCj`}),className:`flex items-center gap-1.5 rounded px-2 py-1 font-medium text-sm hover:bg-muted/50 hover:text-foreground`,children:[(0,Z.jsx)(f,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`m16xKo`})})]})]}),t[154]=r,t[155]=S,t[156]=Ae,t[157]=tt):tt=t[157];let nt;t[158]!==Ue||t[159]!==Ge||t[160]!==Ke||t[161]!==qe||t[162]!==Je||t[163]!==tt?(nt=(0,Z.jsxs)(Ue,{className:Ge,children:[Ke,qe,Je,tt]}),t[158]=Ue,t[159]=Ge,t[160]=Ke,t[161]=qe,t[162]=Je,t[163]=tt,t[164]=nt):nt=t[164];let rt;t[165]!==We||t[166]!==Ye||t[167]!==Xe||t[168]!==Ze||t[169]!==nt?(rt=(0,Z.jsxs)(We,{open:Ye,onOpenChange:Xe,children:[Ze,nt]}),t[165]=We,t[166]=Ye,t[167]=Xe,t[168]=Ze,t[169]=nt,t[170]=rt):rt=t[170];let it;return t[171]!==Qe||t[172]!==$e||t[173]!==rt?(it=(0,Z.jsx)(`div`,{className:Qe,"data-testid":$e,children:rt}),t[171]=Qe,t[172]=$e,t[173]=rt,t[174]=it):it=t[174],it}function WT(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length?e.every((e,n)=>e===t[n]):!1:e===t}function GT(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}var KT=/(^|\/)\.ok\/templates\//;function qT(e){return KT.test(e)}function JT(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:Array.isArray(e)?e.map(e=>typeof e==`string`?e:JSON.stringify(e)):e==null?``:JSON.stringify(e)}var YT=je(`LARGE_DOC_CHAR_THRESHOLD`,5e5);function XT(e){let t=e.threshold??YT;return e.ytextLength>t?{renderSource:e.isSourceMode||e.visitedSource,renderVisual:!e.isSourceMode||e.visitedVisual,isLarge:!0}:{renderSource:!0,renderVisual:!0,isLarge:!1}}function ZT(e){return e.hasEmittedFirstToggle||!e.isLarge?!1:e.renderSource&&e.renderVisual}var QT=je(`ACTIVITY_MOUNT_LIMIT`,3);function $T(){return n(()=>import(`./SourceEditor-C3ri5HiW.js`),__vite__mapDeps([44,1,33,2,34,35,20,36,37,38,39,19,6,3,7,4,10,9,40,45,22]),import.meta.url)}var eE=(0,Q.lazy)(async()=>({default:(await $T()).SourceEditor}));function tE(e,t,n){if(n<=0)return[];let r=e.filter(e=>!Ue(e.docName)),i=[...r].sort((e,t)=>t.lastAccessedAt-e.lastAccessedAt).slice(0,n);if(t===null||i.some(e=>e.docName===t))return i;let a=r.find(e=>e.docName===t);return a?[...i.slice(0,n-1),a]:i}function nE(e,t){return t.kind===`idle`?null:t.kind===`failed`&&t.failedDocNames.includes(e)?{kind:`failed`,title:X._({id:`MTs6g3`}),summary:t.reason===`clear-data-timeout`?X._({id:`Sc1bKE`,values:{docName:e}}):X._({id:`ovIGrT`,values:{docName:e}}),actionLabel:X._({id:`HpK_8d`})}:t.kind===`recovering`&&t.docNames.includes(e)?{kind:`recovering`,title:X._({id:`cF9DyA`}),summary:t.phase===`clearing-local-cache`?X._({id:`bmC18N`,values:{docName:e}}):X._({id:`pAgkuZ`,values:{docName:e}})}:null}function rE(e){let t=(0,$.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Z.jsx)(Je,{name:`activity-pool`,children:(0,Z.jsx)(iE,{...e})}),t[0]=e,t[1]=n),n}function iE(e){let t=(0,$.c)(15),{activeDocName:n,isSourceMode:r,editorPlaceholder:i,previousDocName:a,onNavigateBack:o,onRecycle:s}=e,{poolEntries:c,serverRestartRecovery:l}=lt(),{pages:u,loading:d}=ii(),f=tE(c,n,QT),p=(0,Q.useRef)(``),m=f.map(aE).join(`,`),h=(0,Q.useRef)(c),g,_;t[0]===c?(g=t[1],_=t[2]):(g=()=>{h.current=c},_=[c],t[0]=c,t[1]=g,t[2]=_),(0,Q.useLayoutEffect)(g,_),(0,Q.useLayoutEffect)(()=>{if(p.current===m)return;let e=p.current?p.current.split(`,`):[],t=m?m.split(`,`):[],r=e.filter(e=>!t.includes(e)),i=t.filter(t=>!e.includes(t));for(let e of r)C(e);for(let e of i){let t=h.current.find(t=>t.docName===e)?.poolEventId;ee(e,t&&t.length>0?t:crypto.randomUUID())}qe(`ok/activity/mount-list-change`,{active:n,mounted:t,evicted:r}),p.current=m,Ie(t)},[m,n]);let v;t[3]!==n||t[4]!==i||t[5]!==r||t[6]!==d||t[7]!==o||t[8]!==s||t[9]!==u||t[10]!==a||t[11]!==l?(v=e=>(0,Z.jsx)(dE,{entry:e,isActive:e.docName===n,isSourceMode:r,editorPlaceholder:i,isNewDoc:!d&&!u.has(e.docName),previousDocName:a,onNavigateBack:o,onRecycle:s,serverRestartRecovery:l},e.docName),t[3]=n,t[4]=i,t[5]=r,t[6]=d,t[7]=o,t[8]=s,t[9]=u,t[10]=a,t[11]=l,t[12]=v):v=t[12];let y=f.map(v),b;return t[13]===y?b=t[14]:(b=(0,Z.jsx)(Z.Fragment,{children:y}),t[13]=y,t[14]=b),b}function aE(e){return e.docName}function oE(e){let t=(0,$.c)(8),{isActive:n,initialScrollTop:r,children:i}=e,a=(0,Q.useRef)(null),o=(0,Q.useRef)(r??0),s,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=a.current;if(!e)return;let t=()=>{e.scrollTop>0&&(o.current=e.scrollTop)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},c=[],t[0]=s,t[1]=c):(s=t[0],c=t[1]),(0,Q.useEffect)(s,c);let l,u;t[2]===n?(l=t[3],u=t[4]):(l=()=>{if(!n)return;let e=a.current;if(!e)return;let t=o.current;if(t===0)return;let r=performance.now(),i=!1;e.scrollTop=t,e.scrollTop===t&&e.scrollHeight>t&&qe(`ok/scroll-restore/phase1-success`,{target:t,elapsedMs:performance.now()-r});let s=!1,c=0,l=()=>{s||(s=!0,cancelAnimationFrame(c),clearTimeout(f),e.removeEventListener(`wheel`,u),e.removeEventListener(`touchstart`,u))},u=()=>l();e.addEventListener(`wheel`,u,{passive:!0}),e.addEventListener(`touchstart`,u,{passive:!0});let d=()=>{s||(e.scrollTop!==t&&e.scrollHeight>t&&(e.scrollTop=t,e.scrollTop===t&&!i&&(qe(`ok/scroll-restore/phase2-success`,{target:t,elapsedMs:performance.now()-r}),i=!0)),c=requestAnimationFrame(d))};c=requestAnimationFrame(d);let f=setTimeout(()=>{s||(e.scrollTop!==t&&e.scrollHeight>t&&qe(`ok/scroll-restore/abandoned`,{target:t,elapsedMs:performance.now()-r,scrollHeight:e.scrollHeight,finalScrollTop:e.scrollTop}),l())},2e3);return l},u=[n],t[2]=n,t[3]=l,t[4]=u),(0,Q.useLayoutEffect)(l,u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={overflowAnchor:`auto`},t[5]=d):d=t[5];let f;return t[6]===i?f=t[7]:(f=(0,Z.jsx)(`div`,{ref:a,"data-testid":`editor-scroll-container`,className:`subtle-scrollbar h-full overflow-y-auto pt-14 scroll-pt-14`,style:d,children:i}),t[6]=i,t[7]=f),f}function sE(e){let t=(0,$.c)(12),{entry:n,isActive:r,isSourceMode:i,editorPlaceholder:a}=e,o=r&&i,[s,c]=(0,Q.useState)(o),l,u;if(t[0]===o?(l=t[1],u=t[2]):(l=()=>{o&&c(!0)},u=[o],t[0]=o,t[1]=l,t[2]=u),(0,Q.useEffect)(l,u),!s&&!o)return null;let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Sy,{}),t[3]=d):d=t[3];let f=n.docName,p;t[4]===n.provider.document?p=t[5]:(p=n.provider.document.getText(`source`),t[4]=n.provider.document,t[5]=p);let m;return t[6]!==a||t[7]!==n.docName||t[8]!==n.provider||t[9]!==o||t[10]!==p?(m=(0,Z.jsx)(Q.Suspense,{fallback:d,children:(0,Z.jsx)(eE,{docName:f,ytext:p,provider:n.provider,placeholder:a,isSourceModeActive:o})}),t[6]=a,t[7]=n.docName,t[8]=n.provider,t[9]=o,t[10]=p,t[11]=m):m=t[11],m}function cE(e){let t=(0,$.c)(18),{view:n}=e,r=n.kind===`failed`,i=r?`alert`:`status`,a=!r,o;t[0]===r?o=t[1]:(o=(0,Z.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-full border bg-muted text-muted-foreground`,children:r?(0,Z.jsx)(Rc,{className:`size-5`,"aria-hidden":`true`}):(0,Z.jsx)(W,{className:`size-5 animate-spin`,"aria-hidden":`true`})}),t[0]=r,t[1]=o);let s;t[2]===n.title?s=t[3]:(s=(0,Z.jsx)(`h2`,{className:`text-lg font-medium`,children:n.title}),t[2]=n.title,t[3]=s);let c;t[4]===n.summary?c=t[5]:(c=(0,Z.jsx)(`p`,{className:`max-w-md text-sm text-muted-foreground`,children:n.summary}),t[4]=n.summary,t[5]=c);let l;t[6]!==s||t[7]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]!==r||t[10]!==n.actionLabel?(u=r?(0,Z.jsxs)(Ti,{type:`button`,onClick:lE,children:[(0,Z.jsx)(Rc,{className:`size-4`,"aria-hidden":`true`}),n.actionLabel]}):null,t[9]=r,t[10]=n.actionLabel,t[11]=u):u=t[11];let d;return t[12]!==i||t[13]!==a||t[14]!==o||t[15]!==l||t[16]!==u?(d=(0,Z.jsxs)(`div`,{"data-slot":`server-restart-recovery`,role:i,"aria-busy":a,className:`flex h-full flex-col items-center justify-center gap-6 p-8 text-center`,children:[o,l,u]}),t[12]=i,t[13]=a,t[14]=o,t[15]=l,t[16]=u,t[17]=d):d=t[17],d}function lE(){return window.location.reload()}function uE(e){let t=(0,$.c)(2),{html:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(`div`,{className:`tiptap-editor h-full pointer-events-none`,"aria-hidden":`true`,children:(0,Z.jsx)(`div`,{className:`tiptap ProseMirror tiptap-editor-portal-content`,dangerouslySetInnerHTML:{__html:n}})}),t[0]=n,t[1]=r),r}function dE(e){let t=(0,$.c)(53),{entry:n,isActive:r,isSourceMode:i,editorPlaceholder:a,isNewDoc:o,previousDocName:s,onNavigateBack:c,onRecycle:l,serverRestartRecovery:u}=e,d;t[0]!==n.docName||t[1]!==u?(d=nE(n.docName,u),t[0]=n.docName,t[1]=u,t[2]=d):d=t[2];let f=d,p=sS(n.docName)===`conflict`,m;t[3]===n.docName?m=t[4]:(m=()=>{let e=document.createElement(`div`);return e.setAttribute(`data-ok-editor-portal`,n.docName),e.style.display=`contents`,e},t[3]=n.docName,t[4]=m);let[h]=(0,Q.useState)(m),g=n.provider.document.getText(`source`).length,[_,v]=(0,Q.useState)(i),[y,b]=(0,Q.useState)(!i),S,C;t[5]!==i||t[6]!==_||t[7]!==y?(S=()=>{i&&!_?v(!0):!i&&!y&&b(!0)},C=[i,_,y],t[5]=i,t[6]=_,t[7]=y,t[8]=S,t[9]=C):(S=t[8],C=t[9]),(0,Q.useEffect)(S,C);let w=XT({ytextLength:g,isSourceMode:i,visitedSource:_,visitedVisual:y}),T=(0,Q.useRef)(``),E=`${w.isLarge}-${w.renderSource}-${w.renderVisual}`,D,O;t[10]!==n.docName||t[11]!==w.isLarge||t[12]!==w.renderSource||t[13]!==w.renderVisual||t[14]!==E||t[15]!==i||t[16]!==g?(D=()=>{T.current!==E&&(T.current=E,w.isLarge&&qe(`ok/activity/defer-mount`,{docName:n.docName,ytextLength:g,isSourceMode:i,renderSource:w.renderSource,renderVisual:w.renderVisual}))},O=[E,w.isLarge,w.renderSource,w.renderVisual,n.docName,g,i],t[10]=n.docName,t[11]=w.isLarge,t[12]=w.renderSource,t[13]=w.renderVisual,t[14]=E,t[15]=i,t[16]=g,t[17]=D,t[18]=O):(D=t[17],O=t[18]),(0,Q.useEffect)(D,O);let k;t[19]===n.docName?k=t[20]:(k=()=>Bt(n.docName),t[19]=n.docName,t[20]=k);let[A]=(0,Q.useState)(k),j=A?.html??null,[M,N]=(0,Q.useState)(!1),P,F;t[21]!==n.docName||t[22]!==w.isLarge||t[23]!==w.renderSource||t[24]!==w.renderVisual||t[25]!==M||t[26]!==i||t[27]!==g?(P=()=>{ZT({isLarge:w.isLarge,renderSource:w.renderSource,renderVisual:w.renderVisual,hasEmittedFirstToggle:M})&&(qe(`ok/cold/first-toggle`,{docName:n.docName,mountId:x(n.docName),ytextLength:g,modeEnteredFirst:i?`source`:`visual`}),N(!0))},F=[M,w.isLarge,w.renderSource,w.renderVisual,n.docName,g,i],t[21]=n.docName,t[22]=w.isLarge,t[23]=w.renderSource,t[24]=w.renderVisual,t[25]=M,t[26]=i,t[27]=g,t[28]=P,t[29]=F):(P=t[28],F=t[29]),(0,Q.useEffect)(P,F);let I=r?`visible`:`hidden`,L=`editor:${n.docName}`,R=A?.scrollTop,z;t[30]!==a||t[31]!==n||t[32]!==w.renderSource||t[33]!==w.renderVisual||t[34]!==r||t[35]!==p||t[36]!==o||t[37]!==i||t[38]!==c||t[39]!==l||t[40]!==h||t[41]!==s||t[42]!==f||t[43]!==j?(z=f?(0,Z.jsx)(cE,{view:f}):(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsx)(VT,{activeDocName:n.docName,previousDocName:s,onNavigateBack:c,onRecycle:l,children:(0,Z.jsx)(Q.Suspense,{fallback:j?(0,Z.jsx)(uE,{html:j}):(0,Z.jsx)(Sy,{}),children:(0,Z.jsx)(IT,{docName:n.docName,provider:n.provider,children:p?(0,Z.jsx)(FT,{docName:n.docName,provider:n.provider}):(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[!i&&(0,Z.jsx)(UT,{provider:n.provider}),(0,Z.jsxs)(`div`,{className:`relative flex-1`,children:[w.renderSource?(0,Z.jsx)(`div`,{className:i?`h-full`:`ok-mode-hidden h-full`,children:(0,Z.jsx)(sE,{entry:n,isActive:r,isSourceMode:i,editorPlaceholder:a})}):null,w.renderVisual?(0,Z.jsx)(`div`,{className:i?`ok-mode-hidden h-full`:`h-full`,children:(0,Z.jsx)(LC,{provider:n.provider,placeholder:a,isSourceMode:i,portalTarget:h},`${n.docName}-${String(o)}`)}):null]})]})})})})}),t[30]=a,t[31]=n,t[32]=w.renderSource,t[33]=w.renderVisual,t[34]=r,t[35]=p,t[36]=o,t[37]=i,t[38]=c,t[39]=l,t[40]=h,t[41]=s,t[42]=f,t[43]=j,t[44]=z):z=t[44];let B;t[45]!==r||t[46]!==R||t[47]!==z?(B=(0,Z.jsx)(oE,{isActive:r,initialScrollTop:R,children:z}),t[45]=r,t[46]=R,t[47]=z,t[48]=B):B=t[48];let V;return t[49]!==I||t[50]!==L||t[51]!==B?(V=(0,Z.jsx)(Q.Activity,{mode:I,name:L,children:B}),t[49]=I,t[50]=L,t[51]=B,t[52]=V):V=t[52],V}function fE(e){let t=(0,$.c)(36),{stats:n}=e,{_:r}=i(),{words:a,chars:o,tokens:c}=n,l;t[0]===r?l=t[1]:(l=r({id:`L1ZE3M`}),t[0]=r,t[1]=l);let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 bottom-full h-2 bg-linear-to-t from-background to-transparent`}),t[2]=u):u=t[2];let d;t[3]===n.words?d=t[4]:(d=n.words.toLocaleString(),t[3]=n.words,t[4]=d);let f;t[5]===d?f=t[6]:(f=(0,Z.jsx)(`span`,{className:`tabular-nums`,children:d}),t[5]=d,t[6]=f);let p;t[7]===a?p=t[8]:(p=(0,Z.jsx)(s,{id:`gljvbT`,values:{words:a}}),t[7]=a,t[8]=p);let m;t[9]!==f||t[10]!==p?(m=(0,Z.jsxs)(`span`,{children:[f,` `,p]}),t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]===n.chars?h=t[13]:(h=n.chars.toLocaleString(),t[12]=n.chars,t[13]=h);let g;t[14]===h?g=t[15]:(g=(0,Z.jsx)(`span`,{className:`tabular-nums`,children:h}),t[14]=h,t[15]=g);let _;t[16]===o?_=t[17]:(_=(0,Z.jsx)(s,{id:`d5rK4X`,values:{chars:o}}),t[16]=o,t[17]=_);let v;t[18]!==g||t[19]!==_?(v=(0,Z.jsxs)(`span`,{children:[g,` `,_]}),t[18]=g,t[19]=_,t[20]=v):v=t[20];let y=n.tokens>0?`~`:``,b;t[21]===n.tokens?b=t[22]:(b=n.tokens.toLocaleString(),t[21]=n.tokens,t[22]=b);let x;t[23]===b?x=t[24]:(x=(0,Z.jsx)(`span`,{className:`tabular-nums`,children:b}),t[23]=b,t[24]=x);let S;t[25]===c?S=t[26]:(S=(0,Z.jsx)(s,{id:`uynXup`,values:{tokens:c}}),t[25]=c,t[26]=S);let C;t[27]!==y||t[28]!==x||t[29]!==S?(C=(0,Z.jsxs)(`span`,{children:[y,x,` `,S]}),t[27]=y,t[28]=x,t[29]=S,t[30]=C):C=t[30];let w;return t[31]!==l||t[32]!==v||t[33]!==C||t[34]!==m?(w=(0,Z.jsxs)(`section`,{"aria-label":l,className:`relative flex h-6 shrink-0 items-center justify-end gap-3 bg-background px-3 text-2xs text-muted-foreground`,children:[u,m,v,C]}),t[31]=l,t[32]=v,t[33]=C,t[34]=m,t[35]=w):w=t[35],w}function pE(e){let t=(0,$.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{_:a}=i(),o;t[3]===a?o=t[4]:(o=a({id:`3__SjS`}),t[3]=a,t[4]=o);let s;t[5]===n?s=t[6]:(s=vi(n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==o||t[9]!==s?(c=(0,Z.jsx)(`nav`,{"aria-label":o,"data-slot":`breadcrumb`,className:s,...r}),t[7]=r,t[8]=o,t[9]=s,t[10]=c):c=t[10],c}function mE(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`ol`,{"data-slot":`breadcrumb-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function hE(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`inline-flex items-center gap-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`li`,{"data-slot":`breadcrumb-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function gE(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({current:i,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0||i?`page`:void 0,o;t[4]===n?o=t[5]:(o=vi(`font-normal text-foreground`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,Z.jsx)(`span`,{"data-slot":`breadcrumb-page`,"aria-current":a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function _E(e){let t=(0,$.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,className:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=vi(`[&>svg]:size-3.5`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=n??(0,Z.jsx)(Ho,{}),t[6]=n,t[7]=o);let s;return t[8]!==i||t[9]!==a||t[10]!==o?(s=(0,Z.jsx)(`li`,{"data-slot":`breadcrumb-separator`,role:`presentation`,"aria-hidden":`true`,className:a,...i,children:o}),t[8]=i,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}var vE=1,yE=2,bE=4;function xE(e){let t=(0,$.c)(18),{docName:n,className:r}=e;if(!n)return null;let i,a,o,s,c,l;if(t[0]!==r||t[1]!==n){l=Symbol.for(`react.early_return_sentinel`);bb0:{let{prefix:e}=_t(n,``);if(!e){l=null;break bb0}let u=e.replace(/\/$/,``).split(`/`).filter(Boolean);if(u.length===0){l=null;break bb0}let d=(e,t)=>({kind:`segment`,value:e,key:u.slice(0,t+1).join(`/`)}),f=u.length>bE?[...u.slice(0,vE).map((e,t)=>d(e,t)),{kind:`ellipsis`,hidden:u.slice(vE,-yE)},...u.slice(-yE).map((e,t)=>d(e,u.length-yE+t))]:u.map((e,t)=>d(e,t));a=pE,t[8]===r?c=t[9]:(c=vi(`flex min-w-0 items-center`,r),t[8]=r,t[9]=c),i=mE,o=`min-w-0 flex-nowrap gap-1 overflow-hidden text-muted-foreground/70 text-xs`,s=f.map(SE)}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7];if(l!==Symbol.for(`react.early_return_sentinel`))return l;let u;t[10]!==i||t[11]!==o||t[12]!==s?(u=(0,Z.jsx)(i,{className:o,children:s}),t[10]=i,t[11]=o,t[12]=s,t[13]=u):u=t[13];let d;return t[14]!==a||t[15]!==c||t[16]!==u?(d=(0,Z.jsx)(a,{className:c,children:u}),t[14]=a,t[15]=c,t[16]=u,t[17]=d):d=t[17],d}function SE(e,t){let n=e.kind===`segment`?e.key:`ellipsis`;return(0,Z.jsxs)(Q.Fragment,{children:[t>0&&(0,Z.jsx)(_E,{className:`shrink-0 text-muted-foreground/70 [&>svg]:size-3`}),e.kind===`ellipsis`?(0,Z.jsxs)(hE,{className:`shrink-0`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,title:e.hidden.join(` / `),className:`flex size-4 items-center justify-center text-muted-foreground/70`,children:(0,Z.jsx)(sc,{className:`size-3.5`})}),(0,Z.jsx)(`span`,{className:`sr-only`,children:e.hidden.join(` / `)})]}):(0,Z.jsx)(hE,{className:`min-w-0`,children:(0,Z.jsx)(gE,{current:!1,className:`min-w-0 truncate font-normal text-muted-foreground/70`,title:e.value,children:e.value})})]},n)}var CE={fill:`none`,height:24,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`},wE=e=>{let t=(0,$.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({color:a,size:o,strokeWidth:s,absoluteStrokeWidth:n,className:c,children:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`currentColor`:a,u=o===void 0?24:o,d=s===void 0?2:s,f=c===void 0?``:c,p=n?Number(d)*24/Number(u):d,m;return t[8]!==r||t[9]!==f||t[10]!==l||t[11]!==i||t[12]!==u||t[13]!==p?(m=(0,Z.jsx)(`svg`,{"aria-hidden":`true`,...CE,className:f,height:u,stroke:l,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:p,width:u,...i,children:r}),t[8]=r,t[9]=f,t[10]=l,t[11]=i,t[12]=u,t[13]=p,t[14]=m):m=t[14],m},TE=e=>{let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`Markdown`}),r=(0,Z.jsx)(`path`,{d:`M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(wE,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i},EE=e=>{let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`Textbox`}),r=(0,Z.jsx)(`path`,{d:`M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(wE,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i};function DE(e){let t=(0,$.c)(60),{activeDocName:n,isSourceMode:r,sourceDisabled:a,onModeChange:o,showAddPropertyButton:c,onAddProperty:l,isPanelCollapsed:u,onTogglePanel:d}=e,{_:f}=i(),p;t[0]===n?p=t[1]:(p=(0,Z.jsx)(`div`,{className:`pointer-events-auto flex min-w-0 items-center`,children:(0,Z.jsx)(xE,{docName:n})}),t[0]=n,t[1]=p);let m=r?`source`:`wysiwyg`,h;t[2]===o?h=t[3]:(h=e=>{e&&o(e)},t[2]=o,t[3]=h);let g;t[4]===f?g=t[5]:(g=f({id:`n7aopT`}),t[4]=f,t[5]=g);let _;t[6]===f?_=t[7]:(_=f({id:`ur2XSb`}),t[6]=f,t[7]=_);let v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(Kn,{children:(0,Z.jsx)(EE,{className:`size-4`})}),t[8]=v):v=t[8];let y;t[9]===_?y=t[10]:(y=(0,Z.jsx)(xo,{value:`wysiwyg`,"aria-label":_,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,asChild:!0,children:v}),t[9]=_,t[10]=y);let b;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`Mb_20S`})}),t[11]=b):b=t[11];let x;t[12]===y?x=t[13]:(x=(0,Z.jsxs)(Ir,{children:[y,b]}),t[12]=y,t[13]=x);let S;t[14]===f?S=t[15]:(S=f({id:`xbdtfY`}),t[14]=f,t[15]=S);let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(TE,{className:`size-4`}),t[16]=C):C=t[16];let w;t[17]!==a||t[18]!==S?(w=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(`div`,{children:(0,Z.jsx)(xo,{value:`source`,"aria-label":S,disabled:a,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:C})})}),t[17]=a,t[18]=S,t[19]=w):w=t[19];let T;t[20]===a?T=t[21]:(T=(0,Z.jsx)(wn,{side:`bottom`,children:a?(0,Z.jsx)(s,{id:`G-JBA1`}):(0,Z.jsx)(s,{id:`u6Hp4N`})}),t[20]=a,t[21]=T);let E;t[22]!==w||t[23]!==T?(E=(0,Z.jsxs)(Ir,{children:[w,T]}),t[22]=w,t[23]=T,t[24]=E):E=t[24];let D;t[25]!==E||t[26]!==m||t[27]!==h||t[28]!==g||t[29]!==x?(D=(0,Z.jsx)(`div`,{className:`pointer-events-auto flex justify-center`,children:(0,Z.jsxs)(wo,{type:`single`,value:m,onValueChange:h,"aria-label":g,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 data-[size=sm]:rounded-[10px] bg-muted p-0.5`,children:[x,E]})}),t[25]=E,t[26]=m,t[27]=h,t[28]=g,t[29]=x,t[30]=D):D=t[30];let O;t[31]!==f||t[32]!==l||t[33]!==c?(O=c&&(0,Z.jsxs)(Ir,{children:[(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon`,"aria-label":f({id:`81H_23`}),onClick:l,"data-testid":`add-properties-button`,asChild:!0,children:(0,Z.jsx)(Kn,{children:(0,Z.jsx)(Cc,{})})}),(0,Z.jsx)(wn,{side:`bottom`,children:(0,Z.jsx)(s,{id:`81H_23`})})]}),t[31]=f,t[32]=l,t[33]=c,t[34]=O):O=t[34];let k=!u,A;t[35]!==f||t[36]!==u?(A=f(u?{id:`6iDEWA`}:{id:`170Js2`}),t[35]=f,t[36]=u,t[37]=A):A=t[37];let j;t[38]===u?j=t[39]:(j=(0,Z.jsx)(Kn,{children:u?(0,Z.jsx)(Mc,{}):(0,Z.jsx)(jc,{})}),t[38]=u,t[39]=j);let M;t[40]!==d||t[41]!==k||t[42]!==A||t[43]!==j?(M=(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon`,onClick:d,"aria-expanded":k,"aria-label":A,asChild:!0,children:j}),t[40]=d,t[41]=k,t[42]=A,t[43]=j,t[44]=M):M=t[44];let N;t[45]===u?N=t[46]:(N=(0,Z.jsx)(wn,{side:`bottom`,children:u?(0,Z.jsx)(s,{id:`6iDEWA`}):(0,Z.jsx)(s,{id:`170Js2`})}),t[45]=u,t[46]=N);let P;t[47]!==M||t[48]!==N?(P=(0,Z.jsxs)(Ir,{children:[M,N]}),t[47]=M,t[48]=N,t[49]=P):P=t[49];let F;t[50]!==O||t[51]!==P?(F=(0,Z.jsxs)(`div`,{className:`pointer-events-auto flex items-center justify-end gap-1`,children:[O,P]}),t[50]=O,t[51]=P,t[52]=F):F=t[52];let I;t[53]!==p||t[54]!==D||t[55]!==F?(I=(0,Z.jsx)(`div`,{className:`editor-content-aligned bg-background py-2`,children:(0,Z.jsxs)(`div`,{className:`grid grid-cols-3 items-center`,children:[p,D,F]})}),t[53]=p,t[54]=D,t[55]=F,t[56]=I):I=t[56];let L;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none h-2 bg-linear-to-b from-background to-transparent`}),t[57]=L):L=t[57];let R;return t[58]===I?R=t[59]:(R=(0,Z.jsxs)(`div`,{"data-testid":`editor-toolbar`,className:`pointer-events-none absolute inset-x-0 top-0 z-10`,children:[I,L]}),t[58]=I,t[59]=R),R}function OE(e){let{activeDocName:t,deferredActiveDocName:n,mountResolved:r,syncResolved:i}=e;return t===null||t===n?!1:!(r&&i)}var kE=(0,Q.lazy)(async()=>({default:(await n(()=>import(`./ActivityModeContent-f87lu1R1.js`),__vite__mapDeps([32,1,2,33,34,35,20,36,37,38,39,19,6,3,7,4,10,9,40,41]),import.meta.url)).ActivityModeContent}));function AE(e){let t=(0,$.c)(5),n;t[0]===e?n=t[1]:(n=(0,Z.jsx)(ME,{...e}),t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(jE,{}),t[2]=r):r=t[2];let i;return t[3]===n?i=t[4]:(i=(0,Z.jsx)(Je,{name:`editor-area`,children:(0,Z.jsxs)(Xb,{children:[n,r]})}),t[3]=n,t[4]=i),i}function jE(){let e=(0,$.c)(5),t=bm(),n;e[0]===t?n=e[1]:(n=e=>{e||t.close()},e[0]=t,e[1]=n);let r;return e[2]!==t.open||e[3]!==n?(r=(0,Z.jsx)(ox,{open:t.open,onOpenChange:n}),e[2]=t.open,e[3]=n,e[4]=r):r=e[4],r}function ME(e){let t=(0,$.c)(111),{editorMode:n,onModeChange:r,activeTab:a,onActiveTabChange:o,onSaveVersion:c,saving:l}=e,{_:u}=i(),{activeDocName:d,activeProvider:f,activeTarget:p,recycleDocument:m,docPanelMode:h,docPanelAgentId:g,docPanelExpandSignal:_}=lt(),{openDocumentTransition:v}=xt(),{requestAddProperty:b}=Qb(),x=aS(f,d),S=cS(f),C=S===`connected`||S===`synced`,w=sS(d)===`conflict`,T=(0,Q.useDeferredValue)(d),E=p?.kind===`missing`,D=!!d&&p?.kind!==`folder`,O;t[0]!==u||t[1]!==E?(O=E?u({id:`K-a33w`}):void 0,t[0]=u,t[1]=E,t[2]=O):O=t[2];let k=O,A=uy(),[j,M]=(0,Q.useState)(!1),{layout:N,autoCollapse:P}=Ux(),F=N===`sheet`,[I,L]=(0,Q.useState)(!1),R=(0,Q.useRef)(!1),z,B;t[3]!==P||t[4]!==N||t[5]!==A?(z=()=>{if(N!==`panel`)return;let e=requestAnimationFrame(()=>{P?(R.current=!1,A.current?.collapse()):R.current||A.current?.expand()});return()=>cancelAnimationFrame(e)},B=[P,N,A],t[3]=P,t[4]=N,t[5]=A,t[6]=z,t[7]=B):(z=t[6],B=t[7]),(0,Q.useEffect)(z,B);let V,H;t[8]!==F||t[9]!==o||t[10]!==A?(V=()=>{let e=e=>{o(e),F?L(!0):(R.current=!1,A.current?.expand())},t=Tp();return t&&e(t),Dp(t=>{Tp(),e(t)})},H=[F,o,A],t[8]=F,t[9]=o,t[10]=A,t[11]=V,t[12]=H):(V=t[11],H=t[12]),(0,Q.useEffect)(V,H);let U,W;t[13]!==_||t[14]!==F||t[15]!==A?(U=()=>{_!==0&&(F?L(!0):(R.current=!1,A.current?.expand()))},W=[_,F,A],t[13]=_,t[14]=F,t[15]=A,t[16]=U,t[17]=W):(U=t[16],W=t[17]),(0,Q.useEffect)(U,W);let G=(0,Q.useRef)(null),[K,ee]=(0,Q.useState)(null),q,te;if(t[18]===d?(q=t[19],te=t[20]):(q=()=>{if(d&&d!==G.current){let e=G.current;G.current=d,ee(e)}},te=[d],t[18]=d,t[19]=q,t[20]=te),(0,Q.useEffect)(q,te),p?.kind===`folder`){if(!(h===`agent`&&g!==null)){let e;return t[21]===p.folderPath?e=t[22]:(e=(0,Z.jsx)(Ub,{folderPath:p.folderPath}),t[21]=p.folderPath,t[22]=e),e}let e;t[23]===p.folderPath?e=t[24]:(e=(0,Z.jsx)(dx,{minSize:`30%`,defaultSize:`75%`,children:(0,Z.jsx)(Ub,{folderPath:p.folderPath})}),t[23]=p.folderPath,t[24]=e);let n;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(fx,{withHandle:!0}),t[25]=n):n=t[25];let r;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(dx,{defaultSize:`25%`,minSize:`300px`,maxSize:`40%`,className:`flex flex-col bg-muted/20`,children:(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(`div`,{role:`status`,"aria-busy":`true`,className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`ONPvOb`})}),children:(0,Z.jsx)(kE,{showBackButton:!1})})}),t[26]=r):r=t[26];let i;return t[27]===e?i=t[28]:(i=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1`,children:(0,Z.jsxs)(ux,{orientation:`horizontal`,children:[e,n,r]})}),t[27]=e,t[28]=i),i}if(p?.kind===`asset`){let e;return t[29]!==p.assetPath||t[30]!==p.mediaKind?(e=(0,Z.jsx)(xy,{assetPath:p.assetPath,mediaKind:p.mediaKind},p.assetPath),t[29]=p.assetPath,t[30]=p.mediaKind,t[31]=e):e=t[31],e}if(!f||!d){if((typeof window<`u`?Mr(window.location.hash):null)!==null){let e;return t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Sy,{}),t[32]=e):e=t[32],e}let e;return t[33]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(gb,{}),t[33]=e):e=t[33],e}let ne=n===`source`,re=!C,ie=F?!I:j,ae;t[34]!==d||t[35]!==b?(ae=function(){d&&b(d)},t[34]=d,t[35]=b,t[36]=ae):ae=t[36];let oe=ae,se;t[37]!==j||t[38]!==F||t[39]!==A?(se=function(){F?L(NE):j?(R.current=!1,A.current?.expand()):(R.current=!0,A.current?.collapse())},t[37]=j,t[38]=F,t[39]=A,t[40]=se):se=t[40];let ce=se,le=T??d,J=K??void 0,ue;t[41]===v?ue=t[42]:(ue=e=>{let t=ni(e);window.location.hash===t?v(e):window.location.hash=t},t[41]=v,t[42]=ue);let de;t[43]!==k||t[44]!==ne||t[45]!==m||t[46]!==le||t[47]!==J||t[48]!==ue?(de=(0,Z.jsx)(rE,{activeDocName:le,isSourceMode:ne,editorPlaceholder:k,previousDocName:J,onNavigateBack:ue,onRecycle:m}),t[43]=k,t[44]=ne,t[45]=m,t[46]=le,t[47]=J,t[48]=ue,t[49]=de):de=t[49];let fe;t[50]!==d||t[51]!==ne?(fe=(0,Z.jsx)(Rx,{activeDocName:d,isSourceMode:ne}),t[50]=d,t[51]=ne,t[52]=fe):fe=t[52];let pe;t[53]!==d||t[54]!==T?(pe=OE({activeDocName:d,deferredActiveDocName:T,mountResolved:d!==null&&y(d),syncResolved:d!==null&&ze(d)})?(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10 bg-background`,children:[(0,Z.jsx)(Sy,{}),d===null?null:(0,Z.jsx)(qb,{docName:d})]}):null,t[53]=d,t[54]=T,t[55]=pe):pe=t[55];let me;t[56]!==de||t[57]!==fe||t[58]!==pe?(me=(0,Z.jsxs)(`div`,{className:`relative h-full`,children:[de,fe,pe]}),t[56]=de,t[57]=fe,t[58]=pe,t[59]=me):me=t[59];let he;t[60]!==d||t[61]!==w||t[62]!==ie||t[63]!==ne||t[64]!==r||t[65]!==oe||t[66]!==re||t[67]!==ce?(he=!w&&(0,Z.jsx)(DE,{activeDocName:d,isSourceMode:ne,sourceDisabled:re,onModeChange:r,showAddPropertyButton:!ne,onAddProperty:oe,isPanelCollapsed:ie,onTogglePanel:ce}),t[60]=d,t[61]=w,t[62]=ie,t[63]=ne,t[64]=r,t[65]=oe,t[66]=re,t[67]=ce,t[68]=he):he=t[68];let ge;t[69]!==me||t[70]!==he?(ge=(0,Z.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[me,he]}),t[69]=me,t[70]=he,t[71]=ge):ge=t[71];let _e;t[72]!==D||t[73]!==x?(_e=D&&(0,Z.jsx)(fE,{stats:x}),t[72]=D,t[73]=x,t[74]=_e):_e=t[74];let ve;t[75]!==ge||t[76]!==_e?(ve=(0,Z.jsxs)(`div`,{className:`relative flex h-full flex-col`,children:[ge,_e]}),t[75]=ge,t[76]=_e,t[77]=ve):ve=t[77];let ye=ve,be=F?`100%`:`30%`,xe=F?`100%`:`75%`,Se;t[78]!==ye||t[79]!==be||t[80]!==xe?(Se=(0,Z.jsx)(dx,{minSize:be,defaultSize:xe,children:ye}),t[78]=ye,t[79]=be,t[80]=xe,t[81]=Se):Se=t[81];let Ce;t[82]===F?Ce=t[83]:(Ce=F?null:(0,Z.jsx)(fx,{withHandle:!0}),t[82]=F,t[83]=Ce);let we;t[84]!==d||t[85]!==a||t[86]!==h||t[87]!==F||t[88]!==ne||t[89]!==o||t[90]!==c||t[91]!==A||t[92]!==l?(we=F?null:(0,Z.jsx)(dx,{panelRef:A,defaultSize:`25%`,minSize:`300px`,maxSize:`40%`,collapsible:!0,collapsedSize:0,onResize:e=>M(e.asPercentage===0),className:`flex flex-col bg-muted/20`,children:(0,Z.jsx)(__,{docName:d,isSourceMode:ne,activeTab:a,onActiveTabChange:o,mode:h,onSaveVersion:c,saving:l})}),t[84]=d,t[85]=a,t[86]=h,t[87]=F,t[88]=ne,t[89]=o,t[90]=c,t[91]=A,t[92]=l,t[93]=we):we=t[93];let Te;t[94]!==Se||t[95]!==Ce||t[96]!==we?(Te=(0,Z.jsxs)(ux,{orientation:`horizontal`,children:[Se,Ce,we]}),t[94]=Se,t[95]=Ce,t[96]=we,t[97]=Te):Te=t[97];let Ee;t[98]!==d||t[99]!==a||t[100]!==h||t[101]!==F||t[102]!==ne||t[103]!==o||t[104]!==c||t[105]!==l||t[106]!==I?(Ee=F?(0,Z.jsx)(px,{open:I,onOpenChange:L,children:(0,Z.jsxs)(gx,{side:`right`,className:`flex w-80 sm:w-96 flex-col gap-0 p-0`,children:[(0,Z.jsx)(_x,{className:`sr-only`,children:(0,Z.jsx)(vx,{children:(0,Z.jsx)(s,{id:`5Q9-G-`})})}),(0,Z.jsx)(__,{docName:d,isSourceMode:ne,activeTab:a,onActiveTabChange:o,mode:h,onSaveVersion:c,saving:l})]})}):null,t[98]=d,t[99]=a,t[100]=h,t[101]=F,t[102]=ne,t[103]=o,t[104]=c,t[105]=l,t[106]=I,t[107]=Ee):Ee=t[107];let De;return t[108]!==Te||t[109]!==Ee?(De=(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[Te,Ee]}),t[108]=Te,t[109]=Ee,t[110]=De):De=t[110],De}function NE(e){return!e}var PE=1280;function FE(){let e=(0,$.c)(2),[t,n]=(0,Q.useState)(IE),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.matchMedia(`(max-width: ${PE-1}px)`),t=()=>{n(window.innerWidth<PE)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i),t}function IE(){return window.innerWidth<PE}function LE(e){let t=e.endsWith(`rem`)?`rem`:`px`;return{value:Number.parseFloat(e),unit:t}}function RE(e){let{value:t,unit:n}=LE(e);return n===`rem`?t*16:t}function zE(e,t){return`${t===`rem`?e.toFixed(1):Math.round(e)}${t}`}var BE=3600*24*7;function VE(e){let t=(0,$.c)(28),{direction:n,currentWidth:r,onResize:i,onToggle:a,isCollapsed:o,minResizeWidth:s,maxResizeWidth:c,enableToggle:l,enableAutoCollapse:u,autoCollapseThreshold:d,expandThreshold:f,enableDrag:p,setIsDraggingRail:m,widthCookieName:h,widthCookieMaxAge:g,isNested:_}=e,v=n===void 0?`right`:n,y=o===void 0?!1:o,b=s===void 0?`14rem`:s,x=c===void 0?`24rem`:c,S=l===void 0?!0:l,C=u===void 0?!0:u,w=d===void 0?1.5:d,T=f===void 0?.2:f,E=p===void 0?!0:p,D=m===void 0?HE:m,O=g===void 0?BE:g,k=_===void 0?!1:_,A=(0,Q.useRef)(null),j=(0,Q.useRef)(0),M=(0,Q.useRef)(0),N=(0,Q.useRef)(!1),P=(0,Q.useRef)(!1),F=(0,Q.useRef)(null),I=(0,Q.useRef)(0),L=(0,Q.useRef)(!1),R=(0,Q.useRef)(0),z=(0,Q.useRef)(0),B=(0,Q.useRef)(null),V=(0,Q.useRef)(r),H=(0,Q.useRef)(y),U,W;t[0]===r?(U=t[1],W=t[2]):(U=()=>{V.current=r},W=[r],t[0]=r,t[1]=U,t[2]=W),(0,Q.useEffect)(U,W);let G,K;t[3]===y?(G=t[4],K=t[5]):(G=()=>{H.current=y},K=[y],t[3]=y,t[4]=G,t[5]=K),(0,Q.useEffect)(G,K);let ee=RE(b),q;t[6]===x?q=t[7]:(q=RE(x),t[6]=x,t[7]=q);let te=q,ne;t[8]!==E||t[9]!==k?(ne=function(e){P.current=!0,E&&(j.current=H.current?0:RE(V.current),M.current=e.clientX,I.current=e.clientX,F.current=null,L.current=!1,R.current=0,z.current=0,B.current=k&&A.current?A.current.getBoundingClientRect():null,e.preventDefault())},t[8]=E,t[9]=k,t[10]=ne):ne=t[10];let re=ne,ie,ae;t[11]!==w||t[12]!==v||t[13]!==C||t[14]!==S||t[15]!==T||t[16]!==k||t[17]!==te||t[18]!==ee||t[19]!==i||t[20]!==a||t[21]!==D||t[22]!==O||t[23]!==h?(ie=()=>{let e=function(e){h&&(document.cookie=`${h}=${e}; path=/; max-age=${O}`)},t=function(e,t){return v===`left`?e<t:e>t},n=function(e,t,n,r){if(k&&r){let r=e.clientX-t;return v===`left`?n-r:n+r}return v===`left`?window.innerWidth-e.clientX:e.clientX},r=function(r){if(!P.current)return;let o=Math.abs(r.clientX-M.current);if(!N.current&&o>5&&(N.current=!0,D(!0)),N.current){let{unit:o}=LE(V.current),s=B.current;k&&A.current&&(s=A.current.getBoundingClientRect());let c=t(r.clientX,I.current)?`expand`:`collapse`;F.current!==c&&(F.current=c),z.current=Math.abs(r.clientX-I.current);let l=Date.now();if(L.current&&l-R.current>200&&(L.current=!1),!L.current){if(C&&a&&!H.current){let e=n(r,M.current,j.current,s),t=!1;if(w<=1)t=e<=ee*w;else if(e<=ee){let n=ee*(w-1);t=ee-e>=n}if(c===`collapse`&&t){a(),I.current=r.clientX,L.current=!0,R.current=l;return}}if(a&&H.current&&c===`expand`&&z.current>ee*T){a();let t=n(r,M.current,j.current,s),c=Math.max(ee,Math.min(te,t)),u=zE(o===`rem`?c/16:c,o);i(u),e(u),I.current=r.clientX,L.current=!0,R.current=l;return}}if(H.current)return;let u=n(r,M.current,j.current,s),d=Math.max(ee,Math.min(te,u)),f=zE(o===`rem`?d/16:d,o);i(f),e(f)}},o=function(){P.current&&(!N.current&&a&&S&&a(),N.current=!1,P.current=!1,F.current=null,I.current=0,L.current=!1,R.current=0,z.current=0,B.current=null,D(!1))};return document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,o),()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,o)}},ae=[i,a,D,ee,te,k,C,w,T,S,h,O,v],t[11]=w,t[12]=v,t[13]=C,t[14]=S,t[15]=T,t[16]=k,t[17]=te,t[18]=ee,t[19]=i,t[20]=a,t[21]=D,t[22]=O,t[23]=h,t[24]=ie,t[25]=ae):(ie=t[24],ae=t[25]),(0,Q.useEffect)(ie,ae);let oe;return t[26]===re?oe=t[27]:(oe={dragRef:A,isDragging:N,handleMouseDown:re},t[26]=re,t[27]=oe),oe}function HE(){}var UE=`sidebar_state`,WE=3600*24*7,GE=`18rem`,KE=`3rem`,qE=`\\`,JE=`app-file-sidebar`,YE=`14.625rem`,XE=`22rem`,ZE=`sidebar_width`,QE=/^\d+(?:\.\d+)?(?:rem|px)$/,$E=Q.createContext(null);function eD(e){if(typeof document>`u`)return e;let t=document.cookie.split(`; `).find(e=>e.startsWith(`${ZE}=`))?.split(`=`)[1];if(!t)return e;let n;try{n=decodeURIComponent(t)}catch{return e}return QE.test(n)?n:e}function tD(){let e=Q.use($E);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function nD(e){let t=(0,$.c)(53),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,defaultWidth:l,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=c===void 0?!0:c,d=l===void 0?GE:l,f=FE(),p;t[9]===d?p=t[10]:(p=()=>eD(d),t[9]=d,t[10]=p);let[m,h]=Q.useState(p),[g,_]=Q.useState(!1),v=Q.useRef(g),[y,b]=Q.useState(!1),[x,S]=Q.useState(!1),[C,w]=Q.useState(u),T=i??C,E;t[11]!==T||t[12]!==o?(E=e=>{let t=typeof e==`function`?e(T):e;o?o(t):w(t),document.cookie=`${UE}=${t}; path=/; max-age=${WE}`},t[11]=T,t[12]=o,t[13]=E):E=t[13];let D=E,O;t[14]===D?O=t[15]:(O=function(){return window.innerWidth<1280?_(iD):D(rD)},t[14]=D,t[15]=O);let k=O,A;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(A=function(){window.innerWidth>=1280||v.current&&(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||S(!0))},t[16]=A):A=t[16];let j=A,M;t[17]===g?M=t[18]:(M=()=>{v.current=g},t[17]=g,t[18]=M),Q.useLayoutEffect(M);let N,P;t[19]===k?(N=t[20],P=t[21]):(N=()=>{let e=e=>{e.key===qE&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),k())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},P=[k],t[19]=k,t[20]=N,t[21]=P),Q.useEffect(N,P);let F,I;t[22]!==f||t[23]!==g?(F=()=>{if(!f||!g)return;let e=e=>{e.key===`Escape`&&(document.querySelector(`[data-state="open"][role="dialog"], [data-state="open"][role="alertdialog"], [data-state="open"][role="menu"], [data-state="open"][role="listbox"], [data-radix-popper-content-wrapper] [data-state="open"]`)||_(!1))};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},I=[f,g],t[22]=f,t[23]=g,t[24]=F,t[25]=I):(F=t[24],I=t[25]),Q.useEffect(F,I);let L=Q.useRef(f),R,z;t[26]!==f||t[27]!==T?(R=()=>{!L.current&&f&&_(T),L.current=f},z=[f,T],t[26]=f,t[27]=T,t[28]=R,t[29]=z):(R=t[28],z=t[29]),Q.useEffect(R,z);let B=f?g?`expanded`:`collapsed`:T?`expanded`:`collapsed`,V;t[30]!==y||t[31]!==f||t[32]!==T||t[33]!==g||t[34]!==D||t[35]!==x||t[36]!==B||t[37]!==k||t[38]!==m?(V={state:B,open:T,setOpen:D,isMobile:f,openMobile:g,setOpenMobile:_,toggleSidebar:k,width:m,setWidth:h,isDraggingRail:y,setIsDraggingRail:b,showPushPulse:x,setShowPushPulse:S,notifySidebarFileSelected:j},t[30]=y,t[31]=f,t[32]=T,t[33]=g,t[34]=D,t[35]=x,t[36]=B,t[37]=k,t[38]=m,t[39]=V):V=t[39];let H;t[40]!==s||t[41]!==m?(H={"--sidebar-width":m,"--sidebar-width-icon":KE,...s},t[40]=s,t[41]=m,t[42]=H):H=t[42];let U=H,W;t[43]===r?W=t[44]:(W=vi(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[43]=r,t[44]=W);let G;t[45]!==n||t[46]!==a||t[47]!==U||t[48]!==W?(G=(0,Z.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:U,className:W,...a,children:n}),t[45]=n,t[46]=a,t[47]=U,t[48]=W,t[49]=G):G=t[49];let K;return t[50]!==V||t[51]!==G?(K=(0,Z.jsx)($E.Provider,{value:V,children:G}),t[50]=V,t[51]=G,t[52]=K):K=t[52],K}function rD(e){return!e}function iD(e){return!e}function aD(e){let t=(0,$.c)(57),n,r,a,o,s,c;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({side:o,variant:s,collapsible:c,className:r,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let l=o===void 0?`left`:o,u=s===void 0?`sidebar`:s,d=c===void 0?`offcanvas`:c,{_:f}=i(),{isMobile:p,state:m,openMobile:h,isDraggingRail:g}=tD();if(d===`none`){let e;t[7]===r?e=t[8]:(e=vi(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let i;return t[9]!==n||t[10]!==a||t[11]!==e||t[12]!==u?(i=(0,Z.jsx)(`div`,{"data-slot":`sidebar`,"data-variant":u,className:e,...a,children:n}),t[9]=n,t[10]=a,t[11]=e,t[12]=u,t[13]=i):i=t[13],i}if(p){let e=h?`expanded`:`collapsed`,i;t[14]===f?i=t[15]:(i=f({id:`07q4Qk`}),t[14]=f,t[15]=i);let o=u===`floating`||u===`inset`?`p-2`:``,s;t[16]!==r||t[17]!==o?(s=vi(`fixed inset-y-0 z-30 flex h-svh w-(--sidebar-width)`,`transition-transform duration-200 ease-linear motion-reduce:transition-none`,`data-[side=left]:left-0 data-[side=right]:right-0`,`group-data-[state=collapsed]:data-[side=left]:-translate-x-full`,`group-data-[state=collapsed]:data-[side=right]:translate-x-full`,o,r),t[16]=r,t[17]=o,t[18]=s):s=t[18];let c;t[19]===n?c=t[20]:(c=(0,Z.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:n}),t[19]=n,t[20]=c);let d;t[21]!==a||t[22]!==l||t[23]!==i||t[24]!==s||t[25]!==c?(d=(0,Z.jsx)(`nav`,{id:JE,"aria-label":i,"data-slot":`sidebar-container`,"data-side":l,className:s,...a,children:c}),t[21]=a,t[22]=l,t[23]=i,t[24]=s,t[25]=c,t[26]=d):d=t[26];let p;return t[27]!==e||t[28]!==l||t[29]!==d||t[30]!==u?(p=(0,Z.jsx)(`div`,{className:`group peer text-sidebar-foreground`,"data-state":e,"data-variant":u,"data-side":l,"data-slot":`sidebar`,"data-mobile":`true`,children:d}),t[27]=e,t[28]=l,t[29]=d,t[30]=u,t[31]=p):p=t[31],p}let _=m===`collapsed`?d:``,v=u===`floating`||u===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,y;t[32]===v?y=t[33]:(y=vi(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,v,`group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:!duration-0`),t[32]=v,t[33]=y);let b;t[34]===y?b=t[35]:(b=(0,Z.jsx)(`div`,{"data-slot":`sidebar-gap`,className:y}),t[34]=y,t[35]=b);let x;t[36]===f?x=t[37]:(x=f({id:`07q4Qk`}),t[36]=f,t[37]=x);let S=u===`floating`||u===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,C;t[38]!==r||t[39]!==S?(C=vi(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,S,`group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:!duration-0`,r),t[38]=r,t[39]=S,t[40]=C):C=t[40];let w;t[41]===n?w=t[42]:(w=(0,Z.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:n}),t[41]=n,t[42]=w);let T;t[43]!==a||t[44]!==l||t[45]!==C||t[46]!==w||t[47]!==x?(T=(0,Z.jsx)(`nav`,{id:JE,"aria-label":x,"data-slot":`sidebar-container`,"data-side":l,className:C,...a,children:w}),t[43]=a,t[44]=l,t[45]=C,t[46]=w,t[47]=x,t[48]=T):T=t[48];let E;return t[49]!==g||t[50]!==l||t[51]!==m||t[52]!==T||t[53]!==_||t[54]!==b||t[55]!==u?(E=(0,Z.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":m,"data-collapsible":_,"data-variant":u,"data-side":l,"data-slot":`sidebar`,"data-dragging":g,children:[b,T]}),t[49]=g,t[50]=l,t[51]=m,t[52]=T,t[53]=_,t[54]=b,t[55]=u,t[56]=E):E=t[56],E}function oD(e){let t=(0,$.c)(21),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,onClick:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let{_:o}=i(),{toggleSidebar:s,state:c}=tD(),l=c===`expanded`,u;t[4]!==o||t[5]!==c?(u=o(c===`expanded`?{id:`w3vFfL`}:{id:`e8zRrb`}),t[4]=o,t[5]=c,t[6]=u):u=t[6];let d;t[7]===n?d=t[8]:(d=vi(n),t[7]=n,t[8]=d);let f;t[9]!==r||t[10]!==s?(f=e=>{r?.(e),s()},t[9]=r,t[10]=s,t[11]=f):f=t[11];let p;t[12]===c?p=t[13]:(p=c===`expanded`?(0,Z.jsx)(H,{}):(0,Z.jsx)(Ac,{}),t[12]=c,t[13]=p);let m;return t[14]!==a||t[15]!==l||t[16]!==u||t[17]!==d||t[18]!==f||t[19]!==p?(m=(0,Z.jsx)(Ti,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,"aria-expanded":l,"aria-controls":JE,"aria-label":u,className:d,onClick:f,...a,children:p}),t[14]=a,t[15]=l,t[16]=u,t[17]=d,t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function sD(e){let t=(0,$.c)(32),n,r,a,o,s;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5]):({className:n,enableDrag:o,enableToggle:s,onMouseDown:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s);let c=o===void 0?!0:o,l=s===void 0?!0:s,{_:u}=i(),{toggleSidebar:d,setWidth:f,state:p,width:m,setIsDraggingRail:h}=tD(),g=p===`collapsed`,_;t[6]!==c||t[7]!==l||t[8]!==h||t[9]!==f||t[10]!==g||t[11]!==d||t[12]!==m?(_={direction:`right`,enableDrag:c,enableToggle:l,onResize:f,onToggle:d,currentWidth:m,isCollapsed:g,minResizeWidth:YE,maxResizeWidth:XE,setIsDraggingRail:h,widthCookieName:ZE,widthCookieMaxAge:WE},t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=g,t[11]=d,t[12]=m,t[13]=_):_=t[13];let{dragRef:v,handleMouseDown:y}=VE(_),b;t[14]!==u||t[15]!==p?(b=u(p===`expanded`?{id:`w3vFfL`}:{id:`e8zRrb`}),t[14]=u,t[15]=p,t[16]=b):b=t[16];let x;t[17]!==y||t[18]!==r?(x=e=>{r?.(e),e.defaultPrevented||y(e)},t[17]=y,t[18]=r,t[19]=x):x=t[19];let S;t[20]!==u||t[21]!==p?(S=u(p===`expanded`?{id:`w3vFfL`}:{id:`e8zRrb`}),t[20]=u,t[21]=p,t[22]=S):S=t[22];let C;t[23]===n?C=t[24]:(C=vi(`absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,`md:group-data-[variant=inset]:after:inset-y-5`,n),t[23]=n,t[24]=C);let w;return t[25]!==v||t[26]!==a||t[27]!==b||t[28]!==x||t[29]!==S||t[30]!==C?(w=(0,Z.jsx)(`button`,{ref:v,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":b,tabIndex:-1,onMouseDown:x,title:S,className:C,...a}),t[25]=v,t[26]=a,t[27]=b,t[28]=x,t[29]=S,t[30]=C,t[31]=w):w=t[31],w}function cD(e){let t=(0,$.c)(21),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,onClick:i,onAnimationEnd:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{isMobile:o,openMobile:s,setOpenMobile:c,showPushPulse:l,setShowPushPulse:u}=tD(),d;t[5]!==o||t[6]!==i||t[7]!==s||t[8]!==c?(d=e=>{i?.(e),!e.defaultPrevented&&(!o||!s||e.target?.closest(`[data-sidebar="trigger"]`)||c(!1))},t[5]=o,t[6]=i,t[7]=s,t[8]=c,t[9]=d):d=t[9];let f=d,p;t[10]!==r||t[11]!==u?(p=e=>{r?.(e),e.animationName===`sidebar-push-pulse`&&u(!1)},t[10]=r,t[11]=u,t[12]=p):p=t[12];let m=p,h=l?``:void 0,g;t[13]===n?g=t[14]:(g=vi(`relative flex w-full flex-1 flex-col bg-background peer-data-[variant=inset]:m-2 peer-data-[variant=inset]:ml-0 peer-data-[variant=inset]:rounded-xl peer-data-[variant=inset]:shadow-sm peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,`transition-transform duration-200 ease-linear motion-reduce:transition-none`,`peer-data-[mobile=true]:peer-data-[state=expanded]:translate-x-(--sidebar-width)`,n),t[13]=n,t[14]=g);let _;return t[15]!==m||t[16]!==f||t[17]!==a||t[18]!==h||t[19]!==g?(_=(0,Z.jsx)(`main`,{"data-slot":`sidebar-inset`,"data-push-pulse":h,onClick:f,onAnimationEnd:m,className:g,...a}),t[15]=m,t[16]=f,t[17]=a,t[18]=h,t[19]=g,t[20]=_):_=t[20],_}function lD(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function uD(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function dD(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fD(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`flex w-full min-w-0 flex-col gap-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function pD(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var mD=Di(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-hover hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-hover active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-hover data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-active:hover:bg-sidebar-accent [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-hover hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-hover hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function hD(e){let t=(0,$.c)(28),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({asChild:i,isActive:a,variant:o,size:s,tooltip:c,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=i===void 0?!1:i,u=a===void 0?!1:a,d=o===void 0?`default`:o,f=s===void 0?`default`:s,p=l?bi:`button`,{isMobile:m,state:h}=tD(),g;t[8]!==n||t[9]!==f||t[10]!==d?(g=vi(mD({variant:d,size:f}),n),t[8]=n,t[9]=f,t[10]=d,t[11]=g):g=t[11];let _;t[12]!==p||t[13]!==u||t[14]!==r||t[15]!==f||t[16]!==g?(_=(0,Z.jsx)(p,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":f,"data-active":u,className:g,...r}),t[12]=p,t[13]=u,t[14]=r,t[15]=f,t[16]=g,t[17]=_):_=t[17];let v=_;if(!c)return v;if(typeof c==`string`){let e;t[18]===c?e=t[19]:(e={children:c},t[18]=c,t[19]=e),c=e}let y;t[20]===v?y=t[21]:(y=(0,Z.jsx)(Kn,{asChild:!0,children:v}),t[20]=v,t[21]=y);let b=h!==`collapsed`||m,x;t[22]!==b||t[23]!==c?(x=(0,Z.jsx)(wn,{side:`right`,align:`center`,hidden:b,...c}),t[22]=b,t[23]=c,t[24]=x):x=t[24];let S;return t[25]!==y||t[26]!==x?(S=(0,Z.jsxs)(Ir,{children:[y,x]}),t[25]=y,t[26]=x,t[27]=S):S=t[27],S}function gD(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.kind!==i.kind)return!1;if(r.kind===`human`&&i.kind===`human`){if(r.clientId!==i.clientId||r.mode!==i.mode||r.tabCount!==i.tabCount)return!1;let e=r.user,t=i.user;if(e.name!==t.name||e.color!==t.color||e.icon!==t.icon)return!1}else if(r.kind===`agent`&&i.kind===`agent`){if(r.agentId!==i.agentId)return!1;let e=r.presence,t=i.presence;if(e.displayName!==t.displayName||e.icon!==t.icon||e.color!==t.color||e.currentDoc!==t.currentDoc||e.mode!==t.mode)return!1}}return!0}function _D(e){let t=new Map;for(let n of e){let e=n.user.principalId;if(typeof e==`string`&&e.length>0){let r=t.get(e);r?r.push(n):t.set(e,[n])}}let n=new Map;for(let[e,r]of t){let t=r.reduce((e,t)=>Math.min(e,t.clientId),1/0);n.set(e,{repClientId:t,count:r.length})}let r=[];for(let t of e){let e=t.user.principalId;if(typeof e==`string`&&e.length>0){let i=n.get(e);i&&i.repClientId===t.clientId&&r.push({...t,tabCount:i.count})}else r.push({...t,tabCount:1})}return r}var vD=1e3,yD=!1;function bD(e){return!!(e.localPrincipalId&&e.entryPrincipalId===e.localPrincipalId||!e.localPrincipalId&&e.entryClientId===e.localClientId)}function xD(e,t,n){let r=(0,$.c)(9),i;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={current:[],crossDoc:[]},r[0]=i):i=r[0];let[a,o]=(0,Q.useState)(i),s;r[1]!==n||r[2]!==e?.awareness||r[3]!==t?.awareness?(s=()=>{let r=e?.awareness,i=t?.awareness,a;i==null?a=void 0:Bi(i)?a=i:(a=void 0,yD||(yD=!0,console.warn(`[agent-presence] __system__ provider awareness missing getStates() — presence bar will render without agent peers`)));let s=()=>{let e=(r?.getLocalState())?.user?.principalId??null,t=r?.clientID??null,i=[];if(r)for(let[n,a]of r.getStates().entries()){let r=a;if(!r.user||typeof r.user!=`object`)continue;let o=r.user;o.type===`human`&&(bD({entryPrincipalId:o.principalId,entryClientId:n,localPrincipalId:e,localClientId:t})||i.push({kind:`human`,clientId:n,user:o,mode:r.mode??`wysiwyg`,tabCount:1}))}let s=_D(i),{current:c,crossDoc:l}=a?Fi(a,n,Date.now()):{current:[],crossDoc:[]},u=SD,d=c.map(u),f=l.map(u),p=[...s,...d],m=f;o(e=>gD(e.current,p)&&gD(e.crossDoc,m)?e:{current:p,crossDoc:m})};s();let c=()=>s(),l=()=>s();r?.on(`change`,c),t?.awareness?.on(`change`,l);let u=setInterval(s,vD);return()=>{r?.off(`change`,c),t?.awareness?.off(`change`,l),clearInterval(u)}},r[1]=n,r[2]=e?.awareness,r[3]=t?.awareness,r[4]=s):s=r[4];let c;return r[5]!==n||r[6]!==e||r[7]!==t?(c=[e,t,n],r[5]=n,r[6]=e,r[7]=t,r[8]=c):c=r[8],(0,Q.useEffect)(s,c),a}function SD(e){let{agentId:t,entry:n}=e;return{kind:`agent`,agentId:t,presence:n}}var CD=`sync-status`;function wD(e,t){let n=(0,$.c)(5),{_:r}=i(),a=(0,Q.useRef)(!1),o=(0,Q.useRef)(!1),s=(0,Q.useRef)(t),c,l;n[0]!==r||n[1]!==t||n[2]!==e?(c=()=>{s.current!==t&&(s.current=t,a.current=!1,o.current=!1),t&&(e===`synced`&&(a.current=!0),e===`disconnected`&&a.current?(o.current=!0,Vo.warning(r({id:`HGNCsl`}),{id:CD,duration:1/0})):o.current&&e===`synced`&&(o.current=!1,Vo.success(r({id:`GhjUB_`}),{id:CD,duration:3e3})))},l=[e,t,r],n[0]=r,n[1]=t,n[2]=e,n[3]=c,n[4]=l):(c=n[3],l=n[4]),(0,Q.useEffect)(c,l)}var TD=4,ED=3,DD={Bird:Us,Cat:Ys,Dog:oc,Fish:dc,Mouse:Lc,Rabbit:Ic,Shrimp:Gc,Snail:Kc,Squirrel:Yc,Turtle:el};Object.freeze(Object.keys(DD));function OD(e){if(typeof e.principalId==`string`&&e.principalId.length>0)return{kind:`initials`};let t=e.name.split(` `)[1];return t&&Object.hasOwn(DD,t)?{kind:`animal`,animal:t}:{kind:`initials`}}var kD={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`,bot:`Agent`};function AD(e){let t=(0,$.c)(28),{user:n,mode:r,tabCount:a}=e,{_:o}=i(),s=OD(n),c=s.kind===`animal`?DD[s.animal]:void 0,l;t[0]===n.name?l=t[1]:(l=Pn(n.name),t[0]=n.name,t[1]=l);let u=l,d;t[2]===n.color?d=t[3]:(d=Pr(n.color),t[2]=n.color,t[3]=d);let f=d,p=n.name,m;t[4]!==o||t[5]!==a||t[6]!==p?(m=a>1?o({id:`qAhFeg`,values:{userName:p,tabCount:a}}):p,t[4]=o,t[5]=a,t[6]=p,t[7]=m):m=t[7];let h=m,g;t[8]!==o||t[9]!==a||t[10]!==p?(g=a>1?o({id:`BEkF-P`,values:{userName:p,tabCount:a}}):p,t[8]=o,t[9]=a,t[10]=p,t[11]=g):g=t[11];let _=g,v;t[12]===n.color?v=t[13]:(v={backgroundColor:n.color},t[12]=n.color,t[13]=v);let y;t[14]!==c||t[15]!==f||t[16]!==u?(y=c?(0,Z.jsx)(c,{size:18,color:f,strokeWidth:1.5}):(0,Z.jsx)(`span`,{className:`font-mono text-2xs font-semibold leading-none`,style:{color:f},children:u}),t[14]=c,t[15]=f,t[16]=u,t[17]=y):y=t[17];let b;t[18]!==_||t[19]!==r||t[20]!==v||t[21]!==y?(b=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(`div`,{"data-presence-badge":`human`,"data-presence-mode":r,role:`img`,"aria-label":_,className:`inline-flex size-7 shrink-0 cursor-default items-center justify-center rounded-full ring-2 ring-background`,style:v,children:y})}),t[18]=_,t[19]=r,t[20]=v,t[21]=y,t[22]=b):b=t[22];let x;t[23]===h?x=t[24]:(x=(0,Z.jsx)(wn,{children:h}),t[23]=h,t[24]=x);let S;return t[25]!==b||t[26]!==x?(S=(0,Z.jsxs)(Ir,{children:[b,x]}),t[25]=b,t[26]=x,t[27]=S):S=t[27],S}function jD(e){let t=kD[e.icon];return e.displayName||t||X._({id:`iEQQyu`})}function MD(e){let t=(0,$.c)(3),[n,r]=(0,Q.useState)(e===`writing`),i=(0,Q.useRef)(null),a,o;return t[0]===e?(a=t[1],o=t[2]):(a=()=>{if(e===`writing`){i.current!==null&&(clearTimeout(i.current),i.current=null),r(!0);return}return i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,r(!1)},600),()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)}},o=[e],t[0]=e,t[1]=a,t[2]=o),(0,Q.useEffect)(a,o),n}function ND(e){let t=(0,$.c)(34),{participant:n,crossDoc:r,scoped:a,onClickAgent:o}=e,{_:c}=i(),{presence:l,agentId:u}=n,d=jD(l),f=MD(l.mode),p=!r&&f,m=a?`ring-primary ring-offset-2 ring-offset-background`:`ring-background`,h=p&&!a?`ring-primary/40 animate-pulse`:``,g;t[0]!==m||t[1]!==h?(g=[`inline-flex size-7 shrink-0 items-center justify-center rounded-full ring-2 cursor-pointer`,m,h].filter(Boolean),t[0]=m,t[1]=h,t[2]=g):g=t[2];let _=g.join(` `),v=r?`true`:void 0,y=a?`true`:void 0,b;t[3]!==l.mode||t[4]!==v||t[5]!==y?(b={"data-presence-badge":`agent`,"data-presence-mode":l.mode,"data-presence-crossdoc":v,"data-presence-scoped":y},t[3]=l.mode,t[4]=v,t[5]=y,t[6]=b):b=t[6];let x=b,S=l.currentDoc&&l.currentDoc!==`(connected)`?l.currentDoc:null,C=c(r&&S?{id:`b4AQFK`,values:{tooltipName:d,realCurrentDoc:S}}:{id:`RfHNf8`,values:{tooltipName:d}}),w;t[7]===l.color?w=t[8]:(w={backgroundColor:l.color},t[7]=l.color,t[8]=w);let T;t[9]!==u||t[10]!==o?(T=()=>o(u),t[9]=u,t[10]=o,t[11]=T):T=t[11];let E;t[12]===l.icon?E=t[13]:(E=(0,Z.jsx)(Ri,{icon:l.icon,width:16,height:16,className:`text-white`}),t[12]=l.icon,t[13]=E);let D;t[14]!==C||t[15]!==x||t[16]!==_||t[17]!==w||t[18]!==T||t[19]!==E?(D=(0,Z.jsx)(`button`,{type:`button`,...x,"aria-label":C,className:_,style:w,onClick:T,children:E}),t[14]=C,t[15]=x,t[16]=_,t[17]=w,t[18]=T,t[19]=E,t[20]=D):D=t[20];let O=D,k;t[21]===O?k=t[22]:(k=(0,Z.jsx)(Kn,{asChild:!0,children:O}),t[21]=O,t[22]=k);let A;t[23]===d?A=t[24]:(A=(0,Z.jsx)(`span`,{className:`font-medium`,children:d}),t[23]=d,t[24]=A);let j;t[25]!==r||t[26]!==S?(j=r&&S?(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(s,{id:`Wh0im4`,values:{realCurrentDoc:S}})}):null,t[25]=r,t[26]=S,t[27]=j):j=t[27];let M;t[28]!==A||t[29]!==j?(M=(0,Z.jsxs)(wn,{className:`flex flex-col gap-0.5`,children:[A,j]}),t[28]=A,t[29]=j,t[30]=M):M=t[30];let N;return t[31]!==k||t[32]!==M?(N=(0,Z.jsxs)(Ir,{children:[k,M]}),t[31]=k,t[32]=M,t[33]=N):N=t[33],N}function PD(e){let t=(0,$.c)(21),{count:n,remainder:r,crossDoc:i,scopedAgentId:a,onClickAgent:o}=e,s;t[0]!==n||t[1]!==i?(s=i?X._({id:`9euN0m`,values:{count:n}}):X._({id:`uhJEA2`,values:{count:n}}),t[0]=n,t[1]=i,t[2]=s):s=t[2];let c=s,l=i?`true`:void 0,u;t[3]!==n||t[4]!==c||t[5]!==l?(u=(0,Z.jsx)(Lt,{asChild:!0,children:(0,Z.jsxs)(`button`,{type:`button`,"data-slot":`presence-overflow`,"data-presence-crossdoc":l,className:`inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full bg-muted font-medium text-muted-foreground text-xs ring-2 ring-background hover:bg-muted/80`,"aria-label":c,children:[`+`,n]})}),t[3]=n,t[4]=c,t[5]=l,t[6]=u):u=t[6];let d;if(t[7]!==i||t[8]!==o||t[9]!==r||t[10]!==a){let e;t[12]!==i||t[13]!==o||t[14]!==a?(e=e=>e.kind===`human`?(0,Z.jsx)(AD,{user:e.user,mode:e.mode,tabCount:e.tabCount},e.clientId):(0,Z.jsx)(ND,{participant:e,crossDoc:i,scoped:a===e.agentId,onClickAgent:o},e.agentId),t[12]=i,t[13]=o,t[14]=a,t[15]=e):e=t[15],d=r.map(e),t[7]=i,t[8]=o,t[9]=r,t[10]=a,t[11]=d}else d=t[11];let f;t[16]===d?f=t[17]:(f=(0,Z.jsx)(Fe,{align:`end`,className:`w-auto max-w-xs p-2`,children:(0,Z.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:d})}),t[16]=d,t[17]=f);let p;return t[18]!==u||t[19]!==f?(p=(0,Z.jsxs)(jt,{children:[u,f]}),t[18]=u,t[19]=f,t[20]=p):p=t[20],p}function FD(e,t,n,r){return e.kind===`human`?(0,Z.jsx)(AD,{user:e.user,mode:e.mode,tabCount:e.tabCount},e.clientId):(0,Z.jsx)(ND,{participant:e,crossDoc:n,scoped:r===e.agentId,onClickAgent:t},e.agentId)}function ID(){let e=(0,$.c)(20),{activeProvider:t,activeDocName:n,systemProvider:r,openActivityPanel:i,docPanelMode:a,docPanelAgentId:o}=lt(),{current:s,crossDoc:c}=xD(t,r,n);if(wD(cS(t),n),s.length===0&&c.length===0)return null;let l;if(e[0]!==c||e[1]!==s||e[2]!==o||e[3]!==a||e[4]!==i){let t=s.slice(0,TD),n;e[6]===s?n=e[7]:(n=s.slice(TD),e[6]=s,e[7]=n);let r=n,u=c.slice(0,ED),d;e[8]===c?d=e[9]:(d=c.slice(ED),e[8]=c,e[9]=d);let f=d,p=i,m=a===`agent`?o:null,h;e[10]!==p||e[11]!==m?(h=e=>FD(e,p,!1,m),e[10]=p,e[11]=m,e[12]=h):h=e[12];let g=t.map(h),_;e[13]!==r||e[14]!==p||e[15]!==m?(_=r.length>0?(0,Z.jsx)(PD,{count:r.length,remainder:r,crossDoc:!1,scopedAgentId:m,onClickAgent:p}):null,e[13]=r,e[14]=p,e[15]=m,e[16]=_):_=e[16];let v;e[17]!==g||e[18]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,"data-presence-section":`current`,children:[g,_]}),e[17]=g,e[18]=_,e[19]=v):v=e[19],l=(0,Z.jsxs)(`div`,{"data-slot":`presence-bar`,className:`flex items-center px-1 py-1.5`,children:[v,c.length>0?(0,Z.jsxs)(`div`,{className:`ml-1.5 flex items-center gap-1.5`,"data-presence-section":`crossdoc`,children:[u.map(e=>FD(e,p,!0,m)),f.length>0?(0,Z.jsx)(PD,{count:f.length,remainder:f,crossDoc:!0,scopedAgentId:m,onClickAgent:p}):null]}):null]}),e[0]=c,e[1]=s,e[2]=o,e[3]=a,e[4]=i,e[5]=l}else l=e[5];return l}var LD=`.md`,RD=/\.(md|mdx)$/i;function zD(e,t=LD){return`${e}${t}`}function BD(e){return iO(e).replace(RD,``)}function VD(e){return Mn(e)?WD(e.path):ar(e)?e.path:zD(e.docName,e.docExt)}function HD(e){let t=iO(e).match(RD);return t?`.${t[1].toLowerCase()}`:void 0}function UD(e){return iO(e)}function WD(e){let t=iO(e.trim());return t?`${t}/`:``}function GD(e){return e.endsWith(`/`)?UD(e):BD(e)}function KD(e){return e.map(VD)}function qD(e){return[...e].sort().join(`\0`)}function JD(e){return qD(KD(e))}function YD(e){let t=new Set;for(let n of e){if(Mn(n)){let e=WD(n.path);e&&t.add(e)}let e=(Mn(n)||ar(n)?n.path:n.docName).split(`/`).filter(Boolean),r=Mn(n)?e.length:e.length-1;for(let n=1;n<=r;n++)t.add(`${e.slice(0,n).join(`/`)}/`)}return[...t].sort()}function XD(e){if(!e)return[];let t=iO(e.replace(RD,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function ZD(e){let t=e.kind===`directory`,n=t?UD(e.path):BD(e.path),r=t?void 0:HD(e.path);return{kind:t?`folder`:`file`,name:iO(rO(e.path)).replace(RD,``),path:n,treePath:$D(e.path,t),docExt:r}}function QD(e){return e.kind===`directory`?UD(e.path):e.path}function $D(e,t){return t?WD(e):RD.test(e)?e:`${e}${LD}`}function eO(e,t,n){let r=WD(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${LD}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function tO(e,t){return e===`file`?$D(t,!1):`${UD(t)}/index${LD}`}function nO(e,t){return t.kind===`root`||t.directoryPath==null?rO(e):`${t.directoryPath}${rO(e)}`}function rO(e){let t=iO(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function iO(e){return e.endsWith(`/`)?e.slice(0,-1):e}function aO(e,t){return t.trim()}function oO(e){return![``,`.`,`..`].includes(e)&&!e.includes(`/`)&&!e.includes(`\\`)&&!e.includes(`\0`)}function sO(e,t){let n=aO(e.kind,t),r=e.path.split(`/`);return r[r.length-1]=n,r.join(`/`)}function cO(e,t,n=[]){if(t.length===0&&n.length===0)return e;let r=new Map(t.map(e=>[e.fromDocName,e.toDocName]));return e.map(e=>Nn(e)?{...e,docName:r.get(e.docName)??e.docName}:Mn(e)||ar(e)?{...e,path:mO(e.path,n)}:e)}function lO(e,t,n){if(t.length===0&&!n)return e;let r=new Set(t);return e.filter(e=>Nn(e)?!r.has(e.docName)&&!vO(e.docName,n):Mn(e)||ar(e)?!vO(e.path,n):!0)}function uO(e,t,n,r=new Date().toISOString()){let i=!1,a=[...e],o=e=>{a.some(t=>hO(t,e))||(a.push(e),i=!0)};if(n.kind===`file`){let s=e.find(e=>Nn(e)&&e.docName===t.path);return o({kind:`document`,docName:n.path,docExt:s?.docExt??t.docExt,size:s?.size??0,modified:r}),i?a:e}let s=e.find(e=>Mn(e)&&e.path===t.path);o({kind:`folder`,path:n.path,size:s?.size??0,modified:r});let c=new Set(n.duplicatedDocNames);for(let i of e){if(Nn(i)){let e=_O(i.docName,t.path,n.path);e&&c.has(e)&&o({...i,docName:e,modified:r});continue}if(Mn(i)){let e=gO(i.path,t.path,n.path);e&&o({...i,path:e,modified:r})}}return i?a:e}function dO(e,t){return e?t.find(t=>t.fromDocName===e)?.toDocName??e:null}function fO(e,t){return e.flatMap(e=>t===e.toDocName?[e.fromDocName]:[e.fromDocName,e.toDocName])}function pO(e,t){let n=e.kind===`folder`||e.docExt===void 0?e.path:zD(e.path,e.docExt);return Gm(t.contentDir,n,t.pathSeparator)}function mO(e,t){for(let{fromPath:n,toPath:r}of t){if(e===n)return r;if(e.startsWith(`${n}/`))return`${r}${e.slice(n.length)}`}return e}function hO(e,t){return Nn(e)&&Nn(t)?e.docName===t.docName:Mn(e)&&Mn(t)||ar(e)&&ar(t)?e.path===t.path:!1}function gO(e,t,n){return e===t?n:_O(e,t,n)}function _O(e,t,n){return e.startsWith(`${t}/`)?`${n}${e.slice(t.length)}`:null}function vO(e,t){return!!t&&(e===t||e.startsWith(`${t}/`))}function yO(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(fu,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function bO(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(pu,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xO(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(bu,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function SO(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(mu,{children:(0,Z.jsx)(hu,{"data-slot":`context-menu-content`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function CO(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=vi(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Z.jsx)(gu,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function wO(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=vi(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(Ho,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Z.jsxs)(xu,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function TO(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(Su,{"data-slot":`context-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function EO(e){let t=(0,$.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,inset:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===i?s=t[7]:(s=vi(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,Z.jsx)(vu,{children:(0,Z.jsx)(To,{})})}),t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==r||t[11]!==a||t[12]!==o||t[13]!==s?(l=(0,Z.jsxs)(_u,{"data-slot":`context-menu-checkbox-item`,"data-inset":a,className:s,checked:n,...o,children:[c,r]}),t[9]=n,t[10]=r,t[11]=a,t[12]=o,t[13]=s,t[14]=l):l=t[14],l}function DO(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=vi(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(yu,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var OO=[`.md`,`.mdx`],kO=`group relative -mb-px flex h-10 min-w-28 max-w-64 shrink-0 cursor-pointer items-center overflow-hidden border border-transparent font-medium transition-colors`,AO=`z-10 rounded-t-lg rounded-b-none border-border border-b-0 bg-background text-foreground`,jO=vi(AO,`bg-transparent hover:bg-muted focus-visible:bg-muted border-transparent hover:border-border focus-visible:border-border`),MO=`flex h-full min-w-0 flex-1 cursor-pointer items-center overflow-hidden px-3 text-left text-[13px] outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,NO=`mr-1.5 flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none transition hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:opacity-100`;function PO(e){return vi(NO,e?`opacity-100`:`pointer-events-none opacity-0 group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100`)}function FO(e){return e.replace(/[^A-Za-z0-9_-]/g,`-`)}function IO(e){let t=ni(e);window.location.hash!==t&&(window.location.hash=t)}function LO(e){Math.abs(e.deltaX)>=Math.abs(e.deltaY)||e.currentTarget.scrollWidth<=e.currentTarget.clientWidth||(e.preventDefault(),e.currentTarget.scrollLeft+=e.deltaY)}function RO(e,t){let n=[t,...OO].filter((e,t,n)=>e&&n.indexOf(e)===t),r=e.toLowerCase(),i=n.find(t=>e.length>t.length&&r.endsWith(t.toLowerCase()));return i?e.slice(0,-i.length):e}function zO(e){let t=(0,$.c)(26),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({tabId:o,disabled:n,ref:r,style:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]!==n||t[7]!==o?(s={id:o,disabled:n},t[6]=n,t[7]=o,t[8]=s):s=t[8];let{attributes:c,listeners:l,setNodeRef:u,transform:d,transition:f,isDragging:p}=ma(s),m;t[9]===d?m=t[10]:(m=na.Transform.toString(d),t[9]=d,t[10]=m);let h=p?.5:i?.opacity,g=p?1:i?.zIndex,_;t[11]!==i||t[12]!==m||t[13]!==h||t[14]!==g||t[15]!==f?(_={...i,transform:m,transition:f,opacity:h,zIndex:g},t[11]=i,t[12]=m,t[13]=h,t[14]=g,t[15]=f,t[16]=_):_=t[16];let v=_,y;t[17]!==r||t[18]!==u?(y=function(e){u(e),typeof r==`function`?r(e):r&&`current`in r&&(r.current=e)},t[17]=r,t[18]=u,t[19]=y):y=t[19];let b=y,x;return t[20]!==c||t[21]!==b||t[22]!==l||t[23]!==a||t[24]!==v?(x=(0,Z.jsx)(`div`,{ref:b,style:v,...a,...c,...l}),t[20]=c,t[21]=b,t[22]=l,t[23]=a,t[24]=v,t[25]=x):x=t[25],x}function BO(e){let t=(0,$.c)(52),{children:n,closeTab:r,closeTabs:i,canPin:a,disabled:o,openTabs:c,pinTab:l,pinnedTabIds:u,tabId:d,unpinTab:f}=e,p=a===void 0?!0:a;if(o!==void 0&&o)return n;let m;t[0]!==p||t[1]!==u||t[2]!==d?(m=p&&u.includes(d),t[0]=p,t[1]=u,t[2]=d,t[3]=m):m=t[3];let h=m,g;if(t[4]!==c||t[5]!==u||t[6]!==d){let e;t[8]===d?e=t[9]:(e=e=>e!==d,t[8]=d,t[9]=e),g=Re(c.filter(e),u),t[4]=c,t[5]=u,t[6]=d,t[7]=g}else g=t[7];let _=g,v;t[10]!==c||t[11]!==u?(v=Re(c,u),t[10]=c,t[11]=u,t[12]=v):v=t[12];let y=v,b;t[13]===n?b=t[14]:(b=(0,Z.jsx)(bO,{asChild:!0,children:n}),t[13]=n,t[14]=b);let x;t[15]!==r||t[16]!==d?(x=()=>r(d),t[15]=r,t[16]=d,t[17]=x):x=t[17];let S;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(s,{id:`yz7wBu`}),t[18]=S):S=t[18];let C;t[19]!==h||t[20]!==x?(C=(0,Z.jsx)(CO,{disabled:h,onSelect:x,children:S}),t[19]=h,t[20]=x,t[21]=C):C=t[21];let w=_.length===0,T;t[22]!==i||t[23]!==_?(T=()=>{i(_)},t[22]=i,t[23]=_,t[24]=T):T=t[24];let E;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(s,{id:`omXJcU`}),t[25]=E):E=t[25];let D;t[26]!==w||t[27]!==T?(D=(0,Z.jsx)(CO,{disabled:w,onSelect:T,children:E}),t[26]=w,t[27]=T,t[28]=D):D=t[28];let O=y.length===0,k;t[29]!==y||t[30]!==i?(k=()=>{i(y)},t[29]=y,t[30]=i,t[31]=k):k=t[31];let A;t[32]===u.length?A=t[33]:(A=u.length?(0,Z.jsx)(s,{id:`U2Kx6T`}):(0,Z.jsx)(s,{id:`WyXG7w`}),t[32]=u.length,t[33]=A);let j;t[34]!==O||t[35]!==k||t[36]!==A?(j=(0,Z.jsx)(CO,{disabled:O,"data-testid":`editor-tab-context-close-all`,onSelect:k,children:A}),t[34]=O,t[35]=k,t[36]=A,t[37]=j):j=t[37];let M;t[38]!==p||t[39]!==h||t[40]!==l||t[41]!==d||t[42]!==f?(M=p&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(DO,{}),(0,Z.jsx)(CO,{"data-testid":`editor-tab-context-pin-toggle`,onSelect:()=>h?f(d):l(d),children:h?(0,Z.jsx)(s,{id:`SYfHmN`}):(0,Z.jsx)(s,{id:`3pU8e-`})})]}),t[38]=p,t[39]=h,t[40]=l,t[41]=d,t[42]=f,t[43]=M):M=t[43];let N;t[44]!==D||t[45]!==j||t[46]!==M||t[47]!==C?(N=(0,Z.jsxs)(SO,{className:`min-w-40`,children:[C,D,j,M]}),t[44]=D,t[45]=j,t[46]=M,t[47]=C,t[48]=N):N=t[48];let P;return t[49]!==N||t[50]!==b?(P=(0,Z.jsxs)(yO,{children:[b,N]}),t[49]=N,t[50]=b,t[51]=P):P=t[51],P}function VO(e){let t=(0,$.c)(20),{accessibleLabel:n,closeTab:r,isPinned:a,tabId:o,unpinTab:s}=e,{_:c}=i();if(a){let e;t[0]!==c||t[1]!==n?(e=c({id:`t18QYR`,values:{accessibleLabel:n}}),t[0]=c,t[1]=n,t[2]=e):e=t[2];let r;t[3]!==o||t[4]!==s?(r=e=>{e.stopPropagation(),s(o)},t[3]=o,t[4]=s,t[5]=r):r=t[5];let i;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(Fc,{"aria-hidden":`true`}),t[6]=i):i=t[6];let a;return t[7]!==e||t[8]!==r?(a=(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-xs`,type:`button`,"aria-label":e,"data-testid":`editor-tab-unpin-button`,className:`mr-1.5 text-primary! hover:bg-primary/10!`,onClick:r,children:i}),t[7]=e,t[8]=r,t[9]=a):a=t[9],a}let l;t[10]!==c||t[11]!==n?(l=c({id:`JLzQi_`,values:{accessibleLabel:n}}),t[10]=c,t[11]=n,t[12]=l):l=t[12];let u;t[13]!==r||t[14]!==o?(u=e=>{e.stopPropagation(),r(o)},t[13]=r,t[14]=o,t[15]=u):u=t[15];let d;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Eo,{"aria-hidden":`true`}),t[16]=d):d=t[16];let f;return t[17]!==l||t[18]!==u?(f=(0,Z.jsx)(Ti,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":l,"data-testid":`editor-tab-close-button`,className:`mr-1.5`,onClick:u,children:d}),t[17]=l,t[18]=u,t[19]=f):f=t[19],f}function HO(e){let t=(0,$.c)(1),{docName:n}=e;if(sS(n)!==`conflict`)return null;let r;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(pi,{"aria-label":`Conflict`,"data-testid":`editor-tab-conflict-badge`,className:`mr-1 size-3.5 shrink-0 text-amber-500`}),t[0]=r):r=t[0],r}function UO(){let e=(0,$.c)(69),{activeDocName:t,activeTabId:n,activeNewTabId:r,activeTarget:a,activateTab:o,activateNewTab:c,closeAndClearForRename:l,closeNewTab:u,closeTab:d,closeTabs:p,getPoolActiveDocName:m,isNewTabActive:h,newTabIds:g,openNewTab:_,openTabs:v,pinTab:y,pinnedTabIds:b,remapTabsForRename:x,reorderTabs:S,unpinTab:C,visibleTabIds:w}=lt(),{_:T}=i(),{pageMeta:E}=ii(),D=(0,Q.useRef)(null),[O,k]=(0,Q.useState)(null),[A,j]=(0,Q.useState)(``),[N,P]=(0,Q.useState)(null),[F,I]=(0,Q.useState)(!1),L=(0,Q.useRef)(null),R=(0,Q.useRef)(!1),z=(0,Q.useRef)(!1),B=(0,Q.useRef)(null),H=(0,Q.useRef)(t),U;e[0]!==n||e[1]!==t||e[2]!==a?(U=n??(a?Ge(a):t?Et(t):null),e[0]=n,e[1]=t,e[2]=a,e[3]=U):U=e[3];let W=U,G;e[4]!==r||e[5]!==W||e[6]!==h||e[7]!==g||e[8]!==v?(G=h?`${r??`__new-tab__`}\u0000${v.join(`\0`)}\u0000${g.join(`\0`)}`:W?`${W}\u0000${v.join(`\0`)}`:``,e[4]=r,e[5]=W,e[6]=h,e[7]=g,e[8]=v,e[9]=G):G=e[9];let K=G,ee,q;e[10]===t?(ee=e[11],q=e[12]):(ee=()=>{H.current=t},q=[t],e[10]=t,e[11]=ee,e[12]=q),(0,Q.useEffect)(ee,q);let te,ne;e[13]===K?(te=e[14],ne=e[15]):(te=()=>{K&&(D.current?.querySelector(`[data-active-tab="true"]`))?.scrollIntoView({block:`nearest`,inline:`nearest`})},ne=[K],e[13]=K,e[14]=te,e[15]=ne),(0,Q.useEffect)(te,ne);let re,ie;e[16]===O?(re=e[17],ie=e[18]):(re=()=>{O&&(L.current?.focus(),L.current?.select())},ie=[O],e[16]=O,e[17]=re,e[18]=ie),(0,Q.useEffect)(re,ie);let ae,oe;e[19]!==v||e[20]!==O?(ae=()=>{!O||v.includes(O.tabId)||(z.current=!0,B.current=null,k(null),j(``),P(null),I(!1))},oe=[v,O],e[19]=v,e[20]=O,e[21]=ae,e[22]=oe):(ae=e[21],oe=e[22]),(0,Q.useEffect)(ae,oe);let se=function(e,t){let n=t.split(`/`);z.current=!1,B.current=null,k({docName:t,tabId:e}),j(n[n.length-1]),P(null)},ce=function(){z.current=!0,B.current=null,k(null),j(``),P(null),I(!1)},le=async function(){if(z.current){z.current=!1;return}if(R.current)return;let e=O?.docName;if(!e){ce();return}let t=aO(`file`,RO(A,E.get(e)?.docExt??`.md`)),n=e.split(`/`),r=n[n.length-1];if(t===r){ce();return}if(t===B.current){L.current?.focus();return}if(!oO(t)){P(T({id:`P8yDjG`})),L.current?.focus();return}let i=sO({kind:`file`,path:e,name:r},t);R.current=!0,I(!0),P(null);try{let n=await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:`file`,fromPath:e,toPath:i})});if(z.current){I(!1),R.current=!1;return}let r=await M(n,`Server error (HTTP ${n.status})`);if(!r.ok){P(r.title),I(!1),R.current=!1,B.current=t,L.current?.focus();return}let a=V(Zr,r.body,`rename-path:tab`,{renamed:[]}).renamed,o=H.current,s=dO(o,a);ct(a);let c=!0;try{let e=fO(a,m());await Promise.all(e.map(e=>l(e))),x(a),yr([`files`,`backlinks`,`graph`])}catch(n){let r=n;c=!1,console.warn(`[EditorTabs] post-rename reconciliation failed`,{err:r,docName:e,newDocName:i,normalized:t}),Vo.error(T({id:`MUBR8r`}))}z.current=!0,k(null),j(``),P(null),I(!1),R.current=!1,B.current=null,c&&s&&s!==o&&IO(s)}catch(n){console.warn(`[EditorTabs] rename failed`,{err:n,docName:e,newDocName:i,normalized:t}),P(T({id:`HIb0vl`})),I(!1),R.current=!1,B.current=t,L.current?.focus()}},J=typeof window<`u`&&window.okDesktop!=null,ue;e[23]===g?ue=e[24]:(ue=new Set(g),e[23]=g,e[24]=ue);let de=ue,fe;e[25]!==u||e[26]!==p||e[27]!==de?(fe=function(e){let t=[],n=[];for(let r of e)de.has(r)?n.push(r):t.push(r);t.length>0&&p(t);for(let e of n)u(e)},e[25]=u,e[26]=p,e[27]=de,e[28]=fe):fe=e[28];let pe=fe,me;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(me={activationConstraint:{distance:8}},e[29]=me):me=e[29];let he;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(he={coordinateGetter:ua},e[30]=he):he=e[30];let ge=wa(Gi(_a,me),Gi(sa,he)),_e;e[31]!==S||e[32]!==w?(_e=function(e){let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let r=w.indexOf(t),i=w.indexOf(n);r<0||i<0||r===i||S(Wa([...w],r,i),t)},e[31]=S,e[32]=w,e[33]=_e):_e=e[33];let ve=_e,ye=J?``:void 0,be;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(be=vi(`pl-2 flex h-12 min-w-0 touch-manipulation flex-1 items-end overflow-x-auto overflow-y-hidden overscroll-x-contain scroll-fade-mask-x [scrollbar-width:none]`,J&&`[-webkit-app-region:drag]`),e[34]=be):be=e[34];let xe=LO,Se;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(Se=vi(`flex items-end gap-1`,J&&`[-webkit-app-region:no-drag]`),e[35]=Se):Se=e[35];let Ce=ra,we=yo,Te;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(Te={container:typeof document<`u`?document.body:void 0},e[36]=Te):Te=e[36];let Ee=Ui,De;e[37]===w?De=e[38]:(De=[...w],e[37]=w,e[38]=De);let Oe=ca,ke=w.map(e=>{if(de.has(e)){let t=e===r;return(0,Z.jsx)(BO,{tabId:e,canPin:!1,openTabs:w,closeTab:u,closeTabs:pe,pinTab:y,pinnedTabIds:b,unpinTab:C,children:(0,Z.jsxs)(zO,{tabId:e,"aria-current":t?`page`:void 0,"data-active-tab":t?`true`:void 0,className:vi(kO,t?AO:jO),onAuxClick:t=>{t.button===1&&(t.preventDefault(),u(e))},onClick:t=>{t.target===t.currentTarget&&c(e)},children:[(0,Z.jsx)(`button`,{type:`button`,"aria-label":T({id:`zLak8b`}),"data-testid":`editor-new-tab-placeholder-button`,className:MO,onClick:()=>c(e),children:(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,Z.jsx)(s,{id:`3YvS-c`})})}),(0,Z.jsx)(`button`,{type:`button`,"aria-label":T({id:`xCdTnb`}),"data-testid":`editor-new-tab-placeholder-close`,className:PO(t),onClick:t=>{t.stopPropagation(),u(e)},children:(0,Z.jsx)(Eo,{"aria-hidden":`true`,className:`size-3.5`})})]})},e)}let t=At(e),n=e===W,i=b.includes(e);if(t.kind===`folder`){let{baseName:r,label:a,prefix:s}=_t(t.folderPath,`/`),c=`${s}${a}`;return(0,Z.jsx)(BO,{tabId:e,openTabs:w,closeTab:d,closeTabs:pe,pinTab:y,pinnedTabIds:b,unpinTab:C,children:(0,Z.jsxs)(zO,{tabId:e,"aria-current":n?`page`:void 0,"data-active-tab":n?`true`:void 0,className:vi(kO,n?AO:jO),onAuxClick:t=>{t.button===1&&(t.preventDefault(),!i&&d(e))},onClick:t=>{t.target===t.currentTarget&&o(e)},children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-label":c,className:MO,onClick:()=>{o(e)},children:[s&&(0,Z.jsx)(`span`,{className:vi(`min-w-0 flex-1 truncate`,n&&`text-muted-foreground`),children:s}),(0,Z.jsxs)(`span`,{className:vi(`flex min-w-0 items-center`,s?`max-w-[70%] shrink-0`:`flex-1`),children:[(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:r}),(0,Z.jsx)(`span`,{className:`shrink-0`,children:`/`})]})]}),(0,Z.jsx)(VO,{accessibleLabel:c,closeTab:d,isPinned:i,tabId:e,unpinTab:C})]})},e)}if(t.kind===`asset`){let{baseName:r,label:a,prefix:s}=_t(t.assetPath,``),c=`${s}${a}`;return(0,Z.jsx)(BO,{tabId:e,openTabs:w,closeTab:d,closeTabs:pe,pinTab:y,pinnedTabIds:b,unpinTab:C,children:(0,Z.jsxs)(zO,{tabId:e,"aria-current":n?`page`:void 0,"data-active-tab":n?`true`:void 0,className:vi(kO,n?AO:jO),onAuxClick:t=>{t.button===1&&(t.preventDefault(),!i&&d(e))},onClick:t=>{t.target===t.currentTarget&&o(e)},children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-label":c,className:MO,onClick:()=>{o(e)},children:[s?(0,Z.jsx)(`span`,{className:vi(`min-w-0 flex-1 truncate text-muted-foreground/60`,n&&`text-muted-foreground`),children:s}):null,(0,Z.jsx)(`span`,{className:vi(`min-w-0 truncate`,s?`max-w-[70%] shrink-0`:`flex-1`),children:r})]}),(0,Z.jsx)(VO,{accessibleLabel:c,closeTab:d,isPinned:i,tabId:e,unpinTab:C})]})},e)}let a=t.docName,l=E.get(a)?.docExt??`.md`,{baseName:f,extension:p,label:m,prefix:h}=_t(a,l),g=`${h}${m}`,_=l===`.md`||l===`.mdx`,v=O?.tabId===e,x=`editor-tab-rename-error-${FO(a)}`;return(0,Z.jsx)(BO,{disabled:v,tabId:e,openTabs:w,closeTab:d,closeTabs:pe,pinTab:y,pinnedTabIds:b,unpinTab:C,children:(0,Z.jsx)(zO,{tabId:e,disabled:v,"aria-current":n?`page`:void 0,"data-active-tab":n?`true`:void 0,className:vi(kO,n?AO:jO,v&&N&&`border-destructive`),onAuxClick:t=>{t.button===1&&(t.preventDefault(),!i&&d(e))},onClick:t=>{t.target===t.currentTarget&&o(e)},children:v?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(yx,{className:`h-full min-w-0 flex-1 rounded-none border-0 bg-transparent dark:bg-transparent`,children:[(0,Z.jsx)(wx,{ref:L,value:A,disabled:F,"aria-label":T({id:`Dw1T_W`,values:{label:m}}),"data-testid":`editor-tab-rename-input`,"aria-invalid":N?!0:void 0,"aria-describedby":N?x:void 0,"aria-busy":F||void 0,title:N??a,className:`h-full min-w-0 px-2 py-0 font-medium text-foreground text-xs selection:bg-primary selection:text-primary-foreground`,onChange:e=>{j(RO(e.target.value,l)),P(null),B.current=null},onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),le()):e.key===`Escape`&&(e.preventDefault(),ce())},onBlur:le}),(0,Z.jsx)(xx,{align:`inline-end`,"aria-hidden":`true`,className:`pr-2 text-xs`,children:(0,Z.jsx)(Cx,{className:`text-muted-foreground/60 text-xs`,children:l})})]}),N?(0,Z.jsx)(`span`,{id:x,role:`alert`,className:`sr-only`,children:N}):null]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-label":g,title:g,className:MO,onClick:()=>{o(e)},onDoubleClick:t=>{t.preventDefault(),t.stopPropagation(),se(e,a)},children:[(0,Z.jsx)(HO,{docName:a}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center`,children:[(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:f}),!_&&(0,Z.jsx)(`span`,{className:`shrink-0`,children:p})]})]}),(0,Z.jsx)(VO,{accessibleLabel:g,closeTab:d,isPinned:i,tabId:e,unpinTab:C})]})})},e)}),Ae;e[39]!==Ee||e[40]!==De||e[41]!==Oe||e[42]!==ke?(Ae=(0,Z.jsx)(Ee,{items:De,strategy:Oe,children:ke}),e[39]=Ee,e[40]=De,e[41]=Oe,e[42]=ke,e[43]=Ae):Ae=e[43];let je;e[44]!==Ce||e[45]!==ve||e[46]!==ge||e[47]!==we||e[48]!==Te||e[49]!==Ae?(je=(0,Z.jsx)(Ce,{sensors:ge,collisionDetection:we,onDragEnd:ve,accessibility:Te,children:Ae}),e[44]=Ce,e[45]=ve,e[46]=ge,e[47]=we,e[48]=Te,e[49]=Ae,e[50]=je):je=e[50];let Me;e[51]===T?Me=e[52]:(Me=T({id:`3YvS-c`}),e[51]=T,e[52]=Me);let Ne;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,Z.jsx)(f,{"aria-hidden":`true`}),e[53]=Ne):Ne=e[53];let Pe;e[54]!==_||e[55]!==Me?(Pe=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{type:`button`,size:`icon-xs`,variant:`ghost`,"aria-label":Me,"data-testid":`editor-new-tab-button`,className:`first:mb-3 mb-1.5`,onClick:_,children:Ne})}),e[54]=_,e[55]=Me,e[56]=Pe):Pe=e[56];let Fe;e[57]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`3YvS-c`})}),e[57]=Fe):Fe=e[57];let Ie;e[58]===Pe?Ie=e[59]:(Ie=(0,Z.jsxs)(Ir,{children:[Pe,Fe]}),e[58]=Pe,e[59]=Ie);let Le;e[60]!==Se||e[61]!==je||e[62]!==Ie?(Le=(0,Z.jsxs)(`div`,{className:Se,children:[je,Ie]}),e[60]=Se,e[61]=je,e[62]=Ie,e[63]=Le):Le=e[63];let Re;return e[64]!==ye||e[65]!==be||e[66]!==xe||e[67]!==Le?(Re=(0,Z.jsx)(`div`,{ref:D,"data-electron-drag":ye,className:be,onWheel:xe,children:Le}),e[64]=ye,e[65]=be,e[66]=xe,e[67]=Le,e[68]=Re):Re=e[68],Re}function WO(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`Discord`}),r=(0,Z.jsx)(`path`,{d:`M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9554 2.4189-2.1568 2.4189Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function GO(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`X (Twitter)`}),r=(0,Z.jsx)(`path`,{d:`M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var KO=[{label:{id:`TvY_XA`},href:`https://openknowledge.ai/docs`,icon:Ne},{label:`GitHub`,href:`https://github.com/inkeep/open-knowledge`,icon:rd},{label:{id:`On0aF2`},href:`https://openknowledge.ai/`,icon:Cr},{label:`Discord`,href:`https://go.inkeep.com/ok-discord`,icon:WO},{label:`Twitter`,href:`https://x.com/inkeep`,icon:GO}],qO=()=>{let e=(0,$.c)(16),{_:t}=i(),[n,r]=(0,Q.useState)(!1),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Y,{className:`size-4`}),e[0]=a):a=e[0];let o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Lt,{asChild:!0,children:(0,Z.jsxs)(Ti,{variant:`ghost`,size:`icon`,className:`size-7 hover:bg-accent text-muted-foreground`,children:[a,(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`s-MGs7`})})]})})}),e[1]=o):o=e[1];let c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsxs)(Ir,{children:[o,(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`s-MGs7`})})]}),e[2]=c):c=e[2];let l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`p`,{className:`font-mono tracking-wide uppercase text-muted-foreground text-xs mb-1`,children:(0,Z.jsx)(s,{id:`s-MGs7`})}),e[3]=l):l=e[3];let u;e[4]===t?u=e[5]:(u=t({id:`s-MGs7`}),e[4]=t,e[5]=u);let d;e[6]===t?d=e[7]:(d=KO.map(e=>{let{label:n,href:r,icon:i}=e;return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>ha(e,r),onAuxClick:e=>ha(e,r),className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-azure-900/5 dark:hover:bg-white/20 hover:text-primary`,children:[(0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-4 shrink-0`}),typeof n==`string`?n:t(n)]})},r)}),e[6]=t,e[7]=d);let f;e[8]===d?f=e[9]:(f=(0,Z.jsx)(`ul`,{className:`space-y-0.5`,children:d}),e[8]=d,e[9]=f);let p;e[10]!==u||e[11]!==f?(p=(0,Z.jsxs)(Fe,{align:`end`,className:`w-64 p-3`,children:[l,(0,Z.jsx)(`nav`,{"aria-label":u,children:f})]}),e[10]=u,e[11]=f,e[12]=p):p=e[12];let m;return e[13]!==n||e[14]!==p?(m=(0,Z.jsxs)(jt,{open:n,onOpenChange:r,children:[c,p]}),e[13]=n,e[14]=p,e[15]=m):m=e[15],m};function JO(e){let t=(0,$.c)(62),{input:n}=e,{_:r}=i(),{states:a,refresh:o}=_h(),{dispatch:c}=oh(),[l,u]=(0,Q.useState)(!1),d=typeof window<`u`&&window.okDesktop!=null,f;t[0]===o?f=t[1]:(f=e=>{u(e),e&&o()},t[0]=o,t[1]=f);let p=f,m=n===null,h;t[2]===n?h=t[3]:(h=n!==null&&n.docContext!==null?si(n.docContext.relativePath):``,t[2]=n,t[3]=h);let g=h,_;t[4]!==c||t[5]!==n?(_=e=>{n!==null&&c(e.id,n)},t[4]=c,t[5]=n,t[6]=_):_=t[6];let v=_,y,b,x,S,C,w,T,E,D,O,k,A;if(t[7]!==p||t[8]!==v||t[9]!==n||t[10]!==l||t[11]!==g||t[12]!==a||t[13]!==m){let e;t[26]===a?e=t[27]:(e=e=>a[e.id]?.installed===!0,t[26]=a,t[27]=e);let r=hm.filter(e);x=a[`claude-code`]?.installed===!0;let i;t[28]!==n||t[29]!==g?(i=()=>{n!==null&&Ay(g)},t[28]=n,t[29]=g,t[30]=i):i=t[30],S=i,b=Ca,A=l,C=p;let o,c;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Li,{className:`size-3.5`}),c=(0,Z.jsx)(s,{id:`xWEvuo`}),t[31]=o,t[32]=c):(o=t[31],c=t[32]);let u;t[33]===m?u=t[34]:(u=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(ga,{asChild:!0,children:(0,Z.jsxs)(Ti,{variant:`ghost`,size:`sm`,disabled:m,className:`gap-1.5 text-muted-foreground px-1.5`,"data-testid":`open-in-agent-trigger`,children:[o,c]})})}),t[33]=m,t[34]=u);let f;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`xWEvuo`})}),t[35]=f):f=t[35],t[36]===u?w=t[37]:(w=(0,Z.jsxs)(Ir,{children:[u,f]}),t[36]=u,t[37]=w),y=ta,T=`end`,E=`min-w-[220px]`,D=`open-in-agent-menu`,t[38]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(no,{className:`font-mono font-normal tracking-wide uppercase text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`O7_W_a`})}),t[38]=O):O=t[38];let h;t[39]!==v||t[40]!==g||t[41]!==a?(h=e=>{let t=a[e.id];return(0,Z.jsx)(jy,{target:e,installState:t,isElectronHost:d,prompt:g,onSelect:()=>v(e)},e.id)},t[39]=v,t[40]=g,t[41]=a,t[42]=h):h=t[42],k=r.map(h),t[7]=p,t[8]=v,t[9]=n,t[10]=l,t[11]=g,t[12]=a,t[13]=m,t[14]=y,t[15]=b,t[16]=x,t[17]=S,t[18]=C,t[19]=w,t[20]=T,t[21]=E,t[22]=D,t[23]=O,t[24]=k,t[25]=A}else y=t[14],b=t[15],x=t[16],S=t[17],C=t[18],w=t[19],T=t[20],E=t[21],D=t[22],O=t[23],k=t[24],A=t[25];let j;t[43]!==r||t[44]!==x||t[45]!==S||t[46]!==n?(j=x?null:(0,Z.jsxs)(oa,{onSelect:S,disabled:n===null,"data-testid":`open-in-agent-claude-web-fallback`,"aria-label":r({id:`aA51jP`}),children:[(0,Z.jsx)(Se,{className:`size-4`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`0S9PW_`})}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`pcfY8r`})})]}),t[43]=r,t[44]=x,t[45]=S,t[46]=n,t[47]=j):j=t[47];let M;t[48]!==y||t[49]!==j||t[50]!==T||t[51]!==E||t[52]!==D||t[53]!==O||t[54]!==k?(M=(0,Z.jsxs)(y,{align:T,className:E,"data-testid":D,children:[O,k,j]}),t[48]=y,t[49]=j,t[50]=T,t[51]=E,t[52]=D,t[53]=O,t[54]=k,t[55]=M):M=t[55];let N;return t[56]!==b||t[57]!==C||t[58]!==w||t[59]!==M||t[60]!==A?(N=(0,Z.jsxs)(b,{open:A,onOpenChange:C,children:[w,M]}),t[56]=b,t[57]=C,t[58]=w,t[59]=M,t[60]=A,t[61]=N):N=t[61],N}var YO=50,XO=()=>{let e=(0,$.c)(8),t=(0,Q.useRef)(null),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=()=>{t.current===null&&(t.current=setTimeout(()=>{t.current=null,ex.preload()},YO))},e[0]=n):n=e[0];let r=n,i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{t.current!==null&&(clearTimeout(t.current),t.current=null)},e[1]=i):i=e[1];let a=i,o,c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>()=>{t.current!==null&&clearTimeout(t.current)},c=[],e[2]=o,e[3]=c):(o=e[2],c=e[3]),(0,Q.useEffect)(o,c);let l,u;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{a(),window.location.hash!==`#settings`&&(window.location.hash=gm)},u=(0,Z.jsx)(Uc,{className:`size-4`}),e[4]=l,e[5]=u):(l=e[4],u=e[5]);let d;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsxs)(Ti,{variant:`ghost`,size:`icon`,className:`size-7 hover:bg-accent text-muted-foreground`,"data-testid":`header-settings-button`,onMouseEnter:r,onMouseLeave:a,onFocus:r,onBlur:a,onClick:l,children:[u,(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`Tz0i8g`})})]})}),e[6]=d):d=e[6];let f;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsxs)(Ir,{children:[d,(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`Tz0i8g`})})]}),e[7]=f):f=e[7],f};function ZO(e){let t=(0,$.c)(17),{onClickWhenNoRemote:n}=e,{_:r}=i(),{activeDocName:a}=lt(),{status:o}=Ua(),[c,l]=(0,Q.useState)(!1);if(!a)return null;let u=o?.hasRemote===!0,d;t[0]!==r||t[1]!==a||t[2]!==c||t[3]!==u||t[4]!==n?(d=async function(){if(!c&&a){l(!0);try{await za({docName:a,hasRemote:u,onClickWhenNoRemote:n},{clipboardWrite:tk,toastSuccess:ek,toastError:$O,logEvent:QO})}catch{Vo.error(r({id:`u3YnKw`}))}l(!1)}},t[0]=r,t[1]=a,t[2]=c,t[3]=u,t[4]=n,t[5]=d):d=t[5];let f=d,p;t[6]===r?p=t[7]:(p=r({id:`F4IYWe`}),t[6]=r,t[7]=p);let m,h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(Wc,{className:`size-3.5`,"aria-hidden":!0}),h=(0,Z.jsx)(s,{id:`Z8lGw6`}),t[8]=m,t[9]=h):(m=t[8],h=t[9]);let g;t[10]!==c||t[11]!==f||t[12]!==p?(g=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsxs)(Ti,{variant:`ghost`,size:`sm`,"aria-label":p,onClick:f,disabled:c,className:`gap-1.5 text-muted-foreground px-1.5`,"data-testid":`share-button`,children:[m,h]})}),t[10]=c,t[11]=f,t[12]=p,t[13]=g):g=t[13];let _;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`Z8lGw6`})}),t[14]=_):_=t[14];let v;return t[15]===g?v=t[16]:(v=(0,Z.jsxs)(Ir,{children:[g,_]}),t[15]=g,t[16]=v),v}function QO(e){return console.log(e)}function $O(e){return Vo.error(e)}function ek(e){return Vo.success(e)}function tk(e){return navigator.clipboard.writeText(e)}function nk(e){if(!e)return X._({id:`Zul8Ry`});let t=Date.now()-new Date(e).getTime();if(t<6e4)return X._({id:`xOTzt5`});if(t<36e5){let e=Math.floor(t/6e4);return X._({id:`LNum6A`,values:{minutes:e}})}if(t<864e5){let e=Math.floor(t/36e5);return X._({id:`nYeBmY`,values:{hours:e}})}return new Date(e).toLocaleDateString()}async function rk(e){await fetch(`/api/sync/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({op:e})})}function ik(e){let t=(0,$.c)(9),{status:n}=e;switch(n.state){case`dormant`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)($s,{className:`size-3.5 text-muted-foreground`}),t[0]=e):e=t[0],e}case`idle`:{if(n.ahead>0||n.behind>0){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Rc,{className:`size-3.5 text-muted-foreground`}),t[1]=e):e=t[1],e}let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)($s,{className:`size-3.5 text-muted-foreground`}),t[2]=e):e=t[2],e}case`fetching`:case`pulling`:case`pushing`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Rc,{className:`size-3.5 text-muted-foreground animate-spin`}),t[3]=e):e=t[3],e}case`conflict`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(pi,{className:`size-3.5 text-amber-500`}),t[4]=e):e=t[4],e}case`offline`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Qs,{className:`size-3.5 text-muted-foreground`}),t[5]=e):e=t[5],e}case`auth-error`:{let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Ec,{className:`size-3.5 text-destructive`}),t[6]=e):e=t[6],e}case`disabled`:{let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(pi,{className:`size-3.5 text-amber-500`}),t[7]=e):e=t[7],e}default:{let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)($s,{className:`size-3.5 text-muted-foreground`}),t[8]=e):e=t[8],e}}}function ak(e){switch(e.state){case`idle`:return e.ahead>0?`↑${e.ahead}`:e.behind>0?`↓${e.behind}`:``;case`fetching`:case`pulling`:case`pushing`:return``;case`conflict`:return e.conflictCount>0?`${e.conflictCount}`:``;case`offline`:return``;case`auth-error`:return``;default:return``}}function ok(e){switch(e){case`dormant`:return X._({id:`RmBY0A`});case`idle`:return X._({id:`N2FcBE`});case`fetching`:return X._({id:`Wgmlsw`});case`pulling`:return X._({id:`4uNLmk`});case`pushing`:return X._({id:`iycx_A`});case`conflict`:return X._({id:`IInnZo`});case`offline`:return X._({id:`6Aih4U`});case`auth-error`:return X._({id:`EcJiTs`});case`disabled`:return X._({id:`DrYM2Z`});default:return e}}function sk(e){switch(e){case`external-changes-pending`:return X._({id:`W9_Bub`});case`dirty-tree`:return X._({id:`a5Gha5`});case`detached-head`:return X._({id:`uQNW00`});case`auth-error`:return X._({id:`EcJiTs`});case`protected-branch`:return X._({id:`8fc_3j`});default:return e}}function ck(e){if(!e.syncEnabled)return X._({id:`kUn-CN`});if(e.state===`idle`){let{ahead:t,behind:n}=e;return t>0&&n>0?X._({id:`5F5HYj`,values:{ahead:t,behind:n}}):t>0?X._({id:`PdA9NZ`,values:{ahead:t}}):n>0?X._({id:`9o1bIV`,values:{behind:n}}):X._({id:`N2FcBE`})}if(e.state===`conflict`&&e.conflictCount>0){let{conflictCount:t}=e;return X._({id:`cUK8lW`,values:{conflictCount:t}})}return ok(e.state)}function lk(e){let t=(0,$.c)(88),{status:n,onSignIn:r,onSetIdentity:a}=e,{_:o}=i(),{ahead:c,behind:l,conflictCount:u}=n,{projectLocalConfig:d,projectLocalSynced:f}=N(),p=d?.autoSync?.enabled??!1,m;t[0]===n.lastSyncUtc?m=t[1]:(m=nk(n.lastSyncUtc),t[0]=n.lastSyncUtc,t[1]=m);let h=m,{confirmOpen:g,setConfirmOpen:_,onToggleRequest:v,onConfirm:y}=Hi(La()),{conflicts:b}=VC(),x=b[0]??null,S;t[2]===n?S=t[3]:(S=(0,Z.jsx)(ik,{status:n}),t[2]=n,t[3]=S);let C;t[4]===n.state?C=t[5]:(C=ok(n.state),t[4]=n.state,t[5]=C);let w;t[6]===C?w=t[7]:(w=(0,Z.jsx)(`span`,{className:`text-1sm font-medium truncate`,children:C}),t[6]=C,t[7]=w);let T;t[8]!==S||t[9]!==w?(T=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[S,w]}),t[8]=S,t[9]=w,t[10]=T):T=t[10];let E=!f,D;t[11]!==o||t[12]!==p?(D=o(p?{id:`lIn9L9`}:{id:`wbwHYD`}),t[11]=o,t[12]=p,t[13]=D):D=t[13];let O;t[14]!==p||t[15]!==v||t[16]!==E||t[17]!==D?(O=(0,Z.jsx)($e,{checked:p,disabled:E,onCheckedChange:v,"aria-label":D}),t[14]=p,t[15]=v,t[16]=E,t[17]=D,t[18]=O):O=t[18];let k;t[19]!==T||t[20]!==O?(k=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[T,O]}),t[19]=T,t[20]=O,t[21]=k):k=t[21];let A;t[22]!==g||t[23]!==y||t[24]!==_?(A=(0,Z.jsx)(Ya,{open:g,onOpenChange:_,onConfirm:y}),t[22]=g,t[23]=y,t[24]=_,t[25]=A):A=t[25];let j;t[26]===n.error?j=t[27]:(j=n.error&&(0,Z.jsx)(`p`,{className:`text-xs text-destructive`,children:n.error}),t[26]=n.error,t[27]=j);let M;t[28]===n.pausedReason?M=t[29]:(M=n.pausedReason&&(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:sk(n.pausedReason)}),t[28]=n.pausedReason,t[29]=M);let P;t[30]===n.state?P=t[31]:(P=n.state===`conflict`&&(0,Z.jsx)(`p`,{className:`text-xs text-amber-700 dark:text-amber-400`,children:(0,Z.jsx)(s,{id:`t2TkQ3`})}),t[30]=n.state,t[31]=P);let F;t[32]!==o||t[33]!==n.remote?(F=n.remote&&(0,Z.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,Z.jsx)(`span`,{className:`w-20 shrink-0 font-mono uppercase tracking-wide text-2xs`,children:(0,Z.jsx)(s,{id:`IreQBq`})}),n.remote.webUrl?(0,Z.jsxs)(`a`,{href:n.remote.webUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex min-w-0 items-center gap-0.5 text-foreground hover:text-primary hover:underline`,"aria-label":o({id:`1nke1r`,values:{0:n.remote.label}}),children:[(0,Z.jsx)(`span`,{className:`truncate`,children:n.remote.label}),(0,Z.jsx)(Co,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]}):(0,Z.jsx)(`span`,{className:`min-w-0 truncate text-foreground`,children:n.remote.label})]}),t[32]=o,t[33]=n.remote,t[34]=F):F=t[34];let I;t[35]!==p||t[36]!==h||t[37]!==n.state?(I=p&&n.state!==`dormant`&&(0,Z.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,Z.jsx)(`span`,{className:`w-20 shrink-0 font-mono uppercase tracking-wide text-2xs`,children:(0,Z.jsx)(s,{id:`uWx2ZP`})}),(0,Z.jsx)(`span`,{className:`text-foreground`,children:h})]}),t[35]=p,t[36]=h,t[37]=n.state,t[38]=I):I=t[38];let L;t[39]!==c||t[40]!==n.ahead?(L=n.ahead>0&&(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{id:`iTlqm3`,values:{ahead:c}})}),t[39]=c,t[40]=n.ahead,t[41]=L):L=t[41];let R;t[42]!==l||t[43]!==n.behind?(R=n.behind>0&&(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{id:`YsEYYS`,values:{behind:l}})}),t[42]=l,t[43]=n.behind,t[44]=R):R=t[44];let z;t[45]!==u||t[46]!==n.conflictCount?(z=n.conflictCount>0&&(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{id:`B4_ipX`,values:{conflictCount:u}})}),t[45]=u,t[46]=n.conflictCount,t[47]=z):z=t[47];let B;t[48]===p?B=t[49]:(B=!p&&(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{id:`Wt5W56`})}),t[48]=p,t[49]=B);let V;t[50]!==F||t[51]!==I||t[52]!==L||t[53]!==R||t[54]!==z||t[55]!==B?(V=(0,Z.jsxs)(`div`,{className:`text-xs text-muted-foreground space-y-2`,children:[F,I,L,R,z,B]}),t[50]=F,t[51]=I,t[52]=L,t[53]=R,t[54]=z,t[55]=B,t[56]=V):V=t[56];let H;t[57]!==a||t[58]!==n.identityUnresolved?(H=n.identityUnresolved&&a&&(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed p-2`,children:[(0,Z.jsx)(rl,{className:`size-3.5 mt-0.5 text-muted-foreground shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 min-w-0`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground leading-snug`,children:(0,Z.jsx)(s,{id:`nrGWJ7`})}),(0,Z.jsx)(Ti,{variant:`outline`,size:`xs`,className:`self-start`,onClick:a,children:(0,Z.jsx)(s,{id:`keNFEd`})})]})]}),t[57]=a,t[58]=n.identityUnresolved,t[59]=H):H=t[59];let U;t[60]!==p||t[61]!==n.state?(U=p&&n.state!==`dormant`&&n.state!==`disabled`&&n.state!==`auth-error`&&n.state!==`conflict`&&(0,Z.jsx)(Ti,{variant:`outline`,size:`xs`,onClick:dk,children:(0,Z.jsx)(s,{id:`lb_UU4`})}),t[60]=p,t[61]=n.state,t[62]=U):U=t[62];let W;t[63]!==p||t[64]!==r||t[65]!==n.state?(W=p&&n.state===`auth-error`&&(0,Z.jsx)(Ti,{variant:`outline`,size:`xs`,onClick:r,children:(0,Z.jsx)(s,{id:`5lWFkC`})}),t[63]=p,t[64]=r,t[65]=n.state,t[66]=W):W=t[66];let G;t[67]!==p||t[68]!==n.state?(G=p&&n.state===`offline`&&(0,Z.jsx)(Ti,{variant:`outline`,size:`xs`,onClick:uk,children:(0,Z.jsx)(s,{id:`6gRgw8`})}),t[67]=p,t[68]=n.state,t[69]=G):G=t[69];let K;t[70]!==p||t[71]!==x||t[72]!==n.state?(K=p&&n.state===`conflict`&&x&&(0,Z.jsx)(Ti,{variant:`outline`,size:`xs`,onClick:()=>{if(typeof window>`u`)return;let e=ni(Sr(x.file));window.location.hash!==e&&(window.location.hash=e)},children:(0,Z.jsx)(s,{id:`0yL--g`})}),t[70]=p,t[71]=x,t[72]=n.state,t[73]=K):K=t[73];let ee;t[74]!==U||t[75]!==W||t[76]!==G||t[77]!==K?(ee=(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1 pt-1`,children:[U,W,G,K]}),t[74]=U,t[75]=W,t[76]=G,t[77]=K,t[78]=ee):ee=t[78];let q;return t[79]!==A||t[80]!==j||t[81]!==M||t[82]!==P||t[83]!==V||t[84]!==H||t[85]!==ee||t[86]!==k?(q=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3.5`,children:[k,A,j,M,P,V,H,ee]}),t[79]=A,t[80]=j,t[81]=M,t[82]=P,t[83]=V,t[84]=H,t[85]=ee,t[86]=k,t[87]=q):q=t[87],q}function uk(){rk(`sync`)}function dk(){rk(`sync`)}function fk(e){let t=(0,$.c)(69),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{onSignIn:r,onSetIdentity:a}=n,{_:o}=i(),{status:c,fetchError:l}=Ua();if(!c){if(l){let e;t[2]===o?e=t[3]:(e=o({id:`iqIDv4`}),t[2]=o,t[3]=e);let n;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(Qs,{className:`size-3.5`}),t[4]=n):n=t[4];let r;t[5]===e?r=t[6]:(r=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,"aria-label":e,disabled:!0,children:n})}),t[5]=e,t[6]=r);let i;t[7]===l?i=t[8]:(i=(0,Z.jsx)(wn,{children:l===`network`?(0,Z.jsx)(s,{id:`I5AfhE`}):(0,Z.jsx)(s,{id:`uKRYiW`})}),t[7]=l,t[8]=i);let a;return t[9]!==r||t[10]!==i?(a=(0,Z.jsxs)(Ir,{children:[r,i]}),t[9]=r,t[10]=i,t[11]=a):a=t[11],a}return null}if(c.state===`dormant`&&!c.hasRemote||c.state===`disabled`&&!c.pausedReason)return null;let u;t[12]===c?u=t[13]:(u=ak(c),t[12]=c,t[13]=u);let d=u,f,p,m,h,g,_,v,y,b,x,S,C;if(t[14]!==o||t[15]!==c.identityUnresolved||t[16]!==c.state){let e=ok(c.state);_=!!c.identityUnresolved,g=jt,h=Ir,m=Kn,C=!0,p=Lt,S=!0,f=Ti,v=`ghost`,y=`icon-sm`,b=`text-muted-foreground relative`,x=o(_?{id:`DFfRbX`,values:{syncStateLabel:e}}:{id:`F4vEsL`,values:{syncStateLabel:e}}),t[14]=o,t[15]=c.identityUnresolved,t[16]=c.state,t[17]=f,t[18]=p,t[19]=m,t[20]=h,t[21]=g,t[22]=_,t[23]=v,t[24]=y,t[25]=b,t[26]=x,t[27]=S,t[28]=C}else f=t[17],p=t[18],m=t[19],h=t[20],g=t[21],_=t[22],v=t[23],y=t[24],b=t[25],x=t[26],S=t[27],C=t[28];let w;t[29]===c?w=t[30]:(w=(0,Z.jsx)(ik,{status:c}),t[29]=c,t[30]=w);let T;t[31]===d?T=t[32]:(T=d&&(0,Z.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 text-[9px] leading-none font-medium bg-background border rounded-full px-0.5`,children:d}),t[31]=d,t[32]=T);let E;t[33]!==d||t[34]!==_?(E=!d&&_&&(0,Z.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-amber-500 ring-2 ring-background`,"aria-hidden":!0}),t[33]=d,t[34]=_,t[35]=E):E=t[35];let D;t[36]!==f||t[37]!==T||t[38]!==E||t[39]!==v||t[40]!==y||t[41]!==b||t[42]!==x||t[43]!==w?(D=(0,Z.jsxs)(f,{variant:v,size:y,className:b,"aria-label":x,children:[w,T,E]}),t[36]=f,t[37]=T,t[38]=E,t[39]=v,t[40]=y,t[41]=b,t[42]=x,t[43]=w,t[44]=D):D=t[44];let O;t[45]!==p||t[46]!==D||t[47]!==S?(O=(0,Z.jsx)(p,{asChild:S,children:D}),t[45]=p,t[46]=D,t[47]=S,t[48]=O):O=t[48];let k;t[49]!==m||t[50]!==O||t[51]!==C?(k=(0,Z.jsx)(m,{asChild:C,children:O}),t[49]=m,t[50]=O,t[51]=C,t[52]=k):k=t[52];let A;t[53]===c?A=t[54]:(A=ck(c),t[53]=c,t[54]=A);let j;t[55]===A?j=t[56]:(j=(0,Z.jsx)(wn,{children:A}),t[55]=A,t[56]=j);let M;t[57]!==h||t[58]!==k||t[59]!==j?(M=(0,Z.jsxs)(h,{children:[k,j]}),t[57]=h,t[58]=k,t[59]=j,t[60]=M):M=t[60];let N;t[61]!==a||t[62]!==r||t[63]!==c?(N=(0,Z.jsx)(Fe,{align:`end`,className:`w-64 p-3`,children:(0,Z.jsx)(lk,{status:c,onSignIn:r,onSetIdentity:a})}),t[61]=a,t[62]=r,t[63]=c,t[64]=N):N=t[64];let P;return t[65]!==g||t[66]!==M||t[67]!==N?(P=(0,Z.jsxs)(g,{children:[M,N]}),t[65]=g,t[66]=M,t[67]=N,t[68]=P):P=t[68],P}function pk(e){let t=(0,$.c)(39),{onSignIn:n,onSetIdentity:r}=e,{activeDocName:i,activeTarget:a}=lt(),{state:o}=tD(),c=Ma(),[l,u]=(0,Q.useState)(!1),d;bb0:{if(a===null){let e;t[0]===c?e=t[1]:(e=Jm({workspace:c}),t[0]=c,t[1]=e),d=e;break bb0}if(a.kind===`folder`){if(!c){d=null;break bb0}let e;t[2]!==a.folderPath||t[3]!==c?(e=Ym({folderRelativePath:a.folderPath,workspace:c}),t[2]=a.folderPath,t[3]=c,t[4]=e):e=t[4],d=e;break bb0}let e;t[5]!==i||t[6]!==c?(e=qm({docName:i,workspace:c}),t[5]=i,t[6]=c,t[7]=e):e=t[7],d=e}let f=d,p=typeof window<`u`&&window.okDesktop!=null,m=p&&o===`collapsed`&&`pl-[78px]`,h;t[8]===m?h=t[9]:(h=vi(`flex h-12 shrink-0 items-center bg-muted/35 shadow-[inset_0_-1px_0_var(--border)]`,p&&`[-webkit-app-region:drag]`,m,p&&`motion-safe:transition-[padding] motion-safe:duration-200 motion-safe:ease-linear`),t[8]=m,t[9]=h);let g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(oD,{className:vi(`-ml-1 shrink-0 text-muted-foreground`,p&&`[-webkit-app-region:no-drag]`)})}),t[10]=g):g=t[10];let _;t[11]===o?_=t[12]:(_=(0,Z.jsxs)(Ir,{children:[g,(0,Z.jsx)(wn,{children:o===`expanded`?(0,Z.jsx)(s,{id:`w3vFfL`}):(0,Z.jsx)(s,{id:`e8zRrb`})})]}),t[11]=o,t[12]=_);let v,y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(to,{orientation:`vertical`,className:`mr-1 h-4 shrink-0 data-vertical:self-center`}),y=(0,Z.jsx)(UO,{}),t[13]=v,t[14]=y):(v=t[13],y=t[14]);let b;t[15]===_?b=t[16]:(b=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1 px-3`,children:[_,v,y]}),t[15]=_,t[16]=b);let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=vi(`flex shrink-0 items-center justify-end gap-2 px-3`,p&&`[&>*]:[-webkit-app-region:no-drag]`),t[17]=x):x=t[17];let S;t[18]===f?S=t[19]:(S=(0,Z.jsx)(JO,{input:f}),t[18]=f,t[19]=S);let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(ZO,{onClickWhenNoRemote:()=>u(!0)}),t[20]=C):C=t[20];let w;t[21]===l?w=t[22]:(w=(0,Z.jsx)(Va,{open:l,onOpenChange:u}),t[21]=l,t[22]=w);let T;t[23]!==r||t[24]!==n?(T=(0,Z.jsx)(fk,{onSignIn:n,onSetIdentity:r}),t[23]=r,t[24]=n,t[25]=T):T=t[25];let E,D,O,k,A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(ID,{}),D=(0,Z.jsx)(to,{orientation:`vertical`,className:`h-4 shrink-0 data-vertical:self-center`}),O=(0,Z.jsx)(Tu,{}),k=(0,Z.jsx)(XO,{}),A=(0,Z.jsx)(qO,{}),t[26]=E,t[27]=D,t[28]=O,t[29]=k,t[30]=A):(E=t[26],D=t[27],O=t[28],k=t[29],A=t[30]);let j;t[31]!==S||t[32]!==w||t[33]!==T?(j=(0,Z.jsxs)(`div`,{className:x,children:[S,C,w,T,E,D,O,k,A]}),t[31]=S,t[32]=w,t[33]=T,t[34]=j):j=t[34];let M;return t[35]!==j||t[36]!==h||t[37]!==b?(M=(0,Z.jsxs)(`header`,{"data-electron-drag":p?``:void 0,className:h,children:[b,j]}),t[35]=j,t[36]=h,t[37]=b,t[38]=M):M=t[38],M}function mk(){let e=(0,$.c)(26),{_:t}=i(),[n,r]=qh(),[a,o]=(0,Q.useState)(n),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(`auth`),[d,f]=(0,Q.useState)(f_[0].id),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(!1),_=io(),{projectLocalConfig:v,projectLocalSynced:y}=N(),{activeDocName:b}=lt(),x=!h&&_?.hasRemote===!0&&y===!0&&v!==null&&v.autoSync?.enabled===null,S,C;e[0]===b?(S=e[1],C=e[2]):(S=()=>{let e=function(e){let t=e.detail;t&&b&&Cs(b,{kind:`raw-mdx`,detail:t}),o(`source`)};return window.addEventListener(zh,e),()=>window.removeEventListener(zh,e)},C=[b],e[0]=b,e[1]=S,e[2]=C),(0,Q.useEffect)(S,C);let w;e[3]===r?w=e[4]:(w=function(e){o(e),r(e)},e[3]=r,e[4]=w);let T=w,E;e[5]===t?E=e[6]:(E=async function(){m(!0);try{let e=await fetch(`/api/save-version`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({})});e.ok?Vo.success(t({id:`rdE6_3`})):(console.error(`[save-version] failed:`,await e.text()),Vo.error(t({id:`q7zsRM`})))}catch(e){console.error(`[save-version] failed:`,e),Vo.error(t({id:`q7zsRM`}))}m(!1)},e[5]=t,e[6]=E);let D=E,O;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(pk,{onSignIn:()=>{u(`auth`),c(!0)},onSetIdentity:()=>{u(`identity`),c(!0)}}),e[7]=O):O=e[7];let k;e[8]!==d||e[9]!==a||e[10]!==T||e[11]!==D||e[12]!==p?(k=(0,Z.jsx)(AE,{editorMode:a,onModeChange:T,activeTab:d,onActiveTabChange:f,onSaveVersion:D,saving:p}),e[8]=d,e[9]=a,e[10]=T,e[11]=D,e[12]=p,e[13]=k):k=e[13];let A=l===`identity`,j;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>{c(!1)},e[14]=j):j=e[14];let M;e[15]!==s||e[16]!==A?(M=(0,Z.jsx)(Ba,{open:s,onOpenChange:c,identityPrompt:A,onSuccess:j}),e[15]=s,e[16]=A,e[17]=M):M=e[17];let P;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>g(!0),e[18]=P):P=e[18];let F;e[19]===x?F=e[20]:(F=(0,Z.jsx)(Jh,{open:x,onResolved:P}),e[19]=x,e[20]=F);let I;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsx)(Ih,{}),e[21]=I):I=e[21];let L;return e[22]!==F||e[23]!==k||e[24]!==M?(L=(0,Z.jsxs)(Z.Fragment,{children:[O,k,M,F,I]}),e[22]=F,e[23]=k,e[24]=M,e[25]=L):L=e[25],L}function hk(e){let t=ni(Sr(e));typeof window>`u`||window.location.hash!==t&&(window.location.hash=t)}function gk(){let e=(0,$.c)(11),{conflicts:t,loading:n,error:r}=VC();if(n)return null;if(r!==null){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`section`,{"data-testid":`conflicts-section`,"aria-label":`Conflicted files`,className:`border-b border-amber-200/60 bg-amber-50/40 px-2 py-2 dark:border-amber-900/40 dark:bg-amber-950/20`,children:(0,Z.jsxs)(`p`,{"data-testid":`conflicts-section-error`,className:`px-2 py-1.5 text-[12px] text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(pi,{"aria-hidden":`true`,className:`mr-1.5 inline size-3`}),`Couldn't load conflicts — reload to retry.`]})}),e[0]=t):t=e[0],t}if(t.length===0)return null;let i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 font-mono text-[11px] uppercase tracking-wider text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(pi,{"aria-hidden":`true`,className:`size-3`}),`Conflicts`]}),e[1]=i):i=e[1];let a;e[2]===t.length?a=e[3]:(a=(0,Z.jsxs)(`header`,{className:`flex items-center justify-between px-2 pb-1.5`,children:[i,(0,Z.jsx)(`span`,{"data-testid":`conflicts-section-count`,className:`rounded-full bg-amber-500 px-1.5 py-0.5 font-mono text-[10px] font-medium leading-none text-white`,children:t.length})]}),e[2]=t.length,e[3]=a);let o;e[4]===t?o=e[5]:(o=t.map(_k),e[4]=t,e[5]=o);let s;e[6]===o?s=e[7]:(s=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-px`,children:o}),e[6]=o,e[7]=s);let c;return e[8]!==a||e[9]!==s?(c=(0,Z.jsxs)(`section`,{"data-testid":`conflicts-section`,"aria-label":`Conflicted files`,className:`border-b border-amber-200/60 bg-amber-50/40 px-2 py-2 dark:border-amber-900/40 dark:bg-amber-950/20`,children:[a,s]}),e[8]=a,e[9]=s,e[10]=c):c=e[10],c}function _k(e){return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(Ti,{variant:`ghost`,size:`sm`,"data-testid":`conflicts-section-row`,"data-file":e.file,title:e.file,className:`h-7 w-full justify-start gap-1.5 px-2 font-normal text-[13px] text-amber-800 hover:bg-amber-100/60 hover:text-amber-900 dark:text-amber-300 dark:hover:bg-amber-900/30 dark:hover:text-amber-200`,onClick:()=>hk(e.file),children:[(0,Z.jsx)(pi,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:e.file})]})},e.file)}var vk=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
33
|
+
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
34
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06" fill="currentcolor"/>
|
|
35
|
+
</symbol>
|
|
36
|
+
<symbol id="file-tree-icon-dot" viewBox="0 0 6 6">
|
|
37
|
+
<circle cx="3" cy="3" r="3" />
|
|
38
|
+
</symbol>
|
|
39
|
+
<symbol id="file-tree-icon-file" viewBox="0 0 16 16">
|
|
40
|
+
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".5"/>
|
|
41
|
+
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
42
|
+
</symbol>
|
|
43
|
+
<symbol id="file-tree-icon-lock" viewBox="0 0 16 16">
|
|
44
|
+
<path fill="currentcolor" d="M4 5.336V4a4 4 0 1 1 8 0v1.336c1.586.54 2 1.843 2 4.664v1c0 4.118-.883 5-5 5H7c-4.117 0-5-.883-5-5v-1c0-2.821.414-4.124 2-4.664M5.5 4v1.054Q6.166 4.998 7 5h2q.834-.002 1.5.054V4a2.5 2.5 0 0 0-5 0m-2 6v1c0 .995.055 1.692.167 2.193.107.483.246.686.35.79s.307.243.79.35c.5.112 1.198.167 2.193.167h2c.995 0 1.692-.055 2.193-.166.483-.108.686-.247.79-.35.104-.105.243-.308.35-.791.112-.5.167-1.198.167-2.193v-1c0-.995-.055-1.692-.166-2.193-.108-.483-.247-.686-.35-.79-.105-.104-.308-.243-.791-.35C10.693 6.555 9.995 6.5 9 6.5H7c-.995 0-1.692.055-2.193.167-.483.107-.686.246-.79.35s-.243.307-.35.79C3.555 8.307 3.5 9.005 3.5 10" />
|
|
45
|
+
</symbol>
|
|
46
|
+
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
47
|
+
<path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
|
|
48
|
+
</symbol>
|
|
49
|
+
</svg>`,yk=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
50
|
+
<path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
|
|
51
|
+
<path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
|
|
52
|
+
</symbol>`,bk=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
53
|
+
<path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
|
|
54
|
+
</symbol>`,xk=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
|
|
55
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
56
|
+
<path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
|
|
57
|
+
</symbol>`,Sk=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
58
|
+
<path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
|
|
59
|
+
</symbol>`,Ck=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
60
|
+
<path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
|
|
61
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
|
|
62
|
+
</symbol>`,wk=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
63
|
+
<path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
|
|
64
|
+
<path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
|
|
65
|
+
<path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
|
|
66
|
+
</symbol>`,Tk=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
67
|
+
<path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
|
|
68
|
+
</symbol>`,Ek=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
69
|
+
<path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
|
|
70
|
+
</symbol>`,Dk=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
71
|
+
<path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
|
|
72
|
+
<path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
|
|
73
|
+
</symbol>`,Ok=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
74
|
+
<path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
|
|
75
|
+
<path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
|
|
76
|
+
<path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
|
|
77
|
+
</symbol>`,kk=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
78
|
+
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
|
|
79
|
+
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
80
|
+
</symbol>`,Ak=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
81
|
+
<path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
|
|
82
|
+
<path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
|
|
83
|
+
</symbol>`,jk=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
84
|
+
<path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
|
|
85
|
+
<path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
|
|
86
|
+
</symbol>`,Mk=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
87
|
+
<path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
|
|
88
|
+
</symbol>`,Nk=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
89
|
+
<path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
|
|
90
|
+
</symbol>`,Pk=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
91
|
+
<path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
|
|
92
|
+
</symbol>`,Fk=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
93
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
|
|
94
|
+
</symbol>`,Ik=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
95
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
96
|
+
<path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
|
|
97
|
+
</symbol>`,Lk=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
98
|
+
<path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
|
|
99
|
+
<path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
|
|
100
|
+
</symbol>`,Rk=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
101
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
102
|
+
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
|
|
103
|
+
</symbol>`,zk=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
104
|
+
<path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
|
|
105
|
+
</symbol>`,Bk=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
106
|
+
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
107
|
+
</symbol>`,Vk=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
108
|
+
<path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
|
|
109
|
+
<path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
|
|
110
|
+
</symbol>`,Hk=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
111
|
+
<defs>
|
|
112
|
+
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
113
|
+
<stop stop-color="currentColor"/>
|
|
114
|
+
<stop offset="1" stop-color="currentColor" stop-opacity="0"/>
|
|
115
|
+
</linearGradient>
|
|
116
|
+
</defs>
|
|
117
|
+
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
118
|
+
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
119
|
+
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
120
|
+
</symbol>`,Uk=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
121
|
+
<path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
|
|
122
|
+
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
123
|
+
</symbol>`,Wk=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
124
|
+
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
|
|
125
|
+
</symbol>`,Gk=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
126
|
+
<path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
|
|
127
|
+
</symbol>`,Kk=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
128
|
+
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
129
|
+
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
130
|
+
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
131
|
+
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
132
|
+
</symbol>`,qk=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
133
|
+
<path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
|
|
134
|
+
<path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
|
|
135
|
+
</symbol>`,Jk=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
136
|
+
<path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
|
|
137
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
|
|
138
|
+
</symbol>`,Yk=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
139
|
+
<path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
|
|
140
|
+
</symbol>`,Xk=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
141
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
|
|
142
|
+
</symbol>`,Zk=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
143
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
|
|
144
|
+
</symbol>`,Qk=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
145
|
+
<path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
|
|
146
|
+
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
147
|
+
</symbol>`,$k=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
148
|
+
<path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
|
|
149
|
+
</symbol>`,eA=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
150
|
+
<path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
|
|
151
|
+
<path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
|
|
152
|
+
</symbol>`,tA=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
153
|
+
<path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
|
|
154
|
+
<path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
|
|
155
|
+
</symbol>`,nA=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
156
|
+
<path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
|
|
157
|
+
</symbol>`,rA=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
158
|
+
<path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
|
|
159
|
+
<path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
160
|
+
</symbol>`,iA=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
161
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
|
|
162
|
+
</symbol>`,aA=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
163
|
+
<path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
|
|
164
|
+
</symbol>`,oA=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
165
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
|
|
166
|
+
<path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
|
|
167
|
+
</symbol>`,sA=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
168
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
169
|
+
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
|
|
170
|
+
</symbol>`,cA=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
171
|
+
<path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
|
|
172
|
+
</symbol>`,lA=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
173
|
+
<path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
|
|
174
|
+
<path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
|
|
175
|
+
<path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
|
|
176
|
+
</symbol>`,uA=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
177
|
+
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
178
|
+
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
179
|
+
</symbol>`,dA=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
180
|
+
<path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
|
|
181
|
+
<path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
|
|
182
|
+
<path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
|
|
183
|
+
</symbol>`,fA=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
184
|
+
<path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
|
|
185
|
+
<path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
|
|
186
|
+
</symbol>`,pA=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
187
|
+
<path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
|
|
188
|
+
</symbol>`,mA=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
189
|
+
<path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
|
|
190
|
+
<path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
|
|
191
|
+
</symbol>`,hA=[xk,Dk,Ok,kk,Mk,Nk,Pk,Ik,Lk,Rk,zk,Bk,Vk,qk,Yk,Xk,nA,rA,oA,sA,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
192
|
+
<path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
|
|
193
|
+
<path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
|
|
194
|
+
</symbol>`],gA=[yk,bk,Sk,Ck,wk,Tk,Ek,Ak,jk,Fk,Hk,Uk,Wk,Gk,Kk,Jk,Zk,Qk,$k,eA,tA,iA,aA,cA,lA,uA,dA,fA,pA,mA];function _A(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
195
|
+
`)}\n</svg>`)}var vA=_A(vk,hA),yA={minimal:vk,standard:vA,complete:_A(vA,gA)},bA={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},xA={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,htm:`html`,html:`html`,icns:`image`,ico:`image`,ini:`text`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},SA={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},CA=new Set([`bash`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),wA=new Set([`complete`]);function TA(e){return yA[e===`none`?`minimal`:e]}function EA(e){return`file-tree-builtin-${e}`}function DA(e){return e!==`none`&&wA.has(e)}function OA(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=bA[t.toLowerCase()];if(i!=null&&(r||CA.has(i)))return i;for(let e of n){if(r){let t=SA[e];if(t!=null)return t}let t=xA[e];if(t!=null&&(r||CA.has(t)))return t}return`default`}var kA=`file-tree-container`,AA=`data-file-tree-style`,jA=`data-file-tree-unsafe-css`,MA=`data-file-tree-scrollbar-measure`,NA=`data-file-tree-scrollbar-gutter-measured`,PA=`--trees-scrollbar-gutter-measured`,FA=`header`,IA=`context-menu`,LA=`context-menu-trigger`;function RA(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function zA(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(RA(e)?`none`:`complete`),colored:e.colored??!0}}var BA=e=>e.trim().toLowerCase(),VA=e=>e.split(`/`).at(-1)??e,HA=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function UA(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function WA(e){let t=zA(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(BA(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let n=VA(o),s=n.toLowerCase(),c=r.get(s);if(c!=null)return UA(c,e);for(let[t,n]of a)if(s.includes(t))return UA(n,e);let l=HA(n);for(let t of l){let n=i.get(t);if(n!=null)return UA(n,e)}let u=OA(t.set,n,l);if(u!=null&&t.set!==`none`)return{name:EA(u),remappedFrom:e,token:u}}let s=n?.[e];return s==null?{name:e}:UA(s,e)}}}var GA=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,KA=/^0(?:\.0+)?%?$/;function qA(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function JA(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||GA.test(t))return!0;let n=qA(t);return n!=null&&KA.test(n)}function YA(e){return JA(e)?void 0:e}function XA(e){let t=e.colors??{},n=t[`sideBar.background`]??t[`editor.background`]??e.bg,r=t[`sideBar.foreground`]??t[`editor.foreground`]??e.fg,i=t[`sideBar.border`],a=t[`list.activeSelectionForeground`]??t[`sideBar.foreground`],o=n?.toLowerCase(),s=t[`list.hoverBackground`],c=s?.toLowerCase()===o?void 0:s,l=t[`list.activeSelectionBackground`],u=l?.toLowerCase()===o?t[`list.focusBackground`]??t[`editor.selectionBackground`]:l??t[`editor.selectionBackground`],d=YA(t[`list.focusOutline`])??YA(t.focusBorder),f=t[`input.background`]??n,p=t[`input.border`],m=t[`scrollbarSlider.background`],h=t[`sideBarSectionHeader.foreground`]??r,g=t[`gitDecoration.addedResourceForeground`]??t[`terminal.ansiGreen`]??t[`editorGutter.addedBackground`],_=t[`gitDecoration.modifiedResourceForeground`]??t[`terminal.ansiBlue`]??t[`editorGutter.modifiedBackground`],v=t[`gitDecoration.deletedResourceForeground`]??t[`terminal.ansiRed`]??t[`editorGutter.deletedBackground`],y=e.type===`dark`,b={colorScheme:y?`dark`:`light`,backgroundColor:n??``,color:r??``,borderColor:`var(--trees-theme-sidebar-border, light-dark(oklch(0% 0 0 / 0.15), oklch(100% 0 0 / 0.15)))`,"--trees-theme-sidebar-bg":n??``,"--trees-theme-sidebar-fg":r??``,"--trees-theme-sidebar-header-fg":h??``,"--trees-theme-list-active-selection-fg":a??r??``,"--trees-theme-list-hover-bg":c??(y?`rgba(255,255,255,0.08)`:`rgba(0,0,0,0.06)`),"--trees-theme-list-active-selection-bg":u??`transparent`,"--trees-theme-focus-ring":d??r??``,"--trees-theme-input-bg":f??``};return i!=null&&i!==``&&(b[`--trees-theme-sidebar-border`]=i),p!=null&&p!==``&&(b[`--trees-theme-input-border`]=p),m!=null&&m!==``&&(b[`--trees-theme-scrollbar-thumb`]=m),g!=null&&g!==``&&(b[`--trees-theme-git-added-fg`]=g),_!=null&&_!==``&&(b[`--trees-theme-git-modified-fg`]=_),v!=null&&v!==``&&(b[`--trees-theme-git-deleted-fg`]=v),b}var ZA=5,QA=1<<ZA,$A=QA*4;function ej(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function tj(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function nj(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function rj(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function ij(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function aj(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function oj(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,uj(e,t)}function sj(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=rj(e).get(t);if(i===void 0)return;let a=i>>ZA;e.childVisibleChunkSums[a]+=r}function cj(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=dj(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=QA}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function lj(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>ZA;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<ZA}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function uj(e,t){if(t.childIds.length<$A){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/QA),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>ZA]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function dj(e,t,n,r){let i=Math.min(t.childIds.length,n+QA),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var fj=7,pj=3,mj=1<<pj,hj=4;function gj(e,t,n=0){return e<<hj|n<<pj|t}function _j(e){return e.depthAndFlags>>>hj}function vj(e){return(e.depthAndFlags&mj)>>pj}function yj(e){return(e.depthAndFlags&mj)!==0}function bj(e){return e.depthAndFlags&fj}function xj(e,t){return(bj(e)&t)!==0}function Sj(e,t){e.depthAndFlags|=t}function Cj(e,t){e.depthAndFlags=gj(t,bj(e),vj(e))}var wj=Symbol(`benchmarkInstrumentation`);function Tj(e,t){return t==null||Object.defineProperty(e,wj,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function Ej(e){return e==null?null:e[wj]??null}function Dj(e,t,n){return e==null?n():e.measurePhase(t,n)}function Oj(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function kj(e){return e>=48&&e<=57}function Aj(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!kj(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&kj(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function jj(e){let t=e.toLowerCase();return{lowerValue:t,tokens:Aj(t)}}function Mj(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function Nj(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=Mj(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function Pj(e,t,n){let r=Nj(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function Fj(e,t){return Pj(e,t,jj)}function Ij(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function Lj(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=Ij(e,r);return a===Ij(t,r)?Fj(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function Rj(e,t){return Lj(e,t)}function zj(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=jj(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=Ij(e,n);return o===Ij(t,n)?Pj(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function Bj(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=jj(r);return e.sortKeyById[t]=i,i}function Vj(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function Hj(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function Uj(e){let{hasTrailingSlash:t,segments:n}=Hj(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function Wj(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=Hj(e);return{requiresDirectory:t,segments:n}}var Gj=``;function Kj(){let e=new Map;return e.set(Gj,0),{idByValue:e,valueById:[Gj],sortKeyById:[jj(Gj)]}}function qj(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function Jj(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var Yj=Symbol(`pathStorePreparedInputKind`);function Xj(e,t){return e[Yj]=t,e}function Zj(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function Qj(e,t,n){return n===`default`?Rj(e,t):n(Zj(e),Zj(t))}function $j(){return{depthAndFlags:gj(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function eM(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function tM(e){return e.isDirectory?e.segments.length:e.segments.length-1}function nM(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function rM(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function iM(e,t={}){return uM(e,t).map(e=>e.path)}function aM(e,t={}){let n=uM(e,t);return Xj({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function oM(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return Xj({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function sM(e){let t=e,n=t.preparedPaths;if(t[Yj]===`prepared`&&n!=null)return n;if(!nM(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function cM(e){let t=e;return t[Yj]===`presorted`&&t.presortedPaths!=null||rM(t.presortedPaths)?t.presortedPaths:null}function lM(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function uM(e,t={}){let n=Vj(t),r=Ej(t);Oj(r,`workload.inputFiles`,e.length);let i=Dj(r,`store.preparePathEntries.parse`,()=>e.map(e=>Uj(e)));return Dj(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>Qj(e,t,n.sort))),i}var dM=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[$j()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=Kj();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=Ej(e),this.options=Vj(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,ej())}appendPaths(e){return Dj(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>Uj(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,Dj(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return Dj(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null)if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:gj(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:gj(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:gj(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=Uj(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null)if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:gj(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:gj(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=Uj(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(Dj(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||Dj(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort===`default`?zj(this.lastPreparedPath,e,this.segmentSortKeyCache):Qj(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=tM(e),i=n==null?0:tM(n),a=n==null?0:eM(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=qj(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:gj(_j(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),ij(i,s),s}createFileChildUnchecked(e,t){let n=qj(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:gj(_j(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),ij(r,a),a}getOrCreateDirectoryChild(e,t){let n=qj(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!yj(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:gj(_j(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),ij(r,a),this.directories.set(a,ej()),a}createDirectoryChild(e,t){let n=qj(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:gj(_j(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),ij(r,a),this.directories.set(a,ej()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!yj(n))throw Error(`Path is not a directory: "${t}"`);if(xj(n,1))throw Error(`Duplicate path: "${t}"`);Sj(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,tj());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(yj(a)){let t=tj();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;yj(n)&&this.directories.set(t,ej());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),ij(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!yj(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return oj(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function fM(e,t=`closed`,n=null){let r=mM(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function pM(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function mM(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function hM(e,t){return xj(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:_j(t)<=e.defaultExpansion}function gM(e,t,n=e.snapshot.nodes[t]){return n==null||!yj(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:hM(e,n)}function _M(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!yj(r))return;let i=hM(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function vM(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function yM(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function bM(e,t){let n=vM(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function xM(e,t){let n=vM(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function SM(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function CM(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function wM(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function TM(e,t){e.directoryLoadInfoById.delete(t)}function EM(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function DM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function OM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function kM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function AM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function jM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function MM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function NM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function PM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function FM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function IM(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function LM(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function RM(e,t,n){return{...n,visibleCountDelta:YM(e)-t}}function zM(e,t){let n=YM(e),r=pM();e.transactionStack.push(r);try{t()}catch(t){throw HM(e,r,!1),t}HM(e,r,!0,YM(e)-n)}function BM(e,t){let n=e.instrumentation;if(n==null){VM(e,t);return}Dj(n,`store.events.record`,()=>VM(e,t))}function VM(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){qM(e,t);return}n.events.push(t),KM(n,t)}function HM(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?GM(i,t):Dj(n,`store.events.batch.merge`,()=>GM(i,t));return}let a=UM(t,r),o=e.instrumentation;if(o==null){qM(e,a);return}Dj(o,`store.events.batch.commit`,()=>qM(e,a))}function UM(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function WM(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function GM(e,t){for(let n of t.events)e.events.push(n);WM(e,t)}function KM(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function qM(e,t){let n=e.instrumentation;if(n==null){JM(e,t);return}Dj(n,`store.events.emit`,()=>JM(e,t))}function JM(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function YM(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function XM(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!yj(n)||xj(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!yj(a)?null:i}function ZM(e,t){let n=t;for(;;){let t=XM(e,n);if(t==null)return n;n=t}}function QM(e,t){let n=[t],r=t;for(;;){let t=XM(e,r);if(t==null)return n;n.push(t),r=t}}function $M(e,t){let n=t==null?e.snapshot.rootId:lN(e,t);return n==null?[]:pN(e,n)}function eN(e,t){let n=Uj(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=ON(e,DN(e,r)),{createdNodeIds:a,directoryId:o}=mN(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=fN(e,o);if(xj(n,1))throw Error(`Path already exists: "${t}"`);Sj(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=gN(e,o,n.basename),s.add(c);oN(e,o);let l=ON(e,o);return DM({affectedAncestorIds:cN(e,c),affectedNodeIds:[...s],path:t,projectionChanged:kN(i,l)})}function tN(e,t,n){let r=lN(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=fN(e,r);if(xj(i,2))throw Error(`The root node cannot be removed`);if(yj(i)&&dN(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=ON(e,a),s=TN(e,r);yN(e,a,r,i.nameId),EN(e,a),oN(e,a);let c=ON(e,a);return OM({affectedAncestorIds:cN(e,a),affectedNodeIds:s,path:t,projectionChanged:kN(o,c),recursive:n.recursive===!0})}function nN(e,t,n,r){let i=lN(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=fN(e,i);if(xj(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=CN(e,i,n),c=ON(e,a.parentId),l=ON(e,s.parentId),u=Jj(e.snapshot.segmentTable,a.nameId),d=qj(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(yj(a)&&NN(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=nj(e.snapshot.nodes,dN(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&wN(e,p,o,vj(a))===`skip`)return null;let m=a.parentId;yN(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),MN(e,i),vN(e,s.parentId,i),EN(e,m),e.pathCacheVersion++,oN(e,m),s.parentId!==m&&oN(e,s.parentId);let h=ON(e,m),g=ON(e,s.parentId);return kM({affectedAncestorIds:[...new Set([...cN(e,m),...cN(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:AN([c,l],[h,g]),to:aN(e,i)})}function rN(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function iN(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function aN(e,t){let n=fN(e,t),r=rN(e,t);if(r!=null)return r;if(xj(n,2))return iN(e,t,``);let i=aN(e,n.parentId),a=Jj(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return iN(e,t,yj(n)?`${o}/`:o)}function oN(e,t){let n=e.instrumentation;if(n==null){FN(e,t);return}Dj(n,`store.recomputeCountsUpwardFrom`,()=>FN(e,t))}function sN(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!yj(o)){PN(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){PN(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function cN(e,t){let n=[],r=t;for(;r!=null;){let t=fN(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function lN(e,t){if(t.length===0)return e.snapshot.rootId;let n=Wj(t);return uN(e,n.segments,n.requiresDirectory)}function uN(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=dN(e,r),a=nj(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=fN(e,r);return n&&!yj(i)?null:r}function dN(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function fN(e,t){let n=e.snapshot.nodes[t];if(n===void 0||xj(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function pN(e,t){let n=e.snapshot.nodes[t];if(n===void 0||xj(n,4))return[];if(!yj(n))return[aN(e,t)];if(dN(e,t).childIds.length===0)return xj(n,1)&&!xj(n,2)?[aN(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||xj(n,4)){i.pop();continue}if(!yj(n)){r.push(aN(e,t.nodeId)),i.pop();continue}let a=dN(e,t.nodeId);if(a.childIds.length===0){xj(n,1)&&!xj(n,2)&&r.push(aN(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function mN(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=qj(e.snapshot.segmentTable,i),a=dN(e,r),o=nj(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!yj(fN(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=hN(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function hN(e,t,n){let r=fN(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:gj(_j(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,ej()),vN(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function gN(e,t,n){let r=qj(e.snapshot.segmentTable,n),i=dN(e,t);if(nj(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${LN(e,t,n)}"`);let a=fN(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:gj(_j(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),vN(e,t,o),e.activeNodeCount++,o}function _N(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}bN(e,n,o)<0?i=a:r=a+1}return r}function vN(e,t,n){let r=dN(e,t),i=fN(e,n);nj(e.snapshot.nodes,r).set(i.nameId,n),sj(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=_N(e,r,n);r.childIds.splice(a,0,n),aj(r,a),uj(e.snapshot.nodes,r)}function yN(e,t,n,r){let i=dN(e,t),a=rj(i),o=a.get(n)??-1;nj(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&sj(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),aj(i,o),uj(e.snapshot.nodes,i))}function bN(e,t,n){let r=e.snapshot.options.sort;return r===`default`?xN(e,t,n):r(SN(e,t),SN(e,n))}function xN(e,t,n){let r=fN(e,t),i=fN(e,n),a=yj(r);if(a!==yj(i))return a?-1:1;let o=Nj(Bj(e.snapshot.segmentTable,r.nameId),Bj(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=Jj(e.snapshot.segmentTable,r.nameId),c=Jj(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function SN(e,t){let n=fN(e,t),r=aN(e,t),i=yj(n),a=i?r.slice(0,-1):r;return{basename:Jj(e.snapshot.segmentTable,n.nameId),depth:_j(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function CN(e,t,n){let r=fN(e,t),i=lN(e,n);if(i!=null){let t=fN(e,i);if(yj(t))return{basename:Jj(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=Wj(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=Wj(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:uN(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function wN(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${aN(e,t)}"`);let i=fN(e,t);if(vj(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(yj(i)&&dN(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return TN(e,t),yN(e,a,t,o),EN(e,a),oN(e,a),`handled`}function TN(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=fN(e,t.nodeId);if(t.visitedChildren||!yj(i)){yj(i)&&e.snapshot.directories.delete(t.nodeId),Sj(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),TM(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=dN(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function EN(e,t){let n=t;for(;n!=null;){let t=fN(e,n);if(!yj(t)||xj(t,2)||dN(e,n).childIds.length>0)return;Sj(t,1),n=t.parentId===n?null:t.parentId}}function DN(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=nj(e.snapshot.nodes,dN(e,n)).get(t);if(i==null||!yj(fN(e,i)))break;n=i}return n}function ON(e,t){let n=jN(e,t);if(n==null)return null;let r=ZM(e,n),i=fN(e,r),a=n===r?null:QM(e,n).map(t=>aN(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:dN(e,r).childIds.length>0,path:aN(e,r),terminalKind:vj(i)})}function kN(e,t){return AN([e],[t])}function AN(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function jN(e,t){let n=t;for(;n!=null;){let t=fN(e,n);if(!yj(t)||xj(t,2))return null;if(!gM(e,n,t))return n;n=t.parentId}return null}function MN(e,t){let n=fN(e,t);if(Cj(n,(t===e.snapshot.rootId?-1:_j(fN(e,n.parentId)))+1),!yj(n))return;let r=dN(e,t);for(let t of r.childIds)MN(e,t)}function NN(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=fN(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function PN(e,t,n=fN(e,t),r=!1){let i=e.instrumentation;if(i==null){IN(e,t,n,r);return}Dj(i,`store.recomputeNodeCounts`,()=>IN(e,t,n,r))}function FN(e,t){let n=t;for(;n!=null;){let t=fN(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(PN(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&sj(dN(e,s),n,a,o),n=s}}function IN(e,t,n,r){if(!yj(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=dN(e,t);if(r){let t=e.instrumentation;t==null?oj(e.snapshot.nodes,i):Dj(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>oj(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,xj(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=XM(e,t)==null?gM(e,t,n)?1+o:1:o}function LN(e,t,n){let r=aN(e,t);return r.length===0?n:`${r}${n}`}function RN(e){return e!=null&&!xj(e,4)}function zN(e,t){let n=e.snapshot.nodes[t];return!RN(n)||!yj(n)||xj(n,2)?null:n}function BN(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&RN(e.snapshot.nodes[n])&&(t+=1);return t}function VN(e){return Math.max(0,e.valueById.length-1)}function HN(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:BN(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:VN(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function UN(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function WN(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)zN(e,n)!=null&&t.push(aN(e,n));for(let t of e.expandedDirectoryIds)zN(e,t)!=null&&n.push(aN(e,t));return{collapsedPaths:t,expandedPaths:n}}function GN(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)zN(e,n)==null||yM(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:aN(e,n)});return t}function KN(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=lN(e,n);t!=null&&_M(e,t,!0,fN(e,t))}for(let n of t.collapsedPaths){let t=lN(e,n);t!=null&&_M(e,t,!1,fN(e,t))}}function qN(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=lN(e,n.path);t!=null&&zN(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function JN(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function YN(e){let t=e.snapshot.segmentTable,n=Kj();for(let r of e.snapshot.nodes)if(RN(r)){if(xj(r,2)){r.nameId=0;continue}r.nameId=qj(n,Jj(t,r.nameId))}e.snapshot.segmentTable=n}function XN(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!RN(r)||!yj(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return RN(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[fN(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),oj(e.snapshot.nodes,n)}}function ZN(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(RN(n))break;--t}e.snapshot.nodes.length=t+1}function QN(e){let t=WN(e),n=GN(e);Dj(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>JN(e)),Dj(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>YN(e)),Dj(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>XN(e)),Dj(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>ZN(e)),Dj(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>KN(e,t)),Dj(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>qN(e,n)),Dj(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>sN(e,e.snapshot.rootId))}function $N(e){let t=WN(e),n=GN(e),r=Dj(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>$M(e)),i=Tj({...e.snapshot.options},e.instrumentation),a=Dj(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new dM(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,Dj(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>KN(e,t)),Dj(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>qN(e,n)),Dj(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>sN(e,e.snapshot.rootId))}function eP(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function tP(e,t){let n=HN(e);t===`stable`?Dj(e.instrumentation,`store.cleanup.stable`,()=>QN(e)):Dj(e.instrumentation,`store.cleanup.aggressive`,()=>$N(e));let r=HN(e);return UN(t,t===`stable`,n,r)}var nP=64;function rP(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function iP(e){return fN(e,e.snapshot.rootId).visibleSubtreeCount}function aP(e,t,n,r){let i=fN(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function oP(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:TP(e,t.cursor),setSize:t.setSize,subtreeEndIndex:aP(e,t.cursor,t.index,n)}}function sP(e,t,n,r,i,a){let o=dN(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=cj(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return cP(e,u,l,r+c,i+1,s,o.childIds.length,a)}function cP(e,t,n,r,i,a,o,s){if(!yj(fN(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=yP(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=fN(e,c.terminalNodeId);if(!yj(l)||!gM(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return sP(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function lP(e,t){let n=iP(e);if(t<0||t>=n)return null;let r=sP(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>aN(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=oP(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:TP(e,r.cursor),setSize:r.setSize,subtreeEndIndex:aP(e,r.cursor,r.index,n)}}function uP(e,t,n){let r=e.instrumentation,i=iP(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return wP(e,o+1);let t=[],n=gP(e,a);for(let r=a;r<=o&&n!=null;r++){let r=TP(e,n);t.push(r),n=xP(e,n)}return t}let s=[],c=0,l=0,u=Dj(r,`store.getVisibleSlice.selectFirstRow`,()=>gP(e,a));for(let t=a;t<=o&&u!=null;t++){let t=Dj(r,`store.getVisibleSlice.materializeRow`,()=>TP(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=Dj(r,`store.getVisibleSlice.advanceCursor`,()=>xP(e,u))}return Oj(r,`workload.visibleRowsRead`,s.length),Oj(r,`workload.flattenedRowsRead`,c),Oj(r,`workload.flattenedSegmentsRead`,l),s}function dP(e,t=iP(e)){let n=e.instrumentation;return n==null?CP(e,t):Dj(n,`store.getVisibleTreeProjection`,()=>CP(e,t))}function fP(e){return SP(dP(e))}function pP(e,t){let n=lN(e,t);if(n==null||n===e.snapshot.rootId||yj(fN(e,n))&&ZM(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=fN(e,i).parentId,n=dN(e,t),s=rj(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=lj(a,n,s),t!==o){let n=fN(e,t),a=XM(e,t);if(!gM(e,t,n)&&a!==i)return null;ZM(e,t)===t&&(r+=1)}i=t}return r}function mP(e,t){let n=lN(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=fN(e,n);if(!yj(r))throw Error(`Path is not a directory: "${t}"`);return gM(e,n,r)?null:(_M(e,n,!0,r),oN(e,n),AM({affectedAncestorIds:cN(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function hP(e,t){let n=lN(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=fN(e,n);if(!yj(r))throw Error(`Path is not a directory: "${t}"`);return gM(e,n,r)?(_M(e,n,!1,r),oN(e,n),jM({affectedAncestorIds:cN(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function gP(e,t){return t<0||t>=iP(e)?null:_P(e,e.snapshot.rootId,t,-1)}function _P(e,t,n,r){let i=dN(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?cj(e.snapshot.nodes,i,n):Dj(a,`store.getVisibleSlice.selectChildIndex`,()=>cj(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return vP(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function vP(e,t,n,r){if(!yj(fN(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=yP(e,t,r);if(n===0)return i;let a=fN(e,i.terminalNodeId);if(!yj(a)||!gM(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return _P(e,i.terminalNodeId,n-1,i.visibleDepth)}function yP(e,t,n){return yj(fN(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:ZM(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:Dj(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>ZM(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function bP(e,t){let n=fN(e,t);if(!yj(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:XM(e,r)!==t}function xP(e,t){let n=fN(e,t.terminalNodeId);if(yj(n)){let r=dN(e,t.terminalNodeId);if(gM(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:vP(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=fN(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=dN(e,n),o=rj(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return vP(e,s,0,i);bP(e,r)&&i--,r=n}}function SP(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function CP(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(nP);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=rP(o,y);let x,S=_;if(yj(v))S=f?ZM(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:aN(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&yj(C)&&gM(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function wP(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!yj(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:aN(e,f)};continue}let h=l?ZM(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=TP(e,g);let _=i[h];_!=null&&yj(_)&&gM(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function TP(e,t){let n=fN(e,t.terminalNodeId),r=yj(n)?EP(e,t):null,i=aN(e,t.terminalNodeId),a=Jj(e.snapshot.segmentTable,n.nameId),o=yj(n)&&dN(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?QM(e,t.headNodeId).map(n=>{let r=fN(e,n);return{isTerminal:n===t.terminalNodeId,name:Jj(e.snapshot.segmentTable,r.nameId),nodeId:n,path:aN(e,n)}}):Dj(c,`store.getVisibleSlice.flatten.collectSegments`,()=>QM(e,t.headNodeId).map(n=>{let r=fN(e,n);return{isTerminal:n===t.terminalNodeId,name:Jj(e.snapshot.segmentTable,r.nameId),nodeId:n,path:aN(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:yj(n)&&gM(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:yj(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function EP(e,t){if(t.headNodeId===t.terminalNodeId)return yM(e,t.terminalNodeId);let n=QM(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=yM(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function DP(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!yj(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&uj(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&yj(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,uj(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function OP(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var kP=class e{#e;constructor(e={}){let t=Ej(e),n=Dj(t,`store.builder.create`,()=>new dM(e));if(e.preparedInput!=null){let t=cM(e.preparedInput);t==null?n.appendPreparedPaths(sM(e.preparedInput),!1):n.appendPresortedPaths(t,lM(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(Dj(t,`store.preparePathEntries`,()=>uM(r,e)))}let r=Dj(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=Dj(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=Dj(t,`store.state.create`,()=>fM(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:Dj(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||OP(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&Dj(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?Dj(t,`store.state.initializeOpenVisibleCounts`,()=>DP(this.#e)):Dj(t,`store.state.recomputeCounts`,()=>sN(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return iM(e,t)}static prepareInput(e,t={}){return aM(e,t)}static preparePresortedInput(e){return oM(e)}list(e){return Dj(this.#e.instrumentation,`store.list`,()=>$M(this.#e,e))}add(e){Dj(this.#e.instrumentation,`store.add`,()=>{let t=iP(this.#e);BM(this.#e,RM(this.#e,t,eN(this.#e,e)))})}remove(e,t={}){Dj(this.#e.instrumentation,`store.remove`,()=>{let n=iP(this.#e);BM(this.#e,RM(this.#e,n,tN(this.#e,e,t)))})}move(e,t,n={}){Dj(this.#e.instrumentation,`store.move`,()=>{let r=iP(this.#e),i=nN(this.#e,e,t,n);i!=null&&BM(this.#e,RM(this.#e,r,i))})}batch(e){zM(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return Dj(this.#e.instrumentation,`store.getVisibleCount`,()=>iP(this.#e))}getVisibleSlice(e,t){return Dj(this.#e.instrumentation,`store.getVisibleSlice`,()=>uP(this.#e,e,t))}getVisibleRowContext(e){return Dj(this.#e.instrumentation,`store.getVisibleRowContext`,()=>lP(this.#e,e))}getVisibleTreeProjection(){return fP(this.#e)}getVisibleTreeProjectionData(e){return dP(this.#e,e)}getVisibleIndex(e){return Dj(this.#e.instrumentation,`store.getVisibleIndex`,()=>pP(this.#e,e))}getPathInfo(e){return Dj(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=lN(this.#e,e);if(t==null)return null;let n=fN(this.#e,t);return{depth:_j(n),kind:yj(n)?`directory`:`file`,path:aN(this.#e,t)}})}isExpanded(e){return Dj(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=fN(this.#e,t);return gM(this.#e,t,n)})}expand(e){Dj(this.#e.instrumentation,`store.expand`,()=>{let t=iP(this.#e),n=mP(this.#e,e);n!=null&&BM(this.#e,RM(this.#e,t,n))})}collapse(e){Dj(this.#e.instrumentation,`store.collapse`,()=>{let t=iP(this.#e),n=hP(this.#e,e);n!=null&&BM(this.#e,RM(this.#e,t,n))})}on(e,t){return EM(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return yM(this.#e,t)}markDirectoryUnloaded(e){Dj(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(dN(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=iP(this.#e);xM(this.#e,t),BM(this.#e,RM(this.#e,n,MM({affectedAncestorIds:cN(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return Dj(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=iP(this.#e),r=bM(this.#e,t);return BM(this.#e,RM(this.#e,n,NM({affectedAncestorIds:cN(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return Dj(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||yM(this.#e,n)!==`loading`||!CM(this.#e,n,e.attemptId))return!1;let r=aN(this.#e,n);this.validateChildPatch(r,t);let i=iP(this.#e),a=[];for(let e of t.operations){AP(r,e);let t=iP(this.#e);switch(e.type){case`add`:a.push(RM(this.#e,t,eN(this.#e,e.path)));break;case`remove`:a.push(RM(this.#e,t,tN(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=nN(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(RM(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return BM(this.#e,RM(this.#e,i,PM({affectedAncestorIds:cN(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:aN(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return Dj(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=iP(this.#e),r=SM(this.#e,t,e.attemptId);return BM(this.#e,RM(this.#e,n,FM({affectedAncestorIds:cN(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:aN(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return Dj(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=iP(this.#e),i=wM(this.#e,n,e.attemptId,t);return BM(this.#e,RM(this.#e,r,IM({affectedAncestorIds:cN(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:aN(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return Dj(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(eP(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=iP(this.#e),n=tP(this.#e,e.mode??`stable`);return BM(this.#e,RM(this.#e,t,LM({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=dN(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??jj(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=Nj(Bj(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!yj(fN(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=fN(this.#e,n);gM(this.#e,n,i)||(_M(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=fN(this.#e,e);if(!gM(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=lN(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!yj(fN(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!yj(fN(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=fN(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=fN(this.#e,e),r=XM(this.#e,e);if(!gM(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function AP(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`);break}}var jP={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function MP(e,t){if(typeof e==`number`)return{itemHeight:t??jP.default.itemHeight,factor:e};let n=jP[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var NP=jP.default.itemHeight,PP=`@layer base, theme, unsafe;
|
|
196
|
+
|
|
197
|
+
@layer base {
|
|
198
|
+
:host {
|
|
199
|
+
/*
|
|
200
|
+
CSS variables use a fallback stack to ensure user and theme colors slot
|
|
201
|
+
in with ease. User colors take precedence over theme colors, which take
|
|
202
|
+
precedence over defaults.
|
|
203
|
+
|
|
204
|
+
Fallback order:
|
|
205
|
+
|
|
206
|
+
1. --trees-*-override (explicit)
|
|
207
|
+
2. --trees-theme-* (e.g. Shiki/VS Code tokens)
|
|
208
|
+
3. defaults
|
|
209
|
+
|
|
210
|
+
Theme variable names mirror Shiki/VS Code theme file JSON tokens.
|
|
211
|
+
|
|
212
|
+
// Available CSS Color Overrides
|
|
213
|
+
--trees-fg-override
|
|
214
|
+
--trees-fg-muted-override
|
|
215
|
+
--trees-bg-override
|
|
216
|
+
--trees-bg-muted-override
|
|
217
|
+
--trees-accent-override
|
|
218
|
+
--trees-border-color-override
|
|
219
|
+
|
|
220
|
+
--trees-focus-ring-color-override
|
|
221
|
+
--trees-focus-ring-width-override
|
|
222
|
+
--trees-focus-ring-offset-override
|
|
223
|
+
|
|
224
|
+
--trees-search-fg-override
|
|
225
|
+
--trees-search-font-weight-override
|
|
226
|
+
--trees-search-bg-override
|
|
227
|
+
|
|
228
|
+
--trees-selected-fg-override
|
|
229
|
+
--trees-selected-bg-override
|
|
230
|
+
--trees-selected-focused-border-color-override
|
|
231
|
+
|
|
232
|
+
// Git Status Color Overrides
|
|
233
|
+
--trees-status-added-override
|
|
234
|
+
--trees-status-ignored-override
|
|
235
|
+
--trees-status-modified-override
|
|
236
|
+
--trees-status-renamed-override
|
|
237
|
+
--trees-status-untracked-override
|
|
238
|
+
--trees-status-deleted-override
|
|
239
|
+
--trees-git-added-color-override
|
|
240
|
+
--trees-git-ignored-color-override
|
|
241
|
+
--trees-git-modified-color-override
|
|
242
|
+
--trees-git-renamed-color-override
|
|
243
|
+
--trees-git-untracked-color-override
|
|
244
|
+
--trees-git-deleted-color-override
|
|
245
|
+
|
|
246
|
+
// Built-in File Icon Color Overrides
|
|
247
|
+
--trees-file-icon-color
|
|
248
|
+
--trees-file-icon-color-astro
|
|
249
|
+
--trees-file-icon-color-babel
|
|
250
|
+
--trees-file-icon-color-bash
|
|
251
|
+
--trees-file-icon-color-biome
|
|
252
|
+
--trees-file-icon-color-bootstrap
|
|
253
|
+
--trees-file-icon-color-browserslist
|
|
254
|
+
--trees-file-icon-color-bun
|
|
255
|
+
--trees-file-icon-color-claude
|
|
256
|
+
--trees-file-icon-color-css
|
|
257
|
+
--trees-file-icon-color-database
|
|
258
|
+
--trees-file-icon-color-default
|
|
259
|
+
--trees-file-icon-color-docker
|
|
260
|
+
--trees-file-icon-color-eslint
|
|
261
|
+
--trees-file-icon-color-git
|
|
262
|
+
--trees-file-icon-color-go
|
|
263
|
+
--trees-file-icon-color-graphql
|
|
264
|
+
--trees-file-icon-color-html
|
|
265
|
+
--trees-file-icon-color-image
|
|
266
|
+
--trees-file-icon-color-javascript
|
|
267
|
+
--trees-file-icon-color-json
|
|
268
|
+
--trees-file-icon-color-markdown
|
|
269
|
+
--trees-file-icon-color-mcp
|
|
270
|
+
--trees-file-icon-color-npm
|
|
271
|
+
--trees-file-icon-color-oxc
|
|
272
|
+
--trees-file-icon-color-postcss
|
|
273
|
+
--trees-file-icon-color-prettier
|
|
274
|
+
--trees-file-icon-color-python
|
|
275
|
+
--trees-file-icon-color-react
|
|
276
|
+
--trees-file-icon-color-ruby
|
|
277
|
+
--trees-file-icon-color-rust
|
|
278
|
+
--trees-file-icon-color-sass
|
|
279
|
+
--trees-file-icon-color-svg
|
|
280
|
+
--trees-file-icon-color-svelte
|
|
281
|
+
--trees-file-icon-color-svgo
|
|
282
|
+
--trees-file-icon-color-swift
|
|
283
|
+
--trees-file-icon-color-table
|
|
284
|
+
--trees-file-icon-color-text
|
|
285
|
+
--trees-file-icon-color-tailwind
|
|
286
|
+
--trees-file-icon-color-terraform
|
|
287
|
+
--trees-file-icon-color-typescript
|
|
288
|
+
--trees-file-icon-color-vite
|
|
289
|
+
--trees-file-icon-color-vscode
|
|
290
|
+
--trees-file-icon-color-vue
|
|
291
|
+
--trees-file-icon-color-wasm
|
|
292
|
+
--trees-file-icon-color-webpack
|
|
293
|
+
--trees-file-icon-color-yml
|
|
294
|
+
--trees-file-icon-color-zig
|
|
295
|
+
--trees-file-icon-color-zip
|
|
296
|
+
|
|
297
|
+
// Density
|
|
298
|
+
//
|
|
299
|
+
// A unitless scale factor for padding, gaps, and indentation. Usually
|
|
300
|
+
// set via \`density\` on useFileTree. Individual overrides take precedence.
|
|
301
|
+
//
|
|
302
|
+
// Compact: 0.8
|
|
303
|
+
// Default: 1
|
|
304
|
+
// Relaxed: 1.2
|
|
305
|
+
//
|
|
306
|
+
--trees-density-override
|
|
307
|
+
|
|
308
|
+
// Available CSS Layout Overrides
|
|
309
|
+
--trees-gap-override
|
|
310
|
+
--trees-border-radius-override
|
|
311
|
+
--trees-font-family-override
|
|
312
|
+
--trees-font-size-override
|
|
313
|
+
--trees-font-weight-regular-override
|
|
314
|
+
--trees-font-weight-semibold-override
|
|
315
|
+
--trees-level-gap-override
|
|
316
|
+
--trees-item-padding-x-override
|
|
317
|
+
--trees-item-margin-x-override
|
|
318
|
+
--trees-item-row-gap-override
|
|
319
|
+
--trees-icon-width-override
|
|
320
|
+
--trees-icon-nudge-override
|
|
321
|
+
--trees-scrollbar-gutter-override
|
|
322
|
+
--trees-padding-inline-override
|
|
323
|
+
*/
|
|
324
|
+
|
|
325
|
+
--trees-accent: var(--trees-accent-override, #009fff);
|
|
326
|
+
--trees-fg: var(
|
|
327
|
+
--trees-fg-override,
|
|
328
|
+
var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1))
|
|
329
|
+
);
|
|
330
|
+
--trees-fg-muted: var(
|
|
331
|
+
--trees-fg-muted-override,
|
|
332
|
+
var(--trees-theme-sidebar-header-fg, light-dark(#84848a, #84848a))
|
|
333
|
+
);
|
|
334
|
+
--trees-bg: var(
|
|
335
|
+
--trees-bg-override,
|
|
336
|
+
var(--trees-theme-sidebar-bg, light-dark(#f8f8f8, #141415))
|
|
337
|
+
);
|
|
338
|
+
/* var(--trees-theme-list-hover-bg, light-dark(#dfebff59, #19283c59)) */
|
|
339
|
+
--trees-bg-muted: var(
|
|
340
|
+
--trees-bg-muted-override,
|
|
341
|
+
var(
|
|
342
|
+
--trees-theme-list-hover-bg,
|
|
343
|
+
light-dark(
|
|
344
|
+
color-mix(
|
|
345
|
+
in lab,
|
|
346
|
+
var(--trees-accent) var(--trees-bg-alpha-light, 8%),
|
|
347
|
+
var(--trees-bg)
|
|
348
|
+
),
|
|
349
|
+
color-mix(
|
|
350
|
+
in lab,
|
|
351
|
+
var(--trees-accent) var(--trees-bg-alpha-dark, 10%),
|
|
352
|
+
var(--trees-bg)
|
|
353
|
+
)
|
|
354
|
+
)
|
|
355
|
+
)
|
|
356
|
+
);
|
|
357
|
+
--trees-input-bg: var(
|
|
358
|
+
--trees-input-bg-override,
|
|
359
|
+
light-dark(#f8f8f8, #070707)
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
--trees-added-light: #16a994;
|
|
363
|
+
--trees-added-dark: #00cab1;
|
|
364
|
+
--trees-ignored-light: #adadb1;
|
|
365
|
+
--trees-ignored-dark: #4a4a4e;
|
|
366
|
+
--trees-modified-light: #1ca1c7;
|
|
367
|
+
--trees-modified-dark: #08c0ef;
|
|
368
|
+
--trees-renamed-light: #d5a910;
|
|
369
|
+
--trees-renamed-dark: #ffd452;
|
|
370
|
+
--trees-untracked-light: #16a994;
|
|
371
|
+
--trees-untracked-dark: #00cab1;
|
|
372
|
+
--trees-deleted-light: #ff2e3f;
|
|
373
|
+
--trees-deleted-dark: #ff6762;
|
|
374
|
+
|
|
375
|
+
--trees-border-color: var(
|
|
376
|
+
--trees-border-color-override,
|
|
377
|
+
var(--trees-theme-sidebar-border, light-dark(#eeeeef, #070707))
|
|
378
|
+
);
|
|
379
|
+
--trees-indent-guide-bg: var(
|
|
380
|
+
--trees-indent-guide-bg-override,
|
|
381
|
+
color-mix(in lab, var(--trees-fg-muted) 25%, transparent)
|
|
382
|
+
);
|
|
383
|
+
--trees-density: var(--trees-density-override, 1);
|
|
384
|
+
--trees-border-radius: var(
|
|
385
|
+
--trees-border-radius-override,
|
|
386
|
+
calc(6px * var(--trees-density))
|
|
387
|
+
);
|
|
388
|
+
|
|
389
|
+
--trees-font-family: var(--trees-font-family-override, system-ui);
|
|
390
|
+
--trees-font-size: var(--trees-font-size-override, 13px);
|
|
391
|
+
--trees-font-weight-regular: var(--trees-font-weight-regular-override, 400);
|
|
392
|
+
--trees-font-weight-semibold: var(
|
|
393
|
+
--trees-font-weight-semibold-override,
|
|
394
|
+
600
|
|
395
|
+
);
|
|
396
|
+
|
|
397
|
+
--trees-focus-ring-color: var(
|
|
398
|
+
--trees-focus-ring-color-override,
|
|
399
|
+
var(--trees-theme-focus-ring, var(--trees-accent))
|
|
400
|
+
);
|
|
401
|
+
--trees-focus-ring-width: var(--trees-focus-ring-width-override, 1px);
|
|
402
|
+
--trees-focus-ring-offset: var(--trees-focus-ring-offset-override, -1px);
|
|
403
|
+
|
|
404
|
+
--trees-search-fg: var(
|
|
405
|
+
--trees-search-fg-override,
|
|
406
|
+
var(--trees-theme-input-fg, var(--trees-fg))
|
|
407
|
+
);
|
|
408
|
+
--trees-search-font-weight: var(--trees-search-font-weight-override, 600);
|
|
409
|
+
--trees-search-bg: var(
|
|
410
|
+
--trees-search-bg-override,
|
|
411
|
+
var(--trees-theme-input-bg, var(--trees-input-bg))
|
|
412
|
+
);
|
|
413
|
+
|
|
414
|
+
--trees-scrollbar-thumb: var(
|
|
415
|
+
--trees-scrollbar-thumb-override,
|
|
416
|
+
var(
|
|
417
|
+
--trees-theme-scrollbar-thumb,
|
|
418
|
+
color-mix(in lab, var(--trees-fg) 25%, var(--trees-bg))
|
|
419
|
+
)
|
|
420
|
+
);
|
|
421
|
+
|
|
422
|
+
--trees-selected-fg: var(
|
|
423
|
+
--trees-selected-fg-override,
|
|
424
|
+
var(--trees-theme-list-active-selection-fg, var(--trees-fg))
|
|
425
|
+
);
|
|
426
|
+
--trees-selected-bg: var(
|
|
427
|
+
--trees-selected-bg-override,
|
|
428
|
+
var(
|
|
429
|
+
--trees-theme-list-active-selection-bg,
|
|
430
|
+
light-dark(
|
|
431
|
+
color-mix(in lab, var(--trees-accent) 12%, var(--trees-bg)),
|
|
432
|
+
color-mix(in lab, var(--trees-accent) 15%, var(--trees-bg))
|
|
433
|
+
)
|
|
434
|
+
)
|
|
435
|
+
);
|
|
436
|
+
--trees-selected-focused-border-color: var(
|
|
437
|
+
--trees-selected-focused-border-color-override,
|
|
438
|
+
var(--trees-theme-focus-ring, var(--trees-accent))
|
|
439
|
+
);
|
|
440
|
+
|
|
441
|
+
/* Git status (e.g. from Shiki theme gitDecoration.*) */
|
|
442
|
+
--trees-status-added: var(
|
|
443
|
+
--trees-status-added-override,
|
|
444
|
+
var(
|
|
445
|
+
--trees-theme-git-added-fg,
|
|
446
|
+
light-dark(var(--trees-added-light), var(--trees-added-dark))
|
|
447
|
+
)
|
|
448
|
+
);
|
|
449
|
+
--trees-status-ignored: var(
|
|
450
|
+
--trees-status-ignored-override,
|
|
451
|
+
var(
|
|
452
|
+
--trees-theme-git-ignored-fg,
|
|
453
|
+
light-dark(var(--trees-ignored-light), var(--trees-ignored-dark))
|
|
454
|
+
)
|
|
455
|
+
);
|
|
456
|
+
--trees-status-modified: var(
|
|
457
|
+
--trees-status-modified-override,
|
|
458
|
+
var(
|
|
459
|
+
--trees-theme-git-modified-fg,
|
|
460
|
+
light-dark(var(--trees-modified-light), var(--trees-modified-dark))
|
|
461
|
+
)
|
|
462
|
+
);
|
|
463
|
+
--trees-status-renamed: var(
|
|
464
|
+
--trees-status-renamed-override,
|
|
465
|
+
var(
|
|
466
|
+
--trees-theme-git-renamed-fg,
|
|
467
|
+
light-dark(var(--trees-renamed-light), var(--trees-renamed-dark))
|
|
468
|
+
)
|
|
469
|
+
);
|
|
470
|
+
--trees-status-untracked: var(
|
|
471
|
+
--trees-status-untracked-override,
|
|
472
|
+
var(
|
|
473
|
+
--trees-theme-git-untracked-fg,
|
|
474
|
+
light-dark(var(--trees-untracked-light), var(--trees-untracked-dark))
|
|
475
|
+
)
|
|
476
|
+
);
|
|
477
|
+
--trees-status-deleted: var(
|
|
478
|
+
--trees-status-deleted-override,
|
|
479
|
+
var(
|
|
480
|
+
--trees-theme-git-deleted-fg,
|
|
481
|
+
light-dark(var(--trees-deleted-light), var(--trees-deleted-dark))
|
|
482
|
+
)
|
|
483
|
+
);
|
|
484
|
+
--trees-git-modified-color: var(
|
|
485
|
+
--trees-git-modified-color-override,
|
|
486
|
+
var(--trees-status-modified)
|
|
487
|
+
);
|
|
488
|
+
--trees-git-added-color: var(
|
|
489
|
+
--trees-git-added-color-override,
|
|
490
|
+
var(--trees-status-added)
|
|
491
|
+
);
|
|
492
|
+
--trees-git-ignored-color: var(
|
|
493
|
+
--trees-git-ignored-color-override,
|
|
494
|
+
var(--trees-status-ignored)
|
|
495
|
+
);
|
|
496
|
+
--trees-git-deleted-color: var(
|
|
497
|
+
--trees-git-deleted-color-override,
|
|
498
|
+
var(--trees-status-deleted)
|
|
499
|
+
);
|
|
500
|
+
--trees-git-renamed-color: var(
|
|
501
|
+
--trees-git-renamed-color-override,
|
|
502
|
+
var(--trees-status-renamed)
|
|
503
|
+
);
|
|
504
|
+
--trees-git-untracked-color: var(
|
|
505
|
+
--trees-git-untracked-color-override,
|
|
506
|
+
var(--trees-status-untracked)
|
|
507
|
+
);
|
|
508
|
+
|
|
509
|
+
--trees-icon-gray: light-dark(#84848a, #adadb1);
|
|
510
|
+
--trees-icon-red: light-dark(#d52c36, #ff6762);
|
|
511
|
+
--trees-icon-vermilion: light-dark(#ff8c5b, #d5512f);
|
|
512
|
+
--trees-icon-orange: light-dark(#d47628, #ffa359);
|
|
513
|
+
--trees-icon-yellow: light-dark(#d5a910, #ffd452);
|
|
514
|
+
--trees-icon-green: light-dark(#199f43, #5ecc71);
|
|
515
|
+
--trees-icon-teal: light-dark(#17a5af, #64d1db);
|
|
516
|
+
--trees-icon-cyan: light-dark(#1ca1c7, #68cdf2);
|
|
517
|
+
--trees-icon-blue: light-dark(#1a85d4, #69b1ff);
|
|
518
|
+
--trees-icon-indigo: light-dark(#693acf, #9d6afb);
|
|
519
|
+
--trees-icon-purple: light-dark(#a631be, #d568ea);
|
|
520
|
+
--trees-icon-pink: light-dark(#d32a61, #ff678d);
|
|
521
|
+
--trees-icon-mauve: light-dark(#594c5b, #79697b);
|
|
522
|
+
|
|
523
|
+
--trees-file-icon-color-default: var(
|
|
524
|
+
--trees-file-icon-color,
|
|
525
|
+
var(--trees-icon-gray)
|
|
526
|
+
);
|
|
527
|
+
--trees-file-icon-color-astro: var(
|
|
528
|
+
--trees-file-icon-color,
|
|
529
|
+
var(--trees-icon-purple)
|
|
530
|
+
);
|
|
531
|
+
--trees-file-icon-color-babel: var(
|
|
532
|
+
--trees-file-icon-color,
|
|
533
|
+
var(--trees-icon-yellow)
|
|
534
|
+
);
|
|
535
|
+
--trees-file-icon-color-bash: var(
|
|
536
|
+
--trees-file-icon-color,
|
|
537
|
+
var(--trees-icon-green)
|
|
538
|
+
);
|
|
539
|
+
--trees-file-icon-color-biome: var(
|
|
540
|
+
--trees-file-icon-color,
|
|
541
|
+
var(--trees-icon-blue)
|
|
542
|
+
);
|
|
543
|
+
--trees-file-icon-color-bootstrap: var(
|
|
544
|
+
--trees-file-icon-color,
|
|
545
|
+
var(--trees-icon-indigo)
|
|
546
|
+
);
|
|
547
|
+
--trees-file-icon-color-browserslist: var(
|
|
548
|
+
--trees-file-icon-color,
|
|
549
|
+
var(--trees-icon-yellow)
|
|
550
|
+
);
|
|
551
|
+
--trees-file-icon-color-bun: var(
|
|
552
|
+
--trees-file-icon-color,
|
|
553
|
+
var(--trees-icon-mauve)
|
|
554
|
+
);
|
|
555
|
+
--trees-file-icon-color-claude: var(
|
|
556
|
+
--trees-file-icon-color,
|
|
557
|
+
var(--trees-icon-orange)
|
|
558
|
+
);
|
|
559
|
+
--trees-file-icon-color-css: var(
|
|
560
|
+
--trees-file-icon-color,
|
|
561
|
+
var(--trees-icon-indigo)
|
|
562
|
+
);
|
|
563
|
+
--trees-file-icon-color-database: var(
|
|
564
|
+
--trees-file-icon-color,
|
|
565
|
+
var(--trees-icon-purple)
|
|
566
|
+
);
|
|
567
|
+
--trees-file-icon-color-docker: var(
|
|
568
|
+
--trees-file-icon-color,
|
|
569
|
+
var(--trees-icon-blue)
|
|
570
|
+
);
|
|
571
|
+
--trees-file-icon-color-eslint: var(
|
|
572
|
+
--trees-file-icon-color,
|
|
573
|
+
var(--trees-icon-indigo)
|
|
574
|
+
);
|
|
575
|
+
--trees-file-icon-color-git: var(
|
|
576
|
+
--trees-file-icon-vermilion,
|
|
577
|
+
var(--trees-icon-vermilion)
|
|
578
|
+
);
|
|
579
|
+
--trees-file-icon-color-go: var(
|
|
580
|
+
--trees-file-icon-color,
|
|
581
|
+
var(--trees-icon-cyan)
|
|
582
|
+
);
|
|
583
|
+
--trees-file-icon-color-graphql: var(
|
|
584
|
+
--trees-file-icon-color,
|
|
585
|
+
var(--trees-icon-pink)
|
|
586
|
+
);
|
|
587
|
+
--trees-file-icon-color-html: var(
|
|
588
|
+
--trees-file-icon-color,
|
|
589
|
+
var(--trees-icon-orange)
|
|
590
|
+
);
|
|
591
|
+
--trees-file-icon-color-image: var(
|
|
592
|
+
--trees-file-icon-color,
|
|
593
|
+
var(--trees-icon-pink)
|
|
594
|
+
);
|
|
595
|
+
--trees-file-icon-color-javascript: var(
|
|
596
|
+
--trees-file-icon-color,
|
|
597
|
+
var(--trees-icon-yellow)
|
|
598
|
+
);
|
|
599
|
+
--trees-file-icon-color-json: var(
|
|
600
|
+
--trees-file-icon-color,
|
|
601
|
+
var(--trees-icon-orange)
|
|
602
|
+
);
|
|
603
|
+
--trees-file-icon-color-markdown: var(
|
|
604
|
+
--trees-file-icon-color,
|
|
605
|
+
var(--trees-icon-green)
|
|
606
|
+
);
|
|
607
|
+
--trees-file-icon-color-mcp: var(
|
|
608
|
+
--trees-file-icon-color,
|
|
609
|
+
var(--trees-icon-teal)
|
|
610
|
+
);
|
|
611
|
+
--trees-file-icon-color-npm: var(
|
|
612
|
+
--trees-file-icon-color,
|
|
613
|
+
var(--trees-icon-red)
|
|
614
|
+
);
|
|
615
|
+
--trees-file-icon-color-oxc: var(
|
|
616
|
+
--trees-file-icon-cyan,
|
|
617
|
+
var(--trees-icon-cyan)
|
|
618
|
+
);
|
|
619
|
+
--trees-file-icon-color-postcss: var(
|
|
620
|
+
--trees-file-icon-color,
|
|
621
|
+
var(--trees-icon-red)
|
|
622
|
+
);
|
|
623
|
+
--trees-file-icon-color-prettier: var(
|
|
624
|
+
--trees-file-icon-color,
|
|
625
|
+
var(--trees-icon-teal)
|
|
626
|
+
);
|
|
627
|
+
--trees-file-icon-color-python: var(
|
|
628
|
+
--trees-file-icon-color,
|
|
629
|
+
var(--trees-icon-blue)
|
|
630
|
+
);
|
|
631
|
+
--trees-file-icon-color-react: var(
|
|
632
|
+
--trees-file-icon-color,
|
|
633
|
+
var(--trees-icon-cyan)
|
|
634
|
+
);
|
|
635
|
+
--trees-file-icon-color-ruby: var(
|
|
636
|
+
--trees-file-icon-color,
|
|
637
|
+
var(--trees-icon-red)
|
|
638
|
+
);
|
|
639
|
+
--trees-file-icon-color-rust: var(
|
|
640
|
+
--trees-file-icon-color,
|
|
641
|
+
var(--trees-icon-orange)
|
|
642
|
+
);
|
|
643
|
+
--trees-file-icon-color-sass: var(
|
|
644
|
+
--trees-file-icon-color,
|
|
645
|
+
var(--trees-icon-pink)
|
|
646
|
+
);
|
|
647
|
+
--trees-file-icon-color-svg: var(
|
|
648
|
+
--trees-file-icon-color,
|
|
649
|
+
var(--trees-icon-orange)
|
|
650
|
+
);
|
|
651
|
+
--trees-file-icon-color-svelte: var(
|
|
652
|
+
--trees-file-icon-color,
|
|
653
|
+
var(--trees-icon-red)
|
|
654
|
+
);
|
|
655
|
+
--trees-file-icon-color-svgo: var(
|
|
656
|
+
--trees-file-icon-color,
|
|
657
|
+
var(--trees-icon-green)
|
|
658
|
+
);
|
|
659
|
+
--trees-file-icon-color-swift: var(
|
|
660
|
+
--trees-file-icon-color,
|
|
661
|
+
var(--trees-icon-orange)
|
|
662
|
+
);
|
|
663
|
+
--trees-file-icon-color-table: var(
|
|
664
|
+
--trees-file-icon-color,
|
|
665
|
+
var(--trees-icon-teal)
|
|
666
|
+
);
|
|
667
|
+
--trees-file-icon-color-text: var(
|
|
668
|
+
--trees-file-icon-color,
|
|
669
|
+
var(--trees-icon-gray)
|
|
670
|
+
);
|
|
671
|
+
--trees-file-icon-color-tailwind: var(
|
|
672
|
+
--trees-file-icon-color,
|
|
673
|
+
var(--trees-icon-cyan)
|
|
674
|
+
);
|
|
675
|
+
--trees-file-icon-color-terraform: var(
|
|
676
|
+
--trees-file-icon-color,
|
|
677
|
+
var(--trees-icon-indigo)
|
|
678
|
+
);
|
|
679
|
+
--trees-file-icon-color-typescript: var(
|
|
680
|
+
--trees-file-icon-color,
|
|
681
|
+
var(--trees-icon-blue)
|
|
682
|
+
);
|
|
683
|
+
--trees-file-icon-color-vite: var(
|
|
684
|
+
--trees-file-icon-color,
|
|
685
|
+
var(--trees-icon-purple)
|
|
686
|
+
);
|
|
687
|
+
--trees-file-icon-color-vscode: var(
|
|
688
|
+
--trees-file-icon-color,
|
|
689
|
+
var(--trees-icon-blue)
|
|
690
|
+
);
|
|
691
|
+
--trees-file-icon-color-vue: var(
|
|
692
|
+
--trees-file-icon-color,
|
|
693
|
+
var(--trees-icon-green)
|
|
694
|
+
);
|
|
695
|
+
--trees-file-icon-color-wasm: var(
|
|
696
|
+
--trees-file-icon-color,
|
|
697
|
+
var(--trees-icon-indigo)
|
|
698
|
+
);
|
|
699
|
+
--trees-file-icon-color-webpack: var(
|
|
700
|
+
--trees-file-icon-color,
|
|
701
|
+
var(--trees-icon-blue)
|
|
702
|
+
);
|
|
703
|
+
--trees-file-icon-color-yml: var(
|
|
704
|
+
--trees-file-icon-color,
|
|
705
|
+
var(--trees-icon-red)
|
|
706
|
+
);
|
|
707
|
+
--trees-file-icon-color-zig: var(
|
|
708
|
+
--trees-file-icon-color,
|
|
709
|
+
var(--trees-icon-orange)
|
|
710
|
+
);
|
|
711
|
+
--trees-file-icon-color-zip: var(
|
|
712
|
+
--trees-file-icon-color,
|
|
713
|
+
var(--trees-icon-orange)
|
|
714
|
+
);
|
|
715
|
+
|
|
716
|
+
--trees-level-gap: var(
|
|
717
|
+
--trees-level-gap-override,
|
|
718
|
+
calc(8px * var(--trees-density))
|
|
719
|
+
);
|
|
720
|
+
--trees-item-padding-x: var(
|
|
721
|
+
--trees-item-padding-x-override,
|
|
722
|
+
calc(8px * var(--trees-density))
|
|
723
|
+
);
|
|
724
|
+
--trees-item-margin-x: var(
|
|
725
|
+
--trees-item-margin-x-override,
|
|
726
|
+
calc(2px * var(--trees-density))
|
|
727
|
+
);
|
|
728
|
+
--trees-item-row-gap: var(
|
|
729
|
+
--trees-item-row-gap-override,
|
|
730
|
+
calc(6px * var(--trees-density))
|
|
731
|
+
);
|
|
732
|
+
--trees-icon-width: var(--trees-icon-width-override, 16px);
|
|
733
|
+
--trees-icon-nudge: var(
|
|
734
|
+
--trees-icon-nudge-override,
|
|
735
|
+
calc(1px * var(--trees-density))
|
|
736
|
+
);
|
|
737
|
+
--trees-row-height: var(--trees-item-height, 30px);
|
|
738
|
+
--trees-git-lane-width: var(--trees-git-lane-width-override, 12px);
|
|
739
|
+
--trees-action-lane-width: var(
|
|
740
|
+
--trees-action-lane-width-override,
|
|
741
|
+
calc(var(--trees-icon-width) + 2px)
|
|
742
|
+
);
|
|
743
|
+
/* Keep the floating trigger aligned with the row's action lane. Going in
|
|
744
|
+
from the root's right edge: the scroll container reserves
|
|
745
|
+
\`--trees-padding-inline\` of effective inset on each side (its asymmetric
|
|
746
|
+
padding formula cancels the scrollbar gutter on the right), the row
|
|
747
|
+
sits inside that inset, and its trailing \`--trees-item-padding-x\` is the
|
|
748
|
+
action lane itself. The trigger's own focus-ring margin then trims one
|
|
749
|
+
pixel back so the button's visible right edge lines up with the lane. */
|
|
750
|
+
--trees-context-menu-trigger-inline-offset: calc(
|
|
751
|
+
var(--trees-padding-inline) + var(--trees-item-padding-x) -
|
|
752
|
+
var(--trees-focus-ring-width)
|
|
753
|
+
);
|
|
754
|
+
|
|
755
|
+
--trees-scrollbar-gutter: var(--trees-scrollbar-gutter-override, 6px);
|
|
756
|
+
--trees-padding-inline: var(--trees-padding-inline-override, 16px);
|
|
757
|
+
|
|
758
|
+
color-scheme: light dark;
|
|
759
|
+
display: flex;
|
|
760
|
+
flex-direction: column;
|
|
761
|
+
font-size: var(--trees-font-size);
|
|
762
|
+
color: var(--trees-fg);
|
|
763
|
+
background-color: var(--trees-bg);
|
|
764
|
+
--truncate-marker-background-color: var(--trees-bg);
|
|
765
|
+
--truncate-marker-background-overlay-color: transparent;
|
|
766
|
+
font-family: var(--trees-font-family);
|
|
767
|
+
font-weight: var(--trees-font-weight-regular);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
:host([data-file-tree-virtualized='true']) {
|
|
771
|
+
height: 100%;
|
|
772
|
+
overflow: hidden;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
[data-file-tree-virtualized-wrapper='true'] {
|
|
776
|
+
height: 100%;
|
|
777
|
+
overflow: hidden;
|
|
778
|
+
display: flex;
|
|
779
|
+
flex-direction: column;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
[data-file-tree-virtualized-root='true'] {
|
|
783
|
+
height: 100%;
|
|
784
|
+
display: flex;
|
|
785
|
+
flex-direction: column;
|
|
786
|
+
overflow: hidden;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
[data-file-tree-virtualized-scroll='true'],
|
|
790
|
+
[data-file-tree-scrollbar-measure='true'] {
|
|
791
|
+
overflow-y: auto;
|
|
792
|
+
scrollbar-gutter: stable;
|
|
793
|
+
|
|
794
|
+
&::-webkit-scrollbar {
|
|
795
|
+
width: var(--trees-scrollbar-gutter);
|
|
796
|
+
height: var(--trees-scrollbar-gutter);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
&::-webkit-scrollbar-track {
|
|
800
|
+
background: transparent;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
&::-webkit-scrollbar-thumb {
|
|
804
|
+
background-color: var(--trees-scrollbar-thumb);
|
|
805
|
+
border: 1px solid transparent;
|
|
806
|
+
background-clip: content-box;
|
|
807
|
+
border-radius: calc(var(--trees-scrollbar-gutter) / 2);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
&::-webkit-scrollbar-corner {
|
|
811
|
+
background-color: transparent;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/* These are styles for a temporarily generated element to measure the size
|
|
816
|
+
* of the scrollbar. It's intended to be somewhat similar in scrollbar style
|
|
817
|
+
* scope to the scrollable tree so \`--trees-scrollbar-gutter-measured\` is an
|
|
818
|
+
* accurate reflection of the size the scrollbar gutter takes up. */
|
|
819
|
+
[data-file-tree-scrollbar-measure='true'] {
|
|
820
|
+
position: absolute;
|
|
821
|
+
top: 0;
|
|
822
|
+
left: 0;
|
|
823
|
+
visibility: hidden;
|
|
824
|
+
pointer-events: none;
|
|
825
|
+
width: 100px;
|
|
826
|
+
height: 100px;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
@supports (-moz-appearance: none) {
|
|
830
|
+
[data-file-tree-virtualized-scroll='true'],
|
|
831
|
+
[data-file-tree-scrollbar-measure='true'] {
|
|
832
|
+
scrollbar-width: thin;
|
|
833
|
+
scrollbar-color: var(--trees-scrollbar-thumb) transparent;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
[data-file-tree-virtualized-scroll='true'] {
|
|
838
|
+
position: relative;
|
|
839
|
+
overflow-y: auto;
|
|
840
|
+
flex: 1 1 0;
|
|
841
|
+
min-height: 0;
|
|
842
|
+
padding-inline: max(
|
|
843
|
+
calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
|
|
844
|
+
0px
|
|
845
|
+
)
|
|
846
|
+
/* NOTE(amadeus): We can assume that all Webkit based browser gutters
|
|
847
|
+
* will align to the value of '--trees-scrollbar-gutter', however if not, then
|
|
848
|
+
* \`--trees-scrollbar-gutter-measured\` should correct it. Mostly we are
|
|
849
|
+
* hoping to avoid SSR alignment jumps if possible. In non-SSR'd environments
|
|
850
|
+
* \`--trees-scrollbar-gutter-measured\` should always be immediately available.
|
|
851
|
+
*/
|
|
852
|
+
max(
|
|
853
|
+
calc(
|
|
854
|
+
var(--trees-padding-inline) - var(--trees-item-margin-x) -
|
|
855
|
+
var(
|
|
856
|
+
--trees-scrollbar-gutter-measured,
|
|
857
|
+
var(--trees-scrollbar-gutter)
|
|
858
|
+
)
|
|
859
|
+
),
|
|
860
|
+
0px
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
@supports (-moz-appearance: none) {
|
|
865
|
+
[data-file-tree-virtualized-scroll='true'] {
|
|
866
|
+
padding-inline: max(
|
|
867
|
+
calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
|
|
868
|
+
0px
|
|
869
|
+
)
|
|
870
|
+
/* NOTE(amadeus): However on Firefox it can vary a little bit, but most
|
|
871
|
+
* likely the majority of cases will default to a 0px width scrollbar lets
|
|
872
|
+
* inherit that first to avoid SSR jumps. In non-SSR'd environments
|
|
873
|
+
* \`--trees-scrollbar-gutter-measured\` should always be immediately available.
|
|
874
|
+
*/
|
|
875
|
+
max(
|
|
876
|
+
calc(
|
|
877
|
+
var(--trees-padding-inline) - var(--trees-item-margin-x) -
|
|
878
|
+
var(--trees-scrollbar-gutter-measured, 0px)
|
|
879
|
+
),
|
|
880
|
+
0px
|
|
881
|
+
);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
[data-file-tree-sticky-overlay='true'] {
|
|
886
|
+
position: sticky;
|
|
887
|
+
top: 0;
|
|
888
|
+
height: 0;
|
|
889
|
+
z-index: 4;
|
|
890
|
+
overflow: visible;
|
|
891
|
+
pointer-events: none;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/* The overlay DOM is kept populated even at scrollTop=0 so the browser has
|
|
895
|
+
* the rendered rows on hand the moment scrolling begins — otherwise the
|
|
896
|
+
* compositor paints a scrolled frame before React can mount the overlay,
|
|
897
|
+
* and the topmost sticky folder jumps up by a couple of pixels before it
|
|
898
|
+
* "snaps" into its pinned position. We hide it via CSS whenever the scroll
|
|
899
|
+
* is at the top and no scroll is in progress, so the preview doesn't leak
|
|
900
|
+
* through at rest. \`data-overlay-reveal\` is stamped on the root only when
|
|
901
|
+
* the user initiates a scroll while already at the top — exactly the case
|
|
902
|
+
* where we need the pre-mounted overlay to be visible through the first
|
|
903
|
+
* compositor frame. It is deliberately distinct from the general
|
|
904
|
+
* \`data-is-scrolling\` flag so a scroll that ends at the top (e.g. ArrowUp
|
|
905
|
+
* navigation) re-hides the overlay the instant the scroll lands, rather
|
|
906
|
+
* than waiting for the hover-suppression timer to elapse. */
|
|
907
|
+
[data-file-tree-virtualized-root='true'][data-scroll-at-top='true']:not(
|
|
908
|
+
[data-overlay-reveal]
|
|
909
|
+
)
|
|
910
|
+
[data-file-tree-sticky-overlay='true'] {
|
|
911
|
+
visibility: hidden;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
[data-file-tree-sticky-overlay-content='true'] {
|
|
915
|
+
background-color: var(--trees-bg);
|
|
916
|
+
position: relative;
|
|
917
|
+
pointer-events: none;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
[data-file-tree-virtualized-list='true'] {
|
|
921
|
+
background-color: var(--trees-bg);
|
|
922
|
+
position: relative;
|
|
923
|
+
min-height: 100%;
|
|
924
|
+
width: 100%;
|
|
925
|
+
overflow-anchor: none;
|
|
926
|
+
|
|
927
|
+
&[data-is-scrolling] {
|
|
928
|
+
pointer-events: none;
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
[data-file-tree-virtualized-sticky-offset='true'] {
|
|
933
|
+
contain: layout size;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
[data-file-tree-virtualized-sticky='true'] {
|
|
937
|
+
position: sticky;
|
|
938
|
+
top: 0;
|
|
939
|
+
width: 100%;
|
|
940
|
+
display: flex;
|
|
941
|
+
flex-direction: column;
|
|
942
|
+
isolation: isolate;
|
|
943
|
+
/* Promote to its own compositor layer so text inside the window is
|
|
944
|
+
* rasterized once and GPU-translated during scroll. Without this, the
|
|
945
|
+
* browser re-paints the window (and its text) at every scroll frame,
|
|
946
|
+
* which produces visible 1px shake / character tearing. */
|
|
947
|
+
will-change: transform;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
[data-file-tree-search-container] {
|
|
951
|
+
display: flex;
|
|
952
|
+
padding: 0;
|
|
953
|
+
padding-inline: var(--trees-padding-inline);
|
|
954
|
+
margin-bottom: var(--trees-item-row-gap);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
[data-file-tree-search-input] {
|
|
958
|
+
--trees-focus-ring-width: 2px;
|
|
959
|
+
font-family: var(--trees-font-family);
|
|
960
|
+
font-size: var(--trees-font-size);
|
|
961
|
+
flex: 1;
|
|
962
|
+
height: var(--trees-row-height);
|
|
963
|
+
/* 1px breathing room so the focus-visible outline isn't clipped when the
|
|
964
|
+
* input sits flush against the top of the scroll container. */
|
|
965
|
+
margin-block: 1px;
|
|
966
|
+
padding-inline: var(--trees-item-padding-x);
|
|
967
|
+
line-height: var(--trees-row-height);
|
|
968
|
+
color: var(--trees-search-fg);
|
|
969
|
+
background-color: var(--trees-search-bg);
|
|
970
|
+
border: 1px solid var(--trees-border-color);
|
|
971
|
+
border-radius: var(--trees-border-radius);
|
|
972
|
+
outline: none;
|
|
973
|
+
|
|
974
|
+
&::placeholder {
|
|
975
|
+
color: color-mix(
|
|
976
|
+
in lab,
|
|
977
|
+
var(--trees-search-fg) 65%,
|
|
978
|
+
var(--trees-search-bg)
|
|
979
|
+
);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
&:focus-visible,
|
|
983
|
+
&[data-file-tree-search-input-fake-focus='true'] {
|
|
984
|
+
outline: var(--trees-focus-ring-width) solid var(--trees-focus-ring-color);
|
|
985
|
+
outline-offset: var(--trees-focus-ring-offset);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/* The wrapper for the tree items */
|
|
990
|
+
[role='tree'] {
|
|
991
|
+
position: relative;
|
|
992
|
+
display: flex;
|
|
993
|
+
flex-direction: column;
|
|
994
|
+
gap: var(--trees-gap-override, 0);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/* LIST ITEM */
|
|
998
|
+
[data-type='item'] {
|
|
999
|
+
color: inherit;
|
|
1000
|
+
font-family: var(--trees-font-family);
|
|
1001
|
+
font-size: var(--trees-font-size);
|
|
1002
|
+
text-align: start;
|
|
1003
|
+
outline: none;
|
|
1004
|
+
background-color: var(--trees-bg);
|
|
1005
|
+
border: none;
|
|
1006
|
+
position: relative;
|
|
1007
|
+
|
|
1008
|
+
padding: 0 var(--trees-item-padding-x);
|
|
1009
|
+
margin: 0 var(--trees-item-margin-x);
|
|
1010
|
+
cursor: pointer;
|
|
1011
|
+
-webkit-user-select: none;
|
|
1012
|
+
user-select: none;
|
|
1013
|
+
-webkit-touch-callout: none;
|
|
1014
|
+
touch-action: manipulation;
|
|
1015
|
+
display: flex;
|
|
1016
|
+
flex: 0 0 var(--trees-row-height);
|
|
1017
|
+
align-items: center;
|
|
1018
|
+
height: var(--trees-row-height);
|
|
1019
|
+
line-height: var(--trees-row-height);
|
|
1020
|
+
gap: var(--trees-item-row-gap);
|
|
1021
|
+
border-radius: var(--trees-border-radius);
|
|
1022
|
+
/* Row states may be translucent, so markers paint the tree background first
|
|
1023
|
+
* and then the state color on top to avoid compositing the same alpha twice. */
|
|
1024
|
+
--truncate-marker-background-color: var(--trees-bg);
|
|
1025
|
+
--truncate-marker-background-overlay-color: transparent;
|
|
1026
|
+
--truncate-marker-block-inset: 0px;
|
|
1027
|
+
|
|
1028
|
+
&:hover,
|
|
1029
|
+
&[data-item-context-hover='true'] {
|
|
1030
|
+
background-color: var(--trees-bg-muted);
|
|
1031
|
+
--truncate-marker-background-overlay-color: var(--trees-bg-muted);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
&[data-item-focused='true'],
|
|
1035
|
+
&:focus-visible {
|
|
1036
|
+
z-index: 2;
|
|
1037
|
+
|
|
1038
|
+
/* Flattened segment markers sit high enough to cover the row outline unless
|
|
1039
|
+
* their painted background is inset by the focus ring width. */
|
|
1040
|
+
[data-item-flattened-subitems] {
|
|
1041
|
+
--truncate-marker-block-inset: var(--trees-focus-ring-width);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
&::before {
|
|
1045
|
+
position: absolute;
|
|
1046
|
+
inset: 0;
|
|
1047
|
+
content: '';
|
|
1048
|
+
display: block;
|
|
1049
|
+
border-radius: var(--trees-border-radius);
|
|
1050
|
+
outline: var(--trees-focus-ring-width) solid
|
|
1051
|
+
var(--trees-focus-ring-color);
|
|
1052
|
+
outline-offset: var(--trees-focus-ring-offset);
|
|
1053
|
+
pointer-events: none;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
&[data-item-selected='true']::before {
|
|
1057
|
+
outline-color: var(--trees-selected-focused-border-color);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
&[data-item-selected='true'] {
|
|
1062
|
+
color: var(--trees-selected-fg);
|
|
1063
|
+
background-color: var(--trees-selected-bg);
|
|
1064
|
+
--truncate-marker-background-overlay-color: var(--trees-selected-bg);
|
|
1065
|
+
z-index: 3;
|
|
1066
|
+
|
|
1067
|
+
[data-item-section='icon'] {
|
|
1068
|
+
color: var(--trees-selected-fg);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
&[data-item-search-match='true'] {
|
|
1073
|
+
font-weight: var(--trees-search-font-weight);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
[data-type='item'][data-file-tree-sticky-row='true'] {
|
|
1078
|
+
pointer-events: auto;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/* Sticky rows opt back into pointer events because the overlay wrapper is
|
|
1082
|
+
* inert. During scroll, put them back under the same hover suppression as
|
|
1083
|
+
* the virtualized list so translucent hover states and menu triggers do not
|
|
1084
|
+
* paint over rows moving beneath the sticky stack. */
|
|
1085
|
+
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1086
|
+
[data-type='item'][data-file-tree-sticky-row='true'] {
|
|
1087
|
+
pointer-events: none;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1091
|
+
[data-type='item'][data-file-tree-sticky-row='true']:hover:not(
|
|
1092
|
+
[data-item-selected='true']
|
|
1093
|
+
),
|
|
1094
|
+
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1095
|
+
[data-type='item'][data-file-tree-sticky-row='true'][data-item-context-hover='true']:not(
|
|
1096
|
+
[data-item-selected='true']
|
|
1097
|
+
) {
|
|
1098
|
+
background-color: var(--trees-bg);
|
|
1099
|
+
--truncate-marker-background-overlay-color: transparent;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
[data-item-selected='true']:has(+ [data-item-selected='true']) {
|
|
1103
|
+
border-bottom-left-radius: 0;
|
|
1104
|
+
border-bottom-right-radius: 0;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
[data-item-selected='true'] + [data-item-selected='true'] {
|
|
1108
|
+
border-top-left-radius: 0;
|
|
1109
|
+
border-top-right-radius: 0;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/* Flattened Directory Parts */
|
|
1113
|
+
[data-item-flattened-subitems] {
|
|
1114
|
+
display: inline-flex;
|
|
1115
|
+
align-items: center;
|
|
1116
|
+
gap: 2px;
|
|
1117
|
+
}
|
|
1118
|
+
[data-item-flattened-subitem]:hover,
|
|
1119
|
+
[data-item-flattened-subitem-drag-target='true'] {
|
|
1120
|
+
text-decoration: underline;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/* Icon for each item */
|
|
1124
|
+
[data-item-section='icon'] {
|
|
1125
|
+
flex-shrink: 0;
|
|
1126
|
+
display: flex;
|
|
1127
|
+
align-items: center;
|
|
1128
|
+
justify-content: center;
|
|
1129
|
+
color: var(--trees-fg-muted);
|
|
1130
|
+
fill: currentColor;
|
|
1131
|
+
width: var(--trees-icon-width);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
:where([data-item-section='icon'] > [data-icon-token]) {
|
|
1135
|
+
color: var(--trees-fg-muted);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
[data-file-tree-colored-icons='true'] {
|
|
1139
|
+
[data-icon-token='astro'] {
|
|
1140
|
+
color: var(--trees-file-icon-color-astro);
|
|
1141
|
+
}
|
|
1142
|
+
[data-icon-token='babel'] {
|
|
1143
|
+
color: var(--trees-file-icon-color-babel);
|
|
1144
|
+
}
|
|
1145
|
+
[data-icon-token='bash'] {
|
|
1146
|
+
color: var(--trees-file-icon-color-bash);
|
|
1147
|
+
}
|
|
1148
|
+
[data-icon-token='biome'] {
|
|
1149
|
+
color: var(--trees-file-icon-color-biome);
|
|
1150
|
+
}
|
|
1151
|
+
[data-icon-token='bootstrap'] {
|
|
1152
|
+
color: var(--trees-file-icon-color-bootstrap);
|
|
1153
|
+
}
|
|
1154
|
+
[data-icon-token='browserslist'] {
|
|
1155
|
+
color: var(--trees-file-icon-color-browserslist);
|
|
1156
|
+
}
|
|
1157
|
+
[data-icon-token='bun'] {
|
|
1158
|
+
color: var(--trees-file-icon-color-bun);
|
|
1159
|
+
}
|
|
1160
|
+
[data-icon-token='claude'] {
|
|
1161
|
+
color: var(--trees-file-icon-color-claude);
|
|
1162
|
+
}
|
|
1163
|
+
[data-icon-token='css'] {
|
|
1164
|
+
color: var(--trees-file-icon-color-css);
|
|
1165
|
+
}
|
|
1166
|
+
[data-icon-token='database'] {
|
|
1167
|
+
color: var(--trees-file-icon-color-database);
|
|
1168
|
+
}
|
|
1169
|
+
[data-icon-token='default'] {
|
|
1170
|
+
color: var(--trees-file-icon-color-default);
|
|
1171
|
+
}
|
|
1172
|
+
[data-icon-token='docker'] {
|
|
1173
|
+
color: var(--trees-file-icon-color-docker);
|
|
1174
|
+
}
|
|
1175
|
+
[data-icon-token='eslint'] {
|
|
1176
|
+
color: var(--trees-file-icon-color-eslint);
|
|
1177
|
+
}
|
|
1178
|
+
[data-icon-token='git'] {
|
|
1179
|
+
color: var(--trees-file-icon-color-git);
|
|
1180
|
+
}
|
|
1181
|
+
[data-icon-token='go'] {
|
|
1182
|
+
color: var(--trees-file-icon-color-go);
|
|
1183
|
+
}
|
|
1184
|
+
[data-icon-token='graphql'] {
|
|
1185
|
+
color: var(--trees-file-icon-color-graphql);
|
|
1186
|
+
}
|
|
1187
|
+
[data-icon-token='html'] {
|
|
1188
|
+
color: var(--trees-file-icon-color-html);
|
|
1189
|
+
}
|
|
1190
|
+
[data-icon-token='image'] {
|
|
1191
|
+
color: var(--trees-file-icon-color-image);
|
|
1192
|
+
}
|
|
1193
|
+
[data-icon-token='javascript'] {
|
|
1194
|
+
color: var(--trees-file-icon-color-javascript);
|
|
1195
|
+
}
|
|
1196
|
+
[data-icon-token='json'] {
|
|
1197
|
+
color: var(--trees-file-icon-color-json);
|
|
1198
|
+
}
|
|
1199
|
+
[data-icon-token='markdown'] {
|
|
1200
|
+
color: var(--trees-file-icon-color-markdown);
|
|
1201
|
+
}
|
|
1202
|
+
[data-icon-token='mcp'] {
|
|
1203
|
+
color: var(--trees-file-icon-color-mcp);
|
|
1204
|
+
}
|
|
1205
|
+
[data-icon-token='npm'] {
|
|
1206
|
+
color: var(--trees-file-icon-color-npm);
|
|
1207
|
+
}
|
|
1208
|
+
[data-icon-token='oxc'] {
|
|
1209
|
+
color: var(--trees-file-icon-color-oxc);
|
|
1210
|
+
}
|
|
1211
|
+
[data-icon-token='postcss'] {
|
|
1212
|
+
color: var(--trees-file-icon-color-postcss);
|
|
1213
|
+
}
|
|
1214
|
+
[data-icon-token='prettier'] {
|
|
1215
|
+
color: var(--trees-file-icon-color-prettier);
|
|
1216
|
+
}
|
|
1217
|
+
[data-icon-token='python'] {
|
|
1218
|
+
color: var(--trees-file-icon-color-python);
|
|
1219
|
+
}
|
|
1220
|
+
[data-icon-token='react'] {
|
|
1221
|
+
color: var(--trees-file-icon-color-react);
|
|
1222
|
+
}
|
|
1223
|
+
[data-icon-token='ruby'] {
|
|
1224
|
+
color: var(--trees-file-icon-color-ruby);
|
|
1225
|
+
}
|
|
1226
|
+
[data-icon-token='rust'] {
|
|
1227
|
+
color: var(--trees-file-icon-color-rust);
|
|
1228
|
+
}
|
|
1229
|
+
[data-icon-token='sass'] {
|
|
1230
|
+
color: var(--trees-file-icon-color-sass);
|
|
1231
|
+
}
|
|
1232
|
+
[data-icon-token='svg'] {
|
|
1233
|
+
color: var(--trees-file-icon-color-svg);
|
|
1234
|
+
}
|
|
1235
|
+
[data-icon-token='svelte'] {
|
|
1236
|
+
color: var(--trees-file-icon-color-svelte);
|
|
1237
|
+
}
|
|
1238
|
+
[data-icon-token='svgo'] {
|
|
1239
|
+
color: var(--trees-file-icon-color-svgo);
|
|
1240
|
+
}
|
|
1241
|
+
[data-icon-token='swift'] {
|
|
1242
|
+
color: var(--trees-file-icon-color-swift);
|
|
1243
|
+
}
|
|
1244
|
+
[data-icon-token='table'] {
|
|
1245
|
+
color: var(--trees-file-icon-color-table);
|
|
1246
|
+
}
|
|
1247
|
+
[data-icon-token='text'] {
|
|
1248
|
+
color: var(--trees-file-icon-color-text);
|
|
1249
|
+
}
|
|
1250
|
+
[data-icon-token='tailwind'] {
|
|
1251
|
+
color: var(--trees-file-icon-color-tailwind);
|
|
1252
|
+
}
|
|
1253
|
+
[data-icon-token='terraform'] {
|
|
1254
|
+
color: var(--trees-file-icon-color-terraform);
|
|
1255
|
+
}
|
|
1256
|
+
[data-icon-token='typescript'] {
|
|
1257
|
+
color: var(--trees-file-icon-color-typescript);
|
|
1258
|
+
}
|
|
1259
|
+
[data-icon-token='vite'] {
|
|
1260
|
+
color: var(--trees-file-icon-color-vite);
|
|
1261
|
+
}
|
|
1262
|
+
[data-icon-token='vscode'] {
|
|
1263
|
+
color: var(--trees-file-icon-color-vscode);
|
|
1264
|
+
}
|
|
1265
|
+
[data-icon-token='vue'] {
|
|
1266
|
+
color: var(--trees-file-icon-color-vue);
|
|
1267
|
+
}
|
|
1268
|
+
[data-icon-token='wasm'] {
|
|
1269
|
+
color: var(--trees-file-icon-color-wasm);
|
|
1270
|
+
}
|
|
1271
|
+
[data-icon-token='webpack'] {
|
|
1272
|
+
color: var(--trees-file-icon-color-webpack);
|
|
1273
|
+
}
|
|
1274
|
+
[data-icon-token='yml'] {
|
|
1275
|
+
color: var(--trees-file-icon-color-yml);
|
|
1276
|
+
}
|
|
1277
|
+
[data-icon-token='zig'] {
|
|
1278
|
+
color: var(--trees-file-icon-color-zig);
|
|
1279
|
+
}
|
|
1280
|
+
[data-icon-token='zip'] {
|
|
1281
|
+
color: var(--trees-file-icon-color-zip);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/* Chevron rotation and visual alignment */
|
|
1286
|
+
/* Chevron pointing down */
|
|
1287
|
+
[data-icon-name='file-tree-icon-chevron'] {
|
|
1288
|
+
&[data-align-capitals='false'] {
|
|
1289
|
+
transform: translate(0, var(--trees-icon-nudge));
|
|
1290
|
+
}
|
|
1291
|
+
&[data-align-capitals='true'] {
|
|
1292
|
+
transform: translate(0, 0);
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
[data-item-section='content'] {
|
|
1297
|
+
flex: 0 1 auto;
|
|
1298
|
+
text-align: start;
|
|
1299
|
+
min-width: 0;
|
|
1300
|
+
max-width: 100%;
|
|
1301
|
+
overflow: hidden;
|
|
1302
|
+
text-overflow: ellipsis;
|
|
1303
|
+
/* Breaks middle truncate component to also set this */
|
|
1304
|
+
/* white-space: nowrap; */
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
[data-item-section='decoration'] {
|
|
1308
|
+
flex: 1 1 0;
|
|
1309
|
+
min-width: 0;
|
|
1310
|
+
display: flex;
|
|
1311
|
+
justify-content: flex-end;
|
|
1312
|
+
text-align: end;
|
|
1313
|
+
overflow: hidden;
|
|
1314
|
+
color: var(--trees-fg-muted);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
[data-item-section='decoration'] > span {
|
|
1318
|
+
min-width: 0;
|
|
1319
|
+
max-width: 100%;
|
|
1320
|
+
display: inline-flex;
|
|
1321
|
+
align-items: center;
|
|
1322
|
+
justify-content: flex-end;
|
|
1323
|
+
overflow: hidden;
|
|
1324
|
+
text-overflow: ellipsis;
|
|
1325
|
+
white-space: nowrap;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
[data-item-section='git'],
|
|
1329
|
+
[data-item-section='action'] {
|
|
1330
|
+
flex: 0 0 auto;
|
|
1331
|
+
display: flex;
|
|
1332
|
+
align-items: center;
|
|
1333
|
+
justify-content: center;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
[data-item-section='git'] {
|
|
1337
|
+
width: var(--trees-git-lane-width);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
[data-item-section='action'] {
|
|
1341
|
+
width: var(--trees-action-lane-width);
|
|
1342
|
+
color: var(--trees-fg-muted);
|
|
1343
|
+
fill: currentColor;
|
|
1344
|
+
pointer-events: none;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
[data-item-section='git'] > span,
|
|
1348
|
+
[data-item-section='action'] > span {
|
|
1349
|
+
width: 100%;
|
|
1350
|
+
display: inline-flex;
|
|
1351
|
+
align-items: center;
|
|
1352
|
+
justify-content: center;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
[data-item-action-affordance='decorative'] {
|
|
1356
|
+
opacity: 0.85;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
[data-item-rename-input] {
|
|
1360
|
+
appearance: none;
|
|
1361
|
+
width: 100%;
|
|
1362
|
+
min-width: 0;
|
|
1363
|
+
height: calc(var(--trees-row-height) - 4px);
|
|
1364
|
+
font-family: inherit;
|
|
1365
|
+
font-size: inherit;
|
|
1366
|
+
/* line-height: calc(var(--trees-row-height) - 8px); */
|
|
1367
|
+
color: inherit;
|
|
1368
|
+
background-color: transparent;
|
|
1369
|
+
border: 0;
|
|
1370
|
+
padding-inline: 6px;
|
|
1371
|
+
outline: none;
|
|
1372
|
+
box-sizing: border-box;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
[data-item-section='content']:has([data-item-rename-input])
|
|
1376
|
+
~ [data-item-section='action'],
|
|
1377
|
+
[data-item-section='content']:has([data-item-rename-input])
|
|
1378
|
+
~ [data-item-section='decoration'] {
|
|
1379
|
+
display: none;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
/* Chevron pointing right */
|
|
1383
|
+
[aria-expanded='false'][data-item-type='folder']
|
|
1384
|
+
> [data-item-section='icon']
|
|
1385
|
+
> [data-icon-name='file-tree-icon-chevron'] {
|
|
1386
|
+
&[data-align-capitals='true'] {
|
|
1387
|
+
transform: rotate(-90deg)
|
|
1388
|
+
translate(
|
|
1389
|
+
calc(var(--trees-icon-nudge) / 2),
|
|
1390
|
+
calc(var(--trees-icon-nudge) / 2)
|
|
1391
|
+
);
|
|
1392
|
+
}
|
|
1393
|
+
&[data-align-capitals='false'] {
|
|
1394
|
+
transform: rotate(-90deg)
|
|
1395
|
+
translate(
|
|
1396
|
+
calc(var(--trees-icon-nudge) / 2 * -1),
|
|
1397
|
+
calc(var(--trees-icon-nudge) / 2)
|
|
1398
|
+
);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
/* LIST IDENTATION */
|
|
1403
|
+
/* Spacing container */
|
|
1404
|
+
[data-item-section='spacing'] {
|
|
1405
|
+
display: flex;
|
|
1406
|
+
flex-direction: row;
|
|
1407
|
+
align-items: center;
|
|
1408
|
+
justify-content: center;
|
|
1409
|
+
height: var(--trees-row-height);
|
|
1410
|
+
padding-left: calc(calc(var(--trees-icon-width) / 2) - 0.5px);
|
|
1411
|
+
|
|
1412
|
+
&:empty {
|
|
1413
|
+
padding-left: 0;
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
/* Spacing per level */
|
|
1418
|
+
[data-item-section='spacing-item'] {
|
|
1419
|
+
transform: translateX(-0.25px);
|
|
1420
|
+
display: inline-block;
|
|
1421
|
+
border-left: 1px solid var(--trees-indent-guide-bg);
|
|
1422
|
+
height: 100%;
|
|
1423
|
+
margin-right: calc(var(--trees-level-gap) - 1px);
|
|
1424
|
+
opacity: 0;
|
|
1425
|
+
transition: opacity 150ms ease;
|
|
1426
|
+
|
|
1427
|
+
& + & {
|
|
1428
|
+
margin-left: calc(
|
|
1429
|
+
var(--trees-item-row-gap) + calc(var(--trees-icon-width) / 2) - 0.5px
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
:host(:hover) [data-item-section='spacing-item'] {
|
|
1435
|
+
opacity: 0.75;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
/* Git status indicator */
|
|
1439
|
+
|
|
1440
|
+
/* This is a folder that contains a git change */
|
|
1441
|
+
[data-item-contains-git-change='true'] > [data-item-section='git'] {
|
|
1442
|
+
color: var(--trees-git-modified-color);
|
|
1443
|
+
opacity: 0.5;
|
|
1444
|
+
fill: currentColor;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/* These are files that have a git change */
|
|
1448
|
+
[data-item-git-status] {
|
|
1449
|
+
&
|
|
1450
|
+
> :where([data-item-section='icon'])
|
|
1451
|
+
> :where(:not([data-icon-name='file-tree-icon-chevron'])) {
|
|
1452
|
+
color: var(--trees-item-git-status-color);
|
|
1453
|
+
}
|
|
1454
|
+
& > [data-item-section='content'] {
|
|
1455
|
+
color: var(--trees-item-git-status-color);
|
|
1456
|
+
}
|
|
1457
|
+
& > [data-item-section='git'] {
|
|
1458
|
+
color: var(--trees-item-git-status-color);
|
|
1459
|
+
font-weight: var(--trees-font-weight-semibold);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
[data-item-git-status='added'] {
|
|
1464
|
+
--trees-item-git-status-color: var(--trees-git-added-color);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
[data-item-git-status='deleted'] {
|
|
1468
|
+
--trees-item-git-status-color: var(--trees-git-deleted-color);
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
[data-item-git-status='ignored'] {
|
|
1472
|
+
--trees-item-git-status-color: var(--trees-git-ignored-color);
|
|
1473
|
+
|
|
1474
|
+
& > [data-item-section='icon'] {
|
|
1475
|
+
opacity: 0.5;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
[data-item-section='git'] [data-icon-name='file-tree-icon-dot'] {
|
|
1480
|
+
/* this is a nudge to align the dot with the likely lowercase text. it's slightly
|
|
1481
|
+
generalizable, but other fonts are gonna need other nudges i assume */
|
|
1482
|
+
transform: translateY(calc(0.65ex - 50%));
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
[data-item-git-status='modified'] {
|
|
1486
|
+
--trees-item-git-status-color: var(--trees-git-modified-color);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
[data-item-git-status='renamed'] {
|
|
1490
|
+
--trees-item-git-status-color: var(--trees-git-renamed-color);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
[data-item-git-status='untracked'] {
|
|
1494
|
+
--trees-item-git-status-color: var(--trees-git-untracked-color);
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
/* Drag and drop */
|
|
1498
|
+
[data-item-drag-target='true'] {
|
|
1499
|
+
background-color: var(--trees-selected-bg);
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
[data-item-dragging='true'] {
|
|
1503
|
+
opacity: 0.5;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
/* Lock icon for locked paths (sibling of content) */
|
|
1507
|
+
[data-item-section='lock'] {
|
|
1508
|
+
flex: 0 0 auto;
|
|
1509
|
+
margin-left: auto;
|
|
1510
|
+
display: flex;
|
|
1511
|
+
align-items: center;
|
|
1512
|
+
color: var(--trees-fg-muted);
|
|
1513
|
+
}
|
|
1514
|
+
[data-item-section='lock'] svg {
|
|
1515
|
+
display: block;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
[data-type='header-slot'] {
|
|
1519
|
+
display: block;
|
|
1520
|
+
flex: 0 0 auto;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
[data-type='context-menu-wash'] {
|
|
1524
|
+
position: absolute;
|
|
1525
|
+
inset: 0;
|
|
1526
|
+
z-index: 3;
|
|
1527
|
+
background-color: transparent;
|
|
1528
|
+
touch-action: none;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
[data-type='context-menu-anchor'] {
|
|
1532
|
+
position: absolute;
|
|
1533
|
+
top: 0;
|
|
1534
|
+
right: var(--trees-context-menu-trigger-inline-offset);
|
|
1535
|
+
z-index: 4;
|
|
1536
|
+
display: none;
|
|
1537
|
+
align-items: center;
|
|
1538
|
+
|
|
1539
|
+
&[data-visible='true'] {
|
|
1540
|
+
display: flex;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
/* Hide the floating trigger while the scroll container is actively moving.
|
|
1545
|
+
* The anchor is positioned against the root, not the scroll content, so its
|
|
1546
|
+
* \`top\` follows the row via a React state update — one frame behind the
|
|
1547
|
+
* compositor. That delay is visible as the trigger hovering over the wrong
|
|
1548
|
+
* row during the first frame of a scroll. The \`data-is-scrolling\` flag on
|
|
1549
|
+
* the root is flipped synchronously on \`wheel\`/\`touchmove\`/\`keydown\` before
|
|
1550
|
+
* the compositor commits the next paint, so this selector hides the anchor
|
|
1551
|
+
* in the same frame the scroll begins. */
|
|
1552
|
+
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1553
|
+
[data-type='context-menu-anchor'] {
|
|
1554
|
+
display: none;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
[data-type='context-menu-anchor'] > slot[name='context-menu'] {
|
|
1558
|
+
display: block;
|
|
1559
|
+
width: 0;
|
|
1560
|
+
min-width: 0;
|
|
1561
|
+
flex: 0 0 0;
|
|
1562
|
+
overflow: visible;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
/* Single floating context menu trigger */
|
|
1566
|
+
[data-type='context-menu-trigger'] {
|
|
1567
|
+
all: unset;
|
|
1568
|
+
align-items: center;
|
|
1569
|
+
justify-content: center;
|
|
1570
|
+
width: var(--trees-action-lane-width);
|
|
1571
|
+
color: var(--trees-fg-muted);
|
|
1572
|
+
fill: currentColor;
|
|
1573
|
+
cursor: pointer;
|
|
1574
|
+
font-family: var(--trees-font-family);
|
|
1575
|
+
font-size: var(--trees-font-size);
|
|
1576
|
+
border-top-right-radius: var(--trees-border-radius);
|
|
1577
|
+
border-bottom-right-radius: var(--trees-border-radius);
|
|
1578
|
+
margin: var(--trees-focus-ring-width);
|
|
1579
|
+
height: calc(var(--trees-row-height) - var(--trees-focus-ring-width) * 2);
|
|
1580
|
+
border-width: 0;
|
|
1581
|
+
transition: color 120ms ease;
|
|
1582
|
+
|
|
1583
|
+
display: flex;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
[data-type='context-menu-trigger']:hover,
|
|
1587
|
+
[data-type='context-menu-trigger'][aria-expanded='true'] {
|
|
1588
|
+
color: var(--trees-fg);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
/** @pierre/truncate css here, manually copy pasted for now */
|
|
1592
|
+
[data-truncate-container] {
|
|
1593
|
+
/* CUSTOM TO TREES, TO SUPPORT THE OUTLINE */
|
|
1594
|
+
margin-top: -1px;
|
|
1595
|
+
margin-bottom: -1px;
|
|
1596
|
+
|
|
1597
|
+
/* Width of the fade from default marker to text */
|
|
1598
|
+
--truncate-internal-marker-fade-width: var(
|
|
1599
|
+
--truncate-marker-fade-width,
|
|
1600
|
+
2px
|
|
1601
|
+
);
|
|
1602
|
+
/* Width of the solid color between the fade from the default marker to the text */
|
|
1603
|
+
--truncate-internal-marker-gap: var(--truncate-marker-gap, 0px);
|
|
1604
|
+
/* Opacity of the marker 'color' property, not of the element itself */
|
|
1605
|
+
--truncate-internal-marker-opacity: var(--truncate-marker-opacity, 50%);
|
|
1606
|
+
/* Opacity of the marker 'color' property specifically for the middle truncate, not opacity of the element itself */
|
|
1607
|
+
--truncate-internal-middle-marker-opacity: var(
|
|
1608
|
+
--truncate-middle-marker-opacity,
|
|
1609
|
+
80%
|
|
1610
|
+
);
|
|
1611
|
+
/* Background color of the default marker */
|
|
1612
|
+
--truncate-internal-marker-background-color: var(
|
|
1613
|
+
--truncate-marker-background-color,
|
|
1614
|
+
light-dark(white, black)
|
|
1615
|
+
);
|
|
1616
|
+
--truncate-internal-marker-background-overlay-color: var(
|
|
1617
|
+
--truncate-marker-background-overlay-color,
|
|
1618
|
+
transparent
|
|
1619
|
+
);
|
|
1620
|
+
--truncate-internal-marker-block-inset: var(
|
|
1621
|
+
--truncate-marker-block-inset,
|
|
1622
|
+
0px
|
|
1623
|
+
);
|
|
1624
|
+
/* Duration of the fade out animation for the marker */
|
|
1625
|
+
--truncate-internal-marker-fade-out-duration: var(
|
|
1626
|
+
--truncate-marker-fade-out-duration,
|
|
1627
|
+
0ms
|
|
1628
|
+
);
|
|
1629
|
+
/* Duration of the fade in animation for the marker */
|
|
1630
|
+
--truncate-internal-marker-fade-in-duration: var(
|
|
1631
|
+
--truncate-marker-fade-in-duration,
|
|
1632
|
+
100ms
|
|
1633
|
+
);
|
|
1634
|
+
|
|
1635
|
+
/* FADE Variant specifics */
|
|
1636
|
+
--truncate-internal-fade-marker-color: var(
|
|
1637
|
+
--truncate-fade-marker-color,
|
|
1638
|
+
#000
|
|
1639
|
+
);
|
|
1640
|
+
--truncate-internal-fade-marker-width: var(
|
|
1641
|
+
--truncate-fade-marker-width,
|
|
1642
|
+
0.2lh
|
|
1643
|
+
);
|
|
1644
|
+
|
|
1645
|
+
/*
|
|
1646
|
+
In some special cases people might be adding spacing in other ways
|
|
1647
|
+
that would benefit from being able to override this, however the container
|
|
1648
|
+
query below can't use this and would need to be redeclared with the overridden
|
|
1649
|
+
value. It's a bad time, but better than nothing.
|
|
1650
|
+
*/
|
|
1651
|
+
--truncate-internal-single-line-height: 1lh;
|
|
1652
|
+
|
|
1653
|
+
height: var(--truncate-internal-single-line-height);
|
|
1654
|
+
min-width: 0;
|
|
1655
|
+
overflow: hidden;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
[data-truncate-marker] {
|
|
1659
|
+
display: flex;
|
|
1660
|
+
position: absolute;
|
|
1661
|
+
height: var(--truncate-internal-single-line-height);
|
|
1662
|
+
padding-block: var(--truncate-internal-marker-block-inset);
|
|
1663
|
+
box-sizing: border-box;
|
|
1664
|
+
align-items: center;
|
|
1665
|
+
background-clip: content-box;
|
|
1666
|
+
z-index: 2;
|
|
1667
|
+
color: color-mix(
|
|
1668
|
+
in srgb,
|
|
1669
|
+
currentColor var(--truncate-internal-marker-opacity),
|
|
1670
|
+
transparent
|
|
1671
|
+
);
|
|
1672
|
+
|
|
1673
|
+
/* Core trick for hiding the marker until overflow occurs */
|
|
1674
|
+
opacity: 0;
|
|
1675
|
+
transition: opacity var(--truncate-internal-marker-fade-out-duration)
|
|
1676
|
+
ease-in-out;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
@container measure (height > 1lh) {
|
|
1680
|
+
[data-truncate-marker] {
|
|
1681
|
+
opacity: 1;
|
|
1682
|
+
transition: opacity var(--truncate-internal-marker-fade-in-duration)
|
|
1683
|
+
ease-in-out;
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
[data-truncate-grid] {
|
|
1688
|
+
display: grid;
|
|
1689
|
+
position: relative;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
[data-truncate-content='visible'] {
|
|
1693
|
+
white-space: nowrap;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
[data-truncate-content='overflow'] {
|
|
1697
|
+
opacity: 0;
|
|
1698
|
+
pointer-events: none;
|
|
1699
|
+
-webkit-user-select: none;
|
|
1700
|
+
user-select: none;
|
|
1701
|
+
word-break: break-all;
|
|
1702
|
+
margin-top: calc(-1 * var(--truncate-internal-single-line-height));
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
[data-truncate-marker-cell] {
|
|
1706
|
+
container: measure / size;
|
|
1707
|
+
overflow: visible;
|
|
1708
|
+
-webkit-user-select: none;
|
|
1709
|
+
user-select: none;
|
|
1710
|
+
pointer-events: none;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
[data-truncate-container='truncate'] {
|
|
1714
|
+
& [data-truncate-grid] {
|
|
1715
|
+
grid-template-columns: minmax(0, max-content) 0;
|
|
1716
|
+
}
|
|
1717
|
+
& [data-truncate-marker] {
|
|
1718
|
+
right: 0;
|
|
1719
|
+
}
|
|
1720
|
+
& [data-truncate-fade] {
|
|
1721
|
+
margin-right: calc(-2 * var(--truncate-internal-fade-marker-width));
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
[data-truncate-container='fruncate'] {
|
|
1726
|
+
& [data-truncate-grid] {
|
|
1727
|
+
grid-template-columns: 0 minmax(0, max-content) auto;
|
|
1728
|
+
}
|
|
1729
|
+
& [data-truncate-content] {
|
|
1730
|
+
direction: rtl;
|
|
1731
|
+
}
|
|
1732
|
+
& [data-truncate-content] > span {
|
|
1733
|
+
unicode-bidi: plaintext;
|
|
1734
|
+
}
|
|
1735
|
+
& [data-truncate-fade] {
|
|
1736
|
+
margin-left: calc(-2 * var(--truncate-internal-fade-marker-width));
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
[data-truncate-variant='default'] {
|
|
1741
|
+
& [data-truncate-marker] {
|
|
1742
|
+
background-color: var(--truncate-internal-marker-background-color);
|
|
1743
|
+
background-image: linear-gradient(
|
|
1744
|
+
var(--truncate-internal-marker-background-overlay-color),
|
|
1745
|
+
var(--truncate-internal-marker-background-overlay-color)
|
|
1746
|
+
);
|
|
1747
|
+
}
|
|
1748
|
+
& [data-truncate-marker]::after,
|
|
1749
|
+
& [data-truncate-marker]::before {
|
|
1750
|
+
content: '';
|
|
1751
|
+
position: absolute;
|
|
1752
|
+
width: calc(
|
|
1753
|
+
var(--truncate-internal-marker-fade-width) +
|
|
1754
|
+
var(--truncate-internal-marker-gap)
|
|
1755
|
+
);
|
|
1756
|
+
inset-block-start: var(--truncate-internal-marker-block-inset);
|
|
1757
|
+
height: max(
|
|
1758
|
+
0px,
|
|
1759
|
+
calc(
|
|
1760
|
+
var(--truncate-internal-single-line-height) -
|
|
1761
|
+
var(--truncate-internal-marker-block-inset) * 2
|
|
1762
|
+
)
|
|
1763
|
+
);
|
|
1764
|
+
background-color: var(--truncate-internal-marker-background-color);
|
|
1765
|
+
background-image: linear-gradient(
|
|
1766
|
+
var(--truncate-internal-marker-background-overlay-color),
|
|
1767
|
+
var(--truncate-internal-marker-background-overlay-color)
|
|
1768
|
+
);
|
|
1769
|
+
mask-image: linear-gradient(
|
|
1770
|
+
var(--truncate-internal-fade-dir),
|
|
1771
|
+
#000 0%,
|
|
1772
|
+
#000 var(--truncate-internal-marker-gap),
|
|
1773
|
+
transparent 100%
|
|
1774
|
+
);
|
|
1775
|
+
}
|
|
1776
|
+
& [data-truncate-marker]::after {
|
|
1777
|
+
--truncate-internal-fade-dir: to right;
|
|
1778
|
+
right: calc(
|
|
1779
|
+
-1 *
|
|
1780
|
+
(
|
|
1781
|
+
var(--truncate-internal-marker-fade-width) +
|
|
1782
|
+
var(--truncate-internal-marker-gap)
|
|
1783
|
+
)
|
|
1784
|
+
);
|
|
1785
|
+
}
|
|
1786
|
+
& [data-truncate-marker]::before {
|
|
1787
|
+
--truncate-internal-fade-dir: to left;
|
|
1788
|
+
left: calc(
|
|
1789
|
+
-1 *
|
|
1790
|
+
(
|
|
1791
|
+
var(--truncate-internal-marker-fade-width) +
|
|
1792
|
+
var(--truncate-internal-marker-gap)
|
|
1793
|
+
)
|
|
1794
|
+
);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
[data-truncate-variant='fade'] {
|
|
1799
|
+
& [data-truncate-marker] {
|
|
1800
|
+
background: transparent;
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
[data-truncate-fade] {
|
|
1805
|
+
box-shadow:
|
|
1806
|
+
0 0 calc(var(--truncate-internal-fade-marker-width) / 2)
|
|
1807
|
+
var(--truncate-internal-fade-marker-color),
|
|
1808
|
+
0 0 var(--truncate-internal-fade-marker-width)
|
|
1809
|
+
var(--truncate-internal-fade-marker-color);
|
|
1810
|
+
width: calc(var(--truncate-internal-fade-marker-width) * 2);
|
|
1811
|
+
height: calc(
|
|
1812
|
+
var(--truncate-internal-single-line-height) -
|
|
1813
|
+
(var(--truncate-internal-fade-marker-width) * 2)
|
|
1814
|
+
);
|
|
1815
|
+
margin: var(--truncate-internal-fade-marker-width) 0;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
[data-truncate-group-container='middle'] {
|
|
1819
|
+
& [data-truncate-container] {
|
|
1820
|
+
--truncate-marker-opacity: var(--truncate-internal-middle-marker-opacity);
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
display: flex;
|
|
1824
|
+
min-width: 0;
|
|
1825
|
+
|
|
1826
|
+
& > div {
|
|
1827
|
+
min-width: 0;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
& > div[data-truncate-segment-priority='1'] {
|
|
1831
|
+
flex: 0 1 max-content;
|
|
1832
|
+
}
|
|
1833
|
+
& > div[data-truncate-segment-priority='2'] {
|
|
1834
|
+
flex: 0 999999 max-content;
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
`,FP=`@layer base, unsafe;`;function IP(e){return`${FP}
|
|
1839
|
+
@layer base {
|
|
1840
|
+
${e}
|
|
1841
|
+
}`}function LP(e){return`${FP}
|
|
1842
|
+
@layer unsafe {
|
|
1843
|
+
${e}
|
|
1844
|
+
}`}var RP=new WeakMap;function zP(e){let t=RP.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(MA,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),RP.set(e,i),i}function BP(e,t){if(!e.isConnected)return;let n=zP(t);if(n==null)return;let r=t.querySelector(`style[${NA}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(NA,``),t.appendChild(i)),i.textContent=`:host { ${PA}: ${n}px; }`}var VP;function HP(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){VP??(VP=new CSSStyleSheet,VP.replaceSync(IP(PP)));let t=!1;try{e.adoptedStyleSheets=[VP],t=!0}catch{}if(t){e.querySelector(`style[${AA}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(AA,``),t.textContent=IP(PP),e.prepend(t)}}function UP(e,t){WP(e,t),HP(t),BP(e,t)}function WP(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});UP(this,e)}}if(customElements.define(kA,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(kA)))e instanceof HTMLElement&&UP(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var GP=e=>e.startsWith(`f::`)?e.slice(3):e;function KP(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function qP(e,t){return e===``?t:`${e}/${t}`}function JP({files:e,path:t,isFolder:n,nextBasename:r}){let i=GP(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=KP(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=qP(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function YP(e){return e.endsWith(`/`)}function XP(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function ZP(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function QP(e,t){return t.includes(e)?ZP(t):[e]}function $P(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function eF(e,t){return{draggedPaths:e,target:t}}function tF(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(YP(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function nF(e,t){return t.kind===`root`||t.directoryPath==null?XP(e):t.directoryPath}function rF(e,t){let n=e.map(e=>{let n=nF(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}var iF=Symbol(`FILE_TREE_RENAME_VIEW`);function aF(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}var oF=512,sF=512;function cF(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function lF(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function uF(e){return lF(e).at(-1)??null}function dF(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}var fF=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},pF=e=>e.toLowerCase();function mF(e){return e.endsWith(`/`)}function hF(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function gF(e){return e.endsWith(`/`)?e.slice(0,-1):e}function _F(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}function vF(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function yF(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function bF(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return yF(e,t.path)?n?e:null:e;case`move`:return vF(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=bF(r,e,n),r==null)return null;return r}}}function xF(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function SF(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function CF(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!SF(kP.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function wF(e){switch(e.operation){case`add`:return{...xF(e),operation:`add`,path:e.path};case`remove`:return{...xF(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...xF(e),from:e.from,operation:`move`,to:e.to}}}function TF(e){return{...xF(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>wF(e)),operation:`batch`}}function EF(e){switch(e.operation){case`add`:case`remove`:case`move`:return wF(e);case`batch`:return TF(e);default:return null}}function DF(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=lF(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function OF(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:DF(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var kF=class{#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=new Set;#z=0;#B;#V=0;#H=!1;#U=0;#W;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=CF({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#B=this.#se(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ae(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#R=new Set(d),this.#L=f,this.#z=1),this.#Oe(f,!1),r!=null&&this.#Se(r,!1),this.#W=this.#Fe()}destroy(){this.#W?.(),this.#W=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#pe()}focusFirstItem(){this.#ve().length>0&&this.#Me(0)}focusLastItem(){this.#U<=0||(this.#Ne(),this.#Me(this.#U-1))}focusNextItem(){this.#De(1)}focusParentItem(){if(this.#c==null)return;let e=uF(this.#c);if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t)}focusPath(e){let t=this.#B.getPathInfo(e)?.path??null;if(t==null)return;this.#Ne();let n=this.#Y(t);n>=0&&this.#Me(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Y(t);return n>=0?(this.#Me(n),this.#ve()[n]??t):null}focusPreviousItem(){this.#De(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#X(this.#c)}getFocusedPath(){return this.#c}resolveNearestVisiblePath(e){let t=this.#ve();if(this.#U===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#B.getPathInfo(e)?.path??e,r=this.#Y(n);return r>=0?t[r]??n:this.#J(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#R]}getSelectionVersion(){return this.#z}getVisibleCount(){return this.#U}getVisibleRows(e,t){if(t<e||this.#U===0)return[];let n=Math.max(0,e),r=Math.min(this.#U-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=sF){let e=[];for(let t=n;t<=r;t+=1){let n=this.#B.getVisibleRowContext(t);if(n==null)break;e.push(this.#Q(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ne(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#ye(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#B.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#ye(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#Z(o,i,a,{ancestorPaths:this.#te(a),path:s})})}return this.#B.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#Z(e,r,r,{ancestorPaths:this.#te(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#U===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#U;r+=1){let i=e+r*t,a=Math.min(this.#U-1,Math.floor(i/t)),o=this.#$(a,r)??(a>0?this.#$(a-1,r):void 0);if(o==null)break;n.push({row:this.#Q(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#B.getPathInfo(e);return t==null?null:this.#X(t.path,t)}selectAllVisiblePaths(){this.#Ne();let e=[...this.#ve()];this.#re(e,this.#c??this.#L)}selectOnlyPath(e){let t=this.#Ae(e);t!=null&&this.#re([t],t)}selectPath(e){let t=this.#Ae(e);t==null||this.#R.has(t)||this.#re([...this.#R,t])}deselectPath(e){let t=this.#Ae(e);t==null||!this.#R.has(t)||this.#re([...this.#R].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.#re([...this.#R].filter(e=>e!==t),t);return}this.#re([...this.#R,t],t)}}selectPathRange(e,t){let n=this.#Ae(e);if(n==null)return;this.#Ne();let r=this.#L,i=r==null?-1:this.#be(r),a=this.#be(n);if(i===-1||a===-1){let e=t?[...this.#R,n]:[n];this.#re(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#ve().slice(o,s+1),l=t?[...this.#R,...c]:c;this.#re(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#U-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ne();let r=this.#ve(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#R);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#re([...o],this.#L??i,!1),this.#Me(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ae(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=QP(t,n);return this.#r.canDrag?.(r)===!1?!1:(n.includes(t)||this.#re([t],t,!1),this.#je(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#we(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=eF(t.draggedPaths,n);(tF(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}$P(t.target,n)||(this.#i={...t,target:n},this.#we())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#we())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#we(),!1;let n=eF(e.draggedPaths,t);if(tF(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#we(),!1;let r=rF(e.draggedPaths,t);if(r==null)return this.#we(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#B.move(e.from,e.to,{collision:e.collision})}else this.#oe(r.operations),this.#B.batch(r.operations)}catch(e){return this.#we(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#B.add(e)}remove(e,t={}){this.#B.remove(e,t)}move(e,t,n={}){this.#B.move(e,t,n)}batch(e){this.#B.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Se(e,!0)}openSearch(e=``){this.#Se(e,!0)}closeSearch(){this.#Se(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#xe(1)}focusPreviousSearchMatch(){this.#xe(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#B.getPathInfo(e);if(n==null)return!1;let r=n.path,i=mF(r),a=gF(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of lF(r))this.#B.isExpanded(e)||this.#B.expand(e);return this.#re([r],r,!1),this.#M!=null&&(this.#Se(null,!1),this.#y?.(this.#M)),this.#je(r),this.#T=r,this.#E=hF(r),this.#D=t.removeIfCanceled??!1,this.#we(),!0}[iF](){return{cancel:()=>{this.#G()},commit:()=>{this.#K()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#q(e)}}}#G(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,mF(e)?{recursive:!0}:void 0);return}this.#je(e),this.#we()}#K(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,mF(e)?{recursive:!0}:void 0);return}let t=mF(e),n=JP({files:this.#B.list(),isFolder:t,nextBasename:this.#E,path:gF(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#je(e),this.#v?.(n.error),this.#we();return}if(n.sourcePath===n.destinationPath){this.#je(e),this.#we();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(_F(n.sourcePath,t),_F(n.destinationPath,t))}#q(e){this.#T==null||this.#E===e||(this.#E=e,this.#we())}resetPaths(e,t={}){let n=this.#B.list().length,r=this.#U,i=CF({paths:e,preparedInput:t.preparedInput},`resetPaths`,this.#e.sort),a=this.#se(i.paths,i.preparedInput,t.initialExpandedPaths),o=this.#c,s=this.#T,c=this.getSelectedPaths(),l=this.#L;this.#W?.(),this.#B=a,this.#d.clear(),this.#pe();let u=c.map(e=>a.getPathInfo(e)?.path??null).filter(e=>e!=null),d=!cF(this.#R,u);this.#R=new Set(u),d&&(this.#z+=1),this.#L=l==null?null:a.getPathInfo(l)?.path??null,this.#T=s==null?null:a.getPathInfo(s)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#Oe(o,o!=null||u.length>0||this.#L!=null),this.#W=this.#Fe(),this.#we(),this.#Te({canonicalChanged:!0,operation:`reset`,pathCountAfter:i.paths.length,pathCountBefore:n,projectionChanged:!0,usedPreparedInput:t.preparedInput!=null,visibleCountDelta:this.#U-r})}#J(e){this.#Ne();let t=uF(e),n=dF(e,t),r=null,i=null;for(let e of this.#ve()){if(uF(e)!==t)continue;let a=dF(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Y(e){let t=this.#be(e);if(t!==-1)return t;let n=lF(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#be(t);if(r!==-1)return r}return this.#ve().length>0?0:-1}#X(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#B.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#ie(r.path):this.#ae(r.path);return this.#d.set(r.path,i),i}#Z(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#R.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#Q(e){return this.#Z(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#$(e,t){let n=this.#B.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ee(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ee(n),n];return this.#a.set(e,r),r}#te(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ee(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ne(e){this.#B.collapse(e)}#re(e,t=this.#L,n=!0){let r=[...new Set(e)],i=!cF(this.#R,r),a=this.#L!==t;!i&&!a||(this.#R=new Set(r),this.#L=t,i&&(this.#z+=1),n&&this.#we())}#ie(e){return{collapse:()=>{this.#ne(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#Ee(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#B.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#Ie(e)}}}#ae(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#oe(e){let t=this.#B.list();this.#se(t).batch(e)}#se(e,t,n){return new kP({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ce(){return this.#h??=this.#B.list(),this.#h}#le(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ce()){e.add(t);for(let n of lF(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#ue(){return this.#g??=this.#ce().map(pF),this.#g}#de(){return this.#f??=this.#le().filter(e=>e.endsWith(`/`)),this.#f}#fe(){return this.#p??=this.#de().map(pF),this.#p}#pe(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#me(){return this.#de().filter(e=>this.#B.isExpanded(e))}#he(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#R)for(let n of lF(e))t.add(n);this.#ge(t)}#ge(e){this.#H=!0;try{for(let t of this.#de()){let n=e.has(t),r=this.#B.isExpanded(t);n&&!r?this.#B.expand(t):!n&&r&&this.#B.collapse(t)}}finally{this.#H=!1}}#_e(){let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#M==null||this.#M.length===0||this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#U=this.#V;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#U=n.length}#ve(){return this.#I??this.#b}#ye(e){return this.#F?.[e]??e}#be(e){return this.#P?.get(e)??this.#B.getVisibleIndex(e)??-1}#xe(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Se(e,t){let n=e==null?null:fF(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#me()),this.#M=n,n==null)this.#he(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else if(n.length===0)this.#he(!1),this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else{let e=this.#Ce();this.#Oe(e,!0)}t&&(this.#y?.(this.#M),this.#we())}}#Ce(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ce(),n=this.#ue(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#de(),s=this.#fe();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of lF(e))l.add(t),c?.add(t)}return this.#ge(l),a??this.#c}#we(){for(let e of this.#t)e()}#Te(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#Ee(e){for(let t of lF(e))this.#B.isExpanded(t)||this.#B.expand(t);this.#B.isExpanded(e)||this.#B.expand(e)}#De(e){let t=this.#U;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ne(),this.#Me(r))}#Oe(e,t=!0){let n=this.#B.getVisibleCount();this.#V=n;let r=OF(this.#B.getVisibleTreeProjectionData(t?void 0:Math.min(n,oF)),e,t?e=>this.#B.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#_e(),this.#s=e==null?this.#ve().length>0?0:-1:this.#Y(e),this.#c=this.#s<0?null:this.#ke(this.#s)}#ke(e){return this.#ve()[e]??(this.#F==null?this.#B.getVisibleRowContext(e)?.row.path??null:null)}#Ae(e){return this.#B.getPathInfo(e)?.path??null}#je(e){if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t,!1)}#Me(e,t=!0){let n=this.#ke(e);n!=null&&(this.#s===e&&this.#c===n||(this.#s=e,this.#c=n,t&&this.#we()))}#Ne(){this.#l||this.#Oe(this.#c,!0)}#Pe(e){let t=bF(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=bF(this.#c,e,!0),r=[...this.#R].map(t=>bF(t,e)).filter(e=>e!=null).map(e=>this.#B.getPathInfo(e)?.path??null).filter(e=>e!=null),i=bF(this.#L,e),a=i==null?null:this.#B.getPathInfo(i)?.path??null,o=[...new Set(r)];return cF(this.#R,o)||(this.#R=new Set(o),this.#z+=1),this.#L=a,n}#Fe(){return this.#B.on(`*`,e=>{if(this.#H)return;e.canonicalChanged&&(this.#d.clear(),this.#pe()),this.#i!=null&&aF(e)&&(this.#i=null);let t=aF(e)?this.#Pe(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ce():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#Oe(n,r),this.#we();let i=EF(e);i!=null&&this.#Te(i)})}#Ie(e){if(this.#B.isExpanded(e)){this.#ne(e);return}this.#Ee(e)}},AF=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function jF(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(!(e[t]===`/`||t===e.length)){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function MF(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function NF(e,t){return t?`${e}/`:e}function PF(e,t=null){let n=AF(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set;for(let t of e??[]){let e=jF(t.path);if(e==null)continue;let n=NF(e.path,e.isDirectory);r.set(n,t.status),t.status===`ignored`&&e.isDirectory?a.add(n):e.isDirectory&&a.delete(n);for(let t of MF(e.path))i.add(t)}return{directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}var FF,IF,LF,RF,zF,BF,VF,HF,UF,WF,GF={},KF=[],qF=Array.isArray,JF=KF.slice,YF=Object.assign;function XF(e){e&&e.parentNode&&e.remove()}function ZF(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?JF.call(arguments,2):n),QF(e,o,r,i,null)}function QF(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++IF,__i:-1,__u:0};return i==null&&FF.vnode!=null&&FF.vnode(a),a}function $F(e){return e.children}function eI(e,t){this.props=e,this.context=t,this.__g=0}function tI(e,t){if(t==null)return e.__?tI(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?tI(e):null}function nI(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return nI(e)}}function rI(e){(8&e.__g||!(e.__g|=8)||!LF.push(e)||zF++)&&RF==FF.debounceRendering||((RF=FF.debounceRendering)||queueMicrotask)(iI)}function iI(){for(var e,t,n,r,i,a,o,s,c=1;LF.length;)LF.length>c&&LF.sort(BF),e=LF.shift(),c=LF.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=YF({},r)).__v=r.__v+1,FF.vnode&&FF.vnode(n),fI(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??tI(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,mI(a,n,o),n.__e!=i&&nI(n)));zF=0}function aI(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||KF,b=t.length;for(c=oI(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?GF:y[m.__i]||GF,m.__i=f,_=fI(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&_I(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=sI(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function oI(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?QF(null,o,null,null,null):qF(o)?QF($F,{children:o},null,null,null):o.constructor==null&&o.__b>0?QF(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=cI(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=tI(s)),vI(s,s));return r}function sI(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=sI(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=tI(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function cI(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function lI(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function uI(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||lI(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||lI(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(VF,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=HF,e.addEventListener(t,a?WF:UF,a)):e.removeEventListener(t,a?WF:UF,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function dI(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=HF++;else if(t.u<n.l)return;return n(FF.event?FF.event(t):t)}}}function fI(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=FF.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new M(v,x):(t.__c=f=new eI(v,x),f.constructor=M,f.render=yI),b&&b.sub(f),f.props=v,f.state||={},f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=YF({},f.__s)),YF(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=FF.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=YF({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===$F&&d.key==null&&(E=hI(d.props.children)),s=aI(e,qF(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(j=a.length;j--;)XF(a[j]);pI(t)}else t.__e=n.__e,t.__k=n.__k,e.then||pI(t);FF.__e(e,t,n)}else s=t.__e=gI(n.__e,t,n,r,i,a,o,c,l,u);return(d=FF.diffed)&&d(t),128&t.__u?void 0:s}function pI(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(pI)}function mI(e,t,n){for(var r=0;r<n.length;r++)_I(n[r],n[++r],n[++r]);FF.__c&&FF.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){FF.__e(e,t.__v)}})}function hI(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:qF(e)?e.map(hI):YF({},e)}function gI(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(FF.__m&&FF.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=JF.call(e.childNodes),v=n.props||GF,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;uI(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||uI(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),aI(b==`template`?e.content:e,qF(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&tI(n,0),s,c,l),a!=null)for(u=a.length;u--;)XF(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||uI(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&uI(e,u,g,v[u],i))}return e}function _I(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){FF.__e(e,n)}}function vI(e,t,n){var r,i;if(FF.unmount&&FF.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||_I(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){FF.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&vI(r[i],t,n||typeof e.type!=`function`);n||XF(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function yI(e,t,n){return this.constructor(e,n)}function bI(e,t){var n,r,i,a;t==document&&(t=document.documentElement),FF.__&&FF.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=ZF($F,null,[e]),i=[],a=[],fI(t,e,r||GF,GF,t.namespaceURI,r?null:t.firstChild?JF.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),mI(i,e,a)}function xI(e,t){e.__u|=32,bI(e,t)}FF={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw zF=0,e}},IF=0,eI.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=YF({},this.state);typeof e==`function`&&(e=e(YF({},n),this.props)),e&&YF(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),rI(this))},eI.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),rI(this))},eI.prototype.render=$F,LF=[],zF=0,BF=function(e,t){return e.__v.__b-t.__v.__b},VF=/(PointerCapture)$|Capture$/i,HF=0,UF=dI(!1),WF=dI(!0);var SI=0;Array.isArray;function CI(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--SI,__i:-1,__u:0,__source:i,__self:a};return FF.vnode&&FF.vnode(l),l}var wI=16,TI=16,EI={};function DI({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=EI[e]??{width:wI,height:TI},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return CI(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:CI(`use`,{href:c})})}var OI=e=>{if(e.length<2)return[e,``];let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]},kI=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},AI=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},jI=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},MI=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},NI=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function PI({children:e,marker:t,variant:n=`default`}){"use no memo";return CI(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:CI(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?CI(`span`,{"data-truncate-fade":!0}):t})})}function FI(e){"use no memo";let{mode:t,children:n}=e;return CI(`div`,{children:[CI(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?CI(`span`,{children:n}):n}),CI(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?CI(`span`,{children:n}):n})]})}function II({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=CI(FI,{mode:t,children:e},`content`),o=CI(PI,{marker:n,mode:t,variant:r},`marker`),s=CI(`div`,{"data-truncate-fill":!0},`fill`);return CI(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:CI(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function LI({children:e,...t}){"use no memo";return CI(II,{mode:`truncate`,...t,children:e})}function RI({children:e,...t}){"use no memo";return CI(II,{mode:`fruncate`,...t,children:e})}function zI({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=CI(LI,{...s,children:t[0]}),l=CI(RI,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return CI(`div`,{className:a,style:o});if(e.length<i)return CI(n===`end`?RI:LI,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=OI:r===`extension`?t=kI:r===`leaf-path`&&(t=AI);else if(typeof r==`number`)t=jI,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=MI:e===`first`&&(t=NI)}else typeof r==`function`&&(t=r);t??=OI;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=CI(LI,{...s,..._,children:f}),l=CI(RI,{...s,...v,children:p})}return CI(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[CI(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),CI(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var BI={endIndex:-1,startIndex:-1};function VI(e,t,n){return Math.min(Math.max(e,t),n)}function HI(e,t){return e<0||t<e?BI:{endIndex:t,startIndex:e}}function UI(e){return e.startIndex<0||e.endIndex<e.startIndex}function WI(e,t){return UI(e)?0:(e.endIndex-e.startIndex+1)*t}function GI(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function KI(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function qI(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function JI(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function YI(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function XI(e,t,n){if(e.length===0||t<=0)return[];let r=YI(e),i=qI(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=JI(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function ZI(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=VI(t.scrollTop,0,o),c=t.stickyRows??XI(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=GI(s,n,t.itemHeight),m=GI(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?BI:HI(m,KI(u+d,n,t.itemHeight)),y=g+1,b=UI(v)?BI:HI(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=WI(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:UI(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var QI={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},$I={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},eL=`Contains git status items`;function tL(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function nL(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function rL(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}function iL(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function aL(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}var oL,sL,cL,lL,uL=Object.is,dL=0,fL=[],pL=FF,mL=pL.__b,hL=pL.__r,gL=pL.diffed,_L=pL.__c,vL=pL.unmount,yL=pL.__;function bL(e,t){pL.__h&&pL.__h(sL,e,dL||t),dL=0;var n=sL.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function xL(e){return dL=1,SL(PL,e)}function SL(e,t,n){var r=bL(oL++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):PL(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);uL(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=sL,!sL.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,uL(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};sL.__f=!0;var a=sL.shouldComponentUpdate,o=sL.componentWillUpdate;sL.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},sL.shouldComponentUpdate=i}return r.__N||r.__}function CL(e,t){var n=bL(oL++,3);!pL.__s&&NL(n.__H,t)&&(n.__=e,n.u=t,sL.__H.__h.push(n))}function wL(e,t){var n=bL(oL++,4);!pL.__s&&NL(n.__H,t)&&(n.__=e,n.u=t,sL.__h.push(n))}function TL(e){return dL=5,EL(function(){return{current:e}},[])}function EL(e,t){var n=bL(oL++,7);return NL(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function DL(e,t){return dL=8,EL(function(){return e},t)}function OL(){for(var e;e=fL.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(jL),e.__H.__h.forEach(ML),e.__H.__h=[]}catch(t){e.__H.__h=[],pL.__e(t,e.__v)}}pL.__b=function(e){sL=null,mL&&mL(e)},pL.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),yL&&yL(e,t)},pL.__r=function(e){hL&&hL(e),oL=0;var t=(sL=e.__c).__H;t&&(cL===sL?(t.__h=[],sL.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(jL),t.__h.forEach(ML),t.__h=[],oL=0)),cL=sL},pL.diffed=function(e){gL&&gL(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fL.push(t)!==1&&lL===pL.requestAnimationFrame||((lL=pL.requestAnimationFrame)||AL)(OL)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),cL=sL=null},pL.__c=function(e,t){t.some(function(e){try{e.__h.forEach(jL),e.__h=e.__h.filter(function(e){return!e.__||ML(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],pL.__e(n,e.__v)}}),_L&&_L(e,t)},pL.unmount=function(e){vL&&vL(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{jL(e)}catch(e){t=e}}),n.__H=void 0,t&&pL.__e(t,n.__v))};var kL=typeof requestAnimationFrame==`function`;function AL(e){var t,n=function(){clearTimeout(r),kL&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);kL&&(t=requestAnimationFrame(n))}function jL(e){var t=sL,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),sL=t}function ML(e){var t=sL;e.__c=e.__(),sL=t}function NL(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!uL(t,e[n])})}function PL(e,t){return typeof t==`function`?t(e):t}function FL(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function IL(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function LL({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return CI(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function RL(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:CI(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return CI($F,{children:[CI(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:CI(LI,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function zL(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function BL(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function VL(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function HL({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=ZI(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:VL(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?VL(u,1,t,o):i&&r<=0&&c.length>0?XI(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var UL=400,WL=10,GL=40,KL=18;function qL(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?JL(e,t,n):a instanceof HTMLElement?a:null}function JL(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function YL(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function XL(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function ZL(){return navigator.vendor!==`Apple Computer, Inc.`}function QL(e,t){let n=e-t.top;if(n<GL)return-Math.ceil((GL-Math.max(0,n))/GL*KL);let r=t.bottom-e;return r<GL?Math.ceil((GL-Math.max(0,r))/GL*KL):0}function $L(e,t){if(e!=null){let t=QI[e];return t==null?null:{text:t,title:$I[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:eL}:null}function eR(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function tR(e){return e!=null&&`toggle`in e}function nR(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function rR(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function iR(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function aR(e,t){return e!=null&&e>0?e:t}function oR(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function sR(e,t,n,r,i=0){let a=iL({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function cR(e,t,n,r,i,a){let o=aL({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function lR(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function uR(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function dR(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function fR(e,t){return t&&dR(e)||(e.ctrlKey||e.metaKey)&&nR(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var pR=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function mR(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function hR(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function gR(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function _R(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function vR(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function yR(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function bR(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function xR(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function SR(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=xR(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function CR(e,t){return{kind:e.kind,name:BL(e),path:t}}function wR(e){return e==null?void 0:`${e}__tree`}function TR(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function ER(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function DR(e,t){if(e==null)return null;if(`text`in e)return CI(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?ER(e.icon)?t(e.icon):{name:e.icon}:ER(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return CI(`span`,{title:e.title,children:CI(DI,{...n})})}function OR(e){e!=null&&FL(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function kR(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=zL(e);return CI($F,{children:[e.depth>0?CI(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>CI(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,CI(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?CI(DI,{...t(`file-tree-icon-chevron`)}):CI(DI,{...t(`file-tree-icon-file`,u)})}),CI(`div`,{"data-item-section":`content`,children:e.isFlattened?RL(e,c,a):c??CI(zI,{minimumLength:5,split:`extension`,children:e.name})}),i?CI(`div`,{"data-item-section":`decoration`,children:r==null?null:DR(r,t)}):null,s?CI(`div`,{"data-item-section":`git`,children:DR(o,t)}):null,n?CI(`div`,{"data-item-section":`action`,children:l?CI(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:CI(DI,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function AR(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:j,onRowClick:M,onKeyDown:N}=e,P=zL(t),{isParked:F=!1,mode:I=`flow`,style:L}=r,R=I===`sticky`,z=_?.get(P)??null??eR(t.ancestorPaths,v,y),B=t.kind===`directory`&&(b?.has(P)??!1),V=A(t,P),H=$L(z,B),U=S&&w,W=V!=null||x||U,G=U&&T===`always`,K=a.getPath()===P,ee=K?a.getValue():``,q=R||!K?null:CI(LL,{ref:D,ariaLabel:`Rename ${BL(t)}`,isFlattened:t.isFlattened,value:ee,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),te=kR(t,k,{actionLaneEnabled:U,customDecoration:V,decorationLaneEnabled:W,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:H,gitLaneActive:x,renameInput:q,showDecorativeActionAffordance:G}),ne={...nL({ariaLabel:BL(t),domId:t.isFocused?TR(h,P,F):void 0,extraStyle:L,features:{actionLaneEnabled:U,contextMenuButtonVisibility:U?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:I,row:t,state:{containsGitChange:B,effectiveGitStatus:z,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusPath(P),j(t,P,{anchorRect:gR(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:R?void 0:()=>{i.focusPath(P)},onKeyDown:R?void 0:N,ref:e=>{O(P,e)}};return!R&&K?CI(`div`,{...ne,children:te}):CI(`button`,{...ne,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(R){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,I)},children:te})}function jR(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(zL(e))).map((n,r)=>AR(e,n,t.start+r))}function MR({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=NP,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=TL(null),v=TL(null),y=TL(!1),b=TL(null),x=TL(null),S=TL(null),C=TL(null),w=TL(null),T=TL(new Map),E=TL(new Map),D=TL(()=>{}),O=TL(null),k=TL(!1),A=TL(null),j=TL(null),M=TL(!1),N=TL(null),P=TL(null),F=TL(null),I=TL(null),L=TL(null),R=TL(null),z=TL(null),B=TL(null),V=TL(!1),H=TL(null),U=TL(null),W=TL(null),G=TL(null),K=EL(()=>new Map,[]),[,ee]=xL(0),[q,te]=xL(null),[ne,re]=xL(null),[ie,ae]=xL(null),[oe,se]=xL(null),[ce,le]=xL(0),[J,ue]=xL(null),de=TL(J);de.current=J;let fe=TL(null),pe=TL(null),me=TL(null),he=TL(null),ge=TL(null),_e=TL(!1),ve=()=>{pe.current=null,me.current=null,he.current=null},ye=(e,t)=>{pe.current=e,me.current=null,he.current=t==null?null:{path:e,scrollTop:t}},be=(e,t)=>{pe.current=null,me.current={path:e,viewportOffset:t},he.current=null},xe=TL(d===`retain`&&t.isSearchOpen()),[Se,Ce]=xL(p);CL(()=>{p||Ce(!1)},[p]);let we=TL(!1),Te=DL(()=>{we.current=!0,Ce(e=>e&&!1)},[]),[Ee,De]=xL(()=>HL({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Oe,ke]=xL(!1);CL(()=>{ke(!0)},[]);let Ae=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,je=e?.contextMenu?.triggerMode??(Ae?`right-click`:`both`),Me=je===`both`||je===`button`,Ne=e?.contextMenu?.buttonVisibility??`when-needed`,Pe=je===`both`||je===`right-click`;wL(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;ge.current=t,re(t),se(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(_e.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let Fe=DL((e,t)=>{vR(T.current,e,t)},[]),Ie=DL((e,t)=>{vR(E.current,e,t)},[]),Le=DL(e=>{x.current=e},[]),Re=DL(e=>yR(e,E.current,T.current),[]),ze=n!=null||r!=null||i!=null,{resolveIcon:Be}=EL(()=>WA(a),[a]),Ve=t[iF](),Y=Ve.getPath(),He=Y!=null,Ue=t.isSearchOpen(),We=t.getSearchValue(),Ge=t.getFocusedPath(),Ke=t.getFocusedIndex(),qe=t.isDragAndDropEnabled(),Je=t.getDragSession(),Ye=EL(()=>Je==null?null:new Set(Je.draggedPaths),[Je]),Xe=Je?.target??null,Ze=Je?.primaryPath??null,Qe=wR(o),{overlayHeight:$e,overlayRows:et,snapshot:tt,visibleRows:nt}=Ee,rt=tt.physical.viewportHeight,it=EL(()=>({end:tt.window.endIndex,start:tt.window.startIndex}),[tt.window.endIndex,tt.window.startIndex]),at=et,ot=tt.sticky.rows,st=tt.physical.totalHeight,ct=tt.sticky.height,lt=EL(()=>new Set(ot.map(e=>zL(e.row))),[ot]),ut=Ke>=0&&Ke>=it.start&&Ke<=it.end,dt=DL((e,t)=>u?.({item:CR(e,t),row:e})??null,[u]),ft=DL(e=>FL(e==null?null:T.current.get(e)??null)?!0:FL(S.current),[]),pt=DL(e=>{ft(t.focusNearestPath(e))},[t,ft]),mt=TL(pt);mt.current=pt;let ht=TL(!0),gt=TL(()=>{}),_t=DL((t=!0)=>{let n=de.current;n!=null&&(ht.current=ht.current&&t,ue(null),e?.contextMenu?.onClose?.(),ht.current&&pt(n.path))},[e?.contextMenu,pt]);gt.current=_t;let vt=DL(e=>{let t=e==null?null:_R(S.current,e);ae(e=>e===t?e:t)},[]),yt=DL((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Re(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;ye(n,e?.scrollTop??null),k.current=!0,te(e=>e===n?e:n)}i.focus(),vt(a),ht.current=!0,ue({anchorRect:r?.anchorRect??null,item:CR(e,n),path:n,source:r?.source??`keyboard`})},[t,Re,vt]),bt=DL(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=iR(e,rt);N.current=Ke<0||e==null?null:Math.max(0,Math.min(Ke*s-e.scrollTop,Math.max(0,t-s))),M.current=!0}t.startRenaming(e)!==!1&&(se(`focus`),ee(e=>e+1))}},[t,Ke,s,l,rt]),xt=DL((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=iR(i,rt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:HL({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return k.current=!0,cR(i,a,s,l,u,d),D.current(),fe.current=n?e:null,!0},[t,s,c,rt,h]),St=()=>y.current===!0||G.current!=null||V.current===!0,Ct=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),wt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Tt=()=>{I.current!=null&&(clearTimeout(I.current),I.current=null),F.current=null},Et=()=>{R.current?.remove(),R.current=null},Dt=()=>{wt(P.current),P.current=null,L.current=null},Ot=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},kt=()=>{B.current?.(),B.current=null,G.current!=null&&(clearTimeout(G.current),G.current=null),V.current=!1,H.current=null,W.current=null,U.current!=null&&(U.current.setAttribute(`draggable`,`true`),U.current.style.removeProperty(`touch-action`),U.current=null),Et(),Tt(),Dt(),z.current=null},At=(e,n)=>{let r=S.current?.getRootNode(),i=YL(qL(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},jt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Tt();return}let r=t.getItem(e.directoryPath),i=tR(r)?r:null;if(i==null||i.isExpanded()){Tt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;F.current!==a&&(Tt(),F.current=a,I.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},Mt=()=>{P.current=null;let e=L.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=QL(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,D.current()),jt(At(e.clientX,e.clientY)),P.current=Ct(Mt)},Nt=(e,t)=>{L.current={clientX:e,clientY:t},P.current??=Ct(Mt)},Pt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(kt(),Et(),Tt(),Dt(),t.startDrag(r)===!1){e.preventDefault();return}if(z.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),ZL())){let t=XL(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Ot(t),R.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Ft=()=>{Et(),Tt(),Dt(),z.current=null,t.cancelDrag()},It=(e,n,r)=>{if(G.current!=null||V.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;W.current={clientX:i.clientX,clientY:i.clientY},U.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!V.current;G.current!=null&&(clearTimeout(G.current),G.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),B.current===o&&(B.current=null),t&&(a.setAttribute(`draggable`,`true`),U.current===a&&(U.current=null),W.current=null)},s=e=>{let t=e.touches[0],n=W.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=WL*WL||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),B.current=o,G.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),U.current===a&&(U.current=null),W.current=null;return}V.current=!0,U.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),z.current=n;let e=a.getBoundingClientRect(),s=XL(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Ot(s),R.current=s,H.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=H.current;n!=null&&R.current!=null&&(R.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),jt(At(t.clientX,t.clientY)),Nt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&At(n.clientX,n.clientY),t.completeDrag(),kt()},u=()=>{t.cancelDrag(),kt()};B.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},UL)},Lt=e=>{if(J!=null){if(e.key===`Escape`){_t(),e.preventDefault(),e.stopPropagation();return}pR.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(Ve.isActive()){if(e.key===`Escape`)Ve.cancel();else if(e.key===`Enter`)Ve.commit();else return;se(`focus`),ee(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){bt(Ge??void 0),e.preventDefault(),e.stopPropagation();return}if(Ue){if(e.key===`Escape`)M.current=!1,N.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=iR(n,rt);N.current=Ke<0||n==null?null:Math.max(0,Math.min(Ke*s-n.scrollTop,Math.max(0,r-s))),M.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;se(`focus`),ee(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&rR(e)){t.openSearch(e.key),ee(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ae&&dR(e),r=fR(e,Ae),i=r&&S.current!=null?IL(S.current):null,a=r?new Set(bR(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==Ge&&a.has(o)){let e=C.current;ye(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=tR(p)?p:null,h=u!=null&&(lt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=yR(u,E.current,T.current);e==null||n==null?y=!1:yt(e,u)}else if((e.ctrlKey||e.metaKey)&&nR(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;se(`focus`);let b=t.getFocusedPath(),x=b!=null&&(lt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))ye(b,v?.scrollTop??null),k.current=!0,te(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(be(b,SR(S.current,v,i,u,s,ct,rt)),k.current=!0,te(e=>e===b?e:b)):ve()}ee(e=>e+1),e.preventDefault(),e.stopPropagation()};wL(()=>{if(!(!f||!Ue)){if(xe.current){xe.current=!1;return}FL(w.current)}},[Ue,f]),wL(()=>{let e=x.current;switch(tL({hasRenderedInput:e!=null,previousRenamingPath:j.current,renamingPath:Y})){case`reset`:j.current=null;return;case`reveal-canonical`:Y!=null&&xt(Y,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(fe.current=null,j.current=Y,FL(e),e.select());return}},[it.end,it.start,Y,xt,lt]),wL(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=IL(e)?.dataset.itemPath??null;te(e=>e===t?e:t)},i=()=>{n(),k.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,IL(e)!=null){r();return}k.current=!1,te(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),k.current=!1,te(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;te(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),wL(()=>{let e=S.current;e!=null&&(tt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[tt.physical.scrollTop]),wL(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=iR(n,g);let a=()=>{let e=t.getVisibleCount(),r=aR(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),De(HL({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};D.current=a;let o=!1,l=t.subscribe(()=>{o?ee(e=>e+1):o=!0,a()}),u=()=>{_e.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,le(e=>e+1),e=null},50))},d=null,f=()=>{i!=null&&delete i.dataset.overlayReveal,d!=null&&(clearTimeout(d),d=null)},p=()=>{i==null||_e.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,d!=null&&clearTimeout(d),d=setTimeout(()=>{f()},200))},m=()=>{if(a(),n.scrollTop>0&&f(),de.current!=null&&y.current&>.current(),_e.current===!0){y.current=!1;return}re(e=>e==null?e:null),u()},_=()=>{u(),p()},v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),x=e=>{v.has(e.key)&&_()};n.addEventListener(`scroll`,m,{passive:!0}),n.addEventListener(`wheel`,_,{passive:!0}),n.addEventListener(`touchmove`,_,{passive:!0}),n.addEventListener(`keydown`,x);let w=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:oR(e[0]))??iR(n,g),a()}):null;return w?.observe(n),()=>{D.current=()=>{},l(),n.removeEventListener(`scroll`,m),n.removeEventListener(`wheel`,_),n.removeEventListener(`touchmove`,_),n.removeEventListener(`keydown`,x),e!=null&&clearTimeout(e),d!=null&&clearTimeout(d),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,w?.disconnect()}},[t,g,s,c,h]),wL(()=>{Ae||J==null||_t(!1)},[_t,Ae,J]);let Rt=EL(()=>J==null?null:`${J.path}::${J.source}`,[J]);wL(()=>{if(Rt==null){m?.clearSlotContent(IA);return}let t=de.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??hR(n.getBoundingClientRect()),close:e=>{gt.current(e?.restoreFocus??!0)},restoreFocus:()=>{ht.current&&mt.current(de.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(IA,i),e?.contextMenu?.onOpen?.(t.item,r),OR(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&OR(i)}),()=>{m?.clearSlotContent(IA)}},[Rt,e?.contextMenu,m]),wL(()=>{J!=null&&t.getItem(J.path)==null&&_t()},[_t,J,t]),wL(()=>{if(J==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(mR(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&_t())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),_t())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[_t,J]),wL(()=>{let e=C.current,t=S.current;if(e==null||t==null){A.current=Ge;return}let n=Ge==null?null:T.current.get(Ge)??null,r=IL(t),i=r?.dataset.itemPath??null,a=He&&x.current===r,o=f&&w.current===r,c=M.current&&!Ue,l=N.current??0,u=fe.current,d=pe.current,p=me.current,m=he.current,h=r!=null,g=k.current||h,_=A.current!==Ge,v=d!=null&&d===Ge&&Ge!=null,y=c&&cR(e,Ke,s,rt,st,l),b=u!=null&&u===Ge&&cR(e,Ke,s,rt,st,ct),E=p!=null&&p.path===Ge&&cR(e,Ke,s,rt,st,p.viewportOffset),O=m!=null&&m.path===Ge&&e.scrollTop!==m.scrollTop;if(O&&(e.scrollTop=m.scrollTop),(O||b||E||y||g&&_&&u!==Ge&&!v&&sR(e,Ke,s,rt,ct))&&D.current(),!g){A.current=Ge;return}if(a){A.current=Ge;return}if(o&&!c){A.current=Ge;return}if(n==null){c&&Ke>=0&&(cR(e,Ke,s,rt,st,l),D.current()),A.current=Ge;return}(_||c||u===Ge||d===Ge||p?.path===Ge||m?.path===Ge||i==null||i!==Ge)&&(FL(n),u===Ge&&(fe.current=null),d===Ge&&(pe.current=null),p?.path===Ge&&(me.current=null),m?.path===Ge&&(he.current=null),M.current=!1,N.current=null),A.current=Ge},[t,Ke,Ge,ut,s,He,Ue,it,rt,f,ct,st,nt]);let zt=Ke>=0&&Ke>=tt.visible.startIndex&&Ke<=tt.visible.endIndex,Bt=Ge!=null&&at.some(e=>zL(e.row)===Ge),Vt=zt||Bt,Ht=Me&&k.current===!0&&Vt?Ge:null,Ut=oe===`pointer`?ne:null,Wt=J?.path??ge.current??Ut??Ht??ne,Gt=J?.source===`right-click`;wL(()=>{y.current&&J==null||vt(Re(Wt))},[J,Re,it,rt,ce,at,Wt,vt,nt]);let Kt=DL(e=>{if(y.current||mR(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&se(e=>e===`pointer`?e:`pointer`),re(e=>e===i?e:i)},[]),qt=DL(()=>{re(null)},[]);wL(()=>{if(!qe)return;let e=()=>{kt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),kt(),t.cancelDrag()}},[t,qe]);let Jt=e=>{if(!qe||t.getDragSession()==null||V.current)return;let n=YL(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),jt(t.getDragSession()?.target??null),Nt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},Yt=e=>{if(!qe||t.getDragSession()==null||V.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Tt(),Dt(),t.setDragTarget(null))},Xt=e=>{!qe||t.getDragSession()==null||V.current||(e.preventDefault(),At(e.clientX,e.clientY),t.completeDrag(),Et(),Tt(),Dt(),z.current=null)},Zt=tt.window.height,Qt=tt.window.offsetTop,$t=Math.min(0,rt-Zt-ct),en=q===Ge||M.current,tn=Ge!=null&&en&&!ut&&Ke>=0?nt[Ke]??t.getVisibleRows(Ke,Ke)[0]??null:null,nn=tn==null?null:lR(Ke,s,it,Zt),rn=z.current,an=Ze!=null&&rn!=null&&rn.path===Ze&&rn.index>=it.start&&rn.index<=it.end,on=Ze!=null&&rn!=null&&rn.path===Ze&&!an&&rn.path!==tn?.path?rn:null,sn=on==null?null:lR(on.index,s,it,Zt),cn=uR((Ke>=0?nt[Ke]??t.getVisibleRows(Ke,Ke)[0]??null:null)?.ancestorPaths.at(-1)??null),ln=Ue&&Ge!=null?TR(o,Ge,!ut):void 0,un=J?.path??(Ue?Ge:q),dn=J?.path??ne,fn=Re(Wt),pn=Ae&&Me&&!Gt&&!He&&fn!=null&&ie!=null&&Wt!=null,mn=Ae&&(pn||J!=null),hn=J?.anchorRect,gn=hn==null&&fn!=null&&ie!=null&&(J!=null||pn)?ie:null,_n=hn==null?gn==null?void 0:{top:`${gn}px`}:{left:`${hn.left}px`,position:`fixed`,right:`auto`,top:`${hn.top}px`},vn=Gt?{opacity:`0`}:void 0,yn=DL((e,n,r,i)=>{let a=t.getItem(r),o=rL({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:t.isSearchOpen(),mode:i});switch(o.selection.kind){case`range`:t.selectPathRange(r,o.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(r);break;case`single`:t.selectOnlyPath(r);break}let s=e.currentTarget instanceof HTMLElement?e.currentTarget:null,c=n.index>=tt.visible.startIndex&&n.index<=tt.visible.endIndex,l=i===`flow`&&c&&s!=null&&s.dataset.itemParked!==`true`;a?.focus(),l&&(k.current=!0,te(e=>e===r?e:r),se(`focus`)),o.toggleDirectory&&tR(a)&&a.toggle(),o.closeSearch&&t.closeSearch(),o.revealCanonical&&xt(r,{targetOffset:`sticky-parents`})},[t,tt.visible.endIndex,tt.visible.startIndex,xt]),bn=()=>{if(y.current||!Me||Wt==null||fn==null)return;let e=t.getItem(Wt);e!=null&&(vt(fn),ht.current=!0,ue({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:fn.getAttribute(`aria-label`)??Wt,path:e.getPath()},path:e.getPath(),source:`button`}))},xn={contextHoverPath:dn,contextMenuButtonTriggerEnabled:Me,contextMenuButtonVisibility:Ne,contextMenuEnabled:Ae,contextMenuRightClickEnabled:Pe,contextMenuTriggerMode:je,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:qe,draggedPathSet:Ye,dragTarget:Xe,gitLaneActive:ze,gitStatusByPath:n,handleRowDragEnd:Ft,handleRowDragStart:Pt,handleRowTouchStart:It,ignoredGitDirectories:r,ignoredInheritanceCache:K,instanceId:o,itemHeight:s,onKeyDown:Lt,onRowClick:yn,openContextMenuForRow:yt,registerButton:Fe,registerRenameInput:Le,renameView:Ve,renderDecorationForRow:dt,resolveIcon:Be,shouldSuppressContextMenu:St,visualFocusPath:un},Sn={...xn,registerButton:Ie};return CI(`div`,{ref:S,id:Qe,"data-file-tree-context-menu-button-visibility":Ae&&Me?Ne:void 0,"data-file-tree-context-menu-trigger-mode":Ae?je:void 0,"data-file-tree-has-context-menu-action-lane":Ae&&Me?`true`:void 0,"data-file-tree-has-git-lane":ze?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:qe?Yt:void 0,onDragOver:qe?Jt:void 0,onDrop:qe?Xt:void 0,onKeyDown:Lt,onPointerLeave:Ae?qt:void 0,onPointerOver:Ae?Kt:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[CI(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:cn}}),CI(`slot`,{name:FA,"data-type":`header-slot`}),f?CI(`div`,{"data-file-tree-search-container":!0,"data-open":Ue?`true`:`false`,children:CI(`input`,{ref:w,"aria-activedescendant":ln,"aria-controls":Qe,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Se?`true`:void 0,value:We,onBlur:()=>{d===`retain`&&!we.current||t.closeSearch()},onFocus:Te,onPointerDown:Te,onInput:e=>{Te();let n=e.currentTarget;t.setSearch(n.value)}})}):null,CI(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Oe&&at.length>0?CI(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:CI(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${$e}px`},children:at.map((e,t)=>AR(Sn,e.row,`sticky:${zL(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${at.length-t}`}}))})}):null,CI(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${st}px`},children:[CI(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${Qt}px`}}),CI(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${Zt}px`,top:`${$t}px`,bottom:`${$t}px`},children:[jR(xn,it,lt),tn!=null&&nn!=null?AR(xn,tn,`parked:${tn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:Ze===tn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${nn}px`}}):null,on!=null&&sn!=null?AR(xn,on,`parked-drag:${on.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${sn}px`}}):null]})]})]}),Ae?CI(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":mn?`true`:`false`,style:_n,children:[CI(`button`,{ref:v,type:`button`,"data-type":LA,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":J==null?`false`:`true`,"data-visible":pn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),J!=null){_t();return}bn()},tabIndex:-1,style:vn,children:CI(DI,{...Be(`file-tree-icon-ellipsis`)})}),J==null?null:CI(`slot`,{name:IA})]}):null,J==null?null:CI(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),_t()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),_t()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var NR={hydrateRoot:(e,t)=>{xI(ZF(MR,t),e)},renderRoot:(e,t)=>{bI(ZF(MR,t),e)},unmountRoot:e=>{bI(null,e)}};function PR(e,t){NR.renderRoot(e,t)}function FR(e,t){NR.hydrateRoot(e,t)}function IR(e){NR.unmountRoot(e)}var LR=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}},RR=`__c`,zR=`__k`,BR=`__d`,VR=`__s`,HR=/[\s\n\\/='"\0<>]/,UR=/^(xlink|xmlns|xml)([A-Z])/,WR=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,GR=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,KR=new Set([`draggable`,`spellcheck`]);function qR(e){e.__g===void 0?e[BR]=!0:e.__g|=8}function JR(e){e.__g===void 0?e[BR]=!1:e.__g&=-9}function YR(e){return e.__g===void 0?!0===e[BR]:!!(8&e.__g)}var XR=/["&<]/;function ZR(e){if(e.length===0||!1===XR.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`"`;break;case 38:i=`&`;break;case 60:i=`<`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var QR={},$R=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),ez=/[A-Z]/g;function tz(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:QR[n]||(QR[n]=n.replace(ez,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||$R.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function nz(){this.__d=!0}function rz(e,t){return{__v:e,context:t,props:e.props,setState:nz,forceUpdate:nz,__d:!0,__h:[]}}function iz(e,t,n){if(!e.s){if(n instanceof az){if(!n.s)return void(n.o=iz.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(iz.bind(null,e,t),iz.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var az=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{iz(r,1,a(this.v))}catch(e){iz(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?iz(r,1,t?t(i):i):n?iz(r,1,n(i)):iz(r,2,i)}catch(e){iz(r,2,e)}},r},e}(),oz,sz,cz,lz,uz={},dz=Array.isArray,fz=Object.assign,pz=``,mz=`<!--$s-->`,hz=`<!--/$s-->`;function gz(e,t){var n,r=e.type,i=!0;return e[RR]?(i=!1,(n=e[RR]).state=n[VR]):n=new r(e.props,t),e[RR]=n,n.__v=e,n.props=e.props,n.context=t,qR(n),n.state??=uz,n[VR]??(n[VR]=n.state),r.getDerivedStateFromProps?n.state=fz({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[VR]===n.state?n.state:n[VR]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),cz&&cz(e),n.render(n.props,n.state,t)}function _z(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===pz)return pz;var s=typeof e;if(s!=`object`)return s==`function`?pz:s==`string`?ZR(e):e+pz;if(dz(e)){var c,l=pz;i[zR]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=_z(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=pz,dz(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return pz;e.__=i,oz&&oz(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===$F){if(`tpl`in g){for(var x=pz,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!dz(C)?x+=C:x+=_z(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+ZR(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var w=t[_.__c];b=w?w.props.value:_.__}var T=h.prototype&&typeof h.prototype.render==`function`;if(T)v=gz(e,b),y=e[RR];else{e[RR]=y=rz(e,b);for(var E=0;YR(y)&&E++<25;){JR(y),cz&&cz(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}qR(y)}if(y.getChildContext!=null&&(t=fz({},t,y.getChildContext())),T&&FF.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===$F&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return _z(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[VR]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,uz),YR(y)?(v=gz(e,t),(y=e[RR]).getChildContext!=null&&(t=fz({},t,y.getChildContext())),_z(v=v!=null&&v.type===$F&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):pz}finally{sz&&sz(e),lz&&lz(e)}}}v=v!=null&&v.type===$F&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var D=_z(v,t,n,r,e,a,o);return sz&&sz(e),FF.unmount&&FF.unmount(e),e._suspended?typeof D==`string`?mz+D+hz:dz(D)?(D.unshift(mz),D.push(hz),D):D.then(function(e){return mz+e+hz}):D}catch(i){if(!a&&o&&o.onError){var O=function i(s){return o.onError(s,e,function(e,s){try{return _z(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(O!==void 0)return O;var k=FF.__e;return k&&k(i,e),pz}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=_z(v,t,n,r,e,a,o);return e._suspended?mz+s+hz:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var A,j=`<`+h,M=pz;for(var N in g){var P=g[N];if(typeof(P=yz(P)?P.value:P)!=`function`||N===`class`||N===`className`){switch(N){case`children`:A=P;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;N=`for`;break;case`className`:if(`class`in g)continue;N=`class`;break;case`defaultChecked`:N=`checked`;break;case`defaultSelected`:N=`selected`;break;case`defaultValue`:case`value`:switch(N=`value`,h){case`textarea`:A=P;continue;case`select`:r=P;continue;case`option`:r!=P||`selected`in g||(j+=` selected`)}break;case`dangerouslySetInnerHTML`:M=P&&P.__html;continue;case`style`:typeof P==`object`&&(P=tz(P));break;case`acceptCharset`:N=`accept-charset`;break;case`httpEquiv`:N=`http-equiv`;break;default:if(UR.test(N))N=N.replace(UR,`$1:$2`).toLowerCase();else{if(HR.test(N))continue;N[4]!==`-`&&!KR.has(N)||P==null?n?GR.test(N)&&(N=N===`panose1`?`panose-1`:N.replace(/([A-Z])/g,`-$1`).toLowerCase()):WR.test(N)&&(N=N.toLowerCase()):P+=pz}}P!=null&&!1!==P&&(j=!0===P||P===pz?j+` `+N:j+` `+N+`="`+(typeof P==`string`?ZR(P):P+pz)+`"`)}}if(HR.test(h))throw Error(h+` is not a valid HTML tag name in `+j+`>`);if(M||(typeof A==`string`?M=ZR(A):A!=null&&!1!==A&&!0!==A&&(M=_z(A,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),sz&&sz(e),lz&&lz(e),!M&&vz.has(h))return j+`/>`;var F=`</`+h+`>`,I=j+`>`;return dz(M)?[I].concat(M,[F]):typeof M==`string`?I+M+F:[I,M,F]}var vz=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function yz(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var bz=0;function xz(e){return e!=null&&e.length>0?e:(bz+=1,`pst_ft_${bz}`)}function Sz({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??NP)}function Cz(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function wz(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function Tz(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var Ez=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new LR;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=xz(a),this.#p=PF(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=MP(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new kF({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(IR(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedIndex(){return this.#t.getFocusedIndex()}getFocusedPath(){return this.#t.getFocusedPath()}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){this.#t.resetPaths(e,t)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),PR(t.wrapper,this.#w()))}setGitStatus(e){this.#p=PF(e,this.#p);let t=this.#T();t!=null&&PR(t.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),PR(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),FR(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),PR(r,this.#w())}#C(){return{initialViewportHeight:Sz({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(FA,e());return}this.#l.setSlotHtml(FA,this.#e?.header?.html??null)}#k(e){let t=Tz(e).find(e=>wz(e)),n=Cz(TA(zA(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=Tz(e),n=t.find(e=>wz(e)),r=t.filter(e=>e!==n),i=zA(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=Cz(i);if(a==null){for(let e of r)e.remove();return}if(!(r.length===1&&r[0].outerHTML===a.outerHTML)){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=zA(this.#m);t.colored&&DA(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${jA}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}this.#g?.parentNode===e&&this.#_===this.#h||(this.#g??=document.createElement(`style`),this.#g.setAttribute(jA,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=LP(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return UP(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}},Dz=typeof window>`u`?Q.useEffect:Q.useLayoutEffect;function Oz(e,t,n){let r=e==null?null:(0,Z.jsx)(`div`,{slot:FA,children:e}),i=t!=null&&n!=null?(0,Z.jsx)(`div`,{slot:IA,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,Z.jsxs)(Z.Fragment,{children:[r,i]})}function kz(e,t){return typeof window>`u`&&t!=null?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,Z.jsx)(Z.Fragment,{children:e})}function Az(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement?!0:e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function jz(e,t,n,r,i){let a={...e??{}};if(t!=null&&delete a.header,n){let t=e?.contextMenu,n=t?.onClose,o=t?.onOpen;a.contextMenu={...t??{},enabled:!0,onClose:()=>{n?.(),r()},onOpen:(e,t)=>{i(e,t),o?.(e,t)}},delete a.contextMenu.render}return a.header!=null||a.contextMenu!=null?a:void 0}function Mz({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,Q.useState)(null),[c,l]=(0,Q.useState)(null),u=(0,Q.useRef)(n.getComposition()),d=(0,Q.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,Q.useCallback)(()=>{s(null)},[]),m=(0,Q.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,Q.useMemo)(()=>jz(h,e,f,p,m),[h,p,m,f,e]),_=(0,Q.useCallback)(e=>{l(e)},[]);(0,Q.useEffect)(()=>{f||s(null)},[f]),Dz(()=>{n.setComposition(g)},[g,n]),Dz(()=>{if(c!=null)return r!=null&&Az(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=kz(Oz(e,i,o),r),y=t??r?.id,b={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,Z.jsx)(kA,{...a,id:y,ref:_,style:b,suppressHydrationWarning:r!=null,children:v})}function Nz(e){let t=(0,Q.useRef)(null);return t.current??=new Ez(e),(0,Q.useEffect)(()=>{let e=t.current;return()=>{e?.cleanUp(),t.current=null}},[]),{model:t.current}}function Pz(e){let t=e.lastIndexOf(`/`),n=t<0?e:e.slice(t+1),r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r)}function Fz(e,t){let n=e.lastIndexOf(`/`),r=n<0?``:e.slice(0,n+1),i=n<0?e:e.slice(n+1),a=i.lastIndexOf(`.`);return`${r}${a<=0?i:i.slice(0,a)}${t}`}function Iz(e,t,n){if(n)return{kind:`allow`,destinationPath:t};let r=Pz(e);if(r===``)return{kind:`allow`,destinationPath:t};let i=Pz(t);return i&&i.toLowerCase()!==r.toLowerCase()?{kind:`block`}:{kind:`allow`,destinationPath:Fz(t,r)}}var Lz=`data-ok-ext-badge`,Rz=`
|
|
1845
|
+
[data-item-selected='true'] [data-icon-token='markdown'] {
|
|
1846
|
+
color: var(--trees-selected-fg);
|
|
1847
|
+
}
|
|
1848
|
+
[data-type='item'][data-item-path*='.']:not([data-item-path$='/']) [data-truncate-segment-priority]:last-child {
|
|
1849
|
+
display: none;
|
|
1850
|
+
}
|
|
1851
|
+
[${Lz}] {
|
|
1852
|
+
display: inline-block;
|
|
1853
|
+
margin-left: 0.375rem;
|
|
1854
|
+
margin-right: 0.25rem;
|
|
1855
|
+
align-self: center;
|
|
1856
|
+
color: color-mix(in oklab, var(--muted-foreground) 60%, transparent);
|
|
1857
|
+
font-size: 0.75rem;
|
|
1858
|
+
text-transform: uppercase;
|
|
1859
|
+
flex-shrink: 0;
|
|
1860
|
+
pointer-events: none;
|
|
1861
|
+
user-select: none;
|
|
1862
|
+
}
|
|
1863
|
+
`;function zz(e){let t=e.querySelectorAll(`[data-type="item"][data-item-path]`);for(let e of t){let t=e.dataset.itemPath;if(!t||t.endsWith(`/`)){Bz(e);continue}let n=Pz(t);if(!n){Bz(e);continue}let r=e.querySelector(`[data-truncate-group-container="middle"]`);if(!r)continue;let i=r.querySelectorAll(`[data-truncate-segment-priority]`);if(i.length<2)continue;let a=i[0];if(a){if(Vz(a),n.toLowerCase()===`.md`){Bz(e);continue}Hz(e,n.slice(1).toUpperCase())}}}function Bz(e){let t=e.querySelector(`[${Lz}]`);t&&t.remove()}function Vz(e){let t=e.querySelectorAll(`[data-truncate-content]`);for(let e of t){let t=e.firstChild;if(!t||t.nodeType!==Node.TEXT_NODE)continue;let n=t.textContent??``;n.endsWith(`.`)&&(t.textContent=n.replace(/\.+$/,``))}}function Hz(e,t){let n=e.querySelector(`[${Lz}]`);if(!n){n=e.ownerDocument.createElement(`span`),n.setAttribute(Lz,``),n.setAttribute(`aria-hidden`,`true`);let t=e.querySelector(`[data-item-section="action"]`);t?t.before(n):e.appendChild(n)}n.textContent!==t&&(n.textContent=t)}function Uz(e){return e.replace(/\\/g,`\\\\`).replace(/\[/g,`\\[`).replace(/\]/g,`\\]`).replace(/\*/g,`\\*`)}function Wz(e){let t=Uz(e.path);return e.kind===`folder`?`/${t}/`:`/${t}${e.docExt??`.md`}`}var Gz=`data-ok-rename-extension-chip`,Kz=`data-ok-renaming`,qz=`data-ok-rename-stripped`,Jz=null,Yz=null,Xz=5e3,Zz=`
|
|
1864
|
+
[data-item-section="content"]:has([data-item-rename-input]) {
|
|
1865
|
+
position: relative;
|
|
1866
|
+
}
|
|
1867
|
+
[data-item-section="content"]:has([${Gz}]) [data-item-rename-input] {
|
|
1868
|
+
padding-inline-end: 36px;
|
|
1869
|
+
}
|
|
1870
|
+
[${Gz}] {
|
|
1871
|
+
position: absolute;
|
|
1872
|
+
top: 50%;
|
|
1873
|
+
right: 6px;
|
|
1874
|
+
transform: translateY(-50%);
|
|
1875
|
+
font-size: 0.6875rem;
|
|
1876
|
+
line-height: 1;
|
|
1877
|
+
letter-spacing: 0.02em;
|
|
1878
|
+
color: color-mix(in oklab, var(--muted-foreground) 60%, transparent);
|
|
1879
|
+
background: transparent;
|
|
1880
|
+
padding: 2px 4px;
|
|
1881
|
+
border-radius: 3px;
|
|
1882
|
+
pointer-events: none;
|
|
1883
|
+
user-select: none;
|
|
1884
|
+
}
|
|
1885
|
+
/* Pierre's icon decoration keys off the row's data-item-path. The chip's
|
|
1886
|
+
value-strip plus Pierre's optimistic commit make the path temporarily
|
|
1887
|
+
extensionless, so Pierre swaps the row's [data-icon-token] from
|
|
1888
|
+
'markdown' to 'default' until the disk-truth refresh restores .md.
|
|
1889
|
+
Cover the wrong icon with a CSS-rendered markdown glyph for the duration.
|
|
1890
|
+
applyRenameChip sets the marker on the row when the rename input mounts;
|
|
1891
|
+
the sweep in applyRenameChip clears it when the path next includes the
|
|
1892
|
+
saved extension (settle / cancel / row recycle to a settled file). */
|
|
1893
|
+
[${Kz}] [data-item-section="icon"] {
|
|
1894
|
+
position: relative;
|
|
1895
|
+
}
|
|
1896
|
+
[${Kz}] [data-item-section="icon"] [data-icon-token]:not([data-icon-token='markdown']) {
|
|
1897
|
+
visibility: hidden;
|
|
1898
|
+
}
|
|
1899
|
+
[${Kz}='.md'] [data-item-section="icon"]::before,
|
|
1900
|
+
[${Kz}='.mdx'] [data-item-section="icon"]::before {
|
|
1901
|
+
content: '';
|
|
1902
|
+
display: block;
|
|
1903
|
+
position: absolute;
|
|
1904
|
+
inset: 0;
|
|
1905
|
+
margin: auto;
|
|
1906
|
+
width: 16px;
|
|
1907
|
+
height: 16px;
|
|
1908
|
+
background-color: currentColor;
|
|
1909
|
+
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z'/></svg>") center / contain no-repeat;
|
|
1910
|
+
pointer-events: none;
|
|
1911
|
+
}
|
|
1912
|
+
`;function Qz(e){tB(e);let t=e.querySelector(`[data-item-rename-input]`);if(!t)return;let n=t.closest(`[data-item-section="content"]`),r=t.closest(`[data-type="item"]`);if(!n||!r)return;let i=r.dataset.itemPath??``;if(i.endsWith(`/`))return;let a=Pz(i);a&&(nB(n,a),r.getAttribute(`data-ok-renaming`)!==a&&r.setAttribute(Kz,a),$z(a),!t.hasAttribute(qz)&&(rB(t,a),t.setAttribute(qz,``)))}function $z(e){Jz=e,Yz!==null&&clearTimeout(Yz),Yz=setTimeout(eB,Xz)}function eB(){Jz=null,Yz!==null&&(clearTimeout(Yz),Yz=null)}function tB(e){let t=e.querySelectorAll(`[${Kz}]`);for(let e of t){if(e.querySelector(`[data-item-rename-input]`))continue;let t=e.getAttribute(Kz);if(!t){e.removeAttribute(Kz);continue}let n=e.dataset.itemPath??``;if(n.toLowerCase().endsWith(t.toLowerCase())){e.removeAttribute(Kz);continue}let r=Pz(n);r&&r.toLowerCase()!==t.toLowerCase()&&e.removeAttribute(Kz)}if(Jz===null)return;let n=e.querySelectorAll(`[data-type="item"][data-item-path]`),r=!1;for(let e of n){let t=e.dataset.itemPath??``;!t||t.endsWith(`/`)||Pz(t)||(r=!0,e.getAttribute(`data-item-selected`)===`true`&&e.getAttribute(`data-ok-renaming`)!==Jz&&e.setAttribute(Kz,Jz))}let i=!!e.querySelector(`[data-item-rename-input]`);!r&&!i&&eB()}function nB(e,t){let n=e.querySelector(`[${Gz}]`);n||(n=e.ownerDocument.createElement(`span`),n.setAttribute(Gz,``),n.setAttribute(`aria-hidden`,`true`),e.appendChild(n)),n.textContent!==t&&(n.textContent=t)}function rB(e,t){let n=e.value;if(!n.toLowerCase().endsWith(t.toLowerCase()))return;let r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set;if(!r)return;let i=n.slice(0,-t.length);r.call(e,i),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.setSelectionRange(0,i.length)}function iB(e){let{focusedIndex:t,itemHeight:n,viewportHeight:r,currentScrollTop:i}=e;if(t<0)return null;let a=Math.max(0,e.topInset??0),o=t*n,s=o+n;if(o<i+a){let e=Math.max(0,o-a);return e===i?null:e}if(s>i+r){let e=s-r;return e===i?null:e}return null}function aB(e,t){let n=t.getFocusedIndex();if(n<0)return;let r=e?.querySelector(kA)?.shadowRoot?.querySelector(`[data-file-tree-virtualized-scroll]`);if(!r)return;let i=t.getItemHeight(),a=iB({focusedIndex:n,itemHeight:i,viewportHeight:r.clientHeight,currentScrollTop:r.scrollTop,topInset:i});a!==null&&(r.scrollTop=a)}function oB(e){return{selectedFilePath:e,selectedFolderPath:null,navigationPath:e}}function sB(e,t,n={}){if(!e)return oB(t);let r=Er(e);if(t&&r!==t)return oB(t);switch(e.kind){case`doc`:return oB(t??e.docName);case`folder`:case`folder-index`:return{selectedFilePath:null,selectedFolderPath:e.folderPath,navigationPath:e.folderPath};case`missing`:return t&&n.isKnownDocument?.(t)?oB(t):{selectedFilePath:null,selectedFolderPath:null,navigationPath:null};case`asset`:return{selectedFilePath:null,selectedFolderPath:null,navigationPath:null}}}function cB(e,t){if(!e)return{kind:`none`};let n=t.find(t=>VD(t)===e);if(n&&ar(n))return{kind:`asset`,path:n.path,hash:qr(n.path),mediaKind:n.mediaKind};let r=GD(e);return e.endsWith(`/`)?t.some(e=>Mn(e)?e.path===r||e.path.startsWith(`${r}/`):(ar(e)?e.path:e.docName).startsWith(`${r}/`))?{kind:`folder`,path:r}:{kind:`none`}:t.some(e=>Nn(e)&&e.docName===r)?{kind:`document`,path:r}:{kind:`none`}}var lB=`You can restore this file from the Trash.`;function uB(e){let t=lB,n=`Move to Trash`,r=`Moving`;if(e.length===0)return{title:`Are you sure you want to delete the selected items?`,detail:t,listedTargets:null,confirmLabel:n,confirmLabelBusy:r};if(e.length===1){let i=e[0];return i?i.kind===`folder`?{title:`Are you sure you want to delete '${i.name}' and its contents?`,detail:t,listedTargets:null,confirmLabel:n,confirmLabelBusy:r}:{title:`Are you sure you want to delete '${i.name}'?`,detail:t,listedTargets:null,confirmLabel:n,confirmLabelBusy:r}:{title:`Are you sure you want to delete the selected item?`,detail:t,listedTargets:null,confirmLabel:n,confirmLabelBusy:r}}let i=e.some(e=>e.kind===`folder`),a=e.some(e=>e.kind===`file`);return i&&a?{title:`Are you sure you want to delete the following ${e.length} files/directories and their contents?`,detail:t,listedTargets:e,confirmLabel:n,confirmLabelBusy:r}:i?{title:`Are you sure you want to delete the following ${e.length} directories and their contents?`,detail:t,listedTargets:e,confirmLabel:n,confirmLabelBusy:r}:{title:`Are you sure you want to delete the following ${e.length} files?`,detail:t,listedTargets:e,confirmLabel:n,confirmLabelBusy:r}}function dB(e,t){return e===`web`?null:uB(t)}function fB(e){return e.kind===`folder`?`${e.name}/`:e.docExt?`${e.name}${e.docExt}`:e.name}var pB=[`not-found`,`permission-denied`,`system-error`,`path-escape`];function mB(e){return typeof e==`string`&&pB.includes(e)?e:`system-error`}function hB(e){switch(e){case`not-found`:return X._({id:`v41fCm`});case`permission-denied`:return X._({id:`sJK6pq`});case`system-error`:return X._({id:`Jqqevv`});case`path-escape`:return X._({id:`WL6puM`})}}function gB(e){let t=hB(e.reason),n=e.detail;return n?X._({id:`Z2M5XM`,values:{reason:t,osDetail:n}}):X._({id:`dTaauv`,values:{reason:t}})}function _B(e){return e.kind===`folder`?`${e.name}/`:e.name}function vB(e){let t=(0,$.c)(34),{failedTargets:n,isSubmitting:r,onDeletePermanently:i,onRetry:a,onCancel:o}=e,c=n.length>1,l=n[0],u=n.length,d;if(t[0]!==u||t[1]!==c||t[2]!==l){let e=l?_B(l):``;d=c?X._({id:`5qNxOe`,values:{count:u}}):l?`${X._({id:`E_BHoD`,values:{targetName:e}})}\n${gB(l)}`:X._({id:`kolRU1`}),t[0]=u,t[1]=c,t[2]=l,t[3]=d}else d=t[3];let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(ko,{children:(0,Z.jsx)(s,{id:`aOp3hw`})}),t[4]=p):p=t[4];let m;t[5]===f?m=t[6]:(m=(0,Z.jsxs)(Ro,{children:[p,(0,Z.jsx)(Do,{className:`whitespace-pre-wrap`,children:f})]}),t[5]=f,t[6]=m);let h;t[7]!==n||t[8]!==c?(h=c?(0,Z.jsx)(Fo,{children:(0,Z.jsx)(`ul`,{className:`flex flex-col gap-2 text-xs`,children:n.map(yB)})}):null,t[7]=n,t[8]=c,t[9]=h):h=t[9];let g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(s,{id:`dEgA5A`}),t[10]=g):g=t[10];let _;t[11]!==r||t[12]!==o?(_=(0,Z.jsx)(Ti,{variant:`outline`,className:`font-mono uppercase`,onClick:o,disabled:r,"data-testid":`trash-failure-modal-cancel`,children:g}),t[11]=r,t[12]=o,t[13]=_):_=t[13];let v;t[14]===r?v=t[15]:(v=r?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(W,{className:`size-4 animate-spin`}),` `,(0,Z.jsx)(s,{id:`mf37rL`})]}):(0,Z.jsx)(s,{id:`6gRgw8`}),t[14]=r,t[15]=v);let y;t[16]!==r||t[17]!==a||t[18]!==v?(y=(0,Z.jsx)(Ti,{variant:`outline`,className:`font-mono uppercase`,onClick:a,disabled:r,"data-testid":`trash-failure-modal-retry`,children:v}),t[16]=r,t[17]=a,t[18]=v,t[19]=y):y=t[19];let b;t[20]===r?b=t[21]:(b=r?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(W,{className:`size-4 animate-spin`}),` `,(0,Z.jsx)(s,{id:`s3caR3`})]}):(0,Z.jsx)(s,{id:`UBv8UK`}),t[20]=r,t[21]=b);let x;t[22]!==r||t[23]!==i||t[24]!==b?(x=(0,Z.jsx)(Ti,{variant:`destructive`,onClick:i,disabled:r,"data-testid":`trash-failure-modal-delete-permanently`,children:b}),t[22]=r,t[23]=i,t[24]=b,t[25]=x):x=t[25];let S;t[26]!==x||t[27]!==_||t[28]!==y?(S=(0,Z.jsxs)(Io,{children:[_,y,x]}),t[26]=x,t[27]=_,t[28]=y,t[29]=S):S=t[29];let C;return t[30]!==S||t[31]!==m||t[32]!==h?(C=(0,Z.jsxs)(No,{className:`sm:max-w-md`,children:[m,h,S]}),t[30]=S,t[31]=m,t[32]=h,t[33]=C):C=t[33],C}function yB(e){return(0,Z.jsxs)(`li`,{"data-testid":`trash-failure-modal-target`,children:[(0,Z.jsx)(`div`,{className:`font-mono text-foreground`,children:_B(e)}),(0,Z.jsx)(`div`,{className:`text-muted-foreground`,children:gB(e)})]},e.path)}function bB(e){return e?.isDirectory()?e:null}function xB(e,t){let n=t.getPath();for(let t of e.getSelectedPaths())t!==n&&e.getItem(t)?.deselect();t.isSelected()||t.select()}function SB(e,t,n,r){let i=(0,$.c)(6),a,o;i[0]!==n||i[1]!==t||i[2]!==e||i[3]!==r?(a=()=>{let i=()=>{queueMicrotask(()=>{r.current=!1})};if(r.current=!0,!t){for(let t of e.getSelectedPaths())e.getItem(t)?.deselect();i();return}let a=n?n.split(`\0`):[];for(let t of a){let n=bB(e.getItem(t));n&&!n.isExpanded()&&n.expand()}let o=e.getItem(t);if(!o){i();return}xB(e,o),o.focus(),i()},o=[n,t,e,r],i[0]=n,i[1]=t,i[2]=e,i[3]=r,i[4]=a,i[5]=o):(a=i[4],o=i[5]),(0,Q.useEffect)(a,o)}async function CB(e,t){let n={"not-found":X._({id:`vY54W_`}),"spawn-error":X._({id:`ktATCe`}),timeout:X._({id:`wrzAcD`}),"path-escape":X._({id:`kDuh1E`}),"ipc-error":X._({id:`jjmuxV`})},r;try{r=await e.shell.openInTerminal(t)}catch(e){console.warn(`[shell] openInTerminal IPC threw`,{dirAbsPath:t,err:e}),Vo.error(X._({id:`DYwdxG`}),{description:n[`ipc-error`]});return}r.ok||(console.warn(`[shell] openInTerminal failed`,{reason:r.reason,dirAbsPath:t}),Vo.error(X._({id:`DYwdxG`}),{description:n[r.reason]}))}var wB=`open-knowledge:file-tree-menu-action-delete`,TB=`open-knowledge:file-tree-menu-action-rename`,EB=`open-knowledge:file-tree-menu-action-duplicate`;function DB(e){window.dispatchEvent(new CustomEvent(wB,{detail:{target:e}}))}function OB(e){let t=t=>{let n=t.detail;n?.target&&e(n.target)};return window.addEventListener(wB,t),()=>window.removeEventListener(wB,t)}function kB(e){window.dispatchEvent(new CustomEvent(TB,{detail:{target:e}}))}function AB(e){let t=t=>{let n=t.detail;n?.target&&e(n.target)};return window.addEventListener(TB,t),()=>window.removeEventListener(TB,t)}function jB(e){window.dispatchEvent(new CustomEvent(EB,{detail:{target:e}}))}function MB(e){let t=t=>{let n=t.detail;n?.target&&e(n.target)};return window.addEventListener(EB,t),()=>window.removeEventListener(EB,t)}function NB(e){let t=!1,n=!1,r=!1;async function i(){if(!r){t=!0;try{await e()}finally{t=!1,r?n=!1:n&&(n=!1,i())}}}return{request(){if(!r){if(t){n=!0;return}i()}},dispose(){r=!0,n=!1}}}function PB(e){return e?X._({id:`wTcjov`}):null}function FB(e){let t=(0,$.c)(33),{_:n}=i(),{input:r,installStates:a,dispatch:o,webFallbackVisible:c}=e,l=c===void 0?!0:c,u=r===null,d,f,p,m,h,g;if(t[0]!==n||t[1]!==o||t[2]!==r||t[3]!==u||t[4]!==a){let e=PB(u),i;t[11]===a?i=t[12]:(i=e=>a[e.id]?.installed===!0,t[11]=a,t[12]=i);let c=hm.filter(i);p=a[`claude-code`]?.installed===!0;let l;t[13]===r?l=t[14]:(l=r!==null&&r.docContext!==null?si(r.docContext.relativePath):``,t[13]=r,t[14]=l);let _=l,v;t[15]!==r||t[16]!==_?(v=()=>{r!==null&&Ay(_)},t[15]=r,t[16]=_,t[17]=v):v=t[17],m=v,f=Da,t[18]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsxs)(Oa,{children:[(0,Z.jsx)(Li,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`O7_W_a`})]}),t[18]=g):g=t[18],d=Ea,h=c.map(t=>{let i=!u,{displayName:a}=t,s=n(e?{id:`1ZpfyB`,values:{displayName:a,hint:e}}:{id:`WqLq6M`,values:{displayName:a}});return(0,Z.jsxs)(oa,{disabled:!i,onSelect:()=>{r&&o(t.id,r)},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":s,children:[(0,Z.jsx)(wy,{id:t.id,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)}),t[0]=n,t[1]=o,t[2]=r,t[3]=u,t[4]=a,t[5]=d,t[6]=f,t[7]=p,t[8]=m,t[9]=h,t[10]=g}else d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10];let _;t[19]!==n||t[20]!==p||t[21]!==m||t[22]!==u||t[23]!==l?(_=l&&!p?(0,Z.jsxs)(oa,{onSelect:m,disabled:u,"data-testid":`file-tree-open-in-claude-web-fallback`,"aria-label":n({id:`aA51jP`}),children:[(0,Z.jsx)(Se,{className:`size-4`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`0S9PW_`})}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`pcfY8r`})})]}):null,t[19]=n,t[20]=p,t[21]=m,t[22]=u,t[23]=l,t[24]=_):_=t[24];let v;t[25]!==d||t[26]!==h||t[27]!==_?(v=(0,Z.jsxs)(d,{children:[h,_]}),t[25]=d,t[26]=h,t[27]=_,t[28]=v):v=t[28];let y;return t[29]!==f||t[30]!==g||t[31]!==v?(y=(0,Z.jsxs)(f,{children:[g,v]}),t[29]=f,t[30]=g,t[31]=v,t[32]=y):y=t[32],y}var IB=je(`HOVER_INTENT_MS`,80),LB=3,RB=20,zB=new Map,BB=new Set,VB=[],HB=new Map;function UB(e){for(HB.delete(e),HB.set(e,!0);HB.size>RB;){let e=HB.keys().next().value;if(e===void 0)break;HB.delete(e)}}function WB(e){BB.delete(e),KB()}function GB(e,t){let n=Date.now();qe(`ok/sidebar/prewarm-success`,{docName:e,t:n,poolEventId:t}),T(e,t,n)}function KB(){for(;BB.size<LB&&VB.length>0;){let e=VB.shift();if(!e)break;if(!HB.has(e.docName)){BB.add(e.docName),UB(e.docName);try{let t=e.prewarm(e.docName);t&&GB(e.docName,t)}catch(t){qe(`ok/sidebar/prewarm-failed`,{docName:e.docName,message:t instanceof Error?t.message:String(t)})}finally{WB(e.docName)}}}}function qB(e,t){if(Ue(e)||HB.has(e))return;let n=zB.get(e);n&&clearTimeout(n.timer);let r=setTimeout(()=>{if(zB.delete(e),BB.size>=LB){VB.push({docName:e,prewarm:t});return}UB(e),BB.add(e);try{let n=t(e);n&&GB(e,n)}catch(t){qe(`ok/sidebar/prewarm-failed`,{docName:e,message:t instanceof Error?t.message:String(t)})}finally{WB(e)}},IB);zB.set(e,{timer:r,prewarm:t})}function JB(e){let t=zB.get(e);t&&(clearTimeout(t.timer),zB.delete(e))}var YB=/\.(md|mdx)$/i;function XB(e){if(window.location.hash===e)return;let{pathname:t,search:n}=window.location;window.history.replaceState(null,``,`${t}${n}${e}`)}function ZB(e){let t=e.match(/^"(.+)" already exists\.$/);return t?t[1]:null}function QB(e){let t=e.match(YB);return t?t[0]:null}async function $B(e,t){try{await navigator.clipboard.writeText(e),Vo.success(t===`full`?X._({id:`6_ZOw4`}):X._({id:`haHgQj`}),{description:e})}catch(e){console.warn(`[FileTree] clipboard write failed:`,e),Vo.error(t===`full`?X._({id:`vfRlCI`}):X._({id:`5QGTaA`}))}}var eV=new Set([`agents`,`agent`,`claude`,`skill`]),tV=`ok-file-tree-link-decoration`,nV=`ok-file-tree-agent-decoration`;function rV(e){return e.map(([e,{key:t,...n}])=>`<${e} ${Object.entries(n).map(([e,t])=>`${e}="${t}"`).join(` `)} />`).join(``)}function iV(e,t){return`<symbol id="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${rV(t)}</symbol>`}var aV=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1913
|
+
${iV(tV,ae)}
|
|
1914
|
+
${iV(nV,qs)}
|
|
1915
|
+
</svg>`,oV=`${Rz}\n${Zz}`;function sV(e){return{...XA({type:e===`dark`?`dark`:`light`,colors:{"sideBar.background":`var(--sidebar)`,"sideBar.foreground":`var(--sidebar-foreground)`,"sideBar.border":`var(--sidebar-border)`,"list.activeSelectionBackground":`var(--sidebar-accent)`,"list.activeSelectionForeground":`var(--sidebar-accent-foreground)`,"list.hoverBackground":`var(--sidebar-hover)`,focusBorder:`var(--color-primary)`,"input.background":`var(--input)`,"input.border":`var(--border)`}}),"--trees-font-family-override":`var(--font-sans)`,"--trees-font-size-override":`0.875rem`,"--trees-item-padding-x-override":`0.5rem`,"--trees-padding-inline-override":`0.5rem`,"--trees-border-radius-override":`0.375rem`,"--trees-selected-fg":`var(--color-primary)`,"--truncate-marker-fade-in-duration":`0s`,"--trees-file-icon-color-markdown":`light-dark(var(--color-gray-400), var(--color-gray-500))`,"--trees-file-icon-color-image":`light-dark(var(--color-gray-400), var(--color-gray-500))`,"--trees-fg-muted":`light-dark(var(--color-gray-400), var(--color-gray-500))`}}function cV(e){let t=e.split(`/`).pop()?.replace(/\.md$/i,``).toLowerCase();return!!t&&eV.has(t)}function lV(e){return e===`darwin`?X._({id:`LtSYdi`}):e===`win32`?X._({id:`qi1F96`}):X._({id:`hz7n6T`})}function uV(e){let t=(0,$.c)(18),{item:n,workspace:r,onClose:a}=e,{_:o}=i(),s=typeof window<`u`?window.okDesktop:void 0;if(!s)return null;let c=s.platform,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=lV(c),t[0]=l):l=t[0];let u=l,d,f;t[1]!==o||t[2]!==r?(d=r?null:o({id:`wTcjov`}),f=o(c===`darwin`?d?{id:`FvpFSZ`,values:{hint:d}}:{id:`LtSYdi`}:c===`win32`?d?{id:`o4dcAf`,values:{hint:d}}:{id:`qi1F96`}:d?{id:`ScUTHW`,values:{hint:d}}:{id:`hz7n6T`}),t[1]=o,t[2]=r,t[3]=d,t[4]=f):(d=t[3],f=t[4]);let p=f,m=!r,h;t[5]!==n||t[6]!==a||t[7]!==r?(h=()=>{if(!r)return;a();let e=Gm(r.contentDir,QD(n),r.pathSeparator);s.shell.showItemInFolder(e)},t[5]=n,t[6]=a,t[7]=r,t[8]=h):h=t[8];let g,_;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(L,{"aria-hidden":`true`}),_=(0,Z.jsx)(`span`,{className:`flex-1`,children:u}),t[9]=g,t[10]=_):(g=t[9],_=t[10]);let v;t[11]===d?v=t[12]:(v=d?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:d}):null,t[11]=d,t[12]=v);let y;return t[13]!==p||t[14]!==m||t[15]!==h||t[16]!==v?(y=(0,Z.jsxs)(oa,{disabled:m,onSelect:h,"aria-label":p,children:[g,_,v]}),t[13]=p,t[14]=m,t[15]=h,t[16]=v,t[17]=y):y=t[17],y}function dV(e){let t=(0,$.c)(21),{dirAbsPath:n,onClose:r}=e,{_:a}=i(),o=typeof window<`u`?window.okDesktop:void 0;if(!o)return null;let c,l,u,d,f;t[0]!==a||t[1]!==n||t[2]!==r?(l=n===null?a({id:`wTcjov`}):null,c=oa,u=n===null,t[8]!==n||t[9]!==r?(d=()=>{n!==null&&(r(),CB(o,n))},t[8]=n,t[9]=r,t[10]=d):d=t[10],f=a(l?{id:`ehLu5O`,values:{hint:l}}:{id:`BJpGCq`}),t[0]=a,t[1]=n,t[2]=r,t[3]=c,t[4]=l,t[5]=u,t[6]=d,t[7]=f):(c=t[3],l=t[4],u=t[5],d=t[6],f=t[7]);let p;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)($c,{"aria-hidden":`true`}),t[11]=p):p=t[11];let m;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`BJpGCq`})}),t[12]=m):m=t[12];let h;t[13]===l?h=t[14]:(h=l?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:l}):null,t[13]=l,t[14]=h);let g;return t[15]!==c||t[16]!==u||t[17]!==d||t[18]!==f||t[19]!==h?(g=(0,Z.jsxs)(c,{disabled:u,onSelect:d,"aria-label":f,children:[p,m,h]}),t[15]=c,t[16]=u,t[17]=d,t[18]=f,t[19]=h,t[20]=g):g=t[20],g}function fV(e){return ZD({kind:e.endsWith(`/`)?`directory`:`file`,name:e,path:e})}function pV(e,t){return e!==t&&e.startsWith(t)}function mV(e,t){let n=[...new Set(e)].filter(e=>!t(e)),r=n.filter(e=>e.endsWith(`/`));return n.filter(e=>!r.some(t=>pV(e,t))).map(fV)}function hV(e,t){return e===t||e.startsWith(`${t}/`)}function gV(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.isContentEditable||e.closest(`[contenteditable="true"]`)!==null}function _V(e,t,n){let r=new Set,i=new Set;for(let a of e){if(a.kind===`file`){r.add(a.path);continue}i.add(a.path);for(let e of t)Nn(e)&&e.docName.startsWith(`${a.path}/`)&&r.add(e.docName);for(let e of n){let t=UD(e);hV(t,a.path)&&i.add(t)}}return{docNames:r,folderPaths:i}}function vV(e,t){return e.kind===`file`?t.kind===`file`&&e.path===t.createdPath:hV(t.createdPath,e.path)}function yV(e){let t=(0,$.c)(83),{item:n,context:r,anyActionBusy:a,workspace:o,handoff:c,model:l,okignoreBinding:u,projectLocalBinding:d,mergedConfig:f,onStartCreating:p,onStartCreatingFromTemplate:m,onDuplicate:h,onDelete:g,onExpandSubtree:_,onCollapseSubtree:v,folderTreePaths:y,isAsset:b,isAssetTreePath:x}=e,{_:S}=i(),C,w,T,E,D,O,k,A,j;if(t[0]!==S||t[1]!==b||t[2]!==x||t[3]!==n||t[4]!==f?.appearance?.sidebar?.showAllFiles||t[5]!==f?.appearance?.sidebar?.showHiddenFiles||t[6]!==l||t[7]!==u||t[8]!==d){j=ZD(n),D=n.kind===`directory`,C=!b&&u!==null;let e;t[18]!==S||t[19]!==D?(e=S(D?{id:`5D3Ior`}:{id:`dbhUX1`}),t[18]=S,t[19]=D,t[20]=e):e=t[20],E=e,k=f?.appearance?.sidebar?.showHiddenFiles??!1,O=f?.appearance?.sidebar?.showAllFiles??!1,w=d!==null;let r=l.getSelectedPaths(),i=r.includes(j.treePath)?mV(r,x):[];T=i.length>1?i:[j];let a=T.length;A=X._({id:`44_vJP`,values:{deleteCount:a}}),t[0]=S,t[1]=b,t[2]=x,t[3]=n,t[4]=f?.appearance?.sidebar?.showAllFiles,t[5]=f?.appearance?.sidebar?.showHiddenFiles,t[6]=l,t[7]=u,t[8]=d,t[9]=C,t[10]=w,t[11]=T,t[12]=E,t[13]=D,t[14]=O,t[15]=k,t[16]=A,t[17]=j}else C=t[9],w=t[10],T=t[11],E=t[12],D=t[13],O=t[14],k=t[15],A=t[16],j=t[17];let M=A,N;t[21]!==D||t[22]!==n||t[23]!==o?(N=D&&o?Gm(o.contentDir,QD(n),o.pathSeparator):null,t[21]=D,t[22]=n,t[23]=o,t[24]=N):N=t[24];let P=N,F;if(t[25]!==D||t[26]!==n||t[27]!==o){bb0:{if(!o||D){F=null;break bb0}let e=QD(n),t=e.lastIndexOf(`/`);if(t===-1){F=o.contentDir;break bb0}F=Gm(o.contentDir,e.slice(0,t),o.pathSeparator)}t[25]=D,t[26]=n,t[27]=o,t[28]=F}else F=t[28];let I=F,L;t[29]!==b||t[30]!==D||t[31]!==n||t[32]!==o?(L=b?null:D?Ym({folderRelativePath:QD(n),workspace:o}):qm({docName:BD(n.path),workspace:o}),t[29]=b,t[30]=D,t[31]=n,t[32]=o,t[33]=L):L=t[33];let R=L,z;t[34]===r?z=t[35]:(z=()=>r.close({restoreFocus:!1}),t[34]=r,t[35]=z);let B=z,V;t[36]===r?V=t[37]:(V=()=>r.close(),t[36]=r,t[37]=V);let H=V,U;t[38]!==S||t[39]!==d?(U=e=>{if(d===null)return;let t=d.patch({appearance:{sidebar:{showHiddenFiles:e}}});t.ok||(console.warn(`[FileTree] showHiddenFiles toggle rejected:`,lr(t.error)),Vo.error(S({id:`P47EWZ`}),{description:lr(t.error)}))},t[38]=S,t[39]=d,t[40]=U):U=t[40];let W=U,G;t[41]!==S||t[42]!==d?(G=e=>{if(d===null)return;let t=d.patch({appearance:{sidebar:{showAllFiles:e}}});t.ok||(console.warn(`[FileTree] showAllFiles toggle rejected:`,lr(t.error)),Vo.error(S({id:`P47EWZ`}),{description:lr(t.error)}))},t[41]=S,t[42]=d,t[43]=G):G=t[43];let K=G,ee=0,q=0;if(D){let e=WD(n.path);for(let t of y)(t===e||t.startsWith(e))&&(ee++,bB(l.getItem(t))?.isExpanded()&&q++)}let te=D&&q<ee,ne=D&&q>0,ie;t[44]===H?ie=t[45]:(ie=e=>{e||H()},t[44]=H,t[45]=ie);let ae;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,Z.jsx)(ga,{asChild:!0,children:(0,Z.jsx)(`span`,{"aria-hidden":`true`,"data-file-tree-context-menu-root":`true`,className:`block size-px`})}),t[46]=ae):ae=t[46];let oe;t[47]!==S||t[48]!==a||t[49]!==C||t[50]!==w||t[51]!==H||t[52]!==B||t[53]!==M||t[54]!==T||t[55]!==P||t[56]!==K||t[57]!==W||t[58]!==c||t[59]!==R||t[60]!==E||t[61]!==b||t[62]!==D||t[63]!==n||t[64]!==l||t[65]!==u||t[66]!==v||t[67]!==g||t[68]!==h||t[69]!==_||t[70]!==p||t[71]!==m||t[72]!==I||t[73]!==O||t[74]!==k||t[75]!==ne||t[76]!==te||t[77]!==j||t[78]!==o?(oe=(0,Z.jsx)(ta,{sideOffset:0,align:`start`,"data-file-tree-context-menu-root":`true`,className:`min-w-52`,children:D?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(oa,{disabled:a,onSelect:()=>{B(),p(`file`,UD(n.path))},children:[(0,Z.jsx)(Jc,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`MW64zN`})]}),(0,Z.jsxs)(oa,{disabled:a,onSelect:()=>{B(),m(UD(n.path))},children:[(0,Z.jsx)(uc,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`Uuj_R4`})]}),(0,Z.jsxs)(oa,{disabled:a,onSelect:()=>{B(),p(`folder`,UD(n.path))},children:[(0,Z.jsx)(mc,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`tX5yOZ`})]}),(0,Z.jsx)(aa,{}),(0,Z.jsx)(uV,{item:n,workspace:o,onClose:H}),(0,Z.jsx)(FB,{input:R,installStates:c.installStates,isElectronHost:c.isElectronHost,dispatch:c.dispatch,webFallbackVisible:!1}),(0,Z.jsx)(dV,{dirAbsPath:P,onClose:H}),(0,Z.jsxs)(Da,{children:[(0,Z.jsxs)(Oa,{children:[(0,Z.jsx)(Oe,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`zd00pH`})]}),(0,Z.jsxs)(Ea,{children:[(0,Z.jsx)(oa,{disabled:!o,onSelect:()=>{o&&(H(),$B(Gm(o.contentDir,QD(n),o.pathSeparator),`full`))},children:(0,Z.jsx)(s,{id:`z2funE`})}),(0,Z.jsx)(oa,{onSelect:()=>{H(),$B(QD(n),`relative`)},children:(0,Z.jsx)(s,{id:`xloBjn`})})]})]}),(0,Z.jsx)(aa,{}),(0,Z.jsx)(Ta,{checked:k,onCheckedChange:W,disabled:!w,"data-testid":`file-tree-menu-show-hidden-files`,children:(0,Z.jsx)(s,{id:`K_wz1u`})}),(0,Z.jsx)(Ta,{checked:O,onCheckedChange:K,disabled:!w,"data-testid":`file-tree-menu-show-all-files`,children:(0,Z.jsx)(s,{id:`i8dKs-`})}),te||ne?(0,Z.jsx)(aa,{}):null,te?(0,Z.jsxs)(oa,{onSelect:()=>{H(),_(n.path)},children:[(0,Z.jsx)(nl,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`b392Dr`})]}):null,ne?(0,Z.jsxs)(oa,{onSelect:()=>{H(),v(n.path)},children:[(0,Z.jsx)(fc,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`BBtVak`})]}):null,(0,Z.jsx)(aa,{}),(0,Z.jsxs)(oa,{disabled:a,onSelect:()=>{H(),h(j)},children:[(0,Z.jsx)(re,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`euc6Ns`})]}),(0,Z.jsxs)(oa,{disabled:a,onSelect:()=>{B(),l.startRenaming(n.path)},children:[(0,Z.jsx)(et,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`2wxgft`})]}),(0,Z.jsxs)(oa,{"data-testid":`file-tree-menu-hide`,disabled:!C,onSelect:()=>{if(!u)return;H();let e=Wz(j),t=co(u.current()),n=Qa(t,e);if(n===t)return;u.patch(eo(n));let r=j.path.split(`/`).pop()||j.path;Vo.success(S({id:`4xtLTl`,values:{basename:r}}),{description:S({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(Te,{"aria-hidden":`true`}),E]}),(0,Z.jsxs)(oa,{variant:`destructive`,disabled:a,onSelect:()=>{H(),g(T)},children:[(0,Z.jsx)(Pt,{"aria-hidden":`true`}),M]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(uV,{item:n,workspace:o,onClose:H}),!b&&(0,Z.jsx)(FB,{input:R,installStates:c.installStates,isElectronHost:c.isElectronHost,dispatch:c.dispatch,webFallbackVisible:!0}),(0,Z.jsx)(dV,{dirAbsPath:I,onClose:H}),(0,Z.jsxs)(Da,{children:[(0,Z.jsxs)(Oa,{children:[(0,Z.jsx)(Oe,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`zd00pH`})]}),(0,Z.jsxs)(Ea,{children:[(0,Z.jsx)(oa,{disabled:!o,onSelect:()=>{o&&(H(),$B(Gm(o.contentDir,QD(n),o.pathSeparator),`full`))},children:(0,Z.jsx)(s,{id:`z2funE`})}),(0,Z.jsx)(oa,{onSelect:()=>{H(),$B(QD(n),`relative`)},children:(0,Z.jsx)(s,{id:`xloBjn`})})]})]}),b?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(aa,{}),(0,Z.jsxs)(oa,{disabled:a,onSelect:()=>{H(),h(j)},children:[(0,Z.jsx)(re,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`euc6Ns`})]}),(0,Z.jsxs)(oa,{disabled:a,onSelect:()=>{B(),l.startRenaming(n.path)},children:[(0,Z.jsx)(et,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`2wxgft`})]}),(0,Z.jsxs)(oa,{"data-testid":`file-tree-menu-hide`,disabled:!C,onSelect:()=>{if(!u)return;H();let e=Wz(j),t=co(u.current()),n=Qa(t,e);if(n===t)return;u.patch(eo(n));let r=j.path.split(`/`).pop()||j.path;Vo.success(S({id:`OD0FCX`,values:{basename:r}}),{description:S({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(Te,{"aria-hidden":`true`}),E]}),(0,Z.jsxs)(oa,{variant:`destructive`,disabled:a,onSelect:()=>{H(),g(T)},children:[(0,Z.jsx)(Pt,{"aria-hidden":`true`}),M]})]})]})}),t[47]=S,t[48]=a,t[49]=C,t[50]=w,t[51]=H,t[52]=B,t[53]=M,t[54]=T,t[55]=P,t[56]=K,t[57]=W,t[58]=c,t[59]=R,t[60]=E,t[61]=b,t[62]=D,t[63]=n,t[64]=l,t[65]=u,t[66]=v,t[67]=g,t[68]=h,t[69]=_,t[70]=p,t[71]=m,t[72]=I,t[73]=O,t[74]=k,t[75]=ne,t[76]=te,t[77]=j,t[78]=o,t[79]=oe):oe=t[79];let se;return t[80]!==oe||t[81]!==ie?(se=(0,Z.jsxs)(Ca,{open:!0,modal:!1,onOpenChange:ie,children:[ae,oe]}),t[80]=oe,t[81]=ie,t[82]=se):se=t[82],se}function bV(e){let t=(0,$.c)(264),{ref:n}=e,{_:r}=i(),{activeDocName:a,activeTarget:o,closeTabs:c,closeDocument:l,closeAndClearForRename:u,getPoolActiveDocName:d,isNewTabActive:f,openTarget:p,prewarm:m,remapTabsForRename:h}=lt(),{notifySidebarFileSelected:g}=tD(),{resolvedTheme:_}=On(),{addPage:v}=ii(),y;t[0]!==g||t[1]!==p?(y=function(e){p({kind:`doc`,target:e,docName:e},{tabBehavior:`replace-active`}),XB(ni(e)),g()},t[0]=g,t[1]=p,t[2]=y):y=t[2];let b=y,x;t[3]!==g||t[4]!==p?(x=function(e){let t=Tr(e);p({kind:`folder`,target:e,folderPath:e},{tabBehavior:`replace-active`}),XB(t),g()},t[3]=g,t[4]=p,t[5]=x):x=t[5];let S=x,C;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=[],t[6]=C):C=t[6];let[w,T]=(0,Q.useState)(C),[E,D]=(0,Q.useState)(!0),[O,k]=(0,Q.useState)(null),[A,j]=(0,Q.useState)(null),[P,F]=(0,Q.useState)(null),[I,L]=(0,Q.useState)(null),{conflicts:R}=VC(),[z,B]=(0,Q.useState)(null),[H,U]=(0,Q.useState)(null),W=(0,Q.useRef)(w),G;t[7]!==w||t[8]!==S||t[9]!==b||t[10]!==g||t[11]!==p?(G=function(e,t){let n=cB(e,t===void 0?w:t);if(n.kind===`none`){console.debug(`[FileTree] Dropped selection for unknown docName:`,GD(e));return}if(n.kind===`asset`){p({kind:`asset`,target:n.path,assetPath:n.path,mediaKind:n.mediaKind},{tabBehavior:`replace-active`}),XB(n.hash),g();return}if(n.kind===`folder`){S(n.path);return}b(n.path)},t[7]=w,t[8]=S,t[9]=b,t[10]=g,t[11]=p,t[12]=G):G=t[12];let K=G,ee=(0,Q.useRef)(a),q;t[13]===w?q=t[14]:(q=new Set(w.filter(ar).map(VV)),t[13]=w,t[14]=q);let te=q,ne=(0,Q.useRef)(te),re;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(re=[],t[15]=re):re=t[15];let ie=(0,Q.useRef)(re),ae=(0,Q.useRef)(null),oe=(0,Q.useRef)(BV),se=(0,Q.useRef)(null),ce=(0,Q.useRef)(null),le=(0,Q.useRef)(!1),J=(0,Q.useRef)(null),ue=(0,Q.useRef)(!1),de=(0,Q.useRef)(!1),fe=(0,Q.useRef)(null),pe=(0,Q.useRef)(null),me=(0,Q.useRef)(zV),he=(0,Q.useRef)(RV),ge=(0,Q.useRef)(LV),_e=(0,Q.useRef)(IV),ve=(0,Q.useRef)(o),{selectedFilePath:ye,selectedFolderPath:be,navigationPath:xe}=sB(o,f?null:a),Se=ye?zD(ye,w.find(e=>Nn(e)&&e.docName===ye)?.docExt):be?WD(be):o?.kind===`asset`?o.assetPath:null,Ce=_h().states,{dispatch:we}=oh(),Te;t[16]!==we||t[17]!==Ce?(Te={installStates:Ce,isElectronHost:typeof window<`u`&&window.okDesktop!=null,dispatch:we},t[16]=we,t[17]=Ce,t[18]=Te):Te=t[18];let Ee=Te,{okignoreBinding:De,projectLocalBinding:Oe,merged:ke}=N(),Ae=ke?.appearance?.sidebar?.showHiddenFiles??!1,je=ke?.appearance?.sidebar?.showAllFiles??!1,Me;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(Me=()=>J.current===null,t[19]=Me):Me=t[19];let Ne=Me,Pe;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=[],t[20]=Pe):Pe=t[20];let Fe;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(Fe={set:`complete`,spriteSheet:aV},t[21]=Fe):Fe=t[21];let Ie;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(Ie={contextMenu:{enabled:!0,triggerMode:`both`,buttonVisibility:`when-needed`}},t[22]=Ie):Ie=t[22];let Le;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Le={canDrag:Ne,canDrop:Ne,onDropComplete:e=>_e.current(e),onDropError:FV},t[23]=Le):Le=t[23];let Re,ze;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(Re={canRename:Ne,onRename:e=>he.current(e),onError:e=>ge.current(e)},ze=e=>me.current(e),t[24]=Re,t[25]=ze):(Re=t[24],ze=t[25]);let Be;t[26]===r?Be=t[27]:(Be={paths:Pe,flattenEmptyDirectories:!1,initialExpansion:`closed`,fileTreeSearchMode:`hide-non-matches`,initialVisibleRowCount:18,stickyFolders:!0,icons:Fe,unsafeCSS:oV,composition:Ie,dragAndDrop:Le,renaming:Re,onSelectionChange:ze,renderRowDecoration:e=>{let{item:t}=e;if(t.kind!==`file`)return null;let n=W.current.find(e=>Nn(e)&&zD(e.docName,e.docExt)===t.path);if(n?.isSymlink){let e=n.targetPath;return{icon:tV,title:r(e?{id:`JE21eh`,values:{targetPath:e}}:{id:`BQu9Pg`})}}return cV(t.path)?{icon:nV,title:r({id:`i9toLO`})}:null}},t[26]=r,t[27]=Be);let{model:Y}=Nz(Be),He;t[28]===Y?He=t[29]:(He=function(e){let t=Y.getItem(e)??Y.getItem(WD(e));return t?.isDirectory()?WD(UD(t.getPath())):e},t[28]=Y,t[29]=He);let Ue=He,We,Ge;t[30]===w?(We=t[31],Ge=t[32]):(Ge=KD(w),We=qD(Ge),t[30]=w,t[31]=We,t[32]=Ge);let Ke=We,qe=(0,Q.useRef)(Ge),Je;t[33]===w?Je=t[34]:(Je=YD(w),t[33]=w,t[34]=Je);let Ye=Je,Xe=(0,Q.useRef)(Ye),Ze=be?XD(WD(be)).slice(0,-1):XD(Se??xe),Qe=Ze.join(`\0`),$e;if(t[35]!==Y){let e=()=>{let e=new Set;for(let t of Xe.current)bB(Y.getItem(t))?.isExpanded()&&e.add(t);return e};$e=t=>{let n=new Set(YD(t??W.current)),r=e();for(let e of ie.current)r.add(e);return[...r].filter(e=>n.has(e))},t[35]=Y,t[36]=$e}else $e=t[36];let et=$e,tt;t[37]!==et||t[38]!==Y?(tt=e=>{let t=KD(e??W.current);Y.resetPaths(t,{initialExpandedPaths:et(e)})},t[37]=et,t[38]=Y,t[39]=tt):tt=t[39];let nt=tt,rt;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(rt=e=>{se.current=JD(e)},t[40]=rt):rt=t[40];let it=rt,ot;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ot=e=>ne.current.has(e),t[41]=ot):ot=t[41];let st=ot,ut;t[42]!==r||t[43]!==v||t[44]!==S||t[45]!==b||t[46]!==nt?(ut=async function(e){if(J.current!==null)return;let t=()=>{j(null),J.current=null};J.current=e.path,j(e.path),k(null);try{let n=await M(await fetch(`/api/duplicate-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.path})}),r({id:`dw_dUJ`}));if(!n.ok){Vo.error(n.title),nt(),t();return}let i=V(jn,n.body,`duplicate-path`,null);if(i===null){let e=r({id:`67f-3g`});Vo.error(e),k(e),yr([`files`,`backlinks`,`graph`]),nt(),t();return}for(let e of i.duplicatedDocNames)v(e);T(t=>{let n=uO(t,e,i);return nt(n),it(n),n}),yr([`files`,`backlinks`,`graph`]),i.path!==e.path&&(i.kind===`folder`?S(i.path):b(i.path)),Vo.success(i.kind===`folder`?r({id:`iilQXA`}):r({id:`A6h5b-`}),{description:i.path}),t()}catch(e){let n=e,i=n instanceof Error?n.message:String(n);console.warn(`[FileTree] duplicate failed:`,n),Vo.error(r({id:`EBVbtP`}),{description:i}),nt(),t()}},t[42]=r,t[43]=v,t[44]=S,t[45]=b,t[46]=nt,t[47]=ut):ut=t[47];let dt=ut,ft=(0,Q.useRef)(dt),pt;t[48]===dt?pt=t[49]:(pt=()=>{ft.current=dt},t[48]=dt,t[49]=pt),(0,Q.useEffect)(pt);let mt=function(e){let t=ZB(e);if(!t||QB(t))return!1;let n=Y.getFocusedPath()??Y.getSelectedPaths()[0]??null;if(!n||n.endsWith(`/`)||st(n))return!1;let r=QB(n);if(!r)return!1;let i=WD(t);if(!Xe.current.includes(i))return!1;let a=`${t}${r}`;return qe.current.includes(a)?!1:(Vt({sourcePath:n,destinationPath:a,isFolder:!1}),Y.move(n,a),!0)},ht;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ht=e=>{let t=e??ae.current;!t||ae.current!==t||(t.disposeCommitListener(),ae.current=null)},t[50]=ht):ht=t[50];let gt=ht,_t;t[51]!==r||t[52]!==gt||t[53]!==l||t[54]!==c||t[55]!==nt?(_t=async function(e,t){let n=t===void 0?{}:t,i=n.updateUi??!0,a=n.restoreLocation??i;gt(e),i&&j(e.renamePath);try{let t=await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.createdPath})});if(!t.ok&&t.status!==404){let n=e.kind,a=e.createdPath,o=await M(t,r({id:`EcM3k7`,values:{kind:n}}));if(o.ok)return;let s=o.title,c=r({id:`YPFBfr`,values:{detail:s,kind:n,createdPath:a}});i?Vo.error(c):console.warn(`[FileTree] cleanup pending create failed: ${c}`),i&&(j(null),nt());return}}catch(t){if(console.warn(`[FileTree] cleanup pending create failed:`,t),i){let t=e.kind,n=e.createdPath;Vo.error(r({id:`_TDESN`,values:{kind:t,createdPath:n}}))}i&&(j(null),nt());return}i&&(e.kind===`file`?l(e.createdPath):c([at(e.createdPath)],{force:!0})),i&&T(t=>{let n=lO(t,e.kind===`file`?[e.createdPath]:[],e.kind===`folder`?e.createdPath:void 0);return it(n),n}),yr([`files`,`backlinks`,`graph`]),a&&(window.location.hash=e.previousHash),i&&j(null)},t[51]=r,t[52]=gt,t[53]=l,t[54]=c,t[55]=nt,t[56]=_t):_t=t[56];let vt=_t,yt,bt;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(yt=()=>()=>{let e=ae.current;e&&oe.current(e,{restoreLocation:!1,updateUi:!1}).catch(PV)},bt=[],t[57]=yt,t[58]=bt):(yt=t[57],bt=t[58]),(0,Q.useEffect)(yt,bt);let xt,St;t[59]===r?(xt=t[60],St=t[61]):(xt=()=>{let e=!0,t=NB(async function(){try{let t=de.current,n=await M(await fetch(t?`/api/documents?showAll=true`:`/api/documents`),r({id:`8RtNI0`}));if(!e)return;if(!n.ok)k(n.title);else{let e=ir.safeParse(n.body);if(!e.success)k(r({id:`HlmZBk`}));else{let n=ue.current||t;T(oi(e.data.documents,n)),k(null)}}}catch(t){let n=t;e&&k(r({id:`34qyH5`})),console.warn(`[FileTree] fetch failed:`,n)}e&&D(!1)});fe.current=()=>t.request(),t.request();let n=()=>{document.visibilityState===`visible`&&t.request()};window.addEventListener(`focus`,n),window.addEventListener(`visibilitychange`,n);let i=fi(e=>{e.includes(`files`)&&t.request()});return()=>{e=!1,fe.current=null,t.dispose(),window.removeEventListener(`focus`,n),window.removeEventListener(`visibilitychange`,n),i()}},St=[r],t[59]=r,t[60]=xt,t[61]=St),(0,Q.useEffect)(xt,St);let Ct=(0,Q.useRef)(!0),wt;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(wt=()=>{if(Ct.current){Ct.current=!1;return}fe.current?.()},t[62]=wt):wt=t[62];let Tt;t[63]===Ae?Tt=t[64]:(Tt=[Ae],t[63]=Ae,t[64]=Tt),(0,Q.useEffect)(wt,Tt);let Et=(0,Q.useRef)(!0),Dt;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=()=>{if(Et.current){Et.current=!1;return}fe.current?.()},t[65]=Dt):Dt=t[65];let Ot;t[66]===je?Ot=t[67]:(Ot=[je],t[66]=je,t[67]=Ot),(0,Q.useEffect)(Dt,Ot);let kt,At;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(kt=()=>{let e=!0;return fetch(`/api/workspace`).then(async t=>{let n=await t.json();if(!e||!t.ok)return;let r=V(Vr,n,`workspace`,null);r&&U({contentDir:r.contentDir,pathSeparator:r.pathSeparator})}).catch(NV),()=>{e=!1}},At=[],t[68]=kt,t[69]=At):(kt=t[68],At=t[69]),(0,Q.useEffect)(kt,At);let jt;t[70]!==et||t[71]!==Y||t[72]!==Ke?(jt=()=>{if(se.current===Ke){se.current=null;return}Y.resetPaths(qe.current,{initialExpandedPaths:et()})},t[70]=et,t[71]=Y,t[72]=Ke,t[73]=jt):jt=t[73];let Mt;t[74]!==Y||t[75]!==Ke?(Mt=[Y,Ke],t[74]=Y,t[75]=Ke,t[76]=Mt):Mt=t[76],(0,Q.useEffect)(jt,Mt),SB(Y,Se,Qe,le);let Nt;t[77]!==Se||t[78]!==E||t[79]!==Y?(Nt=()=>{E||!Se||aB(pe.current,Y)},t[77]=Se,t[78]=E,t[79]=Y,t[80]=Nt):Nt=t[80];let Pt;t[81]!==Qe||t[82]!==Se||t[83]!==E||t[84]!==Y||t[85]!==Ke?(Pt=[Se,Qe,Ke,E,Y],t[81]=Qe,t[82]=Se,t[83]=E,t[84]=Y,t[85]=Ke,t[86]=Pt):Pt=t[86],(0,Q.useEffect)(Nt,Pt);let Ft,It;t[87]===Y?(Ft=t[88],It=t[89]):(Ft=()=>Y.subscribe(()=>{if(!Y.isSearchOpen())for(let e of ie.current){let t=bB(Y.getItem(e));t&&!t.isExpanded()&&t.expand()}}),It=[Y],t[87]=Y,t[88]=Ft,t[89]=It),(0,Q.useEffect)(Ft,It);let Lt,Rt;t[90]===Y?(Lt=t[91],Rt=t[92]):(Lt=()=>Y.onMutation(`remove`,e=>{let t=ae.current;!t||e.path!==t.renamePath||oe.current(t)}),Rt=[Y],t[90]=Y,t[91]=Lt,t[92]=Rt),(0,Q.useEffect)(Lt,Rt);let zt;t[93]!==v||t[94]!==u||t[95]!==d||t[96]!==S||t[97]!==h?(zt=async(e,t,n)=>{let r=t===void 0?[]:t,i=n?.docName??ee.current,a=dO(i,e),o=n?.folderPath??(ve.current?.kind===`folder`?ve.current.folderPath:null),s=o?Ve(o,r):null;ct(e);let c=fO(e,d());await Promise.all(c.map(e=>u(e)));for(let t of e)v(t.toDocName);h(e,r),T(t=>{let n=cO(t,e,r);return it(n),n}),o&&s&&s!==o?S(s):a&&a!==i&&(window.location.hash=ni(a)),yr([`files`,`backlinks`,`graph`])},t[93]=v,t[94]=u,t[95]=d,t[96]=S,t[97]=h,t[98]=zt):zt=t[98];let Bt=zt;async function Vt(e){let t=$D(e.sourcePath,e.isFolder);j(t),k(null);try{if(!e.isFolder&&st(t)){Vo.error(r({id:`yXiaxB`})),queueMicrotask(()=>{nt()}),gt(),j(null);return}let n=Iz(e.sourcePath,e.destinationPath,e.isFolder);if(n.kind===`block`){Vo.error(r({id:`FaBZwp`})),queueMicrotask(()=>{nt()}),gt(),j(null);return}let i=$D(n.destinationPath,e.isFolder),a=e.isFolder?{kind:`folder`,fromPath:UD(t),toPath:UD(i)}:{kind:`file`,fromPath:BD(t),toPath:BD(i)},o={docName:ee.current,folderPath:ve.current?.kind===`folder`?ve.current.folderPath:null},s=await M(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)}),r({id:`gijbne`}));if(!s.ok){Vo.error(s.title),nt();let e=ae.current;e&&e.renamePath===t?await vt(e):gt(),j(null);return}let c=V(Zr,s.body,`rename-path`,{renamed:[]});try{await Bt(c.renamed,e.isFolder?[{fromPath:UD(t),toPath:UD(i)}]:[],o)}catch(e){console.warn(`[FileTree] post-rename reconciliation failed`,{err:e,sourceTreePath:t,destinationTreePath:i,renamedCount:c.renamed.length}),Vo.error(r({id:`dDpCOp`}))}gt(),j(null)}catch(e){console.warn(`[FileTree] rename failed:`,e);let n=r({id:`HIb0vl`});Vo.error(n),k(n),nt();let i=ae.current;i&&i.renamePath===t?await vt(i):gt(),j(null)}}let Ht;t[99]!==r||t[100]!==Bt||t[101]!==nt?(Ht=async function(e){let t=e.draggedPaths.map(t=>{let n=nO(t,e.target);return t===n?null:{sourcePath:t,destinationTreePath:n}}).filter(MV);if(t.length!==0){if(t.some(e=>st(e.sourcePath))){Vo.error(r({id:`ygLG1e`})),nt();return}j(t[0]?.sourcePath??null),k(null);try{let e=[],n=[],i={docName:ee.current,folderPath:ve.current?.kind===`folder`?ve.current.folderPath:null};for(let i of t){let t=i.sourcePath.endsWith(`/`),a=t?{kind:`folder`,fromPath:UD(i.sourcePath),toPath:UD(i.destinationTreePath)}:{kind:`file`,fromPath:BD(i.sourcePath),toPath:BD(i.destinationTreePath)},o=await M(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)}),r({id:`dOHMA0`}));if(!o.ok){Vo.error(o.title),nt(),j(null);return}let s=V(Zr,o.body,`rename-path:drop`,{renamed:[]});e=e.concat(s.renamed),t&&n.push({fromPath:UD(i.sourcePath),toPath:UD(i.destinationTreePath)})}try{await Bt(e,n,i)}catch(n){console.warn(`[FileTree] post-move reconciliation failed`,{err:n,operationCount:t.length,renamedCount:e.length}),Vo.error(r({id:`8OxKZy`}))}j(null)}catch(e){console.warn(`[FileTree] move failed:`,e),Vo.error(r({id:`HIb0vl`})),nt(),j(null)}}},t[99]=r,t[100]=Bt,t[101]=nt,t[102]=Ht):Ht=t[102];let Ut=Ht,Wt;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=function(e){B({parentDir:e})},t[103]=Wt):Wt=t[103];let Gt=Wt,Kt;t[104]!==r||t[105]!==vt||t[106]!==gt||t[107]!==Y||t[108]!==S||t[109]!==b||t[110]!==nt||t[111]!==Ge?(Kt=async function(e,t){if(J.current)return;let n=ae.current;n&>(n);try{let n=eO(e,t,[...Ge,...Xe.current]);j(n.renamePath),J.current=n.renamePath;let i=window.location.hash,a;if(e===`file`){let e=tO(`file`,n.addPath),t=await M(await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e})}),r({id:`fJgQHX`}));if(!t.ok){Vo.error(t.title),j(null),J.current=null;return}let i=BD(e),o=V(ai,t.body,`create-page`,{docName:i}).docName;a=o;let s=e.toLowerCase().endsWith(`.mdx`)?`.mdx`:`.md`;T(e=>{if(e.some(e=>Nn(e)&&e.docName===o))return e;let t=[...e,{kind:`document`,docName:o,docExt:s,modified:new Date().toISOString(),size:0}];return it(t),t}),yr([`files`,`backlinks`,`graph`]),b(o)}else{let e=UD(n.addPath),t=await M(await fetch(`/api/create-folder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e})}),r({id:`K1ckLX`}));if(!t.ok){Vo.error(t.title),j(null),J.current=null;return}a=V(xr,t.body,`create-folder`,{path:e}).path,T(e=>{if(e.some(e=>Mn(e)&&e.path===a))return e;let t=[...e,{kind:`folder`,path:a,modified:new Date().toISOString(),size:0}];return it(t),t}),yr([`files`]),S(a)}let o=!1,s=e=>{if(e.key!==`Enter`)return;let t=ae.current;!t||t.renamePath!==n.renamePath||queueMicrotask(()=>gt(t))};document.addEventListener(`keydown`,s,!0),ae.current={kind:e,renamePath:n.renamePath,createdPath:a,previousHash:i,disposeCommitListener:()=>{o||(o=!0,document.removeEventListener(`keydown`,s,!0))}},j(null),J.current=null,Y.add(n.addPath),Y.startRenaming(n.renamePath,{removeIfCanceled:!0})}catch(e){console.warn(`[FileTree] create placeholder failed:`,e),Vo.error(r({id:`S6l5dv`}));let t=ae.current;t?await vt(t):gt(),j(null),J.current=null,nt()}},t[104]=r,t[105]=vt,t[106]=gt,t[107]=Y,t[108]=S,t[109]=b,t[110]=nt,t[111]=Ge,t[112]=Kt):Kt=t[112];let qt=Kt,Jt;t[113]===Y?Jt=t[114]:(Jt=function(e){let t=WD(e);(0,Q.startTransition)(()=>{for(let e of Xe.current)if(e===t||e.startsWith(t)){let t=bB(Y.getItem(e));t&&t.expand()}})},t[113]=Y,t[114]=Jt);let Yt=Jt,Xt;t[115]===Y?Xt=t[116]:(Xt=function(e){let t=WD(e),n=new Set(ie.current);(0,Q.startTransition)(()=>{for(let e of[...Xe.current].reverse())if((e===t||e.startsWith(t))&&!n.has(e)){let t=bB(Y.getItem(e));t&&t.collapse()}})},t[115]=Y,t[116]=Xt);let Zt=Xt,Qt;t[117]!==K||t[118]!==Ze||t[119]!==a||t[120]!==o||t[121]!==te||t[122]!==A||t[123]!==vt||t[124]!==w||t[125]!==Ye||t[126]!==Ut||t[127]!==Vt||t[128]!==Ue||t[129]!==mt||t[130]!==je||t[131]!==Ae||t[132]!==Ge?(Qt=()=>{W.current=w,ee.current=a,ve.current=o,ne.current=te,J.current=A,ue.current=Ae,de.current=je,qe.current=Ge,Xe.current=Ye,ie.current=Ze,oe.current=vt,me.current=e=>{if(le.current||e.length!==1)return;let t=e[0];t&&K(Ue(t),w)},ge.current=e=>{mt(e)||Vo.error(e)},he.current=Vt,_e.current=Ut},t[117]=K,t[118]=Ze,t[119]=a,t[120]=o,t[121]=te,t[122]=A,t[123]=vt,t[124]=w,t[125]=Ye,t[126]=Ut,t[127]=Vt,t[128]=Ue,t[129]=mt,t[130]=je,t[131]=Ae,t[132]=Ge,t[133]=Qt):Qt=t[133],(0,Q.useLayoutEffect)(Qt);let $t,en;t[134]===Y?($t=t[135],en=t[136]):($t=()=>{let e=e=>{let t=(e.metaKey||e.ctrlKey)&&!e.altKey,n=e.key.toLowerCase(),r=t&&n===`a`,i=t&&!e.shiftKey&&n===`d`;if(!r&&!i||gV(e.target))return;let a=pe.current,o=e.target,s=document.activeElement,c=o instanceof Node&&a?.contains(o),l=s instanceof Node&&a?.contains(s);if(!c&&!l)return;if(i){let t=Y.getFocusedPath()??Y.getSelectedPaths()[0]??null;if(!t)return;let n=Y.getItem(t)??Y.getItem(WD(t)),r=n?.isDirectory()?WD(UD(n.getPath())):t;if(ne.current.has(r))return;ft.current(fV(r)),e.preventDefault(),e.stopPropagation();return}let u=new Set([...Xe.current,...qe.current]);le.current=!0;for(let e of u)!e||ne.current.has(e)||Y.getItem(e)?.select();queueMicrotask(()=>{le.current=!1}),e.preventDefault(),e.stopPropagation()};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},en=[Y],t[134]=Y,t[135]=$t,t[136]=en),(0,Q.useEffect)($t,en);let tn,nn;t[137]!==w.length||t[138]!==E?(tn=()=>{if(E||w.length===0)return;let e=pe.current?.querySelector(kA)?.shadowRoot;if(!e)return;let t=jV,n=()=>{for(let n of e.querySelectorAll(`[data-item-path]`)){let e=n.dataset.itemPath;if(!e)continue;let r=t(e);n.title!==r&&(n.title=r)}let n=e.querySelector(`[data-type="context-menu-anchor"]`);if(n){let r=e.querySelector(`[data-item-context-hover="true"][data-item-path]`)?.dataset.itemPath,i=r?t(r):``;n.title!==i&&(n.title=i)}};n();let r=new MutationObserver(n);return r.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`,`data-item-context-hover`]}),()=>r.disconnect()},nn=[E,w.length],t[137]=w.length,t[138]=E,t[139]=tn,t[140]=nn):(tn=t[139],nn=t[140]),(0,Q.useEffect)(tn,nn);let rn,an;t[141]!==w.length||t[142]!==E?(rn=()=>{if(E||w.length===0)return;let e=pe.current?.querySelector(kA)?.shadowRoot;if(!e)return;let t=()=>zz(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},an=[E,w.length],t[141]=w.length,t[142]=E,t[143]=rn,t[144]=an):(rn=t[143],an=t[144]),(0,Q.useEffect)(rn,an);let on,sn;t[145]!==w.length||t[146]!==E?(on=()=>{if(E||w.length===0)return;let e=pe.current?.querySelector(kA)?.shadowRoot;if(!e)return;let t=()=>Qz(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},sn=[E,w.length],t[145]=w.length,t[146]=E,t[147]=on,t[148]=sn):(on=t[147],sn=t[148]),(0,Q.useEffect)(on,sn);let cn;t[149]===Symbol.for(`react.memo_cache_sentinel`)?(cn={folderCount:0,expandedCount:0},t[149]=cn):cn=t[149];let ln=(0,Q.useRef)(cn),un=(0,Q.useRef)(qt),dn=(0,Q.useRef)(Gt),fn;t[150]===qt?fn=t[151]:(fn=()=>{un.current=qt,dn.current=Gt},t[150]=qt,t[151]=fn),(0,Q.useEffect)(fn);let pn,mn;t[152]===Y?(pn=t[153],mn=t[154]):(pn=()=>({startCreating(e,t){un.current(e,t)},startCreatingFromTemplate(e){dn.current(e)},expandAll(){(0,Q.startTransition)(()=>{for(let e of Xe.current){let t=bB(Y.getItem(e));t&&t.expand()}})},collapseAll(){let e=new Set(ie.current);(0,Q.startTransition)(()=>{for(let t of[...Xe.current].reverse()){if(e.has(t))continue;let n=bB(Y.getItem(t));n&&n.collapse()}})},getFolderState(){let e=Xe.current,t=0;for(let n of e)bB(Y.getItem(n))?.isExpanded()&&t++;let n=e.length,r=ln.current;if(r.folderCount===n&&r.expandedCount===t)return r;let i={folderCount:n,expandedCount:t};return ln.current=i,i},subscribe(e){return Y.subscribe(e)}}),mn=[Y],t[152]=Y,t[153]=pn,t[154]=mn),(0,Q.useImperativeHandle)(n,pn,mn);let hn;t[155]!==gt||t[156]!==u||t[157]!==c||t[158]!==Y?(hn=async function(e,t,n){let r=_V(e,W.current,Xe.current),i=ae.current;i&&e.some(e=>vV(e,i))&&(i.kind===`file`?r.docNames.add(i.createdPath):r.folderPaths.add(i.createdPath),gt(i));let a=new Set([...r.docNames,...t]),o=new Set([...r.folderPaths,...n]);c([...[...a].map(AV),...[...o].map(kV)],{force:!0}),await Promise.all([...a].map(e=>u(e)));for(let t of e){let e=t.kind===`folder`?WD(t.path):zD(t.path,t.docExt);Y.getItem(e)&&Y.remove(e,t.kind===`folder`?{recursive:!0}:void 0)}T(e=>{let t=lO(e,[...a]);for(let e of o)t=lO(t,[],e);return it(t),t}),yr([`files`,`backlinks`,`graph`])},t[155]=gt,t[156]=u,t[157]=c,t[158]=Y,t[159]=hn):hn=t[159];let gn=hn,_n;t[160]!==r||t[161]!==gn?(_n=async function(e){let t=[],n=[],i=[];for(let a of e){j(a.path);let e=await M(await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:a.kind,path:a.path})}),r({id:`7JtSLi`}));if(!e.ok)return i.length>0&&await gn(i,t,n),Vo.error(e.title),!1;let o=V(di,e.body,`delete-path`,{deletedDocNames:[]});t.push(...o.deletedDocNames),a.kind===`folder`&&n.push(a.path),i.push(a)}return await gn(i,t,n),!0},t[160]=r,t[161]=gn,t[162]=_n):_n=t[162];let vn=_n,yn;t[163]===Symbol.for(`react.memo_cache_sentinel`)?(yn=async function(e,t,n){let r=[],i=[];for(let a of e){j(a.path);let e=pO(a,n),o=await t.shell.trashItem(e);o.ok?r.push(a):i.push({kind:a.kind,path:a.path,name:a.name,reason:mB(o.reason),detail:o.detail})}return{trashed:r,failed:i}},t[163]=yn):yn=t[163];let bn=yn,xn;t[164]===r?xn=t[165]:(xn=async function(e){let t=[],n=[],i=[];for(let a of e)try{let e=await M(await fetch(`/api/trash/cleanup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:a.kind,path:a.path})}),r({id:`DVh_Tb`}));if(!e.ok){console.warn(`[FileTree] trash-cleanup failed`,{target:`${a.kind}:${a.path}`,reason:e.title}),i.push({target:a,reason:e.title});continue}let o=V(ei,e.body,`trash-cleanup`,{deletedDocNames:[]});t.push(...o.deletedDocNames),a.kind===`folder`&&n.push(a.path)}catch(e){let t=e;console.warn(`[FileTree] trash-cleanup threw`,{target:`${a.kind}:${a.path}`,err:t}),i.push({target:a,reason:r({id:`r4R7AZ`})})}if(i.length>0){let e=i.length;Vo.error(r({id:`IrB5AK`,values:{failedCount:e}}),{description:r({id:`vEJDlt`})})}return i.length===e.length&&e.length>0?null:{deletedDocNames:t,deletedFolderPaths:n}},t[164]=r,t[165]=xn);let Sn=xn,Cn;t[166]!==r||t[167]!==R||t[168]!==gn||t[169]!==vn||t[170]!==Sn||t[171]!==nt||t[172]!==H?(Cn=async function(e){let t=e[0];if(!t)return;let n=R.filter(t=>e.some(e=>{if(e.kind===`file`){let n=`${e.path}${e.docExt??`.md`}`;return t.file===n}return t.file.startsWith(`${e.path}/`)}));if(n.length>0){let e=n.slice(0,3).map(OV),t=n.length>e.length?`, +${n.length-e.length} more`:``;Vo.error(`Cannot delete files with unresolved conflicts`,{description:`Resolve the conflict on ${e.join(`, `)}${t} before deleting.`});return}j(t.path),F(null);let i=typeof window<`u`?window.okDesktop:void 0;try{if(i&&H){let{trashed:t,failed:n}=await bn(e,i,H);if(t.length>0){let e=await Sn(t);e?await gn(t,e.deletedDocNames,e.deletedFolderPaths):await gn(t,t.filter(DV).map(EV),t.filter(TV).map(wV))}n.length>0&&L({failed:n,originalTargets:[...e]}),j(null)}else{let t=await vn(e);j(null),t||nt()}}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] delete failed:`,t),Vo.error(r({id:`0eHrMb`}),{description:n}),j(null),nt()}},t[166]=r,t[167]=R,t[168]=gn,t[169]=vn,t[170]=Sn,t[171]=nt,t[172]=H,t[173]=Cn):Cn=t[173];let wn=Cn,Tn;t[174]!==r||t[175]!==vn||t[176]!==nt||t[177]!==I?(Tn=async function(){if(!I)return;let e=new Set(I.failed.map(CV)),t=I.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));if(L(null),t.length!==0){j(t[0]?.path??null);try{let e=await vn(t);j(null),e||nt()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] hard-delete fallback failed:`,t),Vo.error(r({id:`0eHrMb`}),{description:n}),j(null),nt()}}},t[174]=r,t[175]=vn,t[176]=nt,t[177]=I,t[178]=Tn):Tn=t[178];let En=Tn,Dn;t[179]!==wn||t[180]!==I?(Dn=async function(){if(!I)return;let e=new Set(I.failed.map(SV)),t=I.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));L(null),await wn(t)},t[179]=wn,t[180]=I,t[181]=Dn):Dn=t[181];let kn=Dn,An=(0,Q.useRef)(wn),Pn;t[182]===wn?Pn=t[183]:(Pn=()=>{An.current=wn},t[182]=wn,t[183]=Pn),(0,Q.useEffect)(Pn);let Fn,In;t[184]===Symbol.for(`react.memo_cache_sentinel`)?(Fn=()=>OB(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=W.current.find(e=>Nn(e)&&e.docName===t);An.current([{kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt}]);return}if(e.kind===`folder`){An.current([{kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath}]);return}console.warn(JSON.stringify({event:`file-tree-menu-action-delete-unsupported-kind`,kind:e.kind}))}),In=[],t[184]=Fn,t[185]=In):(Fn=t[184],In=t[185]),(0,Q.useEffect)(Fn,In);let Ln,Rn;t[186]===Symbol.for(`react.memo_cache_sentinel`)?(Ln=()=>MB(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=W.current.find(e=>Nn(e)&&e.docName===t);ft.current({kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt});return}if(e.kind===`folder`){ft.current({kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath});return}console.warn(JSON.stringify({event:`file-tree-menu-action-duplicate-unsupported-kind`,kind:e.kind}))}),Rn=[],t[186]=Ln,t[187]=Rn):(Ln=t[186],Rn=t[187]),(0,Q.useEffect)(Ln,Rn);let zn,Bn;t[188]===Y?(zn=t[189],Bn=t[190]):(zn=()=>AB(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=zD(t,W.current.find(e=>Nn(e)&&e.docName===t)?.docExt);Y.startRenaming(n);return}if(e.kind===`folder`){Y.startRenaming(e.folderPath);return}console.warn(JSON.stringify({event:`file-tree-menu-action-rename-unsupported-kind`,kind:e.kind}))}),Bn=[Y],t[188]=Y,t[189]=zn,t[190]=Bn),(0,Q.useEffect)(zn,Bn);let Vn;t[191]===Symbol.for(`react.memo_cache_sentinel`)?(Vn=function(){let e=ce.current;e&&JB(e),ce.current=null},t[191]=Vn):Vn=t[191];let Hn=Vn,Un;t[192]===m?Un=t[193]:(Un=function(e){let t=HV(e.nativeEvent);if(!t||t.endsWith(`/`)){Hn();return}let n=BD(t),r=W.current.find(e=>VD(e)===t);if(r&&ar(r)){Hn();return}ce.current!==n&&(Hn(),ce.current=n,qB(n,e=>m(e)))},t[192]=m,t[193]=Un);let Wn=Un,Gn;t[194]!==K||t[195]!==Y||t[196]!==S?(Gn=function(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=UV(e.nativeEvent);if(!t||t.getAttribute(`aria-selected`)!==`true`)return;let n=t.dataset.itemPath;if(!n)return;let r=t.dataset.itemType===`folder`?WD(n):n;if(Y.getSelectedPaths().length!==1)return;if(t.dataset.itemType===`folder`){let e=UD(r);if(window.location.hash===Tr(e))return;queueMicrotask(()=>S(e));return}let i=BD(r);window.location.hash!==ni(i)&&queueMicrotask(()=>K(r))},t[194]=K,t[195]=Y,t[196]=S,t[197]=Gn):Gn=t[197];let Kn=Gn;if(E){let e;return t[198]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(GV,{}),t[198]=e):e=t[198],e}if(w.length===0){if(O){let e;return t[199]===O?e=t[200]:(e=(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,Z.jsx)(`span`,{className:`select-none text-sidebar-foreground/50 text-sm`,children:O})}),t[199]=O,t[200]=e),e}let e;t[201]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`span`,{className:`select-none text-sidebar-foreground/30 text-sm`,children:(0,Z.jsx)(s,{id:`xiv-dW`})}),t[201]=e):e=t[201];let n;t[202]===qt?n=t[203]:(n=()=>qt(`file`,``),t[202]=qt,t[203]=n);let r;t[204]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(s,{id:`6ibbCg`}),t[204]=r):r=t[204];let i;return t[205]===n?i=t[206]:(i=(0,Z.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-8`,children:[e,(0,Z.jsx)(Ti,{variant:`link`,size:`sm`,className:`font-mono uppercase`,onClick:n,children:r})]}),t[205]=n,t[206]=i),i}let qn=A!==null,Jn=P?.targets[0]??null,Yn;t[207]===O?Yn=t[208]:(Yn=O&&(0,Z.jsx)(`span`,{role:`alert`,className:`px-3 pb-1 text-destructive text-xs`,children:O}),t[207]=O,t[208]=Yn);let Xn;t[209]===_?Xn=t[210]:(Xn=sV(_),t[209]=_,t[210]=Xn);let Zn;t[211]!==qn||t[212]!==te||t[213]!==Zt||t[214]!==Yt||t[215]!==Ye||t[216]!==dt||t[217]!==Ee||t[218]!==ke||t[219]!==Y||t[220]!==De||t[221]!==Oe||t[222]!==qt||t[223]!==H?(Zn=(e,t)=>(0,Z.jsx)(yV,{item:e,context:t,anyActionBusy:qn,workspace:H,handoff:Ee,model:Y,okignoreBinding:De,projectLocalBinding:Oe,mergedConfig:ke,onStartCreating:qt,onStartCreatingFromTemplate:Gt,onDuplicate:dt,onDelete:e=>F({targets:e}),onExpandSubtree:Yt,onCollapseSubtree:Zt,folderTreePaths:Ye,isAsset:te.has(e.path),isAssetTreePath:st}),t[211]=qn,t[212]=te,t[213]=Zt,t[214]=Yt,t[215]=Ye,t[216]=dt,t[217]=Ee,t[218]=ke,t[219]=Y,t[220]=De,t[221]=Oe,t[222]=qt,t[223]=H,t[224]=Zn):Zn=t[224];let Qn;t[225]!==Kn||t[226]!==Wn||t[227]!==Y||t[228]!==Yn||t[229]!==Xn||t[230]!==Zn?(Qn=(0,Z.jsx)(`div`,{ref:pe,className:`flex min-h-0 flex-1 flex-col`,children:(0,Z.jsx)(Mz,{header:Yn,model:Y,style:Xn,onClickCapture:Kn,onMouseMove:Wn,onMouseLeave:Hn,renderContextMenu:Zn})}),t[225]=Kn,t[226]=Wn,t[227]=Y,t[228]=Yn,t[229]=Xn,t[230]=Zn,t[231]=Qn):Qn=t[231];let $n=!!P,er;t[232]===A?er=t[233]:(er=e=>{!e&&!A&&F(null)},t[232]=A,t[233]=er);let tr;t[234]!==r||t[235]!==A||t[236]!==P||t[237]!==wn||t[238]!==Jn?(tr=P&&Jn&&(0,Z.jsx)(Na,{...(()=>{let e=dB(typeof window<`u`&&window.okDesktop!=null?`electron`:`web`,P.targets);if(e)return{customTitle:e.title,customDescription:``,customDetail:e.detail,customConfirmLabel:e.confirmLabel,customConfirmLabelBusy:e.confirmLabelBusy,children:e.listedTargets?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-foreground text-xs`,children:e.listedTargets.map(xV)}):null};let t=P.targets.length,n=Jn.name;return{itemName:t===1?`${Jn.name}${Jn.kind===`file`?Jn.docExt??`.md`:`/`}`:void 0,customTitle:t>1?r({id:`abiHje`}):void 0,customDescription:t>1?r({id:`WMIKXK`,values:{targetCount:t}}):Jn.kind===`folder`?r({id:`a5W0q0`,values:{folderName:n}}):void 0}})(),isSubmitting:A!==null,onDelete:()=>wn(P.targets)}),t[234]=r,t[235]=A,t[236]=P,t[237]=wn,t[238]=Jn,t[239]=tr):tr=t[239];let nr;t[240]!==$n||t[241]!==er||t[242]!==tr?(nr=(0,Z.jsx)(zo,{open:$n,onOpenChange:er,children:tr}),t[240]=$n,t[241]=er,t[242]=tr,t[243]=nr):nr=t[243];let rr=!!I,or;t[244]===A?or=t[245]:(or=e=>{!e&&!A&&L(null)},t[244]=A,t[245]=or);let sr;t[246]!==A||t[247]!==En||t[248]!==kn||t[249]!==I?(sr=I&&(0,Z.jsx)(vB,{failedTargets:I.failed,isSubmitting:A!==null,onDeletePermanently:En,onRetry:kn,onCancel:()=>L(null)}),t[246]=A,t[247]=En,t[248]=kn,t[249]=I,t[250]=sr):sr=t[250];let cr;t[251]!==rr||t[252]!==or||t[253]!==sr?(cr=(0,Z.jsx)(zo,{open:rr,onOpenChange:or,children:sr}),t[251]=rr,t[252]=or,t[253]=sr,t[254]=cr):cr=t[254];let lr=z!==null,ur;t[255]===Symbol.for(`react.memo_cache_sentinel`)?(ur=e=>{e||B(null)},t[255]=ur):ur=t[255];let dr=z?.parentDir??``,fr;t[256]!==lr||t[257]!==dr?(fr=(0,Z.jsx)(zp,{open:lr,onOpenChange:ur,kind:`file`,initialDir:dr}),t[256]=lr,t[257]=dr,t[258]=fr):fr=t[258];let pr;return t[259]!==Qn||t[260]!==nr||t[261]!==cr||t[262]!==fr?(pr=(0,Z.jsxs)(Z.Fragment,{children:[Qn,nr,cr,fr]}),t[259]=Qn,t[260]=nr,t[261]=cr,t[262]=fr,t[263]=pr):pr=t[263],pr}function xV(e){return(0,Z.jsx)(`li`,{"data-testid":`delete-target-row`,children:fB(e)},`${e.kind}:${e.path}`)}function SV(e){return`${e.kind}:${e.path}`}function CV(e){return`${e.kind}:${e.path}`}function wV(e){return e.path}function TV(e){return e.kind===`folder`}function EV(e){return e.path}function DV(e){return e.kind===`file`}function OV(e){return e.file}function kV(e){return at(e)}function AV(e){return Et(e)}function jV(e){return e.endsWith(`/`)?e.slice(0,-1):e}function MV(e){return!!e}function NV(e){console.warn(`[FileTree] /api/workspace fetch failed:`,e)}function PV(e){console.warn(`[FileTree] unmount cleanup failed:`,e)}function FV(e){Vo.error(e)}function IV(){}function LV(e){return Vo.error(e)}function RV(){}function zV(){}async function BV(){}function VV(e){return VD(e)}function HV(e){return UV(e)?.dataset.itemPath??null}function UV(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.dataset.itemPath)return t;return null}var WV=[`w-3/4`,`w-2/3`,`w-4/5`,`w-1/2`,`w-3/5`,`w-2/3`];function GV(){let e=(0,$.c)(5),{_:t}=i(),n;e[0]===t?n=e[1]:(n=t({id:`5Tk8Fb`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=WV.map(KV),e[2]=r):r=e[2];let a;return e[3]===n?a=e[4]:(a=(0,Z.jsx)(`div`,{className:`flex flex-1 flex-col gap-1 px-2 py-2`,role:`status`,"aria-busy":`true`,"aria-label":n,children:r}),e[3]=n,e[4]=a),a}function KV(e,t){return(0,Z.jsxs)(`div`,{className:`flex h-6 items-center gap-2`,children:[(0,Z.jsx)(Ha,{className:`h-3 w-3 shrink-0 rounded-sm`}),(0,Z.jsx)(Ha,{className:`h-3 ${e}`})]},t)}function qV(e){return e?X._({id:`wTcjov`}):null}function JV(e){let t=(0,$.c)(35),{_:n}=i(),{input:r,installStates:a,dispatch:o,webFallbackVisible:c}=e,l=c===void 0?!0:c,u=r===null,d,f,p,m,h,g,_;if(t[0]!==n||t[1]!==o||t[2]!==r||t[3]!==u||t[4]!==a||t[5]!==l){_=Symbol.for(`react.early_return_sentinel`);bb0:{let e=qV(u),i;t[13]===a?i=t[14]:(i=e=>a[e.id]?.installed===!0,t[13]=a,t[14]=i);let c=hm.filter(i);p=a[`claude-code`]?.installed===!0;let v;t[15]===r?v=t[16]:(v=r!==null&&r.docContext!==null?si(r.docContext.relativePath):``,t[15]=r,t[16]=v);let y=v,b;t[17]!==r||t[18]!==y?(b=()=>{r!==null&&Ay(y)},t[17]=r,t[18]=y,t[19]=b):b=t[19],m=b;let x=l&&!p;if(c.length===0&&!x){_=null;break bb0}f=xO,t[20]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsxs)(wO,{children:[(0,Z.jsx)(Li,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`O7_W_a`})]}),t[20]=g):g=t[20],d=TO,h=c.map(t=>{let i=!u,{displayName:a}=t,s=n(e?{id:`1ZpfyB`,values:{displayName:a,hint:e}}:{id:`WqLq6M`,values:{displayName:a}});return(0,Z.jsxs)(CO,{disabled:!i,onSelect:()=>{r&&o(t.id,r)},"data-testid":`empty-space-open-in-${t.id}`,"aria-label":s,children:[(0,Z.jsx)(wy,{id:t.id,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})}t[0]=n,t[1]=o,t[2]=r,t[3]=u,t[4]=a,t[5]=l,t[6]=d,t[7]=f,t[8]=p,t[9]=m,t[10]=h,t[11]=g,t[12]=_}else d=t[6],f=t[7],p=t[8],m=t[9],h=t[10],g=t[11],_=t[12];if(_!==Symbol.for(`react.early_return_sentinel`))return _;let v;t[21]!==n||t[22]!==p||t[23]!==m||t[24]!==u||t[25]!==l?(v=l&&!p?(0,Z.jsxs)(CO,{onSelect:m,disabled:u,"data-testid":`empty-space-open-in-claude-web-fallback`,"aria-label":n({id:`aA51jP`}),children:[(0,Z.jsx)(Se,{className:`size-4`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`0S9PW_`})}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`pcfY8r`})})]}):null,t[21]=n,t[22]=p,t[23]=m,t[24]=u,t[25]=l,t[26]=v):v=t[26];let y;t[27]!==d||t[28]!==h||t[29]!==v?(y=(0,Z.jsxs)(d,{children:[h,v]}),t[27]=d,t[28]=h,t[29]=v,t[30]=y):y=t[30];let b;return t[31]!==f||t[32]!==g||t[33]!==y?(b=(0,Z.jsxs)(f,{children:[g,y]}),t[31]=f,t[32]=g,t[33]=y,t[34]=b):b=t[34],b}var YV=(e,t,n)=>cl(e,t,n,`ProjectSwitcher`);function XV(e){let t=(0,$.c)(79),{bridge:n}=e,{_:r}=i(),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],t[0]=a):a=t[0];let[o,c]=(0,Q.useState)(a),[l,u]=(0,Q.useState)(!1),[d,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),g;t[1]!==r||t[2]!==n.project||t[3]!==l?(g=()=>{if(!l)return;let e=!1;return YV(async()=>{let t=await n.project.listRecent();e||c(t)},r({id:`fYKgzG`})),()=>{e=!0}},t[1]=r,t[2]=n.project,t[3]=l,t[4]=g):g=t[4];let _;t[5]!==r||t[6]!==n||t[7]!==l?(_=[l,n,r],t[5]=r,t[6]=n,t[7]=l,t[8]=_):_=t[8],(0,Q.useEffect)(g,_);let v;t[9]!==r||t[10]!==n.project?(v=e=>{u(!1),YV(()=>n.project.open({path:e,target:`new-window`,entryPoint:`recents`}),r({id:`SUOoXn`}))},t[9]=r,t[10]=n.project,t[11]=v):v=t[11];let y=v,b;t[12]!==r||t[13]!==n.dialog||t[14]!==n.project?(b=()=>{u(!1),YV(async()=>{let e=await n.dialog.openFolder();e&&await n.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})},r({id:`gmJ0An`}))},t[12]=r,t[13]=n.dialog,t[14]=n.project,t[15]=b):b=t[15];let x=b,S;t[16]!==r||t[17]!==n.navigator?(S=()=>{u(!1),YV(()=>n.navigator.open(),r({id:`jol95m`}))},t[16]=r,t[17]=n.navigator,t[18]=S):S=t[18];let C=S,w;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{u(!1),h(!0)},t[19]=w):w=t[19];let T=w,E=n.config.projectPath,D,O,k,A,j,M,N,P,F,I;if(t[20]!==r||t[21]!==n.config.projectName||t[22]!==E||t[23]!==l||t[24]!==y||t[25]!==o||t[26]!==d){let e;t[37]===E?e=t[38]:(e=e=>e.path!==E,t[37]=E,t[38]=e);let i=o.filter(e),a=d.trim().toLowerCase(),c=a?i.filter(e=>e.name.toLowerCase().includes(a)||e.path.toLowerCase().includes(a)):i;O=Ca,M=l,t[39]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{u(e),e||p(``)},t[39]=N):N=t[39];let f;t[40]===r?f=t[41]:(f=r({id:`zZ_I5K`}),t[40]=r,t[41]=f);let m;t[42]===n.config.projectName?m=t[43]:(m=(0,Z.jsx)(`span`,{className:`truncate`,children:n.config.projectName}),t[42]=n.config.projectName,t[43]=m);let h;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(Xs,{"aria-hidden":`true`,className:`opacity-60`}),t[44]=h):h=t[44],t[45]!==f||t[46]!==m?(P=(0,Z.jsx)(ga,{asChild:!0,children:(0,Z.jsxs)(hD,{className:`justify-between text-sidebar-foreground/70`,"data-testid":`project-switcher-trigger`,title:f,children:[m,h]})}),t[45]=f,t[46]=m,t[47]=P):P=t[47],D=ta,F=`start`,I=`top`,k=`min-w-[260px]`,A=`project-switcher-menu`,j=i.length===0?(0,Z.jsx)(no,{className:`font-normal text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`HNnVG1`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(yx,{className:`mb-1 h-8 border-0 shadow-none has-[[data-slot=input-group-control]:focus-visible]:ring-0`,children:[(0,Z.jsx)(wx,{"aria-label":r({id:`H8Ng4Z`}),placeholder:r({id:`8S1E33`}),value:d,onChange:e=>p(e.target.value),onKeyDown:ZV,"data-testid":`project-switcher-search`}),(0,Z.jsx)(xx,{children:(0,Z.jsx)(K,{"aria-hidden":`true`})})]}),(0,Z.jsx)(aa,{}),c.length===0?(0,Z.jsx)(no,{className:`font-normal text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,children:(0,Z.jsx)(s,{id:`pEQFsW`})}):(0,Z.jsx)(`div`,{className:`max-h-64 overflow-y-auto overscroll-contain subtle-scrollbar scroll-fade-mask`,children:c.slice(0,10).map(e=>(0,Z.jsxs)(oa,{disabled:e.missing,onSelect:()=>y(e.path),className:`flex flex-col items-start gap-0.5`,"data-testid":`project-switcher-recent-${e.path}`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-sm`,children:e.name}),(0,Z.jsxs)(`span`,{className:`max-w-[240px] truncate text-muted-foreground text-xs`,children:[e.path,e.missing?r({id:`2Znqb1`}):``]})]},e.path))})]}),t[20]=r,t[21]=n.config.projectName,t[22]=E,t[23]=l,t[24]=y,t[25]=o,t[26]=d,t[27]=D,t[28]=O,t[29]=k,t[30]=A,t[31]=j,t[32]=M,t[33]=N,t[34]=P,t[35]=F,t[36]=I}else D=t[27],O=t[28],k=t[29],A=t[30],j=t[31],M=t[32],N=t[33],P=t[34],F=t[35],I=t[36];let R;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(aa,{}),t[48]=R):R=t[48];let z,B;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Z.jsx)(L,{"aria-hidden":`true`,className:`text-muted-foreground`}),B=(0,Z.jsx)(s,{id:`PVUn_c`}),t[49]=z,t[50]=B):(z=t[49],B=t[50]);let V;t[51]===x?V=t[52]:(V=(0,Z.jsxs)(oa,{onSelect:x,"data-testid":`project-switcher-open-folder`,children:[z,B]}),t[51]=x,t[52]=V);let H,U;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Z.jsx)(Ht,{"aria-hidden":`true`,className:`text-muted-foreground`}),U=(0,Z.jsx)(s,{id:`2Xs2jo`}),t[53]=H,t[54]=U):(H=t[53],U=t[54]);let W;t[55]===C?W=t[56]:(W=(0,Z.jsxs)(oa,{onSelect:C,"data-testid":`project-switcher-switch-project`,children:[H,U]}),t[55]=C,t[56]=W);let G;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Z.jsxs)(oa,{onSelect:T,"data-testid":`project-switcher-new-project`,children:[(0,Z.jsx)(f,{"aria-hidden":`true`,className:`text-muted-foreground`}),(0,Z.jsx)(s,{id:`gKi-a_`})]}),t[57]=G):G=t[57];let ee;t[58]!==D||t[59]!==k||t[60]!==A||t[61]!==j||t[62]!==V||t[63]!==W||t[64]!==F||t[65]!==I?(ee=(0,Z.jsxs)(D,{align:F,side:I,className:k,"data-testid":A,children:[j,R,V,W,G]}),t[58]=D,t[59]=k,t[60]=A,t[61]=j,t[62]=V,t[63]=W,t[64]=F,t[65]=I,t[66]=ee):ee=t[66];let q;t[67]!==O||t[68]!==M||t[69]!==N||t[70]!==P||t[71]!==ee?(q=(0,Z.jsxs)(O,{open:M,onOpenChange:N,children:[P,ee]}),t[67]=O,t[68]=M,t[69]=N,t[70]=P,t[71]=ee,t[72]=q):q=t[72];let te;t[73]!==n||t[74]!==m?(te=(0,Z.jsx)(Ju,{open:m,onOpenChange:h,bridge:n}),t[73]=n,t[74]=m,t[75]=te):te=t[75];let ne;return t[76]!==q||t[77]!==te?(ne=(0,Z.jsxs)(Z.Fragment,{children:[q,te]}),t[76]=q,t[77]=te,t[78]=ne):ne=t[78],ne}function ZV(e){return e.stopPropagation()}function QV(e,t){let n=e instanceof Error?e:Error(String(e));console.warn(JSON.stringify({event:`jsx-render-failure`,component:`sidebarSearchPill`,rawComponentName:`sidebarSearchPill`,error:String(n),stack:t.componentStack})),Sn(`sidebarSearchPill`)}function $V(e){let t=(0,$.c)(8),{onClick:n,className:r}=e,i;t[0]===r?i=t[1]:(i=vi(`rounded-lg h-9 w-full justify-start gap-2 px-3 font-normal text-muted-foreground`,r),t[0]=r,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(K,{"aria-hidden":`true`}),t[2]=a):a=t[2];let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(`span`,{className:`flex-1 text-left text-sm`,children:(0,Z.jsx)(s,{id:`A1taO8`})}),t[3]=o):o=t[3];let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(db,{className:`text-foreground/70`,children:Wn()?`⌘ K`:`Ctrl K`}),t[4]=c):c=t[4];let l;return t[5]!==n||t[6]!==i?(l=(0,Z.jsxs)(Ti,{variant:`outline`,onClick:n,"data-telemetry-event":`ok.sidebar.search_pill.click`,className:i,children:[a,o,c]}),t[5]=n,t[6]=i,t[7]=l):l=t[7],l}function eH(e){let t=(0,$.c)(36),{notice:n,onDismiss:r}=e,{_:a}=i(),o=n.variant===`error`?`border-destructive/60`:`border-sidebar-border`,s;t[0]===a?s=t[1]:(s=a({id:`GUYwCr`}),t[0]=a,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Eo,{"aria-hidden":`true`,className:`size-3`}),t[2]=c):c=t[2];let l;t[3]!==r||t[4]!==s?(l=(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-sidebar-foreground`,"aria-label":s,onClick:r,children:c}),t[3]=r,t[4]=s,t[5]=l):l=t[5];let u=l;if(n.secondaryAction){let e=`update-notice-${n.id}`,r=`flex flex-col gap-2 rounded-md border bg-sidebar-accent/30 px-2 py-2 text-xs text-muted-foreground ${o}`,i;t[6]===n.body?i=t[7]:(i=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[6]=n.body,t[7]=i);let a;t[8]!==u||t[9]!==i?(a=(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[i,u]}),t[8]=u,t[9]=i,t[10]=a):a=t[10];let s;t[11]===n.action?s=t[12]:(s=n.action?(0,Z.jsx)(`button`,{type:`button`,className:`shrink-0 text-xs font-medium underline underline-offset-2 decoration-muted-foreground/40 hover:text-sidebar-foreground hover:decoration-sidebar-foreground`,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[11]=n.action,t[12]=s);let c;t[13]===n.secondaryAction?c=t[14]:(c=()=>{n.secondaryAction?.onClick()},t[13]=n.secondaryAction,t[14]=c);let l;t[15]!==n.secondaryAction.label||t[16]!==c?(l=(0,Z.jsx)(`button`,{type:`button`,className:`shrink-0 text-xs font-medium underline underline-offset-2 decoration-muted-foreground/40 hover:text-sidebar-foreground hover:decoration-sidebar-foreground`,onClick:c,children:n.secondaryAction.label}),t[15]=n.secondaryAction.label,t[16]=c,t[17]=l):l=t[17];let d;t[18]!==l||t[19]!==s?(d=(0,Z.jsxs)(`div`,{className:`flex gap-3 pl-1`,children:[s,l]}),t[18]=l,t[19]=s,t[20]=d):d=t[20];let f;return t[21]!==d||t[22]!==e||t[23]!==r||t[24]!==a?(f=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":e,className:r,children:[a,d]}),t[21]=d,t[22]=e,t[23]=r,t[24]=a,t[25]=f):f=t[25],f}let d=`update-notice-${n.id}`,f=`flex items-center gap-2 rounded-md border bg-sidebar-accent/30 px-2 py-1.5 text-xs text-muted-foreground ${o}`,p;t[26]===n.body?p=t[27]:(p=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[26]=n.body,t[27]=p);let m;t[28]===n.action?m=t[29]:(m=n.action?(0,Z.jsx)(`button`,{type:`button`,className:`shrink-0 text-xs font-medium underline underline-offset-2 decoration-muted-foreground/40 hover:text-sidebar-foreground hover:decoration-sidebar-foreground`,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[28]=n.action,t[29]=m);let h;return t[30]!==u||t[31]!==d||t[32]!==f||t[33]!==p||t[34]!==m?(h=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":d,className:f,children:[p,m,u]}),t[30]=u,t[31]=d,t[32]=f,t[33]=p,t[34]=m,t[35]=h):h=t[35],h}function tH(e){if(e.length===0)return null;let t=e[0];if(!t)return null;for(let n=1;n<e.length;n++){let r=e[n];r&&r.priority<t.priority&&(t=r)}return t}function nH(){let e=(0,$.c)(7),t=(0,Q.useSyncExternalStore)(Uf,Hf,Hf),n;e[0]===t?n=e[1]:(n=tH(t),e[0]=t,e[1]=n);let r=n;if(!r)return null;let i;e[2]===r.id?i=e[3]:(i=()=>{Vf(r.id)},e[2]=r.id,e[3]=i);let a;return e[4]!==r||e[5]!==i?(a=(0,Z.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,Z.jsx)(eH,{notice:r,onDismiss:i})}),e[4]=r,e[5]=i,e[6]=a):a=e[6],a}function rH(e,t,n){return e?.kind===`doc`&&t||e?.kind===`folder-index`&&t?Gm(n.contentDir,Km(t),n.pathSeparator):e?.kind===`folder`?Gm(n.contentDir,e.folderPath,n.pathSeparator):n.contentDir}function iH(e,t,n){if((e?.kind===`doc`||e?.kind===`folder-index`)&&t){let e=t.lastIndexOf(`/`);return e<0?n.contentDir:Gm(n.contentDir,t.slice(0,e),n.pathSeparator)}return e?.kind===`folder`?Gm(n.contentDir,e.folderPath,n.pathSeparator):n.contentDir}function aH(e,t){return(e?.kind===`doc`||e?.kind===`folder-index`)&&t?Km(t):e?.kind===`folder`?e.folderPath:``}function oH(e,t,n){return e===null?Jm({workspace:n}):e.kind===`folder`?n?Ym({folderRelativePath:e.folderPath,workspace:n}):null:e.kind===`doc`||e.kind===`folder-index`?qm({docName:t,workspace:n}):null}var sH={folderCount:0,expandedCount:0},cH=`button, [role="button"], [role="menuitem"], input, textarea, select, a[href]`;function lH(e){return typeof Element>`u`||!(e instanceof Element)?!1:e.closest(cH)!==null}function uH(e){let t=(0,$.c)(2),{onOpenSearch:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(Je,{name:`file-sidebar`,children:(0,Z.jsx)(fH,{onOpenSearch:n})}),t[0]=n,t[1]=r),r}var dH=e=>{let t=(0,$.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:n,label:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=(0,Z.jsx)(n,{"aria-hidden":`true`}),t[4]=n,t[5]=a);let o;t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(Kn,{asChild:!0,children:(0,Z.jsx)(Ti,{variant:`ghost`,size:`icon-sm`,"aria-label":r,...i,children:a})}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9];let s;t[10]===r?s=t[11]:(s=(0,Z.jsx)(wn,{children:r}),t[10]=r,t[11]=s);let c;return t[12]!==o||t[13]!==s?(c=(0,Z.jsxs)(Ir,{children:[o,s]}),t[12]=o,t[13]=s,t[14]=c):c=t[14],c};function fH(e){let t=(0,$.c)(190),{onOpenSearch:n}=e,{_:r}=i(),[a,o]=(0,Q.useState)(null),{activeDocName:c,activeTarget:l}=lt(),u;t[0]!==c||t[1]!==l?(u=l?.kind===`folder`||l?.kind===`folder-index`?l.folderPath:Dn(c),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d=u,f=typeof window<`u`&&window.okDesktop!=null,{state:p}=tD(),m=p===`expanded`,h=f&&p===`collapsed`,[g,_]=(0,Q.useState)(sH),v,y;t[3]===a?(v=t[4],y=t[5]):(v=()=>{if(a!==null)return _(a.getFolderState()),a.subscribe(()=>{_(a.getFolderState())})},y=[a],t[3]=a,t[4]=v,t[5]=y),(0,Q.useEffect)(v,y);let b,x;t[6]===a?(b=t[7],x=t[8]):(b=()=>{if(a!==null)return hb(()=>{a.startCreating(`file`,``)})},x=[a],t[6]=a,t[7]=b,t[8]=x),(0,Q.useEffect)(b,x);let S=g.folderCount>0,C=S&&g.expandedCount===g.folderCount,w=g.expandedCount===0,T=Xa(``),E=T.state.status===`ready`?(T.state.data.folder.templates_available?.length??0)>0:!0,D=typeof window<`u`?window.okDesktop:void 0,O=Ma(),k=_h().states,{dispatch:A}=oh(),j;t[9]===O?j=t[10]:(j=Jm({workspace:O}),t[9]=O,t[10]=j);let M=j,{projectLocalBinding:P,merged:F}=N(),I=F?.appearance?.sidebar?.showHiddenFiles??!1,R=F?.appearance?.sidebar?.showAllFiles??!1,B=S&&!C,V=S&&!w,H=B||V,U=mH,W;t[11]!==a||t[12]!==O?(W=()=>{O&&a?.startCreating(`file`,``)},t[11]=a,t[12]=O,t[13]=W):W=t[13];let G=W,K;t[14]!==a||t[15]!==O?(K=()=>{O&&a?.startCreatingFromTemplate(``)},t[14]=a,t[15]=O,t[16]=K):K=t[16];let ee=K,q;t[17]!==a||t[18]!==O?(q=()=>{O&&a?.startCreating(`folder`,``)},t[17]=a,t[18]=O,t[19]=q):q=t[19];let te=q,ne;t[20]===O?ne=t[21]:(ne=()=>{!O||!D||D.shell.showItemInFolder(O.contentDir)},t[20]=O,t[21]=ne);let re=ne,ie;t[22]===O?ie=t[23]:(ie=()=>{!O||!D||CB(D,O.contentDir)},t[22]=O,t[23]=ie);let ae=ie,oe;t[24]!==r||t[25]!==O?(oe=async()=>{if(O)try{await navigator.clipboard.writeText(O.contentDir),Vo.success(r({id:`6_ZOw4`}),{description:O.contentDir})}catch(e){console.warn(`[FileSidebar] clipboard write failed:`,e),Vo.error(r({id:`vfRlCI`}))}},t[24]=r,t[25]=O,t[26]=oe):oe=t[26];let se=oe,ce;t[27]!==r||t[28]!==P?(ce=e=>{if(P===null)return;let t=P.patch({appearance:{sidebar:{showHiddenFiles:e}}});t.ok||(console.warn(`[FileSidebar] showHiddenFiles toggle rejected:`,lr(t.error)),Vo.error(r({id:`P47EWZ`}),{description:lr(t.error)}))},t[27]=r,t[28]=P,t[29]=ce):ce=t[29];let le=ce,J;t[30]!==r||t[31]!==P?(J=e=>{if(P===null)return;let t=P.patch({appearance:{sidebar:{showAllFiles:e}}});t.ok||(console.warn(`[FileSidebar] showAllFiles toggle rejected:`,lr(t.error)),Vo.error(r({id:`P47EWZ`}),{description:lr(t.error)}))},t[30]=r,t[31]=P,t[32]=J):J=t[32];let ue=J,de;t[33]===a?de=t[34]:(de=()=>{a?.expandAll()},t[33]=a,t[34]=de);let fe=de,pe;t[35]===a?pe=t[36]:(pe=()=>{a?.collapseAll()},t[35]=a,t[36]=pe);let me=pe,he,ge;t[37]!==R||t[38]!==V||t[39]!==B||t[40]!==I?(he=()=>{D&&D.editor.notifyViewMenuStateChanged({showHiddenFiles:I,showAllFiles:R,canExpandAll:B,canCollapseAll:V})},ge=[D,I,R,B,V],t[37]=R,t[38]=V,t[39]=B,t[40]=I,t[41]=he,t[42]=ge):(he=t[41],ge=t[42]),(0,Q.useEffect)(he,ge);let _e,ve;t[43]!==r||t[44]!==c||t[45]!==l||t[46]!==A||t[47]!==k||t[48]!==d||t[49]!==P||t[50]!==R||t[51]!==I||t[52]!==a||t[53]!==O?(_e=()=>{if(D)return D.onMenuAction(e=>{switch(e){case`new-doc`:if(!O||!a)return;a.startCreating(`file`,d);return;case`new-folder`:if(!O||!a)return;a.startCreating(`folder`,d);return;case`new-from-template`:if(!O||!a)return;a.startCreatingFromTemplate(d);return;case`rename`:if(!l)return;kB(l);return;case`duplicate`:if(!l)return;jB(l);return;case`move-to-trash`:if(!l)return;DB(l);return;case`reveal-in-finder`:{if(!D||!O)return;let e=rH(l,c,O);D.shell.showItemInFolder(e);return}case`open-in-terminal`:if(!D||!O)return;CB(D,iH(l,c,O));return;case`send-to-ai`:{let e=hm.filter(e=>k[e.id]?.installed===!0);if(e.length===0){Vo.error(r({id:`LKOLNn`}));return}let t=oH(l,c,O);if(!t)return;let[n]=e;if(!n)return;A(n.id,t);return}case`copy-full-path`:{if(!O)return;let e=rH(l,c,O);navigator.clipboard.writeText(e).then(()=>Vo.success(r({id:`6_ZOw4`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),Vo.error(r({id:`vfRlCI`}))});return}case`copy-relative-path`:{let e=aH(l,c);if(e===``){Vo.error(r({id:`74eHt-`}));return}navigator.clipboard.writeText(e).then(()=>Vo.success(r({id:`haHgQj`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),Vo.error(r({id:`5QGTaA`}))});return}case`toggle-show-hidden-files`:{if(P===null)return;let e=P.patch({appearance:{sidebar:{showHiddenFiles:!I}}});e.ok||(console.warn(`[FileSidebar] toggle-show-hidden-files rejected:`,lr(e.error)),Vo.error(r({id:`P47EWZ`}),{description:lr(e.error)}));return}case`toggle-show-all-files`:{if(P===null)return;let e=P.patch({appearance:{sidebar:{showAllFiles:!R}}});e.ok||(console.warn(`[FileSidebar] toggle-show-all-files rejected:`,lr(e.error)),Vo.error(r({id:`P47EWZ`}),{description:lr(e.error)}));return}case`expand-all-tree`:a?.expandAll();return;case`collapse-all-tree`:a?.collapseAll();return;case`delete`:case`toggle-sidebar`:case`toggle-source`:case`save-version`:case`version-history`:case`focus-search`:case`focus-command-palette`:return}})},ve=[D,a,O,l,c,d,P,I,R,k,A,r],t[43]=r,t[44]=c,t[45]=l,t[46]=A,t[47]=k,t[48]=d,t[49]=P,t[50]=R,t[51]=I,t[52]=a,t[53]=O,t[54]=_e,t[55]=ve):(_e=t[54],ve=t[55]),(0,Q.useEffect)(_e,ve);let ye=h&&`opacity-0`,be;t[56]===ye?be=t[57]:(be=vi(`flex-row h-12 items-center py-0 px-3`,f?`justify-end`:`justify-between`,f&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,ye,f&&`[-webkit-app-region:drag]`),t[56]=ye,t[57]=be);let xe;t[58]===m?xe=t[59]:(xe=m&&!f?(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-sm uppercase tracking-wider text-sidebar-foreground/50`,children:(0,Z.jsx)(s,{id:`sER-bs`})}):null,t[58]=m,t[59]=xe);let Se;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(Se=vi(`flex items-center gap-1`,f&&`[&>*]:[-webkit-app-region:no-drag]`),t[60]=Se):Se=t[60];let Ce;t[61]!==r||t[62]!==C||t[63]!==S||t[64]!==w||t[65]!==a?(Ce=S?(0,Z.jsxs)(Ca,{children:[(0,Z.jsx)(ga,{asChild:!0,children:(0,Z.jsx)(dH,{icon:Sc,label:r({id:`Lu_dOh`})})}),(0,Z.jsxs)(ta,{align:`end`,children:[C?null:(0,Z.jsxs)(oa,{onSelect:()=>a?.expandAll(),children:[(0,Z.jsx)(nl,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`b392Dr`})]}),w?null:(0,Z.jsxs)(oa,{onSelect:()=>a?.collapseAll(),children:[(0,Z.jsx)(fc,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`BBtVak`})]})]})]}):null,t[61]=r,t[62]=C,t[63]=S,t[64]=w,t[65]=a,t[66]=Ce):Ce=t[66];let we;t[67]===r?we=t[68]:(we=r({id:`MW64zN`}),t[67]=r,t[68]=we);let Te;t[69]!==d||t[70]!==a?(Te=()=>a?.startCreating(`file`,d),t[69]=d,t[70]=a,t[71]=Te):Te=t[71];let Ee;t[72]!==we||t[73]!==Te?(Ee=(0,Z.jsx)(dH,{icon:Jc,label:we,onClick:Te}),t[72]=we,t[73]=Te,t[74]=Ee):Ee=t[74];let De;t[75]!==r||t[76]!==E||t[77]!==d||t[78]!==a?(De=E?(0,Z.jsx)(dH,{icon:uc,label:r({id:`Uuj_R4`}),onClick:()=>a?.startCreatingFromTemplate(d)}):null,t[75]=r,t[76]=E,t[77]=d,t[78]=a,t[79]=De):De=t[79];let ke;t[80]===r?ke=t[81]:(ke=r({id:`tX5yOZ`}),t[80]=r,t[81]=ke);let Ae;t[82]!==d||t[83]!==a?(Ae=()=>a?.startCreating(`folder`,d),t[82]=d,t[83]=a,t[84]=Ae):Ae=t[84];let je;t[85]!==ke||t[86]!==Ae?(je=(0,Z.jsx)(dH,{icon:mc,label:ke,onClick:Ae}),t[85]=ke,t[86]=Ae,t[87]=je):je=t[87];let Me;t[88]!==Ce||t[89]!==Ee||t[90]!==De||t[91]!==je?(Me=(0,Z.jsxs)(`div`,{className:Se,children:[Ce,Ee,De,je]}),t[88]=Ce,t[89]=Ee,t[90]=De,t[91]=je,t[92]=Me):Me=t[92];let Ne;t[93]!==be||t[94]!==xe||t[95]!==Me?(Ne=(0,Z.jsxs)(lD,{"data-electron-drag":f?``:void 0,className:be,children:[xe,Me]}),t[93]=be,t[94]=xe,t[95]=Me,t[96]=Ne):Ne=t[96];let Pe=h&&`opacity-0`,Fe;t[97]===Pe?Fe=t[98]:(Fe=vi(`px-2 pb-2`,f&&`[-webkit-app-region:no-drag]`,f&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,Pe),t[97]=Pe,t[98]=Fe);let Ie;t[99]===p?Ie=t[100]:(Ie=[p],t[99]=p,t[100]=Ie);let Le;t[101]===n?Le=t[102]:(Le=(0,Z.jsx)($V,{onClick:n}),t[101]=n,t[102]=Le);let Re;t[103]!==Ie||t[104]!==Le?(Re=(0,Z.jsx)(z,{fallbackRender:pH,onError:QV,resetKeys:Ie,children:Le}),t[103]=Ie,t[104]=Le,t[105]=Re):Re=t[105];let ze;t[106]!==Fe||t[107]!==Re?(ze=(0,Z.jsx)(`div`,{className:Fe,children:Re}),t[106]=Fe,t[107]=Re,t[108]=ze):ze=t[108];let Be;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,Z.jsxs)(dD,{children:[(0,Z.jsx)(gk,{}),(0,Z.jsx)(bV,{ref:o})]}),t[109]=Be):Be=t[109];let Ve,Y;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,Z.jsxs)(uD,{className:`px-0`,children:[(0,Z.jsx)(nH,{}),typeof window<`u`&&window.okDesktop?(0,Z.jsx)(fD,{children:(0,Z.jsx)(pD,{children:(0,Z.jsx)(XV,{bridge:window.okDesktop})})}):null]}),Y=(0,Z.jsx)(sD,{enableToggle:!1}),t[110]=Ve,t[111]=Y):(Ve=t[110],Y=t[111]);let He;t[112]!==Ne||t[113]!==ze?(He=(0,Z.jsx)(bO,{asChild:!0,children:(0,Z.jsxs)(`div`,{className:`contents`,onContextMenu:U,children:[Ne,ze,Be,Ve,Y]})}),t[112]=Ne,t[113]=ze,t[114]=He):He=t[114];let Ue=!O,We,Ge;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,Z.jsx)(Jc,{"aria-hidden":`true`}),Ge=(0,Z.jsx)(s,{id:`MW64zN`}),t[115]=We,t[116]=Ge):(We=t[115],Ge=t[116]);let Ke;t[117]!==G||t[118]!==Ue?(Ke=(0,Z.jsxs)(CO,{disabled:Ue,onSelect:G,"data-testid":`empty-space-menu-new-file`,children:[We,Ge]}),t[117]=G,t[118]=Ue,t[119]=Ke):Ke=t[119];let qe=!O||!E,Je,Ye;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Z.jsx)(uc,{"aria-hidden":`true`}),Ye=(0,Z.jsx)(s,{id:`Uuj_R4`}),t[120]=Je,t[121]=Ye):(Je=t[120],Ye=t[121]);let Xe;t[122]!==ee||t[123]!==qe?(Xe=(0,Z.jsxs)(CO,{disabled:qe,onSelect:ee,"data-testid":`empty-space-menu-new-from-template`,children:[Je,Ye]}),t[122]=ee,t[123]=qe,t[124]=Xe):Xe=t[124];let Ze=!O,Qe,$e;t[125]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=(0,Z.jsx)(mc,{"aria-hidden":`true`}),$e=(0,Z.jsx)(s,{id:`tX5yOZ`}),t[125]=Qe,t[126]=$e):(Qe=t[125],$e=t[126]);let et;t[127]!==te||t[128]!==Ze?(et=(0,Z.jsxs)(CO,{disabled:Ze,onSelect:te,"data-testid":`empty-space-menu-new-folder`,children:[Qe,$e]}),t[127]=te,t[128]=Ze,t[129]=et):et=t[129];let tt;t[130]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,Z.jsx)(DO,{}),t[130]=tt):tt=t[130];let nt;t[131]!==r||t[132]!==re||t[133]!==O?(nt=D?(0,Z.jsxs)(CO,{disabled:!O,onSelect:re,"data-testid":`empty-space-menu-reveal-in-finder`,"aria-label":r(O?{id:`LtSYdi`}:{id:`o2yoFu`}),children:[(0,Z.jsx)(L,{"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`LtSYdi`})}),O?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`wTcjov`})})]}):null,t[131]=r,t[132]=re,t[133]=O,t[134]=nt):nt=t[134];let rt;t[135]!==A||t[136]!==M||t[137]!==k?(rt=(0,Z.jsx)(JV,{input:M,installStates:k,dispatch:A,webFallbackVisible:!1}),t[135]=A,t[136]=M,t[137]=k,t[138]=rt):rt=t[138];let it;t[139]!==r||t[140]!==ae||t[141]!==O?(it=D?(0,Z.jsxs)(CO,{disabled:!O,onSelect:ae,"data-testid":`empty-space-menu-open-in-terminal`,"aria-label":r(O?{id:`BJpGCq`}:{id:`_6IEmc`}),children:[(0,Z.jsx)($c,{"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`BJpGCq`})}),O?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`wTcjov`})})]}):null,t[139]=r,t[140]=ae,t[141]=O,t[142]=it):it=t[142];let at=!O,ot;t[143]!==r||t[144]!==O?(ot=r(O?{id:`Up2_7p`}:{id:`U8CD-l`}),t[143]=r,t[144]=O,t[145]=ot):ot=t[145];let st;t[146]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,Z.jsx)(Oe,{"aria-hidden":`true`}),t[146]=st):st=t[146];let ct;t[147]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`Up2_7p`})}),t[147]=ct):ct=t[147];let ut;t[148]===O?ut=t[149]:(ut=O?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(s,{id:`wTcjov`})}),t[148]=O,t[149]=ut);let dt;t[150]!==se||t[151]!==at||t[152]!==ot||t[153]!==ut?(dt=(0,Z.jsxs)(CO,{disabled:at,onSelect:se,"data-testid":`empty-space-menu-copy-full-path`,"aria-label":ot,children:[st,ct,ut]}),t[150]=se,t[151]=at,t[152]=ot,t[153]=ut,t[154]=dt):dt=t[154];let ft;t[155]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,Z.jsx)(DO,{}),t[155]=ft):ft=t[155];let pt=P===null,mt;t[156]===Symbol.for(`react.memo_cache_sentinel`)?(mt=(0,Z.jsx)(s,{id:`K_wz1u`}),t[156]=mt):mt=t[156];let ht;t[157]!==le||t[158]!==I||t[159]!==pt?(ht=(0,Z.jsx)(EO,{checked:I,onCheckedChange:le,disabled:pt,"data-testid":`empty-space-menu-show-hidden-files`,children:mt}),t[157]=le,t[158]=I,t[159]=pt,t[160]=ht):ht=t[160];let gt=P===null,_t;t[161]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,Z.jsx)(s,{id:`i8dKs-`}),t[161]=_t):_t=t[161];let vt;t[162]!==ue||t[163]!==R||t[164]!==gt?(vt=(0,Z.jsx)(EO,{checked:R,onCheckedChange:ue,disabled:gt,"data-testid":`empty-space-menu-show-all-files`,children:_t}),t[162]=ue,t[163]=R,t[164]=gt,t[165]=vt):vt=t[165];let yt;t[166]===H?yt=t[167]:(yt=H?(0,Z.jsx)(DO,{}):null,t[166]=H,t[167]=yt);let bt;t[168]!==fe||t[169]!==B?(bt=B?(0,Z.jsxs)(CO,{onSelect:fe,"data-testid":`empty-space-menu-expand-all`,children:[(0,Z.jsx)(nl,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`OlAl5i`})]}):null,t[168]=fe,t[169]=B,t[170]=bt):bt=t[170];let xt;t[171]!==me||t[172]!==V?(xt=V?(0,Z.jsxs)(CO,{onSelect:me,"data-testid":`empty-space-menu-collapse-all`,children:[(0,Z.jsx)(fc,{"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`qvWGzP`})]}):null,t[171]=me,t[172]=V,t[173]=xt):xt=t[173];let St;t[174]!==Ke||t[175]!==Xe||t[176]!==et||t[177]!==nt||t[178]!==rt||t[179]!==it||t[180]!==dt||t[181]!==ht||t[182]!==vt||t[183]!==yt||t[184]!==bt||t[185]!==xt?(St=(0,Z.jsxs)(SO,{children:[Ke,Xe,et,tt,nt,rt,it,dt,ft,ht,vt,yt,bt,xt]}),t[174]=Ke,t[175]=Xe,t[176]=et,t[177]=nt,t[178]=rt,t[179]=it,t[180]=dt,t[181]=ht,t[182]=vt,t[183]=yt,t[184]=bt,t[185]=xt,t[186]=St):St=t[186];let Ct;return t[187]!==He||t[188]!==St?(Ct=(0,Z.jsx)(aD,{variant:`inset`,children:(0,Z.jsxs)(yO,{children:[He,St]})}),t[187]=He,t[188]=St,t[189]=Ct):Ct=t[189],Ct}function pH(){return null}function mH(e){lH(e.target)&&(e.preventDefault(),e.stopPropagation())}function hH(){let e=(0,$.c)(17),t=gn(),{collabUrl:n,setSystemProvider:r,updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}=lt(),l;e[0]!==o||e[1]!==s||e[2]!==a||e[3]!==c||e[4]!==i?(l={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c},e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=i,e[5]=l):l=e[5];let d=(0,Q.useRef)(l),f;e[6]!==o||e[7]!==s||e[8]!==a||e[9]!==c||e[10]!==i?(f=()=>{d.current={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}},e[6]=o,e[7]=s,e[8]=a,e[9]=c,e[10]=i,e[11]=f):f=e[11],(0,Q.useEffect)(f);let p,m;return e[12]!==n||e[13]!==t||e[14]!==r?(p=()=>{if(n===null)return;let e=new u,i=new mt({url:n,name:gr,document:e,onStateless:e=>{let{payload:t}=e;G(t,{onServerInfo:e=>{d.current.updateServerInstanceId(e.serverInstanceId),e.currentBranch!==void 0&&d.current.observeBranch(e.currentBranch)},onBranchSwitched:e=>{d.current.onBranchSwitched(e.branch)},onDiskAck:e=>{d.current.observeDiskAck(e.docName,e.sv)},onDerivedView:xH,onConfigValidationRejected:bH,onConfigIgnoreNestedError:yH,onUnknown:vH})},onClose:_H,onDisconnect:gH}),a=fi(e=>{(e.includes(`files`)||e.includes(`backlinks`))&&(t.invalidateQueries({queryKey:[`backlinks`]}),t.invalidateQueries({queryKey:[`forward-links`]})),(e.includes(`files`)||e.includes(`graph`))&&(t.invalidateQueries({queryKey:[`orphans`]}),t.invalidateQueries({queryKey:[`hubs`]}))}),o=te(()=>{d.current.refreshServerInfo()});i.on(`synced`,()=>{yr([`files`,`backlinks`,`graph`]),o()});let s=new Set,c=()=>{if(i.awareness)for(let[e,t]of i.awareness.getStates().entries())s.has(e)||t.user?.type===`agent`&&(s.add(e),console.warn(`[agent-presence] observed stale AwarenessUser.type === 'agent' from clientID ${e} — probably a stale bundled client`))};return i.awareness?.on(`change`,c),r(i),()=>{a(),i.awareness?.off(`change`,c),r(null),i.destroy(),e.destroy()}},m=[t,n,r],e[12]=n,e[13]=t,e[14]=r,e[15]=p,e[16]=m):(p=e[15],m=e[16]),(0,Q.useEffect)(p,m),null}function gH(){console.warn(`[CC1] __system__ disconnected - derived views may be stale`)}function _H(e){let{event:t}=e;console.warn(`[CC1] __system__ connection closed:`,t.code,t.reason)}function vH(e){console.warn(`[CC1] Unparseable stateless payload, skipping:`,e.slice(0,100))}function yH(e){ro(e)}function bH(e){oo(e)}function xH(e){yr([e.ch])}var SH=`#install-claude-desktop`;function CH(e){return e===`#settings`||e===SH}function wH(e,t,n){return[e,t,n].map(e=>[...e].sort().join(`\0`)).join(``)}function TH(){let e=(0,$.c)(20),{clearTarget:t,syncOpenTabsWithKnownTargets:n,tabSessionLoaded:r}=lt(),{openTargetTransition:i}=xt(),{assetPaths:a,folderPaths:o,loading:s,pages:c}=ii(),l=(0,Q.useRef)(null),u;e[0]!==a||e[1]!==o||e[2]!==c?(u=wH(c,o,a),e[0]=a,e[1]=o,e[2]=c,e[3]=u):u=e[3];let d=u,f,p;e[4]!==a||e[5]!==o||e[6]!==s||e[7]!==c||e[8]!==n||e[9]!==r||e[10]!==d?(f=()=>{s||!r||l.current===d||(l.current=d,n({pages:c,folderPaths:o,assetPaths:a}))},p=[a,o,s,c,n,r,d],e[4]=a,e[5]=o,e[6]=s,e[7]=c,e[8]=n,e[9]=r,e[10]=d,e[11]=f,e[12]=p):(f=e[11],p=e[12]),(0,Q.useEffect)(f,p);let m,h;return e[13]!==t||e[14]!==o||e[15]!==s||e[16]!==i||e[17]!==c?(m=()=>{e();function e(){if(CH(window.location.hash))return;let e=Qr(window.location.hash);if(e){let t=kr(e.split(`.`).pop()??``);qe(`ok/nav/hash-change`,{docName:null,kind:`asset`}),i({kind:`asset`,target:e,assetPath:e,mediaKind:t});return}let n=Mr(window.location.hash);if(!n){qe(`ok/nav/hash-change`,{docName:null,kind:`clear`}),t();return}if(s){qe(`ok/nav/hash-change`,{docName:n,kind:`deferred-loading`});return}let r=Jr(n,{pages:c,folderPaths:o});if(r.kind===`missing`&&/\/+$/.test(n.trim())){qe(`ok/nav/hash-change`,{docName:n,kind:`deferred-missing-folder`});return}let a=Dr(r);qe(`ok/nav/hash-change`,{docName:n,kind:a.kind}),i(a)}return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},h=[t,o,s,i,c],e[13]=t,e[14]=o,e[15]=s,e[16]=i,e[17]=c,e[18]=m,e[19]=h):(m=e[18],h=e[19]),(0,Q.useEffect)(m,h),null}function EH(){let e=(0,$.c)(5),[t,n]=(0,Q.useState)(typeof window<`u`&&window.location.hash===SH),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=function(){window.location.hash===SH&&n(!0)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(e){if(n(e),!e&&window.location.hash===SH){let{pathname:e,search:t}=window.location;window.history.replaceState(null,``,`${e}${t}`)}},e[2]=a):a=e[2];let o=a,s;return e[3]===t?s=e[4]:(s=(0,Z.jsx)(ja,{open:t,onOpenChange:o}),e[3]=t,e[4]=s),s}function DH(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,Q.useEffect)(OH,t),null}function OH(){let e=function(e){let t=e.target;_m({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),window.location.hash!==`#settings`&&(window.location.hash=gm))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}function kH(){let e=(0,$.c)(4),{activeTarget:t}=lt(),n=typeof window<`u`?window.okDesktop??null:null,r=t?.kind===`doc`||t?.kind===`folder`?t.kind:null,i=t?.kind===`doc`?t.docName:t?.kind===`folder`?t.folderPath:null,a,o;return e[0]!==i||e[1]!==r?(a=()=>{if(n){if(r===null){n.editor.notifyActiveTargetChanged({kind:null});return}i!==null&&n.editor.notifyActiveTargetChanged({kind:r,identifier:i})}},o=[n,r,i],e[0]=i,e[1]=r,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,Q.useEffect)(a,o),null}function AH(){let e=(0,$.c)(8),{activeDocName:t,activeTarget:n}=lt(),[r,i]=(0,Q.useState)(!1),a;e[0]!==t||e[1]!==n?(a=n?.kind===`folder`?n.folderPath:Dn(t),e[0]=t,e[1]=n,e[2]=a):a=e[2];let o=a,s,c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=function(e){let t=e.target;Lp({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),i(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},c=[],e[3]=s,e[4]=c):(s=e[3],c=e[4]),(0,Q.useEffect)(s,c);let l;return e[5]!==r||e[6]!==o?(l=(0,Z.jsx)(zp,{open:r,onOpenChange:i,kind:`file`,initialDir:o}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}function jH(){let e=(0,$.c)(21),t=typeof window<`u`?window.okDesktop??null:null,n=typeof window<`u`&&window.okDesktop!=null,[r,i]=(0,Q.useState)(!1),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(null),l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=t?bl({bridge:t,authQueryTransport:wl(),cloneTransport:El(),openSignIn:()=>new Promise(e=>{c(()=>e),o(!0)})}):null,e[0]=l):l=e[0];let u=l,d;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Ph,{}),e[1]=d):d=e[1];let f,p,m,h,g,_,v,y;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(hH,{}),p=(0,Z.jsx)(TH,{}),m=(0,Z.jsx)(kH,{}),h=(0,Z.jsx)(AH,{}),g=(0,Z.jsx)(DH,{}),_=(0,Z.jsx)(EH,{}),v=(0,Z.jsx)(od,{}),y=t&&u?(0,Z.jsx)(yd,{bridge:t,cloneController:u}):null,e[2]=f,e[3]=p,e[4]=m,e[5]=h,e[6]=g,e[7]=_,e[8]=v,e[9]=y):(f=e[2],p=e[3],m=e[4],h=e[5],g=e[6],_=e[7],v=e[8],y=e[9]);let b;e[10]!==a||e[11]!==s?(b=t?(0,Z.jsx)(Ba,{open:a,onOpenChange:e=>{e||(o(!1),s?.(null),c(null))},onSuccess:e=>{s?.({authenticated:!0,host:`github.com`,login:e.login}),c(null)}}):null,e[10]=a,e[11]=s,e[12]=b):b=e[12];let x;e[13]===r?x=e[14]:(x=(0,Z.jsx)(Dh,{bridge:t,open:r,onOpenChange:i}),e[13]=r,e[14]=x);let S;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(S=n&&(0,Z.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`editor-window-chrome-drag-strip`,"data-electron-drag":``,className:`pointer-events-none fixed inset-x-0 top-0 z-50 h-2 [-webkit-app-region:drag]`}),e[15]=S):S=e[15];let C;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(uH,{onOpenSearch:()=>i(!0)}),e[16]=C):C=e[16];let w;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsxs)(nD,{className:`h-screen overflow-hidden`,children:[C,(0,Z.jsx)(cD,{className:`overflow-hidden h-[calc(100vh-var(--layout-inset-offset))]`,children:(0,Z.jsx)(mk,{})})]}),e[17]=w):w=e[17];let T;return e[18]!==b||e[19]!==x?(T=(0,Z.jsx)(Je,{name:`app`,children:(0,Z.jsx)(Dt,{children:(0,Z.jsxs)(vt,{children:[d,(0,Z.jsxs)(Br,{children:[f,p,m,h,g,_,v,y,b,x,S,w]})]})})}),e[18]=b,e[19]=x,e[20]=T):T=e[20],T}Ds(),typeof window<`u`&&window.okDesktop?.config.apiOrigin&&Hd({apiOrigin:window.okDesktop.config.apiOrigin}),uf()&&gf(),Wf(),typeof window<`u`&&qd({bridge:window.okDesktop}),typeof window<`u`&&$o({bridge:window.okDesktop}),typeof window<`u`&&Yo({bridge:window.okDesktop}),typeof window<`u`&&Xd({bridge:window.okDesktop}),typeof window<`u`&&vd({bridge:window.okDesktop});var MH=new Is({defaultOptions:{queries:{retry:1,staleTime:1e4}}}),NH=document.getElementById(`root`);if(!NH)throw Error(`Root element not found`);var PH=typeof window<`u`&&window.okDesktop?.config.mode===`navigator`;(0,Ks.createRoot)(NH).render((0,Z.jsx)(Q.StrictMode,{children:(0,Z.jsx)(a,{i18n:X,children:(0,Z.jsx)(cn,{client:MH,children:(0,Z.jsxs)(tr,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,storageKey:`ok-theme-v1`,children:[(0,Z.jsx)(Nr,{children:PH&&window.okDesktop?(0,Z.jsx)(Ld,{bridge:window.okDesktop}):(0,Z.jsx)(jH,{})}),(0,Z.jsx)(Vd,{richColors:!0,closeButton:!0})]})})})}));
|