@dylanpiercey/work 0.0.201 → 0.0.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -6
- package/bin/work.mjs +33 -1
- package/dist/_7W8iLTql.js +2 -0
- package/dist/{_BntJJ2eD.js → _B9FeLAO5.js} +863 -218
- package/dist/index.mjs +1051 -874
- package/dist/public/assets/_0LyBpSAp.js +1 -0
- package/dist/public/assets/{_CEKYlz0a.js → _1A5uKjN8.js} +1 -1
- package/dist/public/assets/_1A5uKjN8.js.br +0 -0
- package/dist/public/assets/_1qLkGZho.js +1 -0
- package/dist/public/assets/{_Dem8VmJt.js → _27978R3m.js} +1 -1
- package/dist/public/assets/_27978R3m.js.br +0 -0
- package/dist/public/assets/{_DTJl30hJ.js → _2edMheVg.js} +1 -1
- package/dist/public/assets/_2edMheVg.js.br +0 -0
- package/dist/public/assets/{_BubcBfAr.js → _4ZExxGH7.js} +1 -1
- package/dist/public/assets/_4ZExxGH7.js.br +0 -0
- package/dist/public/assets/{_BACT_fWM.js → _5_zD5lZ4.js} +1 -1
- package/dist/public/assets/_5_zD5lZ4.js.br +0 -0
- package/dist/public/assets/{_DKj8yOqM.js → _8FFPstMK.js} +1 -1
- package/dist/public/assets/_8FFPstMK.js.br +0 -0
- package/dist/public/assets/{_C4rxuku1.js → _9oZx5YJU.js} +1 -1
- package/dist/public/assets/_9oZx5YJU.js.br +0 -0
- package/dist/public/assets/_Ad5gg0gC.js +1 -0
- package/dist/public/assets/_B-4ye3W7.js +1 -0
- package/dist/public/assets/_B-S8CKDa.js +1 -0
- package/dist/public/assets/_B-S8CKDa.js.br +0 -0
- package/dist/public/assets/{_Dj8W5hAy.js → _B0Lw-cCo.js} +1 -1
- package/dist/public/assets/_B0Lw-cCo.js.br +0 -0
- package/dist/public/assets/_B0o7s1zn.js +1 -0
- package/dist/public/assets/_B354f-CP.js +1 -0
- package/dist/public/assets/{_BaxiLRDq.js → _B4--EZrg.js} +1 -1
- package/dist/public/assets/_B4--EZrg.js.br +0 -0
- package/dist/public/assets/_B4Y7MGuT.js +1 -0
- package/dist/public/assets/_B5uGx7HV.js +1 -0
- package/dist/public/assets/{_DtY8_Qtl.js → _B5yZABPj.js} +1 -1
- package/dist/public/assets/_B5yZABPj.js.br +0 -0
- package/dist/public/assets/{_oA-Vr8Cf.js → _B6BIIgNj.js} +1 -1
- package/dist/public/assets/_B6BIIgNj.js.br +0 -0
- package/dist/public/assets/{_8LHYZ0G8.js → _B6eFZbg2.js} +1 -1
- package/dist/public/assets/_B6eFZbg2.js.br +0 -0
- package/dist/public/assets/{_CcKsIH5h.js → _BBbgMQg3.js} +1 -1
- package/dist/public/assets/_BBbgMQg3.js.br +0 -0
- package/dist/public/assets/_BDuy978q.js +1 -0
- package/dist/public/assets/_BGvljRa2.js +1 -0
- package/dist/public/assets/{_fkTQCq_W.js → _BH6JT0zv.js} +1 -1
- package/dist/public/assets/_BH6JT0zv.js.br +0 -0
- package/dist/public/assets/{_oBcpaEKd.js → _BHxcuLms.js} +1 -1
- package/dist/public/assets/_BHxcuLms.js.br +0 -0
- package/dist/public/assets/{_BIY6vLu9.js → _BJn4etL5.js} +4 -4
- package/dist/public/assets/_BJn4etL5.js.br +0 -0
- package/dist/public/assets/{_D9nJ4nG1.js → _BLYUr4zr.js} +1 -1
- package/dist/public/assets/_BLYUr4zr.js.br +0 -0
- package/dist/public/assets/{_B0m_B4cy.js → _BMN5006U.js} +1 -1
- package/dist/public/assets/_BMN5006U.js.br +0 -0
- package/dist/public/assets/_BNLHELEB.js +1 -0
- package/dist/public/assets/_BNgBnHZi.js +1 -0
- package/dist/public/assets/{_tPOATR_S.js → _BPtS6AlD.js} +1 -1
- package/dist/public/assets/_BPtS6AlD.js.br +0 -0
- package/dist/public/assets/{_DqvnbtAR.js → _BT1EyKo4.js} +1 -1
- package/dist/public/assets/_BT1EyKo4.js.br +0 -0
- package/dist/public/assets/_BUpEOyhD.js +1 -0
- package/dist/public/assets/{_Opj7Hn0u.js → _BZ8P4EyI.js} +1 -1
- package/dist/public/assets/_BZ8P4EyI.js.br +0 -0
- package/dist/public/assets/{_Ci0fM4lS.js → _Bg_wpsdl.js} +1 -1
- package/dist/public/assets/_Bg_wpsdl.js.br +0 -0
- package/dist/public/assets/_Bh0MA2rr.js +1 -0
- package/dist/public/assets/{_0C7z67Qm.js → _BirlCtPu.js} +1 -1
- package/dist/public/assets/_BirlCtPu.js.br +7 -0
- package/dist/public/assets/_BlKrxbs9.js +1 -0
- package/dist/public/assets/{_B-Y1YuyQ.js → _BooHqm0j.js} +1 -1
- package/dist/public/assets/_BooHqm0j.js.br +0 -0
- package/dist/public/assets/_Bop-FIWB.js +1 -0
- package/dist/public/assets/_Bpm9z2QK.js +1 -0
- package/dist/public/assets/{_CSsQyHnz.js → _BrbOs2El.js} +1 -1
- package/dist/public/assets/_BrbOs2El.js.br +0 -0
- package/dist/public/assets/{_DQGEdzOn.js → _BsC2eLK9.js} +1 -1
- package/dist/public/assets/_BuLh_eCx.js +1 -0
- package/dist/public/assets/{_Clv6aVv7.js → _BvOtKfMA.js} +1 -1
- package/dist/public/assets/_BvOtKfMA.js.br +0 -0
- package/dist/public/assets/{_Ba1mrOxI.js → _C1YxfeT4.js} +1 -1
- package/dist/public/assets/_C1YxfeT4.js.br +0 -0
- package/dist/public/assets/_C1Z41ZOT.js +1 -0
- package/dist/public/assets/{_Be9c3c5k.js → _C3xw2ie7.js} +1 -1
- package/dist/public/assets/_C3xw2ie7.js.br +0 -0
- package/dist/public/assets/{_BwugFc4p.js → _C5WDQgft.js} +1 -1
- package/dist/public/assets/_C5WDQgft.js.br +0 -0
- package/dist/public/assets/{_4w6Dwjlh.js → _C5kNCPTr.js} +1 -1
- package/dist/public/assets/_C5kNCPTr.js.br +0 -0
- package/dist/public/assets/{_DZIuSdjQ.js → _C8-oTzqg.js} +1 -1
- package/dist/public/assets/_C8-oTzqg.js.br +0 -0
- package/dist/public/assets/_C8LKa1sz.js +1 -0
- package/dist/public/assets/{_BGPJXvZs.js → _C9FLULxr.js} +1 -1
- package/dist/public/assets/_C9FLULxr.js.br +0 -0
- package/dist/public/assets/_CA9S6UvK.js +1 -0
- package/dist/public/assets/_CDIpzj48.js +1 -0
- package/dist/public/assets/{_DVy22yDU.js → _CJ2ze_Xf.js} +1 -1
- package/dist/public/assets/_CJ2ze_Xf.js.br +0 -0
- package/dist/public/assets/{_B2k34w2U.js → _COWH3p1G.js} +1 -1
- package/dist/public/assets/_COWH3p1G.js.br +0 -0
- package/dist/public/assets/{_DMb-aGhT.js → _COhoKmvx.js} +1 -1
- package/dist/public/assets/_COhoKmvx.js.br +0 -0
- package/dist/public/assets/_CQWbHyrK.js +1 -0
- package/dist/public/assets/_CRM08pMs.js +1 -0
- package/dist/public/assets/_CYM_UKFm.js +1 -0
- package/dist/public/assets/{_TX0w8pNw.js → _CZGghR-O.js} +1 -1
- package/dist/public/assets/_CZGghR-O.js.br +0 -0
- package/dist/public/assets/_CcO4CEh4.js +1 -0
- package/dist/public/assets/{_C8hQ66UC.js → _CfWzAhd8.js} +1 -1
- package/dist/public/assets/_CfWzAhd8.js.br +0 -0
- package/dist/public/assets/_CgKljTdp.js +1 -0
- package/dist/public/assets/{_C2vaJoKP.js → _ChMsY6Je.js} +1 -1
- package/dist/public/assets/_ChMsY6Je.js.br +0 -0
- package/dist/public/assets/_CiUYqs0C.js +1 -0
- package/dist/public/assets/{_CgP5xz-S.js → _CjbLyVQW.js} +1 -1
- package/dist/public/assets/_CjbLyVQW.js.br +0 -0
- package/dist/public/assets/{_B4t3OJDi.js → _CmErIkxw.js} +1 -1
- package/dist/public/assets/_CmErIkxw.js.br +0 -0
- package/dist/public/assets/{_DFMu7qvY.js → _CpGOtLj9.js} +1 -1
- package/dist/public/assets/_CpGOtLj9.js.br +0 -0
- package/dist/public/assets/{_BSyVWzez.js → _CppbN7kq.js} +1 -1
- package/dist/public/assets/_CppbN7kq.js.br +0 -0
- package/dist/public/assets/_CrVJ_h5X.js +1 -0
- package/dist/public/assets/{_B9vNWNy5.js → _CslYE1lw.js} +1 -1
- package/dist/public/assets/_CslYE1lw.js.br +0 -0
- package/dist/public/assets/{_BWXbXLjv.js → _CvYqsy1w.js} +1 -1
- package/dist/public/assets/_CvYqsy1w.js.br +0 -0
- package/dist/public/assets/_Cw8CJ54z.js +1 -0
- package/dist/public/assets/{_B_DIXi0k.js → _CxCJpmHU.js} +1 -1
- package/dist/public/assets/_CxCJpmHU.js.br +0 -0
- package/dist/public/assets/{_BVgYEt31.js → _CxIrgloV.js} +1 -1
- package/dist/public/assets/_CxIrgloV.js.br +0 -0
- package/dist/public/assets/{_DxS6OhEn.js → _Cy8vYL75.js} +1 -1
- package/dist/public/assets/_Cy8vYL75.js.br +0 -0
- package/dist/public/assets/{_BfP8hsVl.js → _Cz4k9daX.js} +1 -1
- package/dist/public/assets/_CzQPZEEO.js +1 -0
- package/dist/public/assets/{_BFUZuxfB.js → _D-nWobWI.js} +1 -1
- package/dist/public/assets/_D-nWobWI.js.br +0 -0
- package/dist/public/assets/{_Btm6Fw4r.js → _D0IgxEpO.js} +1 -1
- package/dist/public/assets/_D0IgxEpO.js.br +0 -0
- package/dist/public/assets/_D0vgNMOE.js +1 -0
- package/dist/public/assets/{_DLQCOYuD.js → _D1sSxZ-J.js} +1 -1
- package/dist/public/assets/_D1sSxZ-J.js.br +0 -0
- package/dist/public/assets/{_MatnNE0E.js → _D2YCscEV.js} +1 -1
- package/dist/public/assets/_D2YCscEV.js.br +0 -0
- package/dist/public/assets/_D2kkzpcm.js +1 -0
- package/dist/public/assets/{_DyJiy6q7.js → _D3OQutZR.js} +1 -1
- package/dist/public/assets/_D3OQutZR.js.br +0 -0
- package/dist/public/assets/_D3SbByhI.js +1 -0
- package/dist/public/assets/{_DPtSJ35G.js → _D4QgPI4f.js} +1 -1
- package/dist/public/assets/_D4QgPI4f.js.br +0 -0
- package/dist/public/assets/_D4w7OPFI.js +1 -0
- package/dist/public/assets/_D7Z9Twmw.js +1 -0
- package/dist/public/assets/_D8Neqmo3.js +1 -0
- package/dist/public/assets/{_2jMrHLFD.js → _DCQandLH.js} +1 -1
- package/dist/public/assets/_DCQandLH.js.br +0 -0
- package/dist/public/assets/{_BsM6FL0G.js → _DD3b0lJq.js} +1 -1
- package/dist/public/assets/_DD3b0lJq.js.br +0 -0
- package/dist/public/assets/_DDsTXbIv.js +1 -0
- package/dist/public/assets/_DDsTXbIv.js.br +0 -0
- package/dist/public/assets/{_C7NJXs7I.js → _DEQ6GDV1.js} +1 -1
- package/dist/public/assets/_DEQ6GDV1.js.br +0 -0
- package/dist/public/assets/_DES7Q6-F.js +1 -0
- package/dist/public/assets/{_C6u-Srqk.js → _DGek55jx.js} +1 -1
- package/dist/public/assets/_DGek55jx.js.br +0 -0
- package/dist/public/assets/{_P1g2Hmou.js → _DK3CoQmT.js} +1 -1
- package/dist/public/assets/_DK3CoQmT.js.br +0 -0
- package/dist/public/assets/_DLBtxMjn.js +1 -0
- package/dist/public/assets/{_CNG8WwTi.js → _DLcZX64F.js} +1 -1
- package/dist/public/assets/_DLdZN73c.js +1 -0
- package/dist/public/assets/{_DqzA5hgG.js → _DN6hN8Jl.js} +1 -1
- package/dist/public/assets/_DN6hN8Jl.js.br +0 -0
- package/dist/public/assets/{_CD9reWft.js → _DOF6orvN.js} +1 -1
- package/dist/public/assets/_DOF6orvN.js.br +0 -0
- package/dist/public/assets/_DOdmnMrT.js +86 -0
- package/dist/public/assets/_DOdmnMrT.js.br +0 -0
- package/dist/public/assets/{_RA0df7Za.js → _DQhHCH72.js} +1 -1
- package/dist/public/assets/{_BqoWO0Lt.js → _DVSW8udP.js} +1 -1
- package/dist/public/assets/_DVSW8udP.js.br +0 -0
- package/dist/public/assets/{_DvW_OT8c.js → _DVU23VzS.js} +1 -1
- package/dist/public/assets/_DVU23VzS.js.br +0 -0
- package/dist/public/assets/_DVkuYZCr.js +6 -0
- package/dist/public/assets/_DVkuYZCr.js.br +0 -0
- package/dist/public/assets/{_CLSP-PhQ.js → _DZ7xeQB-.js} +1 -1
- package/dist/public/assets/_DZ7xeQB-.js.br +0 -0
- package/dist/public/assets/_DZTrB9Qn.js +1 -0
- package/dist/public/assets/_DZTrB9Qn.js.br +0 -0
- package/dist/public/assets/{_BLMA7nPf.js → _Dbe2W2ND.js} +1 -1
- package/dist/public/assets/_Dbe2W2ND.js.br +0 -0
- package/dist/public/assets/{_Ckc7dIlo.js → _Dd7aAq-X.js} +1 -1
- package/dist/public/assets/_Dd7aAq-X.js.br +0 -0
- package/dist/public/assets/{_1ROJt5O3.js → _DdHifLBM.js} +1 -1
- package/dist/public/assets/_DdHifLBM.js.br +0 -0
- package/dist/public/assets/_DdaEtq32.js +1 -0
- package/dist/public/assets/{_rd-8foIp.js → _DfJWbnsb.js} +1 -1
- package/dist/public/assets/_DfJWbnsb.js.br +0 -0
- package/dist/public/assets/{_DAVXBkYN.js → _DjkBEN6c.js} +1 -1
- package/dist/public/assets/_DjkBEN6c.js.br +0 -0
- package/dist/public/assets/_DlObQpDy.js +1 -0
- package/dist/public/assets/{_CwXTg1fU.js → _DlV6If1a.js} +1 -1
- package/dist/public/assets/_DlV6If1a.js.br +0 -0
- package/dist/public/assets/_DnQ809aW.js +1 -0
- package/dist/public/assets/_Dnixxpke.js +1 -0
- package/dist/public/assets/_DoAqgIm7.js +1 -0
- package/dist/public/assets/{_DiBlTRgB.js → _Dp0ugpas.js} +1 -1
- package/dist/public/assets/_Dp0ugpas.js.br +0 -0
- package/dist/public/assets/{_B23autIT.js → _Dr8ml38v.js} +1 -1
- package/dist/public/assets/{_og2j-mr5.js → _DvsAtbXL.js} +1 -1
- package/dist/public/assets/_DvsAtbXL.js.br +0 -0
- package/dist/public/assets/{_PwtpBaMf.js → _DwFUz6Xc.js} +1 -1
- package/dist/public/assets/_DwFUz6Xc.js.br +1 -0
- package/dist/public/assets/_DwHwlYlo.js +1 -0
- package/dist/public/assets/{_Bg1dyEQN.js → _DwWg5-yH.js} +1 -1
- package/dist/public/assets/_DwWg5-yH.js.br +0 -0
- package/dist/public/assets/_DwdPKQ6r.js +9 -0
- package/dist/public/assets/_DwdPKQ6r.js.br +0 -0
- package/dist/public/assets/_DzWUbOIO.js +1 -0
- package/dist/public/assets/_EehP87eB.js +1 -0
- package/dist/public/assets/_FqtItJvl.js +1 -0
- package/dist/public/assets/{_Dr6eQaDf.js → _GTCkP1pw.js} +1 -1
- package/dist/public/assets/_GTCkP1pw.js.br +0 -0
- package/dist/public/assets/_KuTEV_ft.js +1 -0
- package/dist/public/assets/_Kvv0wK3N.js +1 -0
- package/dist/public/assets/_MYIZvayM.js +1 -0
- package/dist/public/assets/_P3FkW3rc.js +1 -0
- package/dist/public/assets/_Pmka75Ac.js +1 -0
- package/dist/public/assets/_S1XOCK-_.js +1 -0
- package/dist/public/assets/{_vSKAFeTh.js → _VTdgQApy.js} +1 -1
- package/dist/public/assets/_VTdgQApy.js.br +0 -0
- package/dist/public/assets/{_DaSvMIzg.js → _VmDq58nH.js} +2 -2
- package/dist/public/assets/_VmDq58nH.js.br +0 -0
- package/dist/public/assets/{_Bc_Ezk5L.js → _XHldBTre.js} +1 -1
- package/dist/public/assets/_XHldBTre.js.br +0 -0
- package/dist/public/assets/{_Crcj75Rn.js → _XYWgiNRI.js} +1 -1
- package/dist/public/assets/_XYWgiNRI.js.br +0 -0
- package/dist/public/assets/_ZUk8VFzw.js +1 -0
- package/dist/public/assets/{_DeqN8IUm.js → _bw4eF0Pd.js} +1 -1
- package/dist/public/assets/_bw4eF0Pd.js.br +0 -0
- package/dist/public/assets/_cVW5OxoX.js +1 -0
- package/dist/public/assets/_cwhmIIQq.js +1 -0
- package/dist/public/assets/_dv2gxFG9.js +1 -0
- package/dist/public/assets/{_DPT6ZO90.js → _ffrrcZHB.js} +1 -1
- package/dist/public/assets/_ffrrcZHB.js.br +0 -0
- package/dist/public/assets/{_Cgv_vb21.js → _itKhXiEn.js} +1 -1
- package/dist/public/assets/_itKhXiEn.js.br +0 -0
- package/dist/public/assets/_jZWhO7XK.js +1 -0
- package/dist/public/assets/{_CgUj7qP_.js → _lI81U7zm.js} +1 -1
- package/dist/public/assets/_lI81U7zm.js.br +0 -0
- package/dist/public/assets/{_-dqzO7S_.js → _mzabRm9a.js} +1 -1
- package/dist/public/assets/_mzabRm9a.js.br +0 -0
- package/dist/public/assets/{_B7pXsDiF.js → _nckb1bc5.js} +1 -1
- package/dist/public/assets/_nckb1bc5.js.br +0 -0
- package/dist/public/assets/{_BX4xzjKF.js → _pFf5fxSt.js} +1 -1
- package/dist/public/assets/_pFf5fxSt.js.br +0 -0
- package/dist/public/assets/{_CT9R7V5L.js → _tmSPJWly.js} +1 -1
- package/dist/public/assets/_tmSPJWly.js.br +0 -0
- package/dist/public/assets/_vTPEvyHb.js +1 -0
- package/dist/public/assets/_wkLZXo2a.js +1 -0
- package/dist/public/assets/{_hI9Uq04u.js → _xe05NvyT.js} +1 -1
- package/dist/public/assets/_zCc28sXY.js +1 -0
- package/dist/public/assets/{app-page-CyU0ft_x.css → app-page-B3uxDwW8.css} +1 -1
- package/dist/public/assets/app-page-B3uxDwW8.css.br +0 -0
- package/dist/public/assets/{command-palette-BgUVS5fJ.css → command-palette-BKFO5yNz.css} +1 -1
- package/dist/public/assets/command-palette-BKFO5yNz.css.br +0 -0
- package/dist/public/assets/files-view-BmoZqRfk.css +1 -0
- package/dist/public/assets/files-view-BmoZqRfk.css.br +0 -0
- package/dist/public/assets/files-view-DMvWByLT.js +2 -0
- package/dist/public/assets/group.css.ts-DkHzYLC_.css +1 -0
- package/dist/public/assets/group.css.ts-DkHzYLC_.css.br +0 -0
- package/dist/public/assets/{icon-search-Cslr912D.css → icon-search-DcAn99Uv.css} +1 -1
- package/dist/public/assets/icon-search-DcAn99Uv.css.br +0 -0
- package/dist/public/assets/key-bar.css.ts-Brsaaphs.css +1 -0
- package/dist/public/assets/key-bar.css.ts-Brsaaphs.css.br +0 -0
- package/dist/public/assets/manage-workspace-CG1L1AIj.css +1 -0
- package/dist/public/assets/manage-workspace-Dde75y4Y.js +2 -0
- package/dist/public/assets/{modal-view-C0q2p23m.css → modal-view-B53laKnF.css} +1 -1
- package/dist/public/assets/modal-view-B53laKnF.css.br +0 -0
- package/dist/public/assets/new-DR_SAB-w.js +1 -0
- package/dist/public/assets/new-workspace-B0jMD3hx.css +1 -0
- package/dist/public/assets/new-workspace-B0jMD3hx.css.br +0 -0
- package/dist/public/assets/new-workspace-B58TTumC.js +2 -0
- package/dist/public/assets/port-chip-B50FPCUq.css +1 -0
- package/dist/public/assets/port-chip-B50FPCUq.css.br +0 -0
- package/dist/public/assets/prompt-dialog-Byg2Vsyu.css +1 -0
- package/dist/public/assets/prompt-dialog-Byg2Vsyu.css.br +0 -0
- package/dist/public/assets/{quick-open-Diva1_qC.css → quick-open-b_qU9L2I.css} +1 -1
- package/dist/public/assets/quick-open-b_qU9L2I.css.br +0 -0
- package/dist/public/assets/repo-picker-CusW9u6R.css +1 -0
- package/dist/public/assets/repo-picker-CusW9u6R.css.br +0 -0
- package/dist/public/assets/review-view-BamVDW2A.js +2 -0
- package/dist/public/assets/review-view-CQMqAe8-.css +1 -0
- package/dist/public/assets/review-view-CQMqAe8-.css.br +0 -0
- package/dist/public/assets/{section-iG3mkmoF.css → section-CM21Ts_U.css} +1 -1
- package/dist/public/assets/section-CM21Ts_U.css.br +0 -0
- package/dist/public/assets/settings-DR_SAB-w.js +1 -0
- package/dist/public/assets/settings-page-B9mxToFZ.js +2 -0
- package/dist/public/assets/settings-page-D5ziBZ7g.css +1 -0
- package/dist/public/assets/settings-page-D5ziBZ7g.css.br +0 -0
- package/dist/public/assets/skill-row-ChQm9ooq.css +1 -0
- package/dist/public/assets/sso-auth-B8H1Ip7_.css +1 -0
- package/dist/public/assets/sso-auth-B8H1Ip7_.css.br +0 -0
- package/dist/public/assets/w-DR_SAB-w.js +1 -0
- package/dist/public/assets/w._-BGuHF20H.js +1 -0
- package/dist/public/assets/w._-DR_SAB-w.js +1 -0
- package/dist/public/assets/w._-DdmIl-uS.js +1 -0
- package/dist/public/badge-96.png +0 -0
- package/dist/public/sw.js +51 -7
- package/dist/public/sw.js.br +0 -0
- package/lib/setup/agents.json +4 -1
- package/package.json +1 -1
- package/scripts/migrate.mjs +27 -0
- package/dist/_V3gojze9.js +0 -2
- package/dist/public/assets/_-dqzO7S_.js.br +0 -0
- package/dist/public/assets/_0C7z67Qm.js.br +0 -9
- package/dist/public/assets/_1ROJt5O3.js.br +0 -0
- package/dist/public/assets/_1XZR3z1L.js +0 -1
- package/dist/public/assets/_2jMrHLFD.js.br +0 -0
- package/dist/public/assets/_4w6Dwjlh.js.br +0 -0
- package/dist/public/assets/_7qQCv119.js +0 -1
- package/dist/public/assets/_8LHYZ0G8.js.br +0 -0
- package/dist/public/assets/_9lyEjkvB.js +0 -1
- package/dist/public/assets/_ATtSGU4R.js +0 -1
- package/dist/public/assets/_B-Y1YuyQ.js.br +0 -0
- package/dist/public/assets/_B0m_B4cy.js.br +0 -0
- package/dist/public/assets/_B2k34w2U.js.br +0 -0
- package/dist/public/assets/_B2r0KxkM.js +0 -1
- package/dist/public/assets/_B4t3OJDi.js.br +0 -0
- package/dist/public/assets/_B6XD8a0B.js +0 -1
- package/dist/public/assets/_B6XD8a0B.js.br +0 -0
- package/dist/public/assets/_B7pXsDiF.js.br +0 -0
- package/dist/public/assets/_B9vNWNy5.js.br +0 -0
- package/dist/public/assets/_BACT_fWM.js.br +0 -0
- package/dist/public/assets/_BD9DXti2.js +0 -1
- package/dist/public/assets/_BFUZuxfB.js.br +0 -0
- package/dist/public/assets/_BGPJXvZs.js.br +0 -0
- package/dist/public/assets/_BHPRD7wn.js +0 -1
- package/dist/public/assets/_BIY6vLu9.js.br +0 -0
- package/dist/public/assets/_BIqT1F8o.js +0 -1
- package/dist/public/assets/_BKPR7Exm.js +0 -1
- package/dist/public/assets/_BLMA7nPf.js.br +0 -0
- package/dist/public/assets/_BMG0X0XF.js +0 -1
- package/dist/public/assets/_BPX5CxjX.js +0 -1
- package/dist/public/assets/_BS9oCUE0.js +0 -1
- package/dist/public/assets/_BSSpkgu8.js +0 -1
- package/dist/public/assets/_BSyVWzez.js.br +0 -0
- package/dist/public/assets/_BVelHN7q.js +0 -1
- package/dist/public/assets/_BVgYEt31.js.br +0 -0
- package/dist/public/assets/_BWXbXLjv.js.br +0 -0
- package/dist/public/assets/_BX4xzjKF.js.br +0 -0
- package/dist/public/assets/_BXdWjkI5.js +0 -1
- package/dist/public/assets/_B_DIXi0k.js.br +0 -0
- package/dist/public/assets/_Ba1mrOxI.js.br +0 -0
- package/dist/public/assets/_BaxiLRDq.js.br +0 -0
- package/dist/public/assets/_Bc_Ezk5L.js.br +0 -0
- package/dist/public/assets/_Be9c3c5k.js.br +0 -0
- package/dist/public/assets/_BeNkN5H0.js +0 -1
- package/dist/public/assets/_Bg1dyEQN.js.br +0 -0
- package/dist/public/assets/_Bi9nBUKQ.js +0 -1
- package/dist/public/assets/_BmB3qu5w.js +0 -1
- package/dist/public/assets/_BpyT0ApF.js +0 -1
- package/dist/public/assets/_BqA4Q1j3.js +0 -1
- package/dist/public/assets/_BqoWO0Lt.js.br +0 -0
- package/dist/public/assets/_BsM6FL0G.js.br +0 -0
- package/dist/public/assets/_Btm6Fw4r.js.br +0 -0
- package/dist/public/assets/_BubcBfAr.js.br +0 -0
- package/dist/public/assets/_BvKUsWT1.js +0 -1
- package/dist/public/assets/_BwugFc4p.js.br +0 -0
- package/dist/public/assets/_BxlXGcbO.js +0 -1
- package/dist/public/assets/_Byer70eB.js +0 -1
- package/dist/public/assets/_C0udqXoV.js +0 -1
- package/dist/public/assets/_C1a168fm.js +0 -1
- package/dist/public/assets/_C1x7pcqW.js +0 -1
- package/dist/public/assets/_C2vaJoKP.js.br +0 -0
- package/dist/public/assets/_C3uAjjk3.js +0 -1
- package/dist/public/assets/_C4rxuku1.js.br +0 -0
- package/dist/public/assets/_C6KQjdMM.js +0 -1
- package/dist/public/assets/_C6u-Srqk.js.br +0 -0
- package/dist/public/assets/_C7NJXs7I.js.br +0 -0
- package/dist/public/assets/_C8hQ66UC.js.br +0 -0
- package/dist/public/assets/_CAB7vlnJ.js +0 -1
- package/dist/public/assets/_CASEbE0K.js +0 -86
- package/dist/public/assets/_CASEbE0K.js.br +0 -0
- package/dist/public/assets/_CD9reWft.js.br +0 -0
- package/dist/public/assets/_CEKYlz0a.js.br +0 -0
- package/dist/public/assets/_CEj4Mwc1.js +0 -1
- package/dist/public/assets/_CI6Hg_A9.js +0 -1
- package/dist/public/assets/_CIFyxofO.js +0 -1
- package/dist/public/assets/_CKxJlwEy.js +0 -1
- package/dist/public/assets/_CLSP-PhQ.js.br +0 -0
- package/dist/public/assets/_CPzscDEb.js +0 -1
- package/dist/public/assets/_CQLI-En1.js +0 -1
- package/dist/public/assets/_CSsQyHnz.js.br +0 -0
- package/dist/public/assets/_CT9R7V5L.js.br +0 -0
- package/dist/public/assets/_CYk469iO.js +0 -1
- package/dist/public/assets/_CZ5Fi642.js +0 -1
- package/dist/public/assets/_CZ5Fi642.js.br +0 -0
- package/dist/public/assets/_C_5HKb42.js +0 -9
- package/dist/public/assets/_C_5HKb42.js.br +0 -0
- package/dist/public/assets/_CcKsIH5h.js.br +0 -0
- package/dist/public/assets/_Ce4nsqo2.js +0 -6
- package/dist/public/assets/_Ce4nsqo2.js.br +0 -0
- package/dist/public/assets/_Cf4gqSQz.js +0 -1
- package/dist/public/assets/_CgP5xz-S.js.br +0 -0
- package/dist/public/assets/_CgUj7qP_.js.br +0 -0
- package/dist/public/assets/_Cgv_vb21.js.br +0 -0
- package/dist/public/assets/_Ci0fM4lS.js.br +0 -0
- package/dist/public/assets/_Ckc7dIlo.js.br +0 -0
- package/dist/public/assets/_Clv6aVv7.js.br +0 -0
- package/dist/public/assets/_CqkTkgJB.js +0 -1
- package/dist/public/assets/_Crcj75Rn.js.br +0 -0
- package/dist/public/assets/_CuGgpK2u.js +0 -1
- package/dist/public/assets/_CuVmBZbd.js +0 -1
- package/dist/public/assets/_Cw8c7j2h.js +0 -1
- package/dist/public/assets/_CwXTg1fU.js.br +0 -0
- package/dist/public/assets/_D6fhoYuY.js +0 -1
- package/dist/public/assets/_D9nJ4nG1.js.br +0 -0
- package/dist/public/assets/_DAVXBkYN.js.br +0 -0
- package/dist/public/assets/_DDQhJR3T.js +0 -1
- package/dist/public/assets/_DFMu7qvY.js.br +0 -0
- package/dist/public/assets/_DKj8yOqM.js.br +0 -0
- package/dist/public/assets/_DLQCOYuD.js.br +0 -0
- package/dist/public/assets/_DMb-aGhT.js.br +0 -0
- package/dist/public/assets/_DOghH8Tl.js +0 -1
- package/dist/public/assets/_DPT6ZO90.js.br +0 -0
- package/dist/public/assets/_DPtSJ35G.js.br +0 -0
- package/dist/public/assets/_DTJl30hJ.js.br +0 -0
- package/dist/public/assets/_DTcQCcgk.js +0 -1
- package/dist/public/assets/_DVy22yDU.js.br +0 -0
- package/dist/public/assets/_DWyu89Hi.js +0 -1
- package/dist/public/assets/_DZIuSdjQ.js.br +0 -0
- package/dist/public/assets/_DaSvMIzg.js.br +0 -0
- package/dist/public/assets/_DbZpXQPs.js +0 -1
- package/dist/public/assets/_Dd3TMJAY.js +0 -1
- package/dist/public/assets/_Dem8VmJt.js.br +0 -0
- package/dist/public/assets/_DeqN8IUm.js.br +0 -0
- package/dist/public/assets/_DfrEESyG.js +0 -1
- package/dist/public/assets/_DiBlTRgB.js.br +0 -0
- package/dist/public/assets/_Dj8W5hAy.js.br +0 -0
- package/dist/public/assets/_DmehuAAq.js +0 -1
- package/dist/public/assets/_DmehuAAq.js.br +0 -0
- package/dist/public/assets/_DoTqr-WV.js +0 -1
- package/dist/public/assets/_DqvnbtAR.js.br +0 -0
- package/dist/public/assets/_DqzA5hgG.js.br +0 -0
- package/dist/public/assets/_Dr6eQaDf.js.br +0 -0
- package/dist/public/assets/_DtY8_Qtl.js.br +0 -0
- package/dist/public/assets/_Dv8p2zgH.js +0 -1
- package/dist/public/assets/_DvW_OT8c.js.br +0 -0
- package/dist/public/assets/_DxS6OhEn.js.br +0 -0
- package/dist/public/assets/_DyJiy6q7.js.br +0 -0
- package/dist/public/assets/_FC28AlBj.js +0 -1
- package/dist/public/assets/_MatnNE0E.js.br +0 -0
- package/dist/public/assets/_N0oP21xr.js +0 -1
- package/dist/public/assets/_Opj7Hn0u.js.br +0 -0
- package/dist/public/assets/_P1g2Hmou.js.br +0 -0
- package/dist/public/assets/_PwtpBaMf.js.br +0 -0
- package/dist/public/assets/_TX0w8pNw.js.br +0 -0
- package/dist/public/assets/_ZHFqgS6H.js +0 -1
- package/dist/public/assets/_awhwVzn2.js +0 -1
- package/dist/public/assets/_bcmbsCHv.js +0 -1
- package/dist/public/assets/_cX3i7NsL.js +0 -1
- package/dist/public/assets/_fkTQCq_W.js.br +0 -0
- package/dist/public/assets/_h4esEJW5.js +0 -1
- package/dist/public/assets/_kxgPx4kL.js +0 -1
- package/dist/public/assets/_naTBruJS.js +0 -1
- package/dist/public/assets/_oA-Vr8Cf.js.br +0 -0
- package/dist/public/assets/_oBcpaEKd.js.br +0 -0
- package/dist/public/assets/_og2j-mr5.js.br +0 -0
- package/dist/public/assets/_qI-Bm0LQ.js +0 -1
- package/dist/public/assets/_rd-8foIp.js.br +0 -0
- package/dist/public/assets/_sQjKpNXF.js +0 -1
- package/dist/public/assets/_tPOATR_S.js.br +0 -0
- package/dist/public/assets/_vSKAFeTh.js.br +0 -0
- package/dist/public/assets/_yUTKWdFy.js +0 -1
- package/dist/public/assets/app-page-CyU0ft_x.css.br +0 -0
- package/dist/public/assets/command-palette-BgUVS5fJ.css.br +0 -0
- package/dist/public/assets/files-view-68OApH0T.css +0 -1
- package/dist/public/assets/files-view-68OApH0T.css.br +0 -0
- package/dist/public/assets/files-view-CK0sC8sL.js +0 -2
- package/dist/public/assets/group.css.ts-bSDNRl7w.css +0 -1
- package/dist/public/assets/group.css.ts-bSDNRl7w.css.br +0 -0
- package/dist/public/assets/icon-search-Cslr912D.css.br +0 -0
- package/dist/public/assets/key-bar.css.ts-Bku3uER9.css +0 -1
- package/dist/public/assets/key-bar.css.ts-Bku3uER9.css.br +0 -0
- package/dist/public/assets/manage-workspace-Cp4MnvNw.js +0 -2
- package/dist/public/assets/manage-workspace-EFWH7-Cv.css +0 -1
- package/dist/public/assets/modal-view-C0q2p23m.css.br +0 -0
- package/dist/public/assets/new-BHVoRMDD.js +0 -1
- package/dist/public/assets/new-workspace-ChGmqibN.css +0 -1
- package/dist/public/assets/new-workspace-ChGmqibN.css.br +0 -0
- package/dist/public/assets/new-workspace-TC9V3qGi.js +0 -2
- package/dist/public/assets/port-chip-DefDqlaR.css +0 -1
- package/dist/public/assets/port-chip-DefDqlaR.css.br +0 -0
- package/dist/public/assets/prompt-dialog-CJDGPwkv.css +0 -1
- package/dist/public/assets/prompt-dialog-CJDGPwkv.css.br +0 -0
- package/dist/public/assets/quick-open-Diva1_qC.css.br +0 -0
- package/dist/public/assets/repo-picker-CpKpWL1n.css +0 -1
- package/dist/public/assets/repo-picker-CpKpWL1n.css.br +0 -0
- package/dist/public/assets/review-view-CFzk48_R.js +0 -2
- package/dist/public/assets/review-view-CgJv3K8t.css +0 -1
- package/dist/public/assets/review-view-CgJv3K8t.css.br +0 -0
- package/dist/public/assets/section-iG3mkmoF.css.br +0 -0
- package/dist/public/assets/settings-BHVoRMDD.js +0 -1
- package/dist/public/assets/settings-page-SZbATvFs.js +0 -2
- package/dist/public/assets/settings-page-lzx2uvfg.css +0 -1
- package/dist/public/assets/settings-page-lzx2uvfg.css.br +0 -0
- package/dist/public/assets/skill-row-bJ0ycL8_.css +0 -1
- package/dist/public/assets/sso-auth-hsN6VJBq.css +0 -1
- package/dist/public/assets/sso-auth-hsN6VJBq.css.br +0 -4
- package/dist/public/assets/w-BHVoRMDD.js +0 -1
- package/dist/public/assets/w._-BHVoRMDD.js +0 -1
- package/dist/public/assets/w._-Cwa3FQTr.js +0 -1
- package/dist/public/assets/w._-XzA5CKe1.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
2
|
-
import{C as e,M as t,N as n,T as r,j as i,n as a,t as o}from"./_B6XD8a0B.js";import{B as s,F as c,G as l,I as u,K as d,L as f,O as p,P as m,R as h,S as g,U as _,V as v,a as y,b,d as x,i as S,q as C,t as w,u as T,x as E,y as D,z as O}from"./_772AjyQx.js";import{C as k,E as A,Ht as ee,N as j,O as te,S as M,Sn as ne,T as re,V as ie,Vt as ae,W as oe,Wt as se,Z as ce,_ as le,_t as ue,a as de,b as fe,bn as pe,ht as me,i as he,n as ge,r as _e,t as ve,tn as ye,v as be,vt as xe,w as Se,wn as Ce,wt as we,x as Te,y as Ee}from"./_C7NJXs7I.js";import{_ as De,c as Oe,d as N,f as ke,g as Ae,h as je,i as Me,l as Ne,m as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze,u as Be}from"./_Cgv_vb21.js";import{_ as Ve,g as He,h as Ue,k as We,n as Ge,v as Ke}from"./_DeqN8IUm.js";import{a as qe,c as Je,d as Ye,f as Xe,i as Ze,l as Qe,n as $e,o as et,p as tt,r as nt,s as rt,t as it,u as at}from"./_DqzA5hgG.js";import{t as ot}from"./_CcFCI5Av.js";import{a as st,i as ct,n as lt,o as ut,r as dt,t as P}from"./_hI9Uq04u.js";import{a as F,i as ft,n as pt,r as mt,t as ht}from"./_C0udqXoV.js";var gt=`diffs-container`,_t=(()=>{try{return!1}catch{return!1}})(),vt=/(?=^From [a-f0-9]+ .+$)/m,yt=/(?=^diff --git)/gm,bt=/(?<=\n)/,xt=/^(---|\+\+\+)\s+([^\t\r\n]+)/,St=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Ct=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,wt=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Tt=`header-prefix`,Et=`header-filename-suffix`,Dt=`header-metadata`,Ot=`header-custom`,I={dark:`pierre-dark`,light:`pierre-light`},kt=`data-theme-css`,At=`data-unsafe-css`,jt=`data-diffs-scrollbar-measure`,Mt=`data-diffs-code-view-header`,Nt=`data-diffs-code-view-footer`,Pt=`--diffs-scrollbar-gutter-measured`,Ft=1e5,It={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},Lt={...It,hunkLineCount:1},Rt={paddingTop:8,paddingBottom:8,gap:8},zt={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},Bt=Object.freeze({fromStart:0,fromEnd:0}),Vt={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ht={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ut=new Map,Wt=new Map,Gt=new Map,Kt=new Set;function qt(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Kt.has(t))return!1;return!0}function Jt(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Kt.has(n.name))continue;let e=Ut.get(n.name);e??(e=n,Ut.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}Kt.add(e.name)}}function Yt(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Xt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Qt=Object.getOwnPropertyNames,$t=Object.prototype.hasOwnProperty,en=(e,t)=>{let n={};for(var r in e)Xt(n,r,{get:e[r],enumerable:!0});return t||Xt(n,Symbol.toStringTag,{value:`Module`}),n},tn=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Qt(t),a=0,o=i.length,s;a<o;a++)s=i[a],!$t.call(e,s)&&s!==n&&Xt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Zt(t,s))||r.enumerable});return e},nn=(e,t,n)=>(tn(e,t,`default`),n&&tn(n,t,`default`)),rn=[{id:`abap`,name:`ABAP`,import:(()=>w(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>w(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>w(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>w(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>w(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>w(()=>import(`./_BqoWO0Lt.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>w(()=>import(`./_Bg1dyEQN.js`),__vite__mapDeps([11,0,1,2,3,4,5,6,7,8,9,10,12])))},{id:`apache`,name:`Apache Conf`,import:(()=>w(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>w(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>w(()=>import(`./_rd-8foIp.js`),__vite__mapDeps([13,9,1,2,3,4,5,6,7,10,8,14,15,16])))},{id:`applescript`,name:`AppleScript`,import:(()=>w(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>w(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>w(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>w(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>w(()=>import(`./_P1g2Hmou.js`),__vite__mapDeps([17,9,1,2,3,4,5,6,7,10,16,18,19,20])))},{id:`awk`,name:`AWK`,import:(()=>w(()=>import(`./_BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>w(()=>import(`./_B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>w(()=>import(`./_qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>w(()=>import(`./_D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>w(()=>import(`./_DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>w(()=>import(`./_Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>w(()=>import(`./_CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>w(()=>import(`./_CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>w(()=>import(`./_8LHYZ0G8.js`),__vite__mapDeps([21,9,1,2,3,4,5,6,7,10,8,14,15,16,22,23])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>w(()=>import(`./_YkIvmgMd.js`),__vite__mapDeps([24,25])))},{id:`c`,name:`C`,import:(()=>w(()=>import(`./_DxS6OhEn.js`).then(e=>e.n),__vite__mapDeps([26,1,2,3,4,5,6,7])))},{id:`c3`,name:`C3`,import:(()=>w(()=>import(`./_D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>w(()=>import(`./_CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>w(()=>import(`./_BAfg1_wL.js`),__vite__mapDeps([27,28])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>w(()=>import(`./_4w6Dwjlh.js`),__vite__mapDeps([29,26,1,2,3,4,5,6,7])))},{id:`clarity`,name:`Clarity`,import:(()=>w(()=>import(`./_CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>w(()=>import(`./_DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>w(()=>import(`./_Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>w(()=>import(`./_B4t3OJDi.js`),__vite__mapDeps([30,8,1,2,3,4,5,6,7,9,10,15])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>w(()=>import(`./_C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>w(()=>import(`./_oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>w(()=>import(`./_DPT6ZO90.js`),__vite__mapDeps([31,9,1,2,3,4,5,6,7])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>w(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>w(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>w(()=>import(`./_C8hQ66UC.js`).then(e=>e.n),__vite__mapDeps([32,1,2,3,4,5,6,7,33,34,26])))},{id:`crystal`,name:`Crystal`,import:(()=>w(()=>import(`./_TX0w8pNw.js`),__vite__mapDeps([35,9,1,2,3,4,5,6,7,10,8,23,26,36])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>w(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>w(()=>import(`./_B_DIXi0k.js`).then(e=>e.n),__vite__mapDeps([10,1,2,3,4,5,6,7])))},{id:`csv`,name:`CSV`,import:(()=>w(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>w(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>w(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>w(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>w(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>w(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>w(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>w(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>w(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>w(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>w(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>w(()=>import(`./_D9nJ4nG1.js`),__vite__mapDeps([37,8,1,2,3,4,5,6,7,9,10,18,22])))},{id:`elixir`,name:`Elixir`,import:(()=>w(()=>import(`./_CT9R7V5L.js`),__vite__mapDeps([38,8,1,2,3,4,5,6,7,9,10])))},{id:`elm`,name:`Elm`,import:(()=>w(()=>import(`./_vSKAFeTh.js`),__vite__mapDeps([39,34,1,2,3,4,5,6,7,26])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>w(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>w(()=>import(`./_Opj7Hn0u.js`),__vite__mapDeps([40,8,1,2,3,4,5,6,7,9,10,41,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>w(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([47,48])))},{id:`fennel`,name:`Fennel`,import:(()=>w(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>w(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>w(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>w(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([49,50])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>w(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>w(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([51,48])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>w(()=>import(`./_DbYA3moe.js`),__vite__mapDeps([52,53,54])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>w(()=>import(`./_DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>w(()=>import(`./_CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>w(()=>import(`./_CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>w(()=>import(`./_DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>w(()=>import(`./_Dl-2e7rI.js`),__vite__mapDeps([55,56])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>w(()=>import(`./_DQGEdzOn.js`),__vite__mapDeps([57,36,1,2,3,4,5,6,7])))},{id:`gleam`,name:`Gleam`,import:(()=>w(()=>import(`./_CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>w(()=>import(`./_Btm6Fw4r.js`),__vite__mapDeps([58,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>w(()=>import(`./_BLMA7nPf.js`),__vite__mapDeps([59,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glsl`,name:`GLSL`,import:(()=>w(()=>import(`./_DTJl30hJ.js`).then(e=>e.n),__vite__mapDeps([34,1,2,3,4,5,6,7,26])))},{id:`gn`,name:`GN`,import:(()=>w(()=>import(`./_ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>w(()=>import(`./_7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>w(()=>import(`./_rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>w(()=>import(`./_Crcj75Rn.js`).then(e=>e.n),__vite__mapDeps([43,1,2,3,4,5,6,7,9,18,20,44])))},{id:`groovy`,name:`Groovy`,import:(()=>w(()=>import(`./_CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>w(()=>import(`./_DKj8yOqM.js`),__vite__mapDeps([60,8,1,2,3,4,5,6,7,9,10,23])))},{id:`haml`,name:`Ruby Haml`,import:(()=>w(()=>import(`./_BubcBfAr.js`).then(e=>e.n),__vite__mapDeps([42,1,2,3,4,5,6,7,9,10])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>w(()=>import(`./_BGPJXvZs.js`),__vite__mapDeps([61,9,1,2,3,4,5,6,7,10,8,46])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>w(()=>import(`./_D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>w(()=>import(`./_C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>w(()=>import(`./_Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>w(()=>import(`./_CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>w(()=>import(`./_Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>w(()=>import(`./_CD9reWft.js`).then(e=>e.n),__vite__mapDeps([8,1,2,3,4,5,6,7,9,10])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>w(()=>import(`./_RA0df7Za.js`),__vite__mapDeps([22,8,1,2,3,4,5,6,7,9,10])))},{id:`http`,name:`HTTP`,import:(()=>w(()=>import(`./_Bc_Ezk5L.js`),__vite__mapDeps([62,14,1,2,3,4,5,6,7,15,16,36,43,9,18,20,44])))},{id:`hurl`,name:`Hurl`,import:(()=>w(()=>import(`./_DVy22yDU.js`),__vite__mapDeps([63,14,1,2,3,4,5,6,7,15,64,43,9,18,20,44])))},{id:`hxml`,name:`HXML`,import:(()=>w(()=>import(`./_DekxQCZG.js`),__vite__mapDeps([65,66])))},{id:`hy`,name:`Hy`,import:(()=>w(()=>import(`./_CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>w(()=>import(`./_DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>w(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>w(()=>import(`./_oA-Vr8Cf.js`).then(e=>e.n),__vite__mapDeps([15,1,2,3,4,5,6,7])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>w(()=>import(`./_DiBlTRgB.js`).then(e=>e.n),__vite__mapDeps([9,1,2,3,4,5,6,7])))},{id:`jinja`,name:`Jinja`,import:(()=>w(()=>import(`./_-dqzO7S_.js`),__vite__mapDeps([67,8,1,2,3,4,5,6,7,9,10])))},{id:`jison`,name:`Jison`,import:(()=>w(()=>import(`./_MatnNE0E.js`),__vite__mapDeps([68,9,1,2,3,4,5,6,7])))},{id:`json`,name:`JSON`,import:(()=>w(()=>import(`./_PwtpBaMf.js`).then(e=>e.n),__vite__mapDeps([16,1,2,3,4,5,6,7])))},{id:`json5`,name:`JSON5`,import:(()=>w(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>w(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>w(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>w(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>w(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>w(()=>import(`./_DAVXBkYN.js`).then(e=>e.n),__vite__mapDeps([44,1,2,3,4,5,6,7])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>w(()=>import(`./_oBcpaEKd.js`),__vite__mapDeps([69,9,1,2,3,4,5,6,7,23,28,32,33,34,26,70])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>w(()=>import(`./_DvW_OT8c.js`),__vite__mapDeps([71,9,1,2,3,4,5,6,7,18,28,36,41,10,8,14,15,23,26,32,33,34,42,43,20,44,45,46,72])))},{id:`kdl`,name:`KDL`,import:(()=>w(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>w(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>w(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>w(()=>import(`./_C4rxuku1.js`),__vite__mapDeps([73,74,1,2,3,4,5,6,7,70])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>w(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>w(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>w(()=>import(`./_DFMu7qvY.js`),__vite__mapDeps([75,9,1,2,3,4,5,6,7,10,8,16])))},{id:`llvm`,name:`LLVM IR`,import:(()=>w(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>w(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>w(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>w(()=>import(`./_Ckc7dIlo.js`).then(e=>e.n),__vite__mapDeps([45,1,2,3,4,5,6,7,26])))},{id:`luau`,name:`Luau`,import:(()=>w(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>w(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>w(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>w(()=>import(`./_BSyVWzez.js`),__vite__mapDeps([76,10,1,2,3,4,5,6,7,12,18,77])))},{id:`matlab`,name:`MATLAB`,import:(()=>w(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>w(()=>import(`./_B7pXsDiF.js`),__vite__mapDeps([78,22,8,1,2,3,4,5,6,7,9,10,46,48])))},{id:`mdx`,name:`MDX`,import:(()=>w(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>w(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>w(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>w(()=>import(`./_fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>w(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>w(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>w(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>w(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([79,80])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>w(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>w(()=>import(`./_fkTQCq_W.js`),__vite__mapDeps([81,45,1,2,3,4,5,6,7,26])))},{id:`nim`,name:`Nim`,import:(()=>w(()=>import(`./_Be9c3c5k.js`),__vite__mapDeps([82,9,1,2,3,4,5,6,7,10,8,14,15,26,34,48])))},{id:`nix`,name:`Nix`,import:(()=>w(()=>import(`./_IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>w(()=>import(`./_CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>w(()=>import(`./_DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>w(()=>import(`./_D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>w(()=>import(`./_BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>w(()=>import(`./_O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>w(()=>import(`./_B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>w(()=>import(`./_BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>w(()=>import(`./_C6u-Srqk.js`),__vite__mapDeps([83,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,55,57,88,89,90,70,72,73,74,77,91,82,92,93,94,95,96,97,98,99,100])))},{id:`pascal`,name:`Pascal`,import:(()=>w(()=>import(`./_4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>w(()=>import(`./_Ba1mrOxI.js`),__vite__mapDeps([72,9,1,2,3,4,5,6,7,10,8,14,15,23])))},{id:`php`,name:`PHP`,import:(()=>w(()=>import(`./_DqvnbtAR.js`),__vite__mapDeps([94,9,1,2,3,4,5,6,7,10,8,14,15,16,23])))},{id:`pkl`,name:`Pkl`,import:(()=>w(()=>import(`./_ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>w(()=>import(`./_DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>w(()=>import(`./_BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>w(()=>import(`./_C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>w(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>w(()=>import(`./_DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>w(()=>import(`./_CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>w(()=>import(`./_DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>w(()=>import(`./_iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>w(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>w(()=>import(`./_CgP5xz-S.js`),__vite__mapDeps([101,9,1,2,3,4,5,6,7,10,8])))},{id:`puppet`,name:`Puppet`,import:(()=>w(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>w(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>w(()=>import(`./_gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>w(()=>import(`./_CLSP-PhQ.js`),__vite__mapDeps([102,9,1,2,3,4,5,6,7])))},{id:`qmldir`,name:`QML Directory`,import:(()=>w(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>w(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>w(()=>import(`./_og2j-mr5.js`).then(e=>e.n),__vite__mapDeps([70,1,2,3,4,5,6,7])))},{id:`racket`,name:`Racket`,import:(()=>w(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>w(()=>import(`./_B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>w(()=>import(`./_DMb-aGhT.js`),__vite__mapDeps([103,8,1,2,3,4,5,6,7,9,10,85])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>w(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>w(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>w(()=>import(`./_Dj8W5hAy.js`).then(e=>e.n),__vite__mapDeps([33,1,2,3,4,5,6,7])))},{id:`rel`,name:`Rel`,import:(()=>w(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>w(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>w(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>w(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>w(()=>import(`./_CSsQyHnz.js`),__vite__mapDeps([104,9,1,2,3,4,5,6,7,22,8,10,28,105,32,33,34,26,36,46,41,14,15,23,42,43,18,20,44,45])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>w(()=>import(`./_DZIuSdjQ.js`),__vite__mapDeps([41,9,1,2,3,4,5,6,7,10,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>w(()=>import(`./_Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>w(()=>import(`./_B0m_B4cy.js`),__vite__mapDeps([106,23,1,2,3,4,5,6,7])))},{id:`sass`,name:`Sass`,import:(()=>w(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>w(()=>import(`./_BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>w(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>w(()=>import(`./_BVgYEt31.js`).then(e=>e.n),__vite__mapDeps([12,1,2,3,4,5,6,7,10])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>w(()=>import(`./_bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>w(()=>import(`./_DB-OQ-9y.js`),__vite__mapDeps([107,108])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>w(()=>import(`./_CwXTg1fU.js`).then(e=>e.n),__vite__mapDeps([36,1,2,3,4,5,6,7])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>w(()=>import(`./_CNG8WwTi.js`),__vite__mapDeps([109,36,1,2,3,4,5,6,7])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>w(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>w(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>w(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>w(()=>import(`./_Dr6eQaDf.js`),__vite__mapDeps([110,8,1,2,3,4,5,6,7,9,10])))},{id:`sparql`,name:`SPARQL`,import:(()=>w(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([111,112])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>w(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>w(()=>import(`./_BWXbXLjv.js`).then(e=>e.n),__vite__mapDeps([23,1,2,3,4,5,6,7])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>w(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>w(()=>import(`./_B-Y1YuyQ.js`),__vite__mapDeps([113,23,1,2,3,4,5,6,7])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>w(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>w(()=>import(`./_CgUj7qP_.js`),__vite__mapDeps([114,9,1,2,3,4,5,6,7])))},{id:`svelte`,name:`Svelte`,import:(()=>w(()=>import(`./_DPtSJ35G.js`),__vite__mapDeps([115,9,1,2,3,4,5,6,7,10,18,19])))},{id:`swift`,name:`Swift`,import:(()=>w(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>w(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>w(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>w(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>w(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>w(()=>import(`./_CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>w(()=>import(`./_BACT_fWM.js`),__vite__mapDeps([116,9,1,2,3,4,5,6,7,10,88])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>w(()=>import(`./_DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>w(()=>import(`./_BX4xzjKF.js`).then(e=>e.n),__vite__mapDeps([74,1,2,3,4,5,6,7,70])))},{id:`toml`,name:`TOML`,import:(()=>w(()=>import(`./_CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>w(()=>import(`./_B2k34w2U.js`),__vite__mapDeps([117,9,1,2,3,4,5,6,7,10,8,14,15,18,23,34,26])))},{id:`tsv`,name:`TSV`,import:(()=>w(()=>import(`./_sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>w(()=>import(`./_Dem8VmJt.js`).then(e=>e.n),__vite__mapDeps([20,1,2,3,4,5,6,7])))},{id:`turtle`,name:`Turtle`,import:(()=>w(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>w(()=>import(`./_B9vNWNy5.js`),__vite__mapDeps([118,9,1,2,3,4,5,6,7,10,12,28,41,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46,94,16])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>w(()=>import(`./_DyJiy6q7.js`).then(e=>e.n),__vite__mapDeps([18,1,2,3,4,5,6,7])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>w(()=>import(`./_BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>w(()=>import(`./_DtY8_Qtl.js`),__vite__mapDeps([119,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,120,121,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,51,55,57,88,89,61,90,122,70,69,72,73,74,77,123,91,92,94,95,96,97,98,100,124,101,125,126,118,127])))},{id:`v`,name:`V`,import:(()=>w(()=>import(`./_DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>w(()=>import(`./_zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>w(()=>import(`./_DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>w(()=>import(`./_B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>w(()=>import(`./_BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>w(()=>import(`./_DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>w(()=>import(`./_C2vaJoKP.js`),__vite__mapDeps([128,9,1,2,3,4,5,6,7,10,8,16,18,22])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>w(()=>import(`./_BFUZuxfB.js`),__vite__mapDeps([129,9,1,2,3,4,5,6,7])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>w(()=>import(`./_DLQCOYuD.js`),__vite__mapDeps([130,9,1,2,3,4,5,6,7,10,12,19,77,131])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>w(()=>import(`./_CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>w(()=>import(`./_ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>w(()=>import(`./_C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>w(()=>import(`./_BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>w(()=>import(`./_ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>w(()=>import(`./_DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>w(()=>import(`./_DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>w(()=>import(`./_0C7z67Qm.js`).then(e=>e.n),__vite__mapDeps([14,1,2,3,4,5,6,7,15])))},{id:`xsl`,name:`XSL`,import:(()=>w(()=>import(`./_Clv6aVv7.js`),__vite__mapDeps([100,14,1,2,3,4,5,6,7,15])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>w(()=>import(`./_CcKsIH5h.js`).then(e=>e.n),__vite__mapDeps([46,1,2,3,4,5,6,7])))},{id:`zenscript`,name:`ZenScript`,import:(()=>w(()=>import(`./_BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>w(()=>import(`./_CMLA9XwU.js`),[]))}],an=Object.fromEntries(rn.map(e=>[e.id,e.import])),on=Object.fromEntries(rn.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),sn={...an,...on},cn=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>w(()=>import(`./_vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>w(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>w(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>w(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>w(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>w(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>w(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>w(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>w(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>w(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>w(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>w(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>w(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>w(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>w(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>w(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>w(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>w(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>w(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>w(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>w(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>w(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>w(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>w(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>w(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>w(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>w(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>w(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>w(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>w(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>w(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>w(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>w(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>w(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>w(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>w(()=>import(`./_Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>w(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>w(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>w(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>w(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>w(()=>import(`./_BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>w(()=>import(`./_DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>w(()=>import(`./_B_bV9PQ9.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>w(()=>import(`./_DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>w(()=>import(`./_eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>w(()=>import(`./_Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>w(()=>import(`./_CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>w(()=>import(`./_D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>w(()=>import(`./_DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>w(()=>import(`./_DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>w(()=>import(`./_DX1BQOs8.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>w(()=>import(`./_aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>w(()=>import(`./_8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>w(()=>import(`./_DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>w(()=>import(`./_DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>w(()=>import(`./_B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>w(()=>import(`./_4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>w(()=>import(`./_UdsmMDCL.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>w(()=>import(`./_C1IUL_tW.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>w(()=>import(`./_nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>w(()=>import(`./_oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>w(()=>import(`./_DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>w(()=>import(`./_fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>w(()=>import(`./_BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>w(()=>import(`./_VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),ln=t({createOnigurumaEngine:()=>In,getDefaultWasmLoader:()=>Fn,loadWasm:()=>kn,setDefaultWasmLoader:()=>Pn}),un=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function dn(){return 2147483648}function fn(){return typeof performance<`u`?performance.now():Date.now()}var pn=(e,t)=>e+(t-e%t)%t;async function mn(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=dn();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,pn(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:fn,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var hn=Object.defineProperty,gn=(e,t,n)=>t in e?hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>gn(e,typeof t==`symbol`?t:t+``,n),_n=null;function vn(e){throw new un(e.UTF8ToString(e.getLastOnigError()))}var yn=class e{constructor(t){L(this,`utf16Length`),L(this,`utf8Length`),L(this,`utf16Value`),L(this,`utf8Value`),L(this,`utf16OffsetToUtf8`),L(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},bn=class e{constructor(t){if(L(this,`id`,++e.LAST_ID),L(this,`_onigBinding`),L(this,`content`),L(this,`utf16Length`),L(this,`utf8Length`),L(this,`utf16OffsetToUtf8`),L(this,`utf8OffsetToUtf16`),L(this,`ptr`),!_n)throw new un(`Must invoke loadWasm first.`);this._onigBinding=_n,this.content=t;let n=new yn(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=_n.omalloc(1e4),e._sharedPtrInUse=!0,_n.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(_n)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};L(bn,`LAST_ID`,0),L(bn,`_sharedPtr`,0),L(bn,`_sharedPtrInUse`,!1);var xn=bn,Sn=class{constructor(e){if(L(this,`_onigBinding`),L(this,`_ptr`),!_n)throw new un(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new yn(e[r]);t[r]=i.createString(_n),n[r]=i.utf8Length}let r=_n.omalloc(4*e.length);_n.HEAPU32.set(t,r/4);let i=_n.omalloc(4*e.length);_n.HEAPU32.set(n,i/4);let a=_n.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)_n.ofree(t[n]);_n.ofree(i),_n.ofree(r),a===0&&vn(_n),this._onigBinding=_n,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new xn(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Cn(e){return typeof e.instantiator==`function`}function wn(e){return typeof e.default==`function`}function Tn(e){return e.data!==void 0}function En(e){return typeof Response<`u`&&e instanceof Response}function Dn(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var On;function kn(e){if(On)return On;async function t(){_n=await mn(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Cn(n)?n=await n.instantiator(t):wn(n)?n=await n.default(t):(Tn(n)&&(n=n.data),En(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await jn(n)(t):await Mn(n)(t):Dn(n)||n instanceof WebAssembly.Module?n=await An(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await An(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return On=t(),On}function An(e){return t=>WebAssembly.instantiate(e,t)}function jn(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Mn(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Nn;function Pn(e){Nn=e}function Fn(){return Nn}async function In(e){return e&&await kn(e),{createScanner(e){return new Sn(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new xn(e)}}}var Ln=en({});nn(Ln,ln);var R=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rn(e){return zn(e)}function zn(e){return Array.isArray(e)?Bn(e):e instanceof RegExp?e:typeof e==`object`?Vn(e):e}function Bn(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zn(e[n]);return t}function Vn(e){let t={};for(let n in e)t[n]=zn(e[n]);return t}function Hn(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Un(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Un(e.substring(0,e.length-1)):e.substr(~t+1)}var Wn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gn=class{static hasCaptures(e){return e!==null&&(Wn.lastIndex=0,Wn.test(e))}static replaceCaptures(e,t,n){return e.replace(Wn,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Kn(e,t){return e<t?-1:+(e>t)}function qn(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Kn(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Jn(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Yn(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Xn=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Zn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(nr(e),t)}static createFromParsedTheme(e,t){return ar(e,t)}_cachedMatchRoot=new Xn(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>$n(e.parent,t.parentScopes));return n?new tr(n.fontStyle,n.foreground,n.background):null}},Qn=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function $n(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!er(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function er(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var tr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function nr(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Jn(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Jn(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new rr(l,u,e,o,s,c)}}return n}var rr=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},ir=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(ir||{});function ar(e,t){e.sort((e,t)=>{let n=Kn(e.scope,t.scope);return n!==0||(n=qn(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new or(t),o=new tr(n,a.getId(r),a.getId(i)),s=new lr(new cr(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Zn(a,o,s)}var or=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},sr=Object.freeze([]),cr=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||sr,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},lr=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),cr.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(qn(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new cr(e,t,n,r,i))}},ur=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=fr(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function dr(e){return e}function fr(e){return e}function pr(e,t){let n=[],r=hr(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(mr(i)){let e=[];do e.push(i),i=r.next();while(mr(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function mr(e){return!!e&&!!e.match(/[\w\.:]+/)}function hr(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function gr(e){typeof e.dispose==`function`&&e.dispose()}var _r=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},vr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},yr=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},br=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new _r(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new yr;for(let n of e)xr(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof _r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function xr(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof _r?Cr({baseGrammar:a,selfGrammar:i},r):Sr(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new _r(e))}function Sr(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];wr([r],t,n)}}function Cr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&wr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&wr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function wr(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Hn({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&wr(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Ar(i);switch(a.kind){case 0:Cr({...t,selfGrammar:t.baseGrammar},n);break;case 1:Cr(t,n);break;case 2:Sr(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Sr(a.ruleName,i,n):Cr(i,n)}else a.kind===4?n.add(new vr(a.scopeName,a.ruleName)):n.add(new _r(a.scopeName))}}}var Tr=class{kind=0},Er=class{kind=1},Dr=class{constructor(e){this.ruleName=e}kind=2},Or=class{constructor(e){this.scopeName=e}kind=3},kr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ar(e){if(e===`$base`)return new Tr;if(e===`$self`)return new Er;let t=e.indexOf(`#`);return t===-1?new Or(e):t===0?new Dr(e.substring(1)):new kr(e.substring(0,t),e.substring(t+1))}var jr=/\\(\d+)/,Mr=/\\(\d+)/g,Nr=-1,Pr=-2;function Fr(e){return e}function Ir(e){return e}var Lr=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gn.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gn.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Un(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Gn.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gn.replaceCaptures(this._contentName,e,t)}},Rr=class extends Lr{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},zr=class extends Lr{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Wr(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Br=class extends Lr{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vr=class extends Lr{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Wr(i,this.id),this.beginCaptures=a,this._end=new Wr(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Hr=class extends Lr{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Wr(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Wr(o,Pr),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Gr,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Ur=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Rr(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new zr(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Hn({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Br(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Hr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Vr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Ar(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Br||e instanceof Vr||e instanceof Hr)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Wr=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&jr.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Mr.lastIndex=0,this.source.replace(Mr,(e,t)=>Yn(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Gr=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Kr(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Kr(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Kr=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_DVSW8udP.js","assets/_DDsTXbIv.js","assets/_772AjyQx.js","assets/_DEQ6GDV1.js","assets/icon-search-DcAn99Uv.css","assets/_DdHifLBM.js","assets/_bw4eF0Pd.js","assets/command-palette-BKFO5yNz.css","assets/_DOF6orvN.js","assets/_Dp0ugpas.js","assets/_CxCJpmHU.js","assets/_DwWg5-yH.js","assets/_CxIrgloV.js","assets/_DfJWbnsb.js","assets/_BirlCtPu.js","assets/_B6BIIgNj.js","assets/_DwFUz6Xc.js","assets/_DK3CoQmT.js","assets/_D3OQutZR.js","assets/_BXeXVLqQ.js","assets/_27978R3m.js","assets/_B6eFZbg2.js","assets/_DQhHCH72.js","assets/_CvYqsy1w.js","assets/_YkIvmgMd.js","assets/_bTVj8UrX.js","assets/_Cy8vYL75.js","assets/_BAfg1_wL.js","assets/_gzcpVVnB.js","assets/_C5kNCPTr.js","assets/_CmErIkxw.js","assets/_ffrrcZHB.js","assets/_CfWzAhd8.js","assets/_B0Lw-cCo.js","assets/_2edMheVg.js","assets/_CZGghR-O.js","assets/_DlV6If1a.js","assets/_BLYUr4zr.js","assets/_tmSPJWly.js","assets/_VTdgQApy.js","assets/_BZ8P4EyI.js","assets/_C8-oTzqg.js","assets/_4ZExxGH7.js","assets/_XYWgiNRI.js","assets/_DjkBEN6c.js","assets/_Dd7aAq-X.js","assets/_BBbgMQg3.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_CQJs3lWb.js","assets/_CYNrtFtB.js","assets/_DmIc4jLQ.js","assets/_DbYA3moe.js","assets/_CBce3t8t.js","assets/_DYvRD3hg.js","assets/_Dl-2e7rI.js","assets/_woXpYk--.js","assets/_BsC2eLK9.js","assets/_D0IgxEpO.js","assets/_Dbe2W2ND.js","assets/_8FFPstMK.js","assets/_C9FLULxr.js","assets/_XHldBTre.js","assets/_CJ2ze_Xf.js","assets/_Dx-8-gkx.js","assets/_DekxQCZG.js","assets/_C8oCnwJJ.js","assets/_mzabRm9a.js","assets/_D2YCscEV.js","assets/_BHxcuLms.js","assets/_DvsAtbXL.js","assets/_DVU23VzS.js","assets/_C1YxfeT4.js","assets/_9oZx5YJU.js","assets/_pFf5fxSt.js","assets/_CpGOtLj9.js","assets/_CppbN7kq.js","assets/_DVTAwKKz.js","assets/_nckb1bc5.js","assets/_DWQbgPoS.js","assets/_DJMQeKeT.js","assets/_BH6JT0zv.js","assets/_C3xw2ie7.js","assets/_DGek55jx.js","assets/_DqKBuwfJ.js","assets/_oqKa8noW.js","assets/_CnvKMtbv.js","assets/_IyjqRm3v.js","assets/_rLFTqkRN.js","assets/_CacY0gHj.js","assets/_B5eOa1yu.js","assets/_Dixweg8N.js","assets/_D1A_Heim.js","assets/_O90oeIOV.js","assets/_BT1EyKo4.js","assets/_DOwzaHZ0.js","assets/_B3gFvitq.js","assets/_Cfkwpbl8.js","assets/_BiFt_7mu.js","assets/_CMLA9XwU.js","assets/_BvOtKfMA.js","assets/_CjbLyVQW.js","assets/_DZ7xeQB-.js","assets/_COhoKmvx.js","assets/_BrbOs2El.js","assets/_Bj61d0ZC.js","assets/_BMN5006U.js","assets/_DB-OQ-9y.js","assets/_Cvrh5tZx.js","assets/_DLcZX64F.js","assets/_GTCkP1pw.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_BooHqm0j.js","assets/_lI81U7zm.js","assets/_D4QgPI4f.js","assets/_5_zD5lZ4.js","assets/_COWH3p1G.js","assets/_CslYE1lw.js","assets/_B5yZABPj.js","assets/_qdxAdBWQ.js","assets/_Ci_nEsc7.js","assets/_CYpm1nAK.js","assets/_BNLmms1o.js","assets/_CCSX75yM.js","assets/_CyEgAFGc.js","assets/_Dh5ihWbf.js","assets/_B2gwz-sJ.js","assets/_ChMsY6Je.js","assets/_D-nWobWI.js","assets/_D1sSxZ-J.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{E as e,F as t,I as n,O as r,P as i,n as a,t as o}from"./_DDsTXbIv.js";import{B as s,F as c,G as l,I as u,K as d,L as f,O as p,P as m,R as h,S as g,U as _,V as v,a as y,b,d as x,i as S,q as C,t as w,u as T,x as E,y as D,z as O}from"./_772AjyQx.js";import{C as k,E as A,Ht as ee,N as j,O as te,S as M,Sn as ne,T as re,V as ie,Vt as ae,W as oe,Wt as se,Z as ce,_ as le,_t as ue,a as de,b as fe,bn as pe,ht as me,i as he,n as ge,r as _e,t as ve,tn as ye,v as be,vt as xe,w as Se,wn as Ce,wt as we,x as Te,y as Ee}from"./_DEQ6GDV1.js";import{_ as De,c as Oe,d as N,f as ke,g as Ae,h as je,i as Me,l as Ne,m as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze,u as Be}from"./_itKhXiEn.js";import{_ as Ve,g as He,h as Ue,k as We,n as Ge,v as Ke}from"./_bw4eF0Pd.js";import{a as qe,c as Je,d as Ye,f as Xe,i as Ze,l as Qe,n as $e,o as et,p as tt,r as nt,s as rt,t as it,u as at}from"./_DN6hN8Jl.js";import{t as ot}from"./_CcFCI5Av.js";import{a as st,i as ct,n as lt,o as ut,r as dt,t as P}from"./_xe05NvyT.js";import{a as F,i as ft,n as pt,r as mt,t as ht}from"./_dv2gxFG9.js";var gt=`diffs-container`,_t=(()=>{try{return!1}catch{return!1}})(),vt=/(?=^From [a-f0-9]+ .+$)/m,yt=/(?=^diff --git)/gm,bt=/(?<=\n)/,xt=/^(---|\+\+\+)\s+([^\t\r\n]+)/,St=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Ct=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,wt=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Tt=`header-prefix`,Et=`header-filename-suffix`,Dt=`header-metadata`,Ot=`header-custom`,I={dark:`pierre-dark`,light:`pierre-light`},kt=`data-theme-css`,At=`data-unsafe-css`,jt=`data-diffs-scrollbar-measure`,Mt=`data-diffs-code-view-header`,Nt=`data-diffs-code-view-footer`,Pt=`--diffs-scrollbar-gutter-measured`,Ft=1e5,It={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},Lt={...It,hunkLineCount:1},Rt={paddingTop:8,paddingBottom:8,gap:8},zt={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},Bt=Object.freeze({fromStart:0,fromEnd:0}),Vt={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ht={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ut=new Map,Wt=new Map,Gt=new Map,Kt=new Set;function qt(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Kt.has(t))return!1;return!0}function Jt(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Kt.has(n.name))continue;let e=Ut.get(n.name);e??(e=n,Ut.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}Kt.add(e.name)}}function Yt(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Xt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Qt=Object.getOwnPropertyNames,$t=Object.prototype.hasOwnProperty,en=(e,t)=>{let n={};for(var r in e)Xt(n,r,{get:e[r],enumerable:!0});return t||Xt(n,Symbol.toStringTag,{value:`Module`}),n},tn=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Qt(t),a=0,o=i.length,s;a<o;a++)s=i[a],!$t.call(e,s)&&s!==n&&Xt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Zt(t,s))||r.enumerable});return e},nn=(e,t,n)=>(tn(e,t,`default`),n&&tn(n,t,`default`)),rn=[{id:`abap`,name:`ABAP`,import:(()=>w(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>w(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>w(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>w(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>w(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>w(()=>import(`./_DVSW8udP.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>w(()=>import(`./_DwWg5-yH.js`),__vite__mapDeps([11,0,1,2,3,4,5,6,7,8,9,10,12])))},{id:`apache`,name:`Apache Conf`,import:(()=>w(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>w(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>w(()=>import(`./_DfJWbnsb.js`),__vite__mapDeps([13,9,1,2,3,4,5,6,7,10,8,14,15,16])))},{id:`applescript`,name:`AppleScript`,import:(()=>w(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>w(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>w(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>w(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>w(()=>import(`./_DK3CoQmT.js`),__vite__mapDeps([17,9,1,2,3,4,5,6,7,10,16,18,19,20])))},{id:`awk`,name:`AWK`,import:(()=>w(()=>import(`./_BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>w(()=>import(`./_B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>w(()=>import(`./_qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>w(()=>import(`./_D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>w(()=>import(`./_DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>w(()=>import(`./_Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>w(()=>import(`./_CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>w(()=>import(`./_CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>w(()=>import(`./_B6eFZbg2.js`),__vite__mapDeps([21,9,1,2,3,4,5,6,7,10,8,14,15,16,22,23])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>w(()=>import(`./_YkIvmgMd.js`),__vite__mapDeps([24,25])))},{id:`c`,name:`C`,import:(()=>w(()=>import(`./_Cy8vYL75.js`).then(e=>e.n),__vite__mapDeps([26,1,2,3,4,5,6,7])))},{id:`c3`,name:`C3`,import:(()=>w(()=>import(`./_D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>w(()=>import(`./_CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>w(()=>import(`./_BAfg1_wL.js`),__vite__mapDeps([27,28])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>w(()=>import(`./_C5kNCPTr.js`),__vite__mapDeps([29,26,1,2,3,4,5,6,7])))},{id:`clarity`,name:`Clarity`,import:(()=>w(()=>import(`./_CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>w(()=>import(`./_DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>w(()=>import(`./_Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>w(()=>import(`./_CmErIkxw.js`),__vite__mapDeps([30,8,1,2,3,4,5,6,7,9,10,15])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>w(()=>import(`./_C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>w(()=>import(`./_oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>w(()=>import(`./_ffrrcZHB.js`),__vite__mapDeps([31,9,1,2,3,4,5,6,7])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>w(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>w(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>w(()=>import(`./_CfWzAhd8.js`).then(e=>e.n),__vite__mapDeps([32,1,2,3,4,5,6,7,33,34,26])))},{id:`crystal`,name:`Crystal`,import:(()=>w(()=>import(`./_CZGghR-O.js`),__vite__mapDeps([35,9,1,2,3,4,5,6,7,10,8,23,26,36])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>w(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>w(()=>import(`./_CxCJpmHU.js`).then(e=>e.n),__vite__mapDeps([10,1,2,3,4,5,6,7])))},{id:`csv`,name:`CSV`,import:(()=>w(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>w(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>w(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>w(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>w(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>w(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>w(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>w(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>w(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>w(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>w(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>w(()=>import(`./_BLYUr4zr.js`),__vite__mapDeps([37,8,1,2,3,4,5,6,7,9,10,18,22])))},{id:`elixir`,name:`Elixir`,import:(()=>w(()=>import(`./_tmSPJWly.js`),__vite__mapDeps([38,8,1,2,3,4,5,6,7,9,10])))},{id:`elm`,name:`Elm`,import:(()=>w(()=>import(`./_VTdgQApy.js`),__vite__mapDeps([39,34,1,2,3,4,5,6,7,26])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>w(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>w(()=>import(`./_BZ8P4EyI.js`),__vite__mapDeps([40,8,1,2,3,4,5,6,7,9,10,41,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>w(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([47,48])))},{id:`fennel`,name:`Fennel`,import:(()=>w(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>w(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>w(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>w(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([49,50])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>w(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>w(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([51,48])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>w(()=>import(`./_DbYA3moe.js`),__vite__mapDeps([52,53,54])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>w(()=>import(`./_DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>w(()=>import(`./_CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>w(()=>import(`./_CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>w(()=>import(`./_DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>w(()=>import(`./_Dl-2e7rI.js`),__vite__mapDeps([55,56])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>w(()=>import(`./_BsC2eLK9.js`),__vite__mapDeps([57,36,1,2,3,4,5,6,7])))},{id:`gleam`,name:`Gleam`,import:(()=>w(()=>import(`./_CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>w(()=>import(`./_D0IgxEpO.js`),__vite__mapDeps([58,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>w(()=>import(`./_Dbe2W2ND.js`),__vite__mapDeps([59,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glsl`,name:`GLSL`,import:(()=>w(()=>import(`./_2edMheVg.js`).then(e=>e.n),__vite__mapDeps([34,1,2,3,4,5,6,7,26])))},{id:`gn`,name:`GN`,import:(()=>w(()=>import(`./_ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>w(()=>import(`./_7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>w(()=>import(`./_rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>w(()=>import(`./_XYWgiNRI.js`).then(e=>e.n),__vite__mapDeps([43,1,2,3,4,5,6,7,9,18,20,44])))},{id:`groovy`,name:`Groovy`,import:(()=>w(()=>import(`./_CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>w(()=>import(`./_8FFPstMK.js`),__vite__mapDeps([60,8,1,2,3,4,5,6,7,9,10,23])))},{id:`haml`,name:`Ruby Haml`,import:(()=>w(()=>import(`./_4ZExxGH7.js`).then(e=>e.n),__vite__mapDeps([42,1,2,3,4,5,6,7,9,10])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>w(()=>import(`./_C9FLULxr.js`),__vite__mapDeps([61,9,1,2,3,4,5,6,7,10,8,46])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>w(()=>import(`./_D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>w(()=>import(`./_C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>w(()=>import(`./_Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>w(()=>import(`./_CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>w(()=>import(`./_Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>w(()=>import(`./_DOF6orvN.js`).then(e=>e.n),__vite__mapDeps([8,1,2,3,4,5,6,7,9,10])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>w(()=>import(`./_DQhHCH72.js`),__vite__mapDeps([22,8,1,2,3,4,5,6,7,9,10])))},{id:`http`,name:`HTTP`,import:(()=>w(()=>import(`./_XHldBTre.js`),__vite__mapDeps([62,14,1,2,3,4,5,6,7,15,16,36,43,9,18,20,44])))},{id:`hurl`,name:`Hurl`,import:(()=>w(()=>import(`./_CJ2ze_Xf.js`),__vite__mapDeps([63,14,1,2,3,4,5,6,7,15,64,43,9,18,20,44])))},{id:`hxml`,name:`HXML`,import:(()=>w(()=>import(`./_DekxQCZG.js`),__vite__mapDeps([65,66])))},{id:`hy`,name:`Hy`,import:(()=>w(()=>import(`./_CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>w(()=>import(`./_DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>w(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>w(()=>import(`./_B6BIIgNj.js`).then(e=>e.n),__vite__mapDeps([15,1,2,3,4,5,6,7])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>w(()=>import(`./_Dp0ugpas.js`).then(e=>e.n),__vite__mapDeps([9,1,2,3,4,5,6,7])))},{id:`jinja`,name:`Jinja`,import:(()=>w(()=>import(`./_mzabRm9a.js`),__vite__mapDeps([67,8,1,2,3,4,5,6,7,9,10])))},{id:`jison`,name:`Jison`,import:(()=>w(()=>import(`./_D2YCscEV.js`),__vite__mapDeps([68,9,1,2,3,4,5,6,7])))},{id:`json`,name:`JSON`,import:(()=>w(()=>import(`./_DwFUz6Xc.js`).then(e=>e.n),__vite__mapDeps([16,1,2,3,4,5,6,7])))},{id:`json5`,name:`JSON5`,import:(()=>w(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>w(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>w(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>w(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>w(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>w(()=>import(`./_DjkBEN6c.js`).then(e=>e.n),__vite__mapDeps([44,1,2,3,4,5,6,7])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>w(()=>import(`./_BHxcuLms.js`),__vite__mapDeps([69,9,1,2,3,4,5,6,7,23,28,32,33,34,26,70])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>w(()=>import(`./_DVU23VzS.js`),__vite__mapDeps([71,9,1,2,3,4,5,6,7,18,28,36,41,10,8,14,15,23,26,32,33,34,42,43,20,44,45,46,72])))},{id:`kdl`,name:`KDL`,import:(()=>w(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>w(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>w(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>w(()=>import(`./_9oZx5YJU.js`),__vite__mapDeps([73,74,1,2,3,4,5,6,7,70])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>w(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>w(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>w(()=>import(`./_CpGOtLj9.js`),__vite__mapDeps([75,9,1,2,3,4,5,6,7,10,8,16])))},{id:`llvm`,name:`LLVM IR`,import:(()=>w(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>w(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>w(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>w(()=>import(`./_Dd7aAq-X.js`).then(e=>e.n),__vite__mapDeps([45,1,2,3,4,5,6,7,26])))},{id:`luau`,name:`Luau`,import:(()=>w(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>w(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>w(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>w(()=>import(`./_CppbN7kq.js`),__vite__mapDeps([76,10,1,2,3,4,5,6,7,12,18,77])))},{id:`matlab`,name:`MATLAB`,import:(()=>w(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>w(()=>import(`./_nckb1bc5.js`),__vite__mapDeps([78,22,8,1,2,3,4,5,6,7,9,10,46,48])))},{id:`mdx`,name:`MDX`,import:(()=>w(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>w(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>w(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>w(()=>import(`./_fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>w(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>w(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>w(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>w(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([79,80])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>w(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>w(()=>import(`./_BH6JT0zv.js`),__vite__mapDeps([81,45,1,2,3,4,5,6,7,26])))},{id:`nim`,name:`Nim`,import:(()=>w(()=>import(`./_C3xw2ie7.js`),__vite__mapDeps([82,9,1,2,3,4,5,6,7,10,8,14,15,26,34,48])))},{id:`nix`,name:`Nix`,import:(()=>w(()=>import(`./_IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>w(()=>import(`./_CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>w(()=>import(`./_DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>w(()=>import(`./_D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>w(()=>import(`./_BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>w(()=>import(`./_O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>w(()=>import(`./_B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>w(()=>import(`./_BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>w(()=>import(`./_DGek55jx.js`),__vite__mapDeps([83,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,55,57,88,89,90,70,72,73,74,77,91,82,92,93,94,95,96,97,98,99,100])))},{id:`pascal`,name:`Pascal`,import:(()=>w(()=>import(`./_4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>w(()=>import(`./_C1YxfeT4.js`),__vite__mapDeps([72,9,1,2,3,4,5,6,7,10,8,14,15,23])))},{id:`php`,name:`PHP`,import:(()=>w(()=>import(`./_BT1EyKo4.js`),__vite__mapDeps([94,9,1,2,3,4,5,6,7,10,8,14,15,16,23])))},{id:`pkl`,name:`Pkl`,import:(()=>w(()=>import(`./_ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>w(()=>import(`./_DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>w(()=>import(`./_BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>w(()=>import(`./_C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>w(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>w(()=>import(`./_DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>w(()=>import(`./_CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>w(()=>import(`./_DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>w(()=>import(`./_iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>w(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>w(()=>import(`./_CjbLyVQW.js`),__vite__mapDeps([101,9,1,2,3,4,5,6,7,10,8])))},{id:`puppet`,name:`Puppet`,import:(()=>w(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>w(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>w(()=>import(`./_gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>w(()=>import(`./_DZ7xeQB-.js`),__vite__mapDeps([102,9,1,2,3,4,5,6,7])))},{id:`qmldir`,name:`QML Directory`,import:(()=>w(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>w(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>w(()=>import(`./_DvsAtbXL.js`).then(e=>e.n),__vite__mapDeps([70,1,2,3,4,5,6,7])))},{id:`racket`,name:`Racket`,import:(()=>w(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>w(()=>import(`./_B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>w(()=>import(`./_COhoKmvx.js`),__vite__mapDeps([103,8,1,2,3,4,5,6,7,9,10,85])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>w(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>w(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>w(()=>import(`./_B0Lw-cCo.js`).then(e=>e.n),__vite__mapDeps([33,1,2,3,4,5,6,7])))},{id:`rel`,name:`Rel`,import:(()=>w(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>w(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>w(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>w(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>w(()=>import(`./_BrbOs2El.js`),__vite__mapDeps([104,9,1,2,3,4,5,6,7,22,8,10,28,105,32,33,34,26,36,46,41,14,15,23,42,43,18,20,44,45])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>w(()=>import(`./_C8-oTzqg.js`),__vite__mapDeps([41,9,1,2,3,4,5,6,7,10,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>w(()=>import(`./_Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>w(()=>import(`./_BMN5006U.js`),__vite__mapDeps([106,23,1,2,3,4,5,6,7])))},{id:`sass`,name:`Sass`,import:(()=>w(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>w(()=>import(`./_BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>w(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>w(()=>import(`./_CxIrgloV.js`).then(e=>e.n),__vite__mapDeps([12,1,2,3,4,5,6,7,10])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>w(()=>import(`./_bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>w(()=>import(`./_DB-OQ-9y.js`),__vite__mapDeps([107,108])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>w(()=>import(`./_DlV6If1a.js`).then(e=>e.n),__vite__mapDeps([36,1,2,3,4,5,6,7])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>w(()=>import(`./_DLcZX64F.js`),__vite__mapDeps([109,36,1,2,3,4,5,6,7])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>w(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>w(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>w(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>w(()=>import(`./_GTCkP1pw.js`),__vite__mapDeps([110,8,1,2,3,4,5,6,7,9,10])))},{id:`sparql`,name:`SPARQL`,import:(()=>w(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([111,112])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>w(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>w(()=>import(`./_CvYqsy1w.js`).then(e=>e.n),__vite__mapDeps([23,1,2,3,4,5,6,7])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>w(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>w(()=>import(`./_BooHqm0j.js`),__vite__mapDeps([113,23,1,2,3,4,5,6,7])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>w(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>w(()=>import(`./_lI81U7zm.js`),__vite__mapDeps([114,9,1,2,3,4,5,6,7])))},{id:`svelte`,name:`Svelte`,import:(()=>w(()=>import(`./_D4QgPI4f.js`),__vite__mapDeps([115,9,1,2,3,4,5,6,7,10,18,19])))},{id:`swift`,name:`Swift`,import:(()=>w(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>w(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>w(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>w(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>w(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>w(()=>import(`./_CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>w(()=>import(`./_5_zD5lZ4.js`),__vite__mapDeps([116,9,1,2,3,4,5,6,7,10,88])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>w(()=>import(`./_DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>w(()=>import(`./_pFf5fxSt.js`).then(e=>e.n),__vite__mapDeps([74,1,2,3,4,5,6,7,70])))},{id:`toml`,name:`TOML`,import:(()=>w(()=>import(`./_CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>w(()=>import(`./_COWH3p1G.js`),__vite__mapDeps([117,9,1,2,3,4,5,6,7,10,8,14,15,18,23,34,26])))},{id:`tsv`,name:`TSV`,import:(()=>w(()=>import(`./_sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>w(()=>import(`./_27978R3m.js`).then(e=>e.n),__vite__mapDeps([20,1,2,3,4,5,6,7])))},{id:`turtle`,name:`Turtle`,import:(()=>w(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>w(()=>import(`./_CslYE1lw.js`),__vite__mapDeps([118,9,1,2,3,4,5,6,7,10,12,28,41,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46,94,16])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>w(()=>import(`./_D3OQutZR.js`).then(e=>e.n),__vite__mapDeps([18,1,2,3,4,5,6,7])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>w(()=>import(`./_BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>w(()=>import(`./_B5yZABPj.js`),__vite__mapDeps([119,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,120,121,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,51,55,57,88,89,61,90,122,70,69,72,73,74,77,123,91,92,94,95,96,97,98,100,124,101,125,126,118,127])))},{id:`v`,name:`V`,import:(()=>w(()=>import(`./_DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>w(()=>import(`./_zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>w(()=>import(`./_DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>w(()=>import(`./_B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>w(()=>import(`./_BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>w(()=>import(`./_DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>w(()=>import(`./_ChMsY6Je.js`),__vite__mapDeps([128,9,1,2,3,4,5,6,7,10,8,16,18,22])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>w(()=>import(`./_D-nWobWI.js`),__vite__mapDeps([129,9,1,2,3,4,5,6,7])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>w(()=>import(`./_D1sSxZ-J.js`),__vite__mapDeps([130,9,1,2,3,4,5,6,7,10,12,19,77,131])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>w(()=>import(`./_CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>w(()=>import(`./_ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>w(()=>import(`./_C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>w(()=>import(`./_BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>w(()=>import(`./_ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>w(()=>import(`./_DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>w(()=>import(`./_DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>w(()=>import(`./_BirlCtPu.js`).then(e=>e.n),__vite__mapDeps([14,1,2,3,4,5,6,7,15])))},{id:`xsl`,name:`XSL`,import:(()=>w(()=>import(`./_BvOtKfMA.js`),__vite__mapDeps([100,14,1,2,3,4,5,6,7,15])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>w(()=>import(`./_BBbgMQg3.js`).then(e=>e.n),__vite__mapDeps([46,1,2,3,4,5,6,7])))},{id:`zenscript`,name:`ZenScript`,import:(()=>w(()=>import(`./_BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>w(()=>import(`./_CMLA9XwU.js`),[]))}],an=Object.fromEntries(rn.map(e=>[e.id,e.import])),on=Object.fromEntries(rn.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),sn={...an,...on},cn=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>w(()=>import(`./_vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>w(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>w(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>w(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>w(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>w(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>w(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>w(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>w(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>w(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>w(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>w(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>w(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>w(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>w(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>w(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>w(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>w(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>w(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>w(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>w(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>w(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>w(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>w(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>w(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>w(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>w(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>w(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>w(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>w(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>w(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>w(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>w(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>w(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>w(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>w(()=>import(`./_Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>w(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>w(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>w(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>w(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>w(()=>import(`./_BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>w(()=>import(`./_DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>w(()=>import(`./_B_bV9PQ9.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>w(()=>import(`./_DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>w(()=>import(`./_eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>w(()=>import(`./_Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>w(()=>import(`./_CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>w(()=>import(`./_D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>w(()=>import(`./_DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>w(()=>import(`./_DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>w(()=>import(`./_DX1BQOs8.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>w(()=>import(`./_aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>w(()=>import(`./_8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>w(()=>import(`./_DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>w(()=>import(`./_DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>w(()=>import(`./_B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>w(()=>import(`./_4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>w(()=>import(`./_UdsmMDCL.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>w(()=>import(`./_C1IUL_tW.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>w(()=>import(`./_nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>w(()=>import(`./_oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>w(()=>import(`./_DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>w(()=>import(`./_fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>w(()=>import(`./_BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>w(()=>import(`./_VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),ln=t({createOnigurumaEngine:()=>In,getDefaultWasmLoader:()=>Fn,loadWasm:()=>kn,setDefaultWasmLoader:()=>Pn}),un=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function dn(){return 2147483648}function fn(){return typeof performance<`u`?performance.now():Date.now()}var pn=(e,t)=>e+(t-e%t)%t;async function mn(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=dn();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,pn(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:fn,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var hn=Object.defineProperty,gn=(e,t,n)=>t in e?hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>gn(e,typeof t==`symbol`?t:t+``,n),_n=null;function vn(e){throw new un(e.UTF8ToString(e.getLastOnigError()))}var yn=class e{constructor(t){L(this,`utf16Length`),L(this,`utf8Length`),L(this,`utf16Value`),L(this,`utf8Value`),L(this,`utf16OffsetToUtf8`),L(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},bn=class e{constructor(t){if(L(this,`id`,++e.LAST_ID),L(this,`_onigBinding`),L(this,`content`),L(this,`utf16Length`),L(this,`utf8Length`),L(this,`utf16OffsetToUtf8`),L(this,`utf8OffsetToUtf16`),L(this,`ptr`),!_n)throw new un(`Must invoke loadWasm first.`);this._onigBinding=_n,this.content=t;let n=new yn(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=_n.omalloc(1e4),e._sharedPtrInUse=!0,_n.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(_n)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};L(bn,`LAST_ID`,0),L(bn,`_sharedPtr`,0),L(bn,`_sharedPtrInUse`,!1);var xn=bn,Sn=class{constructor(e){if(L(this,`_onigBinding`),L(this,`_ptr`),!_n)throw new un(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new yn(e[r]);t[r]=i.createString(_n),n[r]=i.utf8Length}let r=_n.omalloc(4*e.length);_n.HEAPU32.set(t,r/4);let i=_n.omalloc(4*e.length);_n.HEAPU32.set(n,i/4);let a=_n.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)_n.ofree(t[n]);_n.ofree(i),_n.ofree(r),a===0&&vn(_n),this._onigBinding=_n,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new xn(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Cn(e){return typeof e.instantiator==`function`}function wn(e){return typeof e.default==`function`}function Tn(e){return e.data!==void 0}function En(e){return typeof Response<`u`&&e instanceof Response}function Dn(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var On;function kn(e){if(On)return On;async function t(){_n=await mn(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Cn(n)?n=await n.instantiator(t):wn(n)?n=await n.default(t):(Tn(n)&&(n=n.data),En(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await jn(n)(t):await Mn(n)(t):Dn(n)||n instanceof WebAssembly.Module?n=await An(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await An(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return On=t(),On}function An(e){return t=>WebAssembly.instantiate(e,t)}function jn(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Mn(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Nn;function Pn(e){Nn=e}function Fn(){return Nn}async function In(e){return e&&await kn(e),{createScanner(e){return new Sn(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new xn(e)}}}var Ln=en({});nn(Ln,ln);var R=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rn(e){return zn(e)}function zn(e){return Array.isArray(e)?Bn(e):e instanceof RegExp?e:typeof e==`object`?Vn(e):e}function Bn(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zn(e[n]);return t}function Vn(e){let t={};for(let n in e)t[n]=zn(e[n]);return t}function Hn(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Un(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Un(e.substring(0,e.length-1)):e.substr(~t+1)}var Wn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gn=class{static hasCaptures(e){return e!==null&&(Wn.lastIndex=0,Wn.test(e))}static replaceCaptures(e,t,n){return e.replace(Wn,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Kn(e,t){return e<t?-1:+(e>t)}function qn(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Kn(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Jn(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Yn(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Xn=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Zn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(nr(e),t)}static createFromParsedTheme(e,t){return ar(e,t)}_cachedMatchRoot=new Xn(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>$n(e.parent,t.parentScopes));return n?new tr(n.fontStyle,n.foreground,n.background):null}},Qn=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function $n(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!er(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function er(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var tr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function nr(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Jn(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Jn(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new rr(l,u,e,o,s,c)}}return n}var rr=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},ir=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(ir||{});function ar(e,t){e.sort((e,t)=>{let n=Kn(e.scope,t.scope);return n!==0||(n=qn(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new or(t),o=new tr(n,a.getId(r),a.getId(i)),s=new lr(new cr(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Zn(a,o,s)}var or=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},sr=Object.freeze([]),cr=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||sr,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},lr=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),cr.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(qn(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new cr(e,t,n,r,i))}},ur=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=fr(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function dr(e){return e}function fr(e){return e}function pr(e,t){let n=[],r=hr(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(mr(i)){let e=[];do e.push(i),i=r.next();while(mr(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function mr(e){return!!e&&!!e.match(/[\w\.:]+/)}function hr(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function gr(e){typeof e.dispose==`function`&&e.dispose()}var _r=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},vr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},yr=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},br=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new _r(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new yr;for(let n of e)xr(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof _r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function xr(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof _r?Cr({baseGrammar:a,selfGrammar:i},r):Sr(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new _r(e))}function Sr(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];wr([r],t,n)}}function Cr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&wr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&wr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function wr(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Hn({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&wr(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Ar(i);switch(a.kind){case 0:Cr({...t,selfGrammar:t.baseGrammar},n);break;case 1:Cr(t,n);break;case 2:Sr(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Sr(a.ruleName,i,n):Cr(i,n)}else a.kind===4?n.add(new vr(a.scopeName,a.ruleName)):n.add(new _r(a.scopeName))}}}var Tr=class{kind=0},Er=class{kind=1},Dr=class{constructor(e){this.ruleName=e}kind=2},Or=class{constructor(e){this.scopeName=e}kind=3},kr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ar(e){if(e===`$base`)return new Tr;if(e===`$self`)return new Er;let t=e.indexOf(`#`);return t===-1?new Or(e):t===0?new Dr(e.substring(1)):new kr(e.substring(0,t),e.substring(t+1))}var jr=/\\(\d+)/,Mr=/\\(\d+)/g,Nr=-1,Pr=-2;function Fr(e){return e}function Ir(e){return e}var Lr=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gn.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gn.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Un(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Gn.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gn.replaceCaptures(this._contentName,e,t)}},Rr=class extends Lr{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},zr=class extends Lr{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Wr(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Br=class extends Lr{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vr=class extends Lr{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Wr(i,this.id),this.beginCaptures=a,this._end=new Wr(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Hr=class extends Lr{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Wr(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Wr(o,Pr),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Gr,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Ur=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Rr(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new zr(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Hn({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Br(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Hr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Vr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Ar(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Br||e instanceof Vr||e instanceof Hr)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Wr=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&jr.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Mr.lastIndex=0,this.source.replace(Mr,(e,t)=>Yn(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Gr=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Kr(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Kr(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Kr=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
3
3
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},qr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Jr=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new qr(e,8),this._embeddedLanguagesMatcher=new Yr(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new qr(0,0);_getBasicScopeAttributes=new Xn(e=>new qr(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Yr=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Yn(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Xr=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Zr(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Qr(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Xr(i,!0);f()}return new Xr(i,!1);function f(){let o=$r(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Nr){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),ii(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Vr){let r=o;ii(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Hr){let r=o;ii(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(ii(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Qr(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Hr&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ri(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Pr){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),ii(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function $r(e,t,n,r,i,a){let o=ei(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=ti(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function ei(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=ni(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function ti(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=ni(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function ni(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ri(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ii(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Zr(e,p,n&&d.start===0,d.start,f,i,!1,0),gr(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new ai(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ai=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function oi(e,t,n,r,i,a,o,s){return new ui(e,t,n,r,i,a,o,s)}function si(e,t,n,r,i){let a=pr(t,ci),o=Ur.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function ci(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(li(t[r],e))return n=r+1,!0;return!1})}function li(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var ui=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Jr(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=di(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=pr(e,ci);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)si(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&si(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Fr(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Ir(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=di(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ur.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===pi.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=ur.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?fi.createRootAndLookUpScopeName(a,r,this):fi.createRoot(`unknown`,r),t=new pi(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
4
4
|
`;let a=this.createOnigString(e),o=a.content.length,s=new hi(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Zr(this,a,i,0,t,s,!0,r);return gr(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function di(e,t){return e=Rn(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var fi=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Qn.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Qn(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Qn(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),ur.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},pi=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?fi.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Ir(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=fi.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Fr(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,fi.fromExtension(r,n.contentNameScopesList))}},mi=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):pr(e,ci).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>pr(e,ci).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},hi=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=ur.set(n,0,dr(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=ur.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},gi=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,oi(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},_i=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new gi(Zn.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Zn.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new mi(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new br(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},vi=pi.NULL;function yi(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function bi(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function xi(e){return Array.isArray(e)?e:[e]}async function Si(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Ci(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function wi(e){return e===`ansi`||Ci(e)}function Ti(e){return e===`none`}function Ei(e){return Ti(e)}var Di=/(\r?\n)/g;function Oi(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Di),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var ki={light:`#333333`,dark:`#bbbbbb`},Ai={light:`#fffffe`,dark:`#1e1e1e`},ji=`__shiki_resolved`;function Mi(e){if(e?.[ji])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?ki.light:ki.dark,n||=t.type===`light`?Ai.light:Ai.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,ji,{enumerable:!1,writable:!1,value:!0}),t}async function Ni(e){return[...new Set((await Promise.all(e.filter(e=>!wi(e)).map(async e=>await Si(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Pi(e){return(await Promise.all(e.map(async e=>Ei(e)?null:Mi(await Si(e))))).filter(e=>!!e)}function Fi(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new R(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Ii=class extends _i{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Mi(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Zn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Fi(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new R(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Li=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Ri=0;function zi(e){Ri+=1,e.warnings!==!1&&Ri>=10&&Ri%10==0&&console.warn(`[Shiki] ${Ri} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new R("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Mi),i=new Ii(new Li(e.engine,n),r,n,e.langAlias),a;function o(t){return Fi(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new R(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new R(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Ni(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Pi(e))}function g(){if(t)throw new R(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Ri)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Bi(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Pi(e.themes||[]),Ni(e.langs||[]),e.engine]);return zi({...e,themes:t,langs:n,engine:r})}var Vi=new WeakMap;function Hi(e,t){Vi.set(e,t)}function Ui(e){return Vi.get(e)}var Wi=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(xi(n).map(e=>[e,vi])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Gi(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Gi(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Ki(e,t){if(!(e instanceof Wi))throw new R(`Invalid grammar state`);return e.getInternalStack(t)}var qi=/,/,Ji=/ /;function Yi(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Ci(e.resolveLangAlias(n.lang||`text`))||Ti(r))return Oi(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new R(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new R(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Zi(t,o,i,a,n)}function Xi(...e){if(e.length===2)return Ui(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Ci(i)||Ti(a))throw new R(`Plain language does not have grammar state`);if(i===`ansi`)throw new R(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Wi(Qi(n,c,o,s,r).stateStack,c.name,o.name)}function Zi(e,t,n,r,i){let a=Qi(e,t,n,r,i),o=new Wi(a.stateStack,t.name,n.name);return Hi(a.tokens,o),a.tokens}function Qi(e,t,n,r,i){let a=yi(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Oi(e),u=i.grammarState?Ki(i.grammarState,n.name)??vi:i.grammarContextCode==null?vi:Qi(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=bi(r[ur.getForeground(s)],a),u=ur.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=ur.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(qi).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Ji))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?$i(t.scopes):ea(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function $i(e){return e.map(e=>({scopeName:e}))}function ea(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:ra(e,i,t.slice(0,r))}}return n}function ta(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function na(e,t,n){if(!ta(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ta(e[r],n[i])&&--r,--i;return r===-1}function ra(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(na(e,t,n)){r.push(a);break}return r}function ia(e,t,n,r=Yi){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Ui(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=aa(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Wi(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Hi(s,c),s}function aa(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var oa=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],sa=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};sa.prototype.normal={},sa.prototype.property={},sa.prototype.space=void 0;function ca(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new sa(n,r,t)}function la(e){return e.toLowerCase()}var ua=class{constructor(e,t){this.attribute=t,this.property=e}};ua.prototype.attribute=``,ua.prototype.booleanish=!1,ua.prototype.boolean=!1,ua.prototype.commaOrSpaceSeparated=!1,ua.prototype.commaSeparated=!1,ua.prototype.defined=!1,ua.prototype.mustUseProperty=!1,ua.prototype.number=!1,ua.prototype.overloadedBoolean=!1,ua.prototype.property=``,ua.prototype.spaceSeparated=!1,ua.prototype.space=void 0;var da=t({boolean:()=>z,booleanish:()=>pa,commaOrSpaceSeparated:()=>ga,commaSeparated:()=>ha,number:()=>B,overloadedBoolean:()=>ma,spaceSeparated:()=>V}),fa=0,z=_a(),pa=_a(),ma=_a(),B=_a(),V=_a(),ha=_a(),ga=_a();function _a(){return 2**++fa}var va=Object.keys(da),ya=class extends ua{constructor(e,t,n,r){let i=-1;if(super(e,t),ba(this,`space`,r),typeof n==`number`)for(;++i<va.length;){let e=va[i];ba(this,va[i],(n&da[e])===da[e])}}};ya.prototype.defined=!0;function ba(e,t,n){n&&(e[t]=n)}function xa(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ya(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[la(r)]=r,n[la(a.attribute)]=r}return new sa(t,n,e.space)}var Sa=xa({properties:{ariaActiveDescendant:null,ariaAtomic:pa,ariaAutoComplete:null,ariaBusy:pa,ariaChecked:pa,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:pa,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:pa,ariaFlowTo:V,ariaGrabbed:pa,ariaHasPopup:null,ariaHidden:pa,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:B,ariaLive:null,ariaModal:pa,ariaMultiLine:pa,ariaMultiSelectable:pa,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:pa,ariaReadOnly:pa,ariaRelevant:null,ariaRequired:pa,ariaRoleDescription:V,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:pa,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ca(e,t){return t in e?e[t]:t}function wa(e,t){return Ca(e,t.toLowerCase())}var Ta=xa({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ha,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alpha:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:V,autoFocus:z,autoPlay:z,blocking:V,capture:null,charSet:null,checked:z,cite:null,className:V,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:pa,controls:z,controlsList:V,coords:B|ha,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:ma,draggable:pa,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:V,height:B,hidden:ma,high:B,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:V,itemRef:V,itemScope:z,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:z,optimum:B,pattern:null,ping:V,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:V,required:z,reversed:z,rows:B,rowSpan:B,sandbox:V,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootCustomElementRegistry:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shadowRootSerializable:z,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:pa,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:pa,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:pa,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:z,disablePictureInPicture:z,disableRemotePlayback:z,exportParts:ha,part:V,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:wa}),Ea=xa({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:ga,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:V,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ha,g2:ha,glyphName:ha,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:ga,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ga,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ga,rev:ga,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ga,requiredFeatures:ga,requiredFonts:ga,requiredFormats:ga,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:ga,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ga,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ga,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ca}),Da=xa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Oa=xa({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:wa}),ka=xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Aa=/[A-Z]/g,ja=/-[a-z]/g,Ma=/^data[-\w.:]+$/i;function Na(e,t){let n=la(t),r=t,i=ua;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Ma.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ja,Fa);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ja.test(e)){let n=e.replace(Aa,Pa);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ya}return new i(r,t)}function Pa(e){return`-`+e.toLowerCase()}function Fa(e){return e.charAt(1).toUpperCase()}var Ia=ca([Sa,Ta,Da,Oa,ka],`html`),La=ca([Sa,Ea,Da,Oa,ka],`svg`),Ra={}.hasOwnProperty;function za(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Ra.call(t,e)){let n=String(t[e]);i=Ra.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Ba=/["&'<>`]/g,Va=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ha=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ua=/[|\\{}()[\]^$+*?.]/g,Wa=new WeakMap;function Ga(e,t){return e=e.replace(t.subset?Ka(t.subset):Ba,r),t.subset||t.escapeOnly?e:e.replace(Va,n).replace(Ha,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Ka(e){let t=Wa.get(e);return t||(t=qa(e),Wa.set(e,t)),t}function qa(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Ua,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Ja=/[\dA-Fa-f]/;function Ya(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Ja.test(String.fromCharCode(t))?r:r+`;`}var Xa=/\d/;function Za(e,t,n){let r=`&#`+String(e);return n&&t&&!Xa.test(String.fromCharCode(t))?r:r+`;`}var Qa=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),$a={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},eo=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],to={}.hasOwnProperty,no={},ro;for(ro in $a)to.call($a,ro)&&(no[$a[ro]]=ro);var io=/[^\dA-Za-z]/;function ao(e,t,n,r){let i=String.fromCharCode(e);if(to.call(no,i)){let e=no[i],a=`&`+e;return n&&Qa.includes(e)&&!eo.includes(e)&&(!r||t&&t!==61&&io.test(String.fromCharCode(t)))?a:a+`;`}return``}function oo(e,t,n){let r=Ya(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ao(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Za(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function so(e,t){return Ga(e,Object.assign({format:oo},t))}var co=/^>|^->|<!--|-->|--!>|<!-$/g,lo=[`>`],uo=[`<`,`>`];function fo(e,t,n,r){return r.settings.bogusComments?`<?`+so(e.value,Object.assign({},r.settings.characterReferences,{subset:lo}))+`>`:`<!--`+e.value.replace(co,i)+`-->`;function i(e){return so(e,Object.assign({},r.settings.characterReferences,{subset:uo}))}}function po(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function mo(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ho(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function go(e){return e.join(` `).trim()}var _o=/[ \t\n\f\r]/g;function vo(e){return typeof e==`object`?e.type===`text`&&yo(e.value):yo(e)}function yo(e){return e.replace(_o,``)===``}var bo=Co(1),xo=Co(-1),So=[];function Co(e){return t;function t(t,n,r){let i=t?t.children:So,a=(n||0)+e,o=i[a];if(!r)for(;o&&vo(o);)a+=e,o=i[a];return o}}var wo={}.hasOwnProperty;function To(e){return t;function t(t,n,r){return wo.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Eo=To({body:ko,caption:Do,colgroup:Do,dd:No,dt:Mo,head:Do,html:Oo,li:jo,optgroup:Fo,option:Io,p:Ao,rp:Po,rt:Po,tbody:Ro,td:Vo,tfoot:zo,th:Vo,thead:Lo,tr:Bo});function Do(e,t,n){let r=bo(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&vo(r.value.charAt(0)))}function Oo(e,t,n){let r=bo(n,t);return!r||r.type!==`comment`}function ko(e,t,n){let r=bo(n,t);return!r||r.type!==`comment`}function Ao(e,t,n){let r=bo(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function jo(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Mo(e,t,n){let r=bo(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function No(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Po(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Fo(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Io(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Lo(e,t,n){let r=bo(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Ro(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function zo(e,t,n){return!bo(n,t)}function Bo(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Vo(e,t,n){let r=bo(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Ho=To({body:Go,colgroup:Ko,head:Wo,html:Uo,tbody:qo});function Uo(e){let t=bo(e,-1);return!t||t.type!==`comment`}function Wo(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Go(e){let t=bo(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&vo(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Ko(e,t,n){let r=xo(n,t),i=bo(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Eo(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function qo(e,t,n){let r=xo(n,t),i=bo(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Eo(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Jo={name:[[`
|
|
5
5
|
\f\r &/=>`.split(``),`
|
|
@@ -1539,7 +1539,7 @@ diff --git`)}function Ug(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.star
|
|
|
1539
1539
|
`),a=Math.max(1,t-pS),o=Math.min(i.length,n+pS),s=r===`deletions`?`-`:r===`file`?`>`:`+`,c=[];for(let e=a;e<=o;e++){let r=e>=t&&e<=n?s:` `;c.push(`${r}${String(e).padStart(4)} | ${i[e-1]??``}`)}return c.join(`
|
|
1540
1540
|
`)}function CS(e){let t=3,n=/`+/g,r;for(;r=n.exec(e);)t=Math.max(t,r[0].length+1);return"`".repeat(t)}function wS(e){return e.split(/[@#]/)[0]}function TS(e){return e.split(`
|
|
1541
1541
|
`).filter(e=>e[0]===`+`||e[0]===`-`||e[0]===`>`).map(e=>e.slice(1)).join(`
|
|
1542
|
-
`)}var ES=`_lg _ch _bw`,DS=`_li _4`;function OS(t){if(t.length<=1)return null;let n=document.createElement(`select`);n.setAttribute(`aria-label`,`Send to session`),n.className=`_lo`;for(let r of t){let t=document.createElement(`option`);t.value=r.id,t.textContent=e(r),n.append(t)}return n}var kS=(e,t)=>e?.value||t[0]?.id||null;function AS(e,t,n){for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)}function jS(e,t){let n=document.createElement(`button`);return n.type=`button`,n.textContent=e,n.className=t,n}function MS(t,n,r,i){if(!n){t.className=`_r ${i?me:``} _s`,t.textContent=`Send`;let n=r[0];return n&&(t.title=`Send to ${e(n)}`),t}let a=document.createElement(`span`);return a.className=`_lm ${i?`_k5`:``}`,t.className=`_s _ln`,t.textContent=`Send to`,a.append(t,n),a}function NS(e,t,n){e.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t()),e.key===`Escape`&&(e.preventDefault(),n())}}function PS(e,t,n){let r=document.createElement(`div`);r.className=`_k1`;let i=document.createElement(`div`),a=document.createElement(`div`);a.className=`_k4`;let o=()=>{i.replaceChildren(),a.replaceChildren();let r=document.createElement(`p`);r.className=`_k2`,r.textContent=e.text;let o=jS(`Remove`,`_r ${me}`);o.onclick=()=>n.onDelete(e.id);let c=jS(`Edit`,`_r ${me}`);c.hidden=!n.onEdit,c.onclick=()=>s();let l=t.sessions(),u=l.length>0&&!!n.onSend,d=jS(`Send`,``);d.dataset.role=`send`,d.hidden=!u;let f=u?OS(l):null,p=f?`Send to`:`Send`;if(d.onclick=()=>{(async()=>{let t=kS(f,l);if(t&&!d.disabled){AS([o,c,d],!0,p);try{await n.onSend?.(e.id,t)}finally{AS([o,c,d],!1,p)}}})()},a.append(c,o),u&&a.append(MS(d,f,l,!0)),n.drifted){let e=document.createElement(`span`);e.className=`_9 ${we.warn} _k6`,e.textContent=`changed since`,e.title=`These lines changed since the comment; the agent gets them as they were`,a.append(e)}i.append(r)},s=()=>{i.replaceChildren(),a.replaceChildren();let t=document.createElement(`textarea`);t.value=e.text,t.rows=3,t.className=`_bj _k3`;let r=jS(`Save`,`_r _s`),s=jS(`Cancel`,`_r`),c=()=>{let i=t.value.trim();if(!i||i===e.text){o();return}(async()=>{AS([r,s],!0);try{await n.onEdit?.(e.id,i),e.text=i,o()}catch{AS([r,s],!1)}})()};r.onclick=c,s.onclick=()=>o(),NS(t,c,o),a.append(r,s),i.append(t),setTimeout(()=>{t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)},0)};return o(),r.append(i,a),r}function FS(e,t){let n=document.createElement(`div`);n.className=`_k1`;let r=document.createElement(`textarea`);r.placeholder=`Add a comment…`,r.rows=3,r.className=`_bj _k3`;let i=jS(`Add`,`_r`),a=jS(`Send`,``);a.dataset.role=`send`;let o=jS(`Cancel`,`_r`),s=e.sessions(),c=s.length>0&&!!t.onSend;a.hidden=!c;let l=c?OS(s):null,u=c?MS(a,l,s,!1):a,d=a.textContent,f=()=>{r.value.trim()&&t.onSave(r.value)},p=()=>{(async()=>{let e=r.value.trim(),n=kS(l,s);if(e&&n&&!a.disabled){AS([i,a,o],!0,d);try{await t.onSend?.(e,n)}finally{AS([i,a,o],!1,d)}}})()};i.onclick=f,a.onclick=p,o.onclick=()=>t.onCancel(),NS(r,c?p:f,()=>t.onCancel());let m=document.createElement(`div`);m.className=`_k4`,m.append(i),c&&m.append(u),m.append(o),n.append(r,m),r.addEventListener(`focus`,()=>{let t=window.visualViewport;if(!t)return;let i=()=>e.reveal(n,!0);t.addEventListener(`resize`,i),r.addEventListener(`blur`,()=>t.removeEventListener(`resize`,i),{once:!0})});let h=(e=0)=>{if(!r.isConnected||!r.getClientRects().length){e<120&&requestAnimationFrame(()=>h(e+1));return}r.focus({preventScroll:!0})};return setTimeout(h,0),n}var IS=e=>`/api/workspaces/${e}/review`;async function LS(e){return(await pe(IS(e))).comments||[]}function RS(e,t){return Ce(IS(e),{action:`comment`,...t})}function zS(e,t,n){return Ce(`${IS(e)}/${t}`,{text:n},`PATCH`)}function BS(e,t){return t===`all`?Ce(IS(e),{action:`clear`}):Promise.all(t.map(t=>pe(`${IS(e)}/${t}`,{method:`DELETE`})))}function VS(e,t,n){fetch(IS(e),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`seen`,heads:t,dirty:n}),keepalive:!0}).catch(()=>{})}var HS=`search-mark`,US=`mark.${HS}`,WS=`mark.${HS}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${HS} *,mark.${HS} *::before,mark.${HS} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${HS}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,GS={query:``,hit:null,keys:null},KS=new Map,qS=new WeakMap,JS=(e,t)=>t?`${e}\n${t.line}\n${t.side||``}`:e;function YS(e,t,n){GS.query=e,GS.hit=t,GS.keys=n?new Set(n):null;for(let[e,t]of KS)eC(e,t,!1);t&&XS(t)}function XS(e,t=0){requestAnimationFrame(()=>{requestAnimationFrame(()=>{let n=!1;for(let[r,i]of KS)if(i===e.key&&(n=!0,$S(r,e)||t>=40))return;t>=40||(!n||t<12)&&setTimeout(()=>XS(e,t+1),n?32:48)})})}function ZS(e,t){if(e.scrollWidth<=e.clientWidth+1)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=Math.min(24,n.width/8);if(r.left>=n.left+i&&r.right<=n.right-i)return;let a=r.left-n.left+e.scrollLeft-(n.width/2-r.width/2),o=Math.max(0,e.scrollWidth-e.clientWidth);e.scrollTo({left:Math.max(0,Math.min(a,o))})}function QS(e,t){let n=t.parentElement,r=e;for(;r&&r!==n;){if(r instanceof HTMLElement&&r.scrollWidth>r.clientWidth+1){let e=getComputedStyle(r).overflowX;if(e===`auto`||e===`scroll`)return r}let e=r.getRootNode(),t=r.parentElement??(e instanceof ShadowRoot?e.host:null);if(t===r)break;r=t}return null}function $S(e,t){let n=e.shadowRoot??e.querySelector(`diffs-container`)?.shadowRoot;if(!n)return!1;let r=n.querySelector(`mark.search-mark.active`)??(()=>{if(t.line<1)return null;let e=[...n.querySelectorAll(`[data-line="${t.line}"]`)],r=t.side||`additions`;return e.find(e=>iC(e)===r)??e[0]??null})();if(!r)return!1;let i=r.getBoundingClientRect();if(i.height===0&&i.width===0)return!1;let a=QS(r,e);return a&&ZS(a,r),!0}function eC(e,t,n=!0){let r=t&&GS.hit?.key===t?GS.hit:null,i=GS.query.trim(),a=!!i&&!!GS.keys&&!!t&&!GS.keys.has(t),o=a?``:JS(i,r),s=qS.get(e)!==o;(n||s)&&(qS.set(e,o),uC(e,a?``:i,r),n||lS(e),r&&s&&XS(r))}function tC(e,t){return KS.set(e,t),eC(e,t),()=>{KS.delete(e),qS.delete(e)}}function nC(e){eC(e,KS.get(e))}function rC(e){let t=e.querySelectorAll(US);if(!t.length)return;let n=new Set;for(let e of[...t])e.parentElement&&n.add(e.parentElement),e.replaceWith(...e.childNodes);for(let e of n)e.normalize()}function iC(e){let t=e.closest(`[data-code]`);return t?.hasAttribute(`data-deletions`)?`deletions`:t?.hasAttribute(`data-additions`)?`additions`:(e.getAttribute(`data-line-type`)||``).includes(`deletion`)?`deletions`:`additions`}function aC(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(US)||n.push(e);return n}function oC(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=t[i].length;if(n<=r+a)return{node:e[i],offset:Math.min(a,Math.max(0,n-r))};r+=a}let i=e.at(-1);return i?{node:i,offset:t.at(-1)?.length??0}:null}function sC(e,t,n,r,i){let a=oC(e,t,n),o=oC(e,t,r);if(!a||!o)return;let s=document.createRange();s.setStart(a.node,a.offset),s.setEnd(o.node,o.offset);let c=document.createElement(`mark`);c.className=i;try{c.append(s.extractContents()),s.insertNode(c)}catch{}}function cC(e,t,n,r){let i=aC(e);if(!i.length)return;let a=i.map(e=>e.textContent??``),o=a.join(``),s=n?o:o.toLowerCase(),c=[];for(let e=s.indexOf(t);e!==-1;e=s.indexOf(t,e+t.length))c.push([e,e+t.length]);if(!c.length)return;let l=dC(e,r)?`${HS} active`:HS;for(let e=c.length-1;e>=0;e--)sC(i,a,c[e][0],c[e][1],l)}var lC=new WeakMap;function uC(e,t,n){let r=[e],i=e.shadowRoot??e.querySelector(`diffs-container`)?.shadowRoot;i&&r.push(i);let a=t.trim(),o=/[A-Z]/.test(a),s=a&&!o?a.toLowerCase():a;for(let e of r){if(!s){rC(e);continue}for(let t of e.querySelectorAll(`[data-code] [data-line]`)){let e=t.textContent||``,r=(o?e:e.toLowerCase()).includes(s),i=r?`${o?`s`:`i`}${s}\n${t.getAttribute(`data-line`)}\n${+!!dC(t,n)}`:``,a=!!t.querySelector(US);i!==(a?lC.get(t):``)&&(a&&rC(t),lC.set(t,i),r&&cC(t,s,o,n))}}}function dC(e,t){return!!t&&t.line===Number(e.getAttribute(`data-line`))&&(t.side||`additions`)===iC(e)}var fC={apng:`image/apng`,avif:`image/avif`,bmp:`image/bmp`,gif:`image/gif`,ico:`image/x-icon`,jpeg:`image/jpeg`,jpg:`image/jpeg`,png:`image/png`,svg:`image/svg+xml`,webp:`image/webp`,pdf:`application/pdf`};function pC(e){let t=e.lastIndexOf(`.`),n=fC[t<0?``:e.slice(t+1).toLowerCase()];return n?{kind:n===`application/pdf`?`pdf`:`image`,type:n}:null}var mC=`_iw _bp _m`,hC=`<h1> </h1><nav aria-label="Review views"><a title="Every file in the workspace">Files</a><a title="What changed">Diff</a></nav>`,gC=` D l D b l`;function _C(e){y(e.a,`_Q`),y(e.c,[`_bB`,`_ko`])}var vC=(e,t)=>{d(e.b,t===`files`?`Files`:`Review`),y(e.d,[`_bD`,t===`files`&&`_bC`]),S(e.d,`aria-current`,t===`files`?`page`:void 0),y(e.e,[`_bD`,t===`changes`&&`_bC`]),S(e.e,`aria-current`,t===`changes`?`page`:void 0)},yC=(e,t)=>S(e.d,`href`,t),bC=(e,t)=>S(e.e,`href`,t),xC=re,SC=(e=>`/${e}&`)(A);function CC(e){k(e.a,oe)}var wC=(e,t)=>Se(e.a,t),TC=(e,t)=>M(e.a,t),EC=((e,t,n)=>`<div><div role=group><button type=button><span aria-hidden=true>${e}<span> </span></span><!></button><button type=button aria-label="Send options" aria-haspopup=menu></button></div><span>${t} No comments</span></div><div popover=auto role=menu><!><button type=button role=menuitem><span>${n}</span><span>Copy as markdown</span></button></div>`)(xC,xC,ft),DC=((e,t,n)=>` D D D D/${e}& D m%l l D/${t}&m D%b D D/${n}&l m`)(SC,SC,F),OC=e=>{dt(e.a),lt(e.a,12),P(e.a)},kC=u(7,3,t=>d(t.b,e(t._.a6))),AC=e=>{kC._(e),y(e.a,[`_le`,`_S`]),y(e.c,`_R`)},jC=u(7,0,e=>d(e.a,e._.z===`copied`?`Copied`:`Copy failed`)),MC=jC,NC=c(1,ct,(e=>`/${e}&`)(st),OC),PC=v(8,e=>{S(e.a,`aria-checked`,e.h===e._._.a9?`true`:`false`),NC(e,e.h===e._._.a9?0:1)}),FC=b(43,PC,e=>e._._),IC=l(`r2`,e=>s(e.a,`click`,function(){QC(e._._,e.h),e._._.l.hidePopover()})),LC=e=>{FC(e),y(e.a,DS),y(e.b,`_lj`),Ve(e.c,14),He(e.c),y(e.d,`_lk`),IC(e)},RC=E(7,PC),zC=(e,t)=>Ue(e.c,t),BC=(t,n)=>{d(t.e,e(n)),RC(t,n?.id),zC(t,n?.agent)},VC=p(1,(e=>`<button type=button role=menuitemradio><span></span>${e}<span> </span></button>`)(Ke),(e=>` D b/${e}& D m`)(`b%c`),LC,(e,t)=>BC(e,t[0])),HC=u(12,0,e=>VC(e,[e._.a3,`id`])),UC=e=>{HC._(e),y(e.a,`_lh`),y(e.c,`_ll`)},WC=E(38),GC=v(33,e=>WC(e,gw(e)),2),KC=c(7,` `,` `,MC,`Sending…`,0,0,`Copy`,0,0,`<span>Send to <!></span><span>Send</span>`,` Db%l `,AC,`Send`),qC=v(34,e=>KC(e,e.z?0:e.x?1:e.a6?e.a5>1?3:4:2),3),JC=f(23,e=>{S(e.c,`disabled`,e.x),S(e.i,`disabled`,e.x),GC(e),qC(e)}),YC=v(37,t=>S(t.c,`title`,t.u?t.a6?`Send ${t.aa} to ${e(t.a6)}`:`Copy ${t.aa} as markdown`:`No comments to send`),2),XC=E(32,e=>{dw(e,e.a6?.id),GC(e),YC(e),qC(e),kC(e)}),ZC=v(30,e=>XC(e,e.a3.find(t=>t.id===e.y)??e.a3[0]??null)),QC=f(24,ZC),$C=f(25,e=>{qC(e),jC(e)}),ew=(e,t)=>ow(e,t.id),tw=l(`r3`,e=>{s(e.c,`click`,function(){e.a6?e.ac():e.ad()}),s(e.i,`click`,function(){let t=e.l;t.showPopover(),r(t,e.b.getBoundingClientRect(),{align:`end`})}),s(e.n,`click`,function(){e.l.hidePopover(),e.ad()})});function nw(e){y(e.c,`_lb`),y(e.d,[`_w`,`_lc`]),CC(e.e),wC(e.e,18),TC(e.e,`_x`),y(e.f,[ue,`_ld`]),y(e.i,`_lf`),CC(e.k),wC(e.k,16),TC(e.k),y(e.l,ES),y(e.n,DS),y(e.o,`_lj`),mt(e.p),pt(e.p,14),ht(e.p),y(e.q,`_lk`),JC(e,!1),QC(e,null),$C(e,null),ew(e,{id:0}),tw(e)}var rw=E(39),iw=v(28,e=>rw(e,_w(e))),aw=l(`r4`,e=>O(e,{onDestroy:function(){clearTimeout(e.a1)}})),ow=E(27,e=>{iw(e),aw(e)}),sw=E(29,e=>{lw(e,e.a3.length),ZC(e),HC(e)}),cw=c(12,`<span>Send to</span><!><span role=separator></span>`,` b%b `,UC),lw=E(31,e=>{cw(e,+!e.a5),qC(e)}),uw=(e,t)=>sw(e,t||[]),dw=E(35,D(FC)),fw=E(36,e=>{S(e.b,`aria-label`,e.aa),YC(e)}),pw=E(20,e=>{y(e.a,[`_k8`,!e.u&&`_k_`]),y(e.b,[`_k7`,!e.u&&`_k9`]),S(e.b,`inert`,!e.u),d(e.g,e.u>99?`99+`:e.u),y(e.j,[`_la`,!!e.u&&`_k9`]),fw(e,Ie(e.u,`comment`)),YC(e)}),mw=E(21,GC),hw=E(22,iw),gw=e=>()=>{(async()=>{if(e.a6&&!e.x){JC(e,!0);try{await e.v(e.a6?.id)}finally{JC(e,!1)}}})()},_w=e=>()=>{(async()=>{$C(e,await e.w()?`copied`:`failed`),clearTimeout(e.a1),e.a1=setTimeout(()=>{$C(e,null)},1500)})()};_.r0=gw,_.r1=_w;var vw=`file-tree-container`,yw=`data-file-tree-style`,bw=`data-file-tree-unsafe-css`,xw=`data-file-tree-scrollbar-measure`,Sw=`data-file-tree-scrollbar-gutter-measured`,Cw=`--trees-scrollbar-gutter-measured`,ww=`header`,Tw=`context-menu`,Ew=`context-menu-trigger`,Dw=5,Ow=32,kw=128;function Aw(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function jw(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Mw(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 Nw(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 Pw(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function Fw(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 Iw(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,Bw(e,t)}function Lw(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=Nw(e).get(t);if(i===void 0)return;let a=i>>Dw;e.childVisibleChunkSums[a]+=r}function Rw(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=Vw(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=Ow}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 zw(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>Dw;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<Dw}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 Bw(e,t){if(t.childIds.length<kw){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/Ow),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>>Dw]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function Vw(e,t,n,r){let i=Math.min(t.childIds.length,n+Ow),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 Hw=7,Uw=3,Ww=8,Gw=4;function Kw(e,t,n=0){return e<<Gw|n<<Uw|t}function qw(e){return e.depthAndFlags>>>Gw}function Jw(e){return(e.depthAndFlags&Ww)>>Uw}function G(e){return(e.depthAndFlags&Ww)!==0}function Yw(e){return e.depthAndFlags&Hw}function Xw(e,t){return(Yw(e)&t)!==0}function Zw(e,t){e.depthAndFlags|=t}function Qw(e,t){e.depthAndFlags=Kw(t,Yw(e),Jw(e))}var $w=Symbol(`benchmarkInstrumentation`);function eT(e,t){return t==null||Object.defineProperty(e,$w,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function tT(e){return e==null?null:e[$w]??null}function K(e,t,n){return e==null?n():e.measurePhase(t,n)}function nT(e,t,n){Number.isFinite(n)&&e!=null&&e.setCounter(t,n)}function rT(e){return e>=48&&e<=57}function iT(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!rT(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&&rT(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 aT(e){let t=e.toLowerCase();return{lowerValue:t,tokens:iT(t)}}function oT(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 sT(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=oT(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function cT(e,t,n){let r=sT(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function lT(e,t){return cT(e,t,aT)}function uT(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function dT(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=uT(e,r);return a===uT(t,r)?lT(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 fT(e,t){return dT(e,t)}function pT(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=aT(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=uT(e,n);return o===uT(t,n)?cT(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 mT(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=aT(r);return e.sortKeyById[t]=i,i}function hT(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function gT(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 _T(e){let{hasTrailingSlash:t,segments:n}=gT(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function vT(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=gT(e);return{requiresDirectory:t,segments:n}}function yT(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[aT(``)]}}function bT(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 xT(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var ST=Symbol(`pathStorePreparedInputKind`);function CT(e,t){return e[ST]=t,e}function wT(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function TT(e,t,n){return n==="default"?fT(e,t):n(wT(e),wT(t))}function ET(){return{depthAndFlags:Kw(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function DT(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 OT(e){return e.isDirectory?e.segments.length:e.segments.length-1}function kT(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 AT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function jT(e,t={}){return LT(e,t).map(e=>e.path)}function MT(e,t={}){let n=LT(e,t);return CT({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function NT(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 CT({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function PT(e){let t=e,n=t.preparedPaths;if(t[ST]===`prepared`&&n!=null)return n;if(!kT(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function FT(e){let t=e;return t[ST]===`presorted`&&t.presortedPaths!=null||AT(t.presortedPaths)?t.presortedPaths:null}function IT(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function LT(e,t={}){let n=hT(t),r=tT(t);nT(r,`workload.inputFiles`,e.length);let i=K(r,`store.preparePathEntries.parse`,()=>e.map(e=>_T(e)));return K(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>TT(e,t,n.sort))),i}var RT=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[ET()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=yT();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=tT(e),this.options=hT(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,Aw())}appendPaths(e){return K(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>_T(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,K(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return K(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:Kw(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:Kw(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}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:Kw(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=_T(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:Kw(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:Kw(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=_T(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(K(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||K(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"?pT(this.lastPreparedPath,e,this.segmentSortKeyCache):TT(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=OT(e),i=n==null?0:OT(n),a=n==null?0:DT(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=bT(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:Kw(qw(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),Pw(i,s),s}createFileChildUnchecked(e,t){let n=bT(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:Kw(qw(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Pw(r,a),a}getOrCreateDirectoryChild(e,t){let n=bT(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&&!G(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:Kw(qw(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Pw(r,a),this.directories.set(a,Aw()),a}createDirectoryChild(e,t){let n=bT(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:Kw(qw(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Pw(r,a),this.directories.set(a,Aw()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!G(n))throw Error(`Path is not a directory: "${t}"`);if(Xw(n,1))throw Error(`Duplicate path: "${t}"`);Zw(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,jw());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(G(a)){let t=jw();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;G(n)&&this.directories.set(t,Aw());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),Pw(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!G(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 Iw(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function zT(e,t=`closed`,n=null){let r=VT(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 BT(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function VT(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 HT(e,t){return Xw(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&qw(t)<=e.defaultExpansion}function UT(e,t,n=e.snapshot.nodes[t]){return n==null||!G(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:HT(e,n)}function WT(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!G(r))return;let i=HT(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 GT(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 KT(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function qT(e,t){let n=GT(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 JT(e,t){let n=GT(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function YT(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 XT(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function ZT(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 QT(e,t){e.directoryLoadInfoById.delete(t)}function $T(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 eE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function tE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function nE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function rE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function iE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function aE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function oE(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 sE(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 cE(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 lE(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 uE(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 dE(e,t,n){return{...n,visibleCountDelta:SE(e)-t}}function fE(e,t){let n=SE(e),r=BT();e.transactionStack.push(r);try{t()}catch(t){throw hE(e,r,!1),t}hE(e,r,!0,SE(e)-n)}function pE(e,t){let n=e.instrumentation;if(n==null){mE(e,t);return}K(n,`store.events.record`,()=>mE(e,t))}function mE(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){bE(e,t);return}n.events.push(t),yE(n,t)}function hE(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?vE(i,t):K(n,`store.events.batch.merge`,()=>vE(i,t));return}let a=gE(t,r),o=e.instrumentation;if(o==null){bE(e,a);return}K(o,`store.events.batch.commit`,()=>bE(e,a))}function gE(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 _E(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function vE(e,t){for(let n of t.events)e.events.push(n);_E(e,t)}function yE(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function bE(e,t){let n=e.instrumentation;if(n==null){xE(e,t);return}K(n,`store.events.emit`,()=>xE(e,t))}function xE(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function SE(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function CE(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!G(n)||Xw(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||!G(a)?null:i}function wE(e,t){let n=t;for(;;){let t=CE(e,n);if(t==null)return n;n=t}}function TE(e,t){let n=[t],r=t;for(;;){let t=CE(e,r);if(t==null)return n;n.push(t),r=t}}function EE(e,t){let n=t==null?e.snapshot.rootId:FE(e,t);return n==null?[]:LE(e,n)}function DE(e,t){let n=_T(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=QE(e,ZE(e,r)),{createdNodeIds:a,directoryId:o}=RE(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=Y(e,o);if(Xw(n,1))throw Error(`Path already exists: "${t}"`);Zw(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=BE(e,o,n.basename),s.add(c);ME(e,o);let l=QE(e,o);return eE({affectedAncestorIds:PE(e,c),affectedNodeIds:[...s],path:t,projectionChanged:$E(i,l)})}function OE(e,t,n){let r=FE(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=Y(e,r);if(Xw(i,2))throw Error(`The root node cannot be removed`);if(G(i)&&J(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=QE(e,a),s=YE(e,r);UE(e,a,r,i.nameId),XE(e,a),ME(e,a);let c=QE(e,a);return tE({affectedAncestorIds:PE(e,a),affectedNodeIds:s,path:t,projectionChanged:$E(o,c),recursive:n.recursive===!0})}function kE(e,t,n,r){let i=FE(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=Y(e,i);if(Xw(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=qE(e,i,n),c=QE(e,a.parentId),l=QE(e,s.parentId),u=xT(e.snapshot.segmentTable,a.nameId),d=bT(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(G(a)&&rD(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=Mw(e.snapshot.nodes,J(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&JE(e,p,o,Jw(a))===`skip`)return null;let m=a.parentId;UE(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),nD(e,i),HE(e,s.parentId,i),XE(e,m),e.pathCacheVersion++,ME(e,m),s.parentId!==m&&ME(e,s.parentId);let h=QE(e,m),g=QE(e,s.parentId);return nE({affectedAncestorIds:[...new Set([...PE(e,m),...PE(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:eD([c,l],[h,g]),to:q(e,i)})}function AE(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function jE(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function q(e,t){let n=Y(e,t),r=AE(e,t);if(r!=null)return r;if(Xw(n,2))return jE(e,t,``);let i=q(e,n.parentId),a=xT(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return jE(e,t,G(n)?`${o}/`:o)}function ME(e,t){let n=e.instrumentation;if(n==null){aD(e,t);return}K(n,`store.recomputeCountsUpwardFrom`,()=>aD(e,t))}function NE(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||!G(o)){iD(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){iD(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function PE(e,t){let n=[],r=t;for(;r!=null;){let t=Y(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function FE(e,t){if(t.length===0)return e.snapshot.rootId;let n=vT(t);return IE(e,n.segments,n.requiresDirectory)}function IE(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=J(e,r),a=Mw(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=Y(e,r);return n&&!G(i)?null:r}function J(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 Y(e,t){let n=e.snapshot.nodes[t];if(n===void 0||Xw(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function LE(e,t){let n=e.snapshot.nodes[t];if(n===void 0||Xw(n,4))return[];if(!G(n))return[q(e,t)];if(J(e,t).childIds.length===0)return Xw(n,1)&&!Xw(n,2)?[q(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||Xw(n,4)){i.pop();continue}if(!G(n)){r.push(q(e,t.nodeId)),i.pop();continue}let a=J(e,t.nodeId);if(a.childIds.length===0){Xw(n,1)&&!Xw(n,2)&&r.push(q(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 RE(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=bT(e.snapshot.segmentTable,i),a=J(e,r),o=Mw(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!G(Y(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=zE(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function zE(e,t,n){let r=Y(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Kw(qw(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,Aw()),HE(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function BE(e,t,n){let r=bT(e.snapshot.segmentTable,n),i=J(e,t);if(Mw(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${sD(e,t,n)}"`);let a=Y(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Kw(qw(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),HE(e,t,o),e.activeNodeCount++,o}function VE(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}WE(e,n,o)<0?i=a:r=a+1}return r}function HE(e,t,n){let r=J(e,t),i=Y(e,n);Mw(e.snapshot.nodes,r).set(i.nameId,n),Lw(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=VE(e,r,n);r.childIds.splice(a,0,n),Fw(r,a),Bw(e.snapshot.nodes,r)}function UE(e,t,n,r){let i=J(e,t),a=Nw(i),o=a.get(n)??-1;Mw(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&Lw(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),Fw(i,o),Bw(e.snapshot.nodes,i))}function WE(e,t,n){let r=e.snapshot.options.sort;return r==="default"?GE(e,t,n):r(KE(e,t),KE(e,n))}function GE(e,t,n){let r=Y(e,t),i=Y(e,n),a=G(r);if(a!==G(i))return a?-1:1;let o=sT(mT(e.snapshot.segmentTable,r.nameId),mT(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=xT(e.snapshot.segmentTable,r.nameId),c=xT(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function KE(e,t){let n=Y(e,t),r=q(e,t),i=G(n),a=i?r.slice(0,-1):r;return{basename:xT(e.snapshot.segmentTable,n.nameId),depth:qw(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function qE(e,t,n){let r=Y(e,t),i=FE(e,n);if(i!=null){let t=Y(e,i);if(G(t))return{basename:xT(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=vT(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=vT(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:IE(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function JE(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${q(e,t)}"`);let i=Y(e,t);if(Jw(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(G(i)&&J(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return YE(e,t),UE(e,a,t,o),XE(e,a),ME(e,a),`handled`}function YE(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=Y(e,t.nodeId);if(t.visitedChildren||!G(i)){G(i)&&e.snapshot.directories.delete(t.nodeId),Zw(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),QT(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=J(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 XE(e,t){let n=t;for(;n!=null;){let t=Y(e,n);if(!G(t)||Xw(t,2)||J(e,n).childIds.length>0)return;Zw(t,1),n=t.parentId===n?null:t.parentId}}function ZE(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=Mw(e.snapshot.nodes,J(e,n)).get(t);if(i==null||!G(Y(e,i)))break;n=i}return n}function QE(e,t){let n=tD(e,t);if(n==null)return null;let r=wE(e,n),i=Y(e,r),a=n===r?null:TE(e,n).map(t=>q(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:J(e,r).childIds.length>0,path:q(e,r),terminalKind:Jw(i)})}function $E(e,t){return eD([e],[t])}function eD(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 tD(e,t){let n=t;for(;n!=null;){let t=Y(e,n);if(!G(t)||Xw(t,2))return null;if(!UT(e,n,t))return n;n=t.parentId}return null}function nD(e,t){let n=Y(e,t);if(Qw(n,(t===e.snapshot.rootId?-1:qw(Y(e,n.parentId)))+1),!G(n))return;let r=J(e,t);for(let t of r.childIds)nD(e,t)}function rD(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=Y(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function iD(e,t,n=Y(e,t),r=!1){let i=e.instrumentation;if(i==null){oD(e,t,n,r);return}K(i,`store.recomputeNodeCounts`,()=>oD(e,t,n,r))}function aD(e,t){let n=t;for(;n!=null;){let t=Y(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(iD(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&Lw(J(e,s),n,a,o),n=s}}function oD(e,t,n,r){if(!G(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=J(e,t);if(r){let t=e.instrumentation;t==null?Iw(e.snapshot.nodes,i):K(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>Iw(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,Xw(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=CE(e,t)==null?UT(e,t,n)?1+o:1:o}function sD(e,t,n){let r=q(e,t);return r.length===0?n:`${r}${n}`}function cD(e){return e!=null&&!Xw(e,4)}function lD(e,t){let n=e.snapshot.nodes[t];return!cD(n)||!G(n)||Xw(n,2)?null:n}function uD(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&cD(e.snapshot.nodes[n])&&(t+=1);return t}function dD(e){return Math.max(0,e.valueById.length-1)}function fD(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:uD(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:dD(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function pD(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 mD(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)lD(e,n)!=null&&t.push(q(e,n));for(let t of e.expandedDirectoryIds)lD(e,t)!=null&&n.push(q(e,t));return{collapsedPaths:t,expandedPaths:n}}function hD(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)lD(e,n)!=null&&KT(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:q(e,n)});return t}function gD(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=FE(e,n);t!=null&&WT(e,t,!0,Y(e,t))}for(let n of t.collapsedPaths){let t=FE(e,n);t!=null&&WT(e,t,!1,Y(e,t))}}function _D(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=FE(e,n.path);t!=null&&lD(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function vD(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function yD(e){let t=e.snapshot.segmentTable,n=yT();for(let r of e.snapshot.nodes)if(cD(r)){if(Xw(r,2)){r.nameId=0;continue}r.nameId=bT(n,xT(t,r.nameId))}e.snapshot.segmentTable=n}function bD(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!cD(r)||!G(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return cD(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[Y(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),Iw(e.snapshot.nodes,n)}}function xD(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(cD(n))break;--t}e.snapshot.nodes.length=t+1}function SD(e){let t=mD(e),n=hD(e);K(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>vD(e)),K(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>yD(e)),K(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>bD(e)),K(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>xD(e)),K(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>gD(e,t)),K(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>_D(e,n)),K(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>NE(e,e.snapshot.rootId))}function CD(e){let t=mD(e),n=hD(e),r=K(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>EE(e)),i=eT({...e.snapshot.options},e.instrumentation),a=K(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new RT(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,K(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>gD(e,t)),K(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>_D(e,n)),K(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>NE(e,e.snapshot.rootId))}function wD(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function TD(e,t){let n=fD(e);t===`stable`?K(e.instrumentation,`store.cleanup.stable`,()=>SD(e)):K(e.instrumentation,`store.cleanup.aggressive`,()=>CD(e));let r=fD(e);return pD(t,t===`stable`,n,r)}var ED=64;function DD(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 OD(e){return Y(e,e.snapshot.rootId).visibleSubtreeCount}function kD(e,t,n,r){let i=Y(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function AD(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:YD(e,t.cursor),setSize:t.setSize,subtreeEndIndex:kD(e,t.cursor,t.index,n)}}function jD(e,t,n,r,i,a){let o=J(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=Rw(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return MD(e,u,l,r+c,i+1,s,o.childIds.length,a)}function MD(e,t,n,r,i,a,o,s){if(!G(Y(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=UD(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=Y(e,c.terminalNodeId);if(!G(l)||!UT(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return jD(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function ND(e,t){let n=OD(e);if(t<0||t>=n)return null;let r=jD(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>q(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=AD(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:YD(e,r.cursor),setSize:r.setSize,subtreeEndIndex:kD(e,r.cursor,r.index,n)}}function PD(e,t,n){let r=e.instrumentation,i=OD(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 JD(e,o+1);let t=[],n=BD(e,a);for(let r=a;r<=o&&n!=null;r++){let r=YD(e,n);t.push(r),n=GD(e,n)}return t}let s=[],c=0,l=0,u=K(r,`store.getVisibleSlice.selectFirstRow`,()=>BD(e,a));for(let t=a;t<=o&&u!=null;t++){let t=K(r,`store.getVisibleSlice.materializeRow`,()=>YD(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=K(r,`store.getVisibleSlice.advanceCursor`,()=>GD(e,u))}return nT(r,`workload.visibleRowsRead`,s.length),nT(r,`workload.flattenedRowsRead`,c),nT(r,`workload.flattenedSegmentsRead`,l),s}function FD(e,t=OD(e)){let n=e.instrumentation;return n==null?qD(e,t):K(n,`store.getVisibleTreeProjection`,()=>qD(e,t))}function ID(e){return KD(FD(e))}function LD(e,t){let n=FE(e,t);if(n==null||n===e.snapshot.rootId||G(Y(e,n))&&wE(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=Y(e,i).parentId,n=J(e,t),s=Nw(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=zw(a,n,s),t!==o){let n=Y(e,t),a=CE(e,t);if(!UT(e,t,n)&&a!==i)return null;wE(e,t)===t&&(r+=1)}i=t}return r}function RD(e,t){let n=FE(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=Y(e,n);if(!G(r))throw Error(`Path is not a directory: "${t}"`);return UT(e,n,r)?null:(WT(e,n,!0,r),ME(e,n),rE({affectedAncestorIds:PE(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function zD(e,t){let n=FE(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=Y(e,n);if(!G(r))throw Error(`Path is not a directory: "${t}"`);return UT(e,n,r)?(WT(e,n,!1,r),ME(e,n),iE({affectedAncestorIds:PE(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function BD(e,t){return t<0||t>=OD(e)?null:VD(e,e.snapshot.rootId,t,-1)}function VD(e,t,n,r){let i=J(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?Rw(e.snapshot.nodes,i,n):K(a,`store.getVisibleSlice.selectChildIndex`,()=>Rw(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return HD(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function HD(e,t,n,r){if(!G(Y(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=UD(e,t,r);if(n===0)return i;let a=Y(e,i.terminalNodeId);if(!G(a)||!UT(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return VD(e,i.terminalNodeId,n-1,i.visibleDepth)}function UD(e,t,n){return G(Y(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:wE(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:K(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>wE(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function WD(e,t){let n=Y(e,t);if(!G(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||CE(e,r)!==t}function GD(e,t){let n=Y(e,t.terminalNodeId);if(G(n)){let r=J(e,t.terminalNodeId);if(UT(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:HD(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=Y(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=J(e,n),o=Nw(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 HD(e,s,0,i);WD(e,r)&&i--,r=n}}function KD(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 qD(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(ED);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=DD(o,y);let x,S=_;if(G(v))S=f?wE(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:q(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&&G(C)&&UT(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 JD(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(!G(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:q(e,f)};continue}let h=l?wE(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=YD(e,g);let _=i[h];_!=null&&G(_)&&UT(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function YD(e,t){let n=Y(e,t.terminalNodeId),r=G(n)?XD(e,t):null,i=q(e,t.terminalNodeId),a=xT(e.snapshot.segmentTable,n.nameId),o=G(n)&&J(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?TE(e,t.headNodeId).map(n=>{let r=Y(e,n);return{isTerminal:n===t.terminalNodeId,name:xT(e.snapshot.segmentTable,r.nameId),nodeId:n,path:q(e,n)}}):K(c,`store.getVisibleSlice.flatten.collectSegments`,()=>TE(e,t.headNodeId).map(n=>{let r=Y(e,n);return{isTerminal:n===t.terminalNodeId,name:xT(e.snapshot.segmentTable,r.nameId),nodeId:n,path:q(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:G(n)&&UT(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:G(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function XD(e,t){if(t.headNodeId===t.terminalNodeId)return KT(e,t.terminalNodeId);let n=TE(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=KT(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var ZD=8;function QD(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function $D(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&ZD)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&ZD)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function eO(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||!G(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&&Bw(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&G(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,Bw(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function tO(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=QD(e.snapshot);$D(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&Bw(n,i)}}function nO(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var rO=class e{#e;constructor(e={}){let t=tT(e),n=K(t,`store.builder.create`,()=>new RT(e));if(e.preparedInput!=null){let t=FT(e.preparedInput);t==null?n.appendPreparedPaths(PT(e.preparedInput),!1):n.appendPresortedPaths(t,IT(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(K(t,`store.preparePathEntries`,()=>LT(r,e)))}let r=K(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=K(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=K(t,`store.state.create`,()=>zT(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:K(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||nO(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&K(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?K(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>tO(this.#e)):K(t,`store.state.initializeOpenVisibleCounts`,()=>eO(this.#e)):K(t,`store.state.recomputeCounts`,()=>NE(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return jT(e,t)}static prepareInput(e,t={}){return MT(e,t)}static preparePresortedInput(e){return NT(e)}list(e){return K(this.#e.instrumentation,`store.list`,()=>EE(this.#e,e))}add(e){K(this.#e.instrumentation,`store.add`,()=>{let t=OD(this.#e);pE(this.#e,dE(this.#e,t,DE(this.#e,e)))})}remove(e,t={}){K(this.#e.instrumentation,`store.remove`,()=>{let n=OD(this.#e);pE(this.#e,dE(this.#e,n,OE(this.#e,e,t)))})}move(e,t,n={}){K(this.#e.instrumentation,`store.move`,()=>{let r=OD(this.#e),i=kE(this.#e,e,t,n);i!=null&&pE(this.#e,dE(this.#e,r,i))})}batch(e){fE(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})}})}getVisibleCount(){return K(this.#e.instrumentation,`store.getVisibleCount`,()=>OD(this.#e))}getVisibleSlice(e,t){return K(this.#e.instrumentation,`store.getVisibleSlice`,()=>PD(this.#e,e,t))}getVisibleRowContext(e){return K(this.#e.instrumentation,`store.getVisibleRowContext`,()=>ND(this.#e,e))}getVisibleTreeProjection(){return ID(this.#e)}getVisibleTreeProjectionData(e){return FD(this.#e,e)}getVisibleIndex(e){return K(this.#e.instrumentation,`store.getVisibleIndex`,()=>LD(this.#e,e))}getPathInfo(e){return K(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=FE(this.#e,e);if(t==null)return null;let n=Y(this.#e,t);return{depth:qw(n),kind:G(n)?`directory`:`file`,path:q(this.#e,t)}})}isExpanded(e){return K(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=Y(this.#e,t);return UT(this.#e,t,n)})}expand(e){K(this.#e.instrumentation,`store.expand`,()=>{let t=OD(this.#e),n=RD(this.#e,e);n!=null&&pE(this.#e,dE(this.#e,t,n))})}collapse(e){K(this.#e.instrumentation,`store.collapse`,()=>{let t=OD(this.#e),n=zD(this.#e,e);n!=null&&pE(this.#e,dE(this.#e,t,n))})}on(e,t){return $T(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return KT(this.#e,t)}markDirectoryUnloaded(e){K(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(J(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=OD(this.#e);JT(this.#e,t),pE(this.#e,dE(this.#e,n,aE({affectedAncestorIds:PE(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return K(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=OD(this.#e),r=qT(this.#e,t);return pE(this.#e,dE(this.#e,n,oE({affectedAncestorIds:PE(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return K(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||KT(this.#e,n)!==`loading`||!XT(this.#e,n,e.attemptId))return!1;let r=q(this.#e,n);this.validateChildPatch(r,t);let i=OD(this.#e),a=[];for(let e of t.operations){iO(r,e);let t=OD(this.#e);switch(e.type){case`add`:a.push(dE(this.#e,t,DE(this.#e,e.path)));break;case`remove`:a.push(dE(this.#e,t,OE(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=kE(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(dE(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return pE(this.#e,dE(this.#e,i,sE({affectedAncestorIds:PE(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:q(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return K(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=OD(this.#e),r=YT(this.#e,t,e.attemptId);return pE(this.#e,dE(this.#e,n,cE({affectedAncestorIds:PE(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:q(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return K(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=OD(this.#e),i=ZT(this.#e,n,e.attemptId,t);return pE(this.#e,dE(this.#e,r,lE({affectedAncestorIds:PE(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:q(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return K(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(wD(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=OD(this.#e),n=TD(this.#e,e.mode??`stable`);return pE(this.#e,dE(this.#e,t,uE({...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=J(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??aT(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=sT(mT(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(!G(Y(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=Y(this.#e,n);UT(this.#e,n,i)||(WT(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=Y(this.#e,e);if(!UT(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=FE(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!G(Y(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!G(Y(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=Y(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=Y(this.#e,e),r=CE(this.#e,e);if(!UT(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 iO(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}"`)}}var aO={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function oO(e,t){if(typeof e==`number`)return{itemHeight:t??aO.default.itemHeight,factor:e};let n=aO[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var sO=aO.default.itemHeight,cO=`@layer base {
|
|
1542
|
+
`)}var ES=`_ll _cr _bw`,DS=`_ln _4`;function OS(t){if(t.length<=1)return null;let n=document.createElement(`select`);n.setAttribute(`aria-label`,`Send to session`),n.className=`_lt`;for(let r of t){let t=document.createElement(`option`);t.value=r.id,t.textContent=e(r),n.append(t)}return n}var kS=(e,t)=>e?.value||t[0]?.id||null;function AS(e,t,n){for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)}function jS(e,t){let n=document.createElement(`button`);return n.type=`button`,n.textContent=e,n.className=t,n}function MS(t,n,r,i){if(!n){t.className=`_r ${i?me:``} _s`,t.textContent=`Send`;let n=r[0];return n&&(t.title=`Send to ${e(n)}`),t}let a=document.createElement(`span`);return a.className=`_lr ${i?`_kZ`:``}`,t.className=`_s _ls`,t.textContent=`Send to`,a.append(t,n),a}function NS(e,t,n){e.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t()),e.key===`Escape`&&(e.preventDefault(),n())}}function PS(e,t,n){let r=document.createElement(`div`);r.className=`_kV`;let i=document.createElement(`div`),a=document.createElement(`div`);a.className=`_kY`;let o=()=>{i.replaceChildren(),a.replaceChildren();let r=document.createElement(`p`);r.className=`_kW`,r.textContent=e.text;let o=jS(`Remove`,`_r ${me}`);o.onclick=()=>n.onDelete(e.id);let c=jS(`Edit`,`_r ${me}`);c.hidden=!n.onEdit,c.onclick=()=>s();let l=t.sessions(),u=l.length>0&&!!n.onSend,d=jS(`Send`,``);d.dataset.role=`send`,d.hidden=!u;let f=u?OS(l):null,p=f?`Send to`:`Send`;if(d.onclick=()=>{(async()=>{let t=kS(f,l);if(t&&!d.disabled){AS([o,c,d],!0,p);try{await n.onSend?.(e.id,t)}finally{AS([o,c,d],!1,p)}}})()},a.append(c,o),u&&a.append(MS(d,f,l,!0)),n.drifted){let e=document.createElement(`span`);e.className=`_9 ${we.warn} _k0`,e.textContent=`changed since`,e.title=`These lines changed since the comment; the agent gets them as they were`,a.append(e)}i.append(r)},s=()=>{i.replaceChildren(),a.replaceChildren();let t=document.createElement(`textarea`);t.value=e.text,t.rows=3,t.className=`_bj _kX`;let r=jS(`Save`,`_r _s`),s=jS(`Cancel`,`_r`),c=()=>{let i=t.value.trim();if(!i||i===e.text){o();return}(async()=>{AS([r,s],!0);try{await n.onEdit?.(e.id,i),e.text=i,o()}catch{AS([r,s],!1)}})()};r.onclick=c,s.onclick=()=>o(),NS(t,c,o),a.append(r,s),i.append(t),setTimeout(()=>{t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)},0)};return o(),r.append(i,a),r}function FS(e,t){let n=document.createElement(`div`);n.className=`_kV`;let r=document.createElement(`textarea`);r.placeholder=`Add a comment…`,r.rows=3,r.className=`_bj _kX`;let i=jS(`Add`,`_r`),a=jS(`Send`,``);a.dataset.role=`send`;let o=jS(`Cancel`,`_r`),s=e.sessions(),c=s.length>0&&!!t.onSend;a.hidden=!c;let l=c?OS(s):null,u=c?MS(a,l,s,!1):a,d=a.textContent,f=()=>{r.value.trim()&&t.onSave(r.value)},p=()=>{(async()=>{let e=r.value.trim(),n=kS(l,s);if(e&&n&&!a.disabled){AS([i,a,o],!0,d);try{await t.onSend?.(e,n)}finally{AS([i,a,o],!1,d)}}})()};i.onclick=f,a.onclick=p,o.onclick=()=>t.onCancel(),NS(r,c?p:f,()=>t.onCancel());let m=document.createElement(`div`);m.className=`_kY`,m.append(i),c&&m.append(u),m.append(o),n.append(r,m),r.addEventListener(`focus`,()=>{let t=window.visualViewport;if(!t)return;let i=()=>e.reveal(n,!0);t.addEventListener(`resize`,i),r.addEventListener(`blur`,()=>t.removeEventListener(`resize`,i),{once:!0})});let h=(e=0)=>{if(!r.isConnected||!r.getClientRects().length){e<120&&requestAnimationFrame(()=>h(e+1));return}r.focus({preventScroll:!0})};return setTimeout(h,0),n}var IS=e=>`/api/workspaces/${e}/review`;async function LS(e){return(await pe(IS(e))).comments||[]}function RS(e,t){return Ce(IS(e),{action:`comment`,...t})}function zS(e,t,n){return Ce(`${IS(e)}/${t}`,{text:n},`PATCH`)}function BS(e,t){return t===`all`?Ce(IS(e),{action:`clear`}):Promise.all(t.map(t=>pe(`${IS(e)}/${t}`,{method:`DELETE`})))}function VS(e,t,n){fetch(IS(e),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`seen`,heads:t,dirty:n}),keepalive:!0}).catch(()=>{})}var HS=`search-mark`,US=`mark.${HS}`,WS=`mark.${HS}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${HS} *,mark.${HS} *::before,mark.${HS} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${HS}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,GS={query:``,hit:null,keys:null},KS=new Map,qS=new WeakMap,JS=(e,t)=>t?`${e}\n${t.line}\n${t.side||``}`:e;function YS(e,t,n){GS.query=e,GS.hit=t,GS.keys=n?new Set(n):null;for(let[e,t]of KS)eC(e,t,!1);t&&XS(t)}function XS(e,t=0){requestAnimationFrame(()=>{requestAnimationFrame(()=>{let n=!1;for(let[r,i]of KS)if(i===e.key&&(n=!0,$S(r,e)||t>=40))return;t>=40||(!n||t<12)&&setTimeout(()=>XS(e,t+1),n?32:48)})})}function ZS(e,t){if(e.scrollWidth<=e.clientWidth+1)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=Math.min(24,n.width/8);if(r.left>=n.left+i&&r.right<=n.right-i)return;let a=r.left-n.left+e.scrollLeft-(n.width/2-r.width/2),o=Math.max(0,e.scrollWidth-e.clientWidth);e.scrollTo({left:Math.max(0,Math.min(a,o))})}function QS(e,t){let n=t.parentElement,r=e;for(;r&&r!==n;){if(r instanceof HTMLElement&&r.scrollWidth>r.clientWidth+1){let e=getComputedStyle(r).overflowX;if(e===`auto`||e===`scroll`)return r}let e=r.getRootNode(),t=r.parentElement??(e instanceof ShadowRoot?e.host:null);if(t===r)break;r=t}return null}function $S(e,t){let n=e.shadowRoot??e.querySelector(`diffs-container`)?.shadowRoot;if(!n)return!1;let r=n.querySelector(`mark.search-mark.active`)??(()=>{if(t.line<1)return null;let e=[...n.querySelectorAll(`[data-line="${t.line}"]`)],r=t.side||`additions`;return e.find(e=>iC(e)===r)??e[0]??null})();if(!r)return!1;let i=r.getBoundingClientRect();if(i.height===0&&i.width===0)return!1;let a=QS(r,e);return a&&ZS(a,r),!0}function eC(e,t,n=!0){let r=t&&GS.hit?.key===t?GS.hit:null,i=GS.query.trim(),a=!!i&&!!GS.keys&&!!t&&!GS.keys.has(t),o=a?``:JS(i,r),s=qS.get(e)!==o;(n||s)&&(qS.set(e,o),uC(e,a?``:i,r),n||lS(e),r&&s&&XS(r))}function tC(e,t){return KS.set(e,t),eC(e,t),()=>{KS.delete(e),qS.delete(e)}}function nC(e){eC(e,KS.get(e))}function rC(e){let t=e.querySelectorAll(US);if(!t.length)return;let n=new Set;for(let e of[...t])e.parentElement&&n.add(e.parentElement),e.replaceWith(...e.childNodes);for(let e of n)e.normalize()}function iC(e){let t=e.closest(`[data-code]`);return t?.hasAttribute(`data-deletions`)?`deletions`:t?.hasAttribute(`data-additions`)?`additions`:(e.getAttribute(`data-line-type`)||``).includes(`deletion`)?`deletions`:`additions`}function aC(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(US)||n.push(e);return n}function oC(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=t[i].length;if(n<=r+a)return{node:e[i],offset:Math.min(a,Math.max(0,n-r))};r+=a}let i=e.at(-1);return i?{node:i,offset:t.at(-1)?.length??0}:null}function sC(e,t,n,r,i){let a=oC(e,t,n),o=oC(e,t,r);if(!a||!o)return;let s=document.createRange();s.setStart(a.node,a.offset),s.setEnd(o.node,o.offset);let c=document.createElement(`mark`);c.className=i;try{c.append(s.extractContents()),s.insertNode(c)}catch{}}function cC(e,t,n,r){let i=aC(e);if(!i.length)return;let a=i.map(e=>e.textContent??``),o=a.join(``),s=n?o:o.toLowerCase(),c=[];for(let e=s.indexOf(t);e!==-1;e=s.indexOf(t,e+t.length))c.push([e,e+t.length]);if(!c.length)return;let l=dC(e,r)?`${HS} active`:HS;for(let e=c.length-1;e>=0;e--)sC(i,a,c[e][0],c[e][1],l)}var lC=new WeakMap;function uC(e,t,n){let r=[e],i=e.shadowRoot??e.querySelector(`diffs-container`)?.shadowRoot;i&&r.push(i);let a=t.trim(),o=/[A-Z]/.test(a),s=a&&!o?a.toLowerCase():a;for(let e of r){if(!s){rC(e);continue}for(let t of e.querySelectorAll(`[data-code] [data-line]`)){let e=t.textContent||``,r=(o?e:e.toLowerCase()).includes(s),i=r?`${o?`s`:`i`}${s}\n${t.getAttribute(`data-line`)}\n${+!!dC(t,n)}`:``,a=!!t.querySelector(US);i!==(a?lC.get(t):``)&&(a&&rC(t),lC.set(t,i),r&&cC(t,s,o,n))}}}function dC(e,t){return!!t&&t.line===Number(e.getAttribute(`data-line`))&&(t.side||`additions`)===iC(e)}var fC={apng:`image/apng`,avif:`image/avif`,bmp:`image/bmp`,gif:`image/gif`,ico:`image/x-icon`,jpeg:`image/jpeg`,jpg:`image/jpeg`,png:`image/png`,svg:`image/svg+xml`,webp:`image/webp`,pdf:`application/pdf`};function pC(e){let t=e.lastIndexOf(`.`),n=fC[t<0?``:e.slice(t+1).toLowerCase()];return n?{kind:n===`application/pdf`?`pdf`:`image`,type:n}:null}var mC=`_gT _bp _m`,hC=`<h1> </h1><nav aria-label="Review views"><a title="Every file in the workspace">Files</a><a title="What changed">Diff</a></nav>`,gC=` D l D b l`;function _C(e){y(e.a,`_Q`),y(e.c,[`_bB`,`_ku`])}var vC=(e,t)=>{d(e.b,t===`files`?`Files`:`Review`),y(e.d,[`_bD`,t===`files`&&`_bC`]),S(e.d,`aria-current`,t===`files`?`page`:void 0),y(e.e,[`_bD`,t===`changes`&&`_bC`]),S(e.e,`aria-current`,t===`changes`?`page`:void 0)},yC=(e,t)=>S(e.d,`href`,t),bC=(e,t)=>S(e.e,`href`,t),xC=re,SC=(e=>`/${e}&`)(A);function CC(e){k(e.a,oe)}var wC=(e,t)=>Se(e.a,t),TC=(e,t)=>M(e.a,t),EC=((e,t,n)=>`<div><div role=group><button type=button><span aria-hidden=true>${e}<span> </span></span><!></button><button type=button aria-label="Send options" aria-haspopup=menu></button></div><span>${t} No comments</span></div><div popover=auto role=menu><!><button type=button role=menuitem><span>${n}</span><span>Copy as markdown</span></button></div>`)(xC,xC,ft),DC=((e,t,n)=>` D D D D/${e}& D m%l l D/${t}&m D%b D D/${n}&l m`)(SC,SC,F),OC=e=>{dt(e.a),lt(e.a,12),P(e.a)},kC=u(7,3,t=>d(t.b,e(t._.a6))),AC=e=>{kC._(e),y(e.a,[`_lj`,`_S`]),y(e.c,`_R`)},jC=u(7,0,e=>d(e.a,e._.z===`copied`?`Copied`:`Copy failed`)),MC=jC,NC=c(1,ct,(e=>`/${e}&`)(st),OC),PC=v(8,e=>{S(e.a,`aria-checked`,e.h===e._._.a9?`true`:`false`),NC(e,e.h===e._._.a9?0:1)}),FC=b(43,PC,e=>e._._),IC=l(`r2`,e=>s(e.a,`click`,function(){QC(e._._,e.h),e._._.l.hidePopover()})),LC=e=>{FC(e),y(e.a,DS),y(e.b,`_lo`),Ve(e.c,14),He(e.c),y(e.d,`_lp`),IC(e)},RC=E(7,PC),zC=(e,t)=>Ue(e.c,t),BC=(t,n)=>{d(t.e,e(n)),RC(t,n?.id),zC(t,n?.agent)},VC=p(1,(e=>`<button type=button role=menuitemradio><span></span>${e}<span> </span></button>`)(Ke),(e=>` D b/${e}& D m`)(`b%c`),LC,(e,t)=>BC(e,t[0])),HC=u(12,0,e=>VC(e,[e._.a3,`id`])),UC=e=>{HC._(e),y(e.a,`_lm`),y(e.c,`_lq`)},WC=E(38),GC=v(33,e=>WC(e,gw(e)),2),KC=c(7,` `,` `,MC,`Sending…`,0,0,`Copy`,0,0,`<span>Send to <!></span><span>Send</span>`,` Db%l `,AC,`Send`),qC=v(34,e=>KC(e,e.z?0:e.x?1:e.a6?e.a5>1?3:4:2),3),JC=f(23,e=>{S(e.c,`disabled`,e.x),S(e.i,`disabled`,e.x),GC(e),qC(e)}),YC=v(37,t=>S(t.c,`title`,t.u?t.a6?`Send ${t.aa} to ${e(t.a6)}`:`Copy ${t.aa} as markdown`:`No comments to send`),2),XC=E(32,e=>{dw(e,e.a6?.id),GC(e),YC(e),qC(e),kC(e)}),ZC=v(30,e=>XC(e,e.a3.find(t=>t.id===e.y)??e.a3[0]??null)),QC=f(24,ZC),$C=f(25,e=>{qC(e),jC(e)}),ew=(e,t)=>ow(e,t.id),tw=l(`r3`,e=>{s(e.c,`click`,function(){e.a6?e.ac():e.ad()}),s(e.i,`click`,function(){let t=e.l;t.showPopover(),r(t,e.b.getBoundingClientRect(),{align:`end`})}),s(e.n,`click`,function(){e.l.hidePopover(),e.ad()})});function nw(e){y(e.c,`_lg`),y(e.d,[`_w`,`_lh`]),CC(e.e),wC(e.e,18),TC(e.e,`_x`),y(e.f,[ue,`_li`]),y(e.i,`_lk`),CC(e.k),wC(e.k,16),TC(e.k),y(e.l,ES),y(e.n,DS),y(e.o,`_lo`),mt(e.p),pt(e.p,14),ht(e.p),y(e.q,`_lp`),JC(e,!1),QC(e,null),$C(e,null),ew(e,{id:0}),tw(e)}var rw=E(39),iw=v(28,e=>rw(e,_w(e))),aw=l(`r4`,e=>O(e,{onDestroy:function(){clearTimeout(e.a1)}})),ow=E(27,e=>{iw(e),aw(e)}),sw=E(29,e=>{lw(e,e.a3.length),ZC(e),HC(e)}),cw=c(12,`<span>Send to</span><!><span role=separator></span>`,` b%b `,UC),lw=E(31,e=>{cw(e,+!e.a5),qC(e)}),uw=(e,t)=>sw(e,t||[]),dw=E(35,D(FC)),fw=E(36,e=>{S(e.b,`aria-label`,e.aa),YC(e)}),pw=E(20,e=>{y(e.a,[`_lc`,!e.u&&`_le`]),y(e.b,[`_lb`,!e.u&&`_ld`]),S(e.b,`inert`,!e.u),d(e.g,e.u>99?`99+`:e.u),y(e.j,[`_lf`,!!e.u&&`_ld`]),fw(e,Ie(e.u,`comment`)),YC(e)}),mw=E(21,GC),hw=E(22,iw),gw=e=>()=>{(async()=>{if(e.a6&&!e.x){JC(e,!0);try{await e.v(e.a6?.id)}finally{JC(e,!1)}}})()},_w=e=>()=>{(async()=>{$C(e,await e.w()?`copied`:`failed`),clearTimeout(e.a1),e.a1=setTimeout(()=>{$C(e,null)},1500)})()};_.r0=gw,_.r1=_w;var vw=`file-tree-container`,yw=`data-file-tree-style`,bw=`data-file-tree-unsafe-css`,xw=`data-file-tree-scrollbar-measure`,Sw=`data-file-tree-scrollbar-gutter-measured`,Cw=`--trees-scrollbar-gutter-measured`,ww=`header`,Tw=`context-menu`,Ew=`context-menu-trigger`,Dw=5,Ow=32,kw=128;function Aw(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function jw(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Mw(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 Nw(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 Pw(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function Fw(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 Iw(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,Bw(e,t)}function Lw(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=Nw(e).get(t);if(i===void 0)return;let a=i>>Dw;e.childVisibleChunkSums[a]+=r}function Rw(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=Vw(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=Ow}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 zw(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>Dw;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<Dw}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 Bw(e,t){if(t.childIds.length<kw){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/Ow),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>>Dw]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function Vw(e,t,n,r){let i=Math.min(t.childIds.length,n+Ow),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 Hw=7,Uw=3,Ww=8,Gw=4;function Kw(e,t,n=0){return e<<Gw|n<<Uw|t}function qw(e){return e.depthAndFlags>>>Gw}function Jw(e){return(e.depthAndFlags&Ww)>>Uw}function G(e){return(e.depthAndFlags&Ww)!==0}function Yw(e){return e.depthAndFlags&Hw}function Xw(e,t){return(Yw(e)&t)!==0}function Zw(e,t){e.depthAndFlags|=t}function Qw(e,t){e.depthAndFlags=Kw(t,Yw(e),Jw(e))}var $w=Symbol(`benchmarkInstrumentation`);function eT(e,t){return t==null||Object.defineProperty(e,$w,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function tT(e){return e==null?null:e[$w]??null}function K(e,t,n){return e==null?n():e.measurePhase(t,n)}function nT(e,t,n){Number.isFinite(n)&&e!=null&&e.setCounter(t,n)}function rT(e){return e>=48&&e<=57}function iT(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!rT(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&&rT(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 aT(e){let t=e.toLowerCase();return{lowerValue:t,tokens:iT(t)}}function oT(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 sT(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=oT(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function cT(e,t,n){let r=sT(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function lT(e,t){return cT(e,t,aT)}function uT(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function dT(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=uT(e,r);return a===uT(t,r)?lT(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 fT(e,t){return dT(e,t)}function pT(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=aT(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=uT(e,n);return o===uT(t,n)?cT(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 mT(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=aT(r);return e.sortKeyById[t]=i,i}function hT(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function gT(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 _T(e){let{hasTrailingSlash:t,segments:n}=gT(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function vT(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=gT(e);return{requiresDirectory:t,segments:n}}function yT(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[aT(``)]}}function bT(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 xT(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var ST=Symbol(`pathStorePreparedInputKind`);function CT(e,t){return e[ST]=t,e}function wT(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function TT(e,t,n){return n==="default"?fT(e,t):n(wT(e),wT(t))}function ET(){return{depthAndFlags:Kw(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function DT(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 OT(e){return e.isDirectory?e.segments.length:e.segments.length-1}function kT(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 AT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function jT(e,t={}){return LT(e,t).map(e=>e.path)}function MT(e,t={}){let n=LT(e,t);return CT({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function NT(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 CT({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function PT(e){let t=e,n=t.preparedPaths;if(t[ST]===`prepared`&&n!=null)return n;if(!kT(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function FT(e){let t=e;return t[ST]===`presorted`&&t.presortedPaths!=null||AT(t.presortedPaths)?t.presortedPaths:null}function IT(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function LT(e,t={}){let n=hT(t),r=tT(t);nT(r,`workload.inputFiles`,e.length);let i=K(r,`store.preparePathEntries.parse`,()=>e.map(e=>_T(e)));return K(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>TT(e,t,n.sort))),i}var RT=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[ET()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=yT();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=tT(e),this.options=hT(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,Aw())}appendPaths(e){return K(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>_T(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,K(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return K(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:Kw(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:Kw(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}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:Kw(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=_T(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:Kw(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:Kw(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=_T(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(K(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||K(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"?pT(this.lastPreparedPath,e,this.segmentSortKeyCache):TT(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=OT(e),i=n==null?0:OT(n),a=n==null?0:DT(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=bT(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:Kw(qw(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),Pw(i,s),s}createFileChildUnchecked(e,t){let n=bT(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:Kw(qw(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Pw(r,a),a}getOrCreateDirectoryChild(e,t){let n=bT(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&&!G(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:Kw(qw(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Pw(r,a),this.directories.set(a,Aw()),a}createDirectoryChild(e,t){let n=bT(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:Kw(qw(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Pw(r,a),this.directories.set(a,Aw()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!G(n))throw Error(`Path is not a directory: "${t}"`);if(Xw(n,1))throw Error(`Duplicate path: "${t}"`);Zw(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,jw());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(G(a)){let t=jw();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;G(n)&&this.directories.set(t,Aw());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),Pw(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!G(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 Iw(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function zT(e,t=`closed`,n=null){let r=VT(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 BT(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function VT(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 HT(e,t){return Xw(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&qw(t)<=e.defaultExpansion}function UT(e,t,n=e.snapshot.nodes[t]){return n==null||!G(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:HT(e,n)}function WT(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!G(r))return;let i=HT(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 GT(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 KT(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function qT(e,t){let n=GT(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 JT(e,t){let n=GT(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function YT(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 XT(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function ZT(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 QT(e,t){e.directoryLoadInfoById.delete(t)}function $T(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 eE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function tE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function nE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function rE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function iE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function aE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function oE(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 sE(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 cE(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 lE(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 uE(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 dE(e,t,n){return{...n,visibleCountDelta:SE(e)-t}}function fE(e,t){let n=SE(e),r=BT();e.transactionStack.push(r);try{t()}catch(t){throw hE(e,r,!1),t}hE(e,r,!0,SE(e)-n)}function pE(e,t){let n=e.instrumentation;if(n==null){mE(e,t);return}K(n,`store.events.record`,()=>mE(e,t))}function mE(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){bE(e,t);return}n.events.push(t),yE(n,t)}function hE(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?vE(i,t):K(n,`store.events.batch.merge`,()=>vE(i,t));return}let a=gE(t,r),o=e.instrumentation;if(o==null){bE(e,a);return}K(o,`store.events.batch.commit`,()=>bE(e,a))}function gE(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 _E(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function vE(e,t){for(let n of t.events)e.events.push(n);_E(e,t)}function yE(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function bE(e,t){let n=e.instrumentation;if(n==null){xE(e,t);return}K(n,`store.events.emit`,()=>xE(e,t))}function xE(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function SE(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function CE(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!G(n)||Xw(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||!G(a)?null:i}function wE(e,t){let n=t;for(;;){let t=CE(e,n);if(t==null)return n;n=t}}function TE(e,t){let n=[t],r=t;for(;;){let t=CE(e,r);if(t==null)return n;n.push(t),r=t}}function EE(e,t){let n=t==null?e.snapshot.rootId:FE(e,t);return n==null?[]:LE(e,n)}function DE(e,t){let n=_T(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=QE(e,ZE(e,r)),{createdNodeIds:a,directoryId:o}=RE(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=Y(e,o);if(Xw(n,1))throw Error(`Path already exists: "${t}"`);Zw(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=BE(e,o,n.basename),s.add(c);ME(e,o);let l=QE(e,o);return eE({affectedAncestorIds:PE(e,c),affectedNodeIds:[...s],path:t,projectionChanged:$E(i,l)})}function OE(e,t,n){let r=FE(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=Y(e,r);if(Xw(i,2))throw Error(`The root node cannot be removed`);if(G(i)&&J(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=QE(e,a),s=YE(e,r);UE(e,a,r,i.nameId),XE(e,a),ME(e,a);let c=QE(e,a);return tE({affectedAncestorIds:PE(e,a),affectedNodeIds:s,path:t,projectionChanged:$E(o,c),recursive:n.recursive===!0})}function kE(e,t,n,r){let i=FE(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=Y(e,i);if(Xw(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=qE(e,i,n),c=QE(e,a.parentId),l=QE(e,s.parentId),u=xT(e.snapshot.segmentTable,a.nameId),d=bT(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(G(a)&&rD(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=Mw(e.snapshot.nodes,J(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&JE(e,p,o,Jw(a))===`skip`)return null;let m=a.parentId;UE(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),nD(e,i),HE(e,s.parentId,i),XE(e,m),e.pathCacheVersion++,ME(e,m),s.parentId!==m&&ME(e,s.parentId);let h=QE(e,m),g=QE(e,s.parentId);return nE({affectedAncestorIds:[...new Set([...PE(e,m),...PE(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:eD([c,l],[h,g]),to:q(e,i)})}function AE(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function jE(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function q(e,t){let n=Y(e,t),r=AE(e,t);if(r!=null)return r;if(Xw(n,2))return jE(e,t,``);let i=q(e,n.parentId),a=xT(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return jE(e,t,G(n)?`${o}/`:o)}function ME(e,t){let n=e.instrumentation;if(n==null){aD(e,t);return}K(n,`store.recomputeCountsUpwardFrom`,()=>aD(e,t))}function NE(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||!G(o)){iD(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){iD(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function PE(e,t){let n=[],r=t;for(;r!=null;){let t=Y(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function FE(e,t){if(t.length===0)return e.snapshot.rootId;let n=vT(t);return IE(e,n.segments,n.requiresDirectory)}function IE(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=J(e,r),a=Mw(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=Y(e,r);return n&&!G(i)?null:r}function J(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 Y(e,t){let n=e.snapshot.nodes[t];if(n===void 0||Xw(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function LE(e,t){let n=e.snapshot.nodes[t];if(n===void 0||Xw(n,4))return[];if(!G(n))return[q(e,t)];if(J(e,t).childIds.length===0)return Xw(n,1)&&!Xw(n,2)?[q(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||Xw(n,4)){i.pop();continue}if(!G(n)){r.push(q(e,t.nodeId)),i.pop();continue}let a=J(e,t.nodeId);if(a.childIds.length===0){Xw(n,1)&&!Xw(n,2)&&r.push(q(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 RE(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=bT(e.snapshot.segmentTable,i),a=J(e,r),o=Mw(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!G(Y(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=zE(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function zE(e,t,n){let r=Y(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Kw(qw(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,Aw()),HE(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function BE(e,t,n){let r=bT(e.snapshot.segmentTable,n),i=J(e,t);if(Mw(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${sD(e,t,n)}"`);let a=Y(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Kw(qw(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),HE(e,t,o),e.activeNodeCount++,o}function VE(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}WE(e,n,o)<0?i=a:r=a+1}return r}function HE(e,t,n){let r=J(e,t),i=Y(e,n);Mw(e.snapshot.nodes,r).set(i.nameId,n),Lw(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=VE(e,r,n);r.childIds.splice(a,0,n),Fw(r,a),Bw(e.snapshot.nodes,r)}function UE(e,t,n,r){let i=J(e,t),a=Nw(i),o=a.get(n)??-1;Mw(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&Lw(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),Fw(i,o),Bw(e.snapshot.nodes,i))}function WE(e,t,n){let r=e.snapshot.options.sort;return r==="default"?GE(e,t,n):r(KE(e,t),KE(e,n))}function GE(e,t,n){let r=Y(e,t),i=Y(e,n),a=G(r);if(a!==G(i))return a?-1:1;let o=sT(mT(e.snapshot.segmentTable,r.nameId),mT(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=xT(e.snapshot.segmentTable,r.nameId),c=xT(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function KE(e,t){let n=Y(e,t),r=q(e,t),i=G(n),a=i?r.slice(0,-1):r;return{basename:xT(e.snapshot.segmentTable,n.nameId),depth:qw(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function qE(e,t,n){let r=Y(e,t),i=FE(e,n);if(i!=null){let t=Y(e,i);if(G(t))return{basename:xT(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=vT(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=vT(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:IE(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function JE(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${q(e,t)}"`);let i=Y(e,t);if(Jw(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(G(i)&&J(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return YE(e,t),UE(e,a,t,o),XE(e,a),ME(e,a),`handled`}function YE(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=Y(e,t.nodeId);if(t.visitedChildren||!G(i)){G(i)&&e.snapshot.directories.delete(t.nodeId),Zw(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),QT(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=J(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 XE(e,t){let n=t;for(;n!=null;){let t=Y(e,n);if(!G(t)||Xw(t,2)||J(e,n).childIds.length>0)return;Zw(t,1),n=t.parentId===n?null:t.parentId}}function ZE(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=Mw(e.snapshot.nodes,J(e,n)).get(t);if(i==null||!G(Y(e,i)))break;n=i}return n}function QE(e,t){let n=tD(e,t);if(n==null)return null;let r=wE(e,n),i=Y(e,r),a=n===r?null:TE(e,n).map(t=>q(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:J(e,r).childIds.length>0,path:q(e,r),terminalKind:Jw(i)})}function $E(e,t){return eD([e],[t])}function eD(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 tD(e,t){let n=t;for(;n!=null;){let t=Y(e,n);if(!G(t)||Xw(t,2))return null;if(!UT(e,n,t))return n;n=t.parentId}return null}function nD(e,t){let n=Y(e,t);if(Qw(n,(t===e.snapshot.rootId?-1:qw(Y(e,n.parentId)))+1),!G(n))return;let r=J(e,t);for(let t of r.childIds)nD(e,t)}function rD(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=Y(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function iD(e,t,n=Y(e,t),r=!1){let i=e.instrumentation;if(i==null){oD(e,t,n,r);return}K(i,`store.recomputeNodeCounts`,()=>oD(e,t,n,r))}function aD(e,t){let n=t;for(;n!=null;){let t=Y(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(iD(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&Lw(J(e,s),n,a,o),n=s}}function oD(e,t,n,r){if(!G(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=J(e,t);if(r){let t=e.instrumentation;t==null?Iw(e.snapshot.nodes,i):K(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>Iw(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,Xw(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=CE(e,t)==null?UT(e,t,n)?1+o:1:o}function sD(e,t,n){let r=q(e,t);return r.length===0?n:`${r}${n}`}function cD(e){return e!=null&&!Xw(e,4)}function lD(e,t){let n=e.snapshot.nodes[t];return!cD(n)||!G(n)||Xw(n,2)?null:n}function uD(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&cD(e.snapshot.nodes[n])&&(t+=1);return t}function dD(e){return Math.max(0,e.valueById.length-1)}function fD(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:uD(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:dD(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function pD(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 mD(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)lD(e,n)!=null&&t.push(q(e,n));for(let t of e.expandedDirectoryIds)lD(e,t)!=null&&n.push(q(e,t));return{collapsedPaths:t,expandedPaths:n}}function hD(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)lD(e,n)!=null&&KT(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:q(e,n)});return t}function gD(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=FE(e,n);t!=null&&WT(e,t,!0,Y(e,t))}for(let n of t.collapsedPaths){let t=FE(e,n);t!=null&&WT(e,t,!1,Y(e,t))}}function _D(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=FE(e,n.path);t!=null&&lD(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function vD(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function yD(e){let t=e.snapshot.segmentTable,n=yT();for(let r of e.snapshot.nodes)if(cD(r)){if(Xw(r,2)){r.nameId=0;continue}r.nameId=bT(n,xT(t,r.nameId))}e.snapshot.segmentTable=n}function bD(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!cD(r)||!G(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return cD(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[Y(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),Iw(e.snapshot.nodes,n)}}function xD(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(cD(n))break;--t}e.snapshot.nodes.length=t+1}function SD(e){let t=mD(e),n=hD(e);K(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>vD(e)),K(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>yD(e)),K(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>bD(e)),K(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>xD(e)),K(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>gD(e,t)),K(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>_D(e,n)),K(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>NE(e,e.snapshot.rootId))}function CD(e){let t=mD(e),n=hD(e),r=K(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>EE(e)),i=eT({...e.snapshot.options},e.instrumentation),a=K(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new RT(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,K(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>gD(e,t)),K(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>_D(e,n)),K(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>NE(e,e.snapshot.rootId))}function wD(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function TD(e,t){let n=fD(e);t===`stable`?K(e.instrumentation,`store.cleanup.stable`,()=>SD(e)):K(e.instrumentation,`store.cleanup.aggressive`,()=>CD(e));let r=fD(e);return pD(t,t===`stable`,n,r)}var ED=64;function DD(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 OD(e){return Y(e,e.snapshot.rootId).visibleSubtreeCount}function kD(e,t,n,r){let i=Y(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function AD(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:YD(e,t.cursor),setSize:t.setSize,subtreeEndIndex:kD(e,t.cursor,t.index,n)}}function jD(e,t,n,r,i,a){let o=J(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=Rw(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return MD(e,u,l,r+c,i+1,s,o.childIds.length,a)}function MD(e,t,n,r,i,a,o,s){if(!G(Y(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=UD(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=Y(e,c.terminalNodeId);if(!G(l)||!UT(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return jD(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function ND(e,t){let n=OD(e);if(t<0||t>=n)return null;let r=jD(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>q(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=AD(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:YD(e,r.cursor),setSize:r.setSize,subtreeEndIndex:kD(e,r.cursor,r.index,n)}}function PD(e,t,n){let r=e.instrumentation,i=OD(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 JD(e,o+1);let t=[],n=BD(e,a);for(let r=a;r<=o&&n!=null;r++){let r=YD(e,n);t.push(r),n=GD(e,n)}return t}let s=[],c=0,l=0,u=K(r,`store.getVisibleSlice.selectFirstRow`,()=>BD(e,a));for(let t=a;t<=o&&u!=null;t++){let t=K(r,`store.getVisibleSlice.materializeRow`,()=>YD(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=K(r,`store.getVisibleSlice.advanceCursor`,()=>GD(e,u))}return nT(r,`workload.visibleRowsRead`,s.length),nT(r,`workload.flattenedRowsRead`,c),nT(r,`workload.flattenedSegmentsRead`,l),s}function FD(e,t=OD(e)){let n=e.instrumentation;return n==null?qD(e,t):K(n,`store.getVisibleTreeProjection`,()=>qD(e,t))}function ID(e){return KD(FD(e))}function LD(e,t){let n=FE(e,t);if(n==null||n===e.snapshot.rootId||G(Y(e,n))&&wE(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=Y(e,i).parentId,n=J(e,t),s=Nw(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=zw(a,n,s),t!==o){let n=Y(e,t),a=CE(e,t);if(!UT(e,t,n)&&a!==i)return null;wE(e,t)===t&&(r+=1)}i=t}return r}function RD(e,t){let n=FE(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=Y(e,n);if(!G(r))throw Error(`Path is not a directory: "${t}"`);return UT(e,n,r)?null:(WT(e,n,!0,r),ME(e,n),rE({affectedAncestorIds:PE(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function zD(e,t){let n=FE(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=Y(e,n);if(!G(r))throw Error(`Path is not a directory: "${t}"`);return UT(e,n,r)?(WT(e,n,!1,r),ME(e,n),iE({affectedAncestorIds:PE(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function BD(e,t){return t<0||t>=OD(e)?null:VD(e,e.snapshot.rootId,t,-1)}function VD(e,t,n,r){let i=J(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?Rw(e.snapshot.nodes,i,n):K(a,`store.getVisibleSlice.selectChildIndex`,()=>Rw(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return HD(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function HD(e,t,n,r){if(!G(Y(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=UD(e,t,r);if(n===0)return i;let a=Y(e,i.terminalNodeId);if(!G(a)||!UT(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return VD(e,i.terminalNodeId,n-1,i.visibleDepth)}function UD(e,t,n){return G(Y(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:wE(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:K(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>wE(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function WD(e,t){let n=Y(e,t);if(!G(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||CE(e,r)!==t}function GD(e,t){let n=Y(e,t.terminalNodeId);if(G(n)){let r=J(e,t.terminalNodeId);if(UT(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:HD(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=Y(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=J(e,n),o=Nw(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 HD(e,s,0,i);WD(e,r)&&i--,r=n}}function KD(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 qD(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(ED);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=DD(o,y);let x,S=_;if(G(v))S=f?wE(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:q(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&&G(C)&&UT(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 JD(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(!G(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:q(e,f)};continue}let h=l?wE(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=YD(e,g);let _=i[h];_!=null&&G(_)&&UT(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function YD(e,t){let n=Y(e,t.terminalNodeId),r=G(n)?XD(e,t):null,i=q(e,t.terminalNodeId),a=xT(e.snapshot.segmentTable,n.nameId),o=G(n)&&J(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?TE(e,t.headNodeId).map(n=>{let r=Y(e,n);return{isTerminal:n===t.terminalNodeId,name:xT(e.snapshot.segmentTable,r.nameId),nodeId:n,path:q(e,n)}}):K(c,`store.getVisibleSlice.flatten.collectSegments`,()=>TE(e,t.headNodeId).map(n=>{let r=Y(e,n);return{isTerminal:n===t.terminalNodeId,name:xT(e.snapshot.segmentTable,r.nameId),nodeId:n,path:q(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:G(n)&&UT(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:G(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function XD(e,t){if(t.headNodeId===t.terminalNodeId)return KT(e,t.terminalNodeId);let n=TE(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=KT(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var ZD=8;function QD(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function $D(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&ZD)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&ZD)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function eO(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||!G(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&&Bw(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&G(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,Bw(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function tO(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=QD(e.snapshot);$D(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&Bw(n,i)}}function nO(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var rO=class e{#e;constructor(e={}){let t=tT(e),n=K(t,`store.builder.create`,()=>new RT(e));if(e.preparedInput!=null){let t=FT(e.preparedInput);t==null?n.appendPreparedPaths(PT(e.preparedInput),!1):n.appendPresortedPaths(t,IT(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(K(t,`store.preparePathEntries`,()=>LT(r,e)))}let r=K(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=K(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=K(t,`store.state.create`,()=>zT(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:K(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||nO(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&K(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?K(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>tO(this.#e)):K(t,`store.state.initializeOpenVisibleCounts`,()=>eO(this.#e)):K(t,`store.state.recomputeCounts`,()=>NE(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return jT(e,t)}static prepareInput(e,t={}){return MT(e,t)}static preparePresortedInput(e){return NT(e)}list(e){return K(this.#e.instrumentation,`store.list`,()=>EE(this.#e,e))}add(e){K(this.#e.instrumentation,`store.add`,()=>{let t=OD(this.#e);pE(this.#e,dE(this.#e,t,DE(this.#e,e)))})}remove(e,t={}){K(this.#e.instrumentation,`store.remove`,()=>{let n=OD(this.#e);pE(this.#e,dE(this.#e,n,OE(this.#e,e,t)))})}move(e,t,n={}){K(this.#e.instrumentation,`store.move`,()=>{let r=OD(this.#e),i=kE(this.#e,e,t,n);i!=null&&pE(this.#e,dE(this.#e,r,i))})}batch(e){fE(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})}})}getVisibleCount(){return K(this.#e.instrumentation,`store.getVisibleCount`,()=>OD(this.#e))}getVisibleSlice(e,t){return K(this.#e.instrumentation,`store.getVisibleSlice`,()=>PD(this.#e,e,t))}getVisibleRowContext(e){return K(this.#e.instrumentation,`store.getVisibleRowContext`,()=>ND(this.#e,e))}getVisibleTreeProjection(){return ID(this.#e)}getVisibleTreeProjectionData(e){return FD(this.#e,e)}getVisibleIndex(e){return K(this.#e.instrumentation,`store.getVisibleIndex`,()=>LD(this.#e,e))}getPathInfo(e){return K(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=FE(this.#e,e);if(t==null)return null;let n=Y(this.#e,t);return{depth:qw(n),kind:G(n)?`directory`:`file`,path:q(this.#e,t)}})}isExpanded(e){return K(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=Y(this.#e,t);return UT(this.#e,t,n)})}expand(e){K(this.#e.instrumentation,`store.expand`,()=>{let t=OD(this.#e),n=RD(this.#e,e);n!=null&&pE(this.#e,dE(this.#e,t,n))})}collapse(e){K(this.#e.instrumentation,`store.collapse`,()=>{let t=OD(this.#e),n=zD(this.#e,e);n!=null&&pE(this.#e,dE(this.#e,t,n))})}on(e,t){return $T(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return KT(this.#e,t)}markDirectoryUnloaded(e){K(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(J(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=OD(this.#e);JT(this.#e,t),pE(this.#e,dE(this.#e,n,aE({affectedAncestorIds:PE(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return K(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=OD(this.#e),r=qT(this.#e,t);return pE(this.#e,dE(this.#e,n,oE({affectedAncestorIds:PE(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return K(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||KT(this.#e,n)!==`loading`||!XT(this.#e,n,e.attemptId))return!1;let r=q(this.#e,n);this.validateChildPatch(r,t);let i=OD(this.#e),a=[];for(let e of t.operations){iO(r,e);let t=OD(this.#e);switch(e.type){case`add`:a.push(dE(this.#e,t,DE(this.#e,e.path)));break;case`remove`:a.push(dE(this.#e,t,OE(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=kE(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(dE(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return pE(this.#e,dE(this.#e,i,sE({affectedAncestorIds:PE(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:q(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return K(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=OD(this.#e),r=YT(this.#e,t,e.attemptId);return pE(this.#e,dE(this.#e,n,cE({affectedAncestorIds:PE(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:q(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return K(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=OD(this.#e),i=ZT(this.#e,n,e.attemptId,t);return pE(this.#e,dE(this.#e,r,lE({affectedAncestorIds:PE(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:q(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return K(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(wD(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=OD(this.#e),n=TD(this.#e,e.mode??`stable`);return pE(this.#e,dE(this.#e,t,uE({...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=J(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??aT(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=sT(mT(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(!G(Y(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=Y(this.#e,n);UT(this.#e,n,i)||(WT(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=Y(this.#e,e);if(!UT(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=FE(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!G(Y(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!G(Y(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=Y(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=Y(this.#e,e),r=CE(this.#e,e);if(!UT(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 iO(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}"`)}}var aO={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function oO(e,t){if(typeof e==`number`)return{itemHeight:t??aO.default.itemHeight,factor:e};let n=aO[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var sO=aO.default.itemHeight,cO=`@layer base {
|
|
1543
1543
|
:host {
|
|
1544
1544
|
--trees-accent: var(--trees-accent-override, #009fff);
|
|
1545
1545
|
--trees-fg: var(--trees-fg-override, var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1)));
|
|
@@ -2637,4 +2637,4 @@ diff --git`)}function Ug(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.star
|
|
|
2637
2637
|
}`}function dO(e){return`${lO}
|
|
2638
2638
|
@layer unsafe {
|
|
2639
2639
|
${e}
|
|
2640
|
-
}`}var fO=new WeakMap;function pO(e){let t=fO.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(xw,`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(),fO.set(e,i),i}function mO(e,t){if(!e.isConnected)return;let n=pO(t);if(n==null)return;let r=t.querySelector(`style[${Sw}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(Sw,``),t.appendChild(i)),i.textContent=`:host { ${Cw}: ${n}px; }`}var hO;function gO(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){hO??(hO=new CSSStyleSheet,hO.replaceSync(uO(cO)));let t=!1;try{e.adoptedStyleSheets=[hO],t=!0}catch{}if(t){e.querySelector(`style[${yw}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(yw,``),t.textContent=uO(cO),e.prepend(t)}}function _O(e,t){vO(e,t),gO(t),mO(e,t)}function vO(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`});_O(this,e)}}if(customElements.define(vw,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(vw)))e instanceof HTMLElement&&_O(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var yO=e=>e.startsWith(`f::`)?e.slice(3):e;function bO(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function xO(e,t){return e===``?t:`${e}/${t}`}function SO({files:e,path:t,isFolder:n,nextBasename:r}){let i=yO(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}=bO(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=xO(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 CO(e){return e.endsWith(`/`)}function wO(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 TO(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 EO(e,t){return t.includes(e)?TO(t):[e]}function DO(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 OO(e,t){return{draggedPaths:e,target:t}}function kO(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(CO(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function AO(e,t){return t.kind===`root`||t.directoryPath==null?wO(e):t.directoryPath}function jO(e,t){let n=e.map(e=>{let n=AO(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}}}function MO(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 NO(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(!MO(rO.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 PO(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function FO(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 IO(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function LO(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 IO(e,t.path)?n?e:null:e;case`move`:return FO(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=LO(r,e,n),r==null)return null;return r}}}function RO(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function zO(e){switch(e.operation){case`add`:return{...RO(e),operation:`add`,path:e.path};case`remove`:return{...RO(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...RO(e),from:e.from,operation:`move`,to:e.to}}}function BO(e){return{...RO(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>zO(e)),operation:`batch`}}function VO(e){switch(e.operation){case`add`:case`remove`:case`move`:return zO(e);case`batch`:return BO(e);default:return null}}function HO(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function UO(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 WO(e){return UO(e).at(-1)??null}function GO(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function KO(e){return e.endsWith(`/`)}var qO=e=>e.toLowerCase();function JO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function YO(e){return e.endsWith(`/`)?e.slice(0,-1):e}function XO(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var ZO=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},QO=Symbol(`FILE_TREE_RENAME_VIEW`),$O=512,ek=512;function tk(e){return e===`top`||e===`center`?e:`nearest`}function nk(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=UO(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 rk(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:nk(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var ik=class e{static{Object.defineProperty(e.prototype,QO,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#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=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=NO({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.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=WO(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:tk(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=ek){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(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.#H.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.#Se(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.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.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.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t!=null&&this.#B.has(t)&&this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(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.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=EO(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=OO(t.draggedPaths,n);(kO(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}DO(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}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.#De(),!1;let n=OO(e.draggedPaths,t);if(kO(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=jO(e.draggedPaths,t);if(r==null)return this.#De(),!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.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),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.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.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.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=KO(r),a=YO(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of UO(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=JO(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){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,KO(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){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,KO(e)?{recursive:!0}:void 0);return}let t=KO(e),n=SO({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:YO(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(XO(n.sourcePath,t),XO(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=NO({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!HO(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=WO(e),n=GO(e,t),r=null,i=null;for(let e of this.#be()){if(WO(e)!==t)continue;let a=GO(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=UO(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(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.#B.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}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!HO(this.#B,r),a=this.#z!==t;(i||a)&&(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new rO({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of UO(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(qO),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(qO),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of UO(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;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.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(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)}#Te(e,t){let n=e==null?null:ZO(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),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.#pe(),s=this.#me();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 UO(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of UO(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;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.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=rk(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,$O)),e,t?e=>this.#H.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.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=LO(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=LO(this.#c,e,!0),r=[...this.#B].map(t=>LO(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=LO(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return HO(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&PO(e)&&(this.#i=null);let t=PO(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=VO(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},ak=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 ok(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 sk(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function ck(e,t){return t?`${e}/`:e}function lk(e,t=null){let n=ak(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,o=new Map;for(let t of e??[]){let e=dk(t);e!=null&&mk({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function uk(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=fk(e);t!=null&&(c=pk({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=dk(e);t!=null&&(c=mk({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:_k(i),statusByPath:i}:e}function dk(e){return fk(e.path)}function fk(e){let t=ok(e);if(t!=null)return{canonicalPath:ck(t.path,t.isDirectory),isDirectory:t.isDirectory}}function pk({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),gk(t,n,e),!0)}function mk({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??hk(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function hk(e,t,n){for(let r of sk(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function gk(e,t,n){for(let r of sk(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function _k(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var X,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk={},Ok=[],kk=Array.isArray,Ak=Ok.slice,jk=Object.assign;function Mk(e){e&&e.parentNode&&e.remove()}function Nk(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?Ak.call(arguments,2):n),Pk(e,o,r,i,null)}function Pk(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??++vk,__i:-1,__u:0};return i==null&&X.vnode!=null&&X.vnode(a),a}function Fk(e){return e.children}function Ik(e,t){this.props=e,this.context=t,this.__g=0}function Lk(e,t){if(t==null)return e.__?Lk(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`?Lk(e):null}function Rk(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 Rk(e)}}function zk(e){(8&e.__g||!(e.__g|=8)||!yk.push(e)||xk++)&&bk==X.debounceRendering||((bk=X.debounceRendering)||queueMicrotask)(Bk)}function Bk(){for(var e,t,n,r,i,a,o,s,c=1;yk.length;)yk.length>c&&yk.sort(Sk),e=yk.shift(),c=yk.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=jk({},r)).__v=r.__v+1,X.vnode&&X.vnode(n),Jk(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??Lk(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Xk(a,n,o),n.__e!=i&&Rk(n)));xk=0}function Vk(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||Ok,b=t.length;for(c=Hk(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?Dk:y[m.__i]||Dk,m.__i=f,_=Jk(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&$k(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=Uk(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Hk(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?Pk(null,o,null,null,null):kk(o)?Pk(Fk,{children:o},null,null,null):o.constructor==null&&o.__b>0?Pk(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=Wk(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=Lk(s)),eA(s,s));return r}function Uk(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=Uk(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Lk(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Wk(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);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 Gk(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Kk(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||Gk(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Gk(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(Ck,`$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=wk,e.addEventListener(t,a?Ek:Tk,a)):e.removeEventListener(t,a?Ek:Tk,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 qk(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=wk++;else if(t.u<n.l)return;return n(X.event?X.event(t):t)}}}function Jk(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,ee,j=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=X.__b)&&d(t);n:if(typeof j==`function`)try{if(v=t.props,y=`prototype`in j&&j.prototype.render,b=(d=j.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 j(v,x):(t.__c=f=new Ik(v,x),f.constructor=j,f.render=tA),b&&b.sub(f),f.props=v,f.state||(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&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=jk({},f.__s)),jk(f.__s,j.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&j.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=X.__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=jk({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===Fk&&d.key==null&&(E=Zk(d.props.children)),s=Vk(e,kk(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(ee=a.length;ee--;)Mk(a[ee]);Yk(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Yk(t);X.__e(e,t,n)}else s=t.__e=Qk(n.__e,t,n,r,i,a,o,c,l,u);return(d=X.diffed)&&d(t),128&t.__u?void 0:s}function Yk(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Yk)}function Xk(e,t,n){for(var r=0;r<n.length;r++)$k(n[r],n[++r],n[++r]);X.__c&&X.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){X.__e(e,t.__v)}})}function Zk(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:kk(e)?e.map(Zk):jk({},e)}function Qk(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&&=(X.__m&&X.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=Ak.call(e.childNodes),v=n.props||Dk,!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;Kk(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&&!_||Kk(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=``),Vk(b==`template`?e.content:e,kk(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&Lk(n,0),s,c,l),a!=null)for(u=a.length;u--;)Mk(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Kk(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Kk(e,u,g,v[u],i))}return e}function $k(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){X.__e(e,n)}}function eA(e,t,n){var r,i;if(X.unmount&&X.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||$k(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){X.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&eA(r[i],t,n||typeof e.type!=`function`);n||Mk(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function tA(e,t,n){return this.constructor(e,n)}function nA(e,t){var n,r,i,a;t==document&&(t=document.documentElement),X.__&&X.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=Nk(Fk,null,[e]),i=[],a=[],Jk(t,e,r||Dk,Dk,t.namespaceURI,r?null:t.firstChild?Ak.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Xk(i,e,a)}function rA(e,t){e.__u|=32,nA(e,t)}X={__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 xk=0,e}},vk=0,Ik.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=jk({},this.state);typeof e==`function`&&(e=e(jk({},n),this.props)),e&&jk(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),zk(this))},Ik.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),zk(this))},Ik.prototype.render=Fk,yk=[],xk=0,Sk=function(e,t){return e.__v.__b-t.__v.__b},Ck=/(PointerCapture)$|Capture$/i,wk=0,Tk=qk(!1),Ek=qk(!0);var iA=0;Array.isArray;function Z(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:--iA,__i:-1,__u:0,__source:i,__self:a};return X.vnode&&X.vnode(l),l}var aA=16,oA=16,sA={};function cA({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}=sA[e]??{width:aA,height:oA},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Z(`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:Z(`use`,{href:c})})}var lA=e=>e!==void 0&&/\s/.test(e),uA=(e,t)=>{let n=t=>lA(e[t-1])||lA(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},dA=e=>uA(e,Math.ceil(e.length/2)),fA=e=>{if(e.length<2)return[e,``];let t=dA(e);return[e.slice(0,t),e.slice(t)]},pA=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:dA(e);return[e.slice(0,r),e.slice(r)]},mA=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)]},hA=(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)]},gA=(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)]},_A=(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 vA({children:e,marker:t,variant:n=`default`}){"use no memo";return Z(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Z(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Z(`span`,{"data-truncate-fade":!0}):t})})}function yA(e){"use no memo";let{mode:t,children:n}=e;return Z(`div`,{children:[Z(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Z(`span`,{children:n}):n}),Z(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Z(`span`,{children:n}):n})]})}function bA({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Z(yA,{mode:t,children:e},`content`),o=Z(vA,{marker:n,mode:t,variant:r},`marker`),s=Z(`div`,{"data-truncate-fill":!0},`fill`);return Z(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Z(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function xA({children:e,...t}){"use no memo";return Z(bA,{mode:`truncate`,...t,children:e})}function SA({children:e,...t}){"use no memo";return Z(bA,{mode:`fruncate`,...t,children:e})}function CA({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=Z(xA,{...s,children:t[0]}),l=Z(SA,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Z(`div`,{className:a,style:o});if(e.length<i)return Z(n===`end`?SA:xA,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=fA:r===`extension`?t=pA:r===`leaf-path`&&(t=mA);else if(typeof r==`number`)t=hA,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=gA:e===`first`&&(t=_A)}else typeof r==`function`&&(t=r);t??=fA;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=Z(xA,{...s,..._,children:f}),l=Z(SA,{...s,...v,children:p})}return Z(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Z(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Z(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var wA={endIndex:-1,startIndex:-1};function TA(e,t,n){return Math.min(Math.max(e,t),n)}function EA(e,t){return e<0||t<e?wA:{endIndex:t,startIndex:e}}function DA(e){return e.startIndex<0||e.endIndex<e.startIndex}function OA(e,t){return DA(e)?0:(e.endIndex-e.startIndex+1)*t}function kA(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function AA(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function jA(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 MA(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 NA(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 PA(e,t,n){if(e.length===0||t<=0)return[];let r=NA(e),i=jA(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=MA(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 FA(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=TA(t.scrollTop,0,o),c=t.stickyRows??PA(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=kA(s,n,t.itemHeight),m=kA(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?wA:EA(m,AA(u+d,n,t.itemHeight)),y=g+1,b=DA(v)?wA:EA(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=OA(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:DA(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var IA={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},LA={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},RA=`Contains git status items`;function zA(e){return e.current?!0:(e.current=!0,!1)}function BA(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 VA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return BA({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function HA(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}function UA(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 WA(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 GA(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function KA(e,t){return e!=null&&e>0?e:t}function qA(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 JA(e,t,n,r,i=0){let a=BA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function YA(e,t,n,r,i,a,o=0){let s=VA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function XA(e,t,n,r,i,a){let o=HA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function ZA(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function QA(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function $A({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Z(`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 ej(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 tj(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}}var nj,Q,rj,ij,aj=Object.is,oj=0,sj=[],cj=X,lj=cj.__b,uj=cj.__r,dj=cj.diffed,fj=cj.__c,pj=cj.unmount,mj=cj.__;function hj(e,t){cj.__h&&cj.__h(Q,e,oj||t),oj=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function gj(e){return oj=1,_j(Oj,e)}function _j(e,t,n){var r=hj(nj++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Oj(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);aj(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.__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,aj(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};Q.__f=!0;var a=Q.shouldComponentUpdate,o=Q.componentWillUpdate;Q.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)},Q.shouldComponentUpdate=i}return r.__N||r.__}function vj(e,t){var n=hj(nj++,3);!cj.__s&&Dj(n.__H,t)&&(n.__=e,n.u=t,Q.__H.__h.push(n))}function yj(e,t){var n=hj(nj++,4);!cj.__s&&Dj(n.__H,t)&&(n.__=e,n.u=t,Q.__h.push(n))}function $(e){return oj=5,bj(function(){return{current:e}},[])}function bj(e,t){var n=hj(nj++,7);return Dj(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function xj(e,t){return oj=8,bj(function(){return e},t)}function Sj(){for(var e;e=sj.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Tj),e.__H.__h.forEach(Ej),e.__H.__h=[]}catch(t){e.__H.__h=[],cj.__e(t,e.__v)}}cj.__b=function(e){Q=null,lj&&lj(e)},cj.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),mj&&mj(e,t)},cj.__r=function(e){uj&&uj(e),nj=0;var t=(Q=e.__c).__H;t&&(rj===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Tj),t.__h.forEach(Ej),t.__h=[],nj=0)),rj=Q},cj.diffed=function(e){dj&&dj(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(sj.push(t)!==1&&ij===cj.requestAnimationFrame||((ij=cj.requestAnimationFrame)||wj)(Sj)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),rj=Q=null},cj.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Tj),e.__h=e.__h.filter(function(e){return!e.__||Ej(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],cj.__e(n,e.__v)}}),fj&&fj(e,t)},cj.unmount=function(e){pj&&pj(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Tj(e)}catch(e){t=e}}),n.__H=void 0,t&&cj.__e(t,n.__v))};var Cj=typeof requestAnimationFrame==`function`;function wj(e){var t,n=function(){clearTimeout(r),Cj&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Cj&&(t=requestAnimationFrame(n))}function Tj(e){var t=Q,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Q=t}function Ej(e){var t=Q;e.__c=e.__(),Q=t}function Dj(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!aj(t,e[n])})}function Oj(e,t){return typeof t==`function`?t(e):t}function kj(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Z(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Z(Fk,{children:[Z(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Z(xA,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function Aj(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function jj(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function Mj(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 Nj({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=FA(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:Mj(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?Mj(u,1,t,o):i&&r<=0&&c.length>0?PA(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 Pj=400,Fj=40,Ij=18;function Lj(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))?Rj(e,t,n):a instanceof HTMLElement?a:null}function Rj(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 zj(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 Bj(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 Vj(){return navigator.vendor!==`Apple Computer, Inc.`}function Hj(e,t){let n=e-t.top;if(n<Fj)return-Math.ceil((Fj-Math.max(0,n))/Fj*Ij);let r=t.bottom-e;return r<Fj?Math.ceil((Fj-Math.max(0,r))/Fj*Ij):0}function Uj(e,t){if(e!=null){let t=IA[e];return t==null?null:{text:t,title:LA[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:RA}:null}function Wj(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 Gj(e){return e!=null&&`toggle`in e}function Kj(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function qj(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Jj(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Yj(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Xj(e,t){return t&&Yj(e)||(e.ctrlKey||e.metaKey)&&Kj(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Zj=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function Qj(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 $j(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 eM(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function tM(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function nM(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function rM(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 iM(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 aM(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 oM(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=aM(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 sM(e,t){return{kind:e.kind,name:jj(e),path:t}}function cM(e){return e==null?void 0:`${e}__tree`}function lM(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function uM(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function dM(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Z(`span`,{title:e.title,children:e.text}):Z(`span`,{title:e.title,children:e.parts.map((e,t)=>Z(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?uM(e.icon)?t(e.icon):{name:e.icon}:uM(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Z(`span`,{title:e.title,children:Z(cA,{...n})})}function fM(e){e!=null&&UA(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function pM(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=Aj(e);return Z(Fk,{children:[e.depth>0?Z(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Z(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Z(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Z(cA,{...t(`file-tree-icon-chevron`)}):Z(cA,{...t(`file-tree-icon-file`,u)})}),Z(`div`,{"data-item-section":`content`,children:e.isFlattened?kj(e,c,a):c??Z(CA,{minimumLength:5,split:`extension`,children:e.name})}),i?Z(`div`,{"data-item-section":`decoration`,children:r==null?null:dM(r,t)}):null,s?Z(`div`,{"data-item-section":`git`,children:dM(o,t)}):null,n?Z(`div`,{"data-item-section":`action`,children:l?Z(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Z(cA,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function mM(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:ee,onRowClick:j,onKeyDown:te}=e,M=Aj(t),{isParked:ne=!1,mode:re=`flow`,style:ie}=r,ae=re===`sticky`,oe=_?.get(M)??null??Wj(t.ancestorPaths,v,y),se=t.kind===`directory`&&(b?.has(M)??!1),ce=A(t,M),le=Uj(oe,se),ue=S&&w,de=ce!=null||x||ue,fe=ue&&T===`always`,pe=a.getPath()===M,me=pe?a.getValue():``,he=ae||!pe?null:Z($A,{ref:D,ariaLabel:`Rename ${jj(t)}`,isFlattened:t.isFlattened,value:me,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ge=pM(t,k,{actionLaneEnabled:ue,customDecoration:ce,decorationLaneEnabled:de,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:le,gitLaneActive:x,renameInput:he,showDecorativeActionAffordance:fe}),_e={...ej({ariaLabel:jj(t),domId:t.isFocused?lM(h,M,ne):void 0,extraStyle:ie,features:{actionLaneEnabled:ue,contextMenuButtonVisibility:ue?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:ne,itemHeight:g,mode:re,row:t,state:{containsGitChange:se,effectiveGitStatus:oe,isContextHovered:s===M,isDragTarget:l?.kind===`directory`&&l.directoryPath===M,isDragging:c?.has(M)===!0,isFocusRinged:t.isFocused&&o===M},targetPath:M}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(M),ee(t,M,{anchorRect:eM(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ae?void 0:()=>{i.focusMountedPathFromInput(M)},onKeyDown:ae?void 0:te,ref:e=>{O(M,e)}};return!ae&&pe?Z(`div`,{..._e,children:ge}):Z(`button`,{..._e,type:`button`,draggable:u&&!ne,onDragEnd:u&&!ne?p:void 0,onDragStart:u&&!ne?e=>{f(e,t,M)}:void 0,onMouseDown:e=>{if(ae){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!ne?e=>{m(e,t,M)}:void 0,onClick:e=>{j(e,t,M,re)},children:ge})}function hM(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(Aj(e))).map((n,r)=>mM(e,n,t.start+r))}function gM({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=sO,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 _=$(null),v=$(null),y=$(!1),b=$(null),x=$(null),S=$(null),C=$(null),w=$(null),T=$(new Map),E=$(new Map),D=$(()=>{}),O=$(null),k=$(0),A=$(!1),ee=$(null);ee.current!==t&&(A.current=!1,ee.current=t);let j=$(!1),te=$(null),M=$(null),ne=$(!1),re=$(null),ie=$(null),ae=$(null),oe=$(null),se=$(null),ce=$(null),le=$(null),ue=$(null),de=$(!1),fe=$(null),pe=$(null),me=$(null),he=$(null),ge=bj(()=>new Map,[]),[,_e]=gj(0),ve=$(!1),[ye,be]=gj(null),[xe,Se]=gj(null),[Ce,we]=gj(null),[Te,Ee]=gj(null),[De,Oe]=gj(0),[N,ke]=gj(null),Ae=$(N);Ae.current=N;let je=$(null),Me=$(null),Ne=$(null),Pe=$(null),Fe=$(null),Ie=$(!1),Le=()=>{Me.current=null,Ne.current=null,Pe.current=null},Re=(e,t)=>{Me.current=e,Ne.current=null,Pe.current=t==null?null:{path:e,scrollTop:t}},Be=(e,t)=>{Me.current=null,Ne.current={path:e,viewportOffset:t},Pe.current=null},Ve=$(d===`retain`&&t.isSearchOpen()),[He,Ue]=gj(p);vj(()=>{p||Ue(!1)},[p]);let We=$(!1),Ge=xj(()=>{We.current=!0,Ue(e=>e&&!1)},[]),[Ke,qe]=gj(()=>Nj({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Je,Ye]=gj(!1);vj(()=>{Ye(!0)},[]);let Xe=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Ze=e?.contextMenu?.triggerMode??(Xe?`right-click`:`both`),Qe=Ze===`both`||Ze===`button`,$e=e?.contextMenu?.buttonVisibility??`when-needed`,et=Ze===`both`||Ze===`right-click`;yj(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Fe.current=t,Se(t),Ee(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Ie.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 tt=xj((e,t)=>{nM(T.current,e,t)},[]),nt=xj((e,t)=>{nM(E.current,e,t)},[]),rt=xj(e=>{x.current=e},[]),it=xj(e=>rM(e,E.current,T.current),[]),at=n!=null||r!=null||i!=null,{resolveIcon:ot}=bj(()=>ze(a),[a]),st=t[QO](),ct=st.getPath(),lt=ct!=null,ut=t.isSearchOpen(),dt=t.getSearchValue(),P=t.getFocusedPath(),F=t.getFocusedIndex(),ft=t.getScrollRequest(),pt=t.isDragAndDropEnabled(),mt=t.getDragSession(),ht=bj(()=>mt==null?null:new Set(mt.draggedPaths),[mt]),gt=mt?.target??null,_t=mt?.primaryPath??null,vt=cM(o),{overlayHeight:yt,overlayRows:bt,snapshot:xt,visibleRows:St}=Ke,Ct=xt.physical.viewportHeight,wt=bj(()=>({end:xt.window.endIndex,start:xt.window.startIndex}),[xt.window.endIndex,xt.window.startIndex]),Tt=bt,Et=xt.sticky.rows,Dt=xt.physical.totalHeight,Ot=xt.sticky.height,I=bj(()=>new Set(Et.map(e=>Aj(e.row))),[Et]),kt=F>=0&&F>=wt.start&&F<=wt.end,At=xj((e,t)=>u?.({item:sM(e,t),row:e})??null,[u]),jt=xj(e=>UA(e==null?null:T.current.get(e)??null)?!0:UA(S.current),[]),Mt=xj(e=>{jt(t.focusNearestPath(e))},[t,jt]),Nt=$(Mt);Nt.current=Mt;let Pt=$(!0),Ft=$(()=>{}),It=xj((t=!0)=>{let n=Ae.current;n!=null&&(Pt.current=Pt.current&&t,ke(null),e?.contextMenu?.onClose?.(),Pt.current&&Mt(n.path))},[e?.contextMenu,Mt]);Ft.current=It;let Lt=xj(e=>{let t=e==null?null:tM(S.current,e);we(e=>e===t?e:t)},[]),Rt=xj((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=it(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Re(n,e?.scrollTop??null),j.current=!0,be(e=>e===n?e:n)}i.focus(),Lt(a),Pt.current=!0,ke({anchorRect:r?.anchorRect??null,item:sM(e,n),path:n,source:r?.source??`keyboard`})},[t,it,Lt]),zt=xj(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=GA(e,Ct);re.current=F<0||e==null?null:Math.max(0,Math.min(F*s-e.scrollTop,Math.max(0,t-s))),ne.current=!0}t.startRenaming(e)!==!1&&(Ee(`focus`),_e(e=>e+1))}},[t,F,s,l,Ct]),Bt=xj((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=GA(i,Ct),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:Nj({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return j.current=!0,XA(i,a,s,l,u,d),D.current(),je.current=n?e:null,!0},[t,s,c,Ct,h]),Vt=()=>y.current===!0||he.current!=null||de.current===!0,Ht=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Ut=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Wt=()=>{oe.current!=null&&(clearTimeout(oe.current),oe.current=null),ae.current=null},Gt=()=>{ce.current?.remove(),ce.current=null},Kt=()=>{Ut(ie.current),ie.current=null,se.current=null},qt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Jt=()=>{ue.current?.(),ue.current=null,he.current!=null&&(clearTimeout(he.current),he.current=null),de.current=!1,fe.current=null,me.current=null,pe.current!=null&&(pe.current.setAttribute(`draggable`,`true`),pe.current.style.removeProperty(`touch-action`),pe.current=null),Gt(),Wt(),Kt(),le.current=null},Yt=(e,n)=>{let r=S.current?.getRootNode(),i=zj(Lj(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Xt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Wt();return}let r=t.getItem(e.directoryPath),i=Gj(r)?r:null;if(i==null||i.isExpanded()){Wt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ae.current!==a&&(Wt(),ae.current=a,oe.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Zt=()=>{ie.current=null;let e=se.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=Hj(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()),Xt(Yt(e.clientX,e.clientY)),ie.current=Ht(Zt)},Qt=(e,t)=>{se.current={clientX:e,clientY:t},ie.current??=Ht(Zt)},$t=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Jt(),Gt(),Wt(),Kt(),t.startDrag(r)===!1){e.preventDefault();return}if(le.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Vj())){let t=Bj(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),qt(t),ce.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},en=()=>{Gt(),Wt(),Kt(),le.current=null,t.cancelDrag()},tn=(e,n,r)=>{if(he.current!=null||de.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;me.current={clientX:i.clientX,clientY:i.clientY},pe.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!de.current;he.current!=null&&(clearTimeout(he.current),he.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ue.current===o&&(ue.current=null),t&&(a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null)},s=e=>{let t=e.touches[0],n=me.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),ue.current=o,he.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null;return}de.current=!0,pe.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),le.current=n;let e=a.getBoundingClientRect(),s=Bj(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`}),qt(s),ce.current=s,fe.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=fe.current;n!=null&&ce.current!=null&&(ce.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Xt(Yt(t.clientX,t.clientY)),Qt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Yt(n.clientX,n.clientY),t.completeDrag(),Jt()},u=()=>{t.cancelDrag(),Jt()};ue.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)},Pj)},nn=e=>{if(N!=null){if(e.key===`Escape`){It(),e.preventDefault(),e.stopPropagation();return}Zj.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(st.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)st.cancel();else if(e.key===`Enter`)st.commit();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){zt(P??void 0),e.preventDefault(),e.stopPropagation();return}if(ut){if(e.key===`Escape`)ne.current=!1,re.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=GA(n,Ct);re.current=F<0||n==null?null:Math.max(0,Math.min(F*s-n.scrollTop,Math.max(0,r-s))),ne.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&qj(e)){t.openSearch(e.key),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Xe&&Yj(e),r=Xj(e,Xe),i=r&&S.current!=null?WA(S.current):null,a=r?new Set(iM(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==P&&a.has(o)){let e=C.current;Re(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=Gj(p)?p:null,h=u!=null&&(I.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=rM(u,E.current,T.current);e==null||n==null?y=!1:Rt(e,u)}else if((e.ctrlKey||e.metaKey)&&Kj(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;Ee(`focus`);let b=t.getFocusedPath(),x=b!=null&&(I.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Re(b,v?.scrollTop??null),j.current=!0,be(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Be(b,oM(S.current,v,i,u,s,Ot,Ct)),j.current=!0,be(e=>e===b?e:b)):Le()}_e(e=>e+1),e.preventDefault(),e.stopPropagation()};yj(()=>{if(f&&ut){if(Ve.current){Ve.current=!1;return}UA(w.current)}},[ut,f]),yj(()=>{let e=x.current;switch(QA({hasRenderedInput:e!=null,previousRenamingPath:M.current,renamingPath:ct})){case`reset`:M.current=null;return;case`reveal-canonical`:ct!=null&&Bt(ct,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(je.current=null,M.current=ct,UA(e),e.select());return}},[wt.end,wt.start,ct,Bt,I]),yj(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=WA(e)?.dataset.itemPath??null;be(e=>e===t?e:t)},i=()=>{n(),j.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,WA(e)!=null){r();return}j.current=!1,be(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),j.current=!1,be(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;be(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),yj(()=>{let e=S.current;e!=null&&(xt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[xt.physical.scrollTop]),yj(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=GA(n,g);let a=()=>{let e=t.getVisibleCount(),r=KA(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),qe(Nj({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=KA(O.current,g),i=t.getVisibleRows(e,e)[0]??null;JA(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{zA(ve)&&_e(e=>e+1),a()}),l=()=>{Ie.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,Oe(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Ie.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Ae.current!=null&&y.current&&Ft.current(),Ie.current===!0){y.current=!1;return}Se(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:qA(e[0]))??GA(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),yj(()=>{Xe||N==null||It(!1)},[It,Xe,N]);let rn=bj(()=>N==null?null:`${N.path}::${N.source}`,[N]);yj(()=>{if(rn==null){m?.clearSlotContent(Tw);return}let t=Ae.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??$j(n.getBoundingClientRect()),close:e=>{Ft.current(e?.restoreFocus??!0)},restoreFocus:()=>{Pt.current&&Nt.current(Ae.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(Tw,i),e?.contextMenu?.onOpen?.(t.item,r),fM(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&fM(i)}),()=>{m?.clearSlotContent(Tw)}},[rn,e?.contextMenu,m]),yj(()=>{N!=null&&t.getItem(N.path)==null&&It()},[It,N,t]),yj(()=>{if(N==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(Qj(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&It())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),It())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[It,N]),yj(()=>{let e=C.current,n=S.current;if(e==null||n==null){te.current=P;return}let r=P==null?null:T.current.get(P)??null,i=WA(n),a=i?.dataset.itemPath??null,o=lt&&x.current===i,c=f&&w.current===i,l=ne.current&&!ut,u=re.current??0,d=je.current,p=Me.current,m=Ne.current,g=Pe.current,_=i!=null,v=j.current||_,y=te.current!==P,b=p!=null&&p===P&&P!=null,E=!1,O=!1;if(ft!=null&&ft.id!==k.current){k.current=ft.id;let n=ft.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,Ct-s))):Ot;E=!0,O=YA(e,n,s,Ct,Dt,ft.offset,t)}t.clearScrollRequest(ft.id)}let A=!E&&l&&XA(e,F,s,Ct,Dt,u),ee=!E&&d!=null&&d===P&&XA(e,F,s,Ct,Dt,Ot),M=!E&&m!=null&&m.path===P&&XA(e,F,s,Ct,Dt,m.viewportOffset),ie=!E&&g!=null&&g.path===P&&e.scrollTop!==g.scrollTop;if(ie&&(e.scrollTop=g.scrollTop),(ie||O||ee||M||A||v&&y&&d!==P&&!b&&JA(e,F,s,Ct,Ot))&&D.current(),E){te.current=P;return}if(!v){te.current=P;return}if(o){te.current=P;return}if(c&&!l){te.current=P;return}if(r==null){l&&F>=0&&(XA(e,F,s,Ct,Dt,u),D.current()),te.current=P;return}(y||l||d===P||p===P||m?.path===P||g?.path===P||a==null||a!==P)&&(UA(r),d===P&&(je.current=null),p===P&&(Me.current=null),m?.path===P&&(Ne.current=null),g?.path===P&&(Pe.current=null),ne.current=!1,re.current=null),te.current=P},[t,F,P,kt,s,lt,ut,wt,Ct,f,ft,h,Ot,Dt,St]);let an=F>=0&&F>=xt.visible.startIndex&&F<=xt.visible.endIndex,on=P!=null&&Tt.some(e=>Aj(e.row)===P),sn=an||on,cn=Qe&&j.current===!0&&sn?P:null,ln=Te===`pointer`?xe:null,un=N?.path??Fe.current??ln??cn??xe,dn=N?.source===`right-click`;yj(()=>{y.current&&N==null||Lt(it(un))},[N,it,wt,Ct,De,Tt,un,Lt,St]);let fn=xj(e=>{if(y.current||Qj(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&&Ee(e=>e===`pointer`?e:`pointer`),Se(e=>e===i?e:i)},[]),pn=xj(()=>{Se(null)},[]);yj(()=>{if(!pt)return;let e=()=>{Jt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Jt(),t.cancelDrag()}},[t,pt]);let mn=e=>{if(!pt||t.getDragSession()==null||de.current)return;let n=zj(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Xt(t.getDragSession()?.target??null),Qt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},hn=e=>{if(!pt||t.getDragSession()==null||de.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Wt(),Kt(),t.setDragTarget(null))},gn=e=>{pt&&t.getDragSession()!=null&&!de.current&&(e.preventDefault(),Yt(e.clientX,e.clientY),t.completeDrag(),Gt(),Wt(),Kt(),le.current=null)},L=xt.window.height,_n=xt.window.offsetTop,vn=Math.min(0,Ct-L),yn=Math.min(0,Ct-L-Ot),bn=ye===P||ne.current,xn=P!=null&&bn&&!kt&&F>=0?St[F]??t.getVisibleRows(F,F)[0]??null:null,Sn=xn==null?null:ZA(F,s,wt,L),Cn=le.current,wn=_t!=null&&Cn!=null&&Cn.path===_t&&Cn.index>=wt.start&&Cn.index<=wt.end,Tn=_t!=null&&Cn!=null&&Cn.path===_t&&!wn&&Cn.path!==xn?.path?Cn:null,En=Tn==null?null:ZA(Tn.index,s,wt,L),Dn=Jj((F>=0?St[F]??t.getVisibleRows(F,F)[0]??null:null)?.ancestorPaths.at(-1)??null),On=ut&&P!=null?lM(o,P,!kt):void 0,kn=N?.path??(ut?P:ye),An=N?.path??xe,jn=it(un),Mn=Xe&&Qe&&!dn&&!lt&&jn!=null&&Ce!=null&&un!=null,Nn=Xe&&(Mn||N!=null),Pn=N?.anchorRect,Fn=Pn==null&&jn!=null&&Ce!=null&&(N!=null||Mn)?Ce:null,In=Pn==null?Fn==null?void 0:{top:`${Fn}px`}:{left:`${Pn.left}px`,position:`fixed`,right:`auto`,top:`${Pn.top}px`},Ln=dn?{opacity:`0`}:void 0,R=xj((e,n,r,i)=>{let a=tj({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:ut,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=xt.visible.startIndex&&n.index<=xt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(j.current=!0,be(e=>e===c?e:c),Ee(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Bt(c,{targetOffset:`sticky-parents`})},[t,ut,xt.visible.endIndex,xt.visible.startIndex,Bt]),Rn=()=>{if(y.current||!Qe||un==null||jn==null)return;let e=t.getItem(un);e!=null&&(Lt(jn),Pt.current=!0,ke({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:jn.getAttribute(`aria-label`)??un,path:e.getPath()},path:e.getPath(),source:`button`}))},zn={contextHoverPath:An,contextMenuButtonTriggerEnabled:Qe,contextMenuButtonVisibility:$e,contextMenuEnabled:Xe,contextMenuRightClickEnabled:et,contextMenuTriggerMode:Ze,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:pt,draggedPathSet:ht,dragTarget:gt,gitLaneActive:at,gitStatusByPath:n,handleRowDragEnd:en,handleRowDragStart:$t,handleRowTouchStart:tn,ignoredGitDirectories:r,ignoredInheritanceCache:ge,instanceId:o,itemHeight:s,onKeyDown:nn,onRowClick:R,openContextMenuForRow:Rt,registerButton:tt,registerRenameInput:rt,renameView:st,renderDecorationForRow:At,resolveIcon:ot,shouldSuppressContextMenu:Vt,visualFocusPath:kn},Bn={...zn,registerButton:nt};return Z(`div`,{ref:S,id:vt,"data-file-tree-context-menu-button-visibility":Xe&&Qe?$e:void 0,"data-file-tree-context-menu-trigger-mode":Xe?Ze:void 0,"data-file-tree-has-context-menu-action-lane":Xe&&Qe?`true`:void 0,"data-file-tree-has-git-lane":at?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:pt?hn:void 0,onDragOver:pt?mn:void 0,onDrop:pt?gn:void 0,onKeyDown:nn,onPointerLeave:Xe?pn:void 0,onPointerOver:Xe?fn:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Z(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:Dn}}),Z(`slot`,{name:ww,"data-type":`header-slot`}),f?Z(`div`,{"data-file-tree-search-container":!0,"data-open":ut?`true`:`false`,children:Z(`input`,{ref:w,"aria-activedescendant":On,"aria-controls":vt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":He?`true`:void 0,value:dt,onBlur:()=>{(d!==`retain`||We.current)&&t.closeSearch()},onFocus:Ge,onPointerDown:Ge,onInput:e=>{Ge();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Z(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Je&&Tt.length>0?Z(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Z(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${yt}px`},children:Tt.map((e,t)=>mM(Bn,e.row,`sticky:${Aj(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${Tt.length-t}`}}))})}):null,Z(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${Dt}px`},children:[Z(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${_n}px`}}),Z(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${L}px`,top:`${vn}px`,bottom:`${yn}px`},children:[hM(zn,wt,I),xn!=null&&Sn!=null?mM(zn,xn,`parked:${xn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:_t===xn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${Sn}px`}}):null,Tn!=null&&En!=null?mM(zn,Tn,`parked-drag:${Tn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${En}px`}}):null]})]})]}),Xe?Z(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Nn?`true`:`false`,style:In,children:[Z(`button`,{ref:v,type:`button`,"data-type":Ew,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":N==null?`false`:`true`,"data-visible":Mn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N!=null){It();return}Rn()},tabIndex:-1,style:Ln,children:Z(cA,{...ot(`file-tree-icon-ellipsis`)})}),N==null?null:Z(`slot`,{name:Tw})]}):null,N==null?null:Z(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),It()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),It()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var _M={hydrateRoot:(e,t)=>{rA(Nk(gM,t),e)},renderRoot:(e,t)=>{nA(Nk(gM,t),e)},unmountRoot:e=>{nA(null,e)}};function vM(e,t){_M.renderRoot(e,t)}function yM(e,t){_M.hydrateRoot(e,t)}function bM(e){_M.unmountRoot(e)}var xM=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)}}};function SM(e,t,n){if(!e.s){if(n instanceof CM){if(!n.s)return void(n.o=SM.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(SM.bind(null,e,t),SM.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var CM=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{SM(r,1,a(this.v))}catch(e){SM(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?SM(r,1,t?t(i):i):n?SM(r,1,n(i)):SM(r,2,i)}catch(e){SM(r,2,e)}},r},e}();Array.isArray;var wM=0;function TM(e){return e!=null&&e.length>0?e:(wM+=1,`pst_ft_${wM}`)}function EM({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??sO)}function DM(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 OM(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 kM(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var AM=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new xM;#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=TM(a),this.#p=lk(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=oO(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new ik({...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&&(bM(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()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}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)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=uk(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&vM(n.wrapper,this.#w())}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){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),vM(t.wrapper,this.#w()))}setGitStatus(e){let t=lk(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&vM(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),vM(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),yM(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),vM(r,this.#w())}#C(){return{initialViewportHeight:EM({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(ww,e());return}this.#l.setSlotHtml(ww,this.#e?.header?.html??null)}#k(e){let t=kM(e).find(e=>OM(e)),n=DM(Le(Fe(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=kM(e),n=t.find(e=>OM(e)),r=t.filter(e=>e!==n),i=Fe(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=DM(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=Fe(this.#m);t.colored&&Me(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${bw}]`);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(bw,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=dO(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 _O(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)}};function jM(e){let t=[],n=[];for(let r of e.trim().split(/\s+/).filter(Boolean)){let e=r.startsWith(`!`),i=e?r.slice(1):r;i&&(e?n:t).push(MM(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function MM(e){if(!/[*?]/.test(e))return t=>ot(e,t);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r===`*`?e[n+1]===`*`?(t+=`.*`,n++):t+=`[^/]*`:t+=r===`?`?`[^/]`:r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{return t=>ot(e,t)}}function NM(e){let t=new Set;for(let n of e)for(let e=n.indexOf(`/`);e!==-1;e=n.indexOf(`/`,e+1))t.add(n.slice(0,e+1));return t}function PM(e){let t=e.lastIndexOf(`/`,e.length-2);return t===-1?``:e.slice(0,t+1)}function FM(e,t){let n=new Set(e),r=new Set(t),i=NM(t),a=new Set([...NM(e)].filter(e=>!i.has(e))),o=[];for(let e of a)a.has(PM(e))||o.push({type:`remove`,path:e,recursive:!0});for(let t of e)!r.has(t)&&!a.has(PM(t))&&o.push({type:`remove`,path:t});for(let e of t)n.has(e)||o.push({type:`add`,path:e});return o}var IM=`_mS _o`,LM=re,RM=(e=>`/${e}&`)(A);function zM(e){k(e.a,ce)}var BM=(e,t)=>Se(e.a,t),VM=(e,t)=>M(e.a,t),HM=(e=>`<label>${e}<input type=search placeholder="Filter files…" aria-label="Filter files"></label>`)(LM),UM=(e=>` D/${e}& l`)(RM),WM=v(21,e=>T(e,`c`,e.o,lN(e))),GM=E(14,WM),KM=v(13,e=>GM(e,(e.m??e.k)||``)),qM=E(20,WM),JM=v(19,e=>qM(e,uN(e))),YM=E(18,JM),XM=v(17,e=>YM(e,dN(e)),2),ZM=h(10,e=>{KM(e),XM(e)}),QM=v(7,e=>ZM(e,e.f,e.g)),$M=E(5,QM),eN=E(6,QM),tN=f(12,e=>{KM(e),XM(e)}),nN=(e,t)=>aN(e,t.timer),rN=l(`t4`,e=>{x(e,`c`),s(e.c,`keydown`,function(t){t.key===`Enter`&&(e.s(),e.i?.()),t.key===`Escape`&&(e.o?(t.preventDefault(),e.u(``)):e.i&&(t.preventDefault(),e.i()))}),s(e.c,`blur`,function(){e.i&&(e.s(),e.i())})});function iN(e){y(e.a,[`_bl`,`_mR`]),zM(e.b),BM(e.b,14),VM(e.b,`_bm`),y(e.c,[`_bn`,IM]),tN(e,null),nN(e,{timer:0}),rN(e)}var aN=E(16,e=>{XM(e),JM(e)}),oN=l(`t3`,e=>O(e,{onMount:function(){e.j&&e.c.focus()}})),sN=E(9,oN),cN=E(8),lN=e=>function(t){e.u(t)},uN=e=>t=>{if(e.q&&clearTimeout(e.q),!t){e.q=0,tN(e,null),ZM(e,``);return}tN(e,t),e.q=setTimeout(e.s,150)},dN=e=>()=>{e.q&&=(clearTimeout(e.q),0);let t=e.m===null?e.k||``:e.m;tN(e,null),ZM(e,t)};_.t0=lN,_.t2=uN,_.t1=dN;var fN=new Set([`/`,`.`,`-`,`_`,` `]);function pN(e,t){if(t===0)return!0;let n=e[t-1];if(fN.has(n))return!0;let r=e[t];return r!==r.toLowerCase()&&n===n.toLowerCase()}function mN(e,t,n){let r=0;for(let i=0;i<t.length;i++){let a=t[i];r+=1,pN(e,a)&&(r+=8),i&&t[i-1]===a-1?r+=6:i&&(r-=Math.min(4,a-t[i-1]-1)),a>=n&&(r+=3),a===n&&(r+=6)}return r}function hN(e,t,n){let r=0,i=-1;for(let a=n;a<t.length;a++)if(t[a]===e[r]&&++r===e.length){i=a;break}if(i<0)return null;let a=[];r=e.length-1;for(let o=i;o>=n&&r>=0;o--)t[o]===e[r]&&(a.push(o),r--);return a.reverse()}function gN(e,t,n,r){let i=[],a=r;for(let r=0;r<e.length;r++){let o=i[i.length-1];if(o!=null&&n[o+1]===e[r]){i.push(o+1);continue}let s=a;for(;s<n.length&&!(n[s]===e[r]&&pN(t,s));)s++;if(s>=n.length)return null;i.push(s),a=s+1}return i}function _N(e,t,n,r,i){let a=hN(e,n,r);if(!a)return null;let o=gN(e,t,n,r),s=mN(t,a,i),c=o?mN(t,o,i):-1/0;return c>s?{score:c,hits:o}:{score:s,hits:a}}function vN(e,t,n,r){for(let i=t.indexOf(n,r);i!==-1;i=t.indexOf(n,i+1))if(pN(e,i))return!0;return!1}function yN(e,t){let n=e.split(/\s+/).filter(Boolean);if(!n.length)return{score:0,hits:[]};let r=t.toLowerCase(),i=t.lastIndexOf(`/`)+1,a=0,o=new Set;for(let e of n){let n=e.toLowerCase(),s=_N(n,t,r,i,i),c=s??_N(n,t,r,0,i);if(!c)return null;s&&vN(t,r,n,i)&&(a+=20),r.slice(i)===n&&(a+=30),a+=c.score;for(let e of c.hits)o.add(e)}return a-=t.length/100,{score:a,hits:[...o].sort((e,t)=>e-t)}}function bN(e){let t=e.match(/^(.*?):(\d+)(?::\d+)?\s*$/);return t?{query:t[1],line:Number(t[2])}:{query:e,line:0}}function xN(e,t,n,r){let i=[];for(let r of e){let e=yN(n,t(r));e&&i.push({item:r,match:e})}return i.sort((e,n)=>n.match.score-e.match.score||t(e.item).localeCompare(t(n.item))),i.slice(0,r)}var SN=`_lW _9 _M`,CN=tt,wN=(e=>`/${e}&`)(` b`),TN=60;function EN(e,t,n,r){let i=[],a=new Set(t);for(let t=n;t<r;t++){let n=a.has(t),r=i[i.length-1];r&&r.hit===n?r.text+=e[t]:i.push({text:e[t],hit:n})}return i}var DN=u(0,1,e=>d(e.a,e._.e)),ON=DN,kN=u(0,0,e=>d(e.b,e._.e)),AN=c(0,`<mark> </mark>`,` D `,e=>{kN._(e),y(e.a,`_lU`)},` `,` `,ON),jN=(e,t)=>AN(e,+!t),MN=(e,t)=>{jN(e,t[0]?.hit),NN(e,t[0]?.text)},NN=E(4,e=>{kN(e),DN(e)}),PN=u(0,1,e=>d(e.a,e._.e)),FN=PN,IN=u(0,0,e=>d(e.b,e._.e)),LN=c(0,`<mark> </mark>`,` D `,e=>{IN._(e),y(e.a,`_lU`)},` `,` `,FN),RN=(e,t)=>LN(e,+!t),zN=(e,t)=>{RN(e,t[0]?.hit),BN(e,t[0]?.text)},BN=E(4,e=>{IN(e),PN(e)}),VN=e=>y(e.a,o),HN=u(5,0,e=>d(e.b,e._.n)),UN=e=>{HN._(e),y(e.a,SN)},WN=b(34,e=>d(e.b,e._._._._.u),e=>e._._._._),GN=e=>{WN(e),y(e.a,`_lV`)},KN=v(2,e=>d(e.b,e._._._.l?`Loading files…`:e._._._.s?`No file matches “${C(e._._._.s)}”.`:`Type part of a file's name. Add :42 to open it at line 42.`)),qN=b(29,KN,e=>e._._._),JN=e=>{qN(e),YN(e),y(e.a,`_de`)},YN=b(33,KN,e=>e._._._),XN=b(28,e=>d(e.b,e._._._._.k),e=>e._._._._),ZN=c(0,`<li role=presentation>Recently opened</li>`,` `,VN,`<li role=presentation> </li>`,` D `,e=>{XN(e),y(e.a,o)}),QN=v(17,e=>ZN(e,!e._._._.s&&e.o===0?0:e.j&&(e.o===0||!e._._._.v[e.o-1].more)?1:2),3),$N=b(33,QN,e=>e._._._),eP=l(`J4`,e=>{s(e.c,`mousemove`,function(){e._._._.p!==e.o&&VP(e._._._,e.o)}),s(e.c,`click`,function(){e._._._.a1(e.o)})}),tP=e=>{$N(e),iP(e),aP(e),sP(e),y(e.d,`_lS`),y(e.e,`_lT`),eP(e)},nP=c(6,`<span>:<!></span>`,` Db%`,GN),rP=v(16,e=>nP(e,e._._._.u&&e.o===e._._._.y?0:1),2),iP=b(34,rP,e=>e._._._),aP=b(35,QN,e=>e._._._),oP=v(15,e=>{S(e.b,`aria-selected`,e.o===e._._._.y?`true`:`false`),y(e.c,[`_c_`,e.o===e._._._.y&&`_c9`])}),sP=b(37,e=>{oP(e),rP(e)},e=>e._._._),cP=E(9,QN),lP=E(14,e=>{QN(e),oP(e),rP(e)}),uP=p(3,`<!><!><!>`,`b%`,0,zN),dP=p(4,`<!><!><!>`,`b%`,0,MN),fP=v(20,e=>{uP(e,[EN(e.s,e.m,e.t,e.s?.length)]),dP(e,[EN(e.s,e.m,0,Math.max(0,e.t-1))])},2),pP=E(19,fP),mP=E(18,e=>{S(e.c,`title`,e.s),pP(e,e.s.lastIndexOf(`/`)+1),fP(e)}),hP=E(12,fP),gP=c(5,`<span> </span>`,` D `,UN),_P=E(13,e=>{gP(e,+!e.n),HN(e)}),vP=(e,t)=>{cP(e,t[0]?.more),mP(e,t[0]?.item?.path),_P(e,t[0]?.item?.hint),hP(e,t[0]?.hits),lP(e,t[1])},yP=b(31,e=>T(e,`c`,e._._.o,cF(e)),e=>e._._),bP=l(`J6`,e=>{x(e,`c`),s(e.d,`click`,function(){e._._.z()})}),xP=e=>{yP(e),SP(e),wP(e),DP(e),y(e.a,`_c4`),_e(e.b),ge(e.b,14),ve(e.b),y(e.c,a),y(e.d,[xe,`_c6`]),Ee(e.e),be(e.e,16),le(e.e),y(e.f,`_c7`),bP(e)},SP=b(32,e=>{S(e.c,`aria-controls`,e._._.q),S(e.f,`id`,e._._.q)},e=>e._._),CP=p(5,`<!><!><li role=option><button type=button><span></span><span></span><!><!></button></li>`,`b%b D D b b%b%`,tP,vP),wP=b(35,e=>CP(e,[e._._.v,e=>`${e.more?`+`:``}${e.item.key}`]),e=>e._._),TP=c(6,`<p> </p>`,` D `,JN),EP=l(`J5`,e=>s(e.c,`keydown`,function(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){t.preventDefault();let n=e._._.w;n&&VP(e._._,(e._._.y+(t.key===`ArrowDown`?1:-1)+n)%n)}else t.key===`Enter`&&(t.preventDefault(),e._._.a1(e._._.y))})),DP=b(36,e=>{TP(e,+!!e._._.w),EP(e)},e=>e._._),OP=c(0,((e,t)=>`<div>${e}<input type=search autofocus autocomplete=off placeholder="Go to file (name:42 for a line)" aria-label="Go to file" role=combobox aria-expanded=true><button type=button title=Close aria-label=Close>${t}</button></div><ul role=listbox></ul><!><!>`)(he,fe),((e,t)=>` D/${e}& b D/${t}&m b%c`)(de,Te),xP),kP=b(30,e=>OP(e,+!e._.m)),AP=g(`J7`,`<!><!><!>`,`b%`,kP),jP=D(kP),MP=h(12,e=>{Qe(e.a,e.m),jP(e)}),NP=v(5,e=>MP(e,e.d,e.e)),PP=E(3,NP),FP=E(4,NP),IP=(e,t)=>{ZP(e,t?.query),$P(e,t?.line)},LP=D(yP),RP=f(14,e=>{IP(e,bN(e.o.trim())),LP(e)}),zP=E(24,D(sP)),BP=v(23,e=>zP(e,Math.min(e.p,Math.max(0,e.w-1)))),VP=f(15,BP),HP=E(16),UP=E(27),WP=v(26,e=>UP(e,lF(e)),3),GP=E(25,WP);function KP(e){Xe(e.a),it(e.a,AP(e)),Ye(e.a,`Go to file`),qe(e.a,[`_bF`,`_c3`]),at(e.a,dF(e)),rt(e.a,!0),Ze(e.a),et(e.a),Je(e.a),$e(e.a),nt(e.a,{}),RP(e,``),VP(e,0),HP(e,m(e)),GP(e,uF(e))}var qP=D(wP,aP),JP=E(21,e=>{tF(e,e.v?.length),WP(e),qP(e)}),YP=v(19,e=>JP(e,(()=>{let t=e.s;if(!t){let t=new Map(e.g.map(e=>[e.key,e]));return(e.h||[]).map(e=>t.get(e)).filter(e=>!!e).map(e=>({item:e,hits:[],more:!1}))}let n=xN(e.g,e=>e.path,t,TN).map(e=>({item:e.item,hits:e.match.hits,more:!1})),r=e.i?xN(e.i.items,e=>e.path,t,TN).map(e=>({item:e.item,hits:e.match.hits,more:!0})):[];return[...n,...r]})()),3),XP=D($N,YN),ZP=E(18,e=>{YP(e),XP(e)}),QP=D(iP,WN),$P=E(20,e=>{WP(e),QP(e)}),eF=D(DP),tF=E(22,e=>{BP(e),eF(e)}),nF=E(6,YP),rF=E(7,YP),iF=E(8,e=>{oF(e,e.i?.label),YP(e)}),aF=E(9,WP),oF=E(10,D(XN)),sF=E(11,D(qN)),cF=e=>function(t){RP(e._._,t),VP(e._._,0)},lF=e=>t=>{let n=e.v[t];if(!n)return;let r=e.u;e.z(),e.j(n.item.key,r,n.more)},uF=e=>()=>{MP(e,!1),RP(e,``),VP(e,0)},dF=e=>t=>{MP(e,t)};_.J0=cF,_.J2=lF,_.J1=uF,_.J3=dF;export{zS as $,uw as A,yC as B,NM as C,pw as D,AM as E,wC as F,mC as G,_C as H,CC as I,nC as J,pC as K,xC as L,EC as M,DC as N,hw as O,TC as P,LS as Q,SC as R,RM as S,Dg as St,jM as T,hC as U,vC as V,gC as W,YS as X,tC as Y,BS as Z,UM as _,Fx as _t,PP as a,TS as at,zM as b,Wb as bt,KP as c,xS as ct,sN as d,tS as dt,RS as et,cN as f,uS as ft,HM as g,Hx as gt,iN as h,iS as ht,aF as i,wS as it,nw as j,mw as k,CN as l,$x as lt,eN as m,nS as mt,sF as n,PS as nt,FP as o,mS as ot,$M as p,cS as pt,WS as q,iF as r,FS as rt,rF as s,SS as st,nF as t,VS as tt,wN as u,rS as ut,VM as v,lx as vt,FM as w,LM as x,Tb as xt,BM as y,ax as yt,bC as z};
|
|
2640
|
+
}`}var fO=new WeakMap;function pO(e){let t=fO.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(xw,`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(),fO.set(e,i),i}function mO(e,t){if(!e.isConnected)return;let n=pO(t);if(n==null)return;let r=t.querySelector(`style[${Sw}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(Sw,``),t.appendChild(i)),i.textContent=`:host { ${Cw}: ${n}px; }`}var hO;function gO(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){hO??(hO=new CSSStyleSheet,hO.replaceSync(uO(cO)));let t=!1;try{e.adoptedStyleSheets=[hO],t=!0}catch{}if(t){e.querySelector(`style[${yw}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(yw,``),t.textContent=uO(cO),e.prepend(t)}}function _O(e,t){vO(e,t),gO(t),mO(e,t)}function vO(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`});_O(this,e)}}if(customElements.define(vw,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(vw)))e instanceof HTMLElement&&_O(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var yO=e=>e.startsWith(`f::`)?e.slice(3):e;function bO(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function xO(e,t){return e===``?t:`${e}/${t}`}function SO({files:e,path:t,isFolder:n,nextBasename:r}){let i=yO(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}=bO(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=xO(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 CO(e){return e.endsWith(`/`)}function wO(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 TO(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 EO(e,t){return t.includes(e)?TO(t):[e]}function DO(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 OO(e,t){return{draggedPaths:e,target:t}}function kO(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(CO(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function AO(e,t){return t.kind===`root`||t.directoryPath==null?wO(e):t.directoryPath}function jO(e,t){let n=e.map(e=>{let n=AO(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}}}function MO(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 NO(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(!MO(rO.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 PO(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function FO(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 IO(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function LO(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 IO(e,t.path)?n?e:null:e;case`move`:return FO(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=LO(r,e,n),r==null)return null;return r}}}function RO(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function zO(e){switch(e.operation){case`add`:return{...RO(e),operation:`add`,path:e.path};case`remove`:return{...RO(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...RO(e),from:e.from,operation:`move`,to:e.to}}}function BO(e){return{...RO(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>zO(e)),operation:`batch`}}function VO(e){switch(e.operation){case`add`:case`remove`:case`move`:return zO(e);case`batch`:return BO(e);default:return null}}function HO(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function UO(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 WO(e){return UO(e).at(-1)??null}function GO(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function KO(e){return e.endsWith(`/`)}var qO=e=>e.toLowerCase();function JO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function YO(e){return e.endsWith(`/`)?e.slice(0,-1):e}function XO(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var ZO=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},QO=Symbol(`FILE_TREE_RENAME_VIEW`),$O=512,ek=512;function tk(e){return e===`top`||e===`center`?e:`nearest`}function nk(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=UO(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 rk(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:nk(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var ik=class e{static{Object.defineProperty(e.prototype,QO,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#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=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=NO({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.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=WO(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:tk(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=ek){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(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.#H.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.#Se(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.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.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.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t!=null&&this.#B.has(t)&&this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(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.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=EO(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=OO(t.draggedPaths,n);(kO(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}DO(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}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.#De(),!1;let n=OO(e.draggedPaths,t);if(kO(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=jO(e.draggedPaths,t);if(r==null)return this.#De(),!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.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),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.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.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.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=KO(r),a=YO(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of UO(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=JO(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){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,KO(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){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,KO(e)?{recursive:!0}:void 0);return}let t=KO(e),n=SO({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:YO(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(XO(n.sourcePath,t),XO(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=NO({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!HO(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=WO(e),n=GO(e,t),r=null,i=null;for(let e of this.#be()){if(WO(e)!==t)continue;let a=GO(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=UO(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(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.#B.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}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!HO(this.#B,r),a=this.#z!==t;(i||a)&&(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new rO({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of UO(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(qO),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(qO),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of UO(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;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.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(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)}#Te(e,t){let n=e==null?null:ZO(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),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.#pe(),s=this.#me();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 UO(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of UO(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;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.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=rk(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,$O)),e,t?e=>this.#H.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.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=LO(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=LO(this.#c,e,!0),r=[...this.#B].map(t=>LO(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=LO(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return HO(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&PO(e)&&(this.#i=null);let t=PO(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=VO(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},ak=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 ok(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 sk(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function ck(e,t){return t?`${e}/`:e}function lk(e,t=null){let n=ak(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,o=new Map;for(let t of e??[]){let e=dk(t);e!=null&&mk({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function uk(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=fk(e);t!=null&&(c=pk({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=dk(e);t!=null&&(c=mk({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:_k(i),statusByPath:i}:e}function dk(e){return fk(e.path)}function fk(e){let t=ok(e);if(t!=null)return{canonicalPath:ck(t.path,t.isDirectory),isDirectory:t.isDirectory}}function pk({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),gk(t,n,e),!0)}function mk({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??hk(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function hk(e,t,n){for(let r of sk(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function gk(e,t,n){for(let r of sk(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function _k(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var X,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk={},Ok=[],kk=Array.isArray,Ak=Ok.slice,jk=Object.assign;function Mk(e){e&&e.parentNode&&e.remove()}function Nk(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?Ak.call(arguments,2):n),Pk(e,o,r,i,null)}function Pk(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??++vk,__i:-1,__u:0};return i==null&&X.vnode!=null&&X.vnode(a),a}function Fk(e){return e.children}function Ik(e,t){this.props=e,this.context=t,this.__g=0}function Lk(e,t){if(t==null)return e.__?Lk(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`?Lk(e):null}function Rk(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 Rk(e)}}function zk(e){(8&e.__g||!(e.__g|=8)||!yk.push(e)||xk++)&&bk==X.debounceRendering||((bk=X.debounceRendering)||queueMicrotask)(Bk)}function Bk(){for(var e,t,n,r,i,a,o,s,c=1;yk.length;)yk.length>c&&yk.sort(Sk),e=yk.shift(),c=yk.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=jk({},r)).__v=r.__v+1,X.vnode&&X.vnode(n),Jk(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??Lk(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Xk(a,n,o),n.__e!=i&&Rk(n)));xk=0}function Vk(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||Ok,b=t.length;for(c=Hk(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?Dk:y[m.__i]||Dk,m.__i=f,_=Jk(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&$k(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=Uk(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Hk(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?Pk(null,o,null,null,null):kk(o)?Pk(Fk,{children:o},null,null,null):o.constructor==null&&o.__b>0?Pk(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=Wk(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=Lk(s)),eA(s,s));return r}function Uk(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=Uk(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Lk(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Wk(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);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 Gk(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Kk(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||Gk(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Gk(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(Ck,`$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=wk,e.addEventListener(t,a?Ek:Tk,a)):e.removeEventListener(t,a?Ek:Tk,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 qk(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=wk++;else if(t.u<n.l)return;return n(X.event?X.event(t):t)}}}function Jk(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,ee,j=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=X.__b)&&d(t);n:if(typeof j==`function`)try{if(v=t.props,y=`prototype`in j&&j.prototype.render,b=(d=j.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 j(v,x):(t.__c=f=new Ik(v,x),f.constructor=j,f.render=tA),b&&b.sub(f),f.props=v,f.state||(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&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=jk({},f.__s)),jk(f.__s,j.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&j.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=X.__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=jk({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===Fk&&d.key==null&&(E=Zk(d.props.children)),s=Vk(e,kk(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(ee=a.length;ee--;)Mk(a[ee]);Yk(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Yk(t);X.__e(e,t,n)}else s=t.__e=Qk(n.__e,t,n,r,i,a,o,c,l,u);return(d=X.diffed)&&d(t),128&t.__u?void 0:s}function Yk(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Yk)}function Xk(e,t,n){for(var r=0;r<n.length;r++)$k(n[r],n[++r],n[++r]);X.__c&&X.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){X.__e(e,t.__v)}})}function Zk(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:kk(e)?e.map(Zk):jk({},e)}function Qk(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&&=(X.__m&&X.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=Ak.call(e.childNodes),v=n.props||Dk,!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;Kk(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&&!_||Kk(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=``),Vk(b==`template`?e.content:e,kk(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&Lk(n,0),s,c,l),a!=null)for(u=a.length;u--;)Mk(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Kk(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Kk(e,u,g,v[u],i))}return e}function $k(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){X.__e(e,n)}}function eA(e,t,n){var r,i;if(X.unmount&&X.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||$k(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){X.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&eA(r[i],t,n||typeof e.type!=`function`);n||Mk(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function tA(e,t,n){return this.constructor(e,n)}function nA(e,t){var n,r,i,a;t==document&&(t=document.documentElement),X.__&&X.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=Nk(Fk,null,[e]),i=[],a=[],Jk(t,e,r||Dk,Dk,t.namespaceURI,r?null:t.firstChild?Ak.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Xk(i,e,a)}function rA(e,t){e.__u|=32,nA(e,t)}X={__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 xk=0,e}},vk=0,Ik.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=jk({},this.state);typeof e==`function`&&(e=e(jk({},n),this.props)),e&&jk(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),zk(this))},Ik.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),zk(this))},Ik.prototype.render=Fk,yk=[],xk=0,Sk=function(e,t){return e.__v.__b-t.__v.__b},Ck=/(PointerCapture)$|Capture$/i,wk=0,Tk=qk(!1),Ek=qk(!0);var iA=0;Array.isArray;function Z(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:--iA,__i:-1,__u:0,__source:i,__self:a};return X.vnode&&X.vnode(l),l}var aA=16,oA=16,sA={};function cA({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}=sA[e]??{width:aA,height:oA},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Z(`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:Z(`use`,{href:c})})}var lA=e=>e!==void 0&&/\s/.test(e),uA=(e,t)=>{let n=t=>lA(e[t-1])||lA(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},dA=e=>uA(e,Math.ceil(e.length/2)),fA=e=>{if(e.length<2)return[e,``];let t=dA(e);return[e.slice(0,t),e.slice(t)]},pA=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:dA(e);return[e.slice(0,r),e.slice(r)]},mA=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)]},hA=(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)]},gA=(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)]},_A=(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 vA({children:e,marker:t,variant:n=`default`}){"use no memo";return Z(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Z(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Z(`span`,{"data-truncate-fade":!0}):t})})}function yA(e){"use no memo";let{mode:t,children:n}=e;return Z(`div`,{children:[Z(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Z(`span`,{children:n}):n}),Z(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Z(`span`,{children:n}):n})]})}function bA({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Z(yA,{mode:t,children:e},`content`),o=Z(vA,{marker:n,mode:t,variant:r},`marker`),s=Z(`div`,{"data-truncate-fill":!0},`fill`);return Z(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Z(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function xA({children:e,...t}){"use no memo";return Z(bA,{mode:`truncate`,...t,children:e})}function SA({children:e,...t}){"use no memo";return Z(bA,{mode:`fruncate`,...t,children:e})}function CA({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=Z(xA,{...s,children:t[0]}),l=Z(SA,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Z(`div`,{className:a,style:o});if(e.length<i)return Z(n===`end`?SA:xA,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=fA:r===`extension`?t=pA:r===`leaf-path`&&(t=mA);else if(typeof r==`number`)t=hA,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=gA:e===`first`&&(t=_A)}else typeof r==`function`&&(t=r);t??=fA;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=Z(xA,{...s,..._,children:f}),l=Z(SA,{...s,...v,children:p})}return Z(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Z(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Z(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var wA={endIndex:-1,startIndex:-1};function TA(e,t,n){return Math.min(Math.max(e,t),n)}function EA(e,t){return e<0||t<e?wA:{endIndex:t,startIndex:e}}function DA(e){return e.startIndex<0||e.endIndex<e.startIndex}function OA(e,t){return DA(e)?0:(e.endIndex-e.startIndex+1)*t}function kA(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function AA(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function jA(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 MA(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 NA(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 PA(e,t,n){if(e.length===0||t<=0)return[];let r=NA(e),i=jA(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=MA(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 FA(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=TA(t.scrollTop,0,o),c=t.stickyRows??PA(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=kA(s,n,t.itemHeight),m=kA(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?wA:EA(m,AA(u+d,n,t.itemHeight)),y=g+1,b=DA(v)?wA:EA(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=OA(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:DA(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var IA={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},LA={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},RA=`Contains git status items`;function zA(e){return e.current?!0:(e.current=!0,!1)}function BA(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 VA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return BA({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function HA(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}function UA(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 WA(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 GA(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function KA(e,t){return e!=null&&e>0?e:t}function qA(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 JA(e,t,n,r,i=0){let a=BA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function YA(e,t,n,r,i,a,o=0){let s=VA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function XA(e,t,n,r,i,a){let o=HA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function ZA(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function QA(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function $A({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Z(`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 ej(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 tj(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}}var nj,Q,rj,ij,aj=Object.is,oj=0,sj=[],cj=X,lj=cj.__b,uj=cj.__r,dj=cj.diffed,fj=cj.__c,pj=cj.unmount,mj=cj.__;function hj(e,t){cj.__h&&cj.__h(Q,e,oj||t),oj=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function gj(e){return oj=1,_j(Oj,e)}function _j(e,t,n){var r=hj(nj++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Oj(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);aj(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.__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,aj(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};Q.__f=!0;var a=Q.shouldComponentUpdate,o=Q.componentWillUpdate;Q.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)},Q.shouldComponentUpdate=i}return r.__N||r.__}function vj(e,t){var n=hj(nj++,3);!cj.__s&&Dj(n.__H,t)&&(n.__=e,n.u=t,Q.__H.__h.push(n))}function yj(e,t){var n=hj(nj++,4);!cj.__s&&Dj(n.__H,t)&&(n.__=e,n.u=t,Q.__h.push(n))}function $(e){return oj=5,bj(function(){return{current:e}},[])}function bj(e,t){var n=hj(nj++,7);return Dj(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function xj(e,t){return oj=8,bj(function(){return e},t)}function Sj(){for(var e;e=sj.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Tj),e.__H.__h.forEach(Ej),e.__H.__h=[]}catch(t){e.__H.__h=[],cj.__e(t,e.__v)}}cj.__b=function(e){Q=null,lj&&lj(e)},cj.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),mj&&mj(e,t)},cj.__r=function(e){uj&&uj(e),nj=0;var t=(Q=e.__c).__H;t&&(rj===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Tj),t.__h.forEach(Ej),t.__h=[],nj=0)),rj=Q},cj.diffed=function(e){dj&&dj(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(sj.push(t)!==1&&ij===cj.requestAnimationFrame||((ij=cj.requestAnimationFrame)||wj)(Sj)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),rj=Q=null},cj.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Tj),e.__h=e.__h.filter(function(e){return!e.__||Ej(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],cj.__e(n,e.__v)}}),fj&&fj(e,t)},cj.unmount=function(e){pj&&pj(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Tj(e)}catch(e){t=e}}),n.__H=void 0,t&&cj.__e(t,n.__v))};var Cj=typeof requestAnimationFrame==`function`;function wj(e){var t,n=function(){clearTimeout(r),Cj&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Cj&&(t=requestAnimationFrame(n))}function Tj(e){var t=Q,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Q=t}function Ej(e){var t=Q;e.__c=e.__(),Q=t}function Dj(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!aj(t,e[n])})}function Oj(e,t){return typeof t==`function`?t(e):t}function kj(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Z(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Z(Fk,{children:[Z(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Z(xA,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function Aj(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function jj(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function Mj(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 Nj({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=FA(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:Mj(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?Mj(u,1,t,o):i&&r<=0&&c.length>0?PA(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 Pj=400,Fj=40,Ij=18;function Lj(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))?Rj(e,t,n):a instanceof HTMLElement?a:null}function Rj(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 zj(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 Bj(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 Vj(){return navigator.vendor!==`Apple Computer, Inc.`}function Hj(e,t){let n=e-t.top;if(n<Fj)return-Math.ceil((Fj-Math.max(0,n))/Fj*Ij);let r=t.bottom-e;return r<Fj?Math.ceil((Fj-Math.max(0,r))/Fj*Ij):0}function Uj(e,t){if(e!=null){let t=IA[e];return t==null?null:{text:t,title:LA[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:RA}:null}function Wj(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 Gj(e){return e!=null&&`toggle`in e}function Kj(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function qj(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Jj(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Yj(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Xj(e,t){return t&&Yj(e)||(e.ctrlKey||e.metaKey)&&Kj(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Zj=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function Qj(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 $j(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 eM(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function tM(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function nM(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function rM(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 iM(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 aM(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 oM(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=aM(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 sM(e,t){return{kind:e.kind,name:jj(e),path:t}}function cM(e){return e==null?void 0:`${e}__tree`}function lM(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function uM(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function dM(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Z(`span`,{title:e.title,children:e.text}):Z(`span`,{title:e.title,children:e.parts.map((e,t)=>Z(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?uM(e.icon)?t(e.icon):{name:e.icon}:uM(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Z(`span`,{title:e.title,children:Z(cA,{...n})})}function fM(e){e!=null&&UA(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function pM(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=Aj(e);return Z(Fk,{children:[e.depth>0?Z(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Z(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Z(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Z(cA,{...t(`file-tree-icon-chevron`)}):Z(cA,{...t(`file-tree-icon-file`,u)})}),Z(`div`,{"data-item-section":`content`,children:e.isFlattened?kj(e,c,a):c??Z(CA,{minimumLength:5,split:`extension`,children:e.name})}),i?Z(`div`,{"data-item-section":`decoration`,children:r==null?null:dM(r,t)}):null,s?Z(`div`,{"data-item-section":`git`,children:dM(o,t)}):null,n?Z(`div`,{"data-item-section":`action`,children:l?Z(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Z(cA,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function mM(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:ee,onRowClick:j,onKeyDown:te}=e,M=Aj(t),{isParked:ne=!1,mode:re=`flow`,style:ie}=r,ae=re===`sticky`,oe=_?.get(M)??null??Wj(t.ancestorPaths,v,y),se=t.kind===`directory`&&(b?.has(M)??!1),ce=A(t,M),le=Uj(oe,se),ue=S&&w,de=ce!=null||x||ue,fe=ue&&T===`always`,pe=a.getPath()===M,me=pe?a.getValue():``,he=ae||!pe?null:Z($A,{ref:D,ariaLabel:`Rename ${jj(t)}`,isFlattened:t.isFlattened,value:me,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ge=pM(t,k,{actionLaneEnabled:ue,customDecoration:ce,decorationLaneEnabled:de,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:le,gitLaneActive:x,renameInput:he,showDecorativeActionAffordance:fe}),_e={...ej({ariaLabel:jj(t),domId:t.isFocused?lM(h,M,ne):void 0,extraStyle:ie,features:{actionLaneEnabled:ue,contextMenuButtonVisibility:ue?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:ne,itemHeight:g,mode:re,row:t,state:{containsGitChange:se,effectiveGitStatus:oe,isContextHovered:s===M,isDragTarget:l?.kind===`directory`&&l.directoryPath===M,isDragging:c?.has(M)===!0,isFocusRinged:t.isFocused&&o===M},targetPath:M}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(M),ee(t,M,{anchorRect:eM(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ae?void 0:()=>{i.focusMountedPathFromInput(M)},onKeyDown:ae?void 0:te,ref:e=>{O(M,e)}};return!ae&&pe?Z(`div`,{..._e,children:ge}):Z(`button`,{..._e,type:`button`,draggable:u&&!ne,onDragEnd:u&&!ne?p:void 0,onDragStart:u&&!ne?e=>{f(e,t,M)}:void 0,onMouseDown:e=>{if(ae){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!ne?e=>{m(e,t,M)}:void 0,onClick:e=>{j(e,t,M,re)},children:ge})}function hM(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(Aj(e))).map((n,r)=>mM(e,n,t.start+r))}function gM({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=sO,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 _=$(null),v=$(null),y=$(!1),b=$(null),x=$(null),S=$(null),C=$(null),w=$(null),T=$(new Map),E=$(new Map),D=$(()=>{}),O=$(null),k=$(0),A=$(!1),ee=$(null);ee.current!==t&&(A.current=!1,ee.current=t);let j=$(!1),te=$(null),M=$(null),ne=$(!1),re=$(null),ie=$(null),ae=$(null),oe=$(null),se=$(null),ce=$(null),le=$(null),ue=$(null),de=$(!1),fe=$(null),pe=$(null),me=$(null),he=$(null),ge=bj(()=>new Map,[]),[,_e]=gj(0),ve=$(!1),[ye,be]=gj(null),[xe,Se]=gj(null),[Ce,we]=gj(null),[Te,Ee]=gj(null),[De,Oe]=gj(0),[N,ke]=gj(null),Ae=$(N);Ae.current=N;let je=$(null),Me=$(null),Ne=$(null),Pe=$(null),Fe=$(null),Ie=$(!1),Le=()=>{Me.current=null,Ne.current=null,Pe.current=null},Re=(e,t)=>{Me.current=e,Ne.current=null,Pe.current=t==null?null:{path:e,scrollTop:t}},Be=(e,t)=>{Me.current=null,Ne.current={path:e,viewportOffset:t},Pe.current=null},Ve=$(d===`retain`&&t.isSearchOpen()),[He,Ue]=gj(p);vj(()=>{p||Ue(!1)},[p]);let We=$(!1),Ge=xj(()=>{We.current=!0,Ue(e=>e&&!1)},[]),[Ke,qe]=gj(()=>Nj({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Je,Ye]=gj(!1);vj(()=>{Ye(!0)},[]);let Xe=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Ze=e?.contextMenu?.triggerMode??(Xe?`right-click`:`both`),Qe=Ze===`both`||Ze===`button`,$e=e?.contextMenu?.buttonVisibility??`when-needed`,et=Ze===`both`||Ze===`right-click`;yj(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Fe.current=t,Se(t),Ee(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Ie.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 tt=xj((e,t)=>{nM(T.current,e,t)},[]),nt=xj((e,t)=>{nM(E.current,e,t)},[]),rt=xj(e=>{x.current=e},[]),it=xj(e=>rM(e,E.current,T.current),[]),at=n!=null||r!=null||i!=null,{resolveIcon:ot}=bj(()=>ze(a),[a]),st=t[QO](),ct=st.getPath(),lt=ct!=null,ut=t.isSearchOpen(),dt=t.getSearchValue(),P=t.getFocusedPath(),F=t.getFocusedIndex(),ft=t.getScrollRequest(),pt=t.isDragAndDropEnabled(),mt=t.getDragSession(),ht=bj(()=>mt==null?null:new Set(mt.draggedPaths),[mt]),gt=mt?.target??null,_t=mt?.primaryPath??null,vt=cM(o),{overlayHeight:yt,overlayRows:bt,snapshot:xt,visibleRows:St}=Ke,Ct=xt.physical.viewportHeight,wt=bj(()=>({end:xt.window.endIndex,start:xt.window.startIndex}),[xt.window.endIndex,xt.window.startIndex]),Tt=bt,Et=xt.sticky.rows,Dt=xt.physical.totalHeight,Ot=xt.sticky.height,I=bj(()=>new Set(Et.map(e=>Aj(e.row))),[Et]),kt=F>=0&&F>=wt.start&&F<=wt.end,At=xj((e,t)=>u?.({item:sM(e,t),row:e})??null,[u]),jt=xj(e=>UA(e==null?null:T.current.get(e)??null)?!0:UA(S.current),[]),Mt=xj(e=>{jt(t.focusNearestPath(e))},[t,jt]),Nt=$(Mt);Nt.current=Mt;let Pt=$(!0),Ft=$(()=>{}),It=xj((t=!0)=>{let n=Ae.current;n!=null&&(Pt.current=Pt.current&&t,ke(null),e?.contextMenu?.onClose?.(),Pt.current&&Mt(n.path))},[e?.contextMenu,Mt]);Ft.current=It;let Lt=xj(e=>{let t=e==null?null:tM(S.current,e);we(e=>e===t?e:t)},[]),Rt=xj((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=it(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Re(n,e?.scrollTop??null),j.current=!0,be(e=>e===n?e:n)}i.focus(),Lt(a),Pt.current=!0,ke({anchorRect:r?.anchorRect??null,item:sM(e,n),path:n,source:r?.source??`keyboard`})},[t,it,Lt]),zt=xj(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=GA(e,Ct);re.current=F<0||e==null?null:Math.max(0,Math.min(F*s-e.scrollTop,Math.max(0,t-s))),ne.current=!0}t.startRenaming(e)!==!1&&(Ee(`focus`),_e(e=>e+1))}},[t,F,s,l,Ct]),Bt=xj((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=GA(i,Ct),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:Nj({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return j.current=!0,XA(i,a,s,l,u,d),D.current(),je.current=n?e:null,!0},[t,s,c,Ct,h]),Vt=()=>y.current===!0||he.current!=null||de.current===!0,Ht=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Ut=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Wt=()=>{oe.current!=null&&(clearTimeout(oe.current),oe.current=null),ae.current=null},Gt=()=>{ce.current?.remove(),ce.current=null},Kt=()=>{Ut(ie.current),ie.current=null,se.current=null},qt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Jt=()=>{ue.current?.(),ue.current=null,he.current!=null&&(clearTimeout(he.current),he.current=null),de.current=!1,fe.current=null,me.current=null,pe.current!=null&&(pe.current.setAttribute(`draggable`,`true`),pe.current.style.removeProperty(`touch-action`),pe.current=null),Gt(),Wt(),Kt(),le.current=null},Yt=(e,n)=>{let r=S.current?.getRootNode(),i=zj(Lj(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Xt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Wt();return}let r=t.getItem(e.directoryPath),i=Gj(r)?r:null;if(i==null||i.isExpanded()){Wt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ae.current!==a&&(Wt(),ae.current=a,oe.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Zt=()=>{ie.current=null;let e=se.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=Hj(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()),Xt(Yt(e.clientX,e.clientY)),ie.current=Ht(Zt)},Qt=(e,t)=>{se.current={clientX:e,clientY:t},ie.current??=Ht(Zt)},$t=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Jt(),Gt(),Wt(),Kt(),t.startDrag(r)===!1){e.preventDefault();return}if(le.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Vj())){let t=Bj(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),qt(t),ce.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},en=()=>{Gt(),Wt(),Kt(),le.current=null,t.cancelDrag()},tn=(e,n,r)=>{if(he.current!=null||de.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;me.current={clientX:i.clientX,clientY:i.clientY},pe.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!de.current;he.current!=null&&(clearTimeout(he.current),he.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ue.current===o&&(ue.current=null),t&&(a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null)},s=e=>{let t=e.touches[0],n=me.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),ue.current=o,he.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null;return}de.current=!0,pe.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),le.current=n;let e=a.getBoundingClientRect(),s=Bj(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`}),qt(s),ce.current=s,fe.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=fe.current;n!=null&&ce.current!=null&&(ce.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Xt(Yt(t.clientX,t.clientY)),Qt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Yt(n.clientX,n.clientY),t.completeDrag(),Jt()},u=()=>{t.cancelDrag(),Jt()};ue.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)},Pj)},nn=e=>{if(N!=null){if(e.key===`Escape`){It(),e.preventDefault(),e.stopPropagation();return}Zj.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(st.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)st.cancel();else if(e.key===`Enter`)st.commit();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){zt(P??void 0),e.preventDefault(),e.stopPropagation();return}if(ut){if(e.key===`Escape`)ne.current=!1,re.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=GA(n,Ct);re.current=F<0||n==null?null:Math.max(0,Math.min(F*s-n.scrollTop,Math.max(0,r-s))),ne.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&qj(e)){t.openSearch(e.key),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Xe&&Yj(e),r=Xj(e,Xe),i=r&&S.current!=null?WA(S.current):null,a=r?new Set(iM(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==P&&a.has(o)){let e=C.current;Re(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=Gj(p)?p:null,h=u!=null&&(I.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=rM(u,E.current,T.current);e==null||n==null?y=!1:Rt(e,u)}else if((e.ctrlKey||e.metaKey)&&Kj(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;Ee(`focus`);let b=t.getFocusedPath(),x=b!=null&&(I.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Re(b,v?.scrollTop??null),j.current=!0,be(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Be(b,oM(S.current,v,i,u,s,Ot,Ct)),j.current=!0,be(e=>e===b?e:b)):Le()}_e(e=>e+1),e.preventDefault(),e.stopPropagation()};yj(()=>{if(f&&ut){if(Ve.current){Ve.current=!1;return}UA(w.current)}},[ut,f]),yj(()=>{let e=x.current;switch(QA({hasRenderedInput:e!=null,previousRenamingPath:M.current,renamingPath:ct})){case`reset`:M.current=null;return;case`reveal-canonical`:ct!=null&&Bt(ct,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(je.current=null,M.current=ct,UA(e),e.select());return}},[wt.end,wt.start,ct,Bt,I]),yj(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=WA(e)?.dataset.itemPath??null;be(e=>e===t?e:t)},i=()=>{n(),j.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,WA(e)!=null){r();return}j.current=!1,be(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),j.current=!1,be(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;be(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),yj(()=>{let e=S.current;e!=null&&(xt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[xt.physical.scrollTop]),yj(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=GA(n,g);let a=()=>{let e=t.getVisibleCount(),r=KA(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),qe(Nj({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=KA(O.current,g),i=t.getVisibleRows(e,e)[0]??null;JA(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{zA(ve)&&_e(e=>e+1),a()}),l=()=>{Ie.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,Oe(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Ie.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Ae.current!=null&&y.current&&Ft.current(),Ie.current===!0){y.current=!1;return}Se(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:qA(e[0]))??GA(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),yj(()=>{Xe||N==null||It(!1)},[It,Xe,N]);let rn=bj(()=>N==null?null:`${N.path}::${N.source}`,[N]);yj(()=>{if(rn==null){m?.clearSlotContent(Tw);return}let t=Ae.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??$j(n.getBoundingClientRect()),close:e=>{Ft.current(e?.restoreFocus??!0)},restoreFocus:()=>{Pt.current&&Nt.current(Ae.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(Tw,i),e?.contextMenu?.onOpen?.(t.item,r),fM(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&fM(i)}),()=>{m?.clearSlotContent(Tw)}},[rn,e?.contextMenu,m]),yj(()=>{N!=null&&t.getItem(N.path)==null&&It()},[It,N,t]),yj(()=>{if(N==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(Qj(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&It())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),It())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[It,N]),yj(()=>{let e=C.current,n=S.current;if(e==null||n==null){te.current=P;return}let r=P==null?null:T.current.get(P)??null,i=WA(n),a=i?.dataset.itemPath??null,o=lt&&x.current===i,c=f&&w.current===i,l=ne.current&&!ut,u=re.current??0,d=je.current,p=Me.current,m=Ne.current,g=Pe.current,_=i!=null,v=j.current||_,y=te.current!==P,b=p!=null&&p===P&&P!=null,E=!1,O=!1;if(ft!=null&&ft.id!==k.current){k.current=ft.id;let n=ft.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,Ct-s))):Ot;E=!0,O=YA(e,n,s,Ct,Dt,ft.offset,t)}t.clearScrollRequest(ft.id)}let A=!E&&l&&XA(e,F,s,Ct,Dt,u),ee=!E&&d!=null&&d===P&&XA(e,F,s,Ct,Dt,Ot),M=!E&&m!=null&&m.path===P&&XA(e,F,s,Ct,Dt,m.viewportOffset),ie=!E&&g!=null&&g.path===P&&e.scrollTop!==g.scrollTop;if(ie&&(e.scrollTop=g.scrollTop),(ie||O||ee||M||A||v&&y&&d!==P&&!b&&JA(e,F,s,Ct,Ot))&&D.current(),E){te.current=P;return}if(!v){te.current=P;return}if(o){te.current=P;return}if(c&&!l){te.current=P;return}if(r==null){l&&F>=0&&(XA(e,F,s,Ct,Dt,u),D.current()),te.current=P;return}(y||l||d===P||p===P||m?.path===P||g?.path===P||a==null||a!==P)&&(UA(r),d===P&&(je.current=null),p===P&&(Me.current=null),m?.path===P&&(Ne.current=null),g?.path===P&&(Pe.current=null),ne.current=!1,re.current=null),te.current=P},[t,F,P,kt,s,lt,ut,wt,Ct,f,ft,h,Ot,Dt,St]);let an=F>=0&&F>=xt.visible.startIndex&&F<=xt.visible.endIndex,on=P!=null&&Tt.some(e=>Aj(e.row)===P),sn=an||on,cn=Qe&&j.current===!0&&sn?P:null,ln=Te===`pointer`?xe:null,un=N?.path??Fe.current??ln??cn??xe,dn=N?.source===`right-click`;yj(()=>{y.current&&N==null||Lt(it(un))},[N,it,wt,Ct,De,Tt,un,Lt,St]);let fn=xj(e=>{if(y.current||Qj(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&&Ee(e=>e===`pointer`?e:`pointer`),Se(e=>e===i?e:i)},[]),pn=xj(()=>{Se(null)},[]);yj(()=>{if(!pt)return;let e=()=>{Jt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Jt(),t.cancelDrag()}},[t,pt]);let mn=e=>{if(!pt||t.getDragSession()==null||de.current)return;let n=zj(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Xt(t.getDragSession()?.target??null),Qt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},hn=e=>{if(!pt||t.getDragSession()==null||de.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Wt(),Kt(),t.setDragTarget(null))},gn=e=>{pt&&t.getDragSession()!=null&&!de.current&&(e.preventDefault(),Yt(e.clientX,e.clientY),t.completeDrag(),Gt(),Wt(),Kt(),le.current=null)},L=xt.window.height,_n=xt.window.offsetTop,vn=Math.min(0,Ct-L),yn=Math.min(0,Ct-L-Ot),bn=ye===P||ne.current,xn=P!=null&&bn&&!kt&&F>=0?St[F]??t.getVisibleRows(F,F)[0]??null:null,Sn=xn==null?null:ZA(F,s,wt,L),Cn=le.current,wn=_t!=null&&Cn!=null&&Cn.path===_t&&Cn.index>=wt.start&&Cn.index<=wt.end,Tn=_t!=null&&Cn!=null&&Cn.path===_t&&!wn&&Cn.path!==xn?.path?Cn:null,En=Tn==null?null:ZA(Tn.index,s,wt,L),Dn=Jj((F>=0?St[F]??t.getVisibleRows(F,F)[0]??null:null)?.ancestorPaths.at(-1)??null),On=ut&&P!=null?lM(o,P,!kt):void 0,kn=N?.path??(ut?P:ye),An=N?.path??xe,jn=it(un),Mn=Xe&&Qe&&!dn&&!lt&&jn!=null&&Ce!=null&&un!=null,Nn=Xe&&(Mn||N!=null),Pn=N?.anchorRect,Fn=Pn==null&&jn!=null&&Ce!=null&&(N!=null||Mn)?Ce:null,In=Pn==null?Fn==null?void 0:{top:`${Fn}px`}:{left:`${Pn.left}px`,position:`fixed`,right:`auto`,top:`${Pn.top}px`},Ln=dn?{opacity:`0`}:void 0,R=xj((e,n,r,i)=>{let a=tj({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:ut,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=xt.visible.startIndex&&n.index<=xt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(j.current=!0,be(e=>e===c?e:c),Ee(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Bt(c,{targetOffset:`sticky-parents`})},[t,ut,xt.visible.endIndex,xt.visible.startIndex,Bt]),Rn=()=>{if(y.current||!Qe||un==null||jn==null)return;let e=t.getItem(un);e!=null&&(Lt(jn),Pt.current=!0,ke({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:jn.getAttribute(`aria-label`)??un,path:e.getPath()},path:e.getPath(),source:`button`}))},zn={contextHoverPath:An,contextMenuButtonTriggerEnabled:Qe,contextMenuButtonVisibility:$e,contextMenuEnabled:Xe,contextMenuRightClickEnabled:et,contextMenuTriggerMode:Ze,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:pt,draggedPathSet:ht,dragTarget:gt,gitLaneActive:at,gitStatusByPath:n,handleRowDragEnd:en,handleRowDragStart:$t,handleRowTouchStart:tn,ignoredGitDirectories:r,ignoredInheritanceCache:ge,instanceId:o,itemHeight:s,onKeyDown:nn,onRowClick:R,openContextMenuForRow:Rt,registerButton:tt,registerRenameInput:rt,renameView:st,renderDecorationForRow:At,resolveIcon:ot,shouldSuppressContextMenu:Vt,visualFocusPath:kn},Bn={...zn,registerButton:nt};return Z(`div`,{ref:S,id:vt,"data-file-tree-context-menu-button-visibility":Xe&&Qe?$e:void 0,"data-file-tree-context-menu-trigger-mode":Xe?Ze:void 0,"data-file-tree-has-context-menu-action-lane":Xe&&Qe?`true`:void 0,"data-file-tree-has-git-lane":at?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:pt?hn:void 0,onDragOver:pt?mn:void 0,onDrop:pt?gn:void 0,onKeyDown:nn,onPointerLeave:Xe?pn:void 0,onPointerOver:Xe?fn:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Z(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:Dn}}),Z(`slot`,{name:ww,"data-type":`header-slot`}),f?Z(`div`,{"data-file-tree-search-container":!0,"data-open":ut?`true`:`false`,children:Z(`input`,{ref:w,"aria-activedescendant":On,"aria-controls":vt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":He?`true`:void 0,value:dt,onBlur:()=>{(d!==`retain`||We.current)&&t.closeSearch()},onFocus:Ge,onPointerDown:Ge,onInput:e=>{Ge();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Z(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Je&&Tt.length>0?Z(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Z(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${yt}px`},children:Tt.map((e,t)=>mM(Bn,e.row,`sticky:${Aj(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${Tt.length-t}`}}))})}):null,Z(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${Dt}px`},children:[Z(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${_n}px`}}),Z(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${L}px`,top:`${vn}px`,bottom:`${yn}px`},children:[hM(zn,wt,I),xn!=null&&Sn!=null?mM(zn,xn,`parked:${xn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:_t===xn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${Sn}px`}}):null,Tn!=null&&En!=null?mM(zn,Tn,`parked-drag:${Tn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${En}px`}}):null]})]})]}),Xe?Z(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Nn?`true`:`false`,style:In,children:[Z(`button`,{ref:v,type:`button`,"data-type":Ew,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":N==null?`false`:`true`,"data-visible":Mn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N!=null){It();return}Rn()},tabIndex:-1,style:Ln,children:Z(cA,{...ot(`file-tree-icon-ellipsis`)})}),N==null?null:Z(`slot`,{name:Tw})]}):null,N==null?null:Z(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),It()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),It()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var _M={hydrateRoot:(e,t)=>{rA(Nk(gM,t),e)},renderRoot:(e,t)=>{nA(Nk(gM,t),e)},unmountRoot:e=>{nA(null,e)}};function vM(e,t){_M.renderRoot(e,t)}function yM(e,t){_M.hydrateRoot(e,t)}function bM(e){_M.unmountRoot(e)}var xM=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)}}};function SM(e,t,n){if(!e.s){if(n instanceof CM){if(!n.s)return void(n.o=SM.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(SM.bind(null,e,t),SM.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var CM=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{SM(r,1,a(this.v))}catch(e){SM(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?SM(r,1,t?t(i):i):n?SM(r,1,n(i)):SM(r,2,i)}catch(e){SM(r,2,e)}},r},e}();Array.isArray;var wM=0;function TM(e){return e!=null&&e.length>0?e:(wM+=1,`pst_ft_${wM}`)}function EM({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??sO)}function DM(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 OM(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 kM(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var AM=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new xM;#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=TM(a),this.#p=lk(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=oO(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new ik({...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&&(bM(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()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}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)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=uk(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&vM(n.wrapper,this.#w())}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){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),vM(t.wrapper,this.#w()))}setGitStatus(e){let t=lk(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&vM(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),vM(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),yM(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),vM(r,this.#w())}#C(){return{initialViewportHeight:EM({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(ww,e());return}this.#l.setSlotHtml(ww,this.#e?.header?.html??null)}#k(e){let t=kM(e).find(e=>OM(e)),n=DM(Le(Fe(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=kM(e),n=t.find(e=>OM(e)),r=t.filter(e=>e!==n),i=Fe(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=DM(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=Fe(this.#m);t.colored&&Me(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${bw}]`);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(bw,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=dO(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 _O(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)}};function jM(e){let t=[],n=[];for(let r of e.trim().split(/\s+/).filter(Boolean)){let e=r.startsWith(`!`),i=e?r.slice(1):r;i&&(e?n:t).push(MM(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function MM(e){if(!/[*?]/.test(e))return t=>ot(e,t);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r===`*`?e[n+1]===`*`?(t+=`.*`,n++):t+=`[^/]*`:t+=r===`?`?`[^/]`:r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{return t=>ot(e,t)}}function NM(e){let t=new Set;for(let n of e)for(let e=n.indexOf(`/`);e!==-1;e=n.indexOf(`/`,e+1))t.add(n.slice(0,e+1));return t}function PM(e){let t=e.lastIndexOf(`/`,e.length-2);return t===-1?``:e.slice(0,t+1)}function FM(e,t){let n=new Set(e),r=new Set(t),i=NM(t),a=new Set([...NM(e)].filter(e=>!i.has(e))),o=[];for(let e of a)a.has(PM(e))||o.push({type:`remove`,path:e,recursive:!0});for(let t of e)!r.has(t)&&!a.has(PM(t))&&o.push({type:`remove`,path:t});for(let e of t)n.has(e)||o.push({type:`add`,path:e});return o}var IM=`_ml _o`,LM=re,RM=(e=>`/${e}&`)(A);function zM(e){k(e.a,ce)}var BM=(e,t)=>Se(e.a,t),VM=(e,t)=>M(e.a,t),HM=(e=>`<label>${e}<input type=search placeholder="Filter files…" aria-label="Filter files"></label>`)(LM),UM=(e=>` D/${e}& l`)(RM),WM=v(21,e=>T(e,`c`,e.o,lN(e))),GM=E(14,WM),KM=v(13,e=>GM(e,(e.m??e.k)||``)),qM=E(20,WM),JM=v(19,e=>qM(e,uN(e))),YM=E(18,JM),XM=v(17,e=>YM(e,dN(e)),2),ZM=h(10,e=>{KM(e),XM(e)}),QM=v(7,e=>ZM(e,e.f,e.g)),$M=E(5,QM),eN=E(6,QM),tN=f(12,e=>{KM(e),XM(e)}),nN=(e,t)=>aN(e,t.timer),rN=l(`t4`,e=>{x(e,`c`),s(e.c,`keydown`,function(t){t.key===`Enter`&&(e.s(),e.i?.()),t.key===`Escape`&&(e.o?(t.preventDefault(),e.u(``)):e.i&&(t.preventDefault(),e.i()))}),s(e.c,`blur`,function(){e.i&&(e.s(),e.i())})});function iN(e){y(e.a,[`_bl`,`_mk`]),zM(e.b),BM(e.b,14),VM(e.b,`_bm`),y(e.c,[`_bn`,IM]),tN(e,null),nN(e,{timer:0}),rN(e)}var aN=E(16,e=>{XM(e),JM(e)}),oN=l(`t3`,e=>O(e,{onMount:function(){e.j&&e.c.focus()}})),sN=E(9,oN),cN=E(8),lN=e=>function(t){e.u(t)},uN=e=>t=>{if(e.q&&clearTimeout(e.q),!t){e.q=0,tN(e,null),ZM(e,``);return}tN(e,t),e.q=setTimeout(e.s,150)},dN=e=>()=>{e.q&&=(clearTimeout(e.q),0);let t=e.m===null?e.k||``:e.m;tN(e,null),ZM(e,t)};_.t0=lN,_.t2=uN,_.t1=dN;var fN=new Set([`/`,`.`,`-`,`_`,` `]);function pN(e,t){if(t===0)return!0;let n=e[t-1];if(fN.has(n))return!0;let r=e[t];return r!==r.toLowerCase()&&n===n.toLowerCase()}function mN(e,t,n){let r=0;for(let i=0;i<t.length;i++){let a=t[i];r+=1,pN(e,a)&&(r+=8),i&&t[i-1]===a-1?r+=6:i&&(r-=Math.min(4,a-t[i-1]-1)),a>=n&&(r+=3),a===n&&(r+=6)}return r}function hN(e,t,n){let r=0,i=-1;for(let a=n;a<t.length;a++)if(t[a]===e[r]&&++r===e.length){i=a;break}if(i<0)return null;let a=[];r=e.length-1;for(let o=i;o>=n&&r>=0;o--)t[o]===e[r]&&(a.push(o),r--);return a.reverse()}function gN(e,t,n,r){let i=[],a=r;for(let r=0;r<e.length;r++){let o=i[i.length-1];if(o!=null&&n[o+1]===e[r]){i.push(o+1);continue}let s=a;for(;s<n.length&&!(n[s]===e[r]&&pN(t,s));)s++;if(s>=n.length)return null;i.push(s),a=s+1}return i}function _N(e,t,n,r,i){let a=hN(e,n,r);if(!a)return null;let o=gN(e,t,n,r),s=mN(t,a,i),c=o?mN(t,o,i):-1/0;return c>s?{score:c,hits:o}:{score:s,hits:a}}function vN(e,t,n,r){for(let i=t.indexOf(n,r);i!==-1;i=t.indexOf(n,i+1))if(pN(e,i))return!0;return!1}function yN(e,t){let n=e.split(/\s+/).filter(Boolean);if(!n.length)return{score:0,hits:[]};let r=t.toLowerCase(),i=t.lastIndexOf(`/`)+1,a=0,o=new Set;for(let e of n){let n=e.toLowerCase(),s=_N(n,t,r,i,i),c=s??_N(n,t,r,0,i);if(!c)return null;s&&vN(t,r,n,i)&&(a+=20),r.slice(i)===n&&(a+=30),a+=c.score;for(let e of c.hits)o.add(e)}return a-=t.length/100,{score:a,hits:[...o].sort((e,t)=>e-t)}}function bN(e){let t=e.match(/^(.*?):(\d+)(?::\d+)?\s*$/);return t?{query:t[1],line:Number(t[2])}:{query:e,line:0}}function xN(e,t,n,r){let i=[];for(let r of e){let e=yN(n,t(r));e&&i.push({item:r,match:e})}return i.sort((e,n)=>n.match.score-e.match.score||t(e.item).localeCompare(t(n.item))),i.slice(0,r)}var SN=`_ly _9 _M`,CN=tt,wN=(e=>`/${e}&`)(` b`),TN=60;function EN(e,t,n,r){let i=[],a=new Set(t);for(let t=n;t<r;t++){let n=a.has(t),r=i[i.length-1];r&&r.hit===n?r.text+=e[t]:i.push({text:e[t],hit:n})}return i}var DN=u(0,1,e=>d(e.a,e._.e)),ON=DN,kN=u(0,0,e=>d(e.b,e._.e)),AN=c(0,`<mark> </mark>`,` D `,e=>{kN._(e),y(e.a,`_lw`)},` `,` `,ON),jN=(e,t)=>AN(e,+!t),MN=(e,t)=>{jN(e,t[0]?.hit),NN(e,t[0]?.text)},NN=E(4,e=>{kN(e),DN(e)}),PN=u(0,1,e=>d(e.a,e._.e)),FN=PN,IN=u(0,0,e=>d(e.b,e._.e)),LN=c(0,`<mark> </mark>`,` D `,e=>{IN._(e),y(e.a,`_lw`)},` `,` `,FN),RN=(e,t)=>LN(e,+!t),zN=(e,t)=>{RN(e,t[0]?.hit),BN(e,t[0]?.text)},BN=E(4,e=>{IN(e),PN(e)}),VN=e=>y(e.a,o),HN=u(5,0,e=>d(e.b,e._.n)),UN=e=>{HN._(e),y(e.a,SN)},WN=b(34,e=>d(e.b,e._._._._.u),e=>e._._._._),GN=e=>{WN(e),y(e.a,`_lx`)},KN=v(2,e=>d(e.b,e._._._.l?`Loading files…`:e._._._.s?`No file matches “${C(e._._._.s)}”.`:`Type part of a file's name. Add :42 to open it at line 42.`)),qN=b(29,KN,e=>e._._._),JN=e=>{qN(e),YN(e),y(e.a,`_de`)},YN=b(33,KN,e=>e._._._),XN=b(28,e=>d(e.b,e._._._._.k),e=>e._._._._),ZN=c(0,`<li role=presentation>Recently opened</li>`,` `,VN,`<li role=presentation> </li>`,` D `,e=>{XN(e),y(e.a,o)}),QN=v(17,e=>ZN(e,!e._._._.s&&e.o===0?0:e.j&&(e.o===0||!e._._._.v[e.o-1].more)?1:2),3),$N=b(33,QN,e=>e._._._),eP=l(`J4`,e=>{s(e.c,`mousemove`,function(){e._._._.p!==e.o&&VP(e._._._,e.o)}),s(e.c,`click`,function(){e._._._.a1(e.o)})}),tP=e=>{$N(e),iP(e),aP(e),sP(e),y(e.d,`_lu`),y(e.e,`_lv`),eP(e)},nP=c(6,`<span>:<!></span>`,` Db%`,GN),rP=v(16,e=>nP(e,e._._._.u&&e.o===e._._._.y?0:1),2),iP=b(34,rP,e=>e._._._),aP=b(35,QN,e=>e._._._),oP=v(15,e=>{S(e.b,`aria-selected`,e.o===e._._._.y?`true`:`false`),y(e.c,[`_c_`,e.o===e._._._.y&&`_c9`])}),sP=b(37,e=>{oP(e),rP(e)},e=>e._._._),cP=E(9,QN),lP=E(14,e=>{QN(e),oP(e),rP(e)}),uP=p(3,`<!><!><!>`,`b%`,0,zN),dP=p(4,`<!><!><!>`,`b%`,0,MN),fP=v(20,e=>{uP(e,[EN(e.s,e.m,e.t,e.s?.length)]),dP(e,[EN(e.s,e.m,0,Math.max(0,e.t-1))])},2),pP=E(19,fP),mP=E(18,e=>{S(e.c,`title`,e.s),pP(e,e.s.lastIndexOf(`/`)+1),fP(e)}),hP=E(12,fP),gP=c(5,`<span> </span>`,` D `,UN),_P=E(13,e=>{gP(e,+!e.n),HN(e)}),vP=(e,t)=>{cP(e,t[0]?.more),mP(e,t[0]?.item?.path),_P(e,t[0]?.item?.hint),hP(e,t[0]?.hits),lP(e,t[1])},yP=b(31,e=>T(e,`c`,e._._.o,cF(e)),e=>e._._),bP=l(`J6`,e=>{x(e,`c`),s(e.d,`click`,function(){e._._.z()})}),xP=e=>{yP(e),SP(e),wP(e),DP(e),y(e.a,`_c4`),_e(e.b),ge(e.b,14),ve(e.b),y(e.c,a),y(e.d,[xe,`_c6`]),Ee(e.e),be(e.e,16),le(e.e),y(e.f,`_c7`),bP(e)},SP=b(32,e=>{S(e.c,`aria-controls`,e._._.q),S(e.f,`id`,e._._.q)},e=>e._._),CP=p(5,`<!><!><li role=option><button type=button><span></span><span></span><!><!></button></li>`,`b%b D D b b%b%`,tP,vP),wP=b(35,e=>CP(e,[e._._.v,e=>`${e.more?`+`:``}${e.item.key}`]),e=>e._._),TP=c(6,`<p> </p>`,` D `,JN),EP=l(`J5`,e=>s(e.c,`keydown`,function(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){t.preventDefault();let n=e._._.w;n&&VP(e._._,(e._._.y+(t.key===`ArrowDown`?1:-1)+n)%n)}else t.key===`Enter`&&(t.preventDefault(),e._._.a1(e._._.y))})),DP=b(36,e=>{TP(e,+!!e._._.w),EP(e)},e=>e._._),OP=c(0,((e,t)=>`<div>${e}<input type=search autofocus autocomplete=off placeholder="Go to file (name:42 for a line)" aria-label="Go to file" role=combobox aria-expanded=true><button type=button title=Close aria-label=Close>${t}</button></div><ul role=listbox></ul><!><!>`)(he,fe),((e,t)=>` D/${e}& b D/${t}&m b%c`)(de,Te),xP),kP=b(30,e=>OP(e,+!e._.m)),AP=g(`J7`,`<!><!><!>`,`b%`,kP),jP=D(kP),MP=h(12,e=>{Qe(e.a,e.m),jP(e)}),NP=v(5,e=>MP(e,e.d,e.e)),PP=E(3,NP),FP=E(4,NP),IP=(e,t)=>{ZP(e,t?.query),$P(e,t?.line)},LP=D(yP),RP=f(14,e=>{IP(e,bN(e.o.trim())),LP(e)}),zP=E(24,D(sP)),BP=v(23,e=>zP(e,Math.min(e.p,Math.max(0,e.w-1)))),VP=f(15,BP),HP=E(16),UP=E(27),WP=v(26,e=>UP(e,lF(e)),3),GP=E(25,WP);function KP(e){Xe(e.a),it(e.a,AP(e)),Ye(e.a,`Go to file`),qe(e.a,[`_bW`,`_c3`]),at(e.a,dF(e)),rt(e.a,!0),Ze(e.a),et(e.a),Je(e.a),$e(e.a),nt(e.a,{}),RP(e,``),VP(e,0),HP(e,m(e)),GP(e,uF(e))}var qP=D(wP,aP),JP=E(21,e=>{tF(e,e.v?.length),WP(e),qP(e)}),YP=v(19,e=>JP(e,(()=>{let t=e.s;if(!t){let t=new Map(e.g.map(e=>[e.key,e]));return(e.h||[]).map(e=>t.get(e)).filter(e=>!!e).map(e=>({item:e,hits:[],more:!1}))}let n=xN(e.g,e=>e.path,t,TN).map(e=>({item:e.item,hits:e.match.hits,more:!1})),r=e.i?xN(e.i.items,e=>e.path,t,TN).map(e=>({item:e.item,hits:e.match.hits,more:!0})):[];return[...n,...r]})()),3),XP=D($N,YN),ZP=E(18,e=>{YP(e),XP(e)}),QP=D(iP,WN),$P=E(20,e=>{WP(e),QP(e)}),eF=D(DP),tF=E(22,e=>{BP(e),eF(e)}),nF=E(6,YP),rF=E(7,YP),iF=E(8,e=>{oF(e,e.i?.label),YP(e)}),aF=E(9,WP),oF=E(10,D(XN)),sF=E(11,D(qN)),cF=e=>function(t){RP(e._._,t),VP(e._._,0)},lF=e=>t=>{let n=e.v[t];if(!n)return;let r=e.u;e.z(),e.j(n.item.key,r,n.more)},uF=e=>()=>{MP(e,!1),RP(e,``),VP(e,0)},dF=e=>t=>{MP(e,t)};_.J0=cF,_.J2=lF,_.J1=uF,_.J3=dF;export{zS as $,uw as A,yC as B,NM as C,pw as D,AM as E,wC as F,mC as G,_C as H,CC as I,nC as J,pC as K,xC as L,EC as M,DC as N,hw as O,TC as P,LS as Q,SC as R,RM as S,Dg as St,jM as T,hC as U,vC as V,gC as W,YS as X,tC as Y,BS as Z,UM as _,Fx as _t,PP as a,TS as at,zM as b,Wb as bt,KP as c,xS as ct,sN as d,tS as dt,RS as et,cN as f,uS as ft,HM as g,Hx as gt,iN as h,iS as ht,aF as i,wS as it,nw as j,mw as k,CN as l,$x as lt,eN as m,nS as mt,sF as n,PS as nt,FP as o,mS as ot,$M as p,cS as pt,WS as q,iF as r,FS as rt,rF as s,SS as st,nF as t,VS as tt,wN as u,rS as ut,VM as v,lx as vt,FM as w,LM as x,Tb as xt,BM as y,ax as yt,bC as z};
|